Slider by Soliloquy – Responsive Image Slider for WordPress - Version 2.5.0

Version Description

  • Added: New UI!
  • Added: Insert Images from Media Library!
  • Added: Display images by list or grid in admin
  • Added: Improved workflows to make slider management easier than ever
  • Fix: Numerous bug fixes, performance, and stability enhancements
Download this release

Release Info

Developer chrisakelley
Plugin Icon 128x128 Slider by Soliloquy – Responsive Image Slider for WordPress
Version 2.5.0
Comparing to
See all releases

Code changes from version 2.4.0.8 to 2.5.0

Files changed (75) hide show
  1. assets/css/addons.css +901 -0
  2. assets/css/attachment-details-modal-support.css +0 -0
  3. assets/css/chosen-sprite.png +0 -0
  4. assets/css/chosen-sprite@2x.png +0 -0
  5. assets/css/codemirror.css +67 -1
  6. assets/css/fonts.css +51 -0
  7. assets/css/global.css +0 -0
  8. assets/css/images/circle-hover.png +0 -0
  9. assets/css/images/circle-hover@2x.png +0 -0
  10. assets/css/images/circle.png +0 -0
  11. assets/css/images/circle@2x.png +0 -0
  12. assets/css/images/delete.png +0 -0
  13. assets/css/images/delete@2x.png +0 -0
  14. assets/css/images/down.png +0 -0
  15. assets/css/images/down@2x.png +0 -0
  16. assets/css/images/editor-icon.png +0 -0
  17. assets/css/images/editor-icon@2x.png +0 -0
  18. assets/css/images/left.png +0 -0
  19. assets/css/images/left@2x.png +0 -0
  20. assets/css/images/menu-icon.png +0 -0
  21. assets/css/images/menu-icon@2x.png +0 -0
  22. assets/css/images/meta-active.png +0 -0
  23. assets/css/images/meta-active@2x.png +0 -0
  24. assets/css/images/meta.png +0 -0
  25. assets/css/images/meta@2x.png +0 -0
  26. assets/css/images/modify.png +0 -0
  27. assets/css/images/modify@2x.png +0 -0
  28. assets/css/images/pause.png +0 -0
  29. assets/css/images/pause@2x.png +0 -0
  30. assets/css/images/play.png +0 -0
  31. assets/css/images/play@2x.png +0 -0
  32. assets/css/images/right.png +0 -0
  33. assets/css/images/right@2x.png +0 -0
  34. assets/css/images/up.png +0 -0
  35. assets/css/images/up@2x.png +0 -0
  36. assets/css/images/video-mini.png +0 -0
  37. assets/css/images/video@2x.png +0 -0
  38. assets/css/media-edit.css +4 -0
  39. assets/css/metabox.css +11 -1
  40. assets/css/modal.css +1 -0
  41. assets/css/overview.css +850 -0
  42. assets/css/settings.css +820 -1
  43. assets/css/soliloquy.css +333 -1
  44. assets/fonts/soliloquy.eot +0 -0
  45. assets/fonts/soliloquy.svg +1 -0
  46. assets/fonts/soliloquy.ttf +0 -0
  47. assets/fonts/soliloquy.woff +0 -0
  48. assets/images/fc.png +0 -0
  49. assets/images/html.png +0 -0
  50. assets/images/instagram.png +0 -0
  51. assets/images/logo-color.png +0 -0
  52. assets/images/soliloquy-logo.png +0 -0
  53. assets/images/video.png +0 -0
  54. assets/images/vimeo.png +0 -0
  55. assets/images/wistia.png +0 -0
  56. assets/images/woo.png +0 -0
  57. assets/images/youtube.png +0 -0
  58. assets/js/addons.js +432 -0
  59. assets/js/editor.js +3 -3
  60. assets/js/lib/bxslider.js +1482 -0
  61. assets/js/lib/chosen.jquery.js +1284 -0
  62. assets/js/lib/clipboard.js +736 -0
  63. assets/js/lib/codemirror.js +12 -0
  64. assets/js/lib/mousewheel.js +221 -0
  65. assets/js/media-delete.js +137 -0
  66. assets/js/media-edit-bulk.js +365 -0
  67. assets/js/media-edit.js +575 -0
  68. assets/js/media-insert.js +148 -0
  69. assets/js/media-manage.js +513 -0
  70. assets/js/media-upload.js +109 -0
  71. assets/js/metabox.js +13 -872
  72. assets/js/min/addons-min.js +1 -0
  73. assets/js/min/chosen.jquery-min.js +1 -0
  74. assets/js/min/clipboard-min.js +1 -0
  75. assets/js/min/codemirror-min.js +6 -6
assets/css/addons.css ADDED
@@ -0,0 +1,901 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ==========================================================================
2
+ Icon Font
3
+ ========================================================================== */
4
+ @font-face {
5
+ font-family: 'soliloquy';
6
+ src: url("../fonts/soliloquy.eot");
7
+ src: url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"), url("../fonts/soliloquy.woff") format("woff"), url("../fonts/soliloquy.ttf") format("truetype"), url("../fonts/soliloquy.svg#soliloquy") format("svg");
8
+ font-weight: normal;
9
+ font-style: normal; }
10
+ [class*='soliloquy-icon-']:before {
11
+ display: inline-block;
12
+ font-family: 'soliloquy';
13
+ font-style: normal;
14
+ font-weight: normal;
15
+ font-size: 13px;
16
+ line-height: 1.5;
17
+ margin-right: 8px;
18
+ -webkit-font-smoothing: antialiased;
19
+ -moz-osx-font-smoothing: grayscale; }
20
+
21
+ .soliloquy-icon-configuration:before {
22
+ content: '\0041'; }
23
+
24
+ .soliloquy-icon-soliloquy:before {
25
+ content: '\0042'; }
26
+
27
+ .soliloquy-icon-pinterest:before {
28
+ content: '\0043'; }
29
+
30
+ .soliloquy-icon-lightbox:before {
31
+ content: '\0044'; }
32
+
33
+ .soliloquy-icon-misc:before {
34
+ content: '\0045'; }
35
+
36
+ .soliloquy-icon-mobile:before {
37
+ content: '\0046'; }
38
+
39
+ .soliloquy-icon-pagination:before {
40
+ content: '\0047'; }
41
+
42
+ .soliloquy-icon-proofing:before {
43
+ content: '\0048'; }
44
+
45
+ .soliloquy-icon-slideshow:before {
46
+ content: '\0049'; }
47
+
48
+ .soliloquy-icon-tags:before {
49
+ content: '\004a'; }
50
+
51
+ .soliloquy-icon-thumbnails:before {
52
+ content: '\004b'; }
53
+
54
+ .soliloquy-icon-video:before {
55
+ content: '\004c'; }
56
+
57
+ .soliloquy-icon-watermark:before {
58
+ content: '\004d'; }
59
+
60
+ .soliloquy-icon-cloud-download:before {
61
+ content: '\004e'; }
62
+
63
+ .soliloquy-icon-toggle-on:before {
64
+ content: '\004f'; }
65
+
66
+ .soliloquy-icon-plus-circle:before {
67
+ content: '\0050'; }
68
+
69
+ .soliloquy-icon-list:before {
70
+ content: '\0052'; }
71
+
72
+ .soliloquy-icon-grid:before {
73
+ content: '\0053'; }
74
+
75
+ .soliloquy-icon-pencil:before {
76
+ content: '\0055'; }
77
+
78
+ .soliloquy-icon-close:before {
79
+ content: '\0056'; }
80
+
81
+ .soliloquy-icon-check:before {
82
+ content: '\0057'; }
83
+
84
+ .soliloquy-icon-schedule:before {
85
+ content: '\0058'; }
86
+
87
+ .soliloquy-icon-carousel:before {
88
+ content: '\0059'; }
89
+
90
+ /* ==========================================================================
91
+ Header Styles
92
+ ========================================================================== */
93
+ #soliloquy-header {
94
+ background-color: #ff3700;
95
+ height: 120px;
96
+ margin-left: -20px; }
97
+ #soliloquy-header #soliloquy-logo {
98
+ margin: 0;
99
+ padding-top: 25px;
100
+ line-height: 120px;
101
+ margin-left: 20px; }
102
+ #soliloquy-header #soliloquy-logo img {
103
+ max-width: 288px; }
104
+
105
+ /* ==========================================================================
106
+ Global Styles
107
+ ========================================================================== */
108
+ .wp-core-ui .button-soliloquy {
109
+ background: #ff3700;
110
+ border-color: #ff3700;
111
+ -webkit-box-shadow: none;
112
+ box-shadow: none;
113
+ color: white;
114
+ text-decoration: none;
115
+ font-weight: 500;
116
+ text-shadow: none;
117
+ line-height: 15px;
118
+ height: 35px;
119
+ font-size: 13px;
120
+ padding: 0 20px 1px; }
121
+ .wp-core-ui .button-soliloquy:hover {
122
+ background: #ff3700;
123
+ border-color: #ff3700;
124
+ color: white;
125
+ opacity: .8; }
126
+ .wp-core-ui .button-soliloquy-secondary {
127
+ background: #f7f7f7;
128
+ border: 1px solid;
129
+ border-color: #dddddd;
130
+ -webkit-box-shadow: none;
131
+ box-shadow: none;
132
+ color: #23282d;
133
+ text-decoration: none;
134
+ text-shadow: none;
135
+ font-weight: bold;
136
+ height: 35px;
137
+ font-size: 13px;
138
+ padding: 0 20px 1px; }
139
+ .wp-core-ui .button-soliloquy-secondary:hover {
140
+ background: #f7f7f7;
141
+ border-color: #999999;
142
+ color: #23282d; }
143
+ .wp-core-ui .button-soliloquy-delete {
144
+ background: #e3231b;
145
+ border: 1px solid;
146
+ border-color: #e3231b;
147
+ -webkit-box-shadow: none;
148
+ box-shadow: none;
149
+ color: white;
150
+ text-decoration: none;
151
+ text-shadow: none;
152
+ font-weight: bold;
153
+ height: 35px;
154
+ font-size: 13px;
155
+ padding: 0 20px 1px; }
156
+ .wp-core-ui .button-soliloquy-delete:hover {
157
+ background: #e3231b;
158
+ color: white;
159
+ opacity: .8; }
160
+ .wp-core-ui a.button-soliloquy,
161
+ .wp-core-ui a.button-soliloquy-secondary,
162
+ .wp-core-ui a.button-soliloquy-delete {
163
+ line-height: 32px; }
164
+
165
+ #soliloquy-settings-content input:not([type=checkbox]) {
166
+ background-color: white;
167
+ border: 1px solid #ddd;
168
+ -webkit-box-shadow: none;
169
+ box-shadow: none;
170
+ color: #32373c;
171
+ height: 35px;
172
+ outline: none;
173
+ -webkit-transition: 0.05s border-color ease-in-out;
174
+ transition: 0.05s border-color ease-in-out; }
175
+ #soliloquy-settings-content input[type=checkbox]:checked {
176
+ -color: #ff3700; }
177
+ #soliloquy-settings-content textarea {
178
+ width: 100%; }
179
+ #soliloquy-settings-content input[type="password"].soliloquy-input {
180
+ background-color: white;
181
+ border: 1px solid #ddd;
182
+ -webkit-box-shadow: none;
183
+ box-shadow: none;
184
+ color: #32373c;
185
+ outline: none;
186
+ -webkit-transition: 0.05s border-color ease-in-out;
187
+ transition: 0.05s border-color ease-in-out; }
188
+
189
+ input[type="password"].soliloquy-input {
190
+ background-color: white;
191
+ border: 1px solid #ddd;
192
+ -webkit-box-shadow: none;
193
+ box-shadow: none;
194
+ height: 35px;
195
+ color: #32373c;
196
+ outline: none;
197
+ -webkit-transition: 0.05s border-color ease-in-out;
198
+ transition: 0.05s border-color ease-in-out; }
199
+
200
+ pre.soliloquy-code {
201
+ background-color: #dddddd;
202
+ border-radius: 3px;
203
+ padding: 15px; }
204
+
205
+ .soliloquy-clipboard {
206
+ display: block;
207
+ text-decoration: underline !important;
208
+ padding-top: 8px;
209
+ font-size: 11px;
210
+ outline: 0 !important; }
211
+ .soliloquy-clipboard:focus {
212
+ outline-style: none;
213
+ box-shadow: none;
214
+ border-color: transparent; }
215
+
216
+ .soliloquy-code {
217
+ display: block;
218
+ background-color: #f7f7f7;
219
+ border-radius: 3px;
220
+ padding: 10px !important; }
221
+
222
+ /* ==========================================================================
223
+ Utilities
224
+ ========================================================================== */
225
+ .soliloquy-list-inline {
226
+ margin: 0;
227
+ list-style: none; }
228
+ .soliloquy-list-inline li {
229
+ display: inline-block;
230
+ margin-right: 5px; }
231
+ .soliloquy-list-inline li:last-child {
232
+ margin-right: 0 !important; }
233
+
234
+ .soliloquy-yt iframe {
235
+ max-width: 100%;
236
+ height: auto; }
237
+
238
+ .soliloquy-hidden {
239
+ display: none !important; }
240
+
241
+ .soliloquy-hideme {
242
+ visibility: hidden; }
243
+
244
+ .soliloquy-no-border {
245
+ border: none !important; }
246
+
247
+ .soliloquy-right {
248
+ float: right; }
249
+
250
+ .soliloquy-left {
251
+ float: left; }
252
+
253
+ .soliloquy-clearfix {
254
+ clear: both;
255
+ display: block;
256
+ height: 0;
257
+ overflow: hidden;
258
+ visibility: hidden;
259
+ width: 0; }
260
+
261
+ .no-margin {
262
+ margin: 0 !important; }
263
+
264
+ .no-margin-top {
265
+ margin-top: 0 !important; }
266
+
267
+ .no-margin-bottom {
268
+ margin-bottom: 0 !important; }
269
+
270
+ /* Add this attribute to the element that needs a tooltip */
271
+ [data-soliloquy-tooltip] {
272
+ position: relative;
273
+ z-index: 2;
274
+ cursor: pointer; }
275
+
276
+ /* Hide the tooltip content by default */
277
+ [data-soliloquy-tooltip]:before,
278
+ [data-soliloquy-tooltip]:after {
279
+ visibility: hidden;
280
+ opacity: 0;
281
+ pointer-events: none; }
282
+
283
+ /* Position tooltip above the element */
284
+ [data-soliloquy-tooltip]:before {
285
+ position: absolute;
286
+ bottom: 120%;
287
+ left: 50%;
288
+ margin-bottom: 5px;
289
+ margin-left: -35px;
290
+ padding: 7px;
291
+ width: 60px;
292
+ -webkit-border-radius: 3px;
293
+ -moz-border-radius: 3px;
294
+ border-radius: 3px;
295
+ background-color: #000;
296
+ color: #fff;
297
+ content: attr(data-soliloquy-tooltip);
298
+ text-align: center;
299
+ font-size: 12px;
300
+ line-height: 1.2; }
301
+
302
+ /* Triangle hack to make tooltip look like a speech bubble */
303
+ [data-soliloquy-tooltip]:after {
304
+ position: absolute;
305
+ bottom: 120%;
306
+ left: 50%;
307
+ width: 0;
308
+ margin-left: -5px;
309
+ border-top: 5px solid #000;
310
+ border-right: 5px solid transparent;
311
+ border-left: 5px solid transparent;
312
+ content: " ";
313
+ font-size: 0;
314
+ line-height: 0; }
315
+
316
+ /* Show tooltip content on hover */
317
+ [data-soliloquy-tooltip]:hover:before,
318
+ [data-soliloquy-tooltip]:hover:after {
319
+ visibility: visible;
320
+ opacity: 1; }
321
+
322
+ .soliloquy-alert {
323
+ position: relative;
324
+ margin: 0 0 20px 0;
325
+ padding: 20px;
326
+ -webkit-border-radius: 2px;
327
+ -moz-border-radius: 2px;
328
+ -o-border-radius: 2px;
329
+ border-radius: 2px;
330
+ background: #fcf8e3; }
331
+
332
+ [class*=soliloquy-grid-] {
333
+ float: left;
334
+ margin-left: 2%; }
335
+ [class*=soliloquy-grid-] input[type=text] {
336
+ width: 100% !important; }
337
+
338
+ .soliloquy-grid-1 {
339
+ width: 6.5%; }
340
+
341
+ .soliloquy-grid-2 {
342
+ width: 15%; }
343
+
344
+ .soliloquy-grid-3 {
345
+ width: 23.5%; }
346
+
347
+ .soliloquy-grid-4 {
348
+ width: 32%; }
349
+
350
+ .soliloquy-grid-5 {
351
+ width: 40.5%; }
352
+
353
+ .soliloquy-grid-6 {
354
+ width: 49%; }
355
+
356
+ .soliloquy-grid-7 {
357
+ width: 57.5%; }
358
+
359
+ .soliloquy-grid-8 {
360
+ width: 66%; }
361
+
362
+ .soliloquy-grid-9 {
363
+ width: 74.5%; }
364
+
365
+ .soliloquy-grid-10 {
366
+ width: 83%; }
367
+
368
+ .soliloquy-grid-11 {
369
+ width: 91.5%; }
370
+
371
+ .soliloquy-grid-12 {
372
+ width: 100%; }
373
+
374
+ .soliloquy-first {
375
+ margin-left: 0px; }
376
+
377
+ /*!
378
+ Chosen, a Select Box Enhancer for jQuery and Prototype
379
+ by Patrick Filler for Harvest, http://getharvest.com
380
+
381
+ Version 1.5.1
382
+ Full source at https://github.com/harvesthq/chosen
383
+ Copyright (c) 2011-2016 Harvest http://getharvest.com
384
+
385
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
386
+ This file is generated by `grunt build`, do not edit it by hand.
387
+ */
388
+ .soliloquy-select {
389
+ /* @group Base */
390
+ /* @end */
391
+ /* @group Single Chosen */
392
+ /* @end */
393
+ /* @group Results */
394
+ /* @end */
395
+ /* @group Multi Chosen */
396
+ /* @end */
397
+ /* @group Active */
398
+ /* @end */
399
+ /* @group Disabled Support */
400
+ /* @end */
401
+ /* @group Right to Left */
402
+ /* @end */
403
+ /* @group Retina compatibility */
404
+ /* @end */ }
405
+ .soliloquy-select * {
406
+ box-shadow: none !important;
407
+ background-image: none !important; }
408
+ .soliloquy-select *:after {
409
+ background-image: none !important; }
410
+ .soliloquy-select .soliloquy-chosen {
411
+ height: 35px;
412
+ max-width: 350px;
413
+ width: 100%; }
414
+ .soliloquy-select .chosen-container {
415
+ position: relative;
416
+ display: inline-block;
417
+ vertical-align: middle;
418
+ font-size: 13px;
419
+ -webkit-user-select: none;
420
+ -moz-user-select: none;
421
+ user-select: none;
422
+ max-width: 350px;
423
+ font-weight: 600; }
424
+ .soliloquy-select .chosen-container * {
425
+ -webkit-box-sizing: border-box;
426
+ -moz-box-sizing: border-box;
427
+ box-sizing: border-box; }
428
+ .soliloquy-select .chosen-container .chosen-drop {
429
+ position: absolute;
430
+ top: 100%;
431
+ left: -9999px;
432
+ z-index: 1010;
433
+ width: 100%;
434
+ border: 1px solid #dddddd;
435
+ border-top: 0;
436
+ background: white; }
437
+ .soliloquy-select .chosen-container.chosen-with-drop .chosen-drop {
438
+ left: 0; }
439
+ .soliloquy-select .chosen-container a {
440
+ cursor: pointer; }
441
+ .soliloquy-select .chosen-container .search-choice .group-name, .soliloquy-select .chosen-container .chosen-single .group-name {
442
+ margin-right: 4px;
443
+ overflow: hidden;
444
+ white-space: nowrap;
445
+ text-overflow: ellipsis;
446
+ font-weight: normal;
447
+ color: #999999; }
448
+ .soliloquy-select .chosen-container .search-choice .group-name:after, .soliloquy-select .chosen-container .chosen-single .group-name:after {
449
+ content: ":";
450
+ padding-left: 2px;
451
+ vertical-align: top; }
452
+ .soliloquy-select .chosen-container-single .chosen-single {
453
+ position: relative;
454
+ display: block;
455
+ overflow: hidden;
456
+ padding: 0 0 0 8px;
457
+ height: 35px;
458
+ border: 1px solid #dddddd;
459
+ border-radius: 3px;
460
+ background: white;
461
+ background-clip: padding-box;
462
+ color: #444;
463
+ text-decoration: none;
464
+ white-space: nowrap;
465
+ line-height: 35px; }
466
+ .soliloquy-select .chosen-container-single .chosen-default {
467
+ color: #999; }
468
+ .soliloquy-select .chosen-container-single .chosen-single span {
469
+ display: block;
470
+ overflow: hidden;
471
+ margin-right: 26px;
472
+ text-overflow: ellipsis;
473
+ white-space: nowrap; }
474
+ .soliloquy-select .chosen-container-single .chosen-single-with-deselect span {
475
+ margin-right: 38px; }
476
+ .soliloquy-select .chosen-container-single .chosen-single abbr {
477
+ position: absolute;
478
+ top: 6px;
479
+ right: 26px;
480
+ display: block;
481
+ width: 12px;
482
+ height: 12px;
483
+ font-size: 1px; }
484
+ .soliloquy-select .chosen-container-single .chosen-single abbr:hover {
485
+ background-position: -42px -10px; }
486
+ .soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
487
+ background-position: -42px -10px; }
488
+ .soliloquy-select .chosen-container-single .chosen-single div {
489
+ border-left: 1px solid #dddddd;
490
+ position: absolute;
491
+ top: 0;
492
+ right: 0;
493
+ display: block;
494
+ width: 30px;
495
+ height: 100%;
496
+ padding-left: 9px; }
497
+ .soliloquy-select .chosen-container-single .chosen-single div b {
498
+ display: block;
499
+ width: 100%;
500
+ height: 100%;
501
+ line-height: 35px; }
502
+ .soliloquy-select .chosen-container-single .chosen-single div b:before {
503
+ content: "\0051";
504
+ display: block;
505
+ font-weight: normal;
506
+ font-size: 8px !important;
507
+ font-family: 'soliloquy';
508
+ position: absolute;
509
+ text-align: center; }
510
+ .soliloquy-select .chosen-container-single .chosen-search {
511
+ position: relative;
512
+ z-index: 1010;
513
+ margin: 0;
514
+ padding: 3px 4px;
515
+ white-space: nowrap; }
516
+ .soliloquy-select .chosen-container-single .chosen-search input[type="text"] {
517
+ margin: 1px 0;
518
+ padding: 4px 20px 4px 5px;
519
+ width: 100%;
520
+ height: auto;
521
+ outline: 0;
522
+ border: 1px solid #dddddd;
523
+ background: white url("chosen-sprite.png") no-repeat 100% -20px;
524
+ background: url("chosen-sprite.png") no-repeat 100% -20px;
525
+ font-size: 1em;
526
+ font-family: sans-serif;
527
+ line-height: normal;
528
+ border-radius: 0; }
529
+ .soliloquy-select .chosen-container-single .chosen-drop {
530
+ margin-top: -1px;
531
+ border-radius: 0 0 2px 2px;
532
+ background-clip: padding-box; }
533
+ .soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search {
534
+ position: absolute;
535
+ left: -9999px; }
536
+ .soliloquy-select .chosen-container .chosen-results {
537
+ color: #444;
538
+ position: relative;
539
+ overflow-x: hidden;
540
+ overflow-y: auto;
541
+ margin: 0 4px 4px 0;
542
+ padding: 0 0 0 4px;
543
+ max-height: 240px;
544
+ -webkit-overflow-scrolling: touch; }
545
+ .soliloquy-select .chosen-container .chosen-results li {
546
+ display: none;
547
+ margin: 0;
548
+ padding: 5px 6px;
549
+ list-style: none;
550
+ line-height: 15px;
551
+ word-wrap: break-word;
552
+ -webkit-touch-callout: none; }
553
+ .soliloquy-select .chosen-container .chosen-results li.active-result {
554
+ display: list-item;
555
+ cursor: pointer; }
556
+ .soliloquy-select .chosen-container .chosen-results li.disabled-result {
557
+ display: list-item;
558
+ color: #ccc;
559
+ cursor: default; }
560
+ .soliloquy-select .chosen-container .chosen-results li.highlighted {
561
+ background: #ff3700;
562
+ color: white; }
563
+ .soliloquy-select .chosen-container .chosen-results li.no-results {
564
+ color: #777;
565
+ display: list-item;
566
+ background: #f4f4f4; }
567
+ .soliloquy-select .chosen-container .chosen-results li.group-result {
568
+ display: list-item;
569
+ font-weight: bold;
570
+ cursor: default; }
571
+ .soliloquy-select .chosen-container .chosen-results li.group-option {
572
+ padding-left: 15px; }
573
+ .soliloquy-select .chosen-container .chosen-results li em {
574
+ font-style: normal;
575
+ text-decoration: underline; }
576
+ .soliloquy-select .chosen-container-multi .chosen-choices {
577
+ position: relative;
578
+ overflow: hidden;
579
+ margin: 0;
580
+ padding: 0 5px;
581
+ width: 100%;
582
+ height: auto !important;
583
+ height: 1%;
584
+ border: 1px solid #dddddd;
585
+ background: white;
586
+ cursor: text; }
587
+ .soliloquy-select .chosen-container-multi .chosen-choices li {
588
+ float: left;
589
+ list-style: none; }
590
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-field {
591
+ margin: 0;
592
+ padding: 0;
593
+ white-space: nowrap; }
594
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
595
+ margin: 1px 0;
596
+ padding: 0;
597
+ height: 25px;
598
+ outline: 0;
599
+ border: 0 !important;
600
+ background: transparent !important;
601
+ box-shadow: none;
602
+ color: #999;
603
+ font-size: 100%;
604
+ font-family: sans-serif;
605
+ line-height: normal;
606
+ border-radius: 0; }
607
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice {
608
+ position: relative;
609
+ margin: 3px 5px 3px 0;
610
+ padding: 3px 20px 3px 5px;
611
+ border: 1px solid #dddddd;
612
+ max-width: 100%;
613
+ border-radius: 2px;
614
+ background: white;
615
+ background-size: 100% 19px;
616
+ background-repeat: repeat-x;
617
+ background-clip: padding-box;
618
+ box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
619
+ color: #333;
620
+ line-height: 13px;
621
+ cursor: default; }
622
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span {
623
+ word-wrap: break-word; }
624
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
625
+ position: absolute;
626
+ top: 4px;
627
+ right: 3px;
628
+ display: block;
629
+ width: 12px;
630
+ height: 12px;
631
+ background: url("chosen-sprite.png") -42px 1px no-repeat;
632
+ font-size: 1px; }
633
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
634
+ background-position: -42px -10px; }
635
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled {
636
+ padding-right: 5px;
637
+ border: 1px solid #dddddd;
638
+ background: #e4e4e4;
639
+ color: #666; }
640
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus {
641
+ background: #d4d4d4; }
642
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
643
+ background-position: -42px -10px; }
644
+ .soliloquy-select .chosen-container-multi .chosen-results {
645
+ margin: 0;
646
+ padding: 0; }
647
+ .soliloquy-select .chosen-container-multi .chosen-drop .result-selected {
648
+ display: list-item;
649
+ color: #ccc;
650
+ cursor: default; }
651
+ .soliloquy-select .chosen-container-active .chosen-single {
652
+ border: 1px solid #dddddd; }
653
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single {
654
+ border: 1px solid #dddddd;
655
+ -moz-border-radius-bottomright: 0;
656
+ border-bottom-right-radius: 0;
657
+ -moz-border-radius-bottomleft: 0;
658
+ border-bottom-left-radius: 0;
659
+ background: white; }
660
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div {
661
+ border-left: 1px solid transparent;
662
+ background: transparent; }
663
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b {
664
+ background-position: -18px 2px; }
665
+ .soliloquy-select .chosen-container-active .chosen-choices {
666
+ border: 1px solid #5897fb;
667
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); }
668
+ .soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"] {
669
+ color: #222 !important; }
670
+ .soliloquy-select .chosen-disabled {
671
+ opacity: 0.5 !important;
672
+ cursor: default; }
673
+ .soliloquy-select .chosen-disabled .chosen-single {
674
+ cursor: default; }
675
+ .soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close {
676
+ cursor: default; }
677
+ .soliloquy-select .chosen-rtl {
678
+ text-align: right; }
679
+ .soliloquy-select .chosen-rtl .chosen-single {
680
+ overflow: visible;
681
+ padding: 0 8px 0 0; }
682
+ .soliloquy-select .chosen-rtl .chosen-single span {
683
+ margin-right: 0;
684
+ margin-left: 26px;
685
+ direction: rtl; }
686
+ .soliloquy-select .chosen-rtl .chosen-single-with-deselect span {
687
+ margin-left: 38px; }
688
+ .soliloquy-select .chosen-rtl .chosen-single div {
689
+ right: auto;
690
+ left: 3px; }
691
+ .soliloquy-select .chosen-rtl .chosen-single abbr {
692
+ right: auto;
693
+ left: 26px; }
694
+ .soliloquy-select .chosen-rtl .chosen-choices li {
695
+ float: right; }
696
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"] {
697
+ direction: rtl; }
698
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-choice {
699
+ margin: 3px 5px 3px 0;
700
+ padding: 3px 5px 3px 19px; }
701
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
702
+ right: auto;
703
+ left: 4px; }
704
+ .soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,
705
+ .soliloquy-select .chosen-rtl .chosen-drop {
706
+ left: 9999px; }
707
+ .soliloquy-select .chosen-rtl.chosen-container-single .chosen-results {
708
+ margin: 0 0 4px 4px;
709
+ padding: 0 4px 0 0; }
710
+ .soliloquy-select .chosen-rtl .chosen-results li.group-option {
711
+ padding-right: 15px;
712
+ padding-left: 0; }
713
+ .soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
714
+ border-right: none; }
715
+ .soliloquy-select .chosen-rtl .chosen-search input[type="text"] {
716
+ padding: 4px 5px 4px 20px;
717
+ background: white url("chosen-sprite.png") no-repeat -30px -20px;
718
+ background: url("chosen-sprite.png") no-repeat -30px -20px;
719
+ direction: rtl; }
720
+ .soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b {
721
+ background-position: 6px 2px; }
722
+ .soliloquy-select .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
723
+ background-position: -12px 2px; }
724
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
725
+ .soliloquy-select .chosen-rtl .chosen-search input[type="text"],
726
+ .soliloquy-select .chosen-container-single .chosen-single abbr,
727
+ .soliloquy-select .chosen-container-single .chosen-search input[type="text"],
728
+ .soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
729
+ .soliloquy-select .chosen-container .chosen-results-scroll-down span,
730
+ .soliloquy-select .chosen-container .chosen-results-scroll-up span {
731
+ background-image: none !important;
732
+ background-size: 52px 37px !important;
733
+ background-repeat: no-repeat !important; } }
734
+ .soliloquy-select select.soliloquy-chosen + .chosen-container.chosen-container-single .chosen-single {
735
+ padding-right: 35px; }
736
+
737
+ /* ==========================================================================
738
+ Addons Styles
739
+ ========================================================================== */
740
+ /* Heading */
741
+ #soliloquy-heading {
742
+ background-color: white;
743
+ height: 45px;
744
+ margin-left: -20px; }
745
+ #soliloquy-heading h1 {
746
+ margin: 0;
747
+ padding-left: 20px;
748
+ line-height: 45px;
749
+ font-size: 20px;
750
+ font-weight: 400; }
751
+
752
+ #soliloquy-settings-refresh-addons-form {
753
+ float: left; }
754
+ #soliloquy-settings-refresh-addons-form p {
755
+ font-size: 14px; }
756
+
757
+ .soliloquy-addon-filter {
758
+ font-weight: 600;
759
+ margin-right: 10px; }
760
+
761
+ #soliloquy-addons-area {
762
+ margin-top: 20px; }
763
+
764
+ #soliloquy-addons-upgrade-area {
765
+ padding-top: 0;
766
+ margin-top: 0;
767
+ border-top: none; }
768
+ #soliloquy-addons-upgrade-area h2.soliloquy-addons-upgrade {
769
+ font-size: 23px; }
770
+ #soliloquy-addons-upgrade-area .soliloquy-unlock-text {
771
+ font-size: 14px;
772
+ margin-bottom: 30px; }
773
+ #soliloquy-addons-upgrade-area .soliloquy-addon-unlock {
774
+ max-width: 125px;
775
+ margin: auto;
776
+ text-align: center; }
777
+
778
+ .soliloquy-addon {
779
+ position: relative;
780
+ border: 1px solid #dddddd;
781
+ background: white;
782
+ border-radius: 3px;
783
+ float: left;
784
+ margin: 0 2% 2% 0;
785
+ height: 510px;
786
+ text-align: center;
787
+ width: 32%;
788
+ box-sizing: border-box;
789
+ -webkit-box-sizing: border-box;
790
+ -moz-box-sizing: border-box; }
791
+ .soliloquy-addon .soliloquy-addon-thumb {
792
+ border-radius: 3px;
793
+ height: auto;
794
+ margin: 0 auto;
795
+ max-width: 100%;
796
+ width: auto; }
797
+ .soliloquy-addon.last {
798
+ margin-right: 0; }
799
+ .soliloquy-addon .soliloquy-addon-content {
800
+ padding: 20px; }
801
+ .soliloquy-addon .soliloquy-addon-footer {
802
+ position: absolute;
803
+ width: 100%;
804
+ bottom: 0;
805
+ height: 75px;
806
+ line-height: 75px;
807
+ border-top: 1px solid #dddddd;
808
+ background-color: #f7f7f7; }
809
+ .soliloquy-addon .soliloquy-addon-footer .soliloquy-unlock-addon {
810
+ vertical-align: middle; }
811
+ .soliloquy-addon .soliloquy-addon-action-button:before {
812
+ font-size: 18px;
813
+ vertical-align: middle;
814
+ margin-top: -1px; }
815
+ .soliloquy-addon .soliloquy-icon-cloud-download.soliloquy-addon-action-button:before {
816
+ color: #999999; }
817
+ .soliloquy-addon .soliloquy-icon-toggle-on.soliloquy-activate-addon:before {
818
+ -webkit-transform: rotate(180deg);
819
+ -moz-transform: rotate(180deg);
820
+ -ms-transform: rotate(180deg);
821
+ -o-transform: rotate(180deg);
822
+ transform: rotate(180deg);
823
+ color: #e3231b; }
824
+ .soliloquy-addon .soliloquy-icon-toggle-on.soliloquy-deactivate-addon:before {
825
+ color: #72b63d; }
826
+ .soliloquy-addon .soliloquy-addon-message,
827
+ .soliloquy-addon .soliloquy-addon-error {
828
+ -moz-border-radius: 3px;
829
+ -webkit-border-radius: 3px;
830
+ border-radius: 3px;
831
+ text-align: left; }
832
+ .soliloquy-addon .soliloquy-addon-inactive .addon-status span {
833
+ color: #e3231b; }
834
+ .soliloquy-addon .addon-status-not-installed span {
835
+ color: #999999; }
836
+ .soliloquy-addon .soliloquy-addon-active .addon-status span {
837
+ color: #72b63d; }
838
+ .soliloquy-addon .soliloquy-addon-message span {
839
+ font-weight: bold; }
840
+ .soliloquy-addon .soliloquy-addon-action {
841
+ display: inline;
842
+ float: right;
843
+ margin-top: 20px;
844
+ margin-right: 15px; }
845
+ .soliloquy-addon .soliloquy-addon-message {
846
+ margin-left: 15px; }
847
+ .soliloquy-addon .soliloquy-addon-error {
848
+ margin-top: 10px; }
849
+ .soliloquy-addon .soliloquy-addon-error .wrap {
850
+ margin: 0; }
851
+ .soliloquy-addon .soliloquy-addon-error .icon32 {
852
+ display: none; }
853
+ .soliloquy-addon .soliloquy-addon-error h2 {
854
+ padding: 0; }
855
+ .soliloquy-addon .soliloquy-addon-error .form-table th {
856
+ padding: 10px 0;
857
+ width: 30% !important; }
858
+ .soliloquy-addon .soliloquy-addon-error .form-table input[type="text"],
859
+ .soliloquy-addon .soliloquy-addon-error .form-table input[type="password"] {
860
+ width: 100% !important; }
861
+ .soliloquy-addon .soliloquy-addon-error p.submit {
862
+ padding: 0; }
863
+ .soliloquy-addon p {
864
+ color: #2f2f2f;
865
+ font-size: 13px;
866
+ margin: 30px 40px; }
867
+
868
+ @media screen and (min-width: 1751px) {
869
+ .soliloquy-addon {
870
+ margin: 0 2% 2% 0;
871
+ height: 720px;
872
+ width: 32%; } }
873
+ @media screen and (max-width: 1750px) {
874
+ .soliloquy-addon {
875
+ margin: 0 2% 2% 0;
876
+ height: 620px;
877
+ width: 32%; } }
878
+ @media screen and (max-width: 1549px) {
879
+ .soliloquy-addon {
880
+ margin: 0 2% 2% 0;
881
+ height: 500px;
882
+ width: 32%; } }
883
+ @media screen and (max-width: 1200px) {
884
+ .soliloquy-addon {
885
+ margin: 0 2% 2% 0;
886
+ min-height: 460px;
887
+ width: 48%; }
888
+ .soliloquy-addon.last {
889
+ margin: 0 2% 2% 0; }
890
+ .soliloquy-addon:nth-child(2) {
891
+ margin-right: 0; } }
892
+ @media screen and (max-width: 568px) {
893
+ .soliloquy-addon {
894
+ margin: 0 1% 1% 0;
895
+ min-height: 530px;
896
+ margin-bottom: 30px;
897
+ width: 98%; }
898
+ .soliloquy-addon.last {
899
+ margin: 0 1% 1% 0; }
900
+ .soliloquy-addon .soliloquy-addon-action {
901
+ margin-top: 0; } }
assets/css/attachment-details-modal-support.css ADDED
File without changes
assets/css/chosen-sprite.png ADDED
Binary file
assets/css/chosen-sprite@2x.png ADDED
Binary file
assets/css/codemirror.css CHANGED
@@ -1 +1,67 @@
1
- .CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999}.CodeMirror div.CodeMirror-cursor{border-left:1px solid black;z-index:3}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7;z-index:1}.cm-tab{display:inline-block}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:black}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-property{color:black}.cm-s-default .cm-operator{color:black}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:white;color:black}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;padding-right:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-sizer{position:relative}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-code pre{border-right:30px solid transparent;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.CodeMirror-wrap .CodeMirror-code pre{border-right:0;width:auto}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;visibility:hidden;border-right:0;width:0}.CodeMirror-focused div.CodeMirror-cursor{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,0.4)}.CodeMirror span{*vertical-align:text-bottom}@media print{.CodeMirror div.CodeMirror-cursor{visibility:hidden}}.solarized.base03{color:#002b36}.solarized.base02{color:#073642}.solarized.base01{color:#586e75}.solarized.base00{color:#657b83}.solarized.base0{color:#839496}.solarized.base1{color:#93a1a1}.solarized.base2{color:#eee8d5}.solarized.base3{color:#fdf6e3}.solarized.solar-yellow{color:#b58900}.solarized.solar-orange{color:#cb4b16}.solarized.solar-red{color:#dc322f}.solarized.solar-magenta{color:#d33682}.solarized.solar-violet{color:#6c71c4}.solarized.solar-blue{color:#268bd2}.solarized.solar-cyan{color:#2aa198}.solarized.solar-green{color:#859900}.cm-s-solarized{line-height:1.45em;font-family:Menlo,Monaco,"Andale Mono","lucida console","Courier New",monospace !important;color-profile:sRGB;rendering-intent:auto}.cm-s-solarized.cm-s-dark{color:#839496;background-color:#002b36;text-shadow:#002b36 0 1px}.cm-s-solarized.cm-s-light{background-color:#fdf6e3;color:#657b83;text-shadow:#eee8d5 0 1px}.cm-s-solarized .CodeMirror-widget{text-shadow:none}.cm-s-solarized .cm-keyword{color:#cb4b16}.cm-s-solarized .cm-atom{color:#d33682}.cm-s-solarized .cm-number{color:#d33682}.cm-s-solarized .cm-def{color:#2aa198}.cm-s-solarized .cm-variable{color:#268bd2}.cm-s-solarized .cm-variable-2{color:#b58900}.cm-s-solarized .cm-variable-3{color:#6c71c4}.cm-s-solarized .cm-property{color:#2aa198}.cm-s-solarized .cm-operator{color:#6c71c4}.cm-s-solarized .cm-comment{color:#586e75;font-style:italic}.cm-s-solarized .cm-string{color:#859900}.cm-s-solarized .cm-string-2{color:#b58900}.cm-s-solarized .cm-meta{color:#859900}.cm-s-solarized .cm-qualifier{color:#b58900}.cm-s-solarized .cm-builtin{color:#d33682}.cm-s-solarized .cm-bracket{color:#cb4b16}.cm-s-solarized .CodeMirror-matchingbracket{color:#859900}.cm-s-solarized .CodeMirror-nonmatchingbracket{color:#dc322f}.cm-s-solarized .cm-tag{color:#93a1a1}.cm-s-solarized .cm-attribute{color:#2aa198}.cm-s-solarized .cm-header{color:#586e75}.cm-s-solarized .cm-quote{color:#93a1a1}.cm-s-solarized .cm-hr{color:transparent;border-top:1px solid #586e75;display:block}.cm-s-solarized .cm-link{color:#93a1a1;cursor:pointer}.cm-s-solarized .cm-special{color:#6c71c4}.cm-s-solarized .cm-em{color:#999;text-decoration:underline;text-decoration-style:dotted}.cm-s-solarized .cm-strong{color:#eee}.cm-s-solarized .cm-tab:before{content:"➤";color:#586e75}.cm-s-solarized .cm-error,.cm-s-solarized .cm-invalidchar{color:#586e75;border-bottom:1px dotted #dc322f}.cm-s-solarized.cm-s-dark .CodeMirror-selected{background:#073642}.cm-s-solarized.cm-s-light .CodeMirror-selected{background:#eee8d5}.cm-s-solarized.CodeMirror{-moz-box-shadow:inset 7px 0 12px -6px #000;-webkit-box-shadow:inset 7px 0 12px -6px #000;box-shadow:inset 7px 0 12px -6px #000}.cm-s-solarized .CodeMirror-gutters{padding:0 15px 0 10px;box-shadow:0 10px 20px black;border-right:1px solid}.cm-s-solarized.cm-s-dark .CodeMirror-gutters{background-color:#073642;border-color:#00232c}.cm-s-solarized.cm-s-dark .CodeMirror-linenumber{text-shadow:#021014 0 -1px}.cm-s-solarized.cm-s-light .CodeMirror-gutters{background-color:#eee8d5;border-color:#eee8d5}.cm-s-solarized .CodeMirror-linenumber{color:#586e75}.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text{color:#586e75}.cm-s-solarized .CodeMirror-lines{padding-left:5px}.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor{border-left:1px solid #819090}.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background{background:rgba(255,255,255,0.1)}.cm-s-solarized.cm-s-light .CodeMirror-activeline-background{background:rgba(0,0,0,0.1)}.cm-s-solarized.CodeMirror,.cm-s-solarized .CodeMirror-gutters{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC")}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Base CodeMirror CSS */
2
+ .CodeMirror{font-family:monospace;height:300px}.CodeMirror-scroll{overflow:auto}.CodeMirror-lines{padding:4px 0}.CodeMirror pre{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:white}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror div.CodeMirror-cursor{border-left:1px solid black}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor{width:auto;border:0;background:#7e7}.cm-tab{display:inline-block}.CodeMirror-ruler{border-left:1px solid #ccc;position:absolute}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta{color:#555}.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:bold}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-s-default .cm-error{color:red}.cm-invalidchar{color:red}div.CodeMirror span.CodeMirror-matchingbracket{color:#0f0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#f22}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{line-height:1;position:relative;overflow:hidden;background:white;color:black}.CodeMirror-scroll{margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:0;position:relative;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-sizer{position:relative;border-right:30px solid transparent;-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;padding-bottom:30px;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;-moz-box-sizing:content-box;box-sizing:content-box;padding-bottom:30px;margin-bottom:-32px;display:inline-block;*zoom:1;*display:inline}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-lines{cursor:text}.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible}.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;overflow:auto}.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-measure pre{position:static}.CodeMirror div.CodeMirror-cursor{position:absolute;border-right:0;width:0}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:1}.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.CodeMirror span{*vertical-align:text-bottom}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}
3
+ /* ttcn theme */
4
+ .cm-s-ttcn .cm-quote { color: #090; }
5
+ .cm-s-ttcn .cm-negative { color: #d44; }
6
+ .cm-s-ttcn .cm-positive { color: #292; }
7
+ .cm-s-ttcn .cm-header, .cm-strong { font-weight: bold; }
8
+ .cm-s-ttcn .cm-em { font-style: italic; }
9
+ .cm-s-ttcn .cm-link { text-decoration: underline; }
10
+ .cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
11
+ .cm-s-ttcn .cm-header { color: #00f; font-weight: bold; }
12
+
13
+ .cm-s-ttcn .cm-atom { color: #219; }
14
+ .cm-s-ttcn .cm-attribute { color: #00c; }
15
+ .cm-s-ttcn .cm-bracket { color: #997; }
16
+ .cm-s-ttcn .cm-comment { color: #333333; }
17
+ .cm-s-ttcn .cm-def { color: #00f; }
18
+ .cm-s-ttcn .cm-em { font-style: italic; }
19
+ .cm-s-ttcn .cm-error { color: #f00; }
20
+ .cm-s-ttcn .cm-hr { color: #999; }
21
+ .cm-s-ttcn .cm-invalidchar { color: #f00; }
22
+ .cm-s-ttcn .cm-keyword { font-weight:bold; }
23
+ .cm-s-ttcn .cm-link { color: #00c; text-decoration: underline; }
24
+ .cm-s-ttcn .cm-meta { color: #555; }
25
+ .cm-s-ttcn .cm-negative { color: #d44; }
26
+ .cm-s-ttcn .cm-positive { color: #292; }
27
+ .cm-s-ttcn .cm-qualifier { color: #555; }
28
+ .cm-s-ttcn .cm-strikethrough { text-decoration: line-through; }
29
+ .cm-s-ttcn .cm-string { color: #006400; }
30
+ .cm-s-ttcn .cm-string-2 { color: #f50; }
31
+ .cm-s-ttcn .cm-strong { font-weight: bold; }
32
+ .cm-s-ttcn .cm-tag { color: #170; }
33
+ .cm-s-ttcn .cm-variable { color: #8B2252; }
34
+ .cm-s-ttcn .cm-variable-2 { color: #05a; }
35
+ .cm-s-ttcn .cm-variable-3 { color: #085; }
36
+
37
+ .cm-s-ttcn .cm-invalidchar { color: #f00; }
38
+
39
+ /* ASN */
40
+ .cm-s-ttcn .cm-accessTypes,
41
+ .cm-s-ttcn .cm-compareTypes { color: #27408B; }
42
+ .cm-s-ttcn .cm-cmipVerbs { color: #8B2252; }
43
+ .cm-s-ttcn .cm-modifier { color:#D2691E; }
44
+ .cm-s-ttcn .cm-status { color:#8B4545; }
45
+ .cm-s-ttcn .cm-storage { color:#A020F0; }
46
+ .cm-s-ttcn .cm-tags { color:#006400; }
47
+
48
+ /* CFG */
49
+ .cm-s-ttcn .cm-externalCommands { color: #8B4545; font-weight:bold; }
50
+ .cm-s-ttcn .cm-fileNCtrlMaskOptions,
51
+ .cm-s-ttcn .cm-sectionTitle { color: #2E8B57; font-weight:bold; }
52
+
53
+ /* TTCN */
54
+ .cm-s-ttcn .cm-booleanConsts,
55
+ .cm-s-ttcn .cm-otherConsts,
56
+ .cm-s-ttcn .cm-verdictConsts { color: #006400; }
57
+ .cm-s-ttcn .cm-configOps,
58
+ .cm-s-ttcn .cm-functionOps,
59
+ .cm-s-ttcn .cm-portOps,
60
+ .cm-s-ttcn .cm-sutOps,
61
+ .cm-s-ttcn .cm-timerOps,
62
+ .cm-s-ttcn .cm-verdictOps { color: #0000FF; }
63
+ .cm-s-ttcn .cm-preprocessor,
64
+ .cm-s-ttcn .cm-templateMatch,
65
+ .cm-s-ttcn .cm-ttcn3Macros { color: #27408B; }
66
+ .cm-s-ttcn .cm-types { color: #A52A2A; font-weight:bold; }
67
+ .cm-s-ttcn .cm-visibilityModifiers { font-weight:bold; }
assets/css/fonts.css ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Generated by soliloquy (http://www.soliloquy.com) on Mon Mar 21 2016*/
2
+ @font-face {
3
+ font-family: 'soliloquy';
4
+ src: url("../fonts/soliloquy.eot");
5
+ src: url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"), url("../fonts/soliloquy.woff") format("woff"), url("../fonts/soliloquy.ttf") format("truetype"), url("../fonts/soliloquy.svg#soliloquy") format("svg");
6
+ font-weight: normal;
7
+ font-style: normal; }
8
+ [class*='soliloquy-']:before {
9
+ display: inline-block;
10
+ font-family: 'soliloquy';
11
+ font-style: normal;
12
+ font-weight: normal;
13
+ line-height: 1;
14
+ -webkit-font-smoothing: antialiased;
15
+ -moz-osx-font-smoothing: grayscale; }
16
+
17
+ .soliloquy-configuration:before {
18
+ content: '\0042'; }
19
+
20
+ .soliloquy-leaf:before {
21
+ content: '\0043'; }
22
+
23
+ .soliloquy-lightbox:before {
24
+ content: '\0044'; }
25
+
26
+ .soliloquy-misc:before {
27
+ content: '\0045'; }
28
+
29
+ .soliloquy-mobile:before {
30
+ content: '\0046'; }
31
+
32
+ .soliloquy-pagination:before {
33
+ content: '\0047'; }
34
+
35
+ .soliloquy-proofing:before {
36
+ content: '\0048'; }
37
+
38
+ .soliloquy-slideshow:before {
39
+ content: '\0049'; }
40
+
41
+ .soliloquy-tags:before {
42
+ content: '\004a'; }
43
+
44
+ .soliloquy-thumbnails:before {
45
+ content: '\004b'; }
46
+
47
+ .soliloquy-video:before {
48
+ content: '\004c'; }
49
+
50
+ .soliloquy-watermark:before {
51
+ content: '\004d'; }
assets/css/global.css ADDED
File without changes
assets/css/images/circle-hover.png CHANGED
Binary file
assets/css/images/circle-hover@2x.png CHANGED
Binary file
assets/css/images/circle.png CHANGED
Binary file
assets/css/images/circle@2x.png CHANGED
Binary file
assets/css/images/delete.png CHANGED
Binary file
assets/css/images/delete@2x.png CHANGED
Binary file
assets/css/images/down.png ADDED
Binary file
assets/css/images/down@2x.png ADDED
Binary file
assets/css/images/editor-icon.png CHANGED
Binary file
assets/css/images/editor-icon@2x.png CHANGED
Binary file
assets/css/images/left.png CHANGED
Binary file
assets/css/images/left@2x.png CHANGED
Binary file
assets/css/images/menu-icon.png CHANGED
Binary file
assets/css/images/menu-icon@2x.png CHANGED
Binary file
assets/css/images/meta-active.png CHANGED
Binary file
assets/css/images/meta-active@2x.png CHANGED
Binary file
assets/css/images/meta.png CHANGED
Binary file
assets/css/images/meta@2x.png CHANGED
Binary file
assets/css/images/modify.png CHANGED
Binary file
assets/css/images/modify@2x.png CHANGED
Binary file
assets/css/images/pause.png CHANGED
Binary file
assets/css/images/pause@2x.png CHANGED
Binary file
assets/css/images/play.png CHANGED
Binary file
assets/css/images/play@2x.png CHANGED
Binary file
assets/css/images/right.png CHANGED
Binary file
assets/css/images/right@2x.png CHANGED
Binary file
assets/css/images/up.png ADDED
Binary file
assets/css/images/up@2x.png ADDED
Binary file
assets/css/images/video-mini.png CHANGED
Binary file
assets/css/images/video@2x.png CHANGED
Binary file
assets/css/media-edit.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
1
+ #soliloquy-meta-edit .attachment-details .settings span {
2
+ min-width: 0; }
3
+ #soliloquy-meta-edit .attachment-details .settings input[type=text] {
4
+ width: 100%; }
assets/css/metabox.css CHANGED
@@ -1 +1,11 @@
1
- .soliloquy-spinner{float:none;display:inline-block;margin-top:0}.no-margin{margin:0 !important}.no-margin-top{margin-top:0 !important}.no-margin-bottom{margin-bottom:0 !important}#soliloquy{position:relative}#soliloquy .soliloquy-clear{clear:both}#soliloquy .soliloquy-clear:after{clear:both;content:'.';display:block;height:0;line-height:0;overflow:auto;visibility:hidden;zoom:1}#soliloquy p.description{font-size:13px}#soliloquy .inside{margin:10px 0;padding:0 10px}#soliloquy #soliloquy-tabs{position:relative}#soliloquy #soliloquy-tabs-nav{list-style:none;margin:0 0 10px;padding:0;border-bottom:1px solid #cecece}#soliloquy #soliloquy-tabs-nav li{float:left;margin:0 10px -1px 0}#soliloquy #soliloquy-tabs-nav li a{display:block;padding:7px 10px 5px;font-size:14px;color:#aaa;font-weight:300;text-decoration:none;outline:none}#soliloquy #soliloquy-tabs-nav li.soliloquy-active a{border:1px solid #cecece;border-bottom-color:#fff;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;color:#21759b;padding-top:6px}#soliloquy #soliloquy-tabs-nav li a:hover{color:#21759b}#soliloquy #soliloquy-types-nav{margin:10px 0;padding:10px 0;border-top:1px solid #eee;border-bottom:1px solid #eee}#soliloquy #soliloquy-types-nav li{float:left;margin:0 10px 0 0}#soliloquy #soliloquy-types-nav li.soliloquy-type-label{margin-right:20px}#soliloquy #soliloquy-types-nav li.soliloquy-type-label span{font-weight:700;font-size:13px;vertical-align:middle}#soliloquy .soliloquy-meta-close-text{display:none;color:#fff;font-style:italic;font-size:11px;position:absolute;z-index:98;top:6px;right:27px}#soliloquy .soliloquy-helper-active .soliloquy-meta-close-text{display:inline}#soliloquy .soliloquy-meta-icon{position:absolute;width:19px;height:16px;top:6px;right:0;background:url(images/meta.png) no-repeat scroll 0 0;display:block;outline:none;z-index:98}#soliloquy .soliloquy-helper-active .soliloquy-meta-icon{background-image:url(images/meta-active.png)}#soliloquy .soliloquy-meta-information{display:none;padding:0 1em 1em;position:absolute;right:0;top:30px;width:278px;background:#fff;border:1px solid #e5e5e5;-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.7);box-shadow:0 5px 15px rgba(0,0,0,0.7);z-index:98}#soliloquy .soliloquy-helper-active .soliloquy-meta-information{display:block}#soliloquy .soliloquy-meta-helper-overlay{position:absolute;z-index:97;background:#000;opacity:.7;filter:alpha(opacity=70);width:100%;height:100%}#soliloquy .soliloquy-tab{display:none}#soliloquy .soliloquy-tab.soliloquy-active{display:block}#soliloquy .soliloquy-tab p.soliloquy-intro{margin:1.5em 0 0.5em}#soliloquy .soliloquy-tab th,#soliloquy .soliloquy-tab input[type="text"],#soliloquy .soliloquy-tab input[type="number"],#soliloquy .soliloquy-tab input[type="password"],#soliloquy .soliloquy-tab select{min-width:210px;padding-right:0}#soliloquy .soliloquy-tab{min-height:320px}#soliloquy #soliloquy-output{margin:20px 0 10px;padding:0;list-style:none}#soliloquy #soliloquy-output li{background:#fff;display:block;float:left;margin:0 10px 10px 0;padding:4px;list-style:none;border:1px solid #cecece;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.06);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.06);box-shadow:0 1px 2px rgba(0,0,0,0.06);cursor:move;position:relative;width:150px;height:150px}#soliloquy #soliloquy-output li.soliloquy-status-pending{background-color:#faebcc;border-color:#8a6d3b}#soliloquy #soliloquy-output li.soliloquy-status-active{background-color:#dff0d8;border-color:#3c763d}#soliloquy #soliloquy-output li.dropzone{background:transparent;border:1px dashed #d5d5d5;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}#soliloquy #soliloquy-output li img{display:block;margin:auto;position:absolute;top:0;left:0;right:0;bottom:0;max-width:150px;max-height:150px}#soliloquy #soliloquy-output li .soliloquy-remove-slide{background:url(images/delete.png) no-repeat scroll 0 0;display:block;height:16px;left:-8px;outline:none;position:absolute;top:-8px;width:16px;z-index:20}#soliloquy #soliloquy-output li .soliloquy-modify-slide{background:url(images/modify.png) no-repeat scroll 0 0;display:block;height:16px;left:12px;outline:none;position:absolute;top:-8px;width:16px;z-index:20}#soliloquy #soliloquy-output li .soliloquy-video-wrap,#soliloquy #soliloquy-output li .soliloquy-html-wrap{position:relative;width:150px;height:150px;box-shadow:inset 0 0 15px rgba(0,0,0,0.1),inset 0 0 0 1px rgba(0,0,0,0.05);background:#f5f5f5;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;cursor:move}#soliloquy #soliloquy-output li .soliloquy-video-inside,#soliloquy #soliloquy-output li .soliloquy-html-inside{width:150px;height:150px;display:table;position:absolute;top:0;left:0;margin:0 auto;overflow:hidden;max-width:100%;max-height:100%;cursor:move}#soliloquy #soliloquy-output li .soliloquy-video-table,#soliloquy #soliloquy-output li .soliloquy-html-table{display:table-cell;vertical-align:middle;text-align:center;cursor:move}#media-items .media-item .edit-attachment,.soliloquy-media-frame .upload-flash-bypass{display:none !important}#media-items{margin:0 0 16px;overflow:hidden;width:100%}#media-items .media-item{width:auto;float:left;margin:0 8px 8px 0}#media-items .media-item img{max-width:150px;max-height:150px;float:none;margin:4px;display:block}.soliloquy-slider{padding-left:7px}.soliloquy-slider .attachment{margin:8px}.soliloquy-slider .attachment-preview,.soliloquy-slider .attachment-preview .thumbnail{max-width:150px;max-height:150px}.soliloquy-media-frame .max-upload-size{display:block;margin:1em 0}.soliloquy-media-frame .soliloquy-library-toolbar{top:5px}.soliloquy-media-frame .attachment.soliloquy-in-slider{box-shadow:0 0 0 1px #fff,0 0 0 5px #519e0c}.soliloquy-media-frame .attachment.soliloquy-in-slider .attachment-preview,.soliloquy-media-frame .attachment.soliloquy-in-slider .attachment-preview .check{cursor:default}.soliloquy-media-frame .attachment.soliloquy-in-slider .check{box-shadow:0 0 0 1px #519e0c;background:#519e0c;background-image:-webkit-gradient(linear, left top, left bottom, from(#519e0c), to(#519e0c));background-image:-webkit-linear-gradient(top, #519e0c, #407f08);background-image:-moz-linear-gradient(top, #519e0c, #407f08);background-image:-o-linear-gradient(top, #519e0c, #407f08);background-image:linear-gradient(to bottom, #519e0c, #407f08)}.soliloquy-media-frame .attachment.soliloquy-in-slider .check div,.soliloquy-media-frame .attachment.soliloquy-in-slider .check:hover div{background-position:-21px 0}.soliloquy-meta-wrap .soliloquy-meta-sidebar{overflow:auto;position:relative}.soliloquy-media-frame .media-sidebar h3{margin:1.1em 0 1em}.soliloquy-media-frame .media-sidebar p{margin:0 0 1.5em}.soliloquy-meta{overflow:auto;padding:0 16px}.media-frame.soliloquy-media-frame input:focus,.media-frame.soliloquy-media-frame textarea:focus,.media-frame.soliloquy-media-frame select:focus{border-color:#aaa}.soliloquy-meta-wrap .soliloquy-meta.attachments{top:0}.soliloquy-meta.attachments .attachment{width:200px;height:200px;border:none !important}.soliloquy-meta.attachments .attachment.selected{width:200px;height:200px}.soliloquy-meta.attachments .attachment .attachment-preview{width:100%;height:100%;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview:before{padding-top:0;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail{display:table;position:relative;top:auto;right:auto;bottom:auto;left:auto;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail:after{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail .inside{display:table-cell;width:200px;height:200px;text-align:center;vertical-align:middle;border:none !important}.soliloquy-ui-content{top:16px !important}.soliloquy-meta-wrap .form-table{margin:0}.soliloquy-meta-wrap .form-table input[type=text],.soliloquy-meta-wrap .form-table textarea{width:100%}#soliloquy .soliloquy-import-form{margin-bottom:20px;padding-bottom:20px;border-bottom:1px solid #ddd}#soliloquy .soliloquy-unit{font-style:normal;font-weight:700;font-size:13px}#soliloquy textarea{width:100%}#soliloquy-html-slides .soliloquy-html-slide-code{width:100%;position:relative;height:300px}.soliloquy-video-thumbnail,.soliloquy-html-thumbnail{vertical-align:baseline !important}#soliloquy-plupload-upload-ui{position:relative}#soliloquy-drag-drop-area{border:4px dashed #bbb;height:200px}#soliloquy-plupload-upload-ui.drag-over #soliloquy-drag-drop-area{border-color:#83b4d8}#soliloquy .soliloquy-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#soliloquy .soliloquy-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#soliloquy .upload-flash-bypass{display:none}#soliloquy .max-upload-size{display:block;margin:10px 0}.soliloquy-media-frame .soliloquy-accepted-urls{clear:both;overflow:hidden}.soliloquy-media-frame .soliloquy-accepted-urls span{display:block}.soliloquy-media-frame .soliloquy-column{float:left;width:32%;margin-right:2%}.soliloquy-media-frame .soliloquy-column.soliloquy-last{margin-right:0}.soliloquy-media-frame .soliloquy-video-info{background-color:#ffffe0;border:1px solid #e6db55;padding:15px;margin-bottom:16px}.soliloquy-media-frame .soliloquy-video-info p{margin-top:0}.soliloquy-html-slide-holder,.soliloquy-video-slide-holder{border:5px dashed #eee;padding:10px;margin-bottom:1em}#soliloquy-html-slides .soliloquy-delete-html-slide,#soliloquy-video-slides .soliloquy-delete-video-slide{float:right}#soliloquy-video-slides input,#soliloquy-video-slides textarea,#soliloquy-html-slides input,#soliloquy-html-slides textarea{width:450px}.soliloquy-alert{padding:15px;margin-bottom:20px;border:1px solid #faebcc;border-radius:4px;background-color:#fcf8e3;color:#8a6d3b}body.branch-4-3 div.media-modal a.media-modal-close,body.branch-4-4 div.media-modal a.media-modal-close{text-align:center;text-decoration:none;display:inline-block}body.branch-4-3 div.media-modal a.media-modal-close span,body.branch-4-4 div.media-modal a.media-modal-close span{display:inline-block;margin-top:17px}@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){#soliloquy .soliloquy-meta-icon{background-image:url(images/meta@2x.png);background-size:19px 16px}#soliloquy .soliloquy-helper-active .soliloquy-meta-icon{background-image:url(images/meta-active@2x.png);background-size:19px 16px}#soliloquy #soliloquy-output li .soliloquy-remove-slide{background-image:url(images/delete@2x.png);background-size:16px 16px}#soliloquy #soliloquy-output li .soliloquy-modify-slide{background-image:url(images/modify@2x.png);background-size:16px 16px}}
 
 
 
 
 
 
 
 
 
 
1
+ @font-face{font-family:'soliloquy';src:url("../fonts/soliloquy.eot");src:url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"),url("../fonts/soliloquy.woff") format("woff"),url("../fonts/soliloquy.ttf") format("truetype"),url("../fonts/soliloquy.svg#soliloquy") format("svg");font-weight:normal;font-style:normal}[class*='soliloquy-icon-']:before{display:inline-block;font-family:'soliloquy';font-style:normal;font-weight:normal;font-size:13px;line-height:1.5;margin-right:8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.soliloquy-icon-configuration:before{content:'\0041'}.soliloquy-icon-soliloquy:before{content:'\0042'}.soliloquy-icon-pinterest:before{content:'\0043'}.soliloquy-icon-lightbox:before{content:'\0044'}.soliloquy-icon-misc:before{content:'\0045'}.soliloquy-icon-mobile:before{content:'\0046'}.soliloquy-icon-pagination:before{content:'\0047'}.soliloquy-icon-proofing:before{content:'\0048'}.soliloquy-icon-slideshow:before{content:'\0049'}.soliloquy-icon-tags:before{content:'\004a'}.soliloquy-icon-thumbnails:before{content:'\004b'}.soliloquy-icon-video:before{content:'\004c'}.soliloquy-icon-watermark:before{content:'\004d'}.soliloquy-icon-cloud-download:before{content:'\004e'}.soliloquy-icon-toggle-on:before{content:'\004f'}.soliloquy-icon-plus-circle:before{content:'\0050'}.soliloquy-icon-list:before{content:'\0052'}.soliloquy-icon-grid:before{content:'\0053'}.soliloquy-icon-pencil:before{content:'\0055'}.soliloquy-icon-close:before{content:'\0056'}.soliloquy-icon-check:before{content:'\0057'}.soliloquy-icon-schedule:before{content:'\0058'}.soliloquy-icon-carousel:before{content:'\0059'}#soliloquy-header{background-color:#ff3700;height:120px;margin-left:-20px}#soliloquy-header #soliloquy-logo{margin:0;padding-top:25px;line-height:120px;margin-left:20px}#soliloquy-header #soliloquy-logo img{max-width:288px}.wp-core-ui .button-soliloquy{background:#ff3700;border-color:#ff3700;-webkit-box-shadow:none;box-shadow:none;color:#fff;text-decoration:none;font-weight:500;text-shadow:none;line-height:15px;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy:hover{background:#ff3700;border-color:#ff3700;color:#fff;opacity:.8}.wp-core-ui .button-soliloquy-secondary{background:#f7f7f7;border:1px solid;border-color:#ddd;-webkit-box-shadow:none;box-shadow:none;color:#23282d;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy-secondary:hover{background:#f7f7f7;border-color:#999;color:#23282d}.wp-core-ui .button-soliloquy-delete{background:#e3231b;border:1px solid;border-color:#e3231b;-webkit-box-shadow:none;box-shadow:none;color:#fff;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}.wp-core-ui .button-soliloquy-delete:hover{background:#e3231b;color:#fff;opacity:.8}.wp-core-ui a.button-soliloquy,.wp-core-ui a.button-soliloquy-secondary,.wp-core-ui a.button-soliloquy-delete{line-height:32px}#soliloquy-settings-content input:not([type=checkbox]){background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;height:35px;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}#soliloquy-settings-content input[type=checkbox]:checked{-color:#ff3700}#soliloquy-settings-content textarea{width:100%}#soliloquy-settings-content input[type="password"].soliloquy-input{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}input[type="password"].soliloquy-input{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;height:35px;color:#32373c;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out}pre.soliloquy-code{background-color:#ddd;border-radius:3px;padding:15px}.soliloquy-clipboard{display:block;text-decoration:underline !important;padding-top:8px;font-size:11px;outline:0 !important}.soliloquy-clipboard:focus{outline-style:none;box-shadow:none;border-color:transparent}.soliloquy-code{display:block;background-color:#f7f7f7;border-radius:3px;padding:10px !important}.soliloquy-list-inline{margin:0;list-style:none}.soliloquy-list-inline li{display:inline-block;margin-right:5px}.soliloquy-list-inline li:last-child{margin-right:0 !important}.soliloquy-yt iframe{max-width:100%;height:auto}.soliloquy-hidden{display:none !important}.soliloquy-hideme{visibility:hidden}.soliloquy-no-border{border:none !important}.soliloquy-right{float:right}.soliloquy-left{float:left}.soliloquy-clearfix{clear:both;display:block;height:0;overflow:hidden;visibility:hidden;width:0}.no-margin{margin:0 !important}.no-margin-top{margin-top:0 !important}.no-margin-bottom{margin-bottom:0 !important}[data-soliloquy-tooltip]{position:relative;z-index:2;cursor:pointer}[data-soliloquy-tooltip]:before,[data-soliloquy-tooltip]:after{visibility:hidden;opacity:0;pointer-events:none}[data-soliloquy-tooltip]:before{position:absolute;bottom:120%;left:50%;margin-bottom:5px;margin-left:-35px;padding:7px;width:60px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:#000;color:#fff;content:attr(data-soliloquy-tooltip);text-align:center;font-size:12px;line-height:1.2}[data-soliloquy-tooltip]:after{position:absolute;bottom:120%;left:50%;width:0;margin-left:-5px;border-top:5px solid #000;border-right:5px solid transparent;border-left:5px solid transparent;content:" ";font-size:0;line-height:0}[data-soliloquy-tooltip]:hover:before,[data-soliloquy-tooltip]:hover:after{visibility:visible;opacity:1}.soliloquy-alert{position:relative;margin:0 0 20px 0;padding:20px;-webkit-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px;background:#fcf8e3}[class*=soliloquy-grid-]{float:left;margin-left:2%}[class*=soliloquy-grid-] input[type=text]{width:100% !important}.soliloquy-grid-1{width:6.5%}.soliloquy-grid-2{width:15%}.soliloquy-grid-3{width:23.5%}.soliloquy-grid-4{width:32%}.soliloquy-grid-5{width:40.5%}.soliloquy-grid-6{width:49%}.soliloquy-grid-7{width:57.5%}.soliloquy-grid-8{width:66%}.soliloquy-grid-9{width:74.5%}.soliloquy-grid-10{width:83%}.soliloquy-grid-11{width:91.5%}.soliloquy-grid-12{width:100%}.soliloquy-first{margin-left:0px}/*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.5.1
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2016 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.
11
+ */.soliloquy-select *{box-shadow:none !important;background-image:none !important}.soliloquy-select *:after{background-image:none !important}.soliloquy-select .soliloquy-chosen{height:35px;max-width:350px;width:100%}.soliloquy-select .chosen-container{position:relative;display:inline-block;vertical-align:middle;font-size:13px;-webkit-user-select:none;-moz-user-select:none;user-select:none;max-width:350px;font-weight:600}.soliloquy-select .chosen-container *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.soliloquy-select .chosen-container .chosen-drop{position:absolute;top:100%;left:-9999px;z-index:1010;width:100%;border:1px solid #ddd;border-top:0;background:#fff}.soliloquy-select .chosen-container.chosen-with-drop .chosen-drop{left:0}.soliloquy-select .chosen-container a{cursor:pointer}.soliloquy-select .chosen-container .search-choice .group-name,.soliloquy-select .chosen-container .chosen-single .group-name{margin-right:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:normal;color:#999999}.soliloquy-select .chosen-container .search-choice .group-name:after,.soliloquy-select .chosen-container .chosen-single .group-name:after{content:":";padding-left:2px;vertical-align:top}.soliloquy-select .chosen-container-single .chosen-single{position:relative;display:block;overflow:hidden;padding:0 0 0 8px;height:35px;border:1px solid #ddd;border-radius:3px;background:#fff;background-clip:padding-box;color:#444;text-decoration:none;white-space:nowrap;line-height:35px}.soliloquy-select .chosen-container-single .chosen-default{color:#999}.soliloquy-select .chosen-container-single .chosen-single span{display:block;overflow:hidden;margin-right:26px;text-overflow:ellipsis;white-space:nowrap}.soliloquy-select .chosen-container-single .chosen-single-with-deselect span{margin-right:38px}.soliloquy-select .chosen-container-single .chosen-single abbr{position:absolute;top:6px;right:26px;display:block;width:12px;height:12px;font-size:1px}.soliloquy-select .chosen-container-single .chosen-single abbr:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-single .chosen-single div{border-left:1px solid #ddd;position:absolute;top:0;right:0;display:block;width:30px;height:100%;padding-left:9px}.soliloquy-select .chosen-container-single .chosen-single div b{display:block;width:100%;height:100%;line-height:35px}.soliloquy-select .chosen-container-single .chosen-single div b:before{content:"\0051";display:block;font-weight:normal;font-size:8px !important;font-family:'soliloquy';position:absolute;text-align:center}.soliloquy-select .chosen-container-single .chosen-search{position:relative;z-index:1010;margin:0;padding:3px 4px;white-space:nowrap}.soliloquy-select .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 #ddd;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}.soliloquy-select .chosen-container-single .chosen-drop{margin-top:-1px;border-radius:0 0 2px 2px;background-clip:padding-box}.soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search{position:absolute;left:-9999px}.soliloquy-select .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}.soliloquy-select .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}.soliloquy-select .chosen-container .chosen-results li.active-result{display:list-item;cursor:pointer}.soliloquy-select .chosen-container .chosen-results li.disabled-result{display:list-item;color:#ccc;cursor:default}.soliloquy-select .chosen-container .chosen-results li.highlighted{background:#ff3700;color:#fff}.soliloquy-select .chosen-container .chosen-results li.no-results{color:#777;display:list-item;background:#f4f4f4}.soliloquy-select .chosen-container .chosen-results li.group-result{display:list-item;font-weight:bold;cursor:default}.soliloquy-select .chosen-container .chosen-results li.group-option{padding-left:15px}.soliloquy-select .chosen-container .chosen-results li em{font-style:normal;text-decoration:underline}.soliloquy-select .chosen-container-multi .chosen-choices{position:relative;overflow:hidden;margin:0;padding:0 5px;width:100%;height:auto !important;height:1%;border:1px solid #ddd;background:#fff;cursor:text}.soliloquy-select .chosen-container-multi .chosen-choices li{float:left;list-style:none}.soliloquy-select .chosen-container-multi .chosen-choices li.search-field{margin:0;padding:0;white-space:nowrap}.soliloquy-select .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}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice{position:relative;margin:3px 5px 3px 0;padding:3px 20px 3px 5px;border:1px solid #ddd;max-width:100%;border-radius:2px;background:#fff;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,0.05);color:#333;line-height:13px;cursor:default}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span{word-wrap:break-word}.soliloquy-select .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}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover{background-position:-42px -10px}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled{padding-right:5px;border:1px solid #ddd;background:#e4e4e4;color:#666}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus{background:#d4d4d4}.soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close{background-position:-42px -10px}.soliloquy-select .chosen-container-multi .chosen-results{margin:0;padding:0}.soliloquy-select .chosen-container-multi .chosen-drop .result-selected{display:list-item;color:#ccc;cursor:default}.soliloquy-select .chosen-container-active .chosen-single{border:1px solid #ddd}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single{border:1px solid #ddd;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;background:#fff}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div{border-left:1px solid transparent;background:transparent}.soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b{background-position:-18px 2px}.soliloquy-select .chosen-container-active .chosen-choices{border:1px solid #5897fb;box-shadow:0 0 5px rgba(0,0,0,0.3)}.soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"]{color:#222 !important}.soliloquy-select .chosen-disabled{opacity:0.5 !important;cursor:default}.soliloquy-select .chosen-disabled .chosen-single{cursor:default}.soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close{cursor:default}.soliloquy-select .chosen-rtl{text-align:right}.soliloquy-select .chosen-rtl .chosen-single{overflow:visible;padding:0 8px 0 0}.soliloquy-select .chosen-rtl .chosen-single span{margin-right:0;margin-left:26px;direction:rtl}.soliloquy-select .chosen-rtl .chosen-single-with-deselect span{margin-left:38px}.soliloquy-select .chosen-rtl .chosen-single div{right:auto;left:3px}.soliloquy-select .chosen-rtl .chosen-single abbr{right:auto;left:26px}.soliloquy-select .chosen-rtl .chosen-choices li{float:right}.soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"]{direction:rtl}.soliloquy-select .chosen-rtl .chosen-choices li.search-choice{margin:3px 5px 3px 0;padding:3px 5px 3px 19px}.soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close{right:auto;left:4px}.soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,.soliloquy-select .chosen-rtl .chosen-drop{left:9999px}.soliloquy-select .chosen-rtl.chosen-container-single .chosen-results{margin:0 0 4px 4px;padding:0 4px 0 0}.soliloquy-select .chosen-rtl .chosen-results li.group-option{padding-right:15px;padding-left:0}.soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div{border-right:none}.soliloquy-select .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}.soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b{background-position:6px 2px}.soliloquy-select .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: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx){.soliloquy-select .chosen-rtl .chosen-search input[type="text"],.soliloquy-select .chosen-container-single .chosen-single abbr,.soliloquy-select .chosen-container-single .chosen-search input[type="text"],.soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,.soliloquy-select .chosen-container .chosen-results-scroll-down span,.soliloquy-select .chosen-container .chosen-results-scroll-up span{background-image:none !important;background-size:52px 37px !important;background-repeat:no-repeat !important}}.soliloquy-select select.soliloquy-chosen+.chosen-container.chosen-container-single .chosen-single{padding-right:35px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info,#soliloquy-meta-edit .attachment-details .attachment-info{padding:16px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings,#soliloquy-meta-edit .attachment-details .attachment-info .settings{margin:0;padding:0;border:none}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .soliloquy-meta.code,#soliloquy-meta-edit .attachment-details .attachment-info .settings .soliloquy-meta.code{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .soliloquy-meta.code span.name,#soliloquy-meta-edit .attachment-details .attachment-info .settings .soliloquy-meta.code span.name{display:block;width:100%;min-width:100%;margin:0;padding:0;text-align:left;font-weight:700;font-size:14px;margin-bottom:3px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting .check-label,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting .check-label{font-style:italic}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting input[type="text"],#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting textarea,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting input[type="text"],#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting textarea{display:block;width:100%;min-width:100%;margin:0}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting input[type="checkbox"],#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting input[type="checkbox"]{float:left;margin:7px 3px 0 0}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting select,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting select{margin:0}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting span.name,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting span.name{display:block;width:100%;min-width:100%;margin:0;padding:0;text-align:left;font-weight:700;font-size:14px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting span.description,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting span.description{text-align:left;font-style:normal;font-size:13px;font-style:italic;color:#666;margin:0px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info .settings .setting div.description,#soliloquy-meta-edit .attachment-details .attachment-info .settings .setting div.description{text-align:left;font-style:normal;font-size:13px;font-style:italic;color:#666;margin-top:4px}#soliloquy-meta-edit-bulk .attachment-details .attachment-info div.actions a.button,#soliloquy-meta-edit .attachment-details .attachment-info div.actions a.button{display:inline-block}#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit-bulk .mce-window,#soliloquy-meta-edit #wp-link-wrap,#soliloquy-meta-edit .mce-window{-webkit-box-shadow:0 3px 6px rgba(0,0,0,0.3)}#soliloquy-meta-edit-bulk .wp-editor-tools,#soliloquy-meta-edit .wp-editor-tools{z-index:1}#soliloquy-meta-edit-bulk .wp-editor-tools:after,#soliloquy-meta-edit .wp-editor-tools:after{clear:both;content:"";display:table}#soliloquy-meta-edit-bulk .wp-editor-container,#soliloquy-meta-edit .wp-editor-container{clear:both}#soliloquy-meta-edit-bulk .wp-editor-area,#soliloquy-meta-edit .wp-editor-area{font-family:Consolas, Monaco, monospace;font-size:13px;padding:10px;margin:1px 0 0;line-height:150%;border:0;outline:0;display:block;resize:vertical;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#soliloquy-meta-edit-bulk .rtl .wp-editor-area,#soliloquy-meta-edit .rtl .wp-editor-area{font-family:Tahoma,Monaco,monospace}#soliloquy-meta-edit-bulk .locale-he-il .wp-editor-area,#soliloquy-meta-edit .locale-he-il .wp-editor-area{font-family:Arial,Monaco,monospace}#soliloquy-meta-edit-bulk .wp-editor-container textarea.wp-editor-area,#soliloquy-meta-edit .wp-editor-container textarea.wp-editor-area{width:100%;margin:0;-webkit-box-shadow:none;box-shadow:none}#soliloquy-meta-edit-bulk .wp-editor-tabs,#soliloquy-meta-edit .wp-editor-tabs{float:right}#soliloquy-meta-edit-bulk .wp-switch-editor,#soliloquy-meta-edit .wp-switch-editor{float:left;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;top:1px;background:#ebebeb;color:#666;cursor:pointer;font-size:13px;line-height:19px;height:20px;margin:5px 0 0 5px;padding:3px 8px 4px;border:1px solid #e5e5e5}#soliloquy-meta-edit-bulk .wp-switch-editor:focus,#soliloquy-meta-edit .wp-switch-editor:focus{-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);outline:0;color:#23282d}#soliloquy-meta-edit-bulk .html-active .switch-html:focus,#soliloquy-meta-edit-bulk .tmce-active .switch-tmce:focus,#soliloquy-meta-edit-bulk .wp-switch-editor:active,#soliloquy-meta-edit .html-active .switch-html:focus,#soliloquy-meta-edit .tmce-active .switch-tmce:focus,#soliloquy-meta-edit .wp-switch-editor:active{-webkit-box-shadow:none;box-shadow:none}#soliloquy-meta-edit-bulk .wp-switch-editor:active,#soliloquy-meta-edit .wp-switch-editor:active{background-color:#f5f5f5;-webkit-box-shadow:none;box-shadow:none}#soliloquy-meta-edit-bulk .js .tmce-active .wp-editor-area,#soliloquy-meta-edit .js .tmce-active .wp-editor-area{color:#fff}#soliloquy-meta-edit-bulk .tmce-active .quicktags-toolbar,#soliloquy-meta-edit .tmce-active .quicktags-toolbar{display:none}#soliloquy-meta-edit-bulk .html-active .switch-html,#soliloquy-meta-edit-bulk .tmce-active .switch-tmce,#soliloquy-meta-edit .html-active .switch-html,#soliloquy-meta-edit .tmce-active .switch-tmce{background:#f5f5f5;color:#555;border-bottom-color:#f5f5f5}#soliloquy-meta-edit-bulk .wp-media-buttons,#soliloquy-meta-edit .wp-media-buttons{float:left}#soliloquy-meta-edit-bulk .wp-media-buttons .button,#soliloquy-meta-edit .wp-media-buttons .button{margin-right:5px;margin-bottom:4px;padding-left:7px;padding-right:7px}#soliloquy-meta-edit-bulk .wp-media-buttons .button:active,#soliloquy-meta-edit .wp-media-buttons .button:active{position:relative;top:1px;margin-top:-1px;margin-bottom:1px}#soliloquy-meta-edit-bulk .wp-media-buttons .insert-media,#soliloquy-meta-edit .wp-media-buttons .insert-media{padding-left:5px}#soliloquy-meta-edit-bulk .wp-media-buttons a,#soliloquy-meta-edit .wp-media-buttons a{text-decoration:none;color:#444;font-size:12px}#soliloquy-meta-edit-bulk .wp-media-buttons img,#soliloquy-meta-edit .wp-media-buttons img{padding:0 4px;vertical-align:middle}#soliloquy-meta-edit-bulk .wp-media-buttons span.wp-media-buttons-icon,#soliloquy-meta-edit .wp-media-buttons span.wp-media-buttons-icon{display:inline-block;width:18px;height:18px;vertical-align:text-top;margin:0 2px}#soliloquy-meta-edit-bulk .wp-media-buttons .add_media span.wp-media-buttons-icon,#soliloquy-meta-edit .wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}#soliloquy-meta-edit-bulk .wp-media-buttons .add_media span.wp-media-buttons-icon:before,#soliloquy-meta-edit .wp-media-buttons .add_media span.wp-media-buttons-icon:before{font:400 18px / 1 dashicons;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;content:""}#soliloquy-meta-edit-bulk .quicktags-toolbar,#soliloquy-meta-edit .quicktags-toolbar{padding:3px;border-bottom:1px solid #ddd;background:#f5f5f5;min-height:30px}#soliloquy-meta-edit-bulk .has-dfw .quicktags-toolbar,#soliloquy-meta-edit .has-dfw .quicktags-toolbar{padding-right:35px}#soliloquy-meta-edit-bulk .wp-core-ui .quicktags-toolbar input.button.button-small,#soliloquy-meta-edit .wp-core-ui .quicktags-toolbar input.button.button-small{margin:2px}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value=link],#soliloquy-meta-edit .quicktags-toolbar input[value=link]{text-decoration:underline}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value=del],#soliloquy-meta-edit .quicktags-toolbar input[value=del]{text-decoration:line-through}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value="i"],#soliloquy-meta-edit .quicktags-toolbar input[value="i"]{font-style:italic}#soliloquy-meta-edit-bulk .quicktags-toolbar input[value="b"],#soliloquy-meta-edit .quicktags-toolbar input[value="b"]{font-weight:700}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,#soliloquy-meta-edit-bulk .qt-dfw,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,#soliloquy-meta-edit .qt-dfw{position:absolute;top:0;right:0;margin:5px 5px 0 0}#soliloquy-meta-edit-bulk .qt-fullscreen,#soliloquy-meta-edit .qt-fullscreen{position:static;margin:2px}@media screen and (max-width: 782px){#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn button,#soliloquy-meta-edit-bulk .qt-dfw,#soliloquy-meta-edit .mce-toolbar .mce-btn button,#soliloquy-meta-edit .qt-dfw{padding:6px 7px}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn.mce-primary button,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn.mce-primary button{padding:6px 7px 5px}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn{margin:1px}#soliloquy-meta-edit-bulk .qt-dfw,#soliloquy-meta-edit .qt-dfw{width:36px;height:34px}#soliloquy-meta-edit-bulk .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw,#soliloquy-meta-edit .mce-toolbar .mce-btn-group .mce-btn.mce-wp-dfw{margin:4px 4px 0 0}#soliloquy-meta-edit-bulk .mce-toolbar .mce-colorbutton .mce-preview,#soliloquy-meta-edit .mce-toolbar .mce-colorbutton .mce-preview{left:8px;bottom:6px}#soliloquy-meta-edit-bulk .mce-window .mce-btn,#soliloquy-meta-edit .mce-window .mce-btn{padding:2px 0}#soliloquy-meta-edit-bulk .has-dfw .quicktags-toolbar,#soliloquy-meta-edit-bulk .has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first,#soliloquy-meta-edit .has-dfw .quicktags-toolbar,#soliloquy-meta-edit .has-dfw div.mce-toolbar-grp .mce-toolbar.mce-first{padding-right:40px}}@media screen and (min-width: 782px){#soliloquy-meta-edit-bulk .wp-core-ui .quicktags-toolbar input.button.button-small,#soliloquy-meta-edit .wp-core-ui .quicktags-toolbar input.button.button-small{font-size:12px;height:26px;line-height:24px}}#soliloquy-meta-edit-bulk #wp_editbtns,#soliloquy-meta-edit-bulk #wp_gallerybtns,#soliloquy-meta-edit #wp_editbtns,#soliloquy-meta-edit #wp_gallerybtns{padding:2px;position:absolute;display:none;z-index:100020}#soliloquy-meta-edit-bulk #wp_delgallery,#soliloquy-meta-edit-bulk #wp_delimgbtn,#soliloquy-meta-edit-bulk #wp_editgallery,#soliloquy-meta-edit-bulk #wp_editimgbtn,#soliloquy-meta-edit #wp_delgallery,#soliloquy-meta-edit #wp_delimgbtn,#soliloquy-meta-edit #wp_editgallery,#soliloquy-meta-edit #wp_editimgbtn{border-color:#999;background-color:#eee;margin:2px;padding:2px;border-width:1px;border-style:solid;-webkit-border-radius:3px;border-radius:3px}#soliloquy-meta-edit-bulk #wp_delgallery:hover,#soliloquy-meta-edit-bulk #wp_delimgbtn:hover,#soliloquy-meta-edit-bulk #wp_editgallery:hover,#soliloquy-meta-edit-bulk #wp_editimgbtn:hover,#soliloquy-meta-edit #wp_delgallery:hover,#soliloquy-meta-edit #wp_delimgbtn:hover,#soliloquy-meta-edit #wp_editgallery:hover,#soliloquy-meta-edit #wp_editimgbtn:hover{border-color:#555;background-color:#ccc}#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{display:none;background-color:#fff;box-shadow:0 3px 6px rgba(0,0,0,0.3);width:500px;overflow:hidden;margin-left:-250px;position:fixed;top:50%;left:50%;z-index:100105;-webkit-transition:height .2s, margin-top .2s;transition:height .2s, margin-top .2s;height:500px;margin-top:-250px}#soliloquy-meta-edit-bulk #wp-link-backdrop,#soliloquy-meta-edit #wp-link-backdrop{display:none;position:fixed;top:0;left:0;right:0;bottom:0;min-height:360px;background:#000;opacity:.7;filter:alpha(opacity=70);z-index:100100}#soliloquy-meta-edit-bulk #wp-link,#soliloquy-meta-edit #wp-link{position:relative;height:100%}#soliloquy-meta-edit-bulk #wp-link-wrap .wp-link-text-field,#soliloquy-meta-edit #wp-link-wrap .wp-link-text-field{display:none}#soliloquy-meta-edit-bulk #wp-link-wrap.has-text-field .wp-link-text-field,#soliloquy-meta-edit #wp-link-wrap.has-text-field .wp-link-text-field{display:block}#soliloquy-meta-edit-bulk #link-modal-title,#soliloquy-meta-edit #link-modal-title{background:#fcfcfc;border-bottom:1px solid #ddd;height:36px;font-size:18px;font-weight:600;line-height:36px;margin:0;padding:0 36px 0 16px}#soliloquy-meta-edit-bulk #wp-link-close,#soliloquy-meta-edit #wp-link-close{color:#666;padding:0;position:absolute;top:0;right:0;width:36px;height:36px;text-align:center;background:0 0;border:none;cursor:pointer}#soliloquy-meta-edit-bulk #wp-link-close:before,#soliloquy-meta-edit #wp-link-close:before{font:400 20px / 36px dashicons;vertical-align:top;speak:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:36px;height:36px;content:""}#soliloquy-meta-edit-bulk #wp-link-close:focus,#soliloquy-meta-edit-bulk #wp-link-close:hover,#soliloquy-meta-edit #wp-link-close:focus,#soliloquy-meta-edit #wp-link-close:hover{color:#00a0d2}#soliloquy-meta-edit-bulk #wp-link-close:focus,#soliloquy-meta-edit #wp-link-close:focus{outline:0;-webkit-box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8);box-shadow:0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,0.8)}#soliloquy-meta-edit-bulk #wp-link-wrap #link-selector,#soliloquy-meta-edit #wp-link-wrap #link-selector{-webkit-overflow-scrolling:touch;padding:0 16px;position:absolute;top:37px;left:0;right:0;bottom:44px}#soliloquy-meta-edit-bulk #wp-link ol,#soliloquy-meta-edit-bulk #wp-link ul,#soliloquy-meta-edit #wp-link ol,#soliloquy-meta-edit #wp-link ul{list-style:none;margin:0;padding:0}#soliloquy-meta-edit-bulk #wp-link input[type=text],#soliloquy-meta-edit #wp-link input[type=text]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#soliloquy-meta-edit-bulk #wp-link #link-options,#soliloquy-meta-edit #wp-link #link-options{padding:8px 0 12px}#soliloquy-meta-edit-bulk #wp-link p.howto,#soliloquy-meta-edit #wp-link p.howto{margin:3px 0}#soliloquy-meta-edit-bulk #wp-link p.howto a,#soliloquy-meta-edit #wp-link p.howto a{text-decoration:none;color:inherit}#soliloquy-meta-edit-bulk #wp-link label input[type=text],#soliloquy-meta-edit #wp-link label input[type=text]{margin-top:5px;width:70%}#soliloquy-meta-edit-bulk #wp-link #link-options label span,#soliloquy-meta-edit-bulk #wp-link #search-panel label span.search-label,#soliloquy-meta-edit #wp-link #link-options label span,#soliloquy-meta-edit #wp-link #search-panel label span.search-label{display:inline-block;width:80px;text-align:right;padding-right:5px;max-width:24%;vertical-align:middle;word-wrap:break-word}#soliloquy-meta-edit-bulk #wp-link .link-search-field,#soliloquy-meta-edit #wp-link .link-search-field{float:left;width:250px;max-width:70%}#soliloquy-meta-edit-bulk #wp-link .link-search-wrapper,#soliloquy-meta-edit #wp-link .link-search-wrapper{margin:5px 0 9px;display:block;overflow:hidden}#soliloquy-meta-edit-bulk #wp-link .link-search-wrapper span,#soliloquy-meta-edit #wp-link .link-search-wrapper span{float:left;margin-top:4px}#soliloquy-meta-edit-bulk #wp-link .link-search-wrapper .spinner,#soliloquy-meta-edit #wp-link .link-search-wrapper .spinner{margin-top:5px}#soliloquy-meta-edit-bulk #wp-link .link-target,#soliloquy-meta-edit #wp-link .link-target{padding:3px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#soliloquy-meta-edit-bulk #wp-link .link-target label,#soliloquy-meta-edit #wp-link .link-target label{max-width:70%}#soliloquy-meta-edit-bulk #wp-link .query-results,#soliloquy-meta-edit #wp-link .query-results{border:1px solid #dfdfdf;margin:0 0 12px;background:#fff;overflow:auto;position:absolute;left:16px;right:16px;bottom:0;top:166px}#soliloquy-meta-edit-bulk .has-text-field #wp-link .query-results,#soliloquy-meta-edit .has-text-field #wp-link .query-results{top:200px}#soliloquy-meta-edit-bulk #wp-link li,#soliloquy-meta-edit #wp-link li{clear:both;margin-bottom:0;border-bottom:1px solid #f1f1f1;color:#32373c;padding:4px 6px 4px 10px;cursor:pointer;position:relative}#soliloquy-meta-edit-bulk #wp-link .query-notice,#soliloquy-meta-edit-bulk #wp-link li.unselectable,#soliloquy-meta-edit #wp-link .query-notice,#soliloquy-meta-edit #wp-link li.unselectable{border-bottom:1px solid #dfdfdf}#soliloquy-meta-edit-bulk #wp-link .query-notice,#soliloquy-meta-edit #wp-link .query-notice{padding:0;background-color:#f7fcfe;color:#000}#soliloquy-meta-edit-bulk #wp-link .query-notice .query-notice-default,#soliloquy-meta-edit-bulk #wp-link .query-notice .query-notice-hint,#soliloquy-meta-edit #wp-link .query-notice .query-notice-default,#soliloquy-meta-edit #wp-link .query-notice .query-notice-hint{display:block;padding:6px;border-left:4px solid #00a0d2}#soliloquy-meta-edit-bulk #wp-link .unselectable.no-matches-found,#soliloquy-meta-edit #wp-link .unselectable.no-matches-found{padding:0;border-bottom:1px solid #dfdfdf;background-color:#fef7f1}#soliloquy-meta-edit-bulk #wp-link .no-matches-found .item-title,#soliloquy-meta-edit #wp-link .no-matches-found .item-title{display:block;padding:6px;border-left:4px solid #d54e21}#soliloquy-meta-edit-bulk #wp-link .query-results em,#soliloquy-meta-edit #wp-link .query-results em{font-style:normal}#soliloquy-meta-edit-bulk #wp-link li:hover,#soliloquy-meta-edit #wp-link li:hover{background:#eaf2fa;color:#151515}#soliloquy-meta-edit-bulk #wp-link li.unselectable:hover,#soliloquy-meta-edit #wp-link li.unselectable:hover{background:#fff;cursor:auto;color:#32373c}#soliloquy-meta-edit-bulk #wp-link li.selected,#soliloquy-meta-edit #wp-link li.selected{background:#ddd;color:#32373c}#soliloquy-meta-edit-bulk #wp-link li.selected .item-title,#soliloquy-meta-edit #wp-link li.selected .item-title{font-weight:700}#soliloquy-meta-edit-bulk #wp-link li:last-child,#soliloquy-meta-edit #wp-link li:last-child{border:none}#soliloquy-meta-edit-bulk #wp-link .item-title,#soliloquy-meta-edit #wp-link .item-title{display:inline-block;width:80%;width:-webkit-calc(100% - 68px);width:calc(100% - 68px);word-wrap:break-word}#soliloquy-meta-edit-bulk #wp-link .item-info,#soliloquy-meta-edit #wp-link .item-info{text-transform:uppercase;color:#666;font-size:11px;position:absolute;right:5px;top:5px}#soliloquy-meta-edit-bulk #wp-link .river-waiting,#soliloquy-meta-edit #wp-link .river-waiting{display:none;padding:10px 0}#soliloquy-meta-edit-bulk #wp-link .submitbox,#soliloquy-meta-edit #wp-link .submitbox{padding:8px 16px;background:#fcfcfc;border-top:1px solid #ddd;position:absolute;bottom:0;left:0;right:0}#soliloquy-meta-edit-bulk #wp-link-cancel,#soliloquy-meta-edit #wp-link-cancel{line-height:25px;float:left}#soliloquy-meta-edit-bulk #wp-link-update,#soliloquy-meta-edit #wp-link-update{line-height:23px;float:right}#soliloquy-meta-edit-bulk #wp-link-submit,#soliloquy-meta-edit #wp-link-submit{float:right}@media screen and (max-width: 782px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{margin-top:-140px}#soliloquy-meta-edit-bulk #wp-link-wrap .query-results,#soliloquy-meta-edit #wp-link-wrap .query-results{top:195px}#soliloquy-meta-edit-bulk #wp-link-wrap.has-text-field .query-results,#soliloquy-meta-edit #wp-link-wrap.has-text-field .query-results{top:235px}#soliloquy-meta-edit-bulk #link-selector,#soliloquy-meta-edit #link-selector{padding:0 16px 60px}#soliloquy-meta-edit-bulk #wp-link-wrap #link-selector,#soliloquy-meta-edit #wp-link-wrap #link-selector{bottom:52px}#soliloquy-meta-edit-bulk #wp-link-cancel,#soliloquy-meta-edit #wp-link-cancel{line-height:32px}#soliloquy-meta-edit-bulk #wp-link .link-target,#soliloquy-meta-edit #wp-link .link-target{padding-top:10px}#soliloquy-meta-edit-bulk #wp-link .submitbox .button,#soliloquy-meta-edit #wp-link .submitbox .button{margin-bottom:0}}@media screen and (max-width: 520px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{width:auto;margin-left:0;left:10px;right:10px;max-width:500px}}@media screen and (max-height: 520px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{-webkit-transition:none;transition:none;height:auto;margin-top:0;top:10px;bottom:10px}#soliloquy-meta-edit-bulk #link-selector,#soliloquy-meta-edit #link-selector{overflow:auto}#soliloquy-meta-edit-bulk #search-panel .query-results,#soliloquy-meta-edit #search-panel .query-results{position:static}}@media screen and (max-height: 290px){#soliloquy-meta-edit-bulk #wp-link-wrap,#soliloquy-meta-edit #wp-link-wrap{height:auto;margin-top:0;top:10px;bottom:10px}#soliloquy-meta-edit-bulk #link-selector,#soliloquy-meta-edit #link-selector{overflow:auto;height:-webkit-calc(100% - 92px);height:calc(100% - 92px);padding-bottom:2px}#soliloquy-meta-edit-bulk #search-panel .query-results,#soliloquy-meta-edit #search-panel .query-results{position:static}}#soliloquy-meta-edit-bulk div.wp-link-preview,#soliloquy-meta-edit div.wp-link-preview{float:left;margin:5px;max-width:694px;overflow:hidden;text-overflow:ellipsis}#soliloquy-meta-edit-bulk div.wp-link-preview a,#soliloquy-meta-edit div.wp-link-preview a{color:#0073aa;text-decoration:underline;-webkit-transition-property:border, background, color;transition-property:border, background, color;-webkit-transition-duration:.05s;transition-duration:.05s;-webkit-transition-timing-function:ease-in-out;transition-timing-function:ease-in-out;cursor:pointer}#soliloquy-meta-edit-bulk div.wp-link-input,#soliloquy-meta-edit div.wp-link-input{float:left;margin:2px;max-width:694px}#soliloquy-meta-edit-bulk div.wp-link-input input,#soliloquy-meta-edit div.wp-link-input input{width:300px;padding:3px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}#soliloquy-meta-edit-bulk .mce-toolbar div.wp-link-input ~ .mce-btn,#soliloquy-meta-edit-bulk .mce-toolbar div.wp-link-preview ~ .mce-btn,#soliloquy-meta-edit .mce-toolbar div.wp-link-input ~ .mce-btn,#soliloquy-meta-edit .mce-toolbar div.wp-link-preview ~ .mce-btn{margin:2px 1px}#soliloquy-meta-edit-bulk .mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child,#soliloquy-meta-edit .mce-inline-toolbar-grp .mce-btn-group .mce-btn:last-child{margin-right:2px}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete{z-index:100110;max-height:200px;overflow-y:auto;padding:0;margin:0;list-style:none;position:absolute;border:1px solid #5b9dd9;-webkit-box-shadow:0 1px 2px rgba(30,140,190,0.8);box-shadow:0 1px 2px rgba(30,140,190,0.8);background-color:#fff}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete li,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete li{margin-bottom:0;padding:4px 10px;clear:both;white-space:normal;text-align:left}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete li .wp-editor-float-right,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete li .wp-editor-float-right{float:right}#soliloquy-meta-edit-bulk .ui-autocomplete.wplink-autocomplete li.ui-state-focus,#soliloquy-meta-edit .ui-autocomplete.wplink-autocomplete li.ui-state-focus{background-color:#ddd;cursor:pointer}@media screen and (max-width: 782px){#soliloquy-meta-edit-bulk div.wp-link-input,#soliloquy-meta-edit-bulk div.wp-link-preview,#soliloquy-meta-edit div.wp-link-input,#soliloquy-meta-edit div.wp-link-preview{max-width:70%;max-width:-webkit-calc(100% - 86px);max-width:calc(100% - 86px)}#soliloquy-meta-edit-bulk div.wp-link-preview,#soliloquy-meta-edit div.wp-link-preview{margin:8px 0 8px 5px}#soliloquy-meta-edit-bulk div.wp-link-input,#soliloquy-meta-edit div.wp-link-input{width:300px}#soliloquy-meta-edit-bulk div.wp-link-input input,#soliloquy-meta-edit div.wp-link-input input{width:100%;font-size:16px;padding:5px}}#soliloquy-meta-edit-bulk .mce-fullscreen,#soliloquy-meta-edit .mce-fullscreen{z-index:100010}#soliloquy-meta-edit-bulk .rtl .quicktags-toolbar input,#soliloquy-meta-edit-bulk .rtl .wp-switch-editor,#soliloquy-meta-edit .rtl .quicktags-toolbar input,#soliloquy-meta-edit .rtl .wp-switch-editor{font-family:Tahoma,sans-serif}#soliloquy-meta-edit-bulk .mce-rtl .mce-flow-layout .mce-flow-layout-item>div,#soliloquy-meta-edit .mce-rtl .mce-flow-layout .mce-flow-layout-item>div{direction:rtl}#soliloquy-meta-edit-bulk .mce-rtl .mce-listbox i.mce-caret,#soliloquy-meta-edit .mce-rtl .mce-listbox i.mce-caret{left:6px}#soliloquy-meta-edit-bulk html:lang(he-il) .rtl .quicktags-toolbar input,#soliloquy-meta-edit-bulk html:lang(he-il) .rtl .wp-switch-editor,#soliloquy-meta-edit html:lang(he-il) .rtl .quicktags-toolbar input,#soliloquy-meta-edit html:lang(he-il) .rtl .wp-switch-editor{font-family:Arial,sans-serif}@media print, (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi){#soliloquy-meta-edit-bulk .wp-media-buttons .add_media span.wp-media-buttons-icon,#soliloquy-meta-edit .wp-media-buttons .add_media span.wp-media-buttons-icon{background:0 0}}.soliloquy-tab{display:none}.soliloquy-tab-active{display:block}.post-type-soliloquy #wp-link-wrap{z-index:180105 !important}.post-type-soliloquy #wp-link-backdrop{z-index:160105 !important}.post-type-soliloquy #wpbody-content h1{margin:0;padding-left:20px;line-height:45px;font-size:20px;font-weight:400;background-color:#fff;height:45px;margin-left:-20px;margin-right:-20px;margin-bottom:20px}.post-type-soliloquy #wpbody-content h1 .page-title-action{margin-left:4px;padding:4px 8px;position:relative;top:-3px;text-decoration:none;border:none;color:#ff3700;border-radius:0;background:none;text-shadow:none;font-weight:600;font-size:13px}.post-type-soliloquy #wpbody-content h1 .page-title-action:hover{background:none;color:#999}.post-type-soliloquy #wpbody-content h1 .page-title-action:before{display:inline-block;font-family:'soliloquy';content:'\0050';margin-top:-3px;margin-right:8px;vertical-align:middle}.post-type-soliloquy .wrap{margin-top:0px !important}.soliloquy-spinner{float:none;display:inline-block;margin-top:0}#soliloquy-uploader{margin-top:20px;box-sizing:border-box}#soliloquy-uploader #soliloquy-slider-type-tabs{margin-bottom:-1px;box-sizing:border-box}#soliloquy-uploader #soliloquy-slider-type-tabs:after{content:"";display:table;clear:both}#soliloquy-uploader #soliloquy-external{text-align:center}#soliloquy-uploader #soliloquy-external ul li a{color:#000}#soliloquy-uploader #soliloquy-external ul li a:hover{color:#000}#soliloquy-uploader #soliloquy-external a.button{padding:0 32px 1px;line-height:48px;height:50px;font-size:18px;text-transform:uppercase;margin:15px 0}#soliloquy-uploader .soliloquy-type-tab{position:relative;z-index:2;width:49.8%;display:block;text-align:center;text-decoration:none;font-size:16px;font-weight:600;line-height:55px;margin:0;height:55px;color:#999;background-color:#f7f7f7;border:1px solid #e5e5e5;box-sizing:border-box;border-top-left-radius:3px;border-top-right-radius:3px}#soliloquy-uploader .soliloquy-type-tab input{display:none}#soliloquy-uploader .soliloquy-type-tab:first-child{float:left;border-left:1px solid #e5e5e5}#soliloquy-uploader .soliloquy-type-tab:last-child{border-right:1px solid #e5e5e5;float:right}#soliloquy-uploader .soliloquy-type-tab.soliloquy-tab-nav-active{background-color:white;color:#23282d;border-bottom:none}#soliloquy-uploader .soliloquy-type-tab.soliloquy-tab-nav-active:before{color:#ff3700}#soliloquy-uploader .soliloquy-tab-container{padding:20px;position:relative;min-width:255px;min-height:245px;border:1px solid #e5e5e5;background:#fff}#soliloquy-uploader h2.soliloquy-type-label{text-align:center;padding:0;margin:20px 0}#soliloquy-uploader h2.soliloquy-type-label span{font-size:24px}#soliloquy-uploader ul#soliloquy-types-nav{text-align:center}#soliloquy-uploader ul#soliloquy-types-nav li{display:inline-block;margin:0 20px 0 0;vertical-align:top}#soliloquy-uploader ul#soliloquy-types-nav li:last-child{margin:0}#soliloquy-uploader ul#soliloquy-types-nav li label{float:left;width:110px}#soliloquy-uploader ul#soliloquy-types-nav li label input{display:none}#soliloquy-uploader ul#soliloquy-types-nav li label div.icon{width:110px;height:110px;margin:0 0 10px 0;border:1px solid #ddd;background-size:64px 64px;background-position:center;background-repeat:no-repeat}#soliloquy-uploader ul#soliloquy-types-nav li label div.title{font-weight:700}#soliloquy-uploader ul#soliloquy-types-nav li:hover label div.icon,#soliloquy-uploader ul#soliloquy-types-nav li.soliloquy-active label div.icon{background-color:#f7fcf3;border-color:#7cc048}#soliloquy-uploader ul#soliloquy-types-nav li#soliloquy-type-fc label div.icon{background-image:url(../images/fc.png)}#soliloquy-uploader ul#soliloquy-types-nav li#soliloquy-type-instagram label div.icon{background-image:url(../images/instagram.png)}#soliloquy-uploader ul#soliloquy-types-nav li#soliloquy-type-wc label div.icon{background-image:url(../images/woo.png)}#soliloquy-uploader #plupload-upload-ui{display:none}#soliloquy-uploader #plupload-upload-ui.drag-drop{display:block}#soliloquy-uploader #plupload-upload-ui.drag-drop #drag-drop-area{border:3px dashed #d7d7d7;border-radius:6px}#soliloquy-uploader #plupload-upload-ui.drag-drop .drag-drop-info{font-size:24px;color:#23282d}#soliloquy-uploader #plupload-upload-ui.drag-drop .drag-drop-inside{width:520px;margin-top:40px}#soliloquy-uploader #plupload-upload-ui.drag-drop .drag-drop-inside p.drag-drop-buttons{text-align:left}#soliloquy-uploader #plupload-upload-ui.drag-drop .drag-drop-inside .soliloquy-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#soliloquy-uploader #plupload-upload-ui.drag-drop .drag-drop-inside .soliloquy-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#soliloquy-uploader #plupload-upload-ui .button{background:#f7f7f7;border:1px solid;border-color:#ddd;-webkit-box-shadow:none;box-shadow:none;color:#7f7f7f;text-decoration:none;text-shadow:none;font-weight:bold;height:35px;font-size:13px;padding:0 20px 1px}#soliloquy-uploader #plupload-upload-ui .button:hover{background:#f7f7f7;border-color:#999;color:#23282d}#soliloquy-uploader #plupload-upload-ui a.soliloquy-media-library.button{display:block;position:absolute;margin:0 auto;left:250px;right:0;line-height:32px;width:240px;top:110px;text-align:center}#soliloquy-uploader #plupload-upload-ui p.upload-flash-bypass{display:none}#soliloquy-uploader p.max-upload-size{margin-bottom:0}#soliloquy-codepanel .soliloquy-clipboard{text-align:right}#soliloquy-slider-settings{margin-top:20px;position:relative;min-width:255px;border:1px solid #e5e5e5;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.04);box-shadow:0 1px 1px rgba(0,0,0,0.04);background:#f7f7f7;width:100%}#soliloquy-slider-settings a{text-decoration:none}#soliloquy-slider-settings:after{content:"";display:table;clear:both}#soliloquy-slider-settings #soliloquy-settings-tabs{width:150px;margin:0;padding:0;border-right:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab{float:left;width:100%;margin:0;padding:0}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a{float:left;width:110px;margin:0 20px;padding:20px 0;text-decoration:none;color:#999;border-bottom:1px solid #ddd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;transition:none;-webkit-transition:none}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a:focus{outline-style:none;box-shadow:none;border-color:transparent}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a:before{display:inline-block;font-family:'soliloquy';font-style:normal;font-weight:normal;font-size:15px;line-height:1.5;vertical-align:middle;margin-right:8px;padding-left:4px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab:hover,#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab.soliloquy-tab-nav-active{background-color:#fff;margin-right:-1px;margin-top:-1px;border-top:1px solid #ddd;border-bottom:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab:hover a,#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab.soliloquy-tab-nav-active a{border-bottom:none}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab:hover a:before,#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab.soliloquy-tab-nav-active a:before{color:#ff3700}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-slider a:before{content:'\0042'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-config a:before{content:'\0041'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-mobile_lite a:before{content:'\0046'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-pinterest_lite a:before{content:'\0043'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-thumbnails_lite a:before{content:'\004b'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-schedule_lite a:before{content:'\0058'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-misc a:before{content:'\0045'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-lightbox_lite a:before{content:'\0044'}#soliloquy-slider-settings #soliloquy-settings-tabs #soliloquy-tab-nav-carousel_lite a:before{content:'\0059'}#soliloquy-slider-settings #soliloquy-settings-content{margin:0 0 0 150px;padding:20px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#fff}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-empty-slider{position:relative;background-color:#f7f7f7;min-height:350px;width:100%;text-align:center;border-radius:3px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-empty-slider div{max-width:450px;max-height:150px;margin:auto;position:absolute;top:0;left:0;bottom:0;right:0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-empty-slider img{max-width:336px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-external-req{border:1px solid #ff3700;border-radius:3px;padding:30px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-external-req h2{font-size:20px;margin:0;padding:0}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-slide-header label{font-weight:600}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-slide-header .soliloquy-clear-selected{display:none;margin-left:15px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-help{font-size:14px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-help a{margin-left:5px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-bulk-actions{display:none;margin-bottom:20px}#soliloquy-slider-settings #soliloquy-settings-content table.form-table{clear:none}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-config-header{border-bottom:1px solid #ddd;padding-bottom:30px;margin-bottom:30px}#soliloquy-slider-settings #soliloquy-settings-content h2.soliloquy-intro{margin:0 !important;padding:0;border-bottom:none}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-intro{font-size:16px !important;font-weight:bold;margin:0}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle{position:absolute;right:20px;top:20px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li a{color:#ddd}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li a i:before{font-size:16px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-display-toggle li a.active-display{color:#23282d}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-select-all{margin:20px 8px 20px 0px}#soliloquy-slider-settings #soliloquy-settings-content .soliloquy-slides-delete{margin-right:10px}#soliloquy-slider-settings #soliloquy-settings-content input[type=checkbox]{background-color:#fff;border:1px solid #ddd;box-shadow:none;margin-right:10px}#soliloquy-slider-settings #soliloquy-settings-content input[type=checkbox]:checked{background-color:#72b63d;border-color:#72b63d}#soliloquy-slider-settings #soliloquy-settings-content input[type=checkbox]:checked:before{color:#fff !important}#soliloquy-slider-settings #soliloquy-settings-content input[type="text"],#soliloquy-slider-settings #soliloquy-settings-content input[type="number"],#soliloquy-slider-settings #soliloquy-settings-content input[type="password"]{background-color:#fff;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none;color:#32373c;height:35px;outline:none;-webkit-transition:0.05s border-color ease-in-out;transition:0.05s border-color ease-in-out;min-width:210px;max-width:350px;width:92%;border-radius:3px;padding-right:0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-mobile-width,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-mobile-height,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-slider-height,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-config-slider-width{max-width:166px;min-width:75px}#soliloquy-slider-settings #soliloquy-settings-content th{min-width:210px;max-width:100%;padding-right:0}#soliloquy-slider-settings #soliloquy-settings-content .description{font-size:13px;line-height:1.5}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output{margin:0 0 10px;padding:0;list-style:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li{background-color:#fff;margin:0;list-style:none;border:1px solid #cecece;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.06);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.06);box-shadow:0 1px 2px rgba(0,0,0,0.06);cursor:move;position:relative}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li h3{display:block;margin:0;padding:0;text-overflow:ellipsis}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li.ui-sortable-helper{border:2px solid #1e8cbe}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-remove-slide,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-modify-slide{display:block;height:25px;outline:none;position:absolute;width:25px;z-index:20;color:#fff;text-align:center;line-height:25px;vertical-align:middle;border-radius:3px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status i:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status i:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-remove-slide i:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-modify-slide i:before{margin:0;font-size:10px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status span:before,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status span:before{font-size:16px;vertical-align:middle}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-active-slide.grid-status{background-color:#74b445}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-draft-slide.grid-status{background-color:#ffa93b}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-remove-slide{background-color:#e3231b}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li .soliloquy-modify-slide{background-color:#0072ac}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output li.dropzone{background:transparent;border:2px dashed #ddd;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li{display:inline-block;width:150px;margin:0 30px 30px 0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-item-img{display:block;margin:0 auto auto auto;top:0;left:0;right:0;bottom:0;max-width:150px;max-height:150px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-video-wrap,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-html-wrap{position:relative;width:150px;height:150px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-video-inside,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-html-inside{width:150px;height:150px;display:table;position:absolute;max-width:100%;max-height:100%;cursor:move}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-video-table,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-html-table{display:table-cell;vertical-align:middle;text-align:center;cursor:move}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li span.overlay{max-height:15px;max-width:40px;display:block;position:absolute;top:0;left:0;right:0;bottom:10px;margin:auto;padding:4px 8px;background:rgba(255,255,255,0.8);z-index:2;text-align:center;border-radius:3px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-item-info h3{display:block;border-top:1px solid #ddd;background-color:#f7f7f7;margin:0;padding:8px 4px;text-align:center;font-size:13px;max-width:150px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-item-info img{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li a.check{display:none;position:absolute;margin:auto;top:0;left:0;bottom:0;right:0;width:24px;height:24px;background-color:#72b63d;-webkit-box-shadow:0 0 0 1px #fff,0 0 0 2px #72b63d;box-shadow:0 0 0 1px #fff,0 0 0 2px #72b63d;z-index:10}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li a.check div.media-modal-icon{width:15px;height:15px;margin:5px 0 0 5px;background-position:-21px 0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li.selected{border:1px solid #72b63d}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li.selected a.check{display:block}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-active-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-draft-slide.grid-status{display:block;bottom:40px;left:5px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-active-slide.list-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-draft-slide.list-status{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-remove-slide{left:5px;top:5px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-grid li .soliloquy-modify-slide{right:5px;top:5px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li{display:inline-block;min-height:100px;padding:20px;margin-bottom:10px;width:100%;box-sizing:border-box}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li span.overlay{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-video-wrap{float:left;height:75px;width:75px;margin-left:20px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-video-wrap .soliloquy-item-img{float:none;margin-left:0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-item-img{margin-left:20px;position:relative;float:left;max-width:75px;max-height:75px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-item-info{position:absolute;margin:auto 0;top:0;bottom:0;left:160px;height:30px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-item-info img{margin-top:-20px;max-width:100px;margin-bottom:10px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li a.check{display:block;position:relative;float:left;margin:auto 0;width:25px;height:25px;margin-top:25px;background-color:#fff;border:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li a.check div.media-modal-icon{width:15px;display:none;height:15px;margin:5px 0 0 5px;background-position:-21px 0}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li.selected{border:1px solid #72b63d}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li.selected a.check{background-color:#72b63d;display:block}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li.selected a.check div.media-modal-icon{display:block}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.grid-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.grid-status{display:none}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.list-status,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.list-status{display:block;margin-top:10px;font-weight:600;color:black}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.list-status:hover,#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.list-status:hover{text-decoration:none;color:black}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-active-slide.list-status span{margin-left:5px;border-radius:3px;padding:3px 5px;background-color:#74b445;color:white}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-draft-slide.list-status span{margin-left:5px;border-radius:3px;padding:3px 5px;background-color:#ffa93b;color:white}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-remove-slide{right:8px;top:8px}#soliloquy-slider-settings #soliloquy-settings-content #soliloquy-output.soliloquy-list li .soliloquy-modify-slide{right:40px;top:8px}#soliloquy-slider-settings #soliloquy-settings-content:after{content:"";display:table;clear:both}#soliloquy-plupload-upload-ui{position:relative}#soliloquy-drag-drop-area{border:4px dashed #bbb;height:200px}#soliloquy-plupload-upload-ui.drag-over #soliloquy-drag-drop-area{border-color:#83b4d8}#soliloquy-slider-settings .soliloquy-progress-bar{display:none;width:100%;position:relative;height:10px;width:100%;margin:10px auto;border-radius:10px;background:#dfdfdf;background:rgba(0,0,0,0.1)}#soliloquy-slider-settings .soliloquy-progress-bar div{height:10px;min-width:20px;width:0;background:#aaa;background:rgba(0,0,0,0.2);border-radius:10px;-webkit-transition:width 300ms;-moz-transition:width 300ms;-ms-transition:width 300ms;-o-transition:width 300ms;transition:width 300ms}#soliloquy .upload-flash-bypass{display:none}#soliloquy .max-upload-size{display:block;margin:10px 0}.soliloquy-media-frame .soliloquy-accepted-urls{clear:both;overflow:hidden}.soliloquy-media-frame .soliloquy-accepted-urls span{display:block}.soliloquy-media-frame .soliloquy-column{float:left;width:32%;margin-right:2%}.soliloquy-media-frame .soliloquy-column.soliloquy-last{margin-right:0}.soliloquy-media-frame .soliloquy-video-info{background-color:#ffffe0;border:1px solid #e6db55;padding:15px;margin-bottom:16px}.soliloquy-media-frame .soliloquy-video-info p{margin-top:0}#soliloquy-html-slides .soliloquy-delete-html-slide,#soliloquy-video-slides .soliloquy-delete-video-slide{float:right}.attachments-browser.soliloquy-videos a.soliloquy-item-collapse,.attachments-browser.soliloquy-html a.soliloquy-item-collapse{position:absolute;top:10px;right:20px;font-size:13px;color:black;font-weight:600;text-decoration:none}.attachments-browser.soliloquy-videos .button-soliloquy-delete,.attachments-browser.soliloquy-html .button-soliloquy-delete{color:#fff}.attachments-browser.soliloquy-videos .soliloquy-item-setting,.attachments-browser.soliloquy-html .soliloquy-item-setting{clear:both;text-align:left !important;margin-bottom:15px}.attachments-browser.soliloquy-videos .soliloquy-item-setting .code-title,.attachments-browser.soliloquy-html .soliloquy-item-setting .code-title{text-align:left !important}.attachments-browser.soliloquy-videos .soliloquy-item-setting label,.attachments-browser.soliloquy-html .soliloquy-item-setting label{clear:both;width:100%;text-align:left}.attachments-browser.soliloquy-videos .soliloquy-item-setting label strong,.attachments-browser.soliloquy-html .soliloquy-item-setting label strong{text-align:left}.attachments-browser.soliloquy-videos .soliloquy-item-setting .soliloquy-media-button a,.attachments-browser.soliloquy-html .soliloquy-item-setting .soliloquy-media-button a{float:right;clear:both}.attachments-browser.soliloquy-videos .soliloquy-item-setting input[type=text],.attachments-browser.soliloquy-videos .soliloquy-item-setting textarea,.attachments-browser.soliloquy-html .soliloquy-item-setting input[type=text],.attachments-browser.soliloquy-html .soliloquy-item-setting textarea{width:100%;clear:both}.attachments-browser.soliloquy-videos .soliloquy-item-setting .soliloquy-input-group input[type=text],.attachments-browser.soliloquy-videos .soliloquy-item-setting .soliloquy-input-group textarea,.attachments-browser.soliloquy-html .soliloquy-item-setting .soliloquy-input-group input[type=text],.attachments-browser.soliloquy-html .soliloquy-item-setting .soliloquy-input-group textarea{width:87%;clear:both}.attachments-browser.soliloquy-videos .soliloquy-item-footer,.attachments-browser.soliloquy-html .soliloquy-item-footer{display:block;margin-top:20px}.attachments-browser.soliloquy-videos .soliloquy-item-footer a,.attachments-browser.soliloquy-html .soliloquy-item-footer a{float:right}.attachments-browser.soliloquy-videos div.media-toolbar{border-bottom:1px solid #ddd}.attachments-browser.soliloquy-videos div.media-toolbar div.media-toolbar-primary button.soliloquy-videos-add{float:right;margin-top:10px}.attachments-browser.soliloquy-videos .soliloquy-video-items{position:relative;margin-right:300px;width:100%;height:100%}.attachments-browser.soliloquy-videos ul.soliloquy-videos-attachments{top:70px;padding:2px 20px 20px}.attachments-browser.soliloquy-videos ul.soliloquy-videos-attachments li.soliloquy-videos-attachment{width:100%;background-color:#f1f1f1;border:1px solid #ddd;padding:20px;margin-bottom:2em;padding-top:2em}.attachments-browser.soliloquy-videos .soliloquy-gallery-accepted-urls{clear:both;overflow:hidden}.attachments-browser.soliloquy-videos .soliloquy-gallery-accepted-urls span{display:block}.attachments-browser.soliloquy-html div.media-toolbar{border-bottom:1px solid #ddd}.attachments-browser.soliloquy-html div.media-toolbar div.media-toolbar-primary button.soliloquy-html-add{float:right;margin-top:10px}.attachments-browser.soliloquy-html .soliloquy-html-items{position:relative;margin-right:300px;width:100%;height:100%}.attachments-browser.soliloquy-html ul.soliloquy-html-attachments{top:70px;padding:2px 20px 20px}.attachments-browser.soliloquy-html ul.soliloquy-html-attachments li.soliloquy-html-attachment{width:100%;background-color:#f1f1f1;border:1px solid #ddd;padding:20px;margin-bottom:2em;padding-top:2em}.attachments-browser.soliloquy-html ul.soliloquy-html-attachments li.soliloquy-html-attachment .CodeMirror{border:1px solid #ddd;text-align:left !important}.attachments-browser .soliloquy-accepted-urls{clear:both;overflow:hidden}.attachments-browser .soliloquy-accepted-urls .title{margin-bottom:-15px}.attachments-browser .soliloquy-accepted-urls span{display:block}#soliloquy-meta-edit .right{border-right:1px solid #ccc !important}.soliloquy-meta-container .media-modal-backdrop{z-index:15999}.soliloquy-meta-container .media-modal{z-index:16000}.soliloquy-meta-container .media-modal button.right{border-right:1px solid #ddd !important}.soliloquy-meta-container .media-modal .attachment-media-view div.thumbnail-image img.details-image{max-width:50%;max-height:70%}.soliloquy-meta-container .media-modal .setting{margin:0 0 20px 0;padding:0 0 20px 0;border-bottom:1px solid #ddd}.soliloquy-meta-container .media-modal .setting span.name{font-size:14px;font-weight:600;min-width:20%;text-align:left}.soliloquy-meta-container .media-modal .setting input[type=text]{width:75%}.soliloquy-meta-container .media-modal .setting textarea{height:150px}.soliloquy-meta-container .media-modal .setting .wp-editor-wrap{float:right;width:75%}.soliloquy-meta-container .media-modal .code{margin-bottom:20px}.soliloquy-meta-container .media-modal div.actions a.button{display:inline-block}@media only screen and (max-width: 959px){.soliloquy-meta-container .setting span.name{width:100%;max-width:100%;min-width:100%}.soliloquy-meta-container .setting input[type=text]{width:100%}.soliloquy-meta-container .setting input[type=checkbox]{clear:both}.soliloquy-meta-container .setting .wp-editor-wrap{float:left;width:100%}}body.rtl #soliloquy .soliloquy-meta-icon{right:auto;left:0}body.rtl #soliloquy #soliloquy-tabs-nav li{float:right;margin:0 0 -1px 10px}body.rtl #soliloquy #soliloquy-output li{float:right;margin:0 0 10px 10px}@media screen and (max-width: 1100px){#soliloquy-uploader #plupload-upload-ui.drag-drop .drag-drop-inside{width:100%;margin-top:20px}#soliloquy-uploader #plupload-upload-ui.drag-drop .drag-drop-inside p.drag-drop-buttons{text-align:center}#soliloquy-uploader #plupload-upload-ui a.soliloquy-media-library.button{left:0;right:0;width:235px;top:145px}}@media screen and (max-width: 768px){#soliloquy-slider-settings #soliloquy-settings-content{margin:0 0 0 50px;padding:20px}#soliloquy-slider-settings #soliloquy-settings-tabs{width:50px;margin:0;padding:0;border-right:1px solid #ddd}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a{width:30px;margin:0 10px;padding:10px 0}#soliloquy-slider-settings #soliloquy-settings-tabs .soliloquy-setting-tab a span{display:none}}@media (-webkit-min-device-pixel-ratio: 1.25), (min-resolution: 120dpi){a.check .media-modal-icon{background-image:url("../../../../../wp-includes/images/uploader-icons-2x.png") !important;-webkit-background-size:134px 15px;background-size:134px 15px}}
assets/css/modal.css ADDED
@@ -0,0 +1 @@
 
1
+ body.branch-4-3 div.media-modal a.media-modal-close,body.branch-4-4 div.media-modal a.media-modal-close{text-align:center;text-decoration:none;display:inline-block}body.branch-4-3 div.media-modal a.media-modal-close span,body.branch-4-4 div.media-modal a.media-modal-close span{display:inline-block;margin-top:17px}.soliloquy-meta.attachments .attachment{width:200px;height:200px;border:none !important}.soliloquy-meta.attachments .attachment.selected{width:200px;height:200px}.soliloquy-meta.attachments .attachment .attachment-preview{width:100%;height:100%;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview:before{padding-top:0;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail{display:table;position:relative;top:auto;right:auto;bottom:auto;left:auto;border:none !important}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail:after{box-shadow:none;-webkit-box-shadow:none;-moz-box-shadow:none}.soliloquy-meta.attachments .attachment .attachment-preview .thumbnail .inside{display:table-cell;width:200px;height:200px;text-align:center;vertical-align:middle;border:none !important}
assets/css/overview.css ADDED
@@ -0,0 +1,850 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ @font-face {
2
+ font-family: 'soliloquy';
3
+ src: url("../fonts/soliloquy.eot");
4
+ src: url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"), url("../fonts/soliloquy.woff") format("woff"), url("../fonts/soliloquy.ttf") format("truetype"), url("../fonts/soliloquy.svg#soliloquy") format("svg");
5
+ font-weight: normal;
6
+ font-style: normal; }
7
+ [class*='soliloquy-icon-']:before {
8
+ display: inline-block;
9
+ font-family: 'soliloquy';
10
+ font-style: normal;
11
+ font-weight: normal;
12
+ font-size: 13px;
13
+ line-height: 1.5;
14
+ margin-right: 8px;
15
+ -webkit-font-smoothing: antialiased;
16
+ -moz-osx-font-smoothing: grayscale; }
17
+
18
+ .soliloquy-icon-configuration:before {
19
+ content: '\0041'; }
20
+
21
+ .soliloquy-icon-soliloquy:before {
22
+ content: '\0042'; }
23
+
24
+ .soliloquy-icon-pinterest:before {
25
+ content: '\0043'; }
26
+
27
+ .soliloquy-icon-lightbox:before {
28
+ content: '\0044'; }
29
+
30
+ .soliloquy-icon-misc:before {
31
+ content: '\0045'; }
32
+
33
+ .soliloquy-icon-mobile:before {
34
+ content: '\0046'; }
35
+
36
+ .soliloquy-icon-pagination:before {
37
+ content: '\0047'; }
38
+
39
+ .soliloquy-icon-proofing:before {
40
+ content: '\0048'; }
41
+
42
+ .soliloquy-icon-slideshow:before {
43
+ content: '\0049'; }
44
+
45
+ .soliloquy-icon-tags:before {
46
+ content: '\004a'; }
47
+
48
+ .soliloquy-icon-thumbnails:before {
49
+ content: '\004b'; }
50
+
51
+ .soliloquy-icon-video:before {
52
+ content: '\004c'; }
53
+
54
+ .soliloquy-icon-watermark:before {
55
+ content: '\004d'; }
56
+
57
+ .soliloquy-icon-cloud-download:before {
58
+ content: '\004e'; }
59
+
60
+ .soliloquy-icon-toggle-on:before {
61
+ content: '\004f'; }
62
+
63
+ .soliloquy-icon-plus-circle:before {
64
+ content: '\0050'; }
65
+
66
+ .soliloquy-icon-list:before {
67
+ content: '\0052'; }
68
+
69
+ .soliloquy-icon-grid:before {
70
+ content: '\0053'; }
71
+
72
+ .soliloquy-icon-pencil:before {
73
+ content: '\0055'; }
74
+
75
+ .soliloquy-icon-close:before {
76
+ content: '\0056'; }
77
+
78
+ .soliloquy-icon-check:before {
79
+ content: '\0057'; }
80
+
81
+ .soliloquy-icon-schedule:before {
82
+ content: '\0058'; }
83
+
84
+ .soliloquy-icon-carousel:before {
85
+ content: '\0059'; }
86
+
87
+ #soliloquy-header {
88
+ background-color: #ff3700;
89
+ height: 120px;
90
+ margin-left: -20px; }
91
+ #soliloquy-header #soliloquy-logo {
92
+ margin: 0;
93
+ padding-top: 25px;
94
+ line-height: 120px;
95
+ margin-left: 20px; }
96
+ #soliloquy-header #soliloquy-logo img {
97
+ max-width: 288px; }
98
+
99
+ .wp-core-ui .button-soliloquy {
100
+ background: #ff3700;
101
+ border-color: #ff3700;
102
+ -webkit-box-shadow: none;
103
+ box-shadow: none;
104
+ color: white;
105
+ text-decoration: none;
106
+ font-weight: 500;
107
+ text-shadow: none;
108
+ line-height: 15px;
109
+ height: 35px;
110
+ font-size: 13px;
111
+ padding: 0 20px 1px; }
112
+ .wp-core-ui .button-soliloquy:hover {
113
+ background: #ff3700;
114
+ border-color: #ff3700;
115
+ color: white;
116
+ opacity: .8; }
117
+ .wp-core-ui .button-soliloquy-secondary {
118
+ background: #f7f7f7;
119
+ border: 1px solid;
120
+ border-color: #dddddd;
121
+ -webkit-box-shadow: none;
122
+ box-shadow: none;
123
+ color: #23282d;
124
+ text-decoration: none;
125
+ text-shadow: none;
126
+ font-weight: bold;
127
+ height: 35px;
128
+ font-size: 13px;
129
+ padding: 0 20px 1px; }
130
+ .wp-core-ui .button-soliloquy-secondary:hover {
131
+ background: #f7f7f7;
132
+ border-color: #999999;
133
+ color: #23282d; }
134
+ .wp-core-ui .button-soliloquy-delete {
135
+ background: #e3231b;
136
+ border: 1px solid;
137
+ border-color: #e3231b;
138
+ -webkit-box-shadow: none;
139
+ box-shadow: none;
140
+ color: white;
141
+ text-decoration: none;
142
+ text-shadow: none;
143
+ font-weight: bold;
144
+ height: 35px;
145
+ font-size: 13px;
146
+ padding: 0 20px 1px; }
147
+ .wp-core-ui .button-soliloquy-delete:hover {
148
+ background: #e3231b;
149
+ color: white;
150
+ opacity: .8; }
151
+ .wp-core-ui a.button-soliloquy,
152
+ .wp-core-ui a.button-soliloquy-secondary,
153
+ .wp-core-ui a.button-soliloquy-delete {
154
+ line-height: 32px; }
155
+
156
+ #soliloquy-settings-content input:not([type=checkbox]) {
157
+ background-color: white;
158
+ border: 1px solid #ddd;
159
+ -webkit-box-shadow: none;
160
+ box-shadow: none;
161
+ color: #32373c;
162
+ height: 35px;
163
+ outline: none;
164
+ -webkit-transition: 0.05s border-color ease-in-out;
165
+ transition: 0.05s border-color ease-in-out; }
166
+ #soliloquy-settings-content input[type=checkbox]:checked {
167
+ -color: #ff3700; }
168
+ #soliloquy-settings-content textarea {
169
+ width: 100%; }
170
+ #soliloquy-settings-content input[type="password"].soliloquy-input {
171
+ background-color: white;
172
+ border: 1px solid #ddd;
173
+ -webkit-box-shadow: none;
174
+ box-shadow: none;
175
+ color: #32373c;
176
+ outline: none;
177
+ -webkit-transition: 0.05s border-color ease-in-out;
178
+ transition: 0.05s border-color ease-in-out; }
179
+
180
+ input[type="password"].soliloquy-input {
181
+ background-color: white;
182
+ border: 1px solid #ddd;
183
+ -webkit-box-shadow: none;
184
+ box-shadow: none;
185
+ height: 35px;
186
+ color: #32373c;
187
+ outline: none;
188
+ -webkit-transition: 0.05s border-color ease-in-out;
189
+ transition: 0.05s border-color ease-in-out; }
190
+
191
+ pre.soliloquy-code {
192
+ background-color: #dddddd;
193
+ border-radius: 3px;
194
+ padding: 15px; }
195
+
196
+ .soliloquy-clipboard {
197
+ display: block;
198
+ text-decoration: underline !important;
199
+ padding-top: 8px;
200
+ font-size: 11px;
201
+ outline: 0 !important; }
202
+ .soliloquy-clipboard:focus {
203
+ outline-style: none;
204
+ box-shadow: none;
205
+ border-color: transparent; }
206
+
207
+ .soliloquy-code {
208
+ display: block;
209
+ background-color: #f7f7f7;
210
+ border-radius: 3px;
211
+ padding: 10px !important; }
212
+
213
+ /* ==========================================================================
214
+ Utilities
215
+ ========================================================================== */
216
+ .soliloquy-list-inline {
217
+ margin: 0;
218
+ list-style: none; }
219
+ .soliloquy-list-inline li {
220
+ display: inline-block;
221
+ margin-right: 5px; }
222
+ .soliloquy-list-inline li:last-child {
223
+ margin-right: 0 !important; }
224
+
225
+ .soliloquy-yt iframe {
226
+ max-width: 100%;
227
+ height: auto; }
228
+
229
+ .soliloquy-hidden {
230
+ display: none !important; }
231
+
232
+ .soliloquy-hideme {
233
+ visibility: hidden; }
234
+
235
+ .soliloquy-no-border {
236
+ border: none !important; }
237
+
238
+ .soliloquy-right {
239
+ float: right; }
240
+
241
+ .soliloquy-left {
242
+ float: left; }
243
+
244
+ .soliloquy-clearfix {
245
+ clear: both;
246
+ display: block;
247
+ height: 0;
248
+ overflow: hidden;
249
+ visibility: hidden;
250
+ width: 0; }
251
+
252
+ .no-margin {
253
+ margin: 0 !important; }
254
+
255
+ .no-margin-top {
256
+ margin-top: 0 !important; }
257
+
258
+ .no-margin-bottom {
259
+ margin-bottom: 0 !important; }
260
+
261
+ /* Add this attribute to the element that needs a tooltip */
262
+ [data-soliloquy-tooltip] {
263
+ position: relative;
264
+ z-index: 2;
265
+ cursor: pointer; }
266
+
267
+ /* Hide the tooltip content by default */
268
+ [data-soliloquy-tooltip]:before,
269
+ [data-soliloquy-tooltip]:after {
270
+ visibility: hidden;
271
+ opacity: 0;
272
+ pointer-events: none; }
273
+
274
+ /* Position tooltip above the element */
275
+ [data-soliloquy-tooltip]:before {
276
+ position: absolute;
277
+ bottom: 120%;
278
+ left: 50%;
279
+ margin-bottom: 5px;
280
+ margin-left: -35px;
281
+ padding: 7px;
282
+ width: 60px;
283
+ -webkit-border-radius: 3px;
284
+ -moz-border-radius: 3px;
285
+ border-radius: 3px;
286
+ background-color: #000;
287
+ color: #fff;
288
+ content: attr(data-soliloquy-tooltip);
289
+ text-align: center;
290
+ font-size: 12px;
291
+ line-height: 1.2; }
292
+
293
+ /* Triangle hack to make tooltip look like a speech bubble */
294
+ [data-soliloquy-tooltip]:after {
295
+ position: absolute;
296
+ bottom: 120%;
297
+ left: 50%;
298
+ width: 0;
299
+ margin-left: -5px;
300
+ border-top: 5px solid #000;
301
+ border-right: 5px solid transparent;
302
+ border-left: 5px solid transparent;
303
+ content: " ";
304
+ font-size: 0;
305
+ line-height: 0; }
306
+
307
+ /* Show tooltip content on hover */
308
+ [data-soliloquy-tooltip]:hover:before,
309
+ [data-soliloquy-tooltip]:hover:after {
310
+ visibility: visible;
311
+ opacity: 1; }
312
+
313
+ .soliloquy-alert {
314
+ position: relative;
315
+ margin: 0 0 20px 0;
316
+ padding: 20px;
317
+ -webkit-border-radius: 2px;
318
+ -moz-border-radius: 2px;
319
+ -o-border-radius: 2px;
320
+ border-radius: 2px;
321
+ background: #fcf8e3; }
322
+
323
+ [class*=soliloquy-grid-] {
324
+ float: left;
325
+ margin-left: 2%; }
326
+ [class*=soliloquy-grid-] input[type=text] {
327
+ width: 100% !important; }
328
+
329
+ .soliloquy-grid-1 {
330
+ width: 6.5%; }
331
+
332
+ .soliloquy-grid-2 {
333
+ width: 15%; }
334
+
335
+ .soliloquy-grid-3 {
336
+ width: 23.5%; }
337
+
338
+ .soliloquy-grid-4 {
339
+ width: 32%; }
340
+
341
+ .soliloquy-grid-5 {
342
+ width: 40.5%; }
343
+
344
+ .soliloquy-grid-6 {
345
+ width: 49%; }
346
+
347
+ .soliloquy-grid-7 {
348
+ width: 57.5%; }
349
+
350
+ .soliloquy-grid-8 {
351
+ width: 66%; }
352
+
353
+ .soliloquy-grid-9 {
354
+ width: 74.5%; }
355
+
356
+ .soliloquy-grid-10 {
357
+ width: 83%; }
358
+
359
+ .soliloquy-grid-11 {
360
+ width: 91.5%; }
361
+
362
+ .soliloquy-grid-12 {
363
+ width: 100%; }
364
+
365
+ .soliloquy-first {
366
+ margin-left: 0px; }
367
+
368
+ /*!
369
+ Chosen, a Select Box Enhancer for jQuery and Prototype
370
+ by Patrick Filler for Harvest, http://getharvest.com
371
+
372
+ Version 1.5.1
373
+ Full source at https://github.com/harvesthq/chosen
374
+ Copyright (c) 2011-2016 Harvest http://getharvest.com
375
+
376
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
377
+ This file is generated by `grunt build`, do not edit it by hand.
378
+ */
379
+ .soliloquy-select {
380
+ /* @group Base */
381
+ /* @end */
382
+ /* @group Single Chosen */
383
+ /* @end */
384
+ /* @group Results */
385
+ /* @end */
386
+ /* @group Multi Chosen */
387
+ /* @end */
388
+ /* @group Active */
389
+ /* @end */
390
+ /* @group Disabled Support */
391
+ /* @end */
392
+ /* @group Right to Left */
393
+ /* @end */
394
+ /* @group Retina compatibility */
395
+ /* @end */ }
396
+ .soliloquy-select * {
397
+ box-shadow: none !important;
398
+ background-image: none !important; }
399
+ .soliloquy-select *:after {
400
+ background-image: none !important; }
401
+ .soliloquy-select .soliloquy-chosen {
402
+ height: 35px;
403
+ max-width: 350px;
404
+ width: 100%; }
405
+ .soliloquy-select .chosen-container {
406
+ position: relative;
407
+ display: inline-block;
408
+ vertical-align: middle;
409
+ font-size: 13px;
410
+ -webkit-user-select: none;
411
+ -moz-user-select: none;
412
+ user-select: none;
413
+ max-width: 350px;
414
+ font-weight: 600; }
415
+ .soliloquy-select .chosen-container * {
416
+ -webkit-box-sizing: border-box;
417
+ -moz-box-sizing: border-box;
418
+ box-sizing: border-box; }
419
+ .soliloquy-select .chosen-container .chosen-drop {
420
+ position: absolute;
421
+ top: 100%;
422
+ left: -9999px;
423
+ z-index: 1010;
424
+ width: 100%;
425
+ border: 1px solid #dddddd;
426
+ border-top: 0;
427
+ background: white; }
428
+ .soliloquy-select .chosen-container.chosen-with-drop .chosen-drop {
429
+ left: 0; }
430
+ .soliloquy-select .chosen-container a {
431
+ cursor: pointer; }
432
+ .soliloquy-select .chosen-container .search-choice .group-name, .soliloquy-select .chosen-container .chosen-single .group-name {
433
+ margin-right: 4px;
434
+ overflow: hidden;
435
+ white-space: nowrap;
436
+ text-overflow: ellipsis;
437
+ font-weight: normal;
438
+ color: #999999; }
439
+ .soliloquy-select .chosen-container .search-choice .group-name:after, .soliloquy-select .chosen-container .chosen-single .group-name:after {
440
+ content: ":";
441
+ padding-left: 2px;
442
+ vertical-align: top; }
443
+ .soliloquy-select .chosen-container-single .chosen-single {
444
+ position: relative;
445
+ display: block;
446
+ overflow: hidden;
447
+ padding: 0 0 0 8px;
448
+ height: 35px;
449
+ border: 1px solid #dddddd;
450
+ border-radius: 3px;
451
+ background: white;
452
+ background-clip: padding-box;
453
+ color: #444;
454
+ text-decoration: none;
455
+ white-space: nowrap;
456
+ line-height: 35px; }
457
+ .soliloquy-select .chosen-container-single .chosen-default {
458
+ color: #999; }
459
+ .soliloquy-select .chosen-container-single .chosen-single span {
460
+ display: block;
461
+ overflow: hidden;
462
+ margin-right: 26px;
463
+ text-overflow: ellipsis;
464
+ white-space: nowrap; }
465
+ .soliloquy-select .chosen-container-single .chosen-single-with-deselect span {
466
+ margin-right: 38px; }
467
+ .soliloquy-select .chosen-container-single .chosen-single abbr {
468
+ position: absolute;
469
+ top: 6px;
470
+ right: 26px;
471
+ display: block;
472
+ width: 12px;
473
+ height: 12px;
474
+ font-size: 1px; }
475
+ .soliloquy-select .chosen-container-single .chosen-single abbr:hover {
476
+ background-position: -42px -10px; }
477
+ .soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
478
+ background-position: -42px -10px; }
479
+ .soliloquy-select .chosen-container-single .chosen-single div {
480
+ border-left: 1px solid #dddddd;
481
+ position: absolute;
482
+ top: 0;
483
+ right: 0;
484
+ display: block;
485
+ width: 30px;
486
+ height: 100%;
487
+ padding-left: 9px; }
488
+ .soliloquy-select .chosen-container-single .chosen-single div b {
489
+ display: block;
490
+ width: 100%;
491
+ height: 100%;
492
+ line-height: 35px; }
493
+ .soliloquy-select .chosen-container-single .chosen-single div b:before {
494
+ content: "\0051";
495
+ display: block;
496
+ font-weight: normal;
497
+ font-size: 8px !important;
498
+ font-family: 'soliloquy';
499
+ position: absolute;
500
+ text-align: center; }
501
+ .soliloquy-select .chosen-container-single .chosen-search {
502
+ position: relative;
503
+ z-index: 1010;
504
+ margin: 0;
505
+ padding: 3px 4px;
506
+ white-space: nowrap; }
507
+ .soliloquy-select .chosen-container-single .chosen-search input[type="text"] {
508
+ margin: 1px 0;
509
+ padding: 4px 20px 4px 5px;
510
+ width: 100%;
511
+ height: auto;
512
+ outline: 0;
513
+ border: 1px solid #dddddd;
514
+ background: white url("chosen-sprite.png") no-repeat 100% -20px;
515
+ background: url("chosen-sprite.png") no-repeat 100% -20px;
516
+ font-size: 1em;
517
+ font-family: sans-serif;
518
+ line-height: normal;
519
+ border-radius: 0; }
520
+ .soliloquy-select .chosen-container-single .chosen-drop {
521
+ margin-top: -1px;
522
+ border-radius: 0 0 2px 2px;
523
+ background-clip: padding-box; }
524
+ .soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search {
525
+ position: absolute;
526
+ left: -9999px; }
527
+ .soliloquy-select .chosen-container .chosen-results {
528
+ color: #444;
529
+ position: relative;
530
+ overflow-x: hidden;
531
+ overflow-y: auto;
532
+ margin: 0 4px 4px 0;
533
+ padding: 0 0 0 4px;
534
+ max-height: 240px;
535
+ -webkit-overflow-scrolling: touch; }
536
+ .soliloquy-select .chosen-container .chosen-results li {
537
+ display: none;
538
+ margin: 0;
539
+ padding: 5px 6px;
540
+ list-style: none;
541
+ line-height: 15px;
542
+ word-wrap: break-word;
543
+ -webkit-touch-callout: none; }
544
+ .soliloquy-select .chosen-container .chosen-results li.active-result {
545
+ display: list-item;
546
+ cursor: pointer; }
547
+ .soliloquy-select .chosen-container .chosen-results li.disabled-result {
548
+ display: list-item;
549
+ color: #ccc;
550
+ cursor: default; }
551
+ .soliloquy-select .chosen-container .chosen-results li.highlighted {
552
+ background: #ff3700;
553
+ color: white; }
554
+ .soliloquy-select .chosen-container .chosen-results li.no-results {
555
+ color: #777;
556
+ display: list-item;
557
+ background: #f4f4f4; }
558
+ .soliloquy-select .chosen-container .chosen-results li.group-result {
559
+ display: list-item;
560
+ font-weight: bold;
561
+ cursor: default; }
562
+ .soliloquy-select .chosen-container .chosen-results li.group-option {
563
+ padding-left: 15px; }
564
+ .soliloquy-select .chosen-container .chosen-results li em {
565
+ font-style: normal;
566
+ text-decoration: underline; }
567
+ .soliloquy-select .chosen-container-multi .chosen-choices {
568
+ position: relative;
569
+ overflow: hidden;
570
+ margin: 0;
571
+ padding: 0 5px;
572
+ width: 100%;
573
+ height: auto !important;
574
+ height: 1%;
575
+ border: 1px solid #dddddd;
576
+ background: white;
577
+ cursor: text; }
578
+ .soliloquy-select .chosen-container-multi .chosen-choices li {
579
+ float: left;
580
+ list-style: none; }
581
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-field {
582
+ margin: 0;
583
+ padding: 0;
584
+ white-space: nowrap; }
585
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
586
+ margin: 1px 0;
587
+ padding: 0;
588
+ height: 25px;
589
+ outline: 0;
590
+ border: 0 !important;
591
+ background: transparent !important;
592
+ box-shadow: none;
593
+ color: #999;
594
+ font-size: 100%;
595
+ font-family: sans-serif;
596
+ line-height: normal;
597
+ border-radius: 0; }
598
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice {
599
+ position: relative;
600
+ margin: 3px 5px 3px 0;
601
+ padding: 3px 20px 3px 5px;
602
+ border: 1px solid #dddddd;
603
+ max-width: 100%;
604
+ border-radius: 2px;
605
+ background: white;
606
+ background-size: 100% 19px;
607
+ background-repeat: repeat-x;
608
+ background-clip: padding-box;
609
+ box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
610
+ color: #333;
611
+ line-height: 13px;
612
+ cursor: default; }
613
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span {
614
+ word-wrap: break-word; }
615
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
616
+ position: absolute;
617
+ top: 4px;
618
+ right: 3px;
619
+ display: block;
620
+ width: 12px;
621
+ height: 12px;
622
+ background: url("chosen-sprite.png") -42px 1px no-repeat;
623
+ font-size: 1px; }
624
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
625
+ background-position: -42px -10px; }
626
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled {
627
+ padding-right: 5px;
628
+ border: 1px solid #dddddd;
629
+ background: #e4e4e4;
630
+ color: #666; }
631
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus {
632
+ background: #d4d4d4; }
633
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
634
+ background-position: -42px -10px; }
635
+ .soliloquy-select .chosen-container-multi .chosen-results {
636
+ margin: 0;
637
+ padding: 0; }
638
+ .soliloquy-select .chosen-container-multi .chosen-drop .result-selected {
639
+ display: list-item;
640
+ color: #ccc;
641
+ cursor: default; }
642
+ .soliloquy-select .chosen-container-active .chosen-single {
643
+ border: 1px solid #dddddd; }
644
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single {
645
+ border: 1px solid #dddddd;
646
+ -moz-border-radius-bottomright: 0;
647
+ border-bottom-right-radius: 0;
648
+ -moz-border-radius-bottomleft: 0;
649
+ border-bottom-left-radius: 0;
650
+ background: white; }
651
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div {
652
+ border-left: 1px solid transparent;
653
+ background: transparent; }
654
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b {
655
+ background-position: -18px 2px; }
656
+ .soliloquy-select .chosen-container-active .chosen-choices {
657
+ border: 1px solid #5897fb;
658
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); }
659
+ .soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"] {
660
+ color: #222 !important; }
661
+ .soliloquy-select .chosen-disabled {
662
+ opacity: 0.5 !important;
663
+ cursor: default; }
664
+ .soliloquy-select .chosen-disabled .chosen-single {
665
+ cursor: default; }
666
+ .soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close {
667
+ cursor: default; }
668
+ .soliloquy-select .chosen-rtl {
669
+ text-align: right; }
670
+ .soliloquy-select .chosen-rtl .chosen-single {
671
+ overflow: visible;
672
+ padding: 0 8px 0 0; }
673
+ .soliloquy-select .chosen-rtl .chosen-single span {
674
+ margin-right: 0;
675
+ margin-left: 26px;
676
+ direction: rtl; }
677
+ .soliloquy-select .chosen-rtl .chosen-single-with-deselect span {
678
+ margin-left: 38px; }
679
+ .soliloquy-select .chosen-rtl .chosen-single div {
680
+ right: auto;
681
+ left: 3px; }
682
+ .soliloquy-select .chosen-rtl .chosen-single abbr {
683
+ right: auto;
684
+ left: 26px; }
685
+ .soliloquy-select .chosen-rtl .chosen-choices li {
686
+ float: right; }
687
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"] {
688
+ direction: rtl; }
689
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-choice {
690
+ margin: 3px 5px 3px 0;
691
+ padding: 3px 5px 3px 19px; }
692
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
693
+ right: auto;
694
+ left: 4px; }
695
+ .soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,
696
+ .soliloquy-select .chosen-rtl .chosen-drop {
697
+ left: 9999px; }
698
+ .soliloquy-select .chosen-rtl.chosen-container-single .chosen-results {
699
+ margin: 0 0 4px 4px;
700
+ padding: 0 4px 0 0; }
701
+ .soliloquy-select .chosen-rtl .chosen-results li.group-option {
702
+ padding-right: 15px;
703
+ padding-left: 0; }
704
+ .soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
705
+ border-right: none; }
706
+ .soliloquy-select .chosen-rtl .chosen-search input[type="text"] {
707
+ padding: 4px 5px 4px 20px;
708
+ background: white url("chosen-sprite.png") no-repeat -30px -20px;
709
+ background: url("chosen-sprite.png") no-repeat -30px -20px;
710
+ direction: rtl; }
711
+ .soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b {
712
+ background-position: 6px 2px; }
713
+ .soliloquy-select .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
714
+ background-position: -12px 2px; }
715
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
716
+ .soliloquy-select .chosen-rtl .chosen-search input[type="text"],
717
+ .soliloquy-select .chosen-container-single .chosen-single abbr,
718
+ .soliloquy-select .chosen-container-single .chosen-search input[type="text"],
719
+ .soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
720
+ .soliloquy-select .chosen-container .chosen-results-scroll-down span,
721
+ .soliloquy-select .chosen-container .chosen-results-scroll-up span {
722
+ background-image: none !important;
723
+ background-size: 52px 37px !important;
724
+ background-repeat: no-repeat !important; } }
725
+ .soliloquy-select select.soliloquy-chosen + .chosen-container.chosen-container-single .chosen-single {
726
+ padding-right: 35px; }
727
+
728
+ /* ==========================================================================
729
+ Metabox Styles
730
+ ========================================================================== */
731
+ .post-type-soliloquy {
732
+ /* ==========================================================================
733
+ Post Filters
734
+ ========================================================================== */
735
+ /* ==========================================================================
736
+ Post Table Form
737
+ ========================================================================== */
738
+ /* ==========================================================================
739
+ Quick Edit
740
+ ========================================================================== */ }
741
+ .post-type-soliloquy h1 {
742
+ margin: 0;
743
+ padding-left: 20px;
744
+ line-height: 45px;
745
+ font-size: 20px;
746
+ font-weight: 400;
747
+ background-color: white;
748
+ height: 45px;
749
+ margin-left: -20px;
750
+ margin-right: -20px;
751
+ margin-bottom: 20px; }
752
+ .post-type-soliloquy h1 .page-title-action {
753
+ margin-left: 4px;
754
+ padding: 4px 8px;
755
+ position: relative;
756
+ top: -3px;
757
+ text-decoration: none;
758
+ border: none;
759
+ color: #ff3700;
760
+ border-radius: 0;
761
+ background: none;
762
+ text-shadow: none;
763
+ font-weight: 600;
764
+ font-size: 13px; }
765
+ .post-type-soliloquy h1 .page-title-action:hover {
766
+ background: none;
767
+ color: #999999; }
768
+ .post-type-soliloquy h1 .page-title-action:before {
769
+ display: inline-block;
770
+ font-family: 'soliloquy';
771
+ content: '\0050';
772
+ margin-top: -3px;
773
+ margin-right: 8px;
774
+ vertical-align: middle; }
775
+ .post-type-soliloquy .wrap {
776
+ margin-top: 0px !important; }
777
+ .post-type-soliloquy input[type=checkbox] {
778
+ background-color: white;
779
+ border: 1px solid #dddddd;
780
+ box-shadow: none;
781
+ margin-right: 10px; }
782
+ .post-type-soliloquy input[type=checkbox]:checked {
783
+ background-color: #72b63d;
784
+ border-color: #72b63d; }
785
+ .post-type-soliloquy input[type=checkbox]:checked:before {
786
+ color: white !important; }
787
+ .post-type-soliloquy ul.subsubsub {
788
+ /**
789
+ * Re-establish the left and right margins, so there's spacing between the Admin Menu
790
+ * and the content
791
+ */
792
+ margin: 0 0 20px 0;
793
+ padding-left: 0px; }
794
+ .post-type-soliloquy .column-image {
795
+ width: 85px !important; }
796
+ .post-type-soliloquy form#posts-filter {
797
+ /**
798
+ * Table Navigation (Bulk Actions, Dates, SEO Score dropdowns etc)
799
+ */
800
+ /**
801
+ * Reduce our global custom button sizes so they align with inputs
802
+ */ }
803
+ .post-type-soliloquy form#posts-filter div.tablenav.top {
804
+ margin: 0 0 8px 0; }
805
+ .post-type-soliloquy form#posts-filter .button {
806
+ height: 28px;
807
+ line-height: 26px; }
808
+ .post-type-soliloquy #wpbody-content .inline-edit-row fieldset input[type="text"],
809
+ .post-type-soliloquy #wpbody-content .inline-edit-row fieldset input[type="number"],
810
+ .post-type-soliloquy #wpbody-content .inline-edit-row fieldset input[type="password"] {
811
+ background-color: white;
812
+ border: 1px solid #ddd;
813
+ -webkit-box-shadow: none;
814
+ box-shadow: none;
815
+ color: #32373c;
816
+ height: 35px;
817
+ outline: none;
818
+ -webkit-transition: 0.05s border-color ease-in-out;
819
+ transition: 0.05s border-color ease-in-out;
820
+ min-width: 210px;
821
+ max-width: 350px;
822
+ width: 100%;
823
+ border-radius: 3px;
824
+ padding-right: 0; }
825
+ .post-type-soliloquy #wpbody-content .inline-edit-row fieldset select {
826
+ min-width: 275px; }
827
+ .post-type-soliloquy #wpbody-content .inline-edit-row fieldset span.title {
828
+ font-style: normal;
829
+ font-weight: 600;
830
+ font-size: 13px;
831
+ min-width: 140px; }
832
+ .post-type-soliloquy #wpbody-content td.colspanchange {
833
+ /**
834
+ * Left Col (Title, Slug, Date, Password)
835
+ */ }
836
+ .post-type-soliloquy #wpbody-content td.colspanchange fieldset.inline-edit-col-left fieldset.inline-edit-date {
837
+ display: none; }
838
+ .post-type-soliloquy #wpbody-content td.colspanchange fieldset.inline-edit-col-left div.inline-edit-group:last-child {
839
+ display: none; }
840
+
841
+ /* ==========================================================================
842
+ Responsive
843
+ ========================================================================== */
844
+ tr.type-soliloquy th {
845
+ padding: 20px inherit !important; }
846
+ tr.type-soliloquy td {
847
+ padding: 20px inherit; }
848
+
849
+ .soliloquy-count {
850
+ display: none; }
assets/css/settings.css CHANGED
@@ -1 +1,820 @@
1
- #soliloquy-settings .soliloquy-clear{clear:both}#soliloquy-settings .soliloquy-clear:after{clear:both;content:'.';display:block;height:0;line-height:0;overflow:auto;visibility:hidden;zoom:1}#soliloquy-settings .soliloquy{margin:15px 0 20px}#soliloquy-settings #soliloquy-tabs-nav{list-style:none;margin:0 0 10px;padding:0;border-bottom:1px solid #cecece}#soliloquy-settings #soliloquy-tabs-nav li{float:left;margin:0 10px -1px 0}#soliloquy-settings #soliloquy-tabs-nav li a{display:block;padding:10px 12px 7px;font-size:18px;color:#aaa;font-weight:300;text-decoration:none;outline:none}#soliloquy-settings #soliloquy-tabs-nav li.soliloquy-active a{border:1px solid #cecece;border-bottom-color:#f1f1f1;-moz-border-radius:3px 3px 0 0;-webkit-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;color:#21759b;padding-top:9px}#soliloquy-settings #soliloquy-tabs-nav li a:hover{color:#21759b}#soliloquy-settings .soliloquy-tab{display:none}#soliloquy-settings .soliloquy-tab.soliloquy-active{display:block}#soliloquy-settings .soliloquy-tab th{width:210px;padding-right:0}#soliloquy-settings .soliloquy-tab input[type="text"],#soliloquy-settings .soliloquy-tab input[type="number"],#soliloquy-settings .soliloquy-tab input[type="password"],#soliloquy-settings .soliloquy-tab select,#soliloquy-settings .soliloquy-tab textarea{width:350px;padding-right:0}#soliloquy-settings #soliloquy-refresh-submit{vertical-align:baseline}#soliloquy-addons-area{margin-top:20px}.soliloquy-addon{border:1px solid #ccc;background:#fff;border-radius:3px;float:left;margin:0 2% 2% 0;min-height:400px;padding:20px;text-align:center;width:32%;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box}.soliloquy-addon.last{margin-right:0}.soliloquy-addon .soliloquy-addon-thumb{border-radius:3px;box-shadow:0 0 3px rgba(0,0,0,0.35);height:auto;margin:0 auto;max-width:100%;width:auto}.soliloquy-addon .soliloquy-addon-message,.soliloquy-addon .soliloquy-addon-error{-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;padding:10px 6px;text-align:left}.soliloquy-addon .soliloquy-addon-message span{font-weight:bold}.soliloquy-addon .soliloquy-addon-active{background:#cbeca0;border:1px solid #97b48a}.soliloquy-addon .soliloquy-addon-inactive{background:#ffffe0;border:1px solid #e6db55}.soliloquy-addon .soliloquy-addon-not-installed{background:#eaeaea;border:1px solid #dadada}.soliloquy-addon .soliloquy-addon-action{display:inline;float:right}.soliloquy-addon .soliloquy-addon-action .button-primary{margin-top:-5px}.soliloquy-addon .soliloquy-addon-error{background:#ffebe8;border:1px solid #c00;margin-top:10px}.soliloquy-addon .soliloquy-addon-error .wrap{margin:0}.soliloquy-addon .soliloquy-addon-error .icon32{display:none}.soliloquy-addon .soliloquy-addon-error h2{padding:0}.soliloquy-addon .soliloquy-addon-error .form-table th{padding:10px 0;width:30% !important}.soliloquy-addon .soliloquy-addon-error .form-table input[type="text"],.soliloquy-addon .soliloquy-addon-error .form-table input[type="password"]{width:100% !important}.soliloquy-addon .soliloquy-addon-error p.submit{padding:0}.soliloquy-addon p{color:#2f2f2f;font-size:13px;margin:10px 0 0;text-shadow:0 1px #fff}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* ==========================================================================
2
+ Soliloquy Icons
3
+ ========================================================================== */
4
+ @font-face {
5
+ font-family: 'soliloquy';
6
+ src: url("../fonts/soliloquy.eot");
7
+ src: url("../fonts/soliloquy.eot?#iefix") format("embedded-opentype"), url("../fonts/soliloquy.woff") format("woff"), url("../fonts/soliloquy.ttf") format("truetype"), url("../fonts/soliloquy.svg#soliloquy") format("svg");
8
+ font-weight: normal;
9
+ font-style: normal; }
10
+ [class*='soliloquy-icon-']:before {
11
+ display: inline-block;
12
+ font-family: 'soliloquy';
13
+ font-style: normal;
14
+ font-weight: normal;
15
+ font-size: 13px;
16
+ line-height: 1.5;
17
+ margin-right: 8px;
18
+ -webkit-font-smoothing: antialiased;
19
+ -moz-osx-font-smoothing: grayscale; }
20
+
21
+ .soliloquy-icon-configuration:before {
22
+ content: '\0041'; }
23
+
24
+ .soliloquy-icon-soliloquy:before {
25
+ content: '\0042'; }
26
+
27
+ .soliloquy-icon-pinterest:before {
28
+ content: '\0043'; }
29
+
30
+ .soliloquy-icon-lightbox:before {
31
+ content: '\0044'; }
32
+
33
+ .soliloquy-icon-misc:before {
34
+ content: '\0045'; }
35
+
36
+ .soliloquy-icon-mobile:before {
37
+ content: '\0046'; }
38
+
39
+ .soliloquy-icon-pagination:before {
40
+ content: '\0047'; }
41
+
42
+ .soliloquy-icon-proofing:before {
43
+ content: '\0048'; }
44
+
45
+ .soliloquy-icon-slideshow:before {
46
+ content: '\0049'; }
47
+
48
+ .soliloquy-icon-tags:before {
49
+ content: '\004a'; }
50
+
51
+ .soliloquy-icon-thumbnails:before {
52
+ content: '\004b'; }
53
+
54
+ .soliloquy-icon-video:before {
55
+ content: '\004c'; }
56
+
57
+ .soliloquy-icon-watermark:before {
58
+ content: '\004d'; }
59
+
60
+ .soliloquy-icon-cloud-download:before {
61
+ content: '\004e'; }
62
+
63
+ .soliloquy-icon-toggle-on:before {
64
+ content: '\004f'; }
65
+
66
+ .soliloquy-icon-plus-circle:before {
67
+ content: '\0050'; }
68
+
69
+ .soliloquy-icon-list:before {
70
+ content: '\0052'; }
71
+
72
+ .soliloquy-icon-grid:before {
73
+ content: '\0053'; }
74
+
75
+ .soliloquy-icon-pencil:before {
76
+ content: '\0055'; }
77
+
78
+ .soliloquy-icon-close:before {
79
+ content: '\0056'; }
80
+
81
+ .soliloquy-icon-check:before {
82
+ content: '\0057'; }
83
+
84
+ .soliloquy-icon-schedule:before {
85
+ content: '\0058'; }
86
+
87
+ .soliloquy-icon-carousel:before {
88
+ content: '\0059'; }
89
+
90
+ /* ==========================================================================
91
+ Header Styles
92
+ ========================================================================== */
93
+ #soliloquy-header {
94
+ background-color: #ff3700;
95
+ height: 120px;
96
+ margin-left: -20px; }
97
+ #soliloquy-header #soliloquy-logo {
98
+ margin: 0;
99
+ padding-top: 25px;
100
+ line-height: 120px;
101
+ margin-left: 20px; }
102
+ #soliloquy-header #soliloquy-logo img {
103
+ max-width: 288px; }
104
+
105
+ /* ==========================================================================
106
+ Global Styles
107
+ ========================================================================== */
108
+ .wp-core-ui .button-soliloquy {
109
+ background: #ff3700;
110
+ border-color: #ff3700;
111
+ -webkit-box-shadow: none;
112
+ box-shadow: none;
113
+ color: white;
114
+ text-decoration: none;
115
+ font-weight: 500;
116
+ text-shadow: none;
117
+ line-height: 15px;
118
+ height: 35px;
119
+ font-size: 13px;
120
+ padding: 0 20px 1px; }
121
+ .wp-core-ui .button-soliloquy:hover {
122
+ background: #ff3700;
123
+ border-color: #ff3700;
124
+ color: white;
125
+ opacity: .8; }
126
+ .wp-core-ui .button-soliloquy-secondary {
127
+ background: #f7f7f7;
128
+ border: 1px solid;
129
+ border-color: #dddddd;
130
+ -webkit-box-shadow: none;
131
+ box-shadow: none;
132
+ color: #23282d;
133
+ text-decoration: none;
134
+ text-shadow: none;
135
+ font-weight: bold;
136
+ height: 35px;
137
+ font-size: 13px;
138
+ padding: 0 20px 1px; }
139
+ .wp-core-ui .button-soliloquy-secondary:hover {
140
+ background: #f7f7f7;
141
+ border-color: #999999;
142
+ color: #23282d; }
143
+ .wp-core-ui .button-soliloquy-delete {
144
+ background: #e3231b;
145
+ border: 1px solid;
146
+ border-color: #e3231b;
147
+ -webkit-box-shadow: none;
148
+ box-shadow: none;
149
+ color: white;
150
+ text-decoration: none;
151
+ text-shadow: none;
152
+ font-weight: bold;
153
+ height: 35px;
154
+ font-size: 13px;
155
+ padding: 0 20px 1px; }
156
+ .wp-core-ui .button-soliloquy-delete:hover {
157
+ background: #e3231b;
158
+ color: white;
159
+ opacity: .8; }
160
+ .wp-core-ui a.button-soliloquy,
161
+ .wp-core-ui a.button-soliloquy-secondary,
162
+ .wp-core-ui a.button-soliloquy-delete {
163
+ line-height: 32px; }
164
+
165
+ #soliloquy-settings-content input:not([type=checkbox]) {
166
+ background-color: white;
167
+ border: 1px solid #ddd;
168
+ -webkit-box-shadow: none;
169
+ box-shadow: none;
170
+ color: #32373c;
171
+ height: 35px;
172
+ outline: none;
173
+ -webkit-transition: 0.05s border-color ease-in-out;
174
+ transition: 0.05s border-color ease-in-out; }
175
+ #soliloquy-settings-content input[type=checkbox]:checked {
176
+ -color: #ff3700; }
177
+ #soliloquy-settings-content textarea {
178
+ width: 100%; }
179
+ #soliloquy-settings-content input[type="password"].soliloquy-input {
180
+ background-color: white;
181
+ border: 1px solid #ddd;
182
+ -webkit-box-shadow: none;
183
+ box-shadow: none;
184
+ color: #32373c;
185
+ outline: none;
186
+ -webkit-transition: 0.05s border-color ease-in-out;
187
+ transition: 0.05s border-color ease-in-out; }
188
+
189
+ input[type="password"].soliloquy-input {
190
+ background-color: white;
191
+ border: 1px solid #ddd;
192
+ -webkit-box-shadow: none;
193
+ box-shadow: none;
194
+ height: 35px;
195
+ color: #32373c;
196
+ outline: none;
197
+ -webkit-transition: 0.05s border-color ease-in-out;
198
+ transition: 0.05s border-color ease-in-out; }
199
+
200
+ pre.soliloquy-code {
201
+ background-color: #dddddd;
202
+ border-radius: 3px;
203
+ padding: 15px; }
204
+
205
+ .soliloquy-clipboard {
206
+ display: block;
207
+ text-decoration: underline !important;
208
+ padding-top: 8px;
209
+ font-size: 11px;
210
+ outline: 0 !important; }
211
+ .soliloquy-clipboard:focus {
212
+ outline-style: none;
213
+ box-shadow: none;
214
+ border-color: transparent; }
215
+
216
+ .soliloquy-code {
217
+ display: block;
218
+ background-color: #f7f7f7;
219
+ border-radius: 3px;
220
+ padding: 10px !important; }
221
+
222
+ /* ==========================================================================
223
+ Utilities
224
+ ========================================================================== */
225
+ .soliloquy-list-inline {
226
+ margin: 0;
227
+ list-style: none; }
228
+ .soliloquy-list-inline li {
229
+ display: inline-block;
230
+ margin-right: 5px; }
231
+ .soliloquy-list-inline li:last-child {
232
+ margin-right: 0 !important; }
233
+
234
+ .soliloquy-yt iframe {
235
+ max-width: 100%;
236
+ height: auto; }
237
+
238
+ .soliloquy-hidden {
239
+ display: none !important; }
240
+
241
+ .soliloquy-hideme {
242
+ visibility: hidden; }
243
+
244
+ .soliloquy-no-border {
245
+ border: none !important; }
246
+
247
+ .soliloquy-right {
248
+ float: right; }
249
+
250
+ .soliloquy-left {
251
+ float: left; }
252
+
253
+ .soliloquy-clearfix {
254
+ clear: both;
255
+ display: block;
256
+ height: 0;
257
+ overflow: hidden;
258
+ visibility: hidden;
259
+ width: 0; }
260
+
261
+ .no-margin {
262
+ margin: 0 !important; }
263
+
264
+ .no-margin-top {
265
+ margin-top: 0 !important; }
266
+
267
+ .no-margin-bottom {
268
+ margin-bottom: 0 !important; }
269
+
270
+ /* Add this attribute to the element that needs a tooltip */
271
+ [data-soliloquy-tooltip] {
272
+ position: relative;
273
+ z-index: 2;
274
+ cursor: pointer; }
275
+
276
+ /* Hide the tooltip content by default */
277
+ [data-soliloquy-tooltip]:before,
278
+ [data-soliloquy-tooltip]:after {
279
+ visibility: hidden;
280
+ opacity: 0;
281
+ pointer-events: none; }
282
+
283
+ /* Position tooltip above the element */
284
+ [data-soliloquy-tooltip]:before {
285
+ position: absolute;
286
+ bottom: 120%;
287
+ left: 50%;
288
+ margin-bottom: 5px;
289
+ margin-left: -35px;
290
+ padding: 7px;
291
+ width: 60px;
292
+ -webkit-border-radius: 3px;
293
+ -moz-border-radius: 3px;
294
+ border-radius: 3px;
295
+ background-color: #000;
296
+ color: #fff;
297
+ content: attr(data-soliloquy-tooltip);
298
+ text-align: center;
299
+ font-size: 12px;
300
+ line-height: 1.2; }
301
+
302
+ /* Triangle hack to make tooltip look like a speech bubble */
303
+ [data-soliloquy-tooltip]:after {
304
+ position: absolute;
305
+ bottom: 120%;
306
+ left: 50%;
307
+ width: 0;
308
+ margin-left: -5px;
309
+ border-top: 5px solid #000;
310
+ border-right: 5px solid transparent;
311
+ border-left: 5px solid transparent;
312
+ content: " ";
313
+ font-size: 0;
314
+ line-height: 0; }
315
+
316
+ /* Show tooltip content on hover */
317
+ [data-soliloquy-tooltip]:hover:before,
318
+ [data-soliloquy-tooltip]:hover:after {
319
+ visibility: visible;
320
+ opacity: 1; }
321
+
322
+ .soliloquy-alert {
323
+ position: relative;
324
+ margin: 0 0 20px 0;
325
+ padding: 20px;
326
+ -webkit-border-radius: 2px;
327
+ -moz-border-radius: 2px;
328
+ -o-border-radius: 2px;
329
+ border-radius: 2px;
330
+ background: #fcf8e3; }
331
+
332
+ [class*=soliloquy-grid-] {
333
+ float: left;
334
+ margin-left: 2%; }
335
+ [class*=soliloquy-grid-] input[type=text] {
336
+ width: 100% !important; }
337
+
338
+ .soliloquy-grid-1 {
339
+ width: 6.5%; }
340
+
341
+ .soliloquy-grid-2 {
342
+ width: 15%; }
343
+
344
+ .soliloquy-grid-3 {
345
+ width: 23.5%; }
346
+
347
+ .soliloquy-grid-4 {
348
+ width: 32%; }
349
+
350
+ .soliloquy-grid-5 {
351
+ width: 40.5%; }
352
+
353
+ .soliloquy-grid-6 {
354
+ width: 49%; }
355
+
356
+ .soliloquy-grid-7 {
357
+ width: 57.5%; }
358
+
359
+ .soliloquy-grid-8 {
360
+ width: 66%; }
361
+
362
+ .soliloquy-grid-9 {
363
+ width: 74.5%; }
364
+
365
+ .soliloquy-grid-10 {
366
+ width: 83%; }
367
+
368
+ .soliloquy-grid-11 {
369
+ width: 91.5%; }
370
+
371
+ .soliloquy-grid-12 {
372
+ width: 100%; }
373
+
374
+ .soliloquy-first {
375
+ margin-left: 0px; }
376
+
377
+ /*!
378
+ Chosen, a Select Box Enhancer for jQuery and Prototype
379
+ by Patrick Filler for Harvest, http://getharvest.com
380
+
381
+ Version 1.5.1
382
+ Full source at https://github.com/harvesthq/chosen
383
+ Copyright (c) 2011-2016 Harvest http://getharvest.com
384
+
385
+ MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md
386
+ This file is generated by `grunt build`, do not edit it by hand.
387
+ */
388
+ .soliloquy-select {
389
+ /* @group Base */
390
+ /* @end */
391
+ /* @group Single Chosen */
392
+ /* @end */
393
+ /* @group Results */
394
+ /* @end */
395
+ /* @group Multi Chosen */
396
+ /* @end */
397
+ /* @group Active */
398
+ /* @end */
399
+ /* @group Disabled Support */
400
+ /* @end */
401
+ /* @group Right to Left */
402
+ /* @end */
403
+ /* @group Retina compatibility */
404
+ /* @end */ }
405
+ .soliloquy-select * {
406
+ box-shadow: none !important;
407
+ background-image: none !important; }
408
+ .soliloquy-select *:after {
409
+ background-image: none !important; }
410
+ .soliloquy-select .soliloquy-chosen {
411
+ height: 35px;
412
+ max-width: 350px;
413
+ width: 100%; }
414
+ .soliloquy-select .chosen-container {
415
+ position: relative;
416
+ display: inline-block;
417
+ vertical-align: middle;
418
+ font-size: 13px;
419
+ -webkit-user-select: none;
420
+ -moz-user-select: none;
421
+ user-select: none;
422
+ max-width: 350px;
423
+ font-weight: 600; }
424
+ .soliloquy-select .chosen-container * {
425
+ -webkit-box-sizing: border-box;
426
+ -moz-box-sizing: border-box;
427
+ box-sizing: border-box; }
428
+ .soliloquy-select .chosen-container .chosen-drop {
429
+ position: absolute;
430
+ top: 100%;
431
+ left: -9999px;
432
+ z-index: 1010;
433
+ width: 100%;
434
+ border: 1px solid #dddddd;
435
+ border-top: 0;
436
+ background: white; }
437
+ .soliloquy-select .chosen-container.chosen-with-drop .chosen-drop {
438
+ left: 0; }
439
+ .soliloquy-select .chosen-container a {
440
+ cursor: pointer; }
441
+ .soliloquy-select .chosen-container .search-choice .group-name, .soliloquy-select .chosen-container .chosen-single .group-name {
442
+ margin-right: 4px;
443
+ overflow: hidden;
444
+ white-space: nowrap;
445
+ text-overflow: ellipsis;
446
+ font-weight: normal;
447
+ color: #999999; }
448
+ .soliloquy-select .chosen-container .search-choice .group-name:after, .soliloquy-select .chosen-container .chosen-single .group-name:after {
449
+ content: ":";
450
+ padding-left: 2px;
451
+ vertical-align: top; }
452
+ .soliloquy-select .chosen-container-single .chosen-single {
453
+ position: relative;
454
+ display: block;
455
+ overflow: hidden;
456
+ padding: 0 0 0 8px;
457
+ height: 35px;
458
+ border: 1px solid #dddddd;
459
+ border-radius: 3px;
460
+ background: white;
461
+ background-clip: padding-box;
462
+ color: #444;
463
+ text-decoration: none;
464
+ white-space: nowrap;
465
+ line-height: 35px; }
466
+ .soliloquy-select .chosen-container-single .chosen-default {
467
+ color: #999; }
468
+ .soliloquy-select .chosen-container-single .chosen-single span {
469
+ display: block;
470
+ overflow: hidden;
471
+ margin-right: 26px;
472
+ text-overflow: ellipsis;
473
+ white-space: nowrap; }
474
+ .soliloquy-select .chosen-container-single .chosen-single-with-deselect span {
475
+ margin-right: 38px; }
476
+ .soliloquy-select .chosen-container-single .chosen-single abbr {
477
+ position: absolute;
478
+ top: 6px;
479
+ right: 26px;
480
+ display: block;
481
+ width: 12px;
482
+ height: 12px;
483
+ font-size: 1px; }
484
+ .soliloquy-select .chosen-container-single .chosen-single abbr:hover {
485
+ background-position: -42px -10px; }
486
+ .soliloquy-select .chosen-container-single.chosen-disabled .chosen-single abbr:hover {
487
+ background-position: -42px -10px; }
488
+ .soliloquy-select .chosen-container-single .chosen-single div {
489
+ border-left: 1px solid #dddddd;
490
+ position: absolute;
491
+ top: 0;
492
+ right: 0;
493
+ display: block;
494
+ width: 30px;
495
+ height: 100%;
496
+ padding-left: 9px; }
497
+ .soliloquy-select .chosen-container-single .chosen-single div b {
498
+ display: block;
499
+ width: 100%;
500
+ height: 100%;
501
+ line-height: 35px; }
502
+ .soliloquy-select .chosen-container-single .chosen-single div b:before {
503
+ content: "\0051";
504
+ display: block;
505
+ font-weight: normal;
506
+ font-size: 8px !important;
507
+ font-family: 'soliloquy';
508
+ position: absolute;
509
+ text-align: center; }
510
+ .soliloquy-select .chosen-container-single .chosen-search {
511
+ position: relative;
512
+ z-index: 1010;
513
+ margin: 0;
514
+ padding: 3px 4px;
515
+ white-space: nowrap; }
516
+ .soliloquy-select .chosen-container-single .chosen-search input[type="text"] {
517
+ margin: 1px 0;
518
+ padding: 4px 20px 4px 5px;
519
+ width: 100%;
520
+ height: auto;
521
+ outline: 0;
522
+ border: 1px solid #dddddd;
523
+ background: white url("chosen-sprite.png") no-repeat 100% -20px;
524
+ background: url("chosen-sprite.png") no-repeat 100% -20px;
525
+ font-size: 1em;
526
+ font-family: sans-serif;
527
+ line-height: normal;
528
+ border-radius: 0; }
529
+ .soliloquy-select .chosen-container-single .chosen-drop {
530
+ margin-top: -1px;
531
+ border-radius: 0 0 2px 2px;
532
+ background-clip: padding-box; }
533
+ .soliloquy-select .chosen-container-single.chosen-container-single-nosearch .chosen-search {
534
+ position: absolute;
535
+ left: -9999px; }
536
+ .soliloquy-select .chosen-container .chosen-results {
537
+ color: #444;
538
+ position: relative;
539
+ overflow-x: hidden;
540
+ overflow-y: auto;
541
+ margin: 0 4px 4px 0;
542
+ padding: 0 0 0 4px;
543
+ max-height: 240px;
544
+ -webkit-overflow-scrolling: touch; }
545
+ .soliloquy-select .chosen-container .chosen-results li {
546
+ display: none;
547
+ margin: 0;
548
+ padding: 5px 6px;
549
+ list-style: none;
550
+ line-height: 15px;
551
+ word-wrap: break-word;
552
+ -webkit-touch-callout: none; }
553
+ .soliloquy-select .chosen-container .chosen-results li.active-result {
554
+ display: list-item;
555
+ cursor: pointer; }
556
+ .soliloquy-select .chosen-container .chosen-results li.disabled-result {
557
+ display: list-item;
558
+ color: #ccc;
559
+ cursor: default; }
560
+ .soliloquy-select .chosen-container .chosen-results li.highlighted {
561
+ background: #ff3700;
562
+ color: white; }
563
+ .soliloquy-select .chosen-container .chosen-results li.no-results {
564
+ color: #777;
565
+ display: list-item;
566
+ background: #f4f4f4; }
567
+ .soliloquy-select .chosen-container .chosen-results li.group-result {
568
+ display: list-item;
569
+ font-weight: bold;
570
+ cursor: default; }
571
+ .soliloquy-select .chosen-container .chosen-results li.group-option {
572
+ padding-left: 15px; }
573
+ .soliloquy-select .chosen-container .chosen-results li em {
574
+ font-style: normal;
575
+ text-decoration: underline; }
576
+ .soliloquy-select .chosen-container-multi .chosen-choices {
577
+ position: relative;
578
+ overflow: hidden;
579
+ margin: 0;
580
+ padding: 0 5px;
581
+ width: 100%;
582
+ height: auto !important;
583
+ height: 1%;
584
+ border: 1px solid #dddddd;
585
+ background: white;
586
+ cursor: text; }
587
+ .soliloquy-select .chosen-container-multi .chosen-choices li {
588
+ float: left;
589
+ list-style: none; }
590
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-field {
591
+ margin: 0;
592
+ padding: 0;
593
+ white-space: nowrap; }
594
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-field input[type="text"] {
595
+ margin: 1px 0;
596
+ padding: 0;
597
+ height: 25px;
598
+ outline: 0;
599
+ border: 0 !important;
600
+ background: transparent !important;
601
+ box-shadow: none;
602
+ color: #999;
603
+ font-size: 100%;
604
+ font-family: sans-serif;
605
+ line-height: normal;
606
+ border-radius: 0; }
607
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice {
608
+ position: relative;
609
+ margin: 3px 5px 3px 0;
610
+ padding: 3px 20px 3px 5px;
611
+ border: 1px solid #dddddd;
612
+ max-width: 100%;
613
+ border-radius: 2px;
614
+ background: white;
615
+ background-size: 100% 19px;
616
+ background-repeat: repeat-x;
617
+ background-clip: padding-box;
618
+ box-shadow: 0 0 2px white inset, 0 1px 0 rgba(0, 0, 0, 0.05);
619
+ color: #333;
620
+ line-height: 13px;
621
+ cursor: default; }
622
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice span {
623
+ word-wrap: break-word; }
624
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
625
+ position: absolute;
626
+ top: 4px;
627
+ right: 3px;
628
+ display: block;
629
+ width: 12px;
630
+ height: 12px;
631
+ background: url("chosen-sprite.png") -42px 1px no-repeat;
632
+ font-size: 1px; }
633
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice .search-choice-close:hover {
634
+ background-position: -42px -10px; }
635
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-disabled {
636
+ padding-right: 5px;
637
+ border: 1px solid #dddddd;
638
+ background: #e4e4e4;
639
+ color: #666; }
640
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus {
641
+ background: #d4d4d4; }
642
+ .soliloquy-select .chosen-container-multi .chosen-choices li.search-choice-focus .search-choice-close {
643
+ background-position: -42px -10px; }
644
+ .soliloquy-select .chosen-container-multi .chosen-results {
645
+ margin: 0;
646
+ padding: 0; }
647
+ .soliloquy-select .chosen-container-multi .chosen-drop .result-selected {
648
+ display: list-item;
649
+ color: #ccc;
650
+ cursor: default; }
651
+ .soliloquy-select .chosen-container-active .chosen-single {
652
+ border: 1px solid #dddddd; }
653
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single {
654
+ border: 1px solid #dddddd;
655
+ -moz-border-radius-bottomright: 0;
656
+ border-bottom-right-radius: 0;
657
+ -moz-border-radius-bottomleft: 0;
658
+ border-bottom-left-radius: 0;
659
+ background: white; }
660
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div {
661
+ border-left: 1px solid transparent;
662
+ background: transparent; }
663
+ .soliloquy-select .chosen-container-active.chosen-with-drop .chosen-single div b {
664
+ background-position: -18px 2px; }
665
+ .soliloquy-select .chosen-container-active .chosen-choices {
666
+ border: 1px solid #5897fb;
667
+ box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); }
668
+ .soliloquy-select .chosen-container-active .chosen-choices li.search-field input[type="text"] {
669
+ color: #222 !important; }
670
+ .soliloquy-select .chosen-disabled {
671
+ opacity: 0.5 !important;
672
+ cursor: default; }
673
+ .soliloquy-select .chosen-disabled .chosen-single {
674
+ cursor: default; }
675
+ .soliloquy-select .chosen-disabled .chosen-choices .search-choice .search-choice-close {
676
+ cursor: default; }
677
+ .soliloquy-select .chosen-rtl {
678
+ text-align: right; }
679
+ .soliloquy-select .chosen-rtl .chosen-single {
680
+ overflow: visible;
681
+ padding: 0 8px 0 0; }
682
+ .soliloquy-select .chosen-rtl .chosen-single span {
683
+ margin-right: 0;
684
+ margin-left: 26px;
685
+ direction: rtl; }
686
+ .soliloquy-select .chosen-rtl .chosen-single-with-deselect span {
687
+ margin-left: 38px; }
688
+ .soliloquy-select .chosen-rtl .chosen-single div {
689
+ right: auto;
690
+ left: 3px; }
691
+ .soliloquy-select .chosen-rtl .chosen-single abbr {
692
+ right: auto;
693
+ left: 26px; }
694
+ .soliloquy-select .chosen-rtl .chosen-choices li {
695
+ float: right; }
696
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-field input[type="text"] {
697
+ direction: rtl; }
698
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-choice {
699
+ margin: 3px 5px 3px 0;
700
+ padding: 3px 5px 3px 19px; }
701
+ .soliloquy-select .chosen-rtl .chosen-choices li.search-choice .search-choice-close {
702
+ right: auto;
703
+ left: 4px; }
704
+ .soliloquy-select .chosen-rtl.chosen-container-single-nosearch .chosen-search,
705
+ .soliloquy-select .chosen-rtl .chosen-drop {
706
+ left: 9999px; }
707
+ .soliloquy-select .chosen-rtl.chosen-container-single .chosen-results {
708
+ margin: 0 0 4px 4px;
709
+ padding: 0 4px 0 0; }
710
+ .soliloquy-select .chosen-rtl .chosen-results li.group-option {
711
+ padding-right: 15px;
712
+ padding-left: 0; }
713
+ .soliloquy-select .chosen-rtl.chosen-container-active.chosen-with-drop .chosen-single div {
714
+ border-right: none; }
715
+ .soliloquy-select .chosen-rtl .chosen-search input[type="text"] {
716
+ padding: 4px 5px 4px 20px;
717
+ background: white url("chosen-sprite.png") no-repeat -30px -20px;
718
+ background: url("chosen-sprite.png") no-repeat -30px -20px;
719
+ direction: rtl; }
720
+ .soliloquy-select .chosen-rtl.chosen-container-single .chosen-single div b {
721
+ background-position: 6px 2px; }
722
+ .soliloquy-select .chosen-rtl.chosen-container-single.chosen-with-drop .chosen-single div b {
723
+ background-position: -12px 2px; }
724
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi), only screen and (min-resolution: 1.5dppx) {
725
+ .soliloquy-select .chosen-rtl .chosen-search input[type="text"],
726
+ .soliloquy-select .chosen-container-single .chosen-single abbr,
727
+ .soliloquy-select .chosen-container-single .chosen-search input[type="text"],
728
+ .soliloquy-select .chosen-container-multi .chosen-choices .search-choice .search-choice-close,
729
+ .soliloquy-select .chosen-container .chosen-results-scroll-down span,
730
+ .soliloquy-select .chosen-container .chosen-results-scroll-up span {
731
+ background-image: none !important;
732
+ background-size: 52px 37px !important;
733
+ background-repeat: no-repeat !important; } }
734
+ .soliloquy-select select.soliloquy-chosen + .chosen-container.chosen-container-single .chosen-single {
735
+ padding-right: 35px; }
736
+
737
+ /* ==========================================================================
738
+ Settings Styles
739
+ ========================================================================== */
740
+ #soliloquy-tabs-nav {
741
+ background-color: white;
742
+ padding: 0;
743
+ margin: 0;
744
+ height: 50px;
745
+ box-sizing: border-box;
746
+ margin-left: -20px; }
747
+ #soliloquy-tabs-nav .nav-tab {
748
+ margin: 0;
749
+ background-color: white;
750
+ border: none;
751
+ line-height: 40px;
752
+ border-right: 1px solid #dddddd; }
753
+ #soliloquy-tabs-nav .nav-tab:first-child {
754
+ margin-left: 20px;
755
+ border-left: 1px solid #dddddd; }
756
+ #soliloquy-tabs-nav .nav-tab:focus {
757
+ outline-style: none;
758
+ box-shadow: none;
759
+ border-color: transparent; }
760
+ #soliloquy-tabs-nav .nav-tab-active {
761
+ background-color: #f1f1f1;
762
+ border: none; }
763
+
764
+ .soliloquy-settings-table tr {
765
+ border-bottom: 1px solid #dddddd; }
766
+ .soliloquy-settings-table tr th {
767
+ padding-top: 40px; }
768
+ .soliloquy-settings-table tr td {
769
+ padding: 40px 0; }
770
+
771
+ #soliloquy-settings .soliloquy {
772
+ margin: 15px 0 20px; }
773
+ #soliloquy-settings .soliloquy-tab {
774
+ display: none; }
775
+ #soliloquy-settings .soliloquy-tab.soliloquy-active {
776
+ display: block; }
777
+ #soliloquy-settings .soliloquy-tab th {
778
+ width: 210px;
779
+ padding-right: 0; }
780
+ #soliloquy-settings input[type="text"],
781
+ #soliloquy-settings input[type="number"],
782
+ #soliloquy-settings input[type="password"],
783
+ #soliloquy-settings select,
784
+ #soliloquy-settings textarea {
785
+ width: 350px;
786
+ padding-right: 0; }
787
+ #soliloquy-settings .soliloquy-clear {
788
+ clear: both; }
789
+ #soliloquy-settings .soliloquy-clear:after {
790
+ clear: both;
791
+ content: '.';
792
+ display: block;
793
+ height: 0;
794
+ line-height: 0;
795
+ overflow: auto;
796
+ visibility: hidden;
797
+ zoom: 1; }
798
+
799
+ #soliloquy-refresh-submit {
800
+ margin-top: -10px; }
801
+
802
+ .soliloquy-external-req {
803
+ border: 1px solid #ff3700;
804
+ border-radius: 3px;
805
+ padding: 30px; }
806
+ .soliloquy-external-req h2 {
807
+ font-size: 20px;
808
+ margin: 0;
809
+ padding: 0; }
810
+
811
+ .soliloquy-external-req-active {
812
+ border: 1px solid #72b63d;
813
+ background-color: white;
814
+ border-radius: 3px;
815
+ padding: 30px; }
816
+ .soliloquy-external-req-active h2 {
817
+ font-size: 20px;
818
+ font-weight: 600;
819
+ margin: 0;
820
+ padding: 0; }
assets/css/soliloquy.css CHANGED
@@ -1 +1,333 @@
1
- .soliloquy-container,.soliloquy-container *{background:none;border:0 none;border-radius:0;-webkit-border-radius:0;-moz-border-radius:0;float:none;font-size:100%;height:auto;letter-spacing:normal;list-style:none;outline:none;position:static;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;width:auto;visibility:visible;overflow:visible;margin:0;padding:0;line-height:1;box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-shadow:none;-moz-box-shadow:none;-ms-box-shadow:none;-o-box-shadow:none;box-shadow:none;-webkit-appearance:none}.soliloquy-container{position:relative;background:transparent url("images/preloader.gif") no-repeat scroll 50% 50%;z-index:0;width:100%;max-width:100%}.soliloquy-container:after{display:none;height:0;line-height:0;visibility:hidden;content:url("images/left.png") url("images/right.png") url("images/circle.png") url("images/circle-hover.png") url("images/pause.png") url("images/play.png") url("images/video.png")}.soliloquy-container .soliloquy-wrap{width:100%;position:relative;margin:0;padding:0;list-style:none !important;height:100%;zoom:1;*zoom:1}.soliloquy-container .soliloquy-viewport{-webkit-transform:translatez(0);-moz-transform:translatez(0);-ms-transform:translatez(0);-o-transform:translatez(0);transform:translatez(0)}.soliloquy-clear{clear:both}.soliloquy-clear:after{clear:both;content:'.';display:block;height:0;line-height:0;overflow:auto;visibility:hidden;zoom:1}.soliloquy-hide{display:none}.soliloquy-container a{outline:none}.soliloquy-container .soliloquy-wrapper,.soliloquy-container .soliloquy-item{width:100%;position:relative;margin:0;padding:0;list-style:none !important}.soliloquy-container .soliloquy-item{min-height:1px;min-width:1px;display:none}.no-js .soliloquy-container .soliloquy-slides>li:first-child{display:block}.soliloquy-container .soliloquy-item:after{content:'.';position:absolute;bottom:0;left:0;z-index:-1000;visibility:hidden;opacity:0;height:0;line-height:0}.soliloquy-container .soliloquy-item>a{display:block;outline:none;width:100%;position:relative;border:none}.soliloquy-container .soliloquy-image{max-width:100%;height:auto;display:block;margin:0 auto;-webkit-user-drag:none;-moz-user-select:none;-ms-user-select:none}.soliloquy-container .soliloquy-prev{display:block;width:32px;height:32px;position:absolute;top:50%;margin-top:-16px;left:10px;z-index:1320;background:rgba(0,0,0,0.7) url("images/left.png") no-repeat scroll 50% 50%}.soliloquy-container .soliloquy-next{display:block;width:32px;height:32px;position:absolute;top:50%;margin-top:-16px;right:10px;z-index:1320;background:rgba(0,0,0,0.7) url("images/right.png") no-repeat scroll 50% 50%}.soliloquy-container .soliloquy-prev.disabled,.soliloquy-container .soliloquy-next.disabled{cursor:default;pointer-events:none;opacity:0.3}.soliloquy-container .soliloquy-pager{width:100%;margin:0 auto;text-align:center;position:absolute;bottom:10px;height:14px}.soliloquy-container .soliloquy-pager-item{display:inline-block;margin:0 0 0 7px;position:relative;z-index:1320}.soliloquy-container .soliloquy-pager-item:first-child{margin-left:0}.soliloquy-container .soliloquy-pager-link{background:url("images/circle.png") no-repeat scroll 0 0;width:14px;height:14px;display:block;outline:none;text-indent:-9999px;text-decoration:none;border:none}.soliloquy-container .soliloquy-pager-link:hover,.soliloquy-container .soliloquy-pager-link.active{background-image:url("images/circle-hover.png")}.soliloquy-container .soliloquy-controls-auto-item{display:block;width:32px;height:32px;position:absolute;bottom:10px;right:10px;z-index:1220}.soliloquy-container .soliloquy-stop{display:block;width:32px;height:32px;background:rgba(0,0,0,0.7) url("images/pause.png") no-repeat scroll 50% 50%}.soliloquy-container .soliloquy-start{display:block;width:32px;height:32px;background:rgba(0,0,0,0.7) url("images/play.png") no-repeat scroll 50% 50%}.soliloquy-container .soliloquy-caption{position:absolute;bottom:0;left:0;width:100%;z-index:1120;background:rgba(0,0,0,0.5)}.soliloquy-container .soliloquy-caption-inside{font-size:1em;line-height:1.25;display:block;color:#fff;text-shadow:0 1px 1px #000;text-align:center;padding:10px}.soliloquy-container .soliloquy-caption-inside a{color:#fff}.soliloquy-container .soliloquy-controls{opacity:0}.soliloquy-container .soliloquy-video-icon{margin:0;padding:0;position:absolute;display:block;top:0;left:0;bottom:0;right:0;z-index:1200;background:transparent url("images/video.png") no-repeat scroll 50% 50%;width:100%;height:100%}.soliloquy-container .soliloquy-video-holder{margin:0;padding:0;position:absolute;display:none;top:0;left:0;bottom:0;right:0;z-index:1200;background:transparent;width:100%;height:100%}.soliloquy-container .soliloquy-html-content{position:absolute;width:100%;height:100%;top:0;left:0;bottom:0;right:0;z-index:1000}.soliloquy-fc-slider .soliloquy-caption{width:40%;right:52px;left:auto;bottom:34px;top:auto}.soliloquy-fc-slider .soliloquy-caption-inside{text-align:left}.soliloquy-fc-slider .soliloquy-caption-inside .soliloquy-fc-title,.soliloquy-fc-slider .soliloquy-caption-inside .soliloquy-fc-title-link{font-size:1.2em;font-weight:700;margin-bottom:1em;color:#fff}.soliloquy-fc-slider .soliloquy-caption-inside .soliloquy-fc-title-link{font-size:1em}.soliloquy-fc-slider .soliloquy-caption-inside .soliloquy-fc-read-more{font-weight:700;color:#fff}@media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx){.soliloquy-container{background-image:url("images/preloader@2x.gif");background-size:16px 16px}.soliloquy-container .soliloquy-prev{background-image:url("images/left@2x.png");background-size:10px 14px}.soliloquy-container .soliloquy-next{background-image:url("images/right@2x.png");background-size:10px 14px}.soliloquy-container .soliloquy-pager-link{background-image:url("images/circle@2x.png");background-size:14px 14px}.soliloquy-container .soliloquy-pager-link:hover,.soliloquy-container .soliloquy-pager-link.active{background-image:url("images/circle-hover@2x.png");background-size:14px 14px}.soliloquy-container .soliloquy-stop{background-image:url("images/pause@2x.png");background-size:9px 14px}.soliloquy-container .soliloquy-start{background-image:url("images/play@2x.png");background-size:14px 14px}.soliloquy-container .soliloquy-video-icon{background-image:url("images/video@2x.png");background-size:50px 50px}}@media (max-width: 600px){.soliloquy-container .soliloquy-pager,.soliloquy-container .soliloquy-caption,.soliloquy-container .soliloquy-controls-auto{display:none}}@media only screen and (max-width: 600px) and (-webkit-min-device-pixel-ratio: 2), only screen and (max-width: 600px) and (min--moz-device-pixel-ratio: 2), only screen and (max-width: 600px) and (-o-min-device-pixel-ratio: 2 / 1), only screen and (max-width: 600px) and (min-device-pixel-ratio: 2), only screen and (max-width: 600px) and (min-resolution: 192dpi), only screen and (max-width: 600px) and (min-resolution: 2dppx){.soliloquy-container .soliloquy-video-icon{background-image:url("images/video.png");background-size:25px 25px}}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .soliloquy-container,
2
+ .soliloquy-container * {
3
+ background: none;
4
+ border: 0 none;
5
+ border-radius: 0;
6
+ -webkit-border-radius: 0;
7
+ -moz-border-radius: 0;
8
+ float: none;
9
+ font-size: 100%;
10
+ height: auto;
11
+ letter-spacing: normal;
12
+ list-style: none;
13
+ outline: none;
14
+ position: static;
15
+ text-decoration: none;
16
+ text-indent: 0;
17
+ text-shadow: none;
18
+ text-transform: none;
19
+ width: auto;
20
+ visibility: visible;
21
+ overflow: visible;
22
+ margin: 0;
23
+ padding: 0;
24
+ line-height: 1;
25
+ box-sizing: border-box;
26
+ -webkit-box-sizing: border-box;
27
+ -moz-box-sizing: border-box;
28
+ -webkit-box-shadow: none;
29
+ -moz-box-shadow: none;
30
+ -ms-box-shadow: none;
31
+ -o-box-shadow: none;
32
+ box-shadow: none;
33
+ -webkit-appearance: none; }
34
+
35
+ .soliloquy-container {
36
+ position: relative;
37
+ background: transparent url("images/preloader.gif") no-repeat scroll 50% 50%;
38
+ z-index: 0;
39
+ width: 100%;
40
+ max-width: 100%; }
41
+
42
+ .soliloquy-container:after {
43
+ display: none;
44
+ height: 0;
45
+ line-height: 0;
46
+ visibility: hidden;
47
+ content: url("images/left.png") url("images/right.png") url("images/circle.png") url("images/circle-hover.png") url("images/pause.png") url("images/play.png") url("images/video.png"); }
48
+
49
+ .soliloquy-container .soliloquy-wrap {
50
+ width: 100%;
51
+ position: relative;
52
+ margin: 0;
53
+ padding: 0;
54
+ list-style: none !important;
55
+ height: 100%;
56
+ zoom: 1;
57
+ *zoom: 1; }
58
+
59
+ .soliloquy-container .soliloquy-viewport {
60
+ -webkit-transform: translatez(0);
61
+ -moz-transform: translatez(0);
62
+ -ms-transform: translatez(0);
63
+ -o-transform: translatez(0);
64
+ transform: translatez(0); }
65
+
66
+ .soliloquy-clear {
67
+ clear: both; }
68
+
69
+ .soliloquy-clear:after {
70
+ clear: both;
71
+ content: '.';
72
+ display: block;
73
+ height: 0;
74
+ line-height: 0;
75
+ overflow: auto;
76
+ visibility: hidden;
77
+ zoom: 1; }
78
+
79
+ .soliloquy-hide {
80
+ display: none; }
81
+
82
+ .soliloquy-container a {
83
+ outline: none; }
84
+
85
+ .soliloquy-container .soliloquy-wrapper,
86
+ .soliloquy-container .soliloquy-item {
87
+ width: 100%;
88
+ position: relative;
89
+ margin: 0;
90
+ padding: 0;
91
+ list-style: none !important; }
92
+
93
+ .soliloquy-container .soliloquy-item {
94
+ min-height: 1px;
95
+ min-width: 1px;
96
+ display: none; }
97
+
98
+ .no-js .soliloquy-container .soliloquy-slides > li:first-child {
99
+ display: block; }
100
+
101
+ .soliloquy-container .soliloquy-item:after {
102
+ content: '.';
103
+ position: absolute;
104
+ bottom: 0;
105
+ left: 0;
106
+ z-index: -1000;
107
+ visibility: hidden;
108
+ opacity: 0;
109
+ height: 0;
110
+ line-height: 0; }
111
+
112
+ .soliloquy-container .soliloquy-item > a {
113
+ display: block;
114
+ outline: none;
115
+ width: 100%;
116
+ position: relative;
117
+ border: none; }
118
+
119
+ .soliloquy-container .soliloquy-image {
120
+ max-width: 100%;
121
+ height: auto;
122
+ display: block;
123
+ margin: 0 auto;
124
+ -webkit-user-drag: none;
125
+ -moz-user-select: none;
126
+ -ms-user-select: none; }
127
+
128
+ .soliloquy-container .soliloquy-prev {
129
+ display: block;
130
+ width: 32px;
131
+ height: 32px;
132
+ position: absolute;
133
+ top: 50%;
134
+ margin-top: -16px;
135
+ left: 10px;
136
+ z-index: 1320;
137
+ background: rgba(0, 0, 0, 0.7) url("images/left.png") no-repeat scroll 50% 50%; }
138
+
139
+ .soliloquy-container .soliloquy-next {
140
+ display: block;
141
+ width: 32px;
142
+ height: 32px;
143
+ position: absolute;
144
+ top: 50%;
145
+ margin-top: -16px;
146
+ right: 10px;
147
+ z-index: 1320;
148
+ background: rgba(0, 0, 0, 0.7) url("images/right.png") no-repeat scroll 50% 50%; }
149
+
150
+ .soliloquy-container .soliloquy-prev.disabled,
151
+ .soliloquy-container .soliloquy-next.disabled {
152
+ cursor: default;
153
+ pointer-events: none;
154
+ opacity: 0.3; }
155
+
156
+ .soliloquy-container .soliloquy-pager {
157
+ width: 100%;
158
+ margin: 0 auto;
159
+ text-align: center;
160
+ position: absolute;
161
+ bottom: 10px;
162
+ height: 14px; }
163
+
164
+ .soliloquy-container .soliloquy-pager-item {
165
+ display: inline-block;
166
+ margin: 0 0 0 7px;
167
+ position: relative;
168
+ z-index: 1320; }
169
+
170
+ .soliloquy-container .soliloquy-pager-item:first-child {
171
+ margin-left: 0; }
172
+
173
+ .soliloquy-container .soliloquy-pager-link {
174
+ background: url("images/circle.png") no-repeat scroll 0 0;
175
+ width: 14px;
176
+ height: 14px;
177
+ display: block;
178
+ outline: none;
179
+ text-indent: -9999px;
180
+ text-decoration: none;
181
+ border: none; }
182
+
183
+ .soliloquy-container .soliloquy-pager-link:hover,
184
+ .soliloquy-container .soliloquy-pager-link.active {
185
+ background-image: url("images/circle-hover.png"); }
186
+
187
+ .soliloquy-container .soliloquy-controls-auto-item {
188
+ display: block;
189
+ width: 32px;
190
+ height: 32px;
191
+ position: absolute;
192
+ bottom: 10px;
193
+ right: 10px;
194
+ z-index: 1220; }
195
+
196
+ .soliloquy-container .soliloquy-stop {
197
+ display: block;
198
+ width: 32px;
199
+ height: 32px;
200
+ background: rgba(0, 0, 0, 0.7) url("images/pause.png") no-repeat scroll 50% 50%; }
201
+
202
+ .soliloquy-container .soliloquy-start {
203
+ display: block;
204
+ width: 32px;
205
+ height: 32px;
206
+ background: rgba(0, 0, 0, 0.7) url("images/play.png") no-repeat scroll 50% 50%; }
207
+
208
+ .soliloquy-container .soliloquy-caption {
209
+ position: absolute;
210
+ bottom: 0;
211
+ left: 0;
212
+ width: 100%;
213
+ z-index: 1120;
214
+ background: rgba(0, 0, 0, 0.5); }
215
+
216
+ .soliloquy-container .soliloquy-caption-inside {
217
+ font-size: 1em;
218
+ line-height: 1.25;
219
+ display: block;
220
+ color: #fff;
221
+ text-shadow: 0 1px 1px #000;
222
+ text-align: center;
223
+ padding: 10px; }
224
+
225
+ .soliloquy-container .soliloquy-caption-inside a {
226
+ color: #fff; }
227
+
228
+ .soliloquy-container .soliloquy-controls {
229
+ opacity: 0; }
230
+
231
+ /**
232
+ * RTL
233
+ */
234
+ .soliloquy-rtl {
235
+ /**
236
+ * Pager
237
+ * - add margin to first child
238
+ * - remove margin from last child
239
+ */
240
+ /**
241
+ * Direction Controls
242
+ * - swap left + right controls over
243
+ */
244
+ /**
245
+ * Thumbnails
246
+ * - float right so they display
247
+ */ }
248
+ .soliloquy-rtl .soliloquy-pager-item:first-child {
249
+ margin-left: 7px; }
250
+ .soliloquy-rtl .soliloquy-pager-item:last-child {
251
+ margin-left: 0; }
252
+ .soliloquy-rtl .soliloquy-next {
253
+ left: 10px;
254
+ right: auto;
255
+ background-image: url(images/left.png); }
256
+ .soliloquy-rtl .soliloquy-prev {
257
+ right: 10px;
258
+ left: auto;
259
+ background-image: url(images/right.png); }
260
+ .soliloquy-rtl .soliloquy-thumbnails-item {
261
+ float: right !important; }
262
+
263
+ .rtl {
264
+ /**
265
+ * Pager
266
+ * - add margin to first child
267
+ * - remove margin from last child
268
+ */
269
+ /**
270
+ * Direction Controls
271
+ * - swap left + right controls over
272
+ */
273
+ /**
274
+ * Thumbnails
275
+ * - float right so they display
276
+ */ }
277
+ .rtl .soliloquy-pager-item:first-child {
278
+ margin-left: 7px; }
279
+ .rtl .soliloquy-pager-item:last-child {
280
+ margin-left: 0; }
281
+ .rtl .soliloquy-next {
282
+ left: 10px;
283
+ right: auto;
284
+ background-image: url(images/left.png); }
285
+ .rtl .soliloquy-prev {
286
+ right: 10px;
287
+ left: auto;
288
+ background-image: url(images/right.png); }
289
+ .rtl .soliloquy-thumbnails-item {
290
+ float: right !important; }
291
+
292
+ @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) {
293
+ .soliloquy-container {
294
+ background-image: url("images/preloader@2x.gif");
295
+ background-size: 16px 16px; }
296
+
297
+ .soliloquy-container .soliloquy-prev {
298
+ background-image: url("images/left@2x.png");
299
+ background-size: 10px 14px; }
300
+
301
+ .soliloquy-container .soliloquy-next {
302
+ background-image: url("images/right@2x.png");
303
+ background-size: 10px 14px; }
304
+
305
+ .soliloquy-container .soliloquy-pager-link {
306
+ background-image: url("images/circle@2x.png");
307
+ background-size: 14px 14px; }
308
+
309
+ .soliloquy-container .soliloquy-pager-link:hover,
310
+ .soliloquy-container .soliloquy-pager-link.active {
311
+ background-image: url("images/circle-hover@2x.png");
312
+ background-size: 14px 14px; }
313
+
314
+ .soliloquy-container .soliloquy-stop {
315
+ background-image: url("images/pause@2x.png");
316
+ background-size: 9px 14px; }
317
+
318
+ .soliloquy-container .soliloquy-start {
319
+ background-image: url("images/play@2x.png");
320
+ background-size: 14px 14px; }
321
+
322
+ .soliloquy-container .soliloquy-video-icon {
323
+ background-image: url("images/video@2x.png");
324
+ background-size: 50px 50px; } }
325
+ @media (max-width: 600px) {
326
+ .soliloquy-container .soliloquy-pager,
327
+ .soliloquy-container .soliloquy-caption,
328
+ .soliloquy-container .soliloquy-controls-auto {
329
+ display: none; } }
330
+ @media only screen and (max-width: 600px) and (-webkit-min-device-pixel-ratio: 2), only screen and (max-width: 600px) and (min--moz-device-pixel-ratio: 2), only screen and (max-width: 600px) and (-o-min-device-pixel-ratio: 2 / 1), only screen and (max-width: 600px) and (min-device-pixel-ratio: 2), only screen and (max-width: 600px) and (min-resolution: 192dpi), only screen and (max-width: 600px) and (min-resolution: 2dppx) {
331
+ .soliloquy-container .soliloquy-video-icon {
332
+ background-image: url("images/video.png");
333
+ background-size: 25px 25px; } }
assets/fonts/soliloquy.eot ADDED
Binary file
assets/fonts/soliloquy.svg ADDED
@@ -0,0 +1 @@
 
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" ><svg xmlns="http://www.w3.org/2000/svg"><metadata>Generated by Glyphter</metadata><defs><font id="soliloquy" horiz-adv-x="0"><font-face units-per-em="1024" ascent="1024" descent="0" font-family="soliloquy" font-weight="normal" /><missing-glyph horiz-adv-x="0" /><glyph unicode="&#x0041;" d="M960,416C960,416,878.4,401.6,878.4,401.6C870.4,376,860.8,352,848,329.6C848,329.6,896,262.4,896,262.4C921.6,236.8,921.6,196.8,896,171.2C896,171.2,851.2,128,851.2,128C825.6,102.4,785.6,102.4,760,128C760,128,692.8,176,692.8,176C670.4,163.2,646.4,153.6,620.8,145.6C620.8,145.6,608,64,608,64C608,28.8,579.2,0,544,0C544,0,480,0,480,0C444.8,0,416,28.8,416,64C416,64,401.6,145.6,401.6,145.6C376,153.6,352,163.2,329.6,176C329.6,176,262.4,128,262.4,128C236.8,102.4,196.8,102.4,171.2,128C171.2,128,128,172.8,128,172.8C102.4,198.4,102.4,238.4,128,264C128,264,176,331.2,176,331.2C163.2,353.6,153.6,377.6,145.6,403.2C145.6,403.2,64,416,64,416C28.8,416,0,444.8,0,480C0,480,0,544,0,544C0,579.2,28.8,608,64,608C64,608,145.6,622.4,145.6,622.4C153.6,648,163.2,672,176,694.4C176,694.4,128,761.6,128,761.6C102.4,787.2,102.4,827.2,128,852.8C128,852.8,172.8,896,172.8,896C198.4,921.6,238.4,921.6,264,896C264,896,331.2,848,331.2,848C353.6,860.8,377.6,870.4,403.2,878.4C403.2,878.4,416,960,416,960C416,995.2,444.8,1024,480,1024C480,1024,544,1024,544,1024C579.2,1024,608,995.2,608,960C608,960,622.4,878.4,622.4,878.4C648,870.4,672,860.8,694.4,848C694.4,848,761.6,896,761.6,896C787.2,921.6,827.2,921.6,852.8,896C852.8,896,897.6,851.2,897.6,851.2C923.2,825.6,923.2,785.6,897.6,760C897.6,760,849.6,692.8,849.6,692.8C862.4,670.4,872,646.4,880,620.8C880,620.8,960,608,960,608C995.2,608,1024,579.2,1024,544C1024,544,1024,480,1024,480C1024,444.8,995.2,416,960,416C960,416,960,416,960,416M928,544C928,544,827.2,560,827.2,560C819.2,611.2,798.4,659.2,769.6,699.2C769.6,699.2,828.8,782.4,828.8,782.4C841.6,795.2,841.6,814.4,828.8,827.2C816,840,796.8,840,784,827.2C784,827.2,700.8,768,700.8,768C660.8,796.8,612.8,817.6,561.6,825.6C561.6,825.6,544,928,544,928C544,945.6,529.6,960,512,960C494.4,960,480,945.6,480,928C480,928,462.4,827.2,462.4,827.2C411.2,819.2,363.2,798.4,323.2,769.6C323.2,769.6,240,828.8,240,828.8C227.2,841.6,208,841.6,195.2,828.8C182.4,816,182.4,796.8,195.2,784C195.2,784,254.4,700.8,254.4,700.8C224,660.8,204.8,612.8,196.8,561.6C196.8,561.6,96,544,96,544C78.4,544,64,529.6,64,512C64,494.4,78.4,480,96,480C96,480,196.8,464,196.8,464C204.8,412.8,225.6,364.8,254.4,324.8C254.4,324.8,195.2,240,195.2,240C182.4,227.2,182.4,208,195.2,195.2C208,182.4,227.2,182.4,240,195.2C240,195.2,323.2,254.4,323.2,254.4C363.2,225.6,411.2,204.8,462.4,196.8C462.4,196.8,480,96,480,96C480,78.4,494.4,64,512,64C529.6,64,544,78.4,544,96C544,96,560,196.8,560,196.8C611.2,204.8,659.2,225.6,699.2,254.4C699.2,254.4,782.4,195.2,782.4,195.2C795.2,182.4,814.4,182.4,827.2,195.2C840,208,840,227.2,827.2,240C827.2,240,768,323.2,768,323.2C798.4,363.2,817.6,411.2,825.6,462.4C825.6,462.4,926.4,478.4,926.4,478.4C944,478.4,958.4,492.8,958.4,510.4C958.4,528,945.6,544,928,544C928,544,928,544,928,544M512,352C424,352,352,424,352,512C352,600,424,672,512,672C600,672,672,600,672,512C672,424,600,352,512,352C512,352,512,352,512,352M512,608C459.2,608,416,564.8,416,512C416,459.2,459.2,416,512,416C564.8,416,608,459.2,608,512C608,564.8,564.8,608,512,608C512,608,512,608,512,608" class="soliloquy-icon-configuration"/><glyph unicode="&#x0042;" d="M292.83,323.704C292.83,323.704,229.999,386.471,229.999,386.471C160.688,455.782,160.704,568.196,229.999,637.523C229.999,637.523,261.358,668.899,261.358,668.899C261.358,668.899,261.358,794.449,261.358,794.449C261.358,794.449,135.92,794.449,135.92,794.449C135.92,794.449,104.449,763.074,104.449,763.074C-34.158,624.403,-34.142,399.623,104.449,260.984C104.449,260.984,167.168,198.201,167.168,198.201C167.168,198.201,167.136,323.72,167.136,323.72C167.136,323.72,292.83,323.72,292.83,323.72C292.83,323.72,292.83,323.704,292.83,323.704M700.76,292.328C700.76,292.328,637.977,229.529,637.977,229.529C568.666,160.266,456.204,160.266,386.957,229.545C386.957,229.545,355.533,260.952,355.533,260.952C355.533,260.952,229.999,260.952,229.999,260.952C229.999,260.952,230.015,135.37,230.015,135.37C230.015,135.37,261.358,104.027,261.358,104.027C400.061,-34.676,624.873,-34.676,763.48,104.027C763.48,104.027,826.247,166.762,826.247,166.762C826.247,166.762,700.76,166.762,700.76,166.762C700.76,166.762,700.76,292.328,700.76,292.328C700.76,292.328,700.76,292.328,700.76,292.328M732.12,700.29C732.12,700.29,794.903,637.539,794.903,637.539C864.182,568.196,864.182,455.782,794.903,386.455C794.903,386.455,763.48,355.095,763.48,355.095C763.48,355.095,763.512,229.545,763.512,229.545C763.512,229.545,889.046,229.529,889.046,229.529C889.046,229.529,920.421,260.936,920.421,260.936C1059.092,399.607,1059.124,624.387,920.421,763.074C920.421,763.074,857.686,825.793,857.686,825.793C857.686,825.793,857.67,700.274,857.67,700.274C857.67,700.274,732.12,700.29,732.12,700.29C732.12,700.29,732.12,700.29,732.12,700.29M261.342,919.983C261.342,919.983,198.607,857.232,198.607,857.232C198.607,857.232,324.078,857.232,324.078,857.232C324.078,857.232,324.094,731.714,324.094,731.714C324.094,731.714,386.957,794.449,386.957,794.449C456.188,863.76,568.666,863.776,637.961,794.465C637.961,794.465,669.337,763.09,669.337,763.09C669.337,763.09,794.903,763.09,794.903,763.09C794.903,763.09,794.903,888.64,794.903,888.64C794.903,888.64,763.48,919.999,763.48,919.999C624.857,1058.67,400.045,1058.67,261.342,919.983C261.342,919.983,261.342,919.983,261.342,919.983" class="soliloquy-icon-soliloquy"/><glyph unicode="&#x0043;" d="M536.954,1024.5C730.179,1024.5,906.182,891.573,906.182,687.882C906.182,496.506,808.352,284.179,590.498,284.179C538.802,284.179,473.565,310.019,448.347,358.035C401.574,172.808,405.27,145.104,301.879,3.575C301.879,3.575,293.261,0.5,293.261,0.5C293.261,0.5,287.717,6.633,287.717,6.633C284.021,45.409,278.493,83.579,278.493,122.322C278.493,247.89,336.338,429.404,364.647,551.259C349.257,582.643,344.956,620.797,344.956,655.256C344.956,717.418,388.033,796.179,458.176,796.179C509.872,796.179,537.559,756.799,537.559,708.178C537.559,628.173,483.394,553.107,483.394,475.572C483.394,422.65,527.093,385.722,578.167,385.722C719.696,385.722,763.394,590.035,763.394,698.954C763.394,844.8,660.019,924.184,520.322,924.184C357.86,924.184,232.325,807.268,232.325,642.336C232.325,562.953,280.93,522.345,280.93,503.26C280.93,487.266,269.236,430.631,248.925,430.631C245.85,430.631,241.532,431.874,238.458,432.479C150.505,458.989,118.5,576.51,118.5,657.12C118.5,884.198,326.492,1024.5,536.954,1024.5C536.954,1024.5,536.954,1024.5,536.954,1024.5" class="soliloquy-icon-pinterest"/><glyph unicode="&#x0044;" d="M64,128C64,128,64,832,64,832C64,832,0,832,0,832C0,832,0,128,0,128C0,57.6,60.8,0,136,0C136,0,896,0,896,0C896,0,896,64,896,64C896,64,132.8,64,132.8,64C94.4,64,64,92.8,64,128C64,128,64,128,64,128M864,896C864,896,288,896,288,896C270.4,896,256,881.6,256,864C256,864,256,352,256,352C256,334.4,270.4,320,288,320C288,320,864,320,864,320C881.6,320,896,334.4,896,352C896,352,896,864,896,864C896,881.6,881.6,896,864,896C864,896,864,896,864,896M832,416C832,398.4,817.6,384,800,384C800,384,352,384,352,384C334.4,384,320,398.4,320,416C320,416,320,800,320,800C320,817.6,334.4,832,352,832C352,832,800,832,800,832C817.6,832,832,817.6,832,800C832,800,832,416,832,416C832,416,832,416,832,416M960,1024C960,1024,192,1024,192,1024C156.8,1024,128,995.2,128,960C128,960,128,192,128,192C128,156.8,156.8,128,192,128C192,128,960,128,960,128C995.2,128,1024,156.8,1024,192C1024,192,1024,960,1024,960C1024,995.2,995.2,1024,960,1024C960,1024,960,1024,960,1024M960,224C960,206.4,945.6,192,928,192C928,192,224,192,224,192C206.4,192,192,206.4,192,224C192,224,192,928,192,928C192,945.6,206.4,960,224,960C224,960,928,960,928,960C945.6,960,960,945.6,960,928C960,928,960,224,960,224C960,224,960,224,960,224" class="soliloquy-icon-lightbox"/><glyph unicode="&#x0045;" d="M991.932,835.643C991.932,835.643,849.542,693.253,849.542,693.253C849.542,693.253,719.951,720.451,719.951,720.451C719.951,720.451,694.352,850.042,694.352,850.042C694.352,850.042,835.143,992.432,835.143,992.432C790.346,1013.231,740.749,1024.43,691.153,1024.43C607.958,1024.43,523.164,992.432,459.169,928.436C367.975,837.243,342.377,704.452,380.774,589.26C380.774,589.26,43.197,251.683,43.197,251.683C-14.399,194.087,-14.399,101.293,43.197,43.697C71.995,14.899,108.793,0.5,147.19,0.5C185.587,0.5,222.385,14.899,251.183,43.697C251.183,43.697,588.76,381.274,588.76,381.274C623.957,370.075,659.155,363.675,695.952,363.675C780.746,363.675,863.941,395.673,927.936,459.669C1030.329,562.062,1049.528,712.451,991.932,835.643C991.932,835.643,991.932,835.643,991.932,835.643M876.74,512.465C828.743,464.468,764.748,437.27,695.952,437.27C667.154,437.27,639.956,442.07,612.758,450.069C612.758,450.069,569.561,464.468,569.561,464.468C569.561,464.468,537.563,432.47,537.563,432.47C537.563,432.47,199.986,94.894,199.986,94.894C185.587,80.495,167.988,72.495,147.19,72.495C127.991,72.495,108.793,80.495,94.394,94.894C79.995,109.293,71.995,126.891,71.995,147.69C71.995,166.889,79.995,186.087,94.394,200.486C94.394,200.486,431.97,538.063,431.97,538.063C431.97,538.063,463.968,570.061,463.968,570.061C463.968,570.061,449.569,613.258,449.569,613.258C417.571,707.652,441.57,808.445,510.365,877.24C558.362,925.237,622.357,952.435,691.153,952.435C691.153,952.435,641.556,902.838,641.556,902.838C641.556,902.838,614.358,875.64,614.358,875.64C614.358,875.64,622.357,837.243,622.357,837.243C622.357,837.243,647.956,707.652,647.956,707.652C647.956,707.652,657.555,659.655,657.555,659.655C657.555,659.655,705.552,650.055,705.552,650.055C705.552,650.055,835.143,624.457,835.143,624.457C835.143,624.457,873.54,616.458,873.54,616.458C873.54,616.458,900.738,643.656,900.738,643.656C900.738,643.656,950.335,693.253,950.335,693.253C950.335,626.057,924.737,560.462,876.74,512.465C876.74,512.465,876.74,512.465,876.74,512.465" class="soliloquy-icon-misc"/><glyph unicode="&#x0046;" d="M704,1024C704,1024,320,1024,320,1024C249.6,1024,192,966.4,192,896C192,896,192,128,192,128C192,57.6,249.6,0,320,0C320,0,704,0,704,0C774.4,0,832,57.6,832,128C832,128,832,896,832,896C832,966.4,774.4,1024,704,1024C704,1024,704,1024,704,1024M768,128C768,92.8,739.2,64,704,64C704,64,320,64,320,64C284.8,64,256,92.8,256,128C256,128,256,320,256,320C256,320,768,320,768,320C768,320,768,128,768,128C768,128,768,128,768,128M768,384C768,384,256,384,256,384C256,384,256,768,256,768C256,768,768,768,768,768C768,768,768,384,768,384C768,384,768,384,768,384M768,832C768,832,256,832,256,832C256,832,256,896,256,896C256,931.2,284.8,960,320,960C320,960,704,960,704,960C739.2,960,768,931.2,768,896C768,896,768,832,768,832C768,832,768,832,768,832M512,128C547.2,128,576,156.8,576,192C576,227.2,547.2,256,512,256C476.8,256,448,227.2,448,192C448,156.8,476.8,128,512,128C512,128,512,128,512,128" class="soliloquy-icon-mobile"/><glyph unicode="&#x0047;" d="M416,960C416,960,416,1024,416,1024C416,1024,1024,1024,1024,1024C1024,1024,1024,960,1024,960C1024,960,416,960,416,960C416,960,416,960,416,960C416,960,416,960,416,960M640,720C640,720,640,784,640,784C640,784,896,784,896,784C896,784,896,720,896,720C896,720,640,720,640,720C640,720,640,720,640,720C640,720,640,720,640,720M640,592C640,592,640,656,640,656C640,656,896,656,896,656C896,656,896,592,896,592C896,592,640,592,640,592C640,592,640,592,640,592C640,592,640,592,640,592M640,464C640,464,640,528,640,528C640,528,896,528,896,528C896,528,896,464,896,464C896,464,640,464,640,464C640,464,640,464,640,464C640,464,640,464,640,464M608,224C608,224,608,288,608,288C608,288,1024,288,1024,288C1024,288,1024,224,1024,224C1024,224,608,224,608,224C608,224,608,224,608,224C608,224,608,224,608,224M960,288C960,288,960,960,960,960C960,960,1024,960,1024,960C1024,960,1024,288,1024,288C1024,288,960,288,960,288C960,288,960,288,960,288C960,288,960,288,960,288M416,800C416,800,416,960,416,960C416,960,480,960,480,960C480,960,480,800,480,800C480,800,416,800,416,800C416,800,416,800,416,800C416,800,416,800,416,800M0,736C0,736,0,800,0,800C0,800,608,800,608,800C608,800,608,736,608,736C608,736,0,736,0,736C0,736,0,736,0,736C0,736,0,736,0,736M128,496C128,496,128,560,128,560C128,560,480,560,480,560C480,560,480,496,480,496C480,496,128,496,128,496C128,496,128,496,128,496C128,496,128,496,128,496M128,368C128,368,128,432,128,432C128,432,480,432,480,432C480,432,480,368,480,368C480,368,128,368,128,368C128,368,128,368,128,368C128,368,128,368,128,368M128,240C128,240,128,304,128,304C128,304,480,304,480,304C480,304,480,240,480,240C480,240,128,240,128,240C128,240,128,240,128,240C128,240,128,240,128,240M0,0C0,0,0,64,0,64C0,64,608,64,608,64C608,64,608,0,608,0C608,0,0,0,0,0C0,0,0,0,0,0C0,0,0,0,0,0M544,64C544,64,544,736,544,736C544,736,608,736,608,736C608,736,608,64,608,64C608,64,544,64,544,64C544,64,544,64,544,64C544,64,544,64,544,64M0,64C0,64,0,736,0,736C0,736,64,736,64,736C64,736,64,64,64,64C64,64,0,64,0,64C0,64,0,64,0,64C0,64,0,64,0,64" class="soliloquy-icon-pagination"/><glyph unicode="&#x0048;" d="M969.6,0C969.6,0,198.4,0,198.4,0C168,0,144,24,144,54.4C144,54.4,144,192,144,192C144,193.6,144,195.2,144,196.8C144,196.8,144,825.6,144,825.6C144,856,168,880,198.4,880C198.4,880,968,880,968,880C998.4,880,1022.4,856,1022.4,825.6C1022.4,825.6,1022.4,56,1022.4,56C1024,24,1000,0,969.6,0C969.6,0,969.6,0,969.6,0M198.4,83.2C198.4,68.8,211.2,56,225.6,56C225.6,56,713.6,56,713.6,56C713.6,56,440,371.2,440,371.2C440,371.2,198.4,176,198.4,176C198.4,176,198.4,83.2,198.4,83.2C198.4,83.2,198.4,83.2,198.4,83.2M969.6,796.8C969.6,811.2,956.8,824,942.4,824C942.4,824,227.2,824,227.2,824C212.8,824,200,811.2,200,796.8C200,796.8,200,251.2,200,251.2C200,251.2,420.8,432,420.8,432C425.6,435.2,430.4,436.8,435.2,438.4C436.8,438.4,436.8,438.4,438.4,440C440,440,443.2,441.6,444.8,441.6C452.8,443.2,462.4,440,467.2,433.6C467.2,433.6,552,334.4,552,334.4C552,334.4,809.6,544,809.6,544C816,550.4,824,552,832,550.4C841.6,550.4,849.6,548.8,857.6,544C857.6,544,969.6,422.4,969.6,422.4C969.6,422.4,969.6,796.8,969.6,796.8C969.6,796.8,969.6,796.8,969.6,796.8M969.6,337.6C968,337.6,968,337.6,969.6,337.6C969.6,337.6,828.8,488,828.8,488C828.8,488,587.2,291.2,587.2,291.2C587.2,291.2,792,54.4,792,54.4C792,54.4,940.8,54.4,940.8,54.4C955.2,54.4,968,67.2,968,81.6C968,81.6,968,337.6,968,337.6C968,337.6,969.6,337.6,969.6,337.6M364.8,550.4C304,550.4,254.4,600,254.4,660.8C254.4,721.6,304,771.2,364.8,771.2C425.6,771.2,475.2,721.6,475.2,660.8C473.6,600,425.6,550.4,364.8,550.4C364.8,550.4,364.8,550.4,364.8,550.4M364.8,715.2C334.4,715.2,310.4,691.2,310.4,660.8C310.4,630.4,334.4,606.4,364.8,606.4C395.2,606.4,419.2,630.4,419.2,660.8C419.2,689.6,395.2,715.2,364.8,715.2C364.8,715.2,364.8,715.2,364.8,715.2M256,960C256,960,192,960,192,960C192,960,192,1024,192,1024C192,1024,256,1024,256,1024C256,1024,256,960,256,960C256,960,256,960,256,960M448,960C448,960,384,960,384,960C384,960,384,1024,384,1024C384,1024,448,1024,448,1024C448,1024,448,960,448,960C448,960,448,960,448,960M640,960C640,960,576,960,576,960C576,960,576,1024,576,1024C576,1024,640,1024,640,1024C640,1024,640,960,640,960C640,960,640,960,640,960M832,960C832,960,768,960,768,960C768,960,768,1024,768,1024C768,1024,832,1024,832,1024C832,1024,832,960,832,960C832,960,832,960,832,960M1024,960C1024,960,960,960,960,960C960,960,960,1024,960,1024C960,1024,1024,1024,1024,1024C1024,1024,1024,960,1024,960C1024,960,1024,960,1024,960M64,960C64,960,0,960,0,960C0,960,0,1024,0,1024C0,1024,64,1024,64,1024C64,1024,64,960,64,960C64,960,64,960,64,960M64,768C64,768,0,768,0,768C0,768,0,832,0,832C0,832,64,832,64,832C64,832,64,768,64,768C64,768,64,768,64,768M64,576C64,576,0,576,0,576C0,576,0,640,0,640C0,640,64,640,64,640C64,640,64,576,64,576C64,576,64,576,64,576M64,384C64,384,0,384,0,384C0,384,0,448,0,448C0,448,64,448,64,448C64,448,64,384,64,384C64,384,64,384,64,384M64,192C64,192,0,192,0,192C0,192,0,256,0,256C0,256,64,256,64,256C64,256,64,192,64,192C64,192,64,192,64,192M64,0C64,0,0,0,0,0C0,0,0,64,0,64C0,64,64,64,64,64C64,64,64,0,64,0C64,0,64,0,64,0" class="soliloquy-icon-proofing"/><glyph unicode="&#x0049;" d="M992,960.654C992,960.654,32,960.654,32,960.654C14.4,960.654,0,946.254,0,928.654C0,911.054,14.4,896.654,32,896.654C32,896.654,64,896.654,64,896.654C64,896.654,64,320.654,64,320.654C64,285.454,92.8,256.654,128,256.654C128,256.654,404.8,256.654,404.8,256.654C404.8,256.654,324.8,109.454,324.8,109.454C315.2,95.054,321.6,75.854,337.6,67.854C355.2,59.854,376,64.654,385.6,79.054C385.6,79.054,475.2,242.254,475.2,242.254C478.4,247.054,480,250.254,480,255.054C480,255.054,544,255.054,544,255.054C544,250.254,545.6,245.454,548.8,242.254C548.8,242.254,638.4,79.054,638.4,79.054C648,64.654,670.4,59.854,686.4,67.854C704,75.854,708.8,95.054,699.2,109.454C699.2,109.454,619.2,256.654,619.2,256.654C619.2,256.654,896,256.654,896,256.654C931.2,256.654,960,285.454,960,320.654C960,320.654,960,896.654,960,896.654C960,896.654,992,896.654,992,896.654C1009.6,896.654,1024,911.054,1024,928.654C1024,946.254,1009.6,960.654,992,960.654C992,960.654,992,960.654,992,960.654M896,832.654C896,832.654,896,832.654,896,832.654C896,832.654,896,352.654,896,352.654C896,335.054,881.6,320.654,864,320.654C864,320.654,160,320.654,160,320.654C142.4,320.654,128,335.054,128,352.654C128,352.654,128,864.654,128,864.654C128,864.654,128,864.654,128,864.654C128,864.654,128,896.654,128,896.654C128,896.654,160,896.654,160,896.654C160,896.654,160,896.654,160,896.654C160,896.654,864,896.654,864,896.654C864,896.654,864,896.654,864,896.654C864,896.654,896,896.654,896,896.654C896,896.654,896,832.654,896,832.654C896,832.654,896,832.654,896,832.654M816,770.254C800,779.854,780.8,773.454,772.8,759.054C772.8,759.054,574.4,578.254,574.4,578.254C574.4,578.254,417.6,690.254,417.6,690.254C409.6,701.454,393.6,707.854,379.2,704.654C376,704.654,374.4,703.054,371.2,703.054C371.2,703.054,369.6,703.054,369.6,703.054C369.6,703.054,368,703.054,368,701.454C366.4,699.854,363.2,698.254,361.6,696.654C360,695.054,358.4,693.454,356.8,691.854C356.8,691.854,356.8,691.854,355.2,690.254C355.2,690.254,195.2,498.254,195.2,498.254C185.6,482.254,192,463.054,206.4,453.454C220.8,443.854,241.6,450.254,249.6,464.654C249.6,464.654,390.4,632.654,390.4,632.654C390.4,632.654,539.2,527.054,539.2,527.054C542.4,522.254,547.2,519.054,553.6,515.854C555.2,514.254,555.2,511.054,558.4,509.454C574.4,501.454,593.6,506.254,601.6,520.654C601.6,520.654,825.6,725.454,825.6,725.454C836.8,743.054,832,762.254,816,770.254C816,770.254,816,770.254,816,770.254" class="soliloquy-icon-slideshow"/><glyph unicode="&#x004a;" d="M195.829,420.092C195.829,420.092,420.092,195.829,420.092,195.829C420.092,195.829,464.945,240.682,464.945,240.682C464.945,240.682,240.682,464.945,240.682,464.945C240.682,464.945,195.829,420.092,195.829,420.092C195.829,420.092,195.829,420.092,195.829,420.092M532.224,1024C532.224,1024,18.021,509.797,18.021,509.797C-6.007,485.769,-6.007,445.722,18.021,420.092C18.021,420.092,420.092,18.021,420.092,18.021C444.12,-6.007,484.167,-6.007,509.797,18.021C509.797,18.021,1024,532.224,1024,532.224C1024,532.224,1024,1024,1024,1024C1024,1024,532.224,1024,532.224,1024C532.224,1024,532.224,1024,532.224,1024M956.721,554.65C956.721,554.65,487.371,83.698,487.371,83.698C474.556,70.883,455.334,70.883,442.519,83.698C442.519,83.698,83.698,442.519,83.698,442.519C70.883,455.334,70.883,474.556,83.698,487.371C83.698,487.371,554.65,956.721,554.65,956.721C554.65,956.721,959.925,959.925,959.925,959.925C959.925,959.925,956.721,554.65,956.721,554.65C956.721,554.65,956.721,554.65,956.721,554.65M859.007,676.393C908.665,726.051,908.665,807.747,859.007,857.405C809.348,907.063,727.653,907.063,677.995,857.405C628.336,807.747,628.336,726.051,677.995,676.393C726.051,626.734,807.747,626.734,859.007,676.393C859.007,676.393,859.007,676.393,859.007,676.393M722.847,814.154C748.477,839.784,788.524,839.784,814.154,814.154C839.784,788.524,839.784,748.477,814.154,722.847C788.524,697.217,748.477,697.217,722.847,722.847C697.217,748.477,697.217,788.524,722.847,814.154C722.847,814.154,722.847,814.154,722.847,814.154" class="soliloquy-icon-tags"/><glyph unicode="&#x004b;" d="M960,1024C960,1024,64,1024,64,1024C28.8,1024,0,995.2,0,960C0,960,0,228.8,0,228.8C0,227.2,0,225.6,0,224C0,224,0,64,0,64C0,28.8,28.8,0,64,0C64,0,960,0,960,0C995.2,0,1024,28.8,1024,64C1024,64,1024,960,1024,960C1024,995.2,995.2,1024,960,1024C960,1024,960,1024,960,1024M96,64C78.4,64,64,78.4,64,96C64,96,64,204.8,64,204.8C64,204.8,345.6,432,345.6,432C345.6,432,664,64,664,64C664,64,96,64,96,64C96,64,96,64,96,64M960,96C960,78.4,945.6,64,928,64C928,64,755.2,64,755.2,64C755.2,64,516.8,339.2,516.8,339.2C516.8,339.2,796.8,568,796.8,568C796.8,568,958.4,392,958.4,392C958.4,392,958.4,392,960,392C960,392,960,96,960,96C960,96,960,96,960,96M960,491.2C960,491.2,830.4,632,830.4,632C822.4,638.4,811.2,640,800,640C790.4,640,780.8,638.4,774.4,632C774.4,632,475.2,387.2,475.2,387.2C475.2,387.2,376,502.4,376,502.4C368,510.4,358.4,513.6,348.8,512C345.6,512,344,510.4,340.8,510.4C339.2,510.4,339.2,510.4,337.6,508.8C331.2,507.2,324.8,507.2,320,502.4C320,502.4,64,292.8,64,292.8C64,292.8,64,928,64,928C64,945.6,78.4,960,96,960C96,960,928,960,928,960C945.6,960,960,945.6,960,928C960,928,960,491.2,960,491.2C960,491.2,960,491.2,960,491.2M256,896C185.6,896,128,838.4,128,768C128,697.6,185.6,640,256,640C326.4,640,384,697.6,384,768C384,838.4,326.4,896,256,896C256,896,256,896,256,896M256,704C220.8,704,192,732.8,192,768C192,803.2,220.8,832,256,832C291.2,832,320,803.2,320,768C320,732.8,291.2,704,256,704C256,704,256,704,256,704" class="soliloquy-icon-thumbnails"/><glyph unicode="&#x004c;" d="M992,768C992,768,768,619.2,768,619.2C768,619.2,768,704,768,704C768,774.4,710.4,832,640,832C640,832,128,832,128,832C57.6,832,0,774.4,0,704C0,704,0,320,0,320C0,249.6,57.6,192,128,192C128,192,640,192,640,192C710.4,192,768,249.6,768,320C768,320,768,404.8,768,404.8C768,404.8,992,256,992,256C1009.6,256,1024,270.4,1024,288C1024,288,1024,736,1024,736C1024,753.6,1009.6,768,992,768C992,768,992,768,992,768M704,320C704,284.8,675.2,256,640,256C640,256,128,256,128,256C92.8,256,64,284.8,64,320C64,320,64,704,64,704C64,739.2,92.8,768,128,768C128,768,640,768,640,768C675.2,768,704,739.2,704,704C704,704,704,320,704,320C704,320,704,320,704,320M960,353.6C960,353.6,768,481.6,768,481.6C768,481.6,768,540.8,768,540.8C768,540.8,960,668.8,960,668.8C960,668.8,960,353.6,960,353.6C960,353.6,960,353.6,960,353.6" class="soliloquy-icon-video"/><glyph unicode="&#x004d;" d="M800,640C800,640,800,736,800,736C800,894.4,670.4,1024,512,1024C353.6,1024,224,894.4,224,736C224,736,224,640,224,640C224,640,224,640,224,640C153.6,640,96,582.4,96,512C96,512,96,128,96,128C96,57.6,153.6,0,224,0C224,0,800,0,800,0C870.4,0,928,57.6,928,128C928,128,928,512,928,512C928,582.4,870.4,640,800,640C800,640,800,640,800,640M288,736C288,859.2,388.8,960,512,960C635.2,960,736,859.2,736,736C736,736,736,640,736,640C736,640,288,640,288,640C288,640,288,736,288,736C288,736,288,736,288,736M864,128C864,92.8,835.2,64,800,64C800,64,224,64,224,64C188.8,64,160,92.8,160,128C160,128,160,512,160,512C160,547.2,188.8,576,224,576C224,576,800,576,800,576C835.2,576,864,547.2,864,512C864,512,864,128,864,128C864,128,864,128,864,128M512,448C494.4,448,480,433.6,480,416C480,416,480,224,480,224C480,206.4,494.4,192,512,192C529.6,192,544,206.4,544,224C544,224,544,416,544,416C544,433.6,529.6,448,512,448C512,448,512,448,512,448" class="soliloquy-icon-watermark"/><glyph unicode="&#x004e;" d="M682.667,461.267C682.667,466.244,681.067,470.333,677.867,473.533C674.667,476.733,670.578,478.333,665.6,478.333C665.6,478.333,546.133,478.333,546.133,478.333C546.133,478.333,546.133,666.067,546.133,666.067C546.133,670.689,544.444,674.689,541.067,678.067C537.689,681.444,533.689,683.133,529.067,683.133C529.067,683.133,426.667,683.133,426.667,683.133C422.044,683.133,418.044,681.444,414.667,678.067C411.289,674.689,409.6,670.689,409.6,666.067C409.6,666.067,409.6,478.333,409.6,478.333C409.6,478.333,290.133,478.333,290.133,478.333C285.511,478.333,281.511,476.644,278.133,473.267C274.756,469.889,273.067,465.889,273.067,461.267C273.067,456.289,274.667,452.2,277.867,449C277.867,449,465.6,261.267,465.6,261.267C468.8,258.067,472.889,256.467,477.867,256.467C482.844,256.467,486.933,258.067,490.133,261.267C490.133,261.267,677.333,448.467,677.333,448.467C680.889,452.733,682.667,457,682.667,461.267C682.667,461.267,682.667,461.267,682.667,461.267M1024,341.8C1024,285.267,1004,237,964,197C924,157,875.733,137,819.2,137C819.2,137,238.933,137,238.933,137C173.156,137,116.889,160.378,70.133,207.133C23.378,253.889,0,310.156,0,375.933C0,422.156,12.444,464.822,37.333,503.933C62.222,543.044,95.644,572.378,137.6,591.933C136.889,602.6,136.533,610.244,136.533,614.867C136.533,690.244,163.2,754.6,216.533,807.933C269.867,861.267,334.222,887.933,409.6,887.933C465.067,887.933,515.822,872.467,561.867,841.533C607.911,810.6,641.422,769.533,662.4,718.333C687.644,740.378,717.156,751.4,750.933,751.4C788.622,751.4,820.8,738.067,847.467,711.4C874.133,684.733,887.467,652.556,887.467,614.867C887.467,587.844,880.178,563.311,865.6,541.267C911.822,530.244,949.778,506.156,979.467,469C1009.156,431.844,1024,389.444,1024,341.8C1024,341.8,1024,341.8,1024,341.8" class="soliloquy-icon-cloud-download"/><glyph unicode="&#x004f;" d="M0,512C0,555.333,8.5,596.75,25.5,636.25C42.5,675.75,65.25,709.75,93.75,738.25C122.25,766.75,156.25,789.5,195.75,806.5C235.25,823.5,276.667,832,320,832C320,832,704,832,704,832C747.333,832,788.75,823.5,828.25,806.5C867.75,789.5,901.75,766.75,930.25,738.25C958.75,709.75,981.5,675.75,998.5,636.25C1015.5,596.75,1024,555.333,1024,512C1024,468.667,1015.5,427.25,998.5,387.75C981.5,348.25,958.75,314.25,930.25,285.75C901.75,257.25,867.75,234.5,828.25,217.5C788.75,200.5,747.333,192,704,192C704,192,320,192,320,192C276.667,192,235.25,200.5,195.75,217.5C156.25,234.5,122.25,257.25,93.75,285.75C65.25,314.25,42.5,348.25,25.5,387.75C8.5,427.25,0,468.667,0,512C0,512,0,512,0,512M704,256C738.667,256,771.75,262.75,803.25,276.25C834.75,289.75,862,308,885,331C908,354,926.25,381.25,939.75,412.75C953.25,444.25,960,477.333,960,512C960,546.667,953.25,579.75,939.75,611.25C926.25,642.75,908,670,885,693C862,716,834.75,734.25,803.25,747.75C771.75,761.25,738.667,768,704,768C669.333,768,636.25,761.25,604.75,747.75C573.25,734.25,546,716,523,693C500,670,481.75,642.75,468.25,611.25C454.75,579.75,448,546.667,448,512C448,477.333,454.75,444.25,468.25,412.75C481.75,381.25,500,354,523,331C546,308,573.25,289.75,604.75,276.25C636.25,262.75,669.333,256,704,256C704,256,704,256,704,256" class="soliloquy-icon-toggle-on"/><glyph unicode="&#x0050;" d="M810.667,469.333C810.667,469.333,810.667,554.667,810.667,554.667C810.667,566.222,806.445,576.222,798,584.667C789.555,593.111,779.555,597.333,768,597.333C768,597.333,597.333,597.333,597.333,597.333C597.333,597.333,597.333,768,597.333,768C597.333,779.555,593.111,789.555,584.667,798C576.222,806.445,566.222,810.667,554.667,810.667C554.667,810.667,469.333,810.667,469.333,810.667C457.778,810.667,447.778,806.445,439.333,798C430.889,789.555,426.667,779.555,426.667,768C426.667,768,426.667,597.333,426.667,597.333C426.667,597.333,256,597.333,256,597.333C244.445,597.333,234.445,593.111,226,584.667C217.555,576.222,213.333,566.222,213.333,554.667C213.333,554.667,213.333,469.333,213.333,469.333C213.333,457.778,217.555,447.778,226,439.333C234.445,430.889,244.445,426.667,256,426.667C256,426.667,426.667,426.667,426.667,426.667C426.667,426.667,426.667,256,426.667,256C426.667,244.445,430.889,234.445,439.333,226C447.778,217.555,457.778,213.333,469.333,213.333C469.333,213.333,554.667,213.333,554.667,213.333C566.222,213.333,576.222,217.555,584.667,226C593.111,234.445,597.333,244.445,597.333,256C597.333,256,597.333,426.667,597.333,426.667C597.333,426.667,768,426.667,768,426.667C779.555,426.667,789.555,430.889,798,439.333C806.445,447.778,810.667,457.778,810.667,469.333C810.667,469.333,810.667,469.333,810.667,469.333M1024,512C1024,419.111,1001.111,333.445,955.333,255C909.555,176.555,847.445,114.445,769,68.667C690.555,22.889,604.889,0,512,0C419.111,0,333.445,22.889,255,68.667C176.555,114.445,114.445,176.555,68.667,255C22.889,333.445,0,419.111,0,512C0,604.889,22.889,690.555,68.667,769C114.445,847.445,176.555,909.555,255,955.333C333.445,1001.111,419.111,1024,512,1024C604.889,1024,690.555,1001.111,769,955.333C847.445,909.555,909.555,847.445,955.333,769C1001.111,690.555,1024,604.889,1024,512C1024,512,1024,512,1024,512" class="soliloquy-icon-plus-circle"/><glyph unicode="&#x0051;" d="M1024,957.296C1024,957.296,0,957.435,0,957.435C0,957.435,512,67,512,67C512,67,1024,957.296,1024,957.296" /><glyph unicode="&#x0052;" d="M292.553,274.581C292.553,274.581,292.553,164.85,292.553,164.85C292.553,149.617,287.209,136.657,276.553,126.001C265.896,115.344,252.936,110,237.703,110C237.703,110,54.85,110,54.85,110C39.617,110,26.657,115.344,16.001,126.001C5.344,136.657,0,149.617,0,164.85C0,164.85,0,274.581,0,274.581C0,289.814,5.344,302.774,16.001,313.43C26.657,324.087,39.617,329.431,54.85,329.431C54.85,329.431,237.703,329.431,237.703,329.431C252.936,329.431,265.896,324.087,276.553,313.43C287.209,302.774,292.553,289.814,292.553,274.581C292.553,274.581,292.553,274.581,292.553,274.581M292.553,567.166C292.553,567.166,292.553,457.435,292.553,457.435C292.553,442.202,287.209,429.242,276.553,418.586C265.896,407.929,252.936,402.585,237.703,402.585C237.703,402.585,54.85,402.585,54.85,402.585C39.617,402.585,26.657,407.929,16.001,418.586C5.344,429.242,0,442.202,0,457.435C0,457.435,0,567.166,0,567.166C0,582.399,5.344,595.359,16.001,606.016C26.657,616.672,39.617,622.016,54.85,622.016C54.85,622.016,237.703,622.016,237.703,622.016C252.936,622.016,265.896,616.672,276.553,606.016C287.209,595.359,292.553,582.399,292.553,567.166C292.553,567.166,292.553,567.166,292.553,567.166M1024,274.581C1024,274.581,1024,164.85,1024,164.85C1024,149.617,1018.656,136.657,1007.999,126.001C997.343,115.344,984.383,110,969.15,110C969.15,110,420.557,110,420.557,110C405.325,110,392.364,115.344,381.708,126.001C371.052,136.657,365.707,149.617,365.707,164.85C365.707,164.85,365.707,274.581,365.707,274.581C365.707,289.814,371.052,302.774,381.708,313.43C392.364,324.087,405.325,329.431,420.557,329.431C420.557,329.431,969.15,329.431,969.15,329.431C984.383,329.431,997.343,324.087,1007.999,313.43C1018.656,302.774,1024,289.814,1024,274.581C1024,274.581,1024,274.581,1024,274.581M292.553,859.751C292.553,859.751,292.553,750.02,292.553,750.02C292.553,734.788,287.209,721.827,276.553,711.171C265.896,700.514,252.936,695.17,237.703,695.17C237.703,695.17,54.85,695.17,54.85,695.17C39.617,695.17,26.657,700.514,16.001,711.171C5.344,721.827,0,734.788,0,750.02C0,750.02,0,859.751,0,859.751C0,874.984,5.344,887.944,16.001,898.601C26.657,909.257,39.617,914.601,54.85,914.601C54.85,914.601,237.703,914.601,237.703,914.601C252.936,914.601,265.896,909.257,276.553,898.601C287.209,887.944,292.553,874.984,292.553,859.751C292.553,859.751,292.553,859.751,292.553,859.751M1024,567.166C1024,567.166,1024,457.435,1024,457.435C1024,442.202,1018.656,429.242,1007.999,418.586C997.343,407.929,984.383,402.585,969.15,402.585C969.15,402.585,420.557,402.585,420.557,402.585C405.325,402.585,392.364,407.929,381.708,418.586C371.052,429.242,365.707,442.202,365.707,457.435C365.707,457.435,365.707,567.166,365.707,567.166C365.707,582.399,371.052,595.359,381.708,606.016C392.364,616.672,405.325,622.016,420.557,622.016C420.557,622.016,969.15,622.016,969.15,622.016C984.383,622.016,997.343,616.672,1007.999,606.016C1018.656,595.359,1024,582.399,1024,567.166C1024,567.166,1024,567.166,1024,567.166M1024,859.751C1024,859.751,1024,750.02,1024,750.02C1024,734.788,1018.656,721.827,1007.999,711.171C997.343,700.514,984.383,695.17,969.15,695.17C969.15,695.17,420.557,695.17,420.557,695.17C405.325,695.17,392.364,700.514,381.708,711.171C371.052,721.827,365.707,734.788,365.707,750.02C365.707,750.02,365.707,859.751,365.707,859.751C365.707,874.984,371.052,887.944,381.708,898.601C392.364,909.257,405.325,914.601,420.557,914.601C420.557,914.601,969.15,914.601,969.15,914.601C984.383,914.601,997.343,909.257,1007.999,898.601C1018.656,887.944,1024,874.984,1024,859.751C1024,859.751,1024,859.751,1024,859.751" class="soliloquy-icon-list"/><glyph unicode="&#x0053;" d="M292.553,274.581C292.553,274.581,292.553,164.85,292.553,164.85C292.553,149.617,287.209,136.657,276.553,126.001C265.896,115.344,252.936,110,237.703,110C237.703,110,54.85,110,54.85,110C39.617,110,26.657,115.344,16.001,126.001C5.344,136.657,0,149.617,0,164.85C0,164.85,0,274.581,0,274.581C0,289.814,5.344,302.774,16.001,313.43C26.657,324.087,39.617,329.431,54.85,329.431C54.85,329.431,237.703,329.431,237.703,329.431C252.936,329.431,265.896,324.087,276.553,313.43C287.209,302.774,292.553,289.814,292.553,274.581C292.553,274.581,292.553,274.581,292.553,274.581M292.553,567.166C292.553,567.166,292.553,457.435,292.553,457.435C292.553,442.202,287.209,429.242,276.553,418.586C265.896,407.929,252.936,402.585,237.703,402.585C237.703,402.585,54.85,402.585,54.85,402.585C39.617,402.585,26.657,407.929,16.001,418.586C5.344,429.242,0,442.202,0,457.435C0,457.435,0,567.166,0,567.166C0,582.399,5.344,595.359,16.001,606.016C26.657,616.672,39.617,622.016,54.85,622.016C54.85,622.016,237.703,622.016,237.703,622.016C252.936,622.016,265.896,616.672,276.553,606.016C287.209,595.359,292.553,582.399,292.553,567.166C292.553,567.166,292.553,567.166,292.553,567.166M658.261,274.581C658.261,274.581,658.261,164.85,658.261,164.85C658.261,149.617,652.916,136.657,642.26,126.001C631.604,115.344,618.643,110,603.411,110C603.411,110,420.557,110,420.557,110C405.325,110,392.364,115.344,381.708,126.001C371.052,136.657,365.707,149.617,365.707,164.85C365.707,164.85,365.707,274.581,365.707,274.581C365.707,289.814,371.052,302.774,381.708,313.43C392.364,324.087,405.325,329.431,420.557,329.431C420.557,329.431,603.411,329.431,603.411,329.431C618.643,329.431,631.604,324.087,642.26,313.43C652.916,302.774,658.261,289.814,658.261,274.581C658.261,274.581,658.261,274.581,658.261,274.581M292.553,859.751C292.553,859.751,292.553,750.02,292.553,750.02C292.553,734.788,287.209,721.827,276.553,711.171C265.896,700.514,252.936,695.17,237.703,695.17C237.703,695.17,54.85,695.17,54.85,695.17C39.617,695.17,26.657,700.514,16.001,711.171C5.344,721.827,0,734.788,0,750.02C0,750.02,0,859.751,0,859.751C0,874.984,5.344,887.944,16.001,898.601C26.657,909.257,39.617,914.601,54.85,914.601C54.85,914.601,237.703,914.601,237.703,914.601C252.936,914.601,265.896,909.257,276.553,898.601C287.209,887.944,292.553,874.984,292.553,859.751C292.553,859.751,292.553,859.751,292.553,859.751M658.261,567.166C658.261,567.166,658.261,457.435,658.261,457.435C658.261,442.202,652.916,429.242,642.26,418.586C631.604,407.929,618.643,402.585,603.411,402.585C603.411,402.585,420.557,402.585,420.557,402.585C405.325,402.585,392.364,407.929,381.708,418.586C371.052,429.242,365.707,442.202,365.707,457.435C365.707,457.435,365.707,567.166,365.707,567.166C365.707,582.399,371.052,595.359,381.708,606.016C392.364,616.672,405.325,622.016,420.557,622.016C420.557,622.016,603.411,622.016,603.411,622.016C618.643,622.016,631.604,616.672,642.26,606.016C652.916,595.359,658.261,582.399,658.261,567.166C658.261,567.166,658.261,567.166,658.261,567.166M1024,274.581C1024,274.581,1024,164.85,1024,164.85C1024,149.617,1018.656,136.657,1007.999,126.001C997.343,115.344,984.383,110,969.15,110C969.15,110,786.297,110,786.297,110C771.064,110,758.104,115.344,747.447,126.001C736.791,136.657,731.447,149.617,731.447,164.85C731.447,164.85,731.447,274.581,731.447,274.581C731.447,289.814,736.791,302.774,747.447,313.43C758.104,324.087,771.064,329.431,786.297,329.431C786.297,329.431,969.15,329.431,969.15,329.431C984.383,329.431,997.343,324.087,1007.999,313.43C1018.656,302.774,1024,289.814,1024,274.581C1024,274.581,1024,274.581,1024,274.581M658.261,859.751C658.261,859.751,658.261,750.02,658.261,750.02C658.261,734.788,652.916,721.827,642.26,711.171C631.604,700.514,618.643,695.17,603.411,695.17C603.411,695.17,420.557,695.17,420.557,695.17C405.325,695.17,392.364,700.514,381.708,711.171C371.052,721.827,365.707,734.788,365.707,750.02C365.707,750.02,365.707,859.751,365.707,859.751C365.707,874.984,371.052,887.944,381.708,898.601C392.364,909.257,405.325,914.601,420.557,914.601C420.557,914.601,603.411,914.601,603.411,914.601C618.643,914.601,631.604,909.257,642.26,898.601C652.916,887.944,658.261,874.984,658.261,859.751C658.261,859.751,658.261,859.751,658.261,859.751M1024,567.166C1024,567.166,1024,457.435,1024,457.435C1024,442.202,1018.656,429.242,1007.999,418.586C997.343,407.929,984.383,402.585,969.15,402.585C969.15,402.585,786.297,402.585,786.297,402.585C771.064,402.585,758.104,407.929,747.447,418.586C736.791,429.242,731.447,442.202,731.447,457.435C731.447,457.435,731.447,567.166,731.447,567.166C731.447,582.399,736.791,595.359,747.447,606.016C758.104,616.672,771.064,622.016,786.297,622.016C786.297,622.016,969.15,622.016,969.15,622.016C984.383,622.016,997.343,616.672,1007.999,606.016C1018.656,595.359,1024,582.399,1024,567.166C1024,567.166,1024,567.166,1024,567.166M1024,859.751C1024,859.751,1024,750.02,1024,750.02C1024,734.788,1018.656,721.827,1007.999,711.171C997.343,700.514,984.383,695.17,969.15,695.17C969.15,695.17,786.297,695.17,786.297,695.17C771.064,695.17,758.104,700.514,747.447,711.171C736.791,721.827,731.447,734.788,731.447,750.02C731.447,750.02,731.447,859.751,731.447,859.751C731.447,874.984,736.791,887.944,747.447,898.601C758.104,909.257,771.064,914.601,786.297,914.601C786.297,914.601,969.15,914.601,969.15,914.601C984.383,914.601,997.343,909.257,1007.999,898.601C1018.656,887.944,1024,874.984,1024,859.751C1024,859.751,1024,859.751,1024,859.751" class="soliloquy-icon-grid"/><glyph unicode="&#x0055;" d="M245.354,86.516C245.354,86.516,306.862,148.024,306.862,148.024C306.862,148.024,148.024,306.862,148.024,306.862C148.024,306.862,86.516,245.354,86.516,245.354C86.516,245.354,86.516,173.032,86.516,173.032C86.516,173.032,173.032,173.032,173.032,173.032C173.032,173.032,173.032,86.516,173.032,86.516C173.032,86.516,245.354,86.516,245.354,86.516C245.354,86.516,245.354,86.516,245.354,86.516M598.854,713.758C598.854,723.672,593.898,728.628,583.984,728.628C579.478,728.628,575.648,727.051,572.494,723.897C572.494,723.897,206.152,357.555,206.152,357.555C202.997,354.401,201.42,350.571,201.42,346.065C201.42,336.151,206.377,331.195,216.29,331.195C220.797,331.195,224.626,332.772,227.781,335.926C227.781,335.926,594.123,702.268,594.123,702.268C597.277,705.422,598.854,709.252,598.854,713.758C598.854,713.758,598.854,713.758,598.854,713.758M562.355,843.533C562.355,843.533,843.533,562.355,843.533,562.355C843.533,562.355,281.178,0,281.178,0C281.178,0,0,0,0,0C0,0,0,281.178,0,281.178C0,281.178,562.355,843.533,562.355,843.533M1024,778.646C1024,754.764,1015.664,734.486,998.991,717.814C998.991,717.814,886.791,605.613,886.791,605.613C886.791,605.613,605.613,886.791,605.613,886.791C605.613,886.791,717.814,998.316,717.814,998.316C734.036,1015.438,754.313,1024,778.646,1024C802.527,1024,823.03,1015.438,840.153,998.316C840.153,998.316,998.991,840.153,998.991,840.153C1015.664,822.58,1024,802.077,1024,778.646C1024,778.646,1024,778.646,1024,778.646" class="soliloquy-icon-pencil"/><glyph unicode="&#x0056;" d="M1024.5,200.473C1024.5,177.487,1016.455,157.95,1000.365,141.86C1000.365,141.86,883.14,24.635,883.14,24.635C867.05,8.545,847.513,0.5,824.527,0.5C801.541,0.5,782.004,8.545,765.914,24.635C765.914,24.635,512.5,278.049,512.5,278.049C512.5,278.049,259.086,24.635,259.086,24.635C242.996,8.545,223.459,0.5,200.473,0.5C177.487,0.5,157.95,8.545,141.86,24.635C141.86,24.635,24.635,141.86,24.635,141.86C8.545,157.95,0.5,177.487,0.5,200.473C0.5,223.459,8.545,242.996,24.635,259.086C24.635,259.086,278.049,512.5,278.049,512.5C278.049,512.5,24.635,765.914,24.635,765.914C8.545,782.004,0.5,801.541,0.5,824.527C0.5,847.513,8.545,867.05,24.635,883.14C24.635,883.14,141.86,1000.365,141.86,1000.365C157.95,1016.455,177.487,1024.5,200.473,1024.5C223.459,1024.5,242.996,1016.455,259.086,1000.365C259.086,1000.365,512.5,746.951,512.5,746.951C512.5,746.951,765.914,1000.365,765.914,1000.365C782.004,1016.455,801.541,1024.5,824.527,1024.5C847.513,1024.5,867.05,1016.455,883.14,1000.365C883.14,1000.365,1000.365,883.14,1000.365,883.14C1016.455,867.05,1024.5,847.513,1024.5,824.527C1024.5,801.541,1016.455,782.004,1000.365,765.914C1000.365,765.914,746.951,512.5,746.951,512.5C746.951,512.5,1000.365,259.086,1000.365,259.086C1016.455,242.996,1024.5,223.459,1024.5,200.473C1024.5,200.473,1024.5,200.473,1024.5,200.473" class="soliloquy-icon-close"/><glyph unicode="&#x0057;" d="M1024,751.577C1024,733.959,1017.834,718.985,1005.502,706.653C1005.502,706.653,527.195,228.346,527.195,228.346C527.195,228.346,437.347,138.498,437.347,138.498C425.015,126.166,410.041,120,392.423,120C374.806,120,359.832,126.166,347.499,138.498C347.499,138.498,257.652,228.346,257.652,228.346C257.652,228.346,18.498,467.499,18.498,467.499C6.166,479.832,0,494.806,0,512.423C0,530.041,6.166,545.015,18.498,557.347C18.498,557.347,108.346,647.195,108.346,647.195C120.678,659.527,135.652,665.693,153.27,665.693C170.887,665.693,185.861,659.527,198.194,647.195C198.194,647.195,392.423,452.305,392.423,452.305C392.423,452.305,825.806,886.348,825.806,886.348C838.139,898.681,853.113,904.846,870.73,904.846C888.348,904.846,903.322,898.681,915.654,886.348C915.654,886.348,1005.502,796.501,1005.502,796.501C1017.834,784.168,1024,769.194,1024,751.577C1024,751.577,1024,751.577,1024,751.577" class="soliloquy-icon-check"/><glyph unicode="&#x0058;" d="M927.988,0C927.988,0,96.006,0,96.006,0C60.675,0,32,28.659,32,63.99C32,63.99,32,703.954,32,703.954C32,703.954,32,767.96,32,767.96C32,767.96,32,895.972,32,895.972C32,931.319,60.659,959.978,96.006,959.978C96.006,959.978,288.008,959.978,288.008,959.978C288.008,959.978,288.008,1024,288.008,1024C288.008,1024,352.014,1024,352.014,1024C352.014,1024,352.014,959.978,352.014,959.978C352.014,959.978,672.028,959.978,672.028,959.978C672.028,959.978,672.028,1024,672.028,1024C672.028,1024,736.018,1024,736.018,1024C736.018,1024,736.018,959.978,736.018,959.978C736.018,959.978,960.023,959.978,960.023,959.978C995.37,959.978,992.026,931.319,992.026,895.972C992.026,895.972,992.026,767.944,992.026,767.944C992.026,767.944,992.026,703.938,992.026,703.938C992.026,703.938,992.026,63.974,992.026,63.974C992.01,28.659,963.351,0,927.988,0C927.988,0,927.988,0,927.988,0M927.988,863.953C927.988,881.699,913.651,895.972,895.985,895.972C895.985,895.972,736.002,895.972,736.002,895.972C736.002,895.972,736.002,831.95,736.002,831.95C736.002,831.95,672.012,831.95,672.012,831.95C672.012,831.95,672.012,895.972,672.012,895.972C672.012,895.972,351.998,895.972,351.998,895.972C351.998,895.972,351.998,831.95,351.998,831.95C351.998,831.95,287.992,831.95,287.992,831.95C287.992,831.95,287.992,895.972,287.992,895.972C287.992,895.972,128.025,895.972,128.025,895.972C110.343,895.972,96.006,881.699,96.006,863.953C96.006,863.953,96.006,767.944,96.006,767.944C96.006,767.944,928.004,767.944,928.004,767.944C928.004,767.944,928.004,863.953,928.004,863.953C928.004,863.953,927.988,863.953,927.988,863.953M927.988,703.954C927.988,703.954,96.006,703.954,96.006,703.954C96.006,703.954,96.006,96.025,96.006,96.025C96.006,78.311,110.343,63.99,128.025,63.99C128.025,63.99,896.001,63.99,896.001,63.99C913.667,63.99,928.004,78.311,928.004,96.025C928.004,96.025,928.004,703.954,928.004,703.954C928.004,703.954,927.988,703.954,927.988,703.954M672.012,320.014C672.012,320.014,863.998,320.014,863.998,320.014C863.998,320.014,863.998,127.996,863.998,127.996C863.998,127.996,672.012,127.996,672.012,127.996C672.012,127.996,672.012,320.014,672.012,320.014C672.012,320.014,672.012,320.014,672.012,320.014M736.002,191.97C736.002,191.97,799.992,191.97,799.992,191.97C799.992,191.97,799.992,256.04,799.992,256.04C799.992,256.04,736.002,256.04,736.002,256.04C736.002,256.04,736.002,191.97,736.002,191.97C736.002,191.97,736.002,191.97,736.002,191.97M672.012,575.958C672.012,575.958,863.998,575.958,863.998,575.958C863.998,575.958,863.998,384.02,863.998,384.02C863.998,384.02,672.012,384.02,672.012,384.02C672.012,384.02,672.012,575.958,672.012,575.958C672.012,575.958,672.012,575.958,672.012,575.958M736.002,447.994C736.002,447.994,799.992,447.994,799.992,447.994C799.992,447.994,799.992,512,799.992,512C799.992,512,736.002,512,736.002,512C736.002,512,736.002,447.994,736.002,447.994C736.002,447.994,736.002,447.994,736.002,447.994M415.988,320.014C415.988,320.014,607.99,320.014,607.99,320.014C607.99,320.014,607.99,127.996,607.99,127.996C607.99,127.996,415.988,127.996,415.988,127.996C415.988,127.996,415.988,320.014,415.988,320.014C415.988,320.014,415.988,320.014,415.988,320.014M479.994,191.97C479.994,191.97,544,191.97,544,191.97C544,191.97,544,256.04,544,256.04C544,256.04,479.994,256.04,479.994,256.04C479.994,256.04,479.994,191.97,479.994,191.97C479.994,191.97,479.994,191.97,479.994,191.97M415.988,575.958C415.988,575.958,607.99,575.958,607.99,575.958C607.99,575.958,607.99,384.02,607.99,384.02C607.99,384.02,415.988,384.02,415.988,384.02C415.988,384.02,415.988,575.958,415.988,575.958C415.988,575.958,415.988,575.958,415.988,575.958M479.994,447.994C479.994,447.994,544,447.994,544,447.994C544,447.994,544,512,544,512C544,512,479.994,512,479.994,512C479.994,512,479.994,447.994,479.994,447.994C479.994,447.994,479.994,447.994,479.994,447.994M160.028,320.014C160.028,320.014,352.014,320.014,352.014,320.014C352.014,320.014,352.014,127.996,352.014,127.996C352.014,127.996,160.028,127.996,160.028,127.996C160.028,127.996,160.028,320.014,160.028,320.014C160.028,320.014,160.028,320.014,160.028,320.014M224.002,191.97C224.002,191.97,288.008,191.97,288.008,191.97C288.008,191.97,288.008,256.04,288.008,256.04C288.008,256.04,224.002,256.04,224.002,256.04C224.002,256.04,224.002,191.97,224.002,191.97C224.002,191.97,224.002,191.97,224.002,191.97M160.028,575.958C160.028,575.958,352.014,575.958,352.014,575.958C352.014,575.958,352.014,384.02,352.014,384.02C352.014,384.02,160.028,384.02,160.028,384.02C160.028,384.02,160.028,575.958,160.028,575.958C160.028,575.958,160.028,575.958,160.028,575.958M224.002,447.994C224.002,447.994,288.008,447.994,288.008,447.994C288.008,447.994,288.008,512,288.008,512C288.008,512,224.002,512,224.002,512C224.002,512,224.002,447.994,224.002,447.994C224.002,447.994,224.002,447.994,224.002,447.994" class="soliloquy-icon-schedule"/><glyph unicode="&#x0059;" d="M827.008,152.5C827.008,152.5,197.088,152.5,197.088,152.5C172.192,152.5,152.096,172.772,152.096,197.492C152.096,197.492,152.096,309.412,152.096,309.412C151.952,310.724,151.952,311.94,152.096,313.316C152.096,313.316,152.096,827.412,152.096,827.412C152.096,852.228,172.176,872.388,197.088,872.388C197.088,872.388,826.992,872.388,826.992,872.388C851.76,872.388,871.984,852.228,871.984,827.412C871.984,827.412,871.984,197.492,871.984,197.492C872,172.772,851.76,152.5,827.008,152.5C827.008,152.5,827.008,152.5,827.008,152.5M197.088,219.956C197.088,207.62,207.152,197.492,219.6,197.492C219.6,197.492,618.592,197.492,618.592,197.492C618.592,197.492,394.48,456.708,394.48,456.708C394.48,456.708,197.088,296.02,197.088,296.02C197.088,296.02,197.088,219.956,197.088,219.956C197.088,219.956,197.088,219.956,197.088,219.956M827.008,804.9C827.008,817.316,816.912,827.396,804.528,827.396C804.528,827.396,219.616,827.396,219.616,827.396C207.168,827.396,197.104,817.316,197.104,804.9C197.104,804.9,197.104,358.804,197.104,358.804C197.104,358.804,377.872,505.94,377.872,505.94C381.232,508.98,385.728,509.556,389.984,510.516C390.656,510.852,391.312,511.012,391.984,511.268C393.84,511.604,395.312,512.42,397.184,512.356C403.968,513.06,410.944,511.012,416.096,505.444C416.096,505.444,486.128,424.532,486.128,424.532C486.128,424.532,696.48,596.5,696.48,596.5C701.584,601.124,708.224,602.644,714.944,602.084C722.288,602.644,729.792,601.172,735.456,596.66C735.456,596.66,826.992,497.62,826.992,497.62C826.992,497.62,826.992,804.9,826.992,804.9C826.992,804.9,827.008,804.9,827.008,804.9M827.008,428.628C826.8,428.804,826.352,428.74,826.288,428.9C826.288,428.9,712.368,552.084,712.368,552.084C712.368,552.084,515.2,390.964,515.2,390.964C515.2,390.964,682.528,197.492,682.528,197.492C682.528,197.492,804.528,197.492,804.528,197.492C816.912,197.492,827.008,207.62,827.008,219.956C827.008,219.956,827.008,428.628,827.008,428.628C827.008,428.628,827.008,428.628,827.008,428.628M332.08,602.436C282.352,602.436,242.08,642.756,242.08,692.42C242.08,742.18,282.352,782.436,332.08,782.436C381.744,782.436,422.032,742.18,422.032,692.42C422.032,642.756,381.744,602.436,332.08,602.436C332.08,602.436,332.08,602.436,332.08,602.436M332.08,737.332C307.216,737.332,287.088,717.236,287.088,692.34C287.088,667.508,307.216,647.348,332.08,647.348C356.912,647.348,377.056,667.524,377.056,692.34C377.056,717.236,356.928,737.332,332.08,737.332C332.08,737.332,332.08,737.332,332.08,737.332M976,512.42C976.08,511.172,975.6,509.924,974.688,508.948C974.416,508.74,974.08,508.804,973.872,508.628C973.872,508.628,914.848,455.316,914.848,455.316C913.056,453.492,910.016,453.492,908.224,455.316C906.336,457.124,906.336,460.068,908.224,461.876C908.224,461.876,964.16,512.436,964.16,512.436C964.16,512.436,908.224,562.996,908.224,562.996C906.32,564.804,906.32,567.748,908.224,569.572C910.016,571.38,913.056,571.38,914.848,569.572C914.848,569.572,973.856,516.26,973.856,516.26C974.064,516.084,974.416,516.148,974.688,515.924C975.632,514.964,976.08,513.684,976,512.42C976,512.42,976,512.42,976,512.42M1024,232.436C1024,214.772,1009.664,200.436,992,200.436C992,200.436,864,200.436,864,200.436C846.336,200.436,832,214.772,832,232.436C832,232.436,832,792.436,832,792.436C832,810.1,846.336,824.436,864,824.436C864,824.436,992,824.436,992,824.436C1009.664,824.436,1024,810.1,1024,792.436C1024,792.436,1024,232.436,1024,232.436C1024,232.436,1024,232.436,1024,232.436M192,232.436C192,214.772,177.664,200.436,160,200.436C160,200.436,32,200.436,32,200.436C14.336,200.436,0,214.772,0,232.436C0,232.436,0,792.436,0,792.436C0,810.1,14.336,824.436,32,824.436C32,824.436,160,824.436,160,824.436C177.664,824.436,192,810.1,192,792.436C192,792.436,192,232.436,192,232.436C192,232.436,192,232.436,192,232.436" class="soliloquy-icon-carousel"/></font></defs></svg>
assets/fonts/soliloquy.ttf ADDED
Binary file
assets/fonts/soliloquy.woff ADDED
Binary file
assets/images/fc.png ADDED
Binary file
assets/images/html.png ADDED
Binary file
assets/images/instagram.png ADDED
Binary file
assets/images/logo-color.png ADDED
Binary file
assets/images/soliloquy-logo.png ADDED
Binary file
assets/images/video.png ADDED
Binary file
assets/images/vimeo.png ADDED
Binary file
assets/images/wistia.png ADDED
Binary file
assets/images/woo.png ADDED
Binary file
assets/images/youtube.png ADDED
Binary file
assets/js/addons.js ADDED
@@ -0,0 +1,432 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* global soliloquy_addons, ajaxurl */
2
+ /* exported e */
3
+ /*jshint unused:false*/
4
+ /* ==========================================================
5
+ * settings.js
6
+ * https://soliloquywp.com/
7
+ * ==========================================================
8
+ * Copyright 2014 Thomas Griffin.
9
+ *
10
+ * Licensed under the GPL License, Version 2.0 or later (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * http://www.gnu.org/licenses/gpl-2.0.html
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" BASIS,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ * ========================================================== */
22
+ // jshint ignore:line
23
+ ;(function($, window, document, soliloquy_addons) {
24
+
25
+ //DOM Ready
26
+ $(function() {
27
+
28
+ //Create the Select boxes
29
+ $('.soliloquy-chosen').each(function() {
30
+
31
+ $(this).chosen({
32
+ disable_search: true
33
+ });
34
+
35
+ });
36
+
37
+ //Sort Filter for addons
38
+ $('#soliloquy-addon-filter').on('change', function() {
39
+
40
+ var $select = $(this),
41
+ $value = $select.val(),
42
+ $container = $('#soliloquy-addons-area'),
43
+ container_data = $container.data('soliloquy-filter'),
44
+ $addon = $('#soliloquy-addons-area .soliloquy-addon');
45
+
46
+ //Make sure the addons are visible.
47
+ $addon.show();
48
+
49
+ switch ($value) {
50
+
51
+ case 'asc':
52
+
53
+ $addon.sort(function(a, b) {
54
+
55
+ return $(a).data('addon-title').localeCompare($(b).data('addon-title'));
56
+
57
+ }).each(function(_, addon) {
58
+
59
+ $(addon).removeClass('last');
60
+
61
+ $container.append(addon).hide().fadeIn(100);
62
+
63
+ });
64
+
65
+ $("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass('last');
66
+
67
+ break;
68
+ case 'desc':
69
+
70
+ $addon.sort(function(a, b) {
71
+
72
+ return $(b).data('addon-title').localeCompare($(a).data('addon-title'));
73
+
74
+ }).each(function(_, addon) {
75
+
76
+ $(addon).removeClass('last');
77
+ $container.append(addon).hide().fadeIn(100);
78
+
79
+ });
80
+
81
+ $("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass('last');
82
+
83
+ break;
84
+ case 'active':
85
+
86
+ $addon.hide().filter('[data-addon-status="active"]').show();
87
+
88
+ $addon.removeClass('last');
89
+
90
+ $('#soliloquy-addons-area .soliloquy-addon:visible').each(function(i) {
91
+
92
+ if ((i + 1) % 3 === 0) {
93
+
94
+ $(this).addClass('last');
95
+ }
96
+
97
+ });
98
+
99
+ break;
100
+ case 'inactive':
101
+
102
+ $addon.hide().filter('[data-addon-status="inactive"]').show();
103
+ $addon.removeClass('last');
104
+
105
+ $('#soliloquy-addons-area .soliloquy-addon:visible').each(function(i) {
106
+
107
+ if ((i + 1) % 3 === 0) {
108
+ $(this).addClass('last');
109
+ }
110
+ });
111
+
112
+ break;
113
+ case 'installed':
114
+ var i = 0;
115
+ $addon.hide().filter('[data-addon-status="not_installed"]').show();
116
+ $addon.removeClass('last');
117
+ $('#soliloquy-addons-area .soliloquy-addon:visible').each(function(i) {
118
+ if ((i + 1) % 3 === 0) {
119
+ $(this).addClass('last');
120
+ }
121
+ });
122
+ break;
123
+
124
+ }
125
+
126
+ });
127
+
128
+ // Re-enable install button if user clicks on it, needs creds but tries to install another addon instead.
129
+ $('#soliloquy-addons-area').on('click.refreshInstallAddon', '.soliloquy-addon-action-button', function(e) {
130
+
131
+ e.preventDefault();
132
+
133
+ var $el = $(this),
134
+ buttons = $('#soliloquy-addons-area').find('.soliloquy-addon-action-button');
135
+
136
+ $.each(buttons, function(i, element) {
137
+
138
+ if ( $el === element ) {
139
+
140
+ return true;
141
+
142
+ }
143
+
144
+ soliloquyAddonRefresh(element);
145
+
146
+ });
147
+ });
148
+
149
+ // Process Addon activations for those currently installed but not yet active.
150
+ $('#soliloquy-addons-area').on('click.activateAddon', '.soliloquy-activate-addon', function(e) {
151
+
152
+ e.preventDefault();
153
+
154
+ var $button = $(this),
155
+ plugin = $button.attr('rel'),
156
+ $el = $button.parent().parent(),
157
+ $message = $button.parent().parent().find('.addon-status').children('span');
158
+
159
+ // Remove any leftover error messages, output an icon and get the plugin basename that needs to be activated.
160
+ $('.soliloquy-addon-error').remove();
161
+
162
+ $button.text(soliloquy_addons.activating);
163
+ $button.next().css({
164
+ 'display': 'inline-block',
165
+ 'margin-top': '0px'
166
+ });
167
+
168
+ // Process the Ajax to perform the activation.
169
+ var opts = {
170
+ url: ajaxurl,
171
+ type: 'post',
172
+ async: true,
173
+ cache: false,
174
+ dataType: 'json',
175
+ data: {
176
+ action: 'soliloquy_activate_addon',
177
+ nonce: soliloquy_addons.activate_nonce,
178
+ plugin: plugin
179
+ },
180
+ success: function(response) {
181
+ // If there is a WP Error instance, output it here and quit the script.
182
+ if (response && true !== response) {
183
+ $el.slideDown('normal', function() {
184
+ $(this)
185
+ .after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
186
+ $button.next()
187
+ .hide();
188
+ $('.soliloquy-addon-error')
189
+ .delay(3000)
190
+ .slideUp();
191
+ });
192
+ return;
193
+ }
194
+ // The Ajax request was successful, so let's update the output.
195
+ $button.text(soliloquy_addons.deactivate).removeClass('soliloquy-activate-addon').addClass('soliloquy-deactivate-addon');
196
+ $message.text(soliloquy_addons.active);
197
+ $el.removeClass('soliloquy-addon-inactive').addClass('soliloquy-addon-active');
198
+ $button.next().hide();
199
+ },
200
+ error: function(xhr, textStatus, e) {
201
+ $button.next()
202
+ .hide();
203
+ return;
204
+ }
205
+ };
206
+ $.ajax(opts);
207
+ });
208
+
209
+ // Process Addon deactivations for those currently active.
210
+ $('#soliloquy-addons-area').on('click.deactivateAddon', '.soliloquy-deactivate-addon', function(e) {
211
+
212
+ e.preventDefault();
213
+
214
+ var $button = $(this),
215
+ plugin = $button.attr('rel'),
216
+ $el = $button.parent().parent(),
217
+ $message = $button.parent().parent().find('.addon-status').children('span');
218
+
219
+ // Remove any leftover error messages, output an icon and get the plugin basename that needs to be activated.
220
+ $('.soliloquy-addon-error').remove();
221
+
222
+ $button.text(soliloquy_addons.deactivating);
223
+ $button.next().css({
224
+ 'display': 'inline-block',
225
+ 'margin-top': '0px'
226
+ });
227
+
228
+ // Process the Ajax to perform the activation.
229
+ var opts = {
230
+ url: ajaxurl,
231
+ type: 'post',
232
+ async: true,
233
+ cache: false,
234
+ dataType: 'json',
235
+ data: {
236
+ action: 'soliloquy_deactivate_addon',
237
+ nonce: soliloquy_addons.deactivate_nonce,
238
+ plugin: plugin
239
+ },
240
+ success: function(response) {
241
+ // If there is a WP Error instance, output it here and quit the script.
242
+ if (response && true !== response) {
243
+
244
+ $el.slideDown('normal', function() {
245
+ $(this).after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
246
+ $button.next().hide();
247
+ $('.soliloquy-addon-error').delay(3000).slideUp();
248
+ });
249
+
250
+ return;
251
+ }
252
+
253
+ // The Ajax request was successful, so let's update the output.
254
+ $button.text(soliloquy_addons.activate).removeClass('soliloquy-deactivate-addon').addClass('soliloquy-activate-addon');
255
+ $message.text(soliloquy_addons.inactive);
256
+ $el.removeClass('soliloquy-addon-active').addClass('soliloquy-addon-inactive');
257
+ $button.next().hide();
258
+ },
259
+ error: function(xhr, textStatus, e) {
260
+ $button.next().hide();
261
+ return;
262
+ }
263
+ };
264
+ $.ajax(opts);
265
+ });
266
+
267
+ // Process Addon installations.
268
+ $('#soliloquy-addons-area').on('click.installAddon', '.soliloquy-install-addon', function(e) {
269
+
270
+ e.preventDefault();
271
+
272
+ var $button = $(this),
273
+ plugin = $button.attr('rel'),
274
+ $el = $button.parent().parent(),
275
+ $message = $button.parent().parent().find('.addon-status').children('span');
276
+
277
+ // Remove any leftover error messages, output an icon and get the plugin basename that needs to be activated.
278
+ $('.soliloquy-addon-error').remove();
279
+
280
+ $button.text(soliloquy_addons.installing);
281
+ $button.next().css({
282
+ 'display': 'inline-block',
283
+ 'margin-top': '0px'
284
+ });
285
+
286
+ // Process the Ajax to perform the activation.
287
+ var opts = {
288
+ url: ajaxurl,
289
+ type: 'post',
290
+ async: true,
291
+ cache: false,
292
+ dataType: 'json',
293
+ data: {
294
+ action: 'soliloquy_install_addon',
295
+ nonce: soliloquy_addons.install_nonce,
296
+ plugin: plugin
297
+ },
298
+ success: function(response) {
299
+ // If there is a WP Error instance, output it here and quit the script.
300
+ if (response.error) {
301
+ $el.slideDown('normal', function() {
302
+ $button.parent().parent().after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
303
+ $button.text(soliloquy_addons.install);
304
+ $button.next().hide();
305
+ $('.soliloquy-addon-error').delay(4000)
306
+ .slideUp();
307
+ });
308
+ return;
309
+ }
310
+
311
+ // If we need more credentials, output the form sent back to us.
312
+ if (response.form) {
313
+ // Display the form to gather the users credentials.
314
+ $el.slideDown('normal', function() {
315
+ $(this).after('<div class="soliloquy-addon-error">' + response.form + '</div>');
316
+ $button.next().hide();
317
+ });
318
+
319
+ // Add a disabled attribute the install button if the creds are needed.
320
+ $button.attr('disabled', true);
321
+
322
+ $('#soliloquy-addons-area').on('click.installCredsAddon', '#upgrade', function(e) {
323
+ // Prevent the default action, let the user know we are attempting to install again and go with it.
324
+ e.preventDefault();
325
+ $button.next().hide();
326
+ $(this)
327
+ .val(soliloquy_addons.installing);
328
+ $(this)
329
+ .next()
330
+ .css({
331
+ 'display': 'inline-block',
332
+ 'margin-top': '0px'
333
+ });
334
+
335
+ // Now let's make another Ajax request once the user has submitted their credentials.
336
+ var hostname = $(this).parent().parent().find('#hostname').val(),
337
+ username = $(this).parent().parent().find('#username').val(),
338
+ password = $(this).parent().parent().find('#password').val(),
339
+ proceed = $(this),
340
+ connect = $(this).parent().parent().parent().parent();
341
+ var cred_opts = {
342
+ url: ajaxurl,
343
+ type: 'post',
344
+ async: true,
345
+ cache: false,
346
+ dataType: 'json',
347
+ data: {
348
+ action: 'soliloquy_install_addon',
349
+ nonce: soliloquy_addons.install_nonce,
350
+ plugin: plugin,
351
+ hostname: hostname,
352
+ username: username,
353
+ password: password
354
+ },
355
+ success: function(response) {
356
+ // If there is a WP Error instance, output it here and quit the script.
357
+ if (response.error) {
358
+ $el.slideDown('normal', function() {
359
+ $button.parent().parent().after('<div class="soliloquy-addon-error"><strong>' + response.error + '</strong></div>');
360
+ $button.text(soliloquy_addons.install);
361
+ $button.next().hide();
362
+ $('.soliloquy-addon-error').delay(4000).slideUp();
363
+ });
364
+
365
+ return;
366
+ }
367
+
368
+ if (response.form) {
369
+ $button.next().hide();
370
+ $('.soliloquy-inline-error').remove();
371
+ $(proceed)
372
+ .val(soliloquy_addons.proceed);
373
+ $(proceed)
374
+ .after('<span class="soliloquy-inline-error">' + soliloquy_addons.connect_error + '</span>');
375
+ return;
376
+ }
377
+
378
+ // The Ajax request was successful, so let's update the output.
379
+ $(connect)
380
+ .remove();
381
+ $button.show();
382
+ $button.text(soliloquy_addons.activate).removeClass('soliloquy-install-addon').addClass('soliloquy-activate-addon');
383
+ $button.attr('rel', response.plugin);
384
+ $button.removeAttr('disabled');
385
+ $message.text(soliloquy_addons.inactive);
386
+ $el.removeClass('soliloquy-addon-not-installed').addClass('soliloquy-addon-inactive');
387
+ $button.next().hide();
388
+ },
389
+ error: function(xhr, textStatus, e) {
390
+ $button.next().hide();
391
+ return;
392
+ }
393
+ };
394
+ $.ajax(cred_opts);
395
+ });
396
+
397
+ // No need to move further if we need to enter our creds.
398
+ return;
399
+ }
400
+
401
+ // The Ajax request was successful, so let's update the output.
402
+ $button.text(soliloquy_addons.activate).removeClass('soliloquy-install-addon').addClass('soliloquy-activate-addon');
403
+ $button.attr('rel', response.plugin);
404
+ $message.text(soliloquy_addons.inactive);
405
+ $el.removeClass('soliloquy-addon-not-installed').addClass('soliloquy-addon-inactive');
406
+ $button.next().hide();
407
+ },
408
+
409
+ error: function(xhr, textStatus, e) {
410
+ $button.next()
411
+ .hide();
412
+ return;
413
+ }
414
+ };
415
+ $.ajax(opts);
416
+ });
417
+
418
+ // Function to clear any disabled buttons and extra text if the user needs to add creds but instead tries to install a different addon.
419
+ function soliloquyAddonRefresh(element) {
420
+ if ($(element).attr('disabled')){
421
+ $(element)
422
+ .removeAttr('disabled');
423
+ }
424
+ if ( $(element).parent().parent().hasClass('soliloquy-addon-not-installed') ){
425
+
426
+ $(element).text(soliloquy_addons.install);
427
+
428
+ }
429
+ }
430
+ });
431
+
432
+ })(jQuery, window, document, soliloquy_addons);
assets/js/editor.js CHANGED
@@ -28,7 +28,7 @@
28
  * object for the "soliloquySliderModalData" event, like this:
29
  *
30
  * $(document).on("soliloquySliderModalData", function(e){
31
- * console.log(e.slider);
32
  * });
33
  *
34
  * This will give you access to the entire array of slider data that
@@ -104,8 +104,8 @@
104
  } else {
105
  // Make the ajax request.
106
  var req_data = {
107
- action: 'soliloquy_load_slider_data',
108
- id: $('.soliloquy-default-ui:first .selected').data('soliloquy-id')
109
  };
110
  $.post(ajaxurl, req_data, function(res){
111
  // Trigger the event.
28
  * object for the "soliloquySliderModalData" event, like this:
29
  *
30
  * $(document).on("soliloquySliderModalData", function(e){
31
+ * //console.log(e.slider);
32
  * });
33
  *
34
  * This will give you access to the entire array of slider data that
104
  } else {
105
  // Make the ajax request.
106
  var req_data = {
107
+ action: 'soliloquy_load_slider_data',
108
+ post_id: $('.soliloquy-default-ui:first .selected').data('soliloquy-id')
109
  };
110
  $.post(ajaxurl, req_data, function(res){
111
  // Trigger the event.
assets/js/lib/bxslider.js ADDED
@@ -0,0 +1,1482 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ;
2
+ (function($, window, document, undefined) {
3
+
4
+ var plugin = {};
5
+
6
+ var defaults = {
7
+
8
+ // Added by Thomas
9
+ keyboard: false,
10
+
11
+ // GENERAL
12
+ mode: 'horizontal',
13
+ slideSelector: '',
14
+ infiniteLoop: true,
15
+ hideControlOnEnd: false,
16
+ speed: 500,
17
+ captionSpeed: 0,
18
+ easing: null,
19
+ slideMargin: 0,
20
+ startSlide: 0,
21
+ randomStart: false,
22
+ captions: false,
23
+ ticker: false,
24
+ tickerHover: false,
25
+ adaptiveHeight: false,
26
+ adaptiveHeightSpeed: 500,
27
+ video: false,
28
+ useCSS: true,
29
+ preloadImages: 'visible',
30
+ responsive: true,
31
+ slideZIndex: 50,
32
+ wrapperClass: 'soliloquy-wrapper',
33
+
34
+ // TOUCH
35
+ touchEnabled: true,
36
+ swipeThreshold: 50,
37
+ oneToOneTouch: true,
38
+ preventDefaultSwipeX: true,
39
+ preventDefaultSwipeY: false,
40
+
41
+ // PAGER
42
+ pager: true,
43
+ pagerType: 'full',
44
+ pagerShortSeparator: ' / ',
45
+ pagerSelector: null,
46
+ buildPager: null,
47
+ pagerCustom: null,
48
+
49
+ // CONTROLS
50
+ controls: true,
51
+ nextText: 'Next',
52
+ prevText: 'Prev',
53
+ nextSelector: null,
54
+ prevSelector: null,
55
+ autoControls: false,
56
+ startText: 'Start',
57
+ stopText: 'Stop',
58
+ autoControlsCombine: false,
59
+ autoControlsSelector: null,
60
+
61
+ // AUTO
62
+ auto: false,
63
+ pause: 4000,
64
+ autoStart: true,
65
+ autoDirection: 'next',
66
+ autoHover: false,
67
+ autoDelay: 0,
68
+ autoSlideForOnePage: false,
69
+
70
+ // CAROUSEL
71
+ minSlides: 1,
72
+ maxSlides: 1,
73
+ moveSlides: 0,
74
+ slideWidth: 0,
75
+
76
+ // CALLBACKS
77
+ onSliderLoad: function() {},
78
+ onSlideBefore: function() {},
79
+ onSlideAfter: function() {},
80
+ onSlideNext: function() {},
81
+ onSlidePrev: function() {},
82
+ onSliderResize: function() {}
83
+ };
84
+
85
+ $.fn.soliloquy = function(options){
86
+
87
+ if(this.length === 0) {
88
+ return this;
89
+ }
90
+
91
+ // support mutltiple elements
92
+ if(this.length > 1){
93
+ this.each(function(){$(this).soliloquy(options)});
94
+ return this;
95
+ }
96
+
97
+ // create a namespace to be used throughout the plugin
98
+ var slider = {},
99
+ // set a reference to our slider element
100
+ el = this,
101
+ // first get the original window dimens (thanks alot IE)
102
+ windowWidth = $(window).width(),
103
+ windowHeight = $(window).height();
104
+
105
+ /**
106
+ * ===================================================================================
107
+ * = PRIVATE FUNCTIONS
108
+ * ===================================================================================
109
+ */
110
+
111
+ /**
112
+ * Initializes namespace settings to be used throughout plugin
113
+ */
114
+ var init = function(){
115
+ // merge user-supplied options with the defaults
116
+ slider.settings = $.extend({}, defaults, options);
117
+ // parse slideWidth setting
118
+ slider.settings.slideWidth = parseInt(slider.settings.slideWidth);
119
+ // store the original children
120
+ slider.children = el.children(slider.settings.slideSelector);
121
+ // check if actual number of slides is less than minSlides / maxSlides
122
+ if(slider.children.length < slider.settings.minSlides) {
123
+ slider.settings.minSlides = slider.children.length;
124
+ }
125
+ if(slider.children.length < slider.settings.maxSlides) {
126
+ slider.settings.maxSlides = slider.children.length;
127
+ }
128
+ // if random start, set the startSlide setting to random number
129
+ if(slider.settings.randomStart) slider.settings.startSlide = Math.floor(Math.random() * slider.children.length);
130
+ // store active slide information
131
+ slider.active = { index: slider.settings.startSlide }
132
+ // store if the slider is in carousel mode (displaying / moving multiple slides)
133
+ slider.carousel = slider.settings.minSlides > 1 || slider.settings.maxSlides > 1;
134
+ // if carousel, force preloadImages = 'all'
135
+ if(slider.carousel) slider.settings.preloadImages = 'all';
136
+ // calculate the min / max width thresholds based on min / max number of slides
137
+ // used to setup and update carousel slides dimensions
138
+ slider.minThreshold = (slider.settings.minSlides * slider.settings.slideWidth) + ((slider.settings.minSlides - 1) * slider.settings.slideMargin);
139
+ slider.maxThreshold = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
140
+ // store the current state of the slider (if currently animating, working is true)
141
+ slider.working = false;
142
+ // initialize the controls object
143
+ slider.controls = {};
144
+ // initialize an auto interval
145
+ slider.interval = null;
146
+ // determine which property to use for transitions
147
+ slider.animProp = slider.settings.mode == 'vertical' ? 'top' : 'left';
148
+ // determine if hardware acceleration can be used
149
+ slider.usingCSS = slider.settings.useCSS && slider.settings.mode != 'fade' && (function(){
150
+ // create our test div element
151
+ var div = document.createElement('div');
152
+ // css transition properties
153
+ var props = ['WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
154
+ // test for each property
155
+ for(var i in props){
156
+ if(div.style[props[i]] !== undefined){
157
+ slider.cssPrefix = props[i].replace('Perspective', '').toLowerCase();
158
+ slider.animProp = '-' + slider.cssPrefix + '-transform';
159
+ return true;
160
+ }
161
+ }
162
+ return false;
163
+ }());
164
+ // if vertical mode always make maxSlides and minSlides equal
165
+ if(slider.settings.mode == 'vertical') slider.settings.maxSlides = slider.settings.minSlides;
166
+ // save original style data
167
+ el.data("origStyle", el.attr("style"));
168
+ el.children(slider.settings.slideSelector).each(function() {
169
+ $(this).data("origStyle", $(this).attr("style"));
170
+ });
171
+ // perform all DOM / CSS modifications
172
+ setup();
173
+ };
174
+
175
+ /**
176
+ * Performs all DOM and CSS modifications
177
+ */
178
+ var setup = function(){
179
+ // wrap el in a wrapper
180
+ el.wrap('<div class="' + slider.settings.wrapperClass + '"><div class="soliloquy-viewport"></div></div>');
181
+ // store a namspace reference to .soliloquy-viewport
182
+ slider.viewport = el.parent();
183
+ // add a loading div to display while images are loading
184
+ slider.loader = $('<div class="soliloquy-loading" />');
185
+ slider.viewport.prepend(slider.loader);
186
+ // set el to a massive width, to hold any needed slides
187
+ // also strip any margin and padding from el
188
+ el.css({
189
+ width: slider.settings.mode == 'horizontal' ? (slider.children.length * 100 + 215) + '%' : 'auto',
190
+ position: 'relative'
191
+ });
192
+ // if using CSS, add the easing property
193
+ if(slider.usingCSS && slider.settings.easing){
194
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', slider.settings.easing);
195
+ // if not using CSS and no easing value was supplied, use the default JS animation easing (swing)
196
+ }else if(!slider.settings.easing){
197
+ slider.settings.easing = 'swing';
198
+ }
199
+ var slidesShowing = getNumberSlidesShowing();
200
+ // make modifications to the viewport (.soliloquy-viewport)
201
+ slider.viewport.css({
202
+ width: '100%',
203
+ position: 'relative'
204
+ });
205
+ if(slider.settings.mode != 'fade'){
206
+ slider.viewport.css({overflow:'hidden'});
207
+ }
208
+ slider.viewport.parent().css({
209
+ maxWidth: getViewportMaxWidth()
210
+ });
211
+ // make modification to the wrapper (.soliloquy-wrapper)
212
+ if(!slider.settings.pager) {
213
+ slider.viewport.parent().css({
214
+ margin: '0 auto 0px'
215
+ });
216
+ }
217
+ // apply css to all slider children
218
+ slider.children.css({
219
+ 'float': 'left',
220
+ listStyle: 'none',
221
+ position: 'relative'
222
+ });
223
+ // apply the calculated width after the float is applied to prevent scrollbar interference
224
+ slider.children.css('width', getSlideWidth());
225
+ // if slideMargin is supplied, add the css
226
+ if(slider.settings.mode == 'horizontal' && slider.settings.slideMargin > 0) slider.children.css('marginRight', slider.settings.slideMargin);
227
+ if(slider.settings.mode == 'vertical' && slider.settings.slideMargin > 0) slider.children.css('marginBottom', slider.settings.slideMargin);
228
+ // if "fade" mode, add positioning and z-index CSS
229
+ if(slider.settings.mode == 'fade'){
230
+ slider.children.css({
231
+ zIndex: 0,
232
+ display: 'none',
233
+ marginRight: '-100%',
234
+ width: '100%'
235
+ });
236
+ // prepare the z-index on the showing element
237
+ slider.children.eq(slider.settings.startSlide).css({zIndex: slider.settings.slideZIndex, display: 'block'});
238
+ }
239
+ // create an element to contain all slider controls (pager, start / stop, etc)
240
+ slider.controls.el = $('<div class="soliloquy-controls" />');
241
+ // if captions are requested, add them
242
+ if(slider.settings.captions) {
243
+ appendCaptions();
244
+ }
245
+ // check if startSlide is last slide
246
+ slider.active.last = slider.settings.startSlide == getPagerQty() - 1;
247
+ // Added by Thomas - removed fitVids support, no need.
248
+ // set the default preload selector (visible)
249
+ var preloadSelector = slider.children.eq(slider.settings.startSlide);
250
+ if (slider.settings.preloadImages == "all") {
251
+ preloadSelector = slider.children;
252
+ }
253
+ // only check for control addition if not in "ticker" mode
254
+ if(!slider.settings.ticker){
255
+ // if pager is requested, add it
256
+ if(slider.settings.pager) {
257
+ appendPager();
258
+ }
259
+ // if controls are requested, add them
260
+ if(slider.settings.controls) {
261
+ appendControls();
262
+ }
263
+ // if auto is true, and auto controls are requested, add them
264
+ if(slider.settings.auto && slider.settings.autoControls) {
265
+ appendControlsAuto();
266
+ }
267
+ // if any control option is requested, add the controls wrapper
268
+ if(slider.settings.controls || slider.settings.autoControls || slider.settings.pager) {
269
+ slider.viewport.after(slider.controls.el);
270
+ }
271
+ // if ticker mode, do not allow a pager
272
+ }else{
273
+ slider.settings.pager = false;
274
+ }
275
+ // preload all images, then perform final DOM / CSS modifications that depend on images being loaded
276
+ loadElements(preloadSelector, start);
277
+ };
278
+
279
+ var loadElements = function(selector, callback) {
280
+ var total = selector.find('img:not([src=""]), iframe').length,
281
+ count = 0;
282
+ if (total === 0) {
283
+ callback();
284
+ return;
285
+ }
286
+ selector.find('img:not([src=""]), iframe').each(function() {
287
+ $(this).one('load error', function() {
288
+ if (++count === total) { callback(); }
289
+ }).each(function() {
290
+ if (this.complete) { $(this).load(); }
291
+ });
292
+ });
293
+ };
294
+
295
+ /**
296
+ * Start the slider
297
+ */
298
+ var start = function(){
299
+
300
+ // if infinite loop, prepare additional slides
301
+ if(slider.settings.infiniteLoop && slider.settings.mode != 'fade' && !slider.settings.ticker && slider.children.length > 1){
302
+ var slice = slider.settings.mode == 'vertical' ? slider.settings.minSlides : slider.settings.maxSlides;
303
+ var sliceAppend = slider.children.slice(0, slice).clone(true).addClass('soliloquy-clone');
304
+ var slicePrepend = slider.children.slice(-slice).clone(true).addClass('soliloquy-clone');
305
+ el.append(sliceAppend).prepend(slicePrepend);
306
+ }
307
+
308
+ // remove the loading DOM element
309
+ slider.loader.remove();
310
+ // set the left / top position of "el"
311
+ setSlidePosition();
312
+ // if "vertical" mode, always use adaptiveHeight to prevent odd behavior
313
+ if (slider.settings.mode == 'vertical') slider.settings.adaptiveHeight = true;
314
+ // set the viewport height
315
+ slider.viewport.height(getViewportHeight());
316
+ // make sure everything is positioned just right (same as a window resize)
317
+ el.redrawSlider();
318
+ // onSliderLoad callback
319
+ slider.settings.onSliderLoad(slider.active.index);
320
+ // slider has been fully initialized
321
+ slider.initialized = true;
322
+ // bind the resize call to the window
323
+ if (slider.settings.responsive) {
324
+ $(window).bind('resize', resizeWindow);
325
+ }
326
+ // if auto is true and has more than 1 page, start the show
327
+ if (slider.settings.auto && slider.settings.autoStart && (getPagerQty() > 1 || slider.settings.autoSlideForOnePage)) {
328
+ initAuto();
329
+ }
330
+ // if ticker is true, start the ticker
331
+ if (slider.settings.ticker) {
332
+ initTicker();
333
+ }
334
+ // if pager is requested, make the appropriate pager link active
335
+ if (slider.settings.pager) {
336
+ updatePagerActive(slider.settings.startSlide);
337
+ }
338
+ // check for any updates to the controls (like hideControlOnEnd updates)
339
+ if (slider.settings.controls) {
340
+ updateDirectionControls();
341
+ }
342
+ // if touchEnabled is true, setup the touch events
343
+ if (slider.settings.touchEnabled && !slider.settings.ticker) {
344
+ initTouch();
345
+ }
346
+ // Added by Thomas
347
+ if (slider.settings.keyboard && !slider.settings.ticker) {
348
+ $( 'body' ).on('keydown', function(e) {
349
+ // Added by Tim
350
+ // Check the target (focused) element - if it's an input or textarea, don't do anything
351
+ // otherwise the user can't use arrow keys within inputs or textareas
352
+ if ( e.target.type == 'textarea' || e.target.type == 'input' ) {
353
+ return;
354
+ }
355
+
356
+ // If here, OK to change slide
357
+ if ( e.keyCode == 39 ) {
358
+ clickNextBind( e );
359
+ return false;
360
+ } else if ( e.keyCode == 37 ) {
361
+ clickPrevBind( e );
362
+ return false;
363
+ }
364
+ });
365
+ }
366
+ };
367
+
368
+ /**
369
+ * Returns the calculated height of the viewport, used to determine either adaptiveHeight or the maxHeight value
370
+ */
371
+ var getViewportHeight = function(){
372
+ var height = 0;
373
+ // first determine which children (slides) should be used in our height calculation
374
+ var children = $();
375
+ // if mode is not "vertical" and adaptiveHeight is false, include all children
376
+ if(slider.settings.mode != 'vertical' && !slider.settings.adaptiveHeight){
377
+ children = slider.children;
378
+ }else{
379
+ // if not carousel, return the single active child
380
+ if(!slider.carousel){
381
+ children = slider.children.eq(slider.active.index);
382
+ // if carousel, return a slice of children
383
+ }else{
384
+ // get the individual slide index
385
+ var currentIndex = slider.settings.moveSlides == 1 ? slider.active.index : slider.active.index * getMoveBy();
386
+ // add the current slide to the children
387
+ children = slider.children.eq(currentIndex);
388
+ // cycle through the remaining "showing" slides
389
+ for (i = 1; i <= slider.settings.maxSlides - 1; i++){
390
+ // if looped back to the start
391
+ if(currentIndex + i >= slider.children.length){
392
+ children = children.add(slider.children.eq(i - 1));
393
+ }else{
394
+ children = children.add(slider.children.eq(currentIndex + i));
395
+ }
396
+ }
397
+ }
398
+ }
399
+ // if "vertical" mode, calculate the sum of the heights of the children
400
+ if(slider.settings.mode == 'vertical'){
401
+ children.each(function(index) {
402
+ height += $(this).outerHeight();
403
+ });
404
+ // add user-supplied margins
405
+ if(slider.settings.slideMargin > 0){
406
+ height += slider.settings.slideMargin * (slider.settings.minSlides - 1);
407
+ }
408
+ // if not "vertical" mode, calculate the max height of the children
409
+ }else{
410
+ height = Math.max.apply(Math, children.map(function(){
411
+ return $(this).outerHeight(false);
412
+ }).get());
413
+ }
414
+
415
+ if(slider.viewport.css('box-sizing') == 'border-box'){
416
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom')) +
417
+ parseFloat(slider.viewport.css('border-top-width')) + parseFloat(slider.viewport.css('border-bottom-width'));
418
+ }else if(slider.viewport.css('box-sizing') == 'padding-box'){
419
+ height += parseFloat(slider.viewport.css('padding-top')) + parseFloat(slider.viewport.css('padding-bottom'));
420
+ }
421
+
422
+ return height;
423
+ };
424
+
425
+ /**
426
+ * Returns the calculated width to be used for the outer wrapper / viewport
427
+ */
428
+ var getViewportMaxWidth = function(){
429
+ var width = '100%';
430
+ if(slider.settings.slideWidth > 0){
431
+ if(slider.settings.mode == 'horizontal'){
432
+ width = (slider.settings.maxSlides * slider.settings.slideWidth) + ((slider.settings.maxSlides - 1) * slider.settings.slideMargin);
433
+ }else{
434
+ width = slider.settings.slideWidth;
435
+ }
436
+ }
437
+ return (slider.settings.mode == 'fade') ? '100%' : width;
438
+ };
439
+
440
+ /**
441
+ * Returns the calculated width to be applied to each slide
442
+ */
443
+ var getSlideWidth = function(){
444
+ // start with any user-supplied slide width
445
+ var newElWidth = slider.settings.slideWidth;
446
+ // get the current viewport width
447
+ var wrapWidth = slider.viewport.width();
448
+ // if slide width was not supplied, or is larger than the viewport use the viewport width
449
+ if(slider.settings.slideWidth === 0 ||
450
+ (slider.settings.slideWidth > wrapWidth && !slider.carousel) ||
451
+ slider.settings.mode === 'vertical'){
452
+ newElWidth = wrapWidth;
453
+ // if carousel, use the thresholds to determine the width
454
+ }else if(slider.settings.maxSlides > 1 && slider.settings.mode === 'horizontal'){
455
+ if(wrapWidth > slider.maxThreshold){
456
+ // newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.maxSlides - 1))) / slider.settings.maxSlides;
457
+ }else if(wrapWidth < slider.minThreshold){
458
+ newElWidth = (wrapWidth - (slider.settings.slideMargin * (slider.settings.minSlides - 1))) / slider.settings.minSlides;
459
+ }
460
+ }
461
+ return (slider.settings.mode == 'fade') ? '100%' : newElWidth;
462
+ };
463
+
464
+ /**
465
+ * Returns the number of slides currently visible in the viewport (includes partially visible slides)
466
+ */
467
+ var getNumberSlidesShowing = function(){
468
+ var slidesShowing = 1;
469
+ if(slider.settings.mode === 'horizontal' && slider.settings.slideWidth > 0){
470
+ // if viewport is smaller than minThreshold, return minSlides
471
+ if(slider.viewport.width() < slider.minThreshold){
472
+ slidesShowing = slider.settings.minSlides;
473
+ // if viewport is larger than minThreshold, return maxSlides
474
+ }else if(slider.viewport.width() > slider.maxThreshold){
475
+ slidesShowing = slider.settings.maxSlides;
476
+ // if viewport is between min / max thresholds, divide viewport width by first child width
477
+ }else{
478
+ var childWidth = slider.children.first().width() + slider.settings.slideMargin;
479
+ slidesShowing = Math.floor((slider.viewport.width() +
480
+ slider.settings.slideMargin) / childWidth);
481
+ }
482
+ // if "vertical" mode, slides showing will always be minSlides
483
+ }else if(slider.settings.mode === 'vertical'){
484
+ slidesShowing = slider.settings.minSlides;
485
+ }
486
+ return slidesShowing;
487
+ };
488
+
489
+ /**
490
+ * Returns the number of pages (one full viewport of slides is one "page")
491
+ */
492
+ var getPagerQty = function(){
493
+ var pagerQty = 0;
494
+ // if moveSlides is specified by the user
495
+ if(slider.settings.moveSlides > 0){
496
+ if(slider.settings.infiniteLoop){
497
+ pagerQty = Math.ceil(slider.children.length / getMoveBy());
498
+ }else{
499
+ // use a while loop to determine pages
500
+ var breakPoint = 0;
501
+ var counter = 0
502
+ // when breakpoint goes above children length, counter is the number of pages
503
+ while (breakPoint < slider.children.length){
504
+ ++pagerQty;
505
+ breakPoint = counter + getNumberSlidesShowing();
506
+ counter += slider.settings.moveSlides <= getNumberSlidesShowing() ? slider.settings.moveSlides : getNumberSlidesShowing();
507
+ }
508
+ }
509
+ // if moveSlides is 0 (auto) divide children length by sides showing, then round up
510
+ }else{
511
+ pagerQty = Math.ceil(slider.children.length / getNumberSlidesShowing());
512
+ }
513
+ return pagerQty;
514
+ };
515
+
516
+ /**
517
+ * Returns the number of indivual slides by which to shift the slider
518
+ */
519
+ var getMoveBy = function(){
520
+ // if moveSlides was set by the user and moveSlides is less than number of slides showing
521
+ if(slider.settings.moveSlides > 0 && slider.settings.moveSlides <= getNumberSlidesShowing()){
522
+ return slider.settings.moveSlides;
523
+ }
524
+ // if moveSlides is 0 (auto)
525
+ return getNumberSlidesShowing();
526
+ };
527
+
528
+ /**
529
+ * Sets the slider's (el) left or top position
530
+ */
531
+ var setSlidePosition = function(){
532
+
533
+ // if last slide, not infinite loop, and number of children is larger than specified maxSlides
534
+ if (slider.children.length > slider.settings.maxSlides && slider.active.last && !slider.settings.infiniteLoop) {
535
+
536
+ if (slider.settings.mode === 'horizontal') {
537
+
538
+ // get the last child's position
539
+ var lastChild = slider.children.last(),
540
+ position = lastChild.position();
541
+
542
+ // set the left position
543
+ setPositionProperty(-(position.left - (slider.viewport.width() - lastChild.outerWidth())), 'reset', 0);
544
+
545
+ } else if (slider.settings.mode === 'vertical') {
546
+
547
+ // get the last showing index's position
548
+ var lastShowingIndex = slider.children.length - slider.settings.minSlides;
549
+ var position = slider.children.eq(lastShowingIndex)
550
+ .position();
551
+
552
+ // set the top position
553
+ setPositionProperty(-position.top, 'reset', 0);
554
+ }
555
+
556
+ //If its not infinite loop
557
+ } else if (!slider.settings.infiniteLoop) {
558
+ var firstIndex = slider.active.index,
559
+ position = slider.children.eq(firstIndex)
560
+ .position();
561
+ // check for last slide
562
+ if (slider.active.index === getPagerQty() - 1) {
563
+ slider.active.last = true;
564
+ }
565
+ // set the repective position
566
+ if (position != undefined) {
567
+
568
+ if (slider.settings.mode === 'horizontal' && !slider.carousel) {
569
+ position.left = (slider.active.index) * slider.children.eq(firstIndex)
570
+ .outerWidth(true);
571
+ setPositionProperty(-position.left, 'reset', 0);
572
+ } else if (slider.settings.mode === 'vertical') {
573
+ position.top = (slider.active.index) * slider.children.eq(firstIndex)
574
+ .outerHeight(true);
575
+ setPositionProperty(-position.top, 'reset', 0);
576
+ }
577
+ }
578
+ } else {
579
+ var firstIndex = slider.active.index * getMoveBy(),
580
+ position = slider.children.eq(firstIndex)
581
+ .position();
582
+ // check for last slide
583
+ if (slider.active.index === getPagerQty() - 1) {
584
+ slider.active.last = true;
585
+ }
586
+ // set the repective position
587
+ if (position != undefined) {
588
+ if (slider.settings.mode === 'horizontal' && slider.children.length <= 1 ){
589
+ position.left = (slider.active.index ) * slider.children.eq(firstIndex)
590
+ .outerWidth(true);
591
+ setPositionProperty(-position.left, 'reset', 0);
592
+ }
593
+ else if (slider.settings.mode === 'horizontal' && !slider.carousel) {
594
+ position.left = (slider.active.index + 1) * slider.children.eq(firstIndex)
595
+ .outerWidth(true);
596
+ setPositionProperty(-position.left, 'reset', 0);
597
+
598
+ } else if (slider.settings.mode === 'vertical') {
599
+ position.top = (slider.active.index + 1) * slider.children.eq(firstIndex)
600
+ .outerHeight(true);
601
+ setPositionProperty(-position.top, 'reset', 0);
602
+ } else if (slider.carousel && slider.settings.mode === 'horizontal' && slider.settings.infiniteLoop) {
603
+ position.left = (slider.active.index + 1) * slider.children.eq(firstIndex)
604
+ .outerWidth(true);
605
+ setPositionProperty(-position.left * slider.settings.maxSlides, 'reset', 0);
606
+ }
607
+ }
608
+ }
609
+
610
+
611
+ };
612
+
613
+ /**
614
+ * Sets the el's animating property position (which in turn will sometimes animate el).
615
+ * If using CSS, sets the transform property. If not using CSS, sets the top / left property.
616
+ *
617
+ * @param value (int)
618
+ * - the animating property's value
619
+ *
620
+ * @param type (string) 'slider', 'reset', 'ticker'
621
+ * - the type of instance for which the function is being
622
+ *
623
+ * @param duration (int)
624
+ * - the amount of time (in ms) the transition should occupy
625
+ *
626
+ * @param params (array) optional
627
+ * - an optional parameter containing any variables that need to be passed in
628
+ */
629
+ var setPositionProperty = function(value, type, duration, params){
630
+ // use CSS transform
631
+ if(slider.usingCSS){
632
+ // determine the translate3d value
633
+ var propValue = slider.settings.mode === 'vertical' ? 'translate3d(0, ' + value + 'px, 0)' : 'translate3d(' + value + 'px, 0, 0)';
634
+ // add the CSS transition-duration
635
+ el.css('-' + slider.cssPrefix + '-transition-duration', duration / 1000 + 's');
636
+ if(type === 'slide'){
637
+ // set the property value
638
+ el.css(slider.animProp, propValue);
639
+ // bind a callback method - executes when CSS transition completes
640
+ el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
641
+ // unbind the callback
642
+ el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
643
+ updateAfterSlideTransition();
644
+ });
645
+ }else if(type === 'reset'){
646
+ el.css(slider.animProp, propValue);
647
+ }else if(type === 'ticker'){
648
+ // make the transition use 'linear'
649
+ el.css('-' + slider.cssPrefix + '-transition-timing-function', 'linear');
650
+ el.css(slider.animProp, propValue);
651
+ // bind a callback method - executes when CSS transition completes
652
+ el.bind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(){
653
+ // unbind the callback
654
+ el.unbind('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd');
655
+ // reset the position
656
+ setPositionProperty(params['resetValue'], 'reset', 0);
657
+ // start the loop again
658
+ tickerLoop();
659
+ });
660
+ }
661
+ // use JS animate
662
+ }else{
663
+ var animateObj = {};
664
+ animateObj[slider.animProp] = value;
665
+ if(type === 'slide'){
666
+ el.animate(animateObj, duration, slider.settings.easing, function(){
667
+ updateAfterSlideTransition();
668
+ });
669
+ }else if(type === 'reset'){
670
+ el.css(slider.animProp, value)
671
+ }else if(type === 'ticker'){
672
+ el.animate(animateObj, speed, 'linear', function(){
673
+ setPositionProperty(params['resetValue'], 'reset', 0);
674
+ // run the recursive loop after animation
675
+ tickerLoop();
676
+ });
677
+ }
678
+ }
679
+ };
680
+
681
+ /**
682
+ * Populates the pager with proper amount of pages
683
+ */
684
+ var populatePager = function(){
685
+ var pagerHtml = '';
686
+ var pagerQty = getPagerQty();
687
+ // loop through each pager item
688
+ for(var i=0; i < pagerQty; i++){
689
+ var linkContent = '';
690
+ // if a buildPager function is supplied, use it to get pager link value, else use index + 1
691
+ if(slider.settings.buildPager && $.isFunction(slider.settings.buildPager)){
692
+ linkContent = slider.settings.buildPager(i);
693
+ slider.pagerEl.addClass('soliloquy-custom-pager');
694
+ }else{
695
+ linkContent = i + 1;
696
+ slider.pagerEl.addClass('soliloquy-default-pager');
697
+ }
698
+ // var linkContent = slider.settings.buildPager && $.isFunction(slider.settings.buildPager) ? slider.settings.buildPager(i) : i + 1;
699
+ // add the markup to the string
700
+ pagerHtml += '<div class="soliloquy-pager-item"><a href="" data-slide-index="' + i + '" class="soliloquy-pager-link" tabindex="0"><span>' + linkContent + '</span></a></div>';
701
+ };
702
+ // populate the pager element with pager links
703
+ slider.pagerEl.html(pagerHtml);
704
+ };
705
+
706
+ /**
707
+ * Appends the pager to the controls element
708
+ */
709
+ var appendPager = function(){
710
+ // Create container for pager
711
+ if (!slider.settings.pagerCustom) {
712
+ // Auto generated pager - create container
713
+ slider.pagerEl = $('<div class="soliloquy-pager" />');
714
+ } else {
715
+ // Manually specified pager - insert
716
+ slider.pagerEl = $(slider.settings.pagerCustom);
717
+ }
718
+
719
+ // If a pager selector was supplied, populate it with the pager
720
+ if (slider.settings.pagerSelector) {
721
+ $(slider.settings.pagerSelector).html(slider.pagerEl);
722
+ } else {
723
+ slider.controls.el.addClass('soliloquy-has-pager').append(slider.pagerEl);
724
+ }
725
+
726
+ // If we are not using a custom pager, automatically populated slider.pagerEl
727
+ if (!slider.settings.pagerCustom) {
728
+ populatePager();
729
+ }
730
+
731
+ // Assign the clickPagerBind event
732
+ slider.pagerEl.on('click', 'a', clickPagerBind);
733
+ };
734
+
735
+ /**
736
+ * Appends prev / next controls to the controls element
737
+ */
738
+ var appendControls = function(){
739
+ slider.controls.next = $('<a class="soliloquy-next" href="" tabindex="0"><span>' + slider.settings.nextText + '</span></a>');
740
+ slider.controls.prev = $('<a class="soliloquy-prev" href="" tabindex="0"><span>' + slider.settings.prevText + '</span></a>');
741
+ // bind click actions to the controls
742
+ slider.controls.next.bind('click', clickNextBind);
743
+ slider.controls.prev.bind('click', clickPrevBind);
744
+ // if nextSlector was supplied, populate it
745
+ if(slider.settings.nextSelector){
746
+ $(slider.settings.nextSelector).append(slider.controls.next);
747
+ }
748
+ // if prevSlector was supplied, populate it
749
+ if(slider.settings.prevSelector){
750
+ $(slider.settings.prevSelector).append(slider.controls.prev);
751
+ }
752
+ // if no custom selectors were supplied
753
+ if(!slider.settings.nextSelector && !slider.settings.prevSelector){
754
+ // add the controls to the DOM
755
+ slider.controls.directionEl = $('<div class="soliloquy-controls-direction" />');
756
+ // add the control elements to the directionEl
757
+ slider.controls.directionEl.append(slider.controls.prev).append(slider.controls.next);
758
+ // slider.viewport.append(slider.controls.directionEl);
759
+ slider.controls.el.addClass('soliloquy-has-controls-direction').append(slider.controls.directionEl);
760
+ }
761
+ };
762
+
763
+ /**
764
+ * Appends start / stop auto controls to the controls element
765
+ */
766
+ var appendControlsAuto = function(){
767
+ slider.controls.start = $('<div class="soliloquy-controls-auto-item"><a class="soliloquy-start" href="" aria-label="play" tabindex="0"><span>' + slider.settings.startText + '</span></a></div>');
768
+ slider.controls.stop = $('<div class="soliloquy-controls-auto-item"><a class="soliloquy-stop" href="" aria-label="pause" tabindex="0"><span>' + slider.settings.stopText + '</span></a></div>');
769
+ // add the controls to the DOM
770
+ slider.controls.autoEl = $('<div class="soliloquy-controls-auto" />');
771
+ // bind click actions to the controls
772
+ slider.controls.autoEl.on('click', '.soliloquy-start', clickStartBind);
773
+ slider.controls.autoEl.on('click', '.soliloquy-stop', clickStopBind);
774
+ // if autoControlsCombine, insert only the "start" control
775
+ if(slider.settings.autoControlsCombine){
776
+ slider.controls.autoEl.append(slider.controls.start);
777
+ // if autoControlsCombine is false, insert both controls
778
+ }else{
779
+ slider.controls.autoEl.append(slider.controls.start).append(slider.controls.stop);
780
+ }
781
+ // if auto controls selector was supplied, populate it with the controls
782
+ if(slider.settings.autoControlsSelector){
783
+ $(slider.settings.autoControlsSelector).html(slider.controls.autoEl);
784
+ // if auto controls selector was not supplied, add it after the wrapper
785
+ }else{
786
+ slider.controls.el.addClass('soliloquy-has-controls-auto').append(slider.controls.autoEl);
787
+ }
788
+ // update the auto controls
789
+ updateAutoControls(slider.settings.autoStart ? 'stop' : 'start');
790
+ };
791
+
792
+ /**
793
+ * Appends image captions to the DOM
794
+ */
795
+ var appendCaptions = function(){
796
+ // cycle through each child
797
+ slider.children.each(function(index){
798
+ // get the image title attribute
799
+ var title = $(this).find('img:first').attr('title');
800
+ // append the caption
801
+ if (title != undefined && ('' + title).length) {
802
+ $(this).append('<div class="soliloquy-caption"><span>' + title + '</span></div>');
803
+ }
804
+ });
805
+ };
806
+
807
+ /**
808
+ * Click next binding
809
+ *
810
+ * @param e (event)
811
+ * - DOM event object
812
+ */
813
+ var clickNextBind = function(e){
814
+ // if auto show is running, stop it
815
+ if (slider.settings.auto) el.stopAuto();
816
+ el.goToNextSlide();
817
+ e.preventDefault();
818
+ };
819
+
820
+ /**
821
+ * Click prev binding
822
+ *
823
+ * @param e (event)
824
+ * - DOM event object
825
+ */
826
+ var clickPrevBind = function(e){
827
+ // if auto show is running, stop it
828
+ if (slider.settings.auto) el.stopAuto();
829
+ el.goToPrevSlide();
830
+ e.preventDefault();
831
+ };
832
+
833
+ /**
834
+ * Click start binding
835
+ *
836
+ * @param e (event)
837
+ * - DOM event object
838
+ */
839
+ var clickStartBind = function(e){
840
+ el.startAuto();
841
+ e.preventDefault();
842
+ };
843
+
844
+ /**
845
+ * Click stop binding
846
+ *
847
+ * @param e (event)
848
+ * - DOM event object
849
+ */
850
+ var clickStopBind = function(e){
851
+ el.stopAuto();
852
+ e.preventDefault();
853
+ };
854
+
855
+ /**
856
+ * Click pager binding
857
+ *
858
+ * @param e (event)
859
+ * - DOM event object
860
+ */
861
+ var clickPagerBind = function(e){
862
+ // if auto show is running, stop it
863
+ if (slider.settings.auto) el.stopAuto();
864
+ var pagerLink = $(e.currentTarget);
865
+ if(pagerLink.attr('data-slide-index') !== undefined){
866
+ var pagerIndex = parseInt(pagerLink.attr('data-slide-index'));
867
+ // if clicked pager link is not active, continue with the goToSlide call
868
+ if(pagerIndex != slider.active.index) el.goToSlide(pagerIndex);
869
+ e.preventDefault();
870
+ }
871
+ };
872
+
873
+ /**
874
+ * Updates the pager links with an active class
875
+ *
876
+ * @param slideIndex (int)
877
+ * - index of slide to make active
878
+ */
879
+ var updatePagerActive = function(slideIndex){
880
+ // if "short" pager type
881
+ var len = slider.children.length; // nb of children
882
+ if(slider.settings.pagerType === 'short'){
883
+ if(slider.settings.maxSlides > 1) {
884
+ len = Math.ceil(slider.children.length/slider.settings.maxSlides);
885
+ }
886
+ slider.pagerEl.html( (slideIndex + 1) + slider.settings.pagerShortSeparator + len);
887
+ return;
888
+ }
889
+ // remove all pager active classes
890
+ slider.pagerEl.find('a').removeClass('active');
891
+ // apply the active class for all pagers
892
+ slider.pagerEl.each(function(i, el) { $(el).find('a').eq(slideIndex).addClass('active'); });
893
+ };
894
+
895
+ /**
896
+ * Performs needed actions after a slide transition
897
+ */
898
+ var updateAfterSlideTransition = function(){
899
+ // if infinte loop is true
900
+ if(slider.settings.infiniteLoop){
901
+ var position = '';
902
+ // first slide
903
+ if(slider.active.index === 0){
904
+ // set the new position
905
+ position = slider.children.eq(0).position();
906
+ // carousel, last slide
907
+ }else if(slider.active.index == getPagerQty() - 1 && slider.carousel){
908
+ position = slider.children.eq((getPagerQty() - 1) * getMoveBy()).position();
909
+ // last slide
910
+ }else if(slider.active.index == slider.children.length - 1){
911
+ position = slider.children.eq(slider.children.length - 1).position();
912
+ }
913
+ if(position){
914
+ if (slider.settings.mode === 'horizontal') { setPositionProperty(-position.left, 'reset', 0); }
915
+ else if (slider.settings.mode === 'vertical') { setPositionProperty(-position.top, 'reset', 0); }
916
+ }
917
+ }
918
+ // declare that the transition is complete
919
+ slider.working = false;
920
+ // Added by Thomas
921
+ if(slider.settings.mode == 'fade'){
922
+ slider.viewport.css({overflow:''});
923
+ }
924
+ // onSlideAfter callback
925
+ slider.settings.onSlideAfter(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
926
+ };
927
+
928
+ /**
929
+ * Updates the auto controls state (either active, or combined switch)
930
+ *
931
+ * @param state (string) "start", "stop"
932
+ * - the new state of the auto show
933
+ */
934
+ var updateAutoControls = function(state){
935
+ // if autoControlsCombine is true, replace the current control with the new state
936
+ if(slider.settings.autoControlsCombine){
937
+ if ( slider.controls.autoEl ) {
938
+ slider.controls.autoEl.html(slider.controls[state]);
939
+ }
940
+ // if autoControlsCombine is false, apply the "active" class to the appropriate control
941
+ }else{
942
+ slider.controls.autoEl.find('a').removeClass('active');
943
+ slider.controls.autoEl.find('a:not(.soliloquy-' + state + ')').addClass('active');
944
+ }
945
+ };
946
+
947
+ /**
948
+ * Updates the direction controls (checks if either should be hidden)
949
+ */
950
+ var updateDirectionControls = function(){
951
+ if(getPagerQty() == 1){
952
+ slider.controls.prev.addClass('disabled');
953
+ slider.controls.next.addClass('disabled');
954
+ }else if(!slider.settings.infiniteLoop && slider.settings.hideControlOnEnd){
955
+ // if first slide
956
+ if (slider.active.index == 0){
957
+ slider.controls.prev.addClass('disabled');
958
+ slider.controls.next.removeClass('disabled');
959
+ // if last slide
960
+ }else if(slider.active.index == getPagerQty() - 1){
961
+ slider.controls.next.addClass('disabled');
962
+ slider.controls.prev.removeClass('disabled');
963
+ // if any slide in the middle
964
+ }else{
965
+ slider.controls.prev.removeClass('disabled');
966
+ slider.controls.next.removeClass('disabled');
967
+ }
968
+ }
969
+ };
970
+
971
+ /**
972
+ * Initialzes the auto process
973
+ */
974
+ var initAuto = function(){
975
+ // if autoDelay was supplied, launch the auto show using a setTimeout() call
976
+ if(slider.settings.autoDelay > 0){
977
+ var timeout = setTimeout(el.startAuto, slider.settings.autoDelay);
978
+ // if autoDelay was not supplied, start the auto show normally
979
+ }else{
980
+ el.startAuto();
981
+ }
982
+ // if autoHover is requested
983
+ if(slider.settings.autoHover){
984
+ // on el hover
985
+ el.hover(function(){
986
+ // if the auto show is currently playing (has an active interval)
987
+ if(slider.interval){
988
+ // stop the auto show and pass true agument which will prevent control update
989
+ el.stopAuto(true);
990
+ // create a new autoPaused value which will be used by the relative "mouseout" event
991
+ slider.autoPaused = true;
992
+ }
993
+ }, function(){
994
+ // if the autoPaused value was created be the prior "mouseover" event
995
+ if(slider.autoPaused){
996
+ // start the auto show and pass true agument which will prevent control update
997
+ el.startAuto(true);
998
+ // reset the autoPaused value
999
+ slider.autoPaused = null;
1000
+ }
1001
+ });
1002
+ }
1003
+ };
1004
+
1005
+ /**
1006
+ * Initialzes the ticker process
1007
+ */
1008
+ var initTicker = function(){
1009
+ var startPosition = 0;
1010
+ // if autoDirection is "next", append a clone of the entire slider
1011
+ if(slider.settings.autoDirection == 'next'){
1012
+ el.append(slider.children.clone().addClass('soliloquy-clone'));
1013
+ // if autoDirection is "prev", prepend a clone of the entire slider, and set the left position
1014
+ }else{
1015
+ el.prepend(slider.children.clone().addClass('soliloquy-clone'));
1016
+ var position = slider.children.first().position();
1017
+ startPosition = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
1018
+ }
1019
+ setPositionProperty(startPosition, 'reset', 0);
1020
+ // do not allow controls in ticker mode
1021
+ slider.settings.pager = false;
1022
+ slider.settings.controls = false;
1023
+ slider.settings.autoControls = false;
1024
+ // if autoHover is requested
1025
+ if(slider.settings.tickerHover && !slider.usingCSS){
1026
+ // on el hover
1027
+ slider.viewport.hover(function(){
1028
+ el.stop();
1029
+ }, function(){
1030
+ // calculate the total width of children (used to calculate the speed ratio)
1031
+ var totalDimens = 0;
1032
+ slider.children.each(function(index){
1033
+ totalDimens += slider.settings.mode == 'horizontal' ? $(this).outerWidth(true) : $(this).outerHeight(true);
1034
+ });
1035
+ // calculate the speed ratio (used to determine the new speed to finish the paused animation)
1036
+ var ratio = slider.settings.speed / totalDimens;
1037
+ // determine which property to use
1038
+ var property = slider.settings.mode == 'horizontal' ? 'left' : 'top';
1039
+ // calculate the new speed
1040
+ var newSpeed = ratio * (totalDimens - (Math.abs(parseInt(el.css(property)))));
1041
+ tickerLoop(newSpeed);
1042
+ });
1043
+ }
1044
+ // start the ticker loop
1045
+ tickerLoop();
1046
+ };
1047
+
1048
+ /**
1049
+ * Runs a continuous loop, news ticker-style
1050
+ */
1051
+ var tickerLoop = function(resumeSpeed){
1052
+ speed = resumeSpeed ? resumeSpeed : slider.settings.speed;
1053
+ var position = {left: 0, top: 0};
1054
+ var reset = {left: 0, top: 0};
1055
+ // if "next" animate left position to last child, then reset left to 0
1056
+ if(slider.settings.autoDirection == 'next'){
1057
+ position = el.find('.soliloquy-clone').first().position();
1058
+ // if "prev" animate left position to 0, then reset left to first non-clone child
1059
+ }else{
1060
+ reset = slider.children.first().position();
1061
+ }
1062
+ var animateProperty = slider.settings.mode == 'horizontal' ? -position.left : -position.top;
1063
+ var resetValue = slider.settings.mode == 'horizontal' ? -reset.left : -reset.top;
1064
+ var params = {resetValue: resetValue};
1065
+ setPositionProperty(animateProperty, 'ticker', speed, params);
1066
+ };
1067
+
1068
+ /**
1069
+ * Initializes touch events
1070
+ */
1071
+ var initTouch = function(){
1072
+ // initialize object to contain all touch values
1073
+ slider.touch = {
1074
+ start: {x: 0, y: 0},
1075
+ end: {x: 0, y: 0}
1076
+ }
1077
+ slider.viewport.bind('touchstart', onTouchStart);
1078
+ };
1079
+
1080
+ /**
1081
+ * Event handler for "touchstart"
1082
+ *
1083
+ * @param e (event)
1084
+ * - DOM event object
1085
+ */
1086
+ var onTouchStart = function(e){
1087
+ if(slider.working){
1088
+ e.preventDefault();
1089
+ }else{
1090
+ // record the original position when touch starts
1091
+ slider.touch.originalPos = el.position();
1092
+ var orig = e.originalEvent;
1093
+ // record the starting touch x, y coordinates
1094
+ slider.touch.start.x = orig.changedTouches[0].pageX;
1095
+ slider.touch.start.y = orig.changedTouches[0].pageY;
1096
+ // bind a "touchmove" event to the viewport
1097
+ slider.viewport.bind('touchmove', onTouchMove);
1098
+ // bind a "touchend" event to the viewport
1099
+ slider.viewport.bind('touchend', onTouchEnd);
1100
+ }
1101
+ };
1102
+
1103
+ /**
1104
+ * Event handler for "touchmove"
1105
+ *
1106
+ * @param e (event)
1107
+ * - DOM event object
1108
+ */
1109
+ var onTouchMove = function(e){
1110
+ var orig = e.originalEvent;
1111
+ // if scrolling on y axis, do not prevent default
1112
+ var xMovement = Math.abs(orig.changedTouches[0].pageX - slider.touch.start.x);
1113
+ var yMovement = Math.abs(orig.changedTouches[0].pageY - slider.touch.start.y);
1114
+ // x axis swipe
1115
+ if((xMovement * 3) > yMovement && slider.settings.preventDefaultSwipeX){
1116
+ e.preventDefault();
1117
+ // y axis swipe
1118
+ }else if((yMovement * 3) > xMovement && slider.settings.preventDefaultSwipeY){
1119
+ e.preventDefault();
1120
+ }
1121
+ if(slider.settings.mode != 'fade' && slider.settings.oneToOneTouch){
1122
+ var value = 0;
1123
+ // if horizontal, drag along x axis
1124
+ if(slider.settings.mode == 'horizontal'){
1125
+ var change = orig.changedTouches[0].pageX - slider.touch.start.x;
1126
+ value = slider.touch.originalPos.left + change;
1127
+ // if vertical, drag along y axis
1128
+ }else{
1129
+ var change = orig.changedTouches[0].pageY - slider.touch.start.y;
1130
+ value = slider.touch.originalPos.top + change;
1131
+ }
1132
+ setPositionProperty(value, 'reset', 0);
1133
+ }
1134
+ };
1135
+
1136
+ /**
1137
+ * Event handler for "touchend"
1138
+ *
1139
+ * @param e (event)
1140
+ * - DOM event object
1141
+ */
1142
+ var onTouchEnd = function(e){
1143
+ slider.viewport.unbind('touchmove', onTouchMove);
1144
+ var orig = e.originalEvent;
1145
+ var value = 0;
1146
+ // record end x, y positions
1147
+ slider.touch.end.x = orig.changedTouches[0].pageX;
1148
+ slider.touch.end.y = orig.changedTouches[0].pageY;
1149
+ // if fade mode, check if absolute x distance clears the threshold
1150
+ if(slider.settings.mode == 'fade'){
1151
+ var distance = Math.abs(slider.touch.start.x - slider.touch.end.x);
1152
+ if(distance >= slider.settings.swipeThreshold){
1153
+ slider.touch.start.x > slider.touch.end.x ? el.goToNextSlide() : el.goToPrevSlide();
1154
+ el.stopAuto();
1155
+ }
1156
+ // not fade mode
1157
+ }else{
1158
+ var distance = 0;
1159
+ // calculate distance and el's animate property
1160
+ if(slider.settings.mode == 'horizontal'){
1161
+ distance = slider.touch.end.x - slider.touch.start.x;
1162
+ value = slider.touch.originalPos.left;
1163
+ }else{
1164
+ distance = slider.touch.end.y - slider.touch.start.y;
1165
+ value = slider.touch.originalPos.top;
1166
+ }
1167
+ // if not infinite loop and first / last slide, do not attempt a slide transition
1168
+ if(!slider.settings.infiniteLoop && ((slider.active.index == 0 && distance > 0) || (slider.active.last && distance < 0))){
1169
+ setPositionProperty(value, 'reset', 200);
1170
+ }else{
1171
+ // check if distance clears threshold
1172
+ if(Math.abs(distance) >= slider.settings.swipeThreshold){
1173
+ distance < 0 ? el.goToNextSlide() : el.goToPrevSlide();
1174
+ el.stopAuto();
1175
+ }else{
1176
+ // el.animate(property, 200);
1177
+ setPositionProperty(value, 'reset', 200);
1178
+ }
1179
+ }
1180
+ }
1181
+ slider.viewport.unbind('touchend', onTouchEnd);
1182
+ };
1183
+
1184
+ /**
1185
+ * Window resize event callback
1186
+ */
1187
+ var resizeWindow = function(e){
1188
+ // don't do anything if slider isn't initialized.
1189
+ if(!slider.initialized) return;
1190
+ // get the new window dimens (again, thank you IE)
1191
+ var windowWidthNew = $(window).width();
1192
+ var windowHeightNew = $(window).height();
1193
+ // make sure that it is a true window resize
1194
+ // *we must check this because our dinosaur friend IE fires a window resize event when certain DOM elements
1195
+ // are resized. Can you just die already?*
1196
+ if(windowWidth != windowWidthNew || windowHeight != windowHeightNew){
1197
+ // set the new window dimens
1198
+ windowWidth = windowWidthNew;
1199
+ windowHeight = windowHeightNew;
1200
+ // update all dynamic elements
1201
+ el.redrawSlider();
1202
+ // Call user resize handler
1203
+ slider.settings.onSliderResize.call(el, slider.active.index);
1204
+ }
1205
+ };
1206
+
1207
+ /**
1208
+ * ===================================================================================
1209
+ * = PUBLIC FUNCTIONS
1210
+ * ===================================================================================
1211
+ */
1212
+
1213
+ /**
1214
+ * Performs slide transition to the specified slide
1215
+ *
1216
+ * @param slideIndex (int)
1217
+ * - the destination slide's index (zero-based)
1218
+ *
1219
+ * @param direction (string)
1220
+ * - INTERNAL USE ONLY - the direction of travel ("prev" / "next")
1221
+ */
1222
+ el.goToSlide = function(slideIndex, direction){
1223
+ // if plugin is currently in motion, ignore request
1224
+ if(slider.working || slider.active.index == slideIndex) return;
1225
+ // declare that plugin is in motion
1226
+ slider.working = true;
1227
+ // store the old index
1228
+ slider.oldIndex = slider.active.index;
1229
+ // if slideIndex is less than zero, set active index to last child (this happens during infinite loop)
1230
+ if(slideIndex < 0){
1231
+ slider.active.index = getPagerQty() - 1;
1232
+ // if slideIndex is greater than children length, set active index to 0 (this happens during infinite loop)
1233
+ }else if(slideIndex >= getPagerQty()){
1234
+ slider.active.index = 0;
1235
+ // set active index to requested slide
1236
+ }else{
1237
+ slider.active.index = slideIndex;
1238
+ }
1239
+ // onSlideBefore, onSlideNext, onSlidePrev callbacks
1240
+ slider.settings.onSlideBefore(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index, slider.children.eq(slider.oldIndex));
1241
+ if(direction == 'next'){
1242
+ slider.settings.onSlideNext(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1243
+ }else if(direction == 'prev'){
1244
+ slider.settings.onSlidePrev(slider.children.eq(slider.active.index), slider.oldIndex, slider.active.index);
1245
+ }
1246
+ // check if last slide
1247
+ slider.active.last = slider.active.index >= getPagerQty() - 1;
1248
+ // update the pager with active class
1249
+ if(slider.settings.pager) updatePagerActive(slider.active.index);
1250
+ // // check for direction control update
1251
+ if(slider.settings.controls) updateDirectionControls();
1252
+ // if slider is set to mode: "fade"
1253
+ if(slider.settings.mode == 'fade'){
1254
+ // Added by Thomas
1255
+ slider.viewport.css({overflow:'hidden'});
1256
+ // if adaptiveHeight is true and next height is different from current height, animate to the new height
1257
+ if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1258
+ slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1259
+ }
1260
+ // fade out the visible child and reset its z-index value
1261
+ slider.children.filter(':visible').fadeOut(slider.settings.speed).css({zIndex: 0});
1262
+ // fade in the newly requested slide
1263
+ slider.children.eq(slider.active.index).css('zIndex', slider.settings.slideZIndex+1).fadeIn(slider.settings.speed, function(){
1264
+ $(this).css('zIndex', slider.settings.slideZIndex);
1265
+ updateAfterSlideTransition();
1266
+ });
1267
+ // slider mode is not "fade"
1268
+ }else{
1269
+ // if adaptiveHeight is true and next height is different from current height, animate to the new height
1270
+ if(slider.settings.adaptiveHeight && slider.viewport.height() != getViewportHeight()){
1271
+ slider.viewport.animate({height: getViewportHeight()}, slider.settings.adaptiveHeightSpeed);
1272
+ }
1273
+ var moveBy = 0;
1274
+ var position = {left: 0, top: 0};
1275
+ // if carousel and not infinite loop
1276
+ if(!slider.settings.infiniteLoop && slider.carousel && slider.active.last){
1277
+ if(slider.settings.mode == 'horizontal'){
1278
+ // get the last child position
1279
+ var lastChild = slider.children.eq(slider.children.length - 1);
1280
+ position = lastChild.position();
1281
+ // calculate the position of the last slide
1282
+ moveBy = slider.viewport.width() - lastChild.outerWidth();
1283
+ }else{
1284
+ // get last showing index position
1285
+ var lastShowingIndex = slider.children.length - slider.settings.minSlides;
1286
+ position = slider.children.eq(lastShowingIndex).position();
1287
+ }
1288
+ // horizontal carousel, going previous while on first slide (infiniteLoop mode)
1289
+ }else if(slider.carousel && slider.active.last && direction == 'prev'){
1290
+ // get the last child position
1291
+ var eq = slider.settings.moveSlides == 1 ? slider.settings.maxSlides - getMoveBy() : ((getPagerQty() - 1) * getMoveBy()) - (slider.children.length - slider.settings.maxSlides);
1292
+ var lastChild = el.children('.soliloquy-clone').eq(eq);
1293
+ position = lastChild.position();
1294
+ // if infinite loop and "Next" is clicked on the last slide
1295
+ }else if(direction == 'next' && slider.active.index == 0){
1296
+ // get the last clone position
1297
+ position = el.find('> .soliloquy-clone').eq(slider.settings.maxSlides).position();
1298
+ slider.active.last = false;
1299
+ // normal non-zero requests
1300
+ }else if(slideIndex >= 0){
1301
+ var requestEl = slideIndex * getMoveBy();
1302
+ position = slider.children.eq(requestEl).position();
1303
+ }
1304
+
1305
+ /* If the position doesn't exist
1306
+ * (e.g. if you destroy the slider on a next click),
1307
+ * it doesn't throw an error.
1308
+ */
1309
+ if ("undefined" !== typeof(position)) {
1310
+ var value = slider.settings.mode == 'horizontal' ? -(position.left - moveBy) : -position.top;
1311
+ // plugin values to be animated
1312
+ setPositionProperty(value, 'slide', slider.settings.speed);
1313
+ }
1314
+ }
1315
+ };
1316
+
1317
+ /**
1318
+ * Transitions to the next slide in the show
1319
+ */
1320
+ el.goToNextSlide = function(){
1321
+ // if infiniteLoop is false and last page is showing, disregard call
1322
+ if (!slider.settings.infiniteLoop && slider.active.last) return;
1323
+ var pagerIndex = parseInt(slider.active.index) + 1;
1324
+ el.goToSlide(pagerIndex, 'next');
1325
+ };
1326
+
1327
+ /**
1328
+ * Transitions to the prev slide in the show
1329
+ */
1330
+ el.goToPrevSlide = function(){
1331
+ // if infiniteLoop is false and last page is showing, disregard call
1332
+ if (!slider.settings.infiniteLoop && slider.active.index == 0) return;
1333
+ var pagerIndex = parseInt(slider.active.index) - 1;
1334
+ el.goToSlide(pagerIndex, 'prev');
1335
+ };
1336
+
1337
+ /**
1338
+ * Starts the auto show
1339
+ *
1340
+ * @param preventControlUpdate (boolean)
1341
+ * - if true, auto controls state will not be updated
1342
+ */
1343
+ el.startAuto = function(preventControlUpdate){
1344
+ // if an interval already exists, disregard call
1345
+ if(slider.interval) return;
1346
+ // create an interval
1347
+ slider.interval = setInterval(function(){
1348
+ slider.settings.autoDirection == 'next' ? el.goToNextSlide() : el.goToPrevSlide();
1349
+ }, slider.settings.pause);
1350
+ // if auto controls are displayed and preventControlUpdate is not true
1351
+ if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('stop');
1352
+ };
1353
+
1354
+ /**
1355
+ * Stops the auto show
1356
+ *
1357
+ * @param preventControlUpdate (boolean)
1358
+ * - if true, auto controls state will not be updated
1359
+ */
1360
+ el.stopAuto = function(preventControlUpdate){
1361
+ // if no interval exists, disregard call
1362
+ if(!slider.interval) return;
1363
+ // clear the interval
1364
+ clearInterval(slider.interval);
1365
+ slider.interval = null;
1366
+ // if auto controls are displayed and preventControlUpdate is not true
1367
+ if (slider.settings.autoControls && preventControlUpdate != true) updateAutoControls('start');
1368
+ };
1369
+
1370
+ /**
1371
+ * Returns current slide index (zero-based)
1372
+ */
1373
+ el.getCurrentSlide = function(){
1374
+ return slider.active.index;
1375
+ };
1376
+
1377
+ /**
1378
+ * Returns current slide element
1379
+ */
1380
+ el.getCurrentSlideElement = function(){
1381
+ return slider.children.eq(slider.active.index);
1382
+ };
1383
+
1384
+ /**
1385
+ * Returns number of slides in show
1386
+ */
1387
+ el.getSlideCount = function(){
1388
+ return slider.children.length;
1389
+ };
1390
+
1391
+ /**
1392
+ * Update all dynamic slider elements
1393
+ */
1394
+ el.redrawSlider = function(){
1395
+ // resize all children in ratio to new screen size
1396
+ slider.children.add(el.find('.soliloquy-clone')).width(getSlideWidth());
1397
+ // adjust the height
1398
+ slider.viewport.css('height', getViewportHeight());
1399
+ // update the slide position
1400
+ if(!slider.settings.ticker) {
1401
+ setSlidePosition();
1402
+ }
1403
+ // if active.last was true before the screen resize, we want
1404
+ // to keep it last no matter what screen size we end on
1405
+ if (slider.active.last) {
1406
+ slider.active.index = getPagerQty() - 1;
1407
+ }
1408
+ // if the active index (page) no longer exists due to the resize, simply set the index as last
1409
+ if (slider.active.index >= getPagerQty()) {
1410
+ slider.active.last = true;
1411
+ }
1412
+ // if a pager is being displayed and a custom pager is not being used, update it
1413
+ if(slider.settings.pager && !slider.settings.pagerCustom){
1414
+ populatePager();
1415
+ updatePagerActive(slider.active.index);
1416
+ }
1417
+ };
1418
+
1419
+ /**
1420
+ * Destroy the current instance of the slider (revert everything back to original state)
1421
+ */
1422
+ el.destroySlider = function(){
1423
+ // don't do anything if slider has already been destroyed
1424
+ if(!slider.initialized) {
1425
+ return;
1426
+ }
1427
+ slider.initialized = false;
1428
+ $('.soliloquy-clone', this).remove();
1429
+ slider.children.each(function() {
1430
+ $(this).data("origStyle") !== undefined ? $(this).attr("style", $(this).data("origStyle")) : $(this).removeAttr('style');
1431
+ });
1432
+ $(this).data("origStyle") !== undefined ? this.attr("style", $(this).data("origStyle")) : $(this).removeAttr('style');
1433
+ $(this).unwrap().unwrap();
1434
+ if(slider.controls.el) {
1435
+ slider.controls.el.remove();
1436
+ }
1437
+ if(slider.controls.next) {
1438
+ slider.controls.next.remove();
1439
+ }
1440
+ if(slider.controls.prev) {
1441
+ slider.controls.prev.remove();
1442
+ }
1443
+ if(slider.pagerEl && slider.settings.controls) {
1444
+ slider.pagerEl.remove();
1445
+ }
1446
+ $('.soliloquy-caption', this).remove();
1447
+ if(slider.controls.autoEl) {
1448
+ slider.controls.autoEl.remove();
1449
+ }
1450
+ clearInterval(slider.interval);
1451
+
1452
+ if(slider.settings.responsive) {
1453
+ $(window).unbind('resize', resizeWindow);
1454
+ }
1455
+ };
1456
+
1457
+ /**
1458
+ * Reload the slider (revert all DOM changes, and re-initialize)
1459
+ */
1460
+ el.reloadSlider = function(settings){
1461
+ if (settings !== undefined) {
1462
+ options = settings;
1463
+ }
1464
+ el.destroySlider();
1465
+ init();
1466
+ };
1467
+
1468
+ el.getSetting = function(setting){
1469
+ if ( slider.settings[setting] ) {
1470
+ return slider.settings[setting];
1471
+ } else {
1472
+ return false;
1473
+ }
1474
+ };
1475
+
1476
+ init();
1477
+
1478
+ // returns the current jQuery object
1479
+ return this;
1480
+ };
1481
+
1482
+ })(jQuery, window, document);
assets/js/lib/chosen.jquery.js ADDED
@@ -0,0 +1,1284 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ Chosen, a Select Box Enhancer for jQuery and Prototype
3
+ by Patrick Filler for Harvest, http://getharvest.com
4
+
5
+ Version 1.5.1
6
+ Full source at https://github.com/harvesthq/chosen
7
+ Copyright (c) 2011-2016 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.
11
+ */
12
+
13
+ (function() {
14
+ var $, AbstractChosen, Chosen, SelectParser, _ref,
15
+ __hasProp = {}.hasOwnProperty,
16
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
17
+
18
+ SelectParser = (function() {
19
+ function SelectParser() {
20
+ this.options_index = 0;
21
+ this.parsed = [];
22
+ }
23
+
24
+ SelectParser.prototype.add_node = function(child) {
25
+ if (child.nodeName.toUpperCase() === "OPTGROUP") {
26
+ return this.add_group(child);
27
+ } else {
28
+ return this.add_option(child);
29
+ }
30
+ };
31
+
32
+ SelectParser.prototype.add_group = function(group) {
33
+ var group_position, option, _i, _len, _ref, _results;
34
+ group_position = this.parsed.length;
35
+ this.parsed.push({
36
+ array_index: group_position,
37
+ group: true,
38
+ label: this.escapeExpression(group.label),
39
+ title: group.title ? group.title : void 0,
40
+ children: 0,
41
+ disabled: group.disabled,
42
+ classes: group.className
43
+ });
44
+ _ref = group.childNodes;
45
+ _results = [];
46
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
47
+ option = _ref[_i];
48
+ _results.push(this.add_option(option, group_position, group.disabled));
49
+ }
50
+ return _results;
51
+ };
52
+
53
+ SelectParser.prototype.add_option = function(option, group_position, group_disabled) {
54
+ if (option.nodeName.toUpperCase() === "OPTION") {
55
+ if (option.text !== "") {
56
+ if (group_position != null) {
57
+ this.parsed[group_position].children += 1;
58
+ }
59
+ this.parsed.push({
60
+ array_index: this.parsed.length,
61
+ options_index: this.options_index,
62
+ value: option.value,
63
+ text: option.text,
64
+ html: option.innerHTML,
65
+ title: option.title ? option.title : void 0,
66
+ selected: option.selected,
67
+ disabled: group_disabled === true ? group_disabled : option.disabled,
68
+ group_array_index: group_position,
69
+ group_label: group_position != null ? this.parsed[group_position].label : null,
70
+ classes: option.className,
71
+ style: option.style.cssText
72
+ });
73
+ } else {
74
+ this.parsed.push({
75
+ array_index: this.parsed.length,
76
+ options_index: this.options_index,
77
+ empty: true
78
+ });
79
+ }
80
+ return this.options_index += 1;
81
+ }
82
+ };
83
+
84
+ SelectParser.prototype.escapeExpression = function(text) {
85
+ var map, unsafe_chars;
86
+ if ((text == null) || text === false) {
87
+ return "";
88
+ }
89
+ if (!/[\&\<\>\"\'\`]/.test(text)) {
90
+ return text;
91
+ }
92
+ map = {
93
+ "<": "&lt;",
94
+ ">": "&gt;",
95
+ '"': "&quot;",
96
+ "'": "&#x27;",
97
+ "`": "&#x60;"
98
+ };
99
+ unsafe_chars = /&(?!\w+;)|[\<\>\"\'\`]/g;
100
+ return text.replace(unsafe_chars, function(chr) {
101
+ return map[chr] || "&amp;";
102
+ });
103
+ };
104
+
105
+ return SelectParser;
106
+
107
+ })();
108
+
109
+ SelectParser.select_to_array = function(select) {
110
+ var child, parser, _i, _len, _ref;
111
+ parser = new SelectParser();
112
+ _ref = select.childNodes;
113
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
114
+ child = _ref[_i];
115
+ parser.add_node(child);
116
+ }
117
+ return parser.parsed;
118
+ };
119
+
120
+ AbstractChosen = (function() {
121
+ function AbstractChosen(form_field, options) {
122
+ this.form_field = form_field;
123
+ this.options = options != null ? options : {};
124
+ if (!AbstractChosen.browser_is_supported()) {
125
+ return;
126
+ }
127
+ this.is_multiple = this.form_field.multiple;
128
+ this.set_default_text();
129
+ this.set_default_values();
130
+ this.setup();
131
+ this.set_up_html();
132
+ this.register_observers();
133
+ this.on_ready();
134
+ }
135
+
136
+ AbstractChosen.prototype.set_default_values = function() {
137
+ var _this = this;
138
+ this.click_test_action = function(evt) {
139
+ return _this.test_active_click(evt);
140
+ };
141
+ this.activate_action = function(evt) {
142
+ return _this.activate_field(evt);
143
+ };
144
+ this.active_field = false;
145
+ this.mouse_on_container = false;
146
+ this.results_showing = false;
147
+ this.result_highlighted = null;
148
+ this.allow_single_deselect = (this.options.allow_single_deselect != null) && (this.form_field.options[0] != null) && this.form_field.options[0].text === "" ? this.options.allow_single_deselect : false;
149
+ this.disable_search_threshold = this.options.disable_search_threshold || 0;
150
+ this.disable_search = this.options.disable_search || false;
151
+ this.enable_split_word_search = this.options.enable_split_word_search != null ? this.options.enable_split_word_search : true;
152
+ this.group_search = this.options.group_search != null ? this.options.group_search : true;
153
+ this.search_contains = this.options.search_contains || false;
154
+ this.single_backstroke_delete = this.options.single_backstroke_delete != null ? this.options.single_backstroke_delete : true;
155
+ this.max_selected_options = this.options.max_selected_options || Infinity;
156
+ this.inherit_select_classes = this.options.inherit_select_classes || false;
157
+ this.display_selected_options = this.options.display_selected_options != null ? this.options.display_selected_options : true;
158
+ this.display_disabled_options = this.options.display_disabled_options != null ? this.options.display_disabled_options : true;
159
+ this.include_group_label_in_selected = this.options.include_group_label_in_selected || false;
160
+ return this.max_shown_results = this.options.max_shown_results || Number.POSITIVE_INFINITY;
161
+ };
162
+
163
+ AbstractChosen.prototype.set_default_text = function() {
164
+ if (this.form_field.getAttribute("data-placeholder")) {
165
+ this.default_text = this.form_field.getAttribute("data-placeholder");
166
+ } else if (this.is_multiple) {
167
+ this.default_text = this.options.placeholder_text_multiple || this.options.placeholder_text || AbstractChosen.default_multiple_text;
168
+ } else {
169
+ this.default_text = this.options.placeholder_text_single || this.options.placeholder_text || AbstractChosen.default_single_text;
170
+ }
171
+ return this.results_none_found = this.form_field.getAttribute("data-no_results_text") || this.options.no_results_text || AbstractChosen.default_no_result_text;
172
+ };
173
+
174
+ AbstractChosen.prototype.choice_label = function(item) {
175
+ if (this.include_group_label_in_selected && (item.group_label != null)) {
176
+ return "<b class='group-name'>" + item.group_label + "</b>" + item.html;
177
+ } else {
178
+ return item.html;
179
+ }
180
+ };
181
+
182
+ AbstractChosen.prototype.mouse_enter = function() {
183
+ return this.mouse_on_container = true;
184
+ };
185
+
186
+ AbstractChosen.prototype.mouse_leave = function() {
187
+ return this.mouse_on_container = false;
188
+ };
189
+
190
+ AbstractChosen.prototype.input_focus = function(evt) {
191
+ var _this = this;
192
+ if (this.is_multiple) {
193
+ if (!this.active_field) {
194
+ return setTimeout((function() {
195
+ return _this.container_mousedown();
196
+ }), 50);
197
+ }
198
+ } else {
199
+ if (!this.active_field) {
200
+ return this.activate_field();
201
+ }
202
+ }
203
+ };
204
+
205
+ AbstractChosen.prototype.input_blur = function(evt) {
206
+ var _this = this;
207
+ if (!this.mouse_on_container) {
208
+ this.active_field = false;
209
+ return setTimeout((function() {
210
+ return _this.blur_test();
211
+ }), 100);
212
+ }
213
+ };
214
+
215
+ AbstractChosen.prototype.results_option_build = function(options) {
216
+ var content, data, data_content, shown_results, _i, _len, _ref;
217
+ content = '';
218
+ shown_results = 0;
219
+ _ref = this.results_data;
220
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
221
+ data = _ref[_i];
222
+ data_content = '';
223
+ if (data.group) {
224
+ data_content = this.result_add_group(data);
225
+ } else {
226
+ data_content = this.result_add_option(data);
227
+ }
228
+ if (data_content !== '') {
229
+ shown_results++;
230
+ content += data_content;
231
+ }
232
+ if (options != null ? options.first : void 0) {
233
+ if (data.selected && this.is_multiple) {
234
+ this.choice_build(data);
235
+ } else if (data.selected && !this.is_multiple) {
236
+ this.single_set_selected_text(this.choice_label(data));
237
+ }
238
+ }
239
+ if (shown_results >= this.max_shown_results) {
240
+ break;
241
+ }
242
+ }
243
+ return content;
244
+ };
245
+
246
+ AbstractChosen.prototype.result_add_option = function(option) {
247
+ var classes, option_el;
248
+ if (!option.search_match) {
249
+ return '';
250
+ }
251
+ if (!this.include_option_in_results(option)) {
252
+ return '';
253
+ }
254
+ classes = [];
255
+ if (!option.disabled && !(option.selected && this.is_multiple)) {
256
+ classes.push("active-result");
257
+ }
258
+ if (option.disabled && !(option.selected && this.is_multiple)) {
259
+ classes.push("disabled-result");
260
+ }
261
+ if (option.selected) {
262
+ classes.push("result-selected");
263
+ }
264
+ if (option.group_array_index != null) {
265
+ classes.push("group-option");
266
+ }
267
+ if (option.classes !== "") {
268
+ classes.push(option.classes);
269
+ }
270
+ option_el = document.createElement("li");
271
+ option_el.className = classes.join(" ");
272
+ option_el.style.cssText = option.style;
273
+ option_el.setAttribute("data-option-array-index", option.array_index);
274
+ option_el.innerHTML = option.search_text;
275
+ if (option.title) {
276
+ option_el.title = option.title;
277
+ }
278
+ return this.outerHTML(option_el);
279
+ };
280
+
281
+ AbstractChosen.prototype.result_add_group = function(group) {
282
+ var classes, group_el;
283
+ if (!(group.search_match || group.group_match)) {
284
+ return '';
285
+ }
286
+ if (!(group.active_options > 0)) {
287
+ return '';
288
+ }
289
+ classes = [];
290
+ classes.push("group-result");
291
+ if (group.classes) {
292
+ classes.push(group.classes);
293
+ }
294
+ group_el = document.createElement("li");
295
+ group_el.className = classes.join(" ");
296
+ group_el.innerHTML = group.search_text;
297
+ if (group.title) {
298
+ group_el.title = group.title;
299
+ }
300
+ return this.outerHTML(group_el);
301
+ };
302
+
303
+ AbstractChosen.prototype.results_update_field = function() {
304
+ this.set_default_text();
305
+ if (!this.is_multiple) {
306
+ this.results_reset_cleanup();
307
+ }
308
+ this.result_clear_highlight();
309
+ this.results_build();
310
+ if (this.results_showing) {
311
+ return this.winnow_results();
312
+ }
313
+ };
314
+
315
+ AbstractChosen.prototype.reset_single_select_options = function() {
316
+ var result, _i, _len, _ref, _results;
317
+ _ref = this.results_data;
318
+ _results = [];
319
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
320
+ result = _ref[_i];
321
+ if (result.selected) {
322
+ _results.push(result.selected = false);
323
+ } else {
324
+ _results.push(void 0);
325
+ }
326
+ }
327
+ return _results;
328
+ };
329
+
330
+ AbstractChosen.prototype.results_toggle = function() {
331
+ if (this.results_showing) {
332
+ return this.results_hide();
333
+ } else {
334
+ return this.results_show();
335
+ }
336
+ };
337
+
338
+ AbstractChosen.prototype.results_search = function(evt) {
339
+ if (this.results_showing) {
340
+ return this.winnow_results();
341
+ } else {
342
+ return this.results_show();
343
+ }
344
+ };
345
+
346
+ AbstractChosen.prototype.winnow_results = function() {
347
+ var escapedSearchText, option, regex, results, results_group, searchText, startpos, text, zregex, _i, _len, _ref;
348
+ this.no_results_clear();
349
+ results = 0;
350
+ searchText = this.get_search_text();
351
+ escapedSearchText = searchText.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
352
+ zregex = new RegExp(escapedSearchText, 'i');
353
+ regex = this.get_search_regex(escapedSearchText);
354
+ _ref = this.results_data;
355
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
356
+ option = _ref[_i];
357
+ option.search_match = false;
358
+ results_group = null;
359
+ if (this.include_option_in_results(option)) {
360
+ if (option.group) {
361
+ option.group_match = false;
362
+ option.active_options = 0;
363
+ }
364
+ if ((option.group_array_index != null) && this.results_data[option.group_array_index]) {
365
+ results_group = this.results_data[option.group_array_index];
366
+ if (results_group.active_options === 0 && results_group.search_match) {
367
+ results += 1;
368
+ }
369
+ results_group.active_options += 1;
370
+ }
371
+ option.search_text = option.group ? option.label : option.html;
372
+ if (!(option.group && !this.group_search)) {
373
+ option.search_match = this.search_string_match(option.search_text, regex);
374
+ if (option.search_match && !option.group) {
375
+ results += 1;
376
+ }
377
+ if (option.search_match) {
378
+ if (searchText.length) {
379
+ startpos = option.search_text.search(zregex);
380
+ text = option.search_text.substr(0, startpos + searchText.length) + '</em>' + option.search_text.substr(startpos + searchText.length);
381
+ option.search_text = text.substr(0, startpos) + '<em>' + text.substr(startpos);
382
+ }
383
+ if (results_group != null) {
384
+ results_group.group_match = true;
385
+ }
386
+ } else if ((option.group_array_index != null) && this.results_data[option.group_array_index].search_match) {
387
+ option.search_match = true;
388
+ }
389
+ }
390
+ }
391
+ }
392
+ this.result_clear_highlight();
393
+ if (results < 1 && searchText.length) {
394
+ this.update_results_content("");
395
+ return this.no_results(searchText);
396
+ } else {
397
+ this.update_results_content(this.results_option_build());
398
+ return this.winnow_results_set_highlight();
399
+ }
400
+ };
401
+
402
+ AbstractChosen.prototype.get_search_regex = function(escaped_search_string) {
403
+ var regex_anchor;
404
+ regex_anchor = this.search_contains ? "" : "^";
405
+ return new RegExp(regex_anchor + escaped_search_string, 'i');
406
+ };
407
+
408
+ AbstractChosen.prototype.search_string_match = function(search_string, regex) {
409
+ var part, parts, _i, _len;
410
+ if (regex.test(search_string)) {
411
+ return true;
412
+ } else if (this.enable_split_word_search && (search_string.indexOf(" ") >= 0 || search_string.indexOf("[") === 0)) {
413
+ parts = search_string.replace(/\[|\]/g, "").split(" ");
414
+ if (parts.length) {
415
+ for (_i = 0, _len = parts.length; _i < _len; _i++) {
416
+ part = parts[_i];
417
+ if (regex.test(part)) {
418
+ return true;
419
+ }
420
+ }
421
+ }
422
+ }
423
+ };
424
+
425
+ AbstractChosen.prototype.choices_count = function() {
426
+ var option, _i, _len, _ref;
427
+ if (this.selected_option_count != null) {
428
+ return this.selected_option_count;
429
+ }
430
+ this.selected_option_count = 0;
431
+ _ref = this.form_field.options;
432
+ for (_i = 0, _len = _ref.length; _i < _len; _i++) {
433
+ option = _ref[_i];
434
+ if (option.selected) {
435
+ this.selected_option_count += 1;
436
+ }
437
+ }
438
+ return this.selected_option_count;
439
+ };
440
+
441
+ AbstractChosen.prototype.choices_click = function(evt) {
442
+ evt.preventDefault();
443
+ if (!(this.results_showing || this.is_disabled)) {
444
+ return this.results_show();
445
+ }
446
+ };
447
+
448
+ AbstractChosen.prototype.keyup_checker = function(evt) {
449
+ var stroke, _ref;
450
+ stroke = (_ref = evt.which) != null ? _ref : evt.keyCode;
451
+ this.search_field_scale();
452
+ switch (stroke) {
453
+ case 8:
454
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0) {
455
+ return this.keydown_backstroke();
456
+ } else if (!this.pending_backstroke) {
457
+ this.result_clear_highlight();
458
+ return this.results_search();
459
+ }
460
+ break;
461
+ case 13:
462
+ evt.preventDefault();
463
+ if (this.results_showing) {
464
+ return this.result_select(evt);
465
+ }
466
+ break;
467
+ case 27:
468
+ if (this.results_showing) {
469
+ this.results_hide();
470
+ }
471
+ return true;
472
+ case 9:
473
+ case 38:
474
+ case 40:
475
+ case 16:
476
+ case 91:
477
+ case 17:
478
+ case 18:
479
+ break;
480
+ default:
481
+ return this.results_search();
482
+ }
483
+ };
484
+
485
+ AbstractChosen.prototype.clipboard_event_checker = function(evt) {
486
+ var _this = this;
487
+ return setTimeout((function() {
488
+ return _this.results_search();
489
+ }), 50);
490
+ };
491
+
492
+ AbstractChosen.prototype.container_width = function() {
493
+ if (this.options.width != null) {
494
+ return this.options.width;
495
+ } else {
496
+ return "" + this.form_field.offsetWidth + "px";
497
+ }
498
+ };
499
+
500
+ AbstractChosen.prototype.include_option_in_results = function(option) {
501
+ if (this.is_multiple && (!this.display_selected_options && option.selected)) {
502
+ return false;
503
+ }
504
+ if (!this.display_disabled_options && option.disabled) {
505
+ return false;
506
+ }
507
+ if (option.empty) {
508
+ return false;
509
+ }
510
+ return true;
511
+ };
512
+
513
+ AbstractChosen.prototype.search_results_touchstart = function(evt) {
514
+ this.touch_started = true;
515
+ return this.search_results_mouseover(evt);
516
+ };
517
+
518
+ AbstractChosen.prototype.search_results_touchmove = function(evt) {
519
+ this.touch_started = false;
520
+ return this.search_results_mouseout(evt);
521
+ };
522
+
523
+ AbstractChosen.prototype.search_results_touchend = function(evt) {
524
+ if (this.touch_started) {
525
+ return this.search_results_mouseup(evt);
526
+ }
527
+ };
528
+
529
+ AbstractChosen.prototype.outerHTML = function(element) {
530
+ var tmp;
531
+ if (element.outerHTML) {
532
+ return element.outerHTML;
533
+ }
534
+ tmp = document.createElement("div");
535
+ tmp.appendChild(element);
536
+ return tmp.innerHTML;
537
+ };
538
+
539
+ AbstractChosen.browser_is_supported = function() {
540
+ if (/iP(od|hone)/i.test(window.navigator.userAgent)) {
541
+ return false;
542
+ }
543
+ if (/Android/i.test(window.navigator.userAgent)) {
544
+ if (/Mobile/i.test(window.navigator.userAgent)) {
545
+ return false;
546
+ }
547
+ }
548
+ if (/IEMobile/i.test(window.navigator.userAgent)) {
549
+ return false;
550
+ }
551
+ if (/Windows Phone/i.test(window.navigator.userAgent)) {
552
+ return false;
553
+ }
554
+ if (/BlackBerry/i.test(window.navigator.userAgent)) {
555
+ return false;
556
+ }
557
+ if (/BB10/i.test(window.navigator.userAgent)) {
558
+ return false;
559
+ }
560
+ if (window.navigator.appName === "Microsoft Internet Explorer") {
561
+ return document.documentMode >= 8;
562
+ }
563
+ return true;
564
+ };
565
+
566
+ AbstractChosen.default_multiple_text = "Select Some Options";
567
+
568
+ AbstractChosen.default_single_text = "Select an Option";
569
+
570
+ AbstractChosen.default_no_result_text = "No results match";
571
+
572
+ return AbstractChosen;
573
+
574
+ })();
575
+
576
+ $ = jQuery;
577
+
578
+ $.fn.extend({
579
+ chosen: function(options) {
580
+ if (!AbstractChosen.browser_is_supported()) {
581
+ return this;
582
+ }
583
+ return this.each(function(input_field) {
584
+ var $this, chosen;
585
+ $this = $(this);
586
+ chosen = $this.data('chosen');
587
+ if (options === 'destroy') {
588
+ if (chosen instanceof Chosen) {
589
+ chosen.destroy();
590
+ }
591
+ return;
592
+ }
593
+ if (!(chosen instanceof Chosen)) {
594
+ $this.data('chosen', new Chosen(this, options));
595
+ }
596
+ });
597
+ }
598
+ });
599
+
600
+ Chosen = (function(_super) {
601
+ __extends(Chosen, _super);
602
+
603
+ function Chosen() {
604
+ _ref = Chosen.__super__.constructor.apply(this, arguments);
605
+ return _ref;
606
+ }
607
+
608
+ Chosen.prototype.setup = function() {
609
+ this.form_field_jq = $(this.form_field);
610
+ this.current_selectedIndex = this.form_field.selectedIndex;
611
+ return this.is_rtl = this.form_field_jq.hasClass("chosen-rtl");
612
+ };
613
+
614
+ Chosen.prototype.set_up_html = function() {
615
+ var container_classes, container_props;
616
+ container_classes = ["chosen-container"];
617
+ container_classes.push("chosen-container-" + (this.is_multiple ? "multi" : "single"));
618
+ if (this.inherit_select_classes && this.form_field.className) {
619
+ container_classes.push(this.form_field.className);
620
+ }
621
+ if (this.is_rtl) {
622
+ container_classes.push("chosen-rtl");
623
+ }
624
+ container_props = {
625
+ 'class': container_classes.join(' '),
626
+ 'style': "width: " + (this.container_width()) + ";",
627
+ 'title': this.form_field.title
628
+ };
629
+ if (this.form_field.id.length) {
630
+ container_props.id = this.form_field.id.replace(/[^\w]/g, '_') + "_chosen";
631
+ }
632
+ this.container = $("<div />", container_props);
633
+ if (this.is_multiple) {
634
+ 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>');
635
+ } else {
636
+ this.container.html('<a class="chosen-single chosen-default"><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>');
637
+ }
638
+ this.form_field_jq.hide().after(this.container);
639
+ this.dropdown = this.container.find('div.chosen-drop').first();
640
+ this.search_field = this.container.find('input').first();
641
+ this.search_results = this.container.find('ul.chosen-results').first();
642
+ this.search_field_scale();
643
+ this.search_no_results = this.container.find('li.no-results').first();
644
+ if (this.is_multiple) {
645
+ this.search_choices = this.container.find('ul.chosen-choices').first();
646
+ this.search_container = this.container.find('li.search-field').first();
647
+ } else {
648
+ this.search_container = this.container.find('div.chosen-search').first();
649
+ this.selected_item = this.container.find('.chosen-single').first();
650
+ }
651
+ this.results_build();
652
+ this.set_tab_index();
653
+ return this.set_label_behavior();
654
+ };
655
+
656
+ Chosen.prototype.on_ready = function() {
657
+ return this.form_field_jq.trigger("chosen:ready", {
658
+ chosen: this
659
+ });
660
+ };
661
+
662
+ Chosen.prototype.register_observers = function() {
663
+ var _this = this;
664
+ this.container.bind('touchstart.chosen', function(evt) {
665
+ _this.container_mousedown(evt);
666
+ return evt.preventDefault();
667
+ });
668
+ this.container.bind('touchend.chosen', function(evt) {
669
+ _this.container_mouseup(evt);
670
+ return evt.preventDefault();
671
+ });
672
+ this.container.bind('mousedown.chosen', function(evt) {
673
+ _this.container_mousedown(evt);
674
+ });
675
+ this.container.bind('mouseup.chosen', function(evt) {
676
+ _this.container_mouseup(evt);
677
+ });
678
+ this.container.bind('mouseenter.chosen', function(evt) {
679
+ _this.mouse_enter(evt);
680
+ });
681
+ this.container.bind('mouseleave.chosen', function(evt) {
682
+ _this.mouse_leave(evt);
683
+ });
684
+ this.search_results.bind('mouseup.chosen', function(evt) {
685
+ _this.search_results_mouseup(evt);
686
+ });
687
+ this.search_results.bind('mouseover.chosen', function(evt) {
688
+ _this.search_results_mouseover(evt);
689
+ });
690
+ this.search_results.bind('mouseout.chosen', function(evt) {
691
+ _this.search_results_mouseout(evt);
692
+ });
693
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function(evt) {
694
+ _this.search_results_mousewheel(evt);
695
+ });
696
+ this.search_results.bind('touchstart.chosen', function(evt) {
697
+ _this.search_results_touchstart(evt);
698
+ });
699
+ this.search_results.bind('touchmove.chosen', function(evt) {
700
+ _this.search_results_touchmove(evt);
701
+ });
702
+ this.search_results.bind('touchend.chosen', function(evt) {
703
+ _this.search_results_touchend(evt);
704
+ });
705
+ this.form_field_jq.bind("chosen:updated.chosen", function(evt) {
706
+ _this.results_update_field(evt);
707
+ });
708
+ this.form_field_jq.bind("chosen:activate.chosen", function(evt) {
709
+ _this.activate_field(evt);
710
+ });
711
+ this.form_field_jq.bind("chosen:open.chosen", function(evt) {
712
+ _this.container_mousedown(evt);
713
+ });
714
+ this.form_field_jq.bind("chosen:close.chosen", function(evt) {
715
+ _this.input_blur(evt);
716
+ });
717
+ this.search_field.bind('blur.chosen', function(evt) {
718
+ _this.input_blur(evt);
719
+ });
720
+ this.search_field.bind('keyup.chosen', function(evt) {
721
+ _this.keyup_checker(evt);
722
+ });
723
+ this.search_field.bind('keydown.chosen', function(evt) {
724
+ _this.keydown_checker(evt);
725
+ });
726
+ this.search_field.bind('focus.chosen', function(evt) {
727
+ _this.input_focus(evt);
728
+ });
729
+ this.search_field.bind('cut.chosen', function(evt) {
730
+ _this.clipboard_event_checker(evt);
731
+ });
732
+ this.search_field.bind('paste.chosen', function(evt) {
733
+ _this.clipboard_event_checker(evt);
734
+ });
735
+ if (this.is_multiple) {
736
+ return this.search_choices.bind('click.chosen', function(evt) {
737
+ _this.choices_click(evt);
738
+ });
739
+ } else {
740
+ return this.container.bind('click.chosen', function(evt) {
741
+ evt.preventDefault();
742
+ });
743
+ }
744
+ };
745
+
746
+ Chosen.prototype.destroy = function() {
747
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
748
+ if (this.search_field[0].tabIndex) {
749
+ this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex;
750
+ }
751
+ this.container.remove();
752
+ this.form_field_jq.removeData('chosen');
753
+ return this.form_field_jq.show();
754
+ };
755
+
756
+ Chosen.prototype.search_field_disabled = function() {
757
+ this.is_disabled = this.form_field_jq[0].disabled;
758
+ if (this.is_disabled) {
759
+ this.container.addClass('chosen-disabled');
760
+ this.search_field[0].disabled = true;
761
+ if (!this.is_multiple) {
762
+ this.selected_item.unbind("focus.chosen", this.activate_action);
763
+ }
764
+ return this.close_field();
765
+ } else {
766
+ this.container.removeClass('chosen-disabled');
767
+ this.search_field[0].disabled = false;
768
+ if (!this.is_multiple) {
769
+ return this.selected_item.bind("focus.chosen", this.activate_action);
770
+ }
771
+ }
772
+ };
773
+
774
+ Chosen.prototype.container_mousedown = function(evt) {
775
+ if (!this.is_disabled) {
776
+ if (evt && evt.type === "mousedown" && !this.results_showing) {
777
+ evt.preventDefault();
778
+ }
779
+ if (!((evt != null) && ($(evt.target)).hasClass("search-choice-close"))) {
780
+ if (!this.active_field) {
781
+ if (this.is_multiple) {
782
+ this.search_field.val("");
783
+ }
784
+ $(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action);
785
+ this.results_show();
786
+ } else if (!this.is_multiple && evt && (($(evt.target)[0] === this.selected_item[0]) || $(evt.target).parents("a.chosen-single").length)) {
787
+ evt.preventDefault();
788
+ this.results_toggle();
789
+ }
790
+ return this.activate_field();
791
+ }
792
+ }
793
+ };
794
+
795
+ Chosen.prototype.container_mouseup = function(evt) {
796
+ if (evt.target.nodeName === "ABBR" && !this.is_disabled) {
797
+ return this.results_reset(evt);
798
+ }
799
+ };
800
+
801
+ Chosen.prototype.search_results_mousewheel = function(evt) {
802
+ var delta;
803
+ if (evt.originalEvent) {
804
+ delta = evt.originalEvent.deltaY || -evt.originalEvent.wheelDelta || evt.originalEvent.detail;
805
+ }
806
+ if (delta != null) {
807
+ evt.preventDefault();
808
+ if (evt.type === 'DOMMouseScroll') {
809
+ delta = delta * 40;
810
+ }
811
+ return this.search_results.scrollTop(delta + this.search_results.scrollTop());
812
+ }
813
+ };
814
+
815
+ Chosen.prototype.blur_test = function(evt) {
816
+ if (!this.active_field && this.container.hasClass("chosen-container-active")) {
817
+ return this.close_field();
818
+ }
819
+ };
820
+
821
+ Chosen.prototype.close_field = function() {
822
+ $(this.container[0].ownerDocument).unbind("click.chosen", this.click_test_action);
823
+ this.active_field = false;
824
+ this.results_hide();
825
+ this.container.removeClass("chosen-container-active");
826
+ this.clear_backstroke();
827
+ this.show_search_field_default();
828
+ return this.search_field_scale();
829
+ };
830
+
831
+ Chosen.prototype.activate_field = function() {
832
+ this.container.addClass("chosen-container-active");
833
+ this.active_field = true;
834
+ this.search_field.val(this.search_field.val());
835
+ return this.search_field.focus();
836
+ };
837
+
838
+ Chosen.prototype.test_active_click = function(evt) {
839
+ var active_container;
840
+ active_container = $(evt.target).closest('.chosen-container');
841
+ if (active_container.length && this.container[0] === active_container[0]) {
842
+ return this.active_field = true;
843
+ } else {
844
+ return this.close_field();
845
+ }
846
+ };
847
+
848
+ Chosen.prototype.results_build = function() {
849
+ this.parsing = true;
850
+ this.selected_option_count = null;
851
+ this.results_data = SelectParser.select_to_array(this.form_field);
852
+ if (this.is_multiple) {
853
+ this.search_choices.find("li.search-choice").remove();
854
+ } else if (!this.is_multiple) {
855
+ this.single_set_selected_text();
856
+ if (this.disable_search || this.form_field.options.length <= this.disable_search_threshold) {
857
+ this.search_field[0].readOnly = true;
858
+ this.container.addClass("chosen-container-single-nosearch");
859
+ } else {
860
+ this.search_field[0].readOnly = false;
861
+ this.container.removeClass("chosen-container-single-nosearch");
862
+ }
863
+ }
864
+ this.update_results_content(this.results_option_build({
865
+ first: true
866
+ }));
867
+ this.search_field_disabled();
868
+ this.show_search_field_default();
869
+ this.search_field_scale();
870
+ return this.parsing = false;
871
+ };
872
+
873
+ Chosen.prototype.result_do_highlight = function(el) {
874
+ var high_bottom, high_top, maxHeight, visible_bottom, visible_top;
875
+ if (el.length) {
876
+ this.result_clear_highlight();
877
+ this.result_highlight = el;
878
+ this.result_highlight.addClass("highlighted");
879
+ maxHeight = parseInt(this.search_results.css("maxHeight"), 10);
880
+ visible_top = this.search_results.scrollTop();
881
+ visible_bottom = maxHeight + visible_top;
882
+ high_top = this.result_highlight.position().top + this.search_results.scrollTop();
883
+ high_bottom = high_top + this.result_highlight.outerHeight();
884
+ if (high_bottom >= visible_bottom) {
885
+ return this.search_results.scrollTop((high_bottom - maxHeight) > 0 ? high_bottom - maxHeight : 0);
886
+ } else if (high_top < visible_top) {
887
+ return this.search_results.scrollTop(high_top);
888
+ }
889
+ }
890
+ };
891
+
892
+ Chosen.prototype.result_clear_highlight = function() {
893
+ if (this.result_highlight) {
894
+ this.result_highlight.removeClass("highlighted");
895
+ }
896
+ return this.result_highlight = null;
897
+ };
898
+
899
+ Chosen.prototype.results_show = function() {
900
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
901
+ this.form_field_jq.trigger("chosen:maxselected", {
902
+ chosen: this
903
+ });
904
+ return false;
905
+ }
906
+ this.container.addClass("chosen-with-drop");
907
+ this.results_showing = true;
908
+ this.search_field.focus();
909
+ this.search_field.val(this.search_field.val());
910
+ this.winnow_results();
911
+ return this.form_field_jq.trigger("chosen:showing_dropdown", {
912
+ chosen: this
913
+ });
914
+ };
915
+
916
+ Chosen.prototype.update_results_content = function(content) {
917
+ return this.search_results.html(content);
918
+ };
919
+
920
+ Chosen.prototype.results_hide = function() {
921
+ if (this.results_showing) {
922
+ this.result_clear_highlight();
923
+ this.container.removeClass("chosen-with-drop");
924
+ this.form_field_jq.trigger("chosen:hiding_dropdown", {
925
+ chosen: this
926
+ });
927
+ }
928
+ return this.results_showing = false;
929
+ };
930
+
931
+ Chosen.prototype.set_tab_index = function(el) {
932
+ var ti;
933
+ if (this.form_field.tabIndex) {
934
+ ti = this.form_field.tabIndex;
935
+ this.form_field.tabIndex = -1;
936
+ return this.search_field[0].tabIndex = ti;
937
+ }
938
+ };
939
+
940
+ Chosen.prototype.set_label_behavior = function() {
941
+ var _this = this;
942
+ this.form_field_label = this.form_field_jq.parents("label");
943
+ if (!this.form_field_label.length && this.form_field.id.length) {
944
+ this.form_field_label = $("label[for='" + this.form_field.id + "']");
945
+ }
946
+ if (this.form_field_label.length > 0) {
947
+ return this.form_field_label.bind('click.chosen', function(evt) {
948
+ if (_this.is_multiple) {
949
+ return _this.container_mousedown(evt);
950
+ } else {
951
+ return _this.activate_field();
952
+ }
953
+ });
954
+ }
955
+ };
956
+
957
+ Chosen.prototype.show_search_field_default = function() {
958
+ if (this.is_multiple && this.choices_count() < 1 && !this.active_field) {
959
+ this.search_field.val(this.default_text);
960
+ return this.search_field.addClass("default");
961
+ } else {
962
+ this.search_field.val("");
963
+ return this.search_field.removeClass("default");
964
+ }
965
+ };
966
+
967
+ Chosen.prototype.search_results_mouseup = function(evt) {
968
+ var target;
969
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
970
+ if (target.length) {
971
+ this.result_highlight = target;
972
+ this.result_select(evt);
973
+ return this.search_field.focus();
974
+ }
975
+ };
976
+
977
+ Chosen.prototype.search_results_mouseover = function(evt) {
978
+ var target;
979
+ target = $(evt.target).hasClass("active-result") ? $(evt.target) : $(evt.target).parents(".active-result").first();
980
+ if (target) {
981
+ return this.result_do_highlight(target);
982
+ }
983
+ };
984
+
985
+ Chosen.prototype.search_results_mouseout = function(evt) {
986
+ if ($(evt.target).hasClass("active-result" || $(evt.target).parents('.active-result').first())) {
987
+ return this.result_clear_highlight();
988
+ }
989
+ };
990
+
991
+ Chosen.prototype.choice_build = function(item) {
992
+ var choice, close_link,
993
+ _this = this;
994
+ choice = $('<li />', {
995
+ "class": "search-choice"
996
+ }).html("<span>" + (this.choice_label(item)) + "</span>");
997
+ if (item.disabled) {
998
+ choice.addClass('search-choice-disabled');
999
+ } else {
1000
+ close_link = $('<a />', {
1001
+ "class": 'search-choice-close',
1002
+ 'data-option-array-index': item.array_index
1003
+ });
1004
+ close_link.bind('click.chosen', function(evt) {
1005
+ return _this.choice_destroy_link_click(evt);
1006
+ });
1007
+ choice.append(close_link);
1008
+ }
1009
+ return this.search_container.before(choice);
1010
+ };
1011
+
1012
+ Chosen.prototype.choice_destroy_link_click = function(evt) {
1013
+ evt.preventDefault();
1014
+ evt.stopPropagation();
1015
+ if (!this.is_disabled) {
1016
+ return this.choice_destroy($(evt.target));
1017
+ }
1018
+ };
1019
+
1020
+ Chosen.prototype.choice_destroy = function(link) {
1021
+ if (this.result_deselect(link[0].getAttribute("data-option-array-index"))) {
1022
+ this.show_search_field_default();
1023
+ if (this.is_multiple && this.choices_count() > 0 && this.search_field.val().length < 1) {
1024
+ this.results_hide();
1025
+ }
1026
+ link.parents('li').first().remove();
1027
+ return this.search_field_scale();
1028
+ }
1029
+ };
1030
+
1031
+ Chosen.prototype.results_reset = function() {
1032
+ this.reset_single_select_options();
1033
+ this.form_field.options[0].selected = true;
1034
+ this.single_set_selected_text();
1035
+ this.show_search_field_default();
1036
+ this.results_reset_cleanup();
1037
+ this.form_field_jq.trigger("change");
1038
+ if (this.active_field) {
1039
+ return this.results_hide();
1040
+ }
1041
+ };
1042
+
1043
+ Chosen.prototype.results_reset_cleanup = function() {
1044
+ this.current_selectedIndex = this.form_field.selectedIndex;
1045
+ return this.selected_item.find("abbr").remove();
1046
+ };
1047
+
1048
+ Chosen.prototype.result_select = function(evt) {
1049
+ var high, item;
1050
+ if (this.result_highlight) {
1051
+ high = this.result_highlight;
1052
+ this.result_clear_highlight();
1053
+ if (this.is_multiple && this.max_selected_options <= this.choices_count()) {
1054
+ this.form_field_jq.trigger("chosen:maxselected", {
1055
+ chosen: this
1056
+ });
1057
+ return false;
1058
+ }
1059
+ if (this.is_multiple) {
1060
+ high.removeClass("active-result");
1061
+ } else {
1062
+ this.reset_single_select_options();
1063
+ }
1064
+ high.addClass("result-selected");
1065
+ item = this.results_data[high[0].getAttribute("data-option-array-index")];
1066
+ item.selected = true;
1067
+ this.form_field.options[item.options_index].selected = true;
1068
+ this.selected_option_count = null;
1069
+ if (this.is_multiple) {
1070
+ this.choice_build(item);
1071
+ } else {
1072
+ this.single_set_selected_text(this.choice_label(item));
1073
+ }
1074
+ if (!((evt.metaKey || evt.ctrlKey) && this.is_multiple)) {
1075
+ this.results_hide();
1076
+ }
1077
+ this.show_search_field_default();
1078
+ if (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) {
1079
+ this.form_field_jq.trigger("change", {
1080
+ 'selected': this.form_field.options[item.options_index].value
1081
+ });
1082
+ }
1083
+ this.current_selectedIndex = this.form_field.selectedIndex;
1084
+ evt.preventDefault();
1085
+ return this.search_field_scale();
1086
+ }
1087
+ };
1088
+
1089
+ Chosen.prototype.single_set_selected_text = function(text) {
1090
+ if (text == null) {
1091
+ text = this.default_text;
1092
+ }
1093
+ if (text === this.default_text) {
1094
+ this.selected_item.addClass("chosen-default");
1095
+ } else {
1096
+ this.single_deselect_control_build();
1097
+ this.selected_item.removeClass("chosen-default");
1098
+ }
1099
+ return this.selected_item.find("span").html(text);
1100
+ };
1101
+
1102
+ Chosen.prototype.result_deselect = function(pos) {
1103
+ var result_data;
1104
+ result_data = this.results_data[pos];
1105
+ if (!this.form_field.options[result_data.options_index].disabled) {
1106
+ result_data.selected = false;
1107
+ this.form_field.options[result_data.options_index].selected = false;
1108
+ this.selected_option_count = null;
1109
+ this.result_clear_highlight();
1110
+ if (this.results_showing) {
1111
+ this.winnow_results();
1112
+ }
1113
+ this.form_field_jq.trigger("change", {
1114
+ deselected: this.form_field.options[result_data.options_index].value
1115
+ });
1116
+ this.search_field_scale();
1117
+ return true;
1118
+ } else {
1119
+ return false;
1120
+ }
1121
+ };
1122
+
1123
+ Chosen.prototype.single_deselect_control_build = function() {
1124
+ if (!this.allow_single_deselect) {
1125
+ return;
1126
+ }
1127
+ if (!this.selected_item.find("abbr").length) {
1128
+ this.selected_item.find("span").first().after("<abbr class=\"search-choice-close\"></abbr>");
1129
+ }
1130
+ return this.selected_item.addClass("chosen-single-with-deselect");
1131
+ };
1132
+
1133
+ Chosen.prototype.get_search_text = function() {
1134
+ return $('<div/>').text($.trim(this.search_field.val())).html();
1135
+ };
1136
+
1137
+ Chosen.prototype.winnow_results_set_highlight = function() {
1138
+ var do_high, selected_results;
1139
+ selected_results = !this.is_multiple ? this.search_results.find(".result-selected.active-result") : [];
1140
+ do_high = selected_results.length ? selected_results.first() : this.search_results.find(".active-result").first();
1141
+ if (do_high != null) {
1142
+ return this.result_do_highlight(do_high);
1143
+ }
1144
+ };
1145
+
1146
+ Chosen.prototype.no_results = function(terms) {
1147
+ var no_results_html;
1148
+ no_results_html = $('<li class="no-results">' + this.results_none_found + ' "<span></span>"</li>');
1149
+ no_results_html.find("span").first().html(terms);
1150
+ this.search_results.append(no_results_html);
1151
+ return this.form_field_jq.trigger("chosen:no_results", {
1152
+ chosen: this
1153
+ });
1154
+ };
1155
+
1156
+ Chosen.prototype.no_results_clear = function() {
1157
+ return this.search_results.find(".no-results").remove();
1158
+ };
1159
+
1160
+ Chosen.prototype.keydown_arrow = function() {
1161
+ var next_sib;
1162
+ if (this.results_showing && this.result_highlight) {
1163
+ next_sib = this.result_highlight.nextAll("li.active-result").first();
1164
+ if (next_sib) {
1165
+ return this.result_do_highlight(next_sib);
1166
+ }
1167
+ } else {
1168
+ return this.results_show();
1169
+ }
1170
+ };
1171
+
1172
+ Chosen.prototype.keyup_arrow = function() {
1173
+ var prev_sibs;
1174
+ if (!this.results_showing && !this.is_multiple) {
1175
+ return this.results_show();
1176
+ } else if (this.result_highlight) {
1177
+ prev_sibs = this.result_highlight.prevAll("li.active-result");
1178
+ if (prev_sibs.length) {
1179
+ return this.result_do_highlight(prev_sibs.first());
1180
+ } else {
1181
+ if (this.choices_count() > 0) {
1182
+ this.results_hide();
1183
+ }
1184
+ return this.result_clear_highlight();
1185
+ }
1186
+ }
1187
+ };
1188
+
1189
+ Chosen.prototype.keydown_backstroke = function() {
1190
+ var next_available_destroy;
1191
+ if (this.pending_backstroke) {
1192
+ this.choice_destroy(this.pending_backstroke.find("a").first());
1193
+ return this.clear_backstroke();
1194
+ } else {
1195
+ next_available_destroy = this.search_container.siblings("li.search-choice").last();
1196
+ if (next_available_destroy.length && !next_available_destroy.hasClass("search-choice-disabled")) {
1197
+ this.pending_backstroke = next_available_destroy;
1198
+ if (this.single_backstroke_delete) {
1199
+ return this.keydown_backstroke();
1200
+ } else {
1201
+ return this.pending_backstroke.addClass("search-choice-focus");
1202
+ }
1203
+ }
1204
+ }
1205
+ };
1206
+
1207
+ Chosen.prototype.clear_backstroke = function() {
1208
+ if (this.pending_backstroke) {
1209
+ this.pending_backstroke.removeClass("search-choice-focus");
1210
+ }
1211
+ return this.pending_backstroke = null;
1212
+ };
1213
+
1214
+ Chosen.prototype.keydown_checker = function(evt) {
1215
+ var stroke, _ref1;
1216
+ stroke = (_ref1 = evt.which) != null ? _ref1 : evt.keyCode;
1217
+ this.search_field_scale();
1218
+ if (stroke !== 8 && this.pending_backstroke) {
1219
+ this.clear_backstroke();
1220
+ }
1221
+ switch (stroke) {
1222
+ case 8:
1223
+ this.backstroke_length = this.search_field.val().length;
1224
+ break;
1225
+ case 9:
1226
+ if (this.results_showing && !this.is_multiple) {
1227
+ this.result_select(evt);
1228
+ }
1229
+ this.mouse_on_container = false;
1230
+ break;
1231
+ case 13:
1232
+ if (this.results_showing) {
1233
+ evt.preventDefault();
1234
+ }
1235
+ break;
1236
+ case 32:
1237
+ if (this.disable_search) {
1238
+ evt.preventDefault();
1239
+ }
1240
+ break;
1241
+ case 38:
1242
+ evt.preventDefault();
1243
+ this.keyup_arrow();
1244
+ break;
1245
+ case 40:
1246
+ evt.preventDefault();
1247
+ this.keydown_arrow();
1248
+ break;
1249
+ }
1250
+ };
1251
+
1252
+ Chosen.prototype.search_field_scale = function() {
1253
+ var div, f_width, h, style, style_block, styles, w, _i, _len;
1254
+ if (this.is_multiple) {
1255
+ h = 0;
1256
+ w = 0;
1257
+ style_block = "position:absolute; left: -1000px; top: -1000px; display:none;";
1258
+ styles = ['font-size', 'font-style', 'font-weight', 'font-family', 'line-height', 'text-transform', 'letter-spacing'];
1259
+ for (_i = 0, _len = styles.length; _i < _len; _i++) {
1260
+ style = styles[_i];
1261
+ style_block += style + ":" + this.search_field.css(style) + ";";
1262
+ }
1263
+ div = $('<div />', {
1264
+ 'style': style_block
1265
+ });
1266
+ div.text(this.search_field.val());
1267
+ $('body').append(div);
1268
+ w = div.width() + 25;
1269
+ div.remove();
1270
+ f_width = this.container.outerWidth();
1271
+ if (w > f_width - 10) {
1272
+ w = f_width - 10;
1273
+ }
1274
+ return this.search_field.css({
1275
+ 'width': w + 'px'
1276
+ });
1277
+ }
1278
+ };
1279
+
1280
+ return Chosen;
1281
+
1282
+ })(AbstractChosen);
1283
+
1284
+ }).call(this);
assets/js/lib/clipboard.js ADDED
@@ -0,0 +1,736 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * clipboard.js v1.5.9
3
+ * https://zenorocha.github.io/clipboard.js
4
+ *
5
+ * Licensed MIT © Zeno Rocha
6
+ */
7
+ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Clipboard = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
8
+ var matches = require('matches-selector')
9
+
10
+ module.exports = function (element, selector, checkYoSelf) {
11
+ var parent = checkYoSelf ? element : element.parentNode
12
+
13
+ while (parent && parent !== document) {
14
+ if (matches(parent, selector)) return parent;
15
+ parent = parent.parentNode
16
+ }
17
+ }
18
+
19
+ },{"matches-selector":5}],2:[function(require,module,exports){
20
+ var closest = require('closest');
21
+
22
+ /**
23
+ * Delegates event to a selector.
24
+ *
25
+ * @param {Element} element
26
+ * @param {String} selector
27
+ * @param {String} type
28
+ * @param {Function} callback
29
+ * @param {Boolean} useCapture
30
+ * @return {Object}
31
+ */
32
+ function delegate(element, selector, type, callback, useCapture) {
33
+ var listenerFn = listener.apply(this, arguments);
34
+
35
+ element.addEventListener(type, listenerFn, useCapture);
36
+
37
+ return {
38
+ destroy: function() {
39
+ element.removeEventListener(type, listenerFn, useCapture);
40
+ }
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Finds closest match and invokes callback.
46
+ *
47
+ * @param {Element} element
48
+ * @param {String} selector
49
+ * @param {String} type
50
+ * @param {Function} callback
51
+ * @return {Function}
52
+ */
53
+ function listener(element, selector, type, callback) {
54
+ return function(e) {
55
+ e.delegateTarget = closest(e.target, selector, true);
56
+
57
+ if (e.delegateTarget) {
58
+ callback.call(element, e);
59
+ }
60
+ }
61
+ }
62
+
63
+ module.exports = delegate;
64
+
65
+ },{"closest":1}],3:[function(require,module,exports){
66
+ /**
67
+ * Check if argument is a HTML element.
68
+ *
69
+ * @param {Object} value
70
+ * @return {Boolean}
71
+ */
72
+ exports.node = function(value) {
73
+ return value !== undefined
74
+ && value instanceof HTMLElement
75
+ && value.nodeType === 1;
76
+ };
77
+
78
+ /**
79
+ * Check if argument is a list of HTML elements.
80
+ *
81
+ * @param {Object} value
82
+ * @return {Boolean}
83
+ */
84
+ exports.nodeList = function(value) {
85
+ var type = Object.prototype.toString.call(value);
86
+
87
+ return value !== undefined
88
+ && (type === '[object NodeList]' || type === '[object HTMLCollection]')
89
+ && ('length' in value)
90
+ && (value.length === 0 || exports.node(value[0]));
91
+ };
92
+
93
+ /**
94
+ * Check if argument is a string.
95
+ *
96
+ * @param {Object} value
97
+ * @return {Boolean}
98
+ */
99
+ exports.string = function(value) {
100
+ return typeof value === 'string'
101
+ || value instanceof String;
102
+ };
103
+
104
+ /**
105
+ * Check if argument is a function.
106
+ *
107
+ * @param {Object} value
108
+ * @return {Boolean}
109
+ */
110
+ exports.fn = function(value) {
111
+ var type = Object.prototype.toString.call(value);
112
+
113
+ return type === '[object Function]';
114
+ };
115
+
116
+ },{}],4:[function(require,module,exports){
117
+ var is = require('./is');
118
+ var delegate = require('delegate');
119
+
120
+ /**
121
+ * Validates all params and calls the right
122
+ * listener function based on its target type.
123
+ *
124
+ * @param {String|HTMLElement|HTMLCollection|NodeList} target
125
+ * @param {String} type
126
+ * @param {Function} callback
127
+ * @return {Object}
128
+ */
129
+ function listen(target, type, callback) {
130
+ if (!target && !type && !callback) {
131
+ throw new Error('Missing required arguments');
132
+ }
133
+
134
+ if (!is.string(type)) {
135
+ throw new TypeError('Second argument must be a String');
136
+ }
137
+
138
+ if (!is.fn(callback)) {
139
+ throw new TypeError('Third argument must be a Function');
140
+ }
141
+
142
+ if (is.node(target)) {
143
+ return listenNode(target, type, callback);
144
+ }
145
+ else if (is.nodeList(target)) {
146
+ return listenNodeList(target, type, callback);
147
+ }
148
+ else if (is.string(target)) {
149
+ return listenSelector(target, type, callback);
150
+ }
151
+ else {
152
+ throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');
153
+ }
154
+ }
155
+
156
+ /**
157
+ * Adds an event listener to a HTML element
158
+ * and returns a remove listener function.
159
+ *
160
+ * @param {HTMLElement} node
161
+ * @param {String} type
162
+ * @param {Function} callback
163
+ * @return {Object}
164
+ */
165
+ function listenNode(node, type, callback) {
166
+ node.addEventListener(type, callback);
167
+
168
+ return {
169
+ destroy: function() {
170
+ node.removeEventListener(type, callback);
171
+ }
172
+ }
173
+ }
174
+
175
+ /**
176
+ * Add an event listener to a list of HTML elements
177
+ * and returns a remove listener function.
178
+ *
179
+ * @param {NodeList|HTMLCollection} nodeList
180
+ * @param {String} type
181
+ * @param {Function} callback
182
+ * @return {Object}
183
+ */
184
+ function listenNodeList(nodeList, type, callback) {
185
+ Array.prototype.forEach.call(nodeList, function(node) {
186
+ node.addEventListener(type, callback);
187
+ });
188
+
189
+ return {
190
+ destroy: function() {
191
+ Array.prototype.forEach.call(nodeList, function(node) {
192
+ node.removeEventListener(type, callback);
193
+ });
194
+ }
195
+ }
196
+ }
197
+
198
+ /**
199
+ * Add an event listener to a selector
200
+ * and returns a remove listener function.
201
+ *
202
+ * @param {String} selector
203
+ * @param {String} type
204
+ * @param {Function} callback
205
+ * @return {Object}
206
+ */
207
+ function listenSelector(selector, type, callback) {
208
+ return delegate(document.body, selector, type, callback);
209
+ }
210
+
211
+ module.exports = listen;
212
+
213
+ },{"./is":3,"delegate":2}],5:[function(require,module,exports){
214
+
215
+ /**
216
+ * Element prototype.
217
+ */
218
+
219
+ var proto = Element.prototype;
220
+
221
+ /**
222
+ * Vendor function.
223
+ */
224
+
225
+ var vendor = proto.matchesSelector
226
+ || proto.webkitMatchesSelector
227
+ || proto.mozMatchesSelector
228
+ || proto.msMatchesSelector
229
+ || proto.oMatchesSelector;
230
+
231
+ /**
232
+ * Expose `match()`.
233
+ */
234
+
235
+ module.exports = match;
236
+
237
+ /**
238
+ * Match `el` to `selector`.
239
+ *
240
+ * @param {Element} el
241
+ * @param {String} selector
242
+ * @return {Boolean}
243
+ * @api public
244
+ */
245
+
246
+ function match(el, selector) {
247
+ if (vendor) return vendor.call(el, selector);
248
+ var nodes = el.parentNode.querySelectorAll(selector);
249
+ for (var i = 0; i < nodes.length; ++i) {
250
+ if (nodes[i] == el) return true;
251
+ }
252
+ return false;
253
+ }
254
+ },{}],6:[function(require,module,exports){
255
+ function select(element) {
256
+ var selectedText;
257
+
258
+ if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {
259
+ element.focus();
260
+ element.setSelectionRange(0, element.value.length);
261
+
262
+ selectedText = element.value;
263
+ }
264
+ else {
265
+ if (element.hasAttribute('contenteditable')) {
266
+ element.focus();
267
+ }
268
+
269
+ var selection = window.getSelection();
270
+ var range = document.createRange();
271
+
272
+ range.selectNodeContents(element);
273
+ selection.removeAllRanges();
274
+ selection.addRange(range);
275
+
276
+ selectedText = selection.toString();
277
+ }
278
+
279
+ return selectedText;
280
+ }
281
+
282
+ module.exports = select;
283
+
284
+ },{}],7:[function(require,module,exports){
285
+ function E () {
286
+ // Keep this empty so it's easier to inherit from
287
+ // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
288
+ }
289
+
290
+ E.prototype = {
291
+ on: function (name, callback, ctx) {
292
+ var e = this.e || (this.e = {});
293
+
294
+ (e[name] || (e[name] = [])).push({
295
+ fn: callback,
296
+ ctx: ctx
297
+ });
298
+
299
+ return this;
300
+ },
301
+
302
+ once: function (name, callback, ctx) {
303
+ var self = this;
304
+ function listener () {
305
+ self.off(name, listener);
306
+ callback.apply(ctx, arguments);
307
+ };
308
+
309
+ listener._ = callback
310
+ return this.on(name, listener, ctx);
311
+ },
312
+
313
+ emit: function (name) {
314
+ var data = [].slice.call(arguments, 1);
315
+ var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
316
+ var i = 0;
317
+ var len = evtArr.length;
318
+
319
+ for (i; i < len; i++) {
320
+ evtArr[i].fn.apply(evtArr[i].ctx, data);
321
+ }
322
+
323
+ return this;
324
+ },
325
+
326
+ off: function (name, callback) {
327
+ var e = this.e || (this.e = {});
328
+ var evts = e[name];
329
+ var liveEvents = [];
330
+
331
+ if (evts && callback) {
332
+ for (var i = 0, len = evts.length; i < len; i++) {
333
+ if (evts[i].fn !== callback && evts[i].fn._ !== callback)
334
+ liveEvents.push(evts[i]);
335
+ }
336
+ }
337
+
338
+ // Remove event from queue to prevent memory leak
339
+ // Suggested by https://github.com/lazd
340
+ // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
341
+
342
+ (liveEvents.length)
343
+ ? e[name] = liveEvents
344
+ : delete e[name];
345
+
346
+ return this;
347
+ }
348
+ };
349
+
350
+ module.exports = E;
351
+
352
+ },{}],8:[function(require,module,exports){
353
+ (function (global, factory) {
354
+ if (typeof define === "function" && define.amd) {
355
+ define(['module', 'select'], factory);
356
+ } else if (typeof exports !== "undefined") {
357
+ factory(module, require('select'));
358
+ } else {
359
+ var mod = {
360
+ exports: {}
361
+ };
362
+ factory(mod, global.select);
363
+ global.clipboardAction = mod.exports;
364
+ }
365
+ })(this, function (module, _select) {
366
+ 'use strict';
367
+
368
+ var _select2 = _interopRequireDefault(_select);
369
+
370
+ function _interopRequireDefault(obj) {
371
+ return obj && obj.__esModule ? obj : {
372
+ default: obj
373
+ };
374
+ }
375
+
376
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
377
+ return typeof obj;
378
+ } : function (obj) {
379
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
380
+ };
381
+
382
+ function _classCallCheck(instance, Constructor) {
383
+ if (!(instance instanceof Constructor)) {
384
+ throw new TypeError("Cannot call a class as a function");
385
+ }
386
+ }
387
+
388
+ var _createClass = function () {
389
+ function defineProperties(target, props) {
390
+ for (var i = 0; i < props.length; i++) {
391
+ var descriptor = props[i];
392
+ descriptor.enumerable = descriptor.enumerable || false;
393
+ descriptor.configurable = true;
394
+ if ("value" in descriptor) descriptor.writable = true;
395
+ Object.defineProperty(target, descriptor.key, descriptor);
396
+ }
397
+ }
398
+
399
+ return function (Constructor, protoProps, staticProps) {
400
+ if (protoProps) defineProperties(Constructor.prototype, protoProps);
401
+ if (staticProps) defineProperties(Constructor, staticProps);
402
+ return Constructor;
403
+ };
404
+ }();
405
+
406
+ var ClipboardAction = function () {
407
+ /**
408
+ * @param {Object} options
409
+ */
410
+
411
+ function ClipboardAction(options) {
412
+ _classCallCheck(this, ClipboardAction);
413
+
414
+ this.resolveOptions(options);
415
+ this.initSelection();
416
+ }
417
+
418
+ /**
419
+ * Defines base properties passed from constructor.
420
+ * @param {Object} options
421
+ */
422
+
423
+
424
+ ClipboardAction.prototype.resolveOptions = function resolveOptions() {
425
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
426
+
427
+ this.action = options.action;
428
+ this.emitter = options.emitter;
429
+ this.target = options.target;
430
+ this.text = options.text;
431
+ this.trigger = options.trigger;
432
+
433
+ this.selectedText = '';
434
+ };
435
+
436
+ ClipboardAction.prototype.initSelection = function initSelection() {
437
+ if (this.text && this.target) {
438
+ throw new Error('Multiple attributes declared, use either "target" or "text"');
439
+ } else if (this.text) {
440
+ this.selectFake();
441
+ } else if (this.target) {
442
+ this.selectTarget();
443
+ } else {
444
+ throw new Error('Missing required attributes, use either "target" or "text"');
445
+ }
446
+ };
447
+
448
+ ClipboardAction.prototype.selectFake = function selectFake() {
449
+ var _this = this;
450
+
451
+ var isRTL = document.documentElement.getAttribute('dir') == 'rtl';
452
+
453
+ this.removeFake();
454
+
455
+ this.fakeHandler = document.body.addEventListener('click', function () {
456
+ return _this.removeFake();
457
+ });
458
+
459
+ this.fakeElem = document.createElement('textarea');
460
+ // Prevent zooming on iOS
461
+ this.fakeElem.style.fontSize = '12pt';
462
+ // Reset box model
463
+ this.fakeElem.style.border = '0';
464
+ this.fakeElem.style.padding = '0';
465
+ this.fakeElem.style.margin = '0';
466
+ // Move element out of screen horizontally
467
+ this.fakeElem.style.position = 'fixed';
468
+ this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';
469
+ // Move element to the same position vertically
470
+ this.fakeElem.style.top = (window.pageYOffset || document.documentElement.scrollTop) + 'px';
471
+ this.fakeElem.setAttribute('readonly', '');
472
+ this.fakeElem.value = this.text;
473
+
474
+ document.body.appendChild(this.fakeElem);
475
+
476
+ this.selectedText = (0, _select2.default)(this.fakeElem);
477
+ this.copyText();
478
+ };
479
+
480
+ ClipboardAction.prototype.removeFake = function removeFake() {
481
+ if (this.fakeHandler) {
482
+ document.body.removeEventListener('click');
483
+ this.fakeHandler = null;
484
+ }
485
+
486
+ if (this.fakeElem) {
487
+ document.body.removeChild(this.fakeElem);
488
+ this.fakeElem = null;
489
+ }
490
+ };
491
+
492
+ ClipboardAction.prototype.selectTarget = function selectTarget() {
493
+ this.selectedText = (0, _select2.default)(this.target);
494
+ this.copyText();
495
+ };
496
+
497
+ ClipboardAction.prototype.copyText = function copyText() {
498
+ var succeeded = undefined;
499
+
500
+ try {
501
+ succeeded = document.execCommand(this.action);
502
+ } catch (err) {
503
+ succeeded = false;
504
+ }
505
+
506
+ this.handleResult(succeeded);
507
+ };
508
+
509
+ ClipboardAction.prototype.handleResult = function handleResult(succeeded) {
510
+ if (succeeded) {
511
+ this.emitter.emit('success', {
512
+ action: this.action,
513
+ text: this.selectedText,
514
+ trigger: this.trigger,
515
+ clearSelection: this.clearSelection.bind(this)
516
+ });
517
+ } else {
518
+ this.emitter.emit('error', {
519
+ action: this.action,
520
+ trigger: this.trigger,
521
+ clearSelection: this.clearSelection.bind(this)
522
+ });
523
+ }
524
+ };
525
+
526
+ ClipboardAction.prototype.clearSelection = function clearSelection() {
527
+ if (this.target) {
528
+ this.target.blur();
529
+ }
530
+
531
+ window.getSelection().removeAllRanges();
532
+ };
533
+
534
+ ClipboardAction.prototype.destroy = function destroy() {
535
+ this.removeFake();
536
+ };
537
+
538
+ _createClass(ClipboardAction, [{
539
+ key: 'action',
540
+ set: function set() {
541
+ var action = arguments.length <= 0 || arguments[0] === undefined ? 'copy' : arguments[0];
542
+
543
+ this._action = action;
544
+
545
+ if (this._action !== 'copy' && this._action !== 'cut') {
546
+ throw new Error('Invalid "action" value, use either "copy" or "cut"');
547
+ }
548
+ },
549
+ get: function get() {
550
+ return this._action;
551
+ }
552
+ }, {
553
+ key: 'target',
554
+ set: function set(target) {
555
+ if (target !== undefined) {
556
+ if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {
557
+ this._target = target;
558
+ } else {
559
+ throw new Error('Invalid "target" value, use a valid Element');
560
+ }
561
+ }
562
+ },
563
+ get: function get() {
564
+ return this._target;
565
+ }
566
+ }]);
567
+
568
+ return ClipboardAction;
569
+ }();
570
+
571
+ module.exports = ClipboardAction;
572
+ });
573
+
574
+ },{"select":6}],9:[function(require,module,exports){
575
+ (function (global, factory) {
576
+ if (typeof define === "function" && define.amd) {
577
+ define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory);
578
+ } else if (typeof exports !== "undefined") {
579
+ factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener'));
580
+ } else {
581
+ var mod = {
582
+ exports: {}
583
+ };
584
+ factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener);
585
+ global.clipboard = mod.exports;
586
+ }
587
+ })(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) {
588
+ 'use strict';
589
+
590
+ var _clipboardAction2 = _interopRequireDefault(_clipboardAction);
591
+
592
+ var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter);
593
+
594
+ var _goodListener2 = _interopRequireDefault(_goodListener);
595
+
596
+ function _interopRequireDefault(obj) {
597
+ return obj && obj.__esModule ? obj : {
598
+ default: obj
599
+ };
600
+ }
601
+
602
+ function _classCallCheck(instance, Constructor) {
603
+ if (!(instance instanceof Constructor)) {
604
+ throw new TypeError("Cannot call a class as a function");
605
+ }
606
+ }
607
+
608
+ function _possibleConstructorReturn(self, call) {
609
+ if (!self) {
610
+ throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
611
+ }
612
+
613
+ return call && (typeof call === "object" || typeof call === "function") ? call : self;
614
+ }
615
+
616
+ function _inherits(subClass, superClass) {
617
+ if (typeof superClass !== "function" && superClass !== null) {
618
+ throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
619
+ }
620
+
621
+ subClass.prototype = Object.create(superClass && superClass.prototype, {
622
+ constructor: {
623
+ value: subClass,
624
+ enumerable: false,
625
+ writable: true,
626
+ configurable: true
627
+ }
628
+ });
629
+ if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
630
+ }
631
+
632
+ var Clipboard = function (_Emitter) {
633
+ _inherits(Clipboard, _Emitter);
634
+
635
+ /**
636
+ * @param {String|HTMLElement|HTMLCollection|NodeList} trigger
637
+ * @param {Object} options
638
+ */
639
+
640
+ function Clipboard(trigger, options) {
641
+ _classCallCheck(this, Clipboard);
642
+
643
+ var _this = _possibleConstructorReturn(this, _Emitter.call(this));
644
+
645
+ _this.resolveOptions(options);
646
+ _this.listenClick(trigger);
647
+ return _this;
648
+ }
649
+
650
+ /**
651
+ * Defines if attributes would be resolved using internal setter functions
652
+ * or custom functions that were passed in the constructor.
653
+ * @param {Object} options
654
+ */
655
+
656
+
657
+ Clipboard.prototype.resolveOptions = function resolveOptions() {
658
+ var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
659
+
660
+ this.action = typeof options.action === 'function' ? options.action : this.defaultAction;
661
+ this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;
662
+ this.text = typeof options.text === 'function' ? options.text : this.defaultText;
663
+ };
664
+
665
+ Clipboard.prototype.listenClick = function listenClick(trigger) {
666
+ var _this2 = this;
667
+
668
+ this.listener = (0, _goodListener2.default)(trigger, 'click', function (e) {
669
+ return _this2.onClick(e);
670
+ });
671
+ };
672
+
673
+ Clipboard.prototype.onClick = function onClick(e) {
674
+ var trigger = e.delegateTarget || e.currentTarget;
675
+
676
+ if (this.clipboardAction) {
677
+ this.clipboardAction = null;
678
+ }
679
+
680
+ this.clipboardAction = new _clipboardAction2.default({
681
+ action: this.action(trigger),
682
+ target: this.target(trigger),
683
+ text: this.text(trigger),
684
+ trigger: trigger,
685
+ emitter: this
686
+ });
687
+ };
688
+
689
+ Clipboard.prototype.defaultAction = function defaultAction(trigger) {
690
+ return getAttributeValue('action', trigger);
691
+ };
692
+
693
+ Clipboard.prototype.defaultTarget = function defaultTarget(trigger) {
694
+ var selector = getAttributeValue('target', trigger);
695
+
696
+ if (selector) {
697
+ return document.querySelector(selector);
698
+ }
699
+ };
700
+
701
+ Clipboard.prototype.defaultText = function defaultText(trigger) {
702
+ return getAttributeValue('text', trigger);
703
+ };
704
+
705
+ Clipboard.prototype.destroy = function destroy() {
706
+ this.listener.destroy();
707
+
708
+ if (this.clipboardAction) {
709
+ this.clipboardAction.destroy();
710
+ this.clipboardAction = null;
711
+ }
712
+ };
713
+
714
+ return Clipboard;
715
+ }(_tinyEmitter2.default);
716
+
717
+ /**
718
+ * Helper function to retrieve attribute value.
719
+ * @param {String} suffix
720
+ * @param {Element} element
721
+ */
722
+ function getAttributeValue(suffix, element) {
723
+ var attribute = 'data-clipboard-' + suffix;
724
+
725
+ if (!element.hasAttribute(attribute)) {
726
+ return;
727
+ }
728
+
729
+ return element.getAttribute(attribute);
730
+ }
731
+
732
+ module.exports = Clipboard;
733
+ });
734
+
735
+ },{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)
736
+ });
assets/js/lib/codemirror.js ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // CodeMirror base.
2
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){module.exports=a()}else{if(typeof define=="function"&&define.amd){return define([],a)}else{this.CodeMirror=a()}}})(function(){var ce=/gecko\/\d/i.test(navigator.userAgent);var eo=/MSIE \d/.test(navigator.userAgent);var b1=eo&&(document.documentMode==null||document.documentMode<8);var bY=eo&&(document.documentMode==null||document.documentMode<9);var bX=eo&&(document.documentMode==null||document.documentMode<10);var by=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent);var dn=eo||by;var cJ=/WebKit\//.test(navigator.userAgent);var dr=cJ&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var cV=/Chrome\//.test(navigator.userAgent);var dF=/Opera\//.test(navigator.userAgent);var ay=/Apple Computer/.test(navigator.vendor);var a1=/KHTML\//.test(navigator.userAgent);var cP=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var e5=/PhantomJS/.test(navigator.userAgent);var eD=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var dS=eD||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var bU=eD||/Mac/.test(navigator.platform);var aG=/win/i.test(navigator.platform);var aO=dF&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(aO){aO=Number(aO[1])}if(aO&&aO>=15){dF=false;cJ=true}var bF=bU&&(dr||dF&&(aO==null||aO<12.11));var fE=ce||(dn&&!bY);var fH=false,aX=false;function I(fO,fP){if(!(this instanceof I)){return new I(fO,fP)}this.options=fP=fP||{};aE(eF,fP,false);b4(fP);var fR=fP.value;if(typeof fR=="string"){fR=new ao(fR,fP.mode)}this.doc=fR;var fQ=this.display=new em(fO,fR);fQ.wrapper.CodeMirror=this;dO(this);cB(this);if(fP.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(fP.autofocus&&!dS){ed(this)}this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,draggingText:false,highlight:new fM()};if(eo){setTimeout(cl(eZ,this,true),20)}fp(this);a8();var fN=this;cz(this,function(){fN.curOp.forceUpdate=true;dN(fN,fR);if((fP.autofocus&&!dS)||ds()==fQ.input){setTimeout(cl(cq,fN),20)}else{aL(fN)}for(var fT in a4){if(a4.hasOwnProperty(fT)){a4[fT](fN,fP[fT],b2)}}for(var fS=0;fS<aY.length;++fS){aY[fS](fN)}})}function em(fN,fP){var fQ=this;var fO=fQ.input=fw("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");if(cJ){fO.style.width="1000px"}else{fO.setAttribute("wrap","off")}if(eD){fO.style.border="1px solid black"}fO.setAttribute("autocorrect","off");fO.setAttribute("autocapitalize","off");fO.setAttribute("spellcheck","false");fQ.inputDiv=fw("div",[fO],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");fQ.scrollbarH=fw("div",[fw("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fQ.scrollbarV=fw("div",[fw("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");fQ.scrollbarFiller=fw("div",null,"CodeMirror-scrollbar-filler");fQ.gutterFiller=fw("div",null,"CodeMirror-gutter-filler");fQ.lineDiv=fw("div",null,"CodeMirror-code");fQ.selectionDiv=fw("div",null,null,"position: relative; z-index: 1");fQ.cursorDiv=fw("div",null,"CodeMirror-cursors");fQ.measure=fw("div",null,"CodeMirror-measure");fQ.lineMeasure=fw("div",null,"CodeMirror-measure");fQ.lineSpace=fw("div",[fQ.measure,fQ.lineMeasure,fQ.selectionDiv,fQ.cursorDiv,fQ.lineDiv],null,"position: relative; outline: none");fQ.mover=fw("div",[fw("div",[fQ.lineSpace],"CodeMirror-lines")],null,"position: relative");fQ.sizer=fw("div",[fQ.mover],"CodeMirror-sizer");fQ.heightForcer=fw("div",null,null,"position: absolute; height: "+ba+"px; width: 1px;");fQ.gutters=fw("div",null,"CodeMirror-gutters");fQ.lineGutter=null;fQ.scroller=fw("div",[fQ.sizer,fQ.heightForcer,fQ.gutters],"CodeMirror-scroll");fQ.scroller.setAttribute("tabIndex","-1");fQ.wrapper=fw("div",[fQ.inputDiv,fQ.scrollbarH,fQ.scrollbarV,fQ.scrollbarFiller,fQ.gutterFiller,fQ.scroller],"CodeMirror");if(b1){fQ.gutters.style.zIndex=-1;fQ.scroller.style.paddingRight=0}if(eD){fO.style.width="0px"}if(!cJ){fQ.scroller.draggable=true}if(a1){fQ.inputDiv.style.height="1px";fQ.inputDiv.style.position="absolute"}if(b1){fQ.scrollbarH.style.minHeight=fQ.scrollbarV.style.minWidth="18px"}if(fN.appendChild){fN.appendChild(fQ.wrapper)}else{fN(fQ.wrapper)}fQ.viewFrom=fQ.viewTo=fP.first;fQ.view=[];fQ.externalMeasured=null;fQ.viewOffset=0;fQ.lastSizeC=0;fQ.updateLineNumbers=null;fQ.lineNumWidth=fQ.lineNumInnerWidth=fQ.lineNumChars=null;fQ.prevInput="";fQ.alignWidgets=false;fQ.pollingFast=false;fQ.poll=new fM();fQ.cachedCharWidth=fQ.cachedTextHeight=fQ.cachedPaddingH=null;fQ.inaccurateSelection=false;fQ.maxLine=null;fQ.maxLineLength=0;fQ.maxLineChanged=false;fQ.wheelDX=fQ.wheelDY=fQ.wheelStartX=fQ.wheelStartY=null;fQ.shift=false;fQ.selForContextMenu=null}function bh(fN){fN.doc.mode=I.getMode(fN.options,fN.doc.modeOption);dX(fN)}function dX(fN){fN.doc.iter(function(fO){if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}});fN.doc.frontier=fN.doc.first;dR(fN,100);fN.state.modeGen++;if(fN.curOp){af(fN)}}function ek(fN){if(fN.options.lineWrapping){fb(fN.display.wrapper,"CodeMirror-wrap");fN.display.sizer.style.minWidth=""}else{g(fN.display.wrapper,"CodeMirror-wrap");h(fN)}X(fN);af(fN);ai(fN);setTimeout(function(){eB(fN)},100)}function a3(fN){var fP=aN(fN.display),fO=fN.options.lineWrapping;var fQ=fO&&Math.max(5,fN.display.scroller.clientWidth/di(fN.display)-3);return function(fS){if(e7(fN.doc,fS)){return 0}var fR=0;if(fS.widgets){for(var fT=0;fT<fS.widgets.length;fT++){if(fS.widgets[fT].height){fR+=fS.widgets[fT].height}}}if(fO){return fR+(Math.ceil(fS.text.length/fQ)||1)*fP}else{return fR+fP}}}function X(fN){var fP=fN.doc,fO=a3(fN);fP.iter(function(fQ){var fR=fO(fQ);if(fR!=fQ.height){fA(fQ,fR)}})}function fK(fN){var fP=eK[fN.options.keyMap],fO=fP.style;fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(fO?" cm-keymap-"+fO:"")}function cB(fN){fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+fN.options.theme.replace(/(^|\s)\s*/g," cm-s-");ai(fN)}function db(fN){dO(fN);af(fN);setTimeout(function(){ei(fN)},20)}function dO(fN){var fO=fN.display.gutters,fS=fN.options.gutters;dE(fO);for(var fP=0;fP<fS.length;++fP){var fQ=fS[fP];var fR=fO.appendChild(fw("div",null,"CodeMirror-gutter "+fQ));if(fQ=="CodeMirror-linenumbers"){fN.display.lineGutter=fR;fR.style.width=(fN.display.lineNumWidth||1)+"px"}}fO.style.display=fP?"":"none";cN(fN)}function cN(fN){var fO=fN.display.gutters.offsetWidth;fN.display.sizer.style.marginLeft=fO+"px";fN.display.scrollbarH.style.left=fN.options.fixedGutter?fO+"px":0}function dY(fP){if(fP.height==0){return 0}var fO=fP.text.length,fN,fR=fP;while(fN=er(fR)){var fQ=fN.find(0,true);fR=fQ.from.line;fO+=fQ.from.ch-fQ.to.ch}fR=fP;while(fN=d7(fR)){var fQ=fN.find(0,true);fO-=fR.text.length-fQ.from.ch;fR=fQ.to.line;fO+=fR.text.length-fQ.to.ch}return fO}function h(fN){var fP=fN.display,fO=fN.doc;fP.maxLine=eP(fO,fO.first);fP.maxLineLength=dY(fP.maxLine);fP.maxLineChanged=true;fO.iter(function(fR){var fQ=dY(fR);if(fQ>fP.maxLineLength){fP.maxLineLength=fQ;fP.maxLine=fR}})}function b4(fN){var fO=c1(fN.gutters,"CodeMirror-linenumbers");if(fO==-1&&fN.lineNumbers){fN.gutters=fN.gutters.concat(["CodeMirror-linenumbers"])}else{if(fO>-1&&!fN.lineNumbers){fN.gutters=fN.gutters.slice(0);fN.gutters.splice(fO,1)}}}function df(fO){var fN=fO.display.scroller;return{clientHeight:fN.clientHeight,barHeight:fO.display.scrollbarV.clientHeight,scrollWidth:fN.scrollWidth,clientWidth:fN.clientWidth,barWidth:fO.display.scrollbarH.clientWidth,docHeight:Math.round(fO.doc.height+bx(fO.display))}}function eB(fN,fS){if(!fS){fS=df(fN)}var fU=fN.display;var fR=fS.docHeight+ba;var fT=fS.scrollWidth>fS.clientWidth;var fP=fR>fS.clientHeight;if(fP){fU.scrollbarV.style.display="block";fU.scrollbarV.style.bottom=fT?l(fU.measure)+"px":"0";fU.scrollbarV.firstChild.style.height=Math.max(0,fR-fS.clientHeight+(fS.barHeight||fU.scrollbarV.clientHeight))+"px"}else{fU.scrollbarV.style.display="";fU.scrollbarV.firstChild.style.height="0"}if(fT){fU.scrollbarH.style.display="block";fU.scrollbarH.style.right=fP?l(fU.measure)+"px":"0";fU.scrollbarH.firstChild.style.width=(fS.scrollWidth-fS.clientWidth+(fS.barWidth||fU.scrollbarH.clientWidth))+"px"}else{fU.scrollbarH.style.display="";fU.scrollbarH.firstChild.style.width="0"}if(fT&&fP){fU.scrollbarFiller.style.display="block";fU.scrollbarFiller.style.height=fU.scrollbarFiller.style.width=l(fU.measure)+"px"}else{fU.scrollbarFiller.style.display=""}if(fT&&fN.options.coverGutterNextToScrollbar&&fN.options.fixedGutter){fU.gutterFiller.style.display="block";fU.gutterFiller.style.height=l(fU.measure)+"px";fU.gutterFiller.style.width=fU.gutters.offsetWidth+"px"}else{fU.gutterFiller.style.display=""}if(!fN.state.checkedOverlayScrollbar&&fS.clientHeight>0){if(l(fU.measure)===0){var fO=bU&&!cP?"12px":"18px";fU.scrollbarV.style.minWidth=fU.scrollbarH.style.minHeight=fO;var fQ=function(fV){if(L(fV)!=fU.scrollbarV&&L(fV)!=fU.scrollbarH){cL(fN,d5)(fV)}};bM(fU.scrollbarV,"mousedown",fQ);bM(fU.scrollbarH,"mousedown",fQ)}fN.state.checkedOverlayScrollbar=true}}function bT(fP,fT,fV){var fQ=fV&&fV.top!=null?fV.top:fP.scroller.scrollTop;fQ=Math.floor(fQ-eI(fP));var fN=fV&&fV.bottom!=null?fV.bottom:fQ+fP.wrapper.clientHeight;var fR=bv(fT,fQ),fS=bv(fT,fN);if(fV&&fV.ensure){var fO=fV.ensure.from.line,fU=fV.ensure.to.line;if(fO<fR){return{from:fO,to:bv(fT,bB(eP(fT,fO))+fP.wrapper.clientHeight)}}if(Math.min(fU,fT.lastLine())>=fS){return{from:bv(fT,bB(eP(fT,fU))-fP.wrapper.clientHeight),to:fU}}}return{from:fR,to:fS}}function ei(fV){var fT=fV.display,fU=fT.view;if(!fT.alignWidgets&&(!fT.gutters.firstChild||!fV.options.fixedGutter)){return}var fR=dA(fT)-fT.scroller.scrollLeft+fV.doc.scrollLeft;var fN=fT.gutters.offsetWidth,fO=fR+"px";for(var fQ=0;fQ<fU.length;fQ++){if(!fU[fQ].hidden){if(fV.options.fixedGutter&&fU[fQ].gutter){fU[fQ].gutter.style.left=fO}var fS=fU[fQ].alignable;if(fS){for(var fP=0;fP<fS.length;fP++){fS[fP].style.left=fO}}}}if(fV.options.fixedGutter){fT.gutters.style.left=(fR+fN)+"px"}}function dI(fN){if(!fN.options.lineNumbers){return false}var fS=fN.doc,fO=d4(fN.options,fS.first+fS.size-1),fR=fN.display;if(fO.length!=fR.lineNumChars){var fT=fR.measure.appendChild(fw("div",[fw("div",fO)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var fP=fT.firstChild.offsetWidth,fQ=fT.offsetWidth-fP;fR.lineGutter.style.width="";fR.lineNumInnerWidth=Math.max(fP,fR.lineGutter.offsetWidth-fQ);fR.lineNumWidth=fR.lineNumInnerWidth+fQ;fR.lineNumChars=fR.lineNumInnerWidth?fO.length:-1;fR.lineGutter.style.width=fR.lineNumWidth+"px";cN(fN);return true}return false}function d4(fN,fO){return String(fN.lineNumberFormatter(fO+fN.firstLineNumber))}function dA(fN){return fN.scroller.getBoundingClientRect().left-fN.sizer.getBoundingClientRect().left}function dp(fS,fV,fW){var fU=fS.display.viewFrom,fT=fS.display.viewTo,fQ;var fN=bT(fS.display,fS.doc,fV);for(var fP=true;;fP=false){var fO=fS.display.scroller.clientWidth;if(!cZ(fS,fN,fW)){break}fQ=true;if(fS.display.maxLineChanged&&!fS.options.lineWrapping){b(fS)}var fR=df(fS);br(fS);de(fS,fR);eB(fS,fR);if(cJ&&fS.options.lineWrapping){fz(fS,fR)}if(fP&&fS.options.lineWrapping&&fO!=fS.display.scroller.clientWidth){fW=true;continue}fW=false;if(fV&&fV.top!=null){fV={top:Math.min(fR.docHeight-ba-fR.clientHeight,fV.top)}}fN=bT(fS.display,fS.doc,fV);if(fN.from>=fS.display.viewFrom&&fN.to<=fS.display.viewTo){break}}fS.display.updateLineNumbers=null;if(fQ){ac(fS,"update",fS);if(fS.display.viewFrom!=fU||fS.display.viewTo!=fT){ac(fS,"viewportChange",fS,fS.display.viewFrom,fS.display.viewTo)}}return fQ}function cZ(fX,fP,fY){var fR=fX.display,fW=fX.doc;if(!fR.wrapper.offsetWidth){d9(fX);return}if(!fY&&fP.from>=fR.viewFrom&&fP.to<=fR.viewTo&&cU(fX)==0){return}if(dI(fX)){d9(fX)}var fV=eM(fX);var fQ=fW.first+fW.size;var fU=Math.max(fP.from-fX.options.viewportMargin,fW.first);var fT=Math.min(fQ,fP.to+fX.options.viewportMargin);if(fR.viewFrom<fU&&fU-fR.viewFrom<20){fU=Math.max(fW.first,fR.viewFrom)}if(fR.viewTo>fT&&fR.viewTo-fT<20){fT=Math.min(fQ,fR.viewTo)}if(aX){fU=aM(fX.doc,fU);fT=dG(fX.doc,fT)}var fO=fU!=fR.viewFrom||fT!=fR.viewTo||fR.lastSizeC!=fR.wrapper.clientHeight;cD(fX,fU,fT);fR.viewOffset=bB(eP(fX.doc,fR.viewFrom));fX.display.mover.style.top=fR.viewOffset+"px";var fN=cU(fX);if(!fO&&fN==0&&!fY){return}var fS=ds();if(fN>4){fR.lineDiv.style.display="none"}cc(fX,fR.updateLineNumbers,fV);if(fN>4){fR.lineDiv.style.display=""}if(fS&&ds()!=fS&&fS.offsetHeight){fS.focus()}dE(fR.cursorDiv);dE(fR.selectionDiv);if(fO){fR.lastSizeC=fR.wrapper.clientHeight;dR(fX,400)}aZ(fX);return true}function b(fN){var fR=fN.display;var fP=dT(fN,fR.maxLine,fR.maxLine.text.length).left;fR.maxLineChanged=false;var fO=Math.max(0,fP+3);var fQ=Math.max(0,fR.sizer.offsetLeft+fO+ba-fR.scroller.clientWidth);fR.sizer.style.minWidth=fO+"px";if(fQ<fN.doc.scrollLeft){bt(fN,Math.min(fR.scroller.scrollLeft,fQ),true)}}function de(fN,fO){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top=fO.docHeight+"px";fN.display.gutters.style.height=Math.max(fO.docHeight,fO.clientHeight-ba)+"px"}function fz(fN,fO){if(fN.display.sizer.offsetWidth+fN.display.gutters.offsetWidth<fN.display.scroller.clientWidth-1){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top="0px";fN.display.gutters.style.height=fO.docHeight+"px"}}function aZ(fU){var fS=fU.display;var fO=fS.lineDiv.offsetTop;for(var fP=0;fP<fS.view.length;fP++){var fV=fS.view[fP],fW;if(fV.hidden){continue}if(b1){var fR=fV.node.offsetTop+fV.node.offsetHeight;fW=fR-fO;fO=fR}else{var fQ=fV.node.getBoundingClientRect();fW=fQ.bottom-fQ.top}var fT=fV.line.height-fW;if(fW<2){fW=aN(fS)}if(fT>0.001||fT<-0.001){fA(fV.line,fW);b0(fV.line);if(fV.rest){for(var fN=0;fN<fV.rest.length;fN++){b0(fV.rest[fN])}}}}}function b0(fN){if(fN.widgets){for(var fO=0;fO<fN.widgets.length;++fO){fN.widgets[fO].height=fN.widgets[fO].node.offsetHeight}}}function eM(fN){var fR=fN.display,fQ={},fP={};for(var fS=fR.gutters.firstChild,fO=0;fS;fS=fS.nextSibling,++fO){fQ[fN.options.gutters[fO]]=fS.offsetLeft;fP[fN.options.gutters[fO]]=fS.offsetWidth}return{fixedPos:dA(fR),gutterTotalWidth:fR.gutters.offsetWidth,gutterLeft:fQ,gutterWidth:fP,wrapperWidth:fR.wrapper.clientWidth}}function cc(fY,fP,fX){var fU=fY.display,f0=fY.options.lineNumbers;var fN=fU.lineDiv,fZ=fN.firstChild;function fT(f2){var f1=f2.nextSibling;if(cJ&&bU&&fY.display.currentWheelTarget==f2){f2.style.display="none"}else{f2.parentNode.removeChild(f2)}return f1}var fV=fU.view,fS=fU.viewFrom;for(var fQ=0;fQ<fV.length;fQ++){var fR=fV[fQ];if(fR.hidden){}else{if(!fR.node){var fO=aA(fY,fR,fS,fX);fN.insertBefore(fO,fZ)}else{while(fZ!=fR.node){fZ=fT(fZ)}var fW=f0&&fP!=null&&fP<=fS&&fR.lineNumber;if(fR.changes){if(c1(fR.changes,"gutter")>-1){fW=false}Z(fY,fR,fS,fX)}if(fW){dE(fR.lineNumber);fR.lineNumber.appendChild(document.createTextNode(d4(fY.options,fS)))}fZ=fR.node.nextSibling}}fS+=fR.size}while(fZ){fZ=fT(fZ)}}function Z(fN,fP,fR,fS){for(var fO=0;fO<fP.changes.length;fO++){var fQ=fP.changes[fO];if(fQ=="text"){eV(fN,fP)}else{if(fQ=="gutter"){cY(fN,fP,fR,fS)}else{if(fQ=="class"){dl(fP)}else{if(fQ=="widget"){al(fP,fS)}}}}}fP.changes=null}function fi(fN){if(fN.node==fN.text){fN.node=fw("div",null,null,"position: relative");if(fN.text.parentNode){fN.text.parentNode.replaceChild(fN.node,fN.text)}fN.node.appendChild(fN.text);if(b1){fN.node.style.zIndex=2}}return fN.node}function d6(fO){var fN=fO.bgClass?fO.bgClass+" "+(fO.line.bgClass||""):fO.line.bgClass;if(fN){fN+=" CodeMirror-linebackground"}if(fO.background){if(fN){fO.background.className=fN}else{fO.background.parentNode.removeChild(fO.background);fO.background=null}}else{if(fN){var fP=fi(fO);fO.background=fP.insertBefore(fw("div",null,fN),fP.firstChild)}}}function dy(fN,fO){var fP=fN.display.externalMeasured;if(fP&&fP.line==fO.line){fN.display.externalMeasured=null;fO.measure=fP.measure;return fP.built}return ev(fN,fO)}function eV(fN,fQ){var fO=fQ.text.className;var fP=dy(fN,fQ);if(fQ.text==fQ.node){fQ.node=fP.pre}fQ.text.parentNode.replaceChild(fP.pre,fQ.text);fQ.text=fP.pre;if(fP.bgClass!=fQ.bgClass||fP.textClass!=fQ.textClass){fQ.bgClass=fP.bgClass;fQ.textClass=fP.textClass;dl(fQ)}else{if(fO){fQ.text.className=fO}}}function dl(fO){d6(fO);if(fO.line.wrapClass){fi(fO).className=fO.line.wrapClass}else{if(fO.node!=fO.text){fO.node.className=""}}var fN=fO.textClass?fO.textClass+" "+(fO.line.textClass||""):fO.line.textClass;fO.text.className=fN||""}function cY(fV,fT,fS,fU){if(fT.gutter){fT.node.removeChild(fT.gutter);fT.gutter=null}var fQ=fT.line.gutterMarkers;if(fV.options.lineNumbers||fQ){var fO=fi(fT);var fR=fT.gutter=fO.insertBefore(fw("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(fV.options.fixedGutter?fU.fixedPos:-fU.gutterTotalWidth)+"px"),fT.text);if(fV.options.lineNumbers&&(!fQ||!fQ["CodeMirror-linenumbers"])){fT.lineNumber=fR.appendChild(fw("div",d4(fV.options,fS),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fU.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+fV.display.lineNumInnerWidth+"px"))}if(fQ){for(var fP=0;fP<fV.options.gutters.length;++fP){var fN=fV.options.gutters[fP],fW=fQ.hasOwnProperty(fN)&&fQ[fN];if(fW){fR.appendChild(fw("div",[fW],"CodeMirror-gutter-elt","left: "+fU.gutterLeft[fN]+"px; width: "+fU.gutterWidth[fN]+"px"))}}}}}function al(fN,fQ){if(fN.alignable){fN.alignable=null}for(var fP=fN.node.firstChild,fO;fP;fP=fO){var fO=fP.nextSibling;if(fP.className=="CodeMirror-linewidget"){fN.node.removeChild(fP)}}e4(fN,fQ)}function aA(fN,fP,fQ,fR){var fO=dy(fN,fP);fP.text=fP.node=fO.pre;if(fO.bgClass){fP.bgClass=fO.bgClass}if(fO.textClass){fP.textClass=fO.textClass}dl(fP);cY(fN,fP,fQ,fR);e4(fP,fR);return fP.node}function e4(fO,fP){fB(fO.line,fO,fP,true);if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fB(fO.rest[fN],fO,fP,false)}}}function fB(fV,fS,fU,fQ){if(!fV.widgets){return}var fN=fi(fS);for(var fP=0,fT=fV.widgets;fP<fT.length;++fP){var fR=fT[fP],fO=fw("div",[fR.node],"CodeMirror-linewidget");if(!fR.handleMouseEvents){fO.ignoreEvents=true}bu(fR,fO,fS,fU);if(fQ&&fR.above){fN.insertBefore(fO,fS.gutter||fS.text)}else{fN.appendChild(fO)}ac(fR,"redraw")}}function bu(fQ,fP,fN,fR){if(fQ.noHScroll){(fN.alignable||(fN.alignable=[])).push(fP);var fO=fR.wrapperWidth;fP.style.left=fR.fixedPos+"px";if(!fQ.coverGutter){fO-=fR.gutterTotalWidth;fP.style.paddingLeft=fR.gutterTotalWidth+"px"}fP.style.width=fO+"px"}if(fQ.coverGutter){fP.style.zIndex=5;fP.style.position="relative";if(!fQ.noHScroll){fP.style.marginLeft=-fR.gutterTotalWidth+"px"}}}var W=I.Pos=function(fN,fO){if(!(this instanceof W)){return new W(fN,fO)}this.line=fN;this.ch=fO};var b5=I.cmpPos=function(fO,fN){return fO.line-fN.line||fO.ch-fN.ch};function b9(fN){return W(fN.line,fN.ch)}function bn(fO,fN){return b5(fO,fN)<0?fN:fO}function am(fO,fN){return b5(fO,fN)<0?fO:fN}function fx(fN,fO){this.ranges=fN;this.primIndex=fO}fx.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(fN){if(fN==this){return true}if(fN.primIndex!=this.primIndex||fN.ranges.length!=this.ranges.length){return false}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP],fQ=fN.ranges[fP];if(b5(fO.anchor,fQ.anchor)!=0||b5(fO.head,fQ.head)!=0){return false}}return true},deepCopy:function(){for(var fN=[],fO=0;fO<this.ranges.length;fO++){fN[fO]=new dB(b9(this.ranges[fO].anchor),b9(this.ranges[fO].head))}return new fx(fN,this.primIndex)},somethingSelected:function(){for(var fN=0;fN<this.ranges.length;fN++){if(!this.ranges[fN].empty()){return true}}return false},contains:function(fQ,fN){if(!fN){fN=fQ}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP];if(b5(fN,fO.from())>=0&&b5(fQ,fO.to())<=0){return fP}}return -1}};function dB(fN,fO){this.anchor=fN;this.head=fO}dB.prototype={from:function(){return am(this.anchor,this.head)},to:function(){return bn(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function cm(fN,fU){var fP=fN[fU];fN.sort(function(fX,fW){return b5(fX.from(),fW.from())});fU=c1(fN,fP);for(var fR=1;fR<fN.length;fR++){var fV=fN[fR],fO=fN[fR-1];if(b5(fO.to(),fV.from())>=0){var fS=am(fO.from(),fV.from()),fT=bn(fO.to(),fV.to());var fQ=fO.empty()?fV.from()==fV.head:fO.from()==fO.head;if(fR<=fU){--fU}fN.splice(--fR,2,new dB(fQ?fT:fS,fQ?fS:fT))}}return new fx(fN,fU)}function eu(fN,fO){return new fx([new dB(fN,fO||fN)],0)}function cO(fN,fO){return Math.max(fN.first,Math.min(fO,fN.first+fN.size-1))}function fj(fO,fP){if(fP.line<fO.first){return W(fO.first,0)}var fN=fO.first+fO.size-1;if(fP.line>fN){return W(fN,eP(fO,fN).text.length)}return e3(fP,eP(fO,fP.line).text.length)}function e3(fP,fO){var fN=fP.ch;if(fN==null||fN>fO){return W(fP.line,fO)}else{if(fN<0){return W(fP.line,0)}else{return fP}}}function bW(fO,fN){return fN>=fO.first&&fN<fO.first+fO.size}function dC(fP,fQ){for(var fN=[],fO=0;fO<fQ.length;fO++){fN[fO]=fj(fP,fQ[fO])}return fN}function e6(fS,fO,fR,fN){if(fS.cm&&fS.cm.display.shift||fS.extend){var fQ=fO.anchor;if(fN){var fP=b5(fR,fQ)<0;if(fP!=(b5(fN,fQ)<0)){fQ=fR;fR=fN}else{if(fP!=(b5(fR,fN)<0)){fR=fN}}}return new dB(fQ,fR)}else{return new dB(fN||fR,fR)}}function ft(fQ,fP,fN,fO){bJ(fQ,new fx([e6(fQ,fQ.sel.primary(),fP,fN)],0),fO)}function at(fS,fR,fP){for(var fO=[],fQ=0;fQ<fS.sel.ranges.length;fQ++){fO[fQ]=e6(fS,fS.sel.ranges[fQ],fR[fQ],null)}var fN=cm(fO,fS.sel.primIndex);bJ(fS,fN,fP)}function f(fR,fQ,fO,fP){var fN=fR.sel.ranges.slice(0);fN[fQ]=fO;bJ(fR,cm(fN,fR.sel.primIndex),fP)}function G(fQ,fO,fP,fN){bJ(fQ,eu(fO,fP),fN)}function d(fP,fN){var fO={ranges:fN.ranges,update:function(fQ){this.ranges=[];for(var fR=0;fR<fQ.length;fR++){this.ranges[fR]=new dB(fj(fP,fQ[fR].anchor),fj(fP,fQ[fR].head))}}};az(fP,"beforeSelectionChange",fP,fO);if(fP.cm){az(fP.cm,"beforeSelectionChange",fP.cm,fO)}if(fO.ranges!=fN.ranges){return cm(fO.ranges,fO.ranges.length-1)}else{return fN}}function eH(fR,fQ,fO){var fN=fR.history.done,fP=fh(fN);if(fP&&fP.ranges){fN[fN.length-1]=fQ;d1(fR,fQ,fO)}else{bJ(fR,fQ,fO)}}function bJ(fP,fO,fN){d1(fP,fO,fN);fG(fP,fP.sel,fP.cm?fP.cm.curOp.id:NaN,fN)}function d1(fQ,fP,fO){if(eS(fQ,"beforeSelectionChange")||fQ.cm&&eS(fQ.cm,"beforeSelectionChange")){fP=d(fQ,fP)}var fN=b5(fP.primary().head,fQ.sel.primary().head)<0?-1:1;cS(fQ,o(fQ,fP,fN,true));if(!(fO&&fO.scroll===false)&&fQ.cm){fg(fQ.cm)}}function cS(fO,fN){if(fN.equals(fO.sel)){return}fO.sel=fN;if(fO.cm){fO.cm.curOp.updateInput=fO.cm.curOp.selectionChanged=true;V(fO.cm)}ac(fO,"cursorActivity",fO)}function ea(fN){cS(fN,o(fN,fN.sel,null,false),Y)}function o(fV,fN,fS,fT){var fP;for(var fQ=0;fQ<fN.ranges.length;fQ++){var fR=fN.ranges[fQ];var fU=bK(fV,fR.anchor,fS,fT);var fO=bK(fV,fR.head,fS,fT);if(fP||fU!=fR.anchor||fO!=fR.head){if(!fP){fP=fN.ranges.slice(0,fQ)}fP[fQ]=new dB(fU,fO)}}return fP?cm(fP,fN.primIndex):fN}function bK(fW,fV,fS,fT){var fX=false,fP=fV;var fQ=fS||1;fW.cantEdit=false;search:for(;;){var fY=eP(fW,fP.line);if(fY.markedSpans){for(var fR=0;fR<fY.markedSpans.length;++fR){var fN=fY.markedSpans[fR],fO=fN.marker;if((fN.from==null||(fO.inclusiveLeft?fN.from<=fP.ch:fN.from<fP.ch))&&(fN.to==null||(fO.inclusiveRight?fN.to>=fP.ch:fN.to>fP.ch))){if(fT){az(fO,"beforeCursorEnter");if(fO.explicitlyCleared){if(!fY.markedSpans){break}else{--fR;continue}}}if(!fO.atomic){continue}var fU=fO.find(fQ<0?-1:1);if(b5(fU,fP)==0){fU.ch+=fQ;if(fU.ch<0){if(fU.line>fW.first){fU=fj(fW,W(fU.line-1))}else{fU=null}}else{if(fU.ch>fY.text.length){if(fU.line<fW.first+fW.size-1){fU=W(fU.line+1,0)}else{fU=null}}}if(!fU){if(fX){if(!fT){return bK(fW,fV,fS,true)}fW.cantEdit=true;return W(fW.first,0)}fX=true;fU=fV;fQ=-fQ}}fP=fU;continue search}}}return fP}}function br(fZ){var fU=fZ.display,fY=fZ.doc;var fW=document.createDocumentFragment();var fQ=document.createDocumentFragment();for(var fS=0;fS<fY.sel.ranges.length;fS++){var fT=fY.sel.ranges[fS];var fR=fT.empty();if(fR||fZ.options.showCursorWhenSelecting){B(fZ,fT,fW)}if(!fR){bs(fZ,fT,fQ)}}if(fZ.options.moveInputWithCursor){var fV=dx(fZ,fY.sel.primary().head,"div");var fN=fU.wrapper.getBoundingClientRect(),fP=fU.lineDiv.getBoundingClientRect();var fX=Math.max(0,Math.min(fU.wrapper.clientHeight-10,fV.top+fP.top-fN.top));var fO=Math.max(0,Math.min(fU.wrapper.clientWidth-10,fV.left+fP.left-fN.left));fU.inputDiv.style.top=fX+"px";fU.inputDiv.style.left=fO+"px"}bG(fU.cursorDiv,fW);bG(fU.selectionDiv,fQ)}function B(fN,fQ,fP){var fS=dx(fN,fQ.head,"div");var fR=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor"));fR.style.left=fS.left+"px";fR.style.top=fS.top+"px";fR.style.height=Math.max(0,fS.bottom-fS.top)*fN.options.cursorHeight+"px";if(fS.other){var fO=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));fO.style.display="";fO.style.left=fS.other.left+"px";fO.style.top=fS.other.top+"px";fO.style.height=(fS.other.bottom-fS.other.top)*0.85+"px"}}function bs(fR,fX,fS){var f0=fR.display,f4=fR.doc;var fN=document.createDocumentFragment();var fW=eG(fR.display),fQ=fW.left,f1=f0.lineSpace.offsetWidth-fW.right;function fY(f8,f7,f6,f5){if(f7<0){f7=0}f7=Math.round(f7);f5=Math.round(f5);fN.appendChild(fw("div",null,"CodeMirror-selected","position: absolute; left: "+f8+"px; top: "+f7+"px; width: "+(f6==null?f1-f8:f6)+"px; height: "+(f5-f7)+"px"))}function fO(f6,f8,gb){var f7=eP(f4,f6);var f9=f7.text.length;var gc,f5;function ga(ge,gd){return cx(fR,W(f6,ge),"div",f7,gd)}dH(a(f7),f8||0,gb==null?f9:gb,function(gk,gj,gd){var gg=ga(gk,"left"),gh,gi,gf;if(gk==gj){gh=gg;gi=gf=gg.left}else{gh=ga(gj-1,"right");if(gd=="rtl"){var ge=gg;gg=gh;gh=ge}gi=gg.left;gf=gh.right}if(f8==null&&gk==0){gi=fQ}if(gh.top-gg.top>3){fY(gi,gg.top,null,gg.bottom);gi=fQ;if(gg.bottom<gh.top){fY(gi,gg.bottom,null,gh.top)}}if(gb==null&&gj==f9){gf=f1}if(!gc||gg.top<gc.top||gg.top==gc.top&&gg.left<gc.left){gc=gg}if(!f5||gh.bottom>f5.bottom||gh.bottom==f5.bottom&&gh.right>f5.right){f5=gh}if(gi<fQ+1){gi=fQ}fY(gi,gh.top,gf-gi,gh.bottom)});return{start:gc,end:f5}}var f3=fX.from(),f2=fX.to();if(f3.line==f2.line){fO(f3.line,f3.ch,f2.ch)}else{var fP=eP(f4,f3.line),fU=eP(f4,f2.line);var fT=z(fP)==z(fU);var fV=fO(f3.line,f3.ch,fT?fP.text.length+1:null).end;var fZ=fO(f2.line,fT?0:null,f2.ch).start;if(fT){if(fV.top<fZ.top-2){fY(fV.right,fV.top,null,fV.bottom);fY(fQ,fZ.top,fZ.left,fZ.bottom)}else{fY(fV.right,fV.top,fZ.left-fV.right,fV.bottom)}}if(fV.bottom<fZ.top){fY(fQ,fV.bottom,null,fZ.top)}}fS.appendChild(fN)}function p(fN){if(!fN.state.focused){return}var fP=fN.display;clearInterval(fP.blinker);var fO=true;fP.cursorDiv.style.visibility="";if(fN.options.cursorBlinkRate>0){fP.blinker=setInterval(function(){fP.cursorDiv.style.visibility=(fO=!fO)?"":"hidden"},fN.options.cursorBlinkRate)}}function dR(fN,fO){if(fN.doc.mode.startState&&fN.doc.frontier<fN.display.viewTo){fN.state.highlight.set(fO,cl(cC,fN))}}function cC(fN){var fQ=fN.doc;if(fQ.frontier<fQ.first){fQ.frontier=fQ.first}if(fQ.frontier>=fN.display.viewTo){return}var fO=+new Date+fN.options.workTime;var fP=bR(fQ.mode,dg(fN,fQ.frontier));cz(fN,function(){fQ.iter(fQ.frontier,Math.min(fQ.first+fQ.size,fN.display.viewTo+500),function(fR){if(fQ.frontier>=fN.display.viewFrom){var fT=fR.styles;var fU=fa(fN,fR,fP,true);fR.styles=fU.styles;if(fU.classes){fR.styleClasses=fU.classes}else{if(fR.styleClasses){fR.styleClasses=null}}var fV=!fT||fT.length!=fR.styles.length;for(var fS=0;!fV&&fS<fT.length;++fS){fV=fT[fS]!=fR.styles[fS]}if(fV){R(fN,fQ.frontier,"text")}fR.stateAfter=bR(fQ.mode,fP)}else{dc(fN,fR.text,fP);fR.stateAfter=fQ.frontier%5==0?bR(fQ.mode,fP):null}++fQ.frontier;if(+new Date>fO){dR(fN,fN.options.workDelay);return true}})})}function co(fT,fN,fQ){var fO,fR,fS=fT.doc;var fP=fQ?-1:fN-(fT.doc.mode.innerMode?1000:100);for(var fW=fN;fW>fP;--fW){if(fW<=fS.first){return fS.first}var fV=eP(fS,fW-1);if(fV.stateAfter&&(!fQ||fW<=fS.frontier)){return fW}var fU=bI(fV.text,null,fT.options.tabSize);if(fR==null||fO>fU){fR=fW-1;fO=fU}}return fR}function dg(fN,fT,fO){var fR=fN.doc,fQ=fN.display;if(!fR.mode.startState){return true}var fS=co(fN,fT,fO),fP=fS>fR.first&&eP(fR,fS-1).stateAfter;if(!fP){fP=bP(fR.mode)}else{fP=bR(fR.mode,fP)}fR.iter(fS,fT,function(fU){dc(fN,fU.text,fP);var fV=fS==fT-1||fS%5==0||fS>=fQ.viewFrom&&fS<fQ.viewTo;fU.stateAfter=fV?bR(fR.mode,fP):null;++fS});if(fO){fR.frontier=fS}return fP}function eI(fN){return fN.lineSpace.offsetTop}function bx(fN){return fN.mover.offsetHeight-fN.lineSpace.offsetHeight}function eG(fQ){if(fQ.cachedPaddingH){return fQ.cachedPaddingH}var fP=bG(fQ.measure,fw("pre","x"));var fN=window.getComputedStyle?window.getComputedStyle(fP):fP.currentStyle;var fO={left:parseInt(fN.paddingLeft),right:parseInt(fN.paddingRight)};if(!isNaN(fO.left)&&!isNaN(fO.right)){fQ.cachedPaddingH=fO}return fO}function b8(fU,fQ,fT){var fP=fU.options.lineWrapping;var fR=fP&&fU.display.scroller.clientWidth;if(!fQ.measure.heights||fP&&fQ.measure.width!=fR){var fS=fQ.measure.heights=[];if(fP){fQ.measure.width=fR;var fW=fQ.text.firstChild.getClientRects();for(var fN=0;fN<fW.length-1;fN++){var fV=fW[fN],fO=fW[fN+1];if(Math.abs(fV.bottom-fO.bottom)>2){fS.push((fV.bottom+fO.top)/2-fT.top)}}}fS.push(fT.bottom-fT.top)}}function cj(fP,fN,fQ){if(fP.line==fN){return{map:fP.measure.map,cache:fP.measure.cache}}for(var fO=0;fO<fP.rest.length;fO++){if(fP.rest[fO]==fN){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO]}}}for(var fO=0;fO<fP.rest.length;fO++){if(bC(fP.rest[fO])>fQ){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO],before:true}}}}function cK(fN,fP){fP=z(fP);var fR=bC(fP);var fO=fN.display.externalMeasured=new bl(fN.doc,fP,fR);fO.lineN=fR;var fQ=fO.built=ev(fN,fO);fO.text=fQ.pre;bG(fN.display.lineMeasure,fQ.pre);return fO}function dT(fN,fO,fQ,fP){return D(fN,aU(fN,fO),fQ,fP)}function eL(fN,fP){if(fP>=fN.display.viewFrom&&fP<fN.display.viewTo){return fN.display.view[c7(fN,fP)]}var fO=fN.display.externalMeasured;if(fO&&fP>=fO.lineN&&fP<fO.lineN+fO.size){return fO}}function aU(fN,fP){var fQ=bC(fP);var fO=eL(fN,fQ);if(fO&&!fO.text){fO=null}else{if(fO&&fO.changes){Z(fN,fO,fQ,eM(fN))}}if(!fO){fO=cK(fN,fP)}var fR=cj(fO,fP,fQ);return{line:fP,view:fO,rect:null,map:fR.map,cache:fR.cache,before:fR.before,hasHeights:false}}function D(fN,fS,fQ,fO){if(fS.before){fQ=-1}var fP=fQ+(fO||""),fR;if(fS.cache.hasOwnProperty(fP)){fR=fS.cache[fP]}else{if(!fS.rect){fS.rect=fS.view.text.getBoundingClientRect()}if(!fS.hasHeights){b8(fN,fS.view,fS.rect);fS.hasHeights=true}fR=k(fN,fS,fQ,fO);if(!fR.bogus){fS.cache[fP]=fR}}return{left:fR.left,right:fR.right,top:fR.top,bottom:fR.bottom}}var ee={left:0,right:0,top:0,bottom:0};function k(fU,f2,fW,fS){var f5=f2.map;var fZ,fR,fQ,fN;for(var f1=0;f1<f5.length;f1+=3){var f4=f5[f1],f0=f5[f1+1];if(fW<f4){fR=0;fQ=1;fN="left"}else{if(fW<f0){fR=fW-f4;fQ=fR+1}else{if(f1==f5.length-3||fW==f0&&f5[f1+3]>fW){fQ=f0-f4;fR=fQ-1;if(fW>=f0){fN="right"}}}}if(fR!=null){fZ=f5[f1+2];if(f4==f0&&fS==(fZ.insertLeft?"left":"right")){fN=fS}if(fS=="left"&&fR==0){while(f1&&f5[f1-2]==f5[f1-3]&&f5[f1-1].insertLeft){fZ=f5[(f1-=3)+2];fN="left"}}if(fS=="right"&&fR==f0-f4){while(f1<f5.length-3&&f5[f1+3]==f5[f1+4]&&!f5[f1+5].insertLeft){fZ=f5[(f1+=3)+2];fN="right"}}break}}var fO;if(fZ.nodeType==3){while(fR&&e0(f2.line.text.charAt(f4+fR))){--fR}while(f4+fQ<f0&&e0(f2.line.text.charAt(f4+fQ))){++fQ}if(bY&&fR==0&&fQ==f0-f4){fO=fZ.parentNode.getBoundingClientRect()}else{if(dn&&fU.options.lineWrapping){var fP=cb(fZ,fR,fQ).getClientRects();if(fP.length){fO=fP[fS=="right"?fP.length-1:0]}else{fO=ee}}else{fO=cb(fZ,fR,fQ).getBoundingClientRect()||ee}}}else{if(fR>0){fN=fS="right"}var fP;if(fU.options.lineWrapping&&(fP=fZ.getClientRects()).length>1){fO=fP[fS=="right"?fP.length-1:0]}else{fO=fZ.getBoundingClientRect()}}if(bY&&!fR&&(!fO||!fO.left&&!fO.right)){var fT=fZ.parentNode.getClientRects()[0];if(fT){fO={left:fT.left,right:fT.left+di(fU.display),top:fT.top,bottom:fT.bottom}}else{fO=ee}}var fY,fX=(fO.bottom+fO.top)/2-f2.rect.top;var f3=f2.view.measure.heights;for(var f1=0;f1<f3.length-1;f1++){if(fX<f3[f1]){break}}fY=f1?f3[f1-1]:0;fX=f3[f1];var fV={left:(fN=="right"?fO.right:fO.left)-f2.rect.left,right:(fN=="left"?fO.left:fO.right)-f2.rect.left,top:fY,bottom:fX};if(!fO.left&&!fO.right){fV.bogus=true}return fV}function ap(fO){if(fO.measure){fO.measure.cache={};fO.measure.heights=null;if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fO.measure.caches[fN]={}}}}}function aF(fN){fN.display.externalMeasure=null;dE(fN.display.lineMeasure);for(var fO=0;fO<fN.display.view.length;fO++){ap(fN.display.view[fO])}}function ai(fN){aF(fN);fN.display.cachedCharWidth=fN.display.cachedTextHeight=fN.display.cachedPaddingH=null;if(!fN.options.lineWrapping){fN.display.maxLineChanged=true}fN.display.lineNumChars=null}function ck(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ci(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function et(fT,fQ,fS,fO){if(fQ.widgets){for(var fP=0;fP<fQ.widgets.length;++fP){if(fQ.widgets[fP].above){var fV=cH(fQ.widgets[fP]);fS.top+=fV;fS.bottom+=fV}}}if(fO=="line"){return fS}if(!fO){fO="local"}var fR=bB(fQ);if(fO=="local"){fR+=eI(fT.display)}else{fR-=fT.display.viewOffset}if(fO=="page"||fO=="window"){var fN=fT.display.lineSpace.getBoundingClientRect();fR+=fN.top+(fO=="window"?0:ci());var fU=fN.left+(fO=="window"?0:ck());fS.left+=fU;fS.right+=fU}fS.top+=fR;fS.bottom+=fR;return fS}function fJ(fO,fR,fP){if(fP=="div"){return fR}var fT=fR.left,fS=fR.top;if(fP=="page"){fT-=ck();fS-=ci()}else{if(fP=="local"||!fP){var fQ=fO.display.sizer.getBoundingClientRect();fT+=fQ.left;fS+=fQ.top}}var fN=fO.display.lineSpace.getBoundingClientRect();return{left:fT-fN.left,top:fS-fN.top}}function cx(fN,fR,fQ,fP,fO){if(!fP){fP=eP(fN.doc,fR.line)}return et(fN,fP,dT(fN,fP,fR.ch,fO),fQ)}function dx(fV,fU,fP,fT,fX){fT=fT||eP(fV.doc,fU.line);if(!fX){fX=aU(fV,fT)}function fR(f0,fZ){var fY=D(fV,fX,f0,fZ?"right":"left");if(fZ){fY.left=fY.right}else{fY.right=fY.left}return et(fV,fT,fY,fP)}function fW(f1,fY){var fZ=fS[fY],f0=fZ.level%2;if(f1==dd(fZ)&&fY&&fZ.level<fS[fY-1].level){fZ=fS[--fY];f1=fI(fZ)-(fZ.level%2?0:1);f0=true}else{if(f1==fI(fZ)&&fY<fS.length-1&&fZ.level<fS[fY+1].level){fZ=fS[++fY];f1=dd(fZ)-fZ.level%2;f0=false}}if(f0&&f1==fZ.to&&f1>fZ.from){return fR(f1-1)}return fR(f1,f0)}var fS=a(fT),fN=fU.ch;if(!fS){return fR(fN)}var fO=aB(fS,fN);var fQ=fW(fN,fO);if(eE!=null){fQ.other=fW(fN,eE)}return fQ}function dm(fN,fR){var fQ=0,fR=fj(fN.doc,fR);if(!fN.options.lineWrapping){fQ=di(fN.display)*fR.ch}var fO=eP(fN.doc,fR.line);var fP=bB(fO)+eI(fN.display);return{left:fQ,right:fQ,top:fP,bottom:fP+fO.height}}function fv(fN,fO,fP,fR){var fQ=W(fN,fO);fQ.xRel=fR;if(fP){fQ.outside=true}return fQ}function fo(fU,fR,fQ){var fT=fU.doc;fQ+=fU.display.viewOffset;if(fQ<0){return fv(fT.first,0,true,-1)}var fP=bv(fT,fQ),fV=fT.first+fT.size-1;if(fP>fV){return fv(fT.first+fT.size-1,eP(fT,fV).text.length,true,1)}if(fR<0){fR=0}var fO=eP(fT,fP);for(;;){var fW=cI(fU,fO,fP,fR,fQ);var fS=d7(fO);var fN=fS&&fS.find(0,true);if(fS&&(fW.ch>fN.from.ch||fW.ch==fN.from.ch&&fW.xRel>0)){fP=bC(fO=fN.to.line)}else{return fW}}}function cI(fX,fP,f0,fZ,fY){var fW=fY-bB(fP);var fT=false,f6=2*fX.display.wrapper.clientWidth;var f3=aU(fX,fP);function ga(gc){var gd=dx(fX,W(f0,gc),"line",fP,f3);fT=true;if(fW>gd.bottom){return gd.left-f6}else{if(fW<gd.top){return gd.left+f6}else{fT=false}}return gd.left}var f2=a(fP),f5=fP.text.length;var f7=ct(fP),fQ=cE(fP);var f4=ga(f7),fN=fT,fO=ga(fQ),fS=fT;if(fZ>fO){return fv(f0,fQ,fS,1)}for(;;){if(f2?fQ==f7||fQ==v(fP,f7,1):fQ-f7<=1){var f1=fZ<f4||fZ-f4<=fO-fZ?f7:fQ;var f9=fZ-(f1==f7?f4:fO);while(e0(fP.text.charAt(f1))){++f1}var fV=fv(f0,f1,f1==f7?fN:fS,f9<-1?-1:f9>1?1:0);return fV}var fU=Math.ceil(f5/2),gb=f7+fU;if(f2){gb=f7;for(var f8=0;f8<fU;++f8){gb=v(fP,gb,1)}}var fR=ga(gb);if(fR>fZ){fQ=gb;fO=fR;if(fS=fT){fO+=1000}f5=fU}else{f7=gb;f4=fR;fN=fT;f5-=fU}}}var aC;function aN(fP){if(fP.cachedTextHeight!=null){return fP.cachedTextHeight}if(aC==null){aC=fw("pre");for(var fO=0;fO<49;++fO){aC.appendChild(document.createTextNode("x"));aC.appendChild(fw("br"))}aC.appendChild(document.createTextNode("x"))}bG(fP.measure,aC);var fN=aC.offsetHeight/50;if(fN>3){fP.cachedTextHeight=fN}dE(fP.measure);return fN||1}function di(fR){if(fR.cachedCharWidth!=null){return fR.cachedCharWidth}var fN=fw("span","xxxxxxxxxx");var fQ=fw("pre",[fN]);bG(fR.measure,fQ);var fP=fN.getBoundingClientRect(),fO=(fP.right-fP.left)/10;if(fO>2){fR.cachedCharWidth=fO}return fO||10}var dL=0;function cw(fN){fN.curOp={viewChanged:false,startHeight:fN.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++dL};if(!ch++){be=[]}}function aj(fY){var fT=fY.curOp,fX=fY.doc,fU=fY.display;fY.curOp=null;if(fT.updateMaxLine){h(fY)}if(fT.viewChanged||fT.forceUpdate||fT.scrollTop!=null||fT.scrollToPos&&(fT.scrollToPos.from.line<fU.viewFrom||fT.scrollToPos.to.line>=fU.viewTo)||fU.maxLineChanged&&fY.options.lineWrapping){var fR=dp(fY,{top:fT.scrollTop,ensure:fT.scrollToPos},fT.forceUpdate);if(fY.display.scroller.offsetHeight){fY.doc.scrollTop=fY.display.scroller.scrollTop}}if(!fR&&fT.selectionChanged){br(fY)}if(!fR&&fT.startHeight!=fY.doc.height){eB(fY)}if(fT.scrollTop!=null&&fU.scroller.scrollTop!=fT.scrollTop){var fV=Math.max(0,Math.min(fU.scroller.scrollHeight-fU.scroller.clientHeight,fT.scrollTop));fU.scroller.scrollTop=fU.scrollbarV.scrollTop=fX.scrollTop=fV}if(fT.scrollLeft!=null&&fU.scroller.scrollLeft!=fT.scrollLeft){var fO=Math.max(0,Math.min(fU.scroller.scrollWidth-fU.scroller.clientWidth,fT.scrollLeft));fU.scroller.scrollLeft=fU.scrollbarH.scrollLeft=fX.scrollLeft=fO;ei(fY)}if(fT.scrollToPos){var fW=E(fY,fj(fY.doc,fT.scrollToPos.from),fj(fY.doc,fT.scrollToPos.to),fT.scrollToPos.margin);if(fT.scrollToPos.isCursor&&fY.state.focused){dJ(fY,fW)}}if(fT.selectionChanged){p(fY)}if(fY.state.focused&&fT.updateInput){eZ(fY,fT.typing)}var fS=fT.maybeHiddenMarkers,fN=fT.maybeUnhiddenMarkers;if(fS){for(var fQ=0;fQ<fS.length;++fQ){if(!fS[fQ].lines.length){az(fS[fQ],"hide")}}}if(fN){for(var fQ=0;fQ<fN.length;++fQ){if(fN[fQ].lines.length){az(fN[fQ],"unhide")}}}var fP;if(!--ch){fP=be;be=null}if(fT.changeObjs){az(fY,"changes",fY,fT.changeObjs)}if(fP){for(var fQ=0;fQ<fP.length;++fQ){fP[fQ]()}}if(fT.cursorActivityHandlers){for(var fQ=0;fQ<fT.cursorActivityHandlers.length;fQ++){fT.cursorActivityHandlers[fQ](fY)}}}function cz(fN,fO){if(fN.curOp){return fO()}cw(fN);try{return fO()}finally{aj(fN)}}function cL(fN,fO){return function(){if(fN.curOp){return fO.apply(fN,arguments)}cw(fN);try{return fO.apply(fN,arguments)}finally{aj(fN)}}}function cR(fN){return function(){if(this.curOp){return fN.apply(this,arguments)}cw(this);try{return fN.apply(this,arguments)}finally{aj(this)}}}function cs(fN){return function(){var fO=this.cm;if(!fO||fO.curOp){return fN.apply(this,arguments)}cw(fO);try{return fN.apply(this,arguments)}finally{aj(fO)}}}function bl(fP,fN,fO){this.line=fN;this.rest=i(fN);this.size=this.rest?bC(fh(this.rest))-fO+1:1;this.node=this.text=null;this.hidden=e7(fP,fN)}function ey(fN,fT,fS){var fR=[],fP;for(var fQ=fT;fQ<fS;fQ=fP){var fO=new bl(fN.doc,eP(fN.doc,fQ),fQ);fP=fQ+fO.size;fR.push(fO)}return fR}function af(fU,fS,fT,fV){if(fS==null){fS=fU.doc.first}if(fT==null){fT=fU.doc.first+fU.doc.size}if(!fV){fV=0}var fP=fU.display;if(fV&&fT<fP.viewTo&&(fP.updateLineNumbers==null||fP.updateLineNumbers>fS)){fP.updateLineNumbers=fS}fU.curOp.viewChanged=true;if(fS>=fP.viewTo){if(aX&&aM(fU.doc,fS)<fP.viewTo){d9(fU)}}else{if(fT<=fP.viewFrom){if(aX&&dG(fU.doc,fT+fV)>fP.viewFrom){d9(fU)}else{fP.viewFrom+=fV;fP.viewTo+=fV}}else{if(fS<=fP.viewFrom&&fT>=fP.viewTo){d9(fU)}else{if(fS<=fP.viewFrom){var fR=cX(fU,fT,fT+fV,1);if(fR){fP.view=fP.view.slice(fR.index);fP.viewFrom=fR.lineN;fP.viewTo+=fV}else{d9(fU)}}else{if(fT>=fP.viewTo){var fR=cX(fU,fS,fS,-1);if(fR){fP.view=fP.view.slice(0,fR.index);fP.viewTo=fR.lineN}else{d9(fU)}}else{var fQ=cX(fU,fS,fS,-1);var fO=cX(fU,fT,fT+fV,1);if(fQ&&fO){fP.view=fP.view.slice(0,fQ.index).concat(ey(fU,fQ.lineN,fO.lineN)).concat(fP.view.slice(fO.index));fP.viewTo+=fV}else{d9(fU)}}}}}}var fN=fP.externalMeasured;if(fN){if(fT<fN.lineN){fN.lineN+=fV}else{if(fS<fN.lineN+fN.size){fP.externalMeasured=null}}}}function R(fO,fP,fS){fO.curOp.viewChanged=true;var fT=fO.display,fR=fO.display.externalMeasured;if(fR&&fP>=fR.lineN&&fP<fR.lineN+fR.size){fT.externalMeasured=null}if(fP<fT.viewFrom||fP>=fT.viewTo){return}var fQ=fT.view[c7(fO,fP)];if(fQ.node==null){return}var fN=fQ.changes||(fQ.changes=[]);if(c1(fN,fS)==-1){fN.push(fS)}}function d9(fN){fN.display.viewFrom=fN.display.viewTo=fN.doc.first;fN.display.view=[];fN.display.viewOffset=0}function c7(fN,fQ){if(fQ>=fN.display.viewTo){return null}fQ-=fN.display.viewFrom;if(fQ<0){return null}var fO=fN.display.view;for(var fP=0;fP<fO.length;fP++){fQ-=fO[fP].size;if(fQ<0){return fP}}}function cX(fV,fP,fR,fO){var fS=c7(fV,fP),fU,fT=fV.display.view;if(!aX){return{index:fS,lineN:fR}}for(var fQ=0,fN=fV.display.viewFrom;fQ<fS;fQ++){fN+=fT[fQ].size}if(fN!=fP){if(fO>0){if(fS==fT.length-1){return null}fU=(fN+fT[fS].size)-fP;fS++}else{fU=fN-fP}fP+=fU;fR+=fU}while(aM(fV.doc,fR)!=fR){if(fS==(fO<0?0:fT.length-1)){return null}fR+=fO*fT[fS-(fO<0?1:0)].size;fS+=fO}return{index:fS,lineN:fR}}function cD(fN,fR,fQ){var fP=fN.display,fO=fP.view;if(fO.length==0||fR>=fP.viewTo||fQ<=fP.viewFrom){fP.view=ey(fN,fR,fQ);fP.viewFrom=fR}else{if(fP.viewFrom>fR){fP.view=ey(fN,fR,fP.viewFrom).concat(fP.view)}else{if(fP.viewFrom<fR){fP.view=fP.view.slice(c7(fN,fR))}}fP.viewFrom=fR;if(fP.viewTo<fQ){fP.view=fP.view.concat(ey(fN,fP.viewTo,fQ))}else{if(fP.viewTo>fQ){fP.view=fP.view.slice(0,c7(fN,fQ))}}}fP.viewTo=fQ}function cU(fN){var fO=fN.display.view,fR=0;for(var fQ=0;fQ<fO.length;fQ++){var fP=fO[fQ];if(!fP.hidden&&(!fP.node||fP.changes)){++fR}}return fR}function bc(fN){if(fN.display.pollingFast){return}fN.display.poll.set(fN.options.pollInterval,function(){b7(fN);if(fN.state.focused){bc(fN)}})}function C(fN){var fO=false;fN.display.pollingFast=true;function fP(){var fQ=b7(fN);if(!fQ&&!fO){fO=true;fN.display.poll.set(60,fP)}else{fN.display.pollingFast=false;bc(fN)}}fN.display.poll.set(20,fP)}function b7(fR){var fS=fR.display.input,fV=fR.display.prevInput,f6=fR.doc;if(!fR.state.focused||(bi(fS)&&!fV)||ah(fR)||fR.options.disableInput){return false}if(fR.state.pasteIncoming&&fR.state.fakedLastChar){fS.value=fS.value.substring(0,fS.value.length-1);fR.state.fakedLastChar=false}var fU=fS.value;if(fU==fV&&!fR.somethingSelected()){return false}if(dn&&!bY&&fR.display.inputHasSelection===fU){eZ(fR);return false}var f2=!fR.curOp;if(f2){cw(fR)}fR.display.shift=false;if(fU.charCodeAt(0)==8203&&f6.sel==fR.display.selForContextMenu&&!fV){fV="\u200b"}var f1=0,fY=Math.min(fV.length,fU.length);while(f1<fY&&fV.charCodeAt(f1)==fU.charCodeAt(f1)){++f1}var fO=fU.slice(f1),fW=aQ(fO);var f5=fR.state.pasteIncoming&&fW.length>1&&f6.sel.ranges.length==fW.length;for(var f3=f6.sel.ranges.length-1;f3>=0;f3--){var fX=f6.sel.ranges[f3];var fZ=fX.from(),fN=fX.to();if(f1<fV.length){fZ=W(fZ.line,fZ.ch-(fV.length-f1))}else{if(fR.state.overwrite&&fX.empty()&&!fR.state.pasteIncoming){fN=W(fN.line,Math.min(eP(f6,fN.line).text.length,fN.ch+fh(fW).length))}}var fQ=fR.curOp.updateInput;var f4={from:fZ,to:fN,text:f5?[fW[f3]]:fW,origin:fR.state.pasteIncoming?"paste":fR.state.cutIncoming?"cut":"+input"};a5(fR.doc,f4);ac(fR,"inputRead",fR,f4);if(fO&&!fR.state.pasteIncoming&&fR.options.electricChars&&fR.options.smartIndent&&fX.head.ch<100&&(!f3||f6.sel.ranges[f3-1].head.line!=fX.head.line)){var fT=fR.getModeAt(fX.head);if(fT.electricChars){for(var f0=0;f0<fT.electricChars.length;f0++){if(fO.indexOf(fT.electricChars.charAt(f0))>-1){ab(fR,fX.head.line,"smart");break}}}else{if(fT.electricInput){var fP=cG(f4);if(fT.electricInput.test(eP(f6,fP.line).text.slice(0,fP.ch))){ab(fR,fX.head.line,"smart")}}}}}fg(fR);fR.curOp.updateInput=fQ;fR.curOp.typing=true;if(fU.length>1000||fU.indexOf("\n")>-1){fS.value=fR.display.prevInput=""}else{fR.display.prevInput=fU}if(f2){aj(fR)}fR.state.pasteIncoming=fR.state.cutIncoming=false;return true}function eZ(fN,fR){var fO,fQ,fT=fN.doc;if(fN.somethingSelected()){fN.display.prevInput="";var fP=fT.sel.primary();fO=cT&&(fP.to().line-fP.from().line>100||(fQ=fN.getSelection()).length>1000);var fS=fO?"-":fQ||fN.getSelection();fN.display.input.value=fS;if(fN.state.focused){dq(fN.display.input)}if(dn&&!bY){fN.display.inputHasSelection=fS}}else{if(!fR){fN.display.prevInput=fN.display.input.value="";if(dn&&!bY){fN.display.inputHasSelection=null}}}fN.display.inaccurateSelection=fO}function ed(fN){if(fN.options.readOnly!="nocursor"&&(!dS||ds()!=fN.display.input)){fN.display.input.focus()}}function s(fN){if(!fN.state.focused){ed(fN);cq(fN)}}function ah(fN){return fN.options.readOnly||fN.doc.cantEdit}function fp(fN){var fP=fN.display;bM(fP.scroller,"mousedown",cL(fN,d5));if(eo){bM(fP.scroller,"dblclick",cL(fN,function(fT){if(aI(fN,fT)){return}var fU=cd(fN,fT);if(!fU||m(fN,fT)||a0(fN.display,fT)){return}cu(fT);var fS=ar(fN.doc,fU);ft(fN.doc,fS.anchor,fS.head)}))}else{bM(fP.scroller,"dblclick",function(fS){aI(fN,fS)||cu(fS)})}bM(fP.lineSpace,"selectstart",function(fS){if(!a0(fP,fS)){cu(fS)}});if(!fE){bM(fP.scroller,"contextmenu",function(fS){av(fN,fS)})}bM(fP.scroller,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scroller.scrollTop);bt(fN,fP.scroller.scrollLeft,true);az(fN,"scroll",fN)}});bM(fP.scrollbarV,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scrollbarV.scrollTop)}});bM(fP.scrollbarH,"scroll",function(){if(fP.scroller.clientHeight){bt(fN,fP.scrollbarH.scrollLeft)}});bM(fP.scroller,"mousewheel",function(fS){c(fN,fS)});bM(fP.scroller,"DOMMouseScroll",function(fS){c(fN,fS)});function fR(){if(fN.state.focused){setTimeout(cl(ed,fN),0)}}bM(fP.scrollbarH,"mousedown",fR);bM(fP.scrollbarV,"mousedown",fR);bM(fP.wrapper,"scroll",function(){fP.wrapper.scrollTop=fP.wrapper.scrollLeft=0});bM(fP.input,"keyup",cL(fN,a7));bM(fP.input,"input",function(){if(dn&&!bY&&fN.display.inputHasSelection){fN.display.inputHasSelection=null}C(fN)});bM(fP.input,"keydown",cL(fN,q));bM(fP.input,"keypress",cL(fN,cn));bM(fP.input,"focus",cl(cq,fN));bM(fP.input,"blur",cl(aL,fN));function fO(fS){if(!aI(fN,fS)){d3(fS)}}if(fN.options.dragDrop){bM(fP.scroller,"dragstart",function(fS){Q(fN,fS)});bM(fP.scroller,"dragenter",fO);bM(fP.scroller,"dragover",fO);bM(fP.scroller,"drop",cL(fN,a9))}bM(fP.scroller,"paste",function(fS){if(a0(fP,fS)){return}fN.state.pasteIncoming=true;ed(fN);C(fN)});bM(fP.input,"paste",function(){if(cJ&&!fN.state.fakedLastChar&&!(new Date-fN.state.lastMiddleDown<200)){var fT=fP.input.selectionStart,fS=fP.input.selectionEnd;fP.input.value+="$";fP.input.selectionStart=fT;fP.input.selectionEnd=fS;fN.state.fakedLastChar=true}fN.state.pasteIncoming=true;C(fN)});function fQ(fW){if(fN.somethingSelected()){if(fP.inaccurateSelection){fP.prevInput="";fP.inaccurateSelection=false;fP.input.value=fN.getSelection();dq(fP.input)}}else{var fX="",fT=[];for(var fU=0;fU<fN.doc.sel.ranges.length;fU++){var fS=fN.doc.sel.ranges[fU].head.line;var fV={anchor:W(fS,0),head:W(fS+1,0)};fT.push(fV);fX+=fN.getRange(fV.anchor,fV.head)}if(fW.type=="cut"){fN.setSelections(fT,null,Y)}else{fP.prevInput="";fP.input.value=fX;dq(fP.input)}}if(fW.type=="cut"){fN.state.cutIncoming=true}}bM(fP.input,"cut",fQ);bM(fP.input,"copy",fQ);if(a1){bM(fP.sizer,"mouseup",function(){if(ds()==fP.input){fP.input.blur()}ed(fN)})}}function aK(fN){var fO=fN.display;fO.cachedCharWidth=fO.cachedTextHeight=fO.cachedPaddingH=null;fN.setSize()}function a0(fO,fN){for(var fP=L(fN);fP!=fO.wrapper;fP=fP.parentNode){if(!fP||fP.ignoreEvents||fP.parentNode==fO.sizer&&fP!=fO.mover){return true}}}function cd(fX,fR,fO,fP){var fT=fX.display;if(!fO){var fS=L(fR);if(fS==fT.scrollbarH||fS==fT.scrollbarV||fS==fT.scrollbarFiller||fS==fT.gutterFiller){return null}}var fW,fU,fN=fT.lineSpace.getBoundingClientRect();try{fW=fR.clientX-fN.left;fU=fR.clientY-fN.top}catch(fR){return null}var fV=fo(fX,fW,fU),fY;if(fP&&fV.xRel==1&&(fY=eP(fX.doc,fV.line).text).length==fV.ch){var fQ=bI(fY,fY.length,fX.options.tabSize)-fY.length;fV=W(fV.line,Math.max(0,Math.round((fW-eG(fX.display).left)/di(fX.display))-fQ))}return fV}function d5(fP){if(aI(this,fP)){return}var fN=this,fO=fN.display;fO.shift=fP.shiftKey;if(a0(fO,fP)){if(!cJ){fO.scroller.draggable=false;setTimeout(function(){fO.scroller.draggable=true},100)}return}if(m(fN,fP)){return}var fQ=cd(fN,fP);window.focus();switch(fn(fP)){case 1:if(fQ){au(fN,fP,fQ)}else{if(L(fP)==fO.scroller){cu(fP)}}break;case 2:if(cJ){fN.state.lastMiddleDown=+new Date}if(fQ){ft(fN.doc,fQ)}setTimeout(cl(ed,fN),20);cu(fP);break;case 3:if(fE){av(fN,fP)}break}}var c4,cW;function au(fN,fS,fT){setTimeout(cl(s,fN),0);var fO=+new Date,fP;if(cW&&cW.time>fO-400&&b5(cW.pos,fT)==0){fP="triple"}else{if(c4&&c4.time>fO-400&&b5(c4.pos,fT)==0){fP="double";cW={time:fO,pos:fT}}else{fP="single";c4={time:fO,pos:fT}}}var fQ=fN.doc.sel,fR=bU?fS.metaKey:fS.ctrlKey;if(fN.options.dragDrop&&ep&&!fR&&!ah(fN)&&fP=="single"&&fQ.contains(fT)>-1&&fQ.somethingSelected()){aT(fN,fS,fT)}else{n(fN,fS,fT,fP,fR)}}function aT(fO,fQ,fR){var fP=fO.display;var fN=cL(fO,function(fS){if(cJ){fP.scroller.draggable=false}fO.state.draggingText=false;dP(document,"mouseup",fN);dP(fP.scroller,"drop",fN);if(Math.abs(fQ.clientX-fS.clientX)+Math.abs(fQ.clientY-fS.clientY)<10){cu(fS);ft(fO.doc,fR);ed(fO);if(eo&&!bY){setTimeout(function(){document.body.focus();ed(fO)},20)}}});if(cJ){fP.scroller.draggable=true}fO.state.draggingText=fN;if(fP.scroller.dragDrop){fP.scroller.dragDrop()}bM(document,"mouseup",fN);bM(fP.scroller,"drop",fN)}function n(fQ,f4,fP,fN,fS){var f1=fQ.display,f6=fQ.doc;cu(f4);var fO,f5,fR=f6.sel;if(fS&&!f4.shiftKey){f5=f6.sel.contains(fP);if(f5>-1){fO=f6.sel.ranges[f5]}else{fO=new dB(fP,fP)}}else{fO=f6.sel.primary()}if(f4.altKey){fN="rect";if(!fS){fO=new dB(fP,fP)}fP=cd(fQ,f4,true,true);f5=-1}else{if(fN=="double"){var f2=ar(f6,fP);if(fQ.display.shift||f6.extend){fO=e6(f6,fO,f2.anchor,f2.head)}else{fO=f2}}else{if(fN=="triple"){var fV=new dB(W(fP.line,0),fj(f6,W(fP.line+1,0)));if(fQ.display.shift||f6.extend){fO=e6(f6,fO,fV.anchor,fV.head)}else{fO=fV}}else{fO=e6(f6,fO,fP)}}}if(!fS){f5=0;bJ(f6,new fx([fO],0),M);fR=f6.sel}else{if(f5>-1){f(f6,f5,fO,M)}else{f5=f6.sel.ranges.length;bJ(f6,cm(f6.sel.ranges.concat([fO]),f5),{scroll:false,origin:"*mouse"})}}var f0=fP;function fZ(gh){if(b5(f0,gh)==0){return}f0=gh;if(fN=="rect"){var f8=[],ge=fQ.options.tabSize;var f7=bI(eP(f6,fP.line).text,fP.ch,ge);var gk=bI(eP(f6,gh.line).text,gh.ch,ge);var f9=Math.min(f7,gk),gi=Math.max(f7,gk);for(var gl=Math.min(fP.line,gh.line),gb=Math.min(fQ.lastLine(),Math.max(fP.line,gh.line));gl<=gb;gl++){var gj=eP(f6,gl).text,ga=d2(gj,f9,ge);if(f9==gi){f8.push(new dB(W(gl,ga),W(gl,ga)))}else{if(gj.length>ga){f8.push(new dB(W(gl,ga),W(gl,d2(gj,gi,ge))))}}}if(!f8.length){f8.push(new dB(fP,fP))}bJ(f6,cm(fR.ranges.slice(0,f5).concat(f8),f5),M)}else{var gf=fO;var gc=gf.anchor,gg=gh;if(fN!="single"){if(fN=="double"){var gd=ar(f6,gh)}else{var gd=new dB(W(gh.line,0),fj(f6,W(gh.line+1,0)))}if(b5(gd.anchor,gc)>0){gg=gd.head;gc=am(gf.from(),gd.anchor)}else{gg=gd.anchor;gc=bn(gf.to(),gd.head)}}var f8=fR.ranges.slice(0);f8[f5]=new dB(fj(f6,gc),gg);bJ(f6,cm(f8,f5),M)}}var fX=f1.wrapper.getBoundingClientRect();var fT=0;function f3(f9){var f7=++fT;var gb=cd(fQ,f9,true,fN=="rect");if(!gb){return}if(b5(gb,f0)!=0){s(fQ);fZ(gb);var ga=bT(f1,f6);if(gb.line>=ga.to||gb.line<ga.from){setTimeout(cL(fQ,function(){if(fT==f7){f3(f9)}}),150)}}else{var f8=f9.clientY<fX.top?-20:f9.clientY>fX.bottom?20:0;if(f8){setTimeout(cL(fQ,function(){if(fT!=f7){return}f1.scroller.scrollTop+=f8;f3(f9)}),50)}}}function fW(f7){fT=Infinity;cu(f7);ed(fQ);dP(document,"mousemove",fY);dP(document,"mouseup",fU);f6.history.lastSelOrigin=null}var fY=cL(fQ,function(f7){if((dn&&!bX)?!f7.buttons:!fn(f7)){fW(f7)}else{f3(f7)}});var fU=cL(fQ,fW);bM(document,"mousemove",fY);bM(document,"mouseup",fU)}function fL(fY,fU,fW,fX,fQ){try{var fO=fU.clientX,fN=fU.clientY}catch(fU){return false}if(fO>=Math.floor(fY.display.gutters.getBoundingClientRect().right)){return false}if(fX){cu(fU)}var fV=fY.display;var fT=fV.lineDiv.getBoundingClientRect();if(fN>fT.bottom||!eS(fY,fW)){return bA(fU)}fN-=fT.top-fV.viewOffset;for(var fR=0;fR<fY.options.gutters.length;++fR){var fS=fV.gutters.childNodes[fR];if(fS&&fS.getBoundingClientRect().right>=fO){var fZ=bv(fY.doc,fN);var fP=fY.options.gutters[fR];fQ(fY,fW,fY,fZ,fP,fU);return bA(fU)}}}function m(fN,fO){return fL(fN,fO,"gutterClick",true,ac)}var ae=0;function a9(fT){var fV=this;if(aI(fV,fT)||a0(fV.display,fT)){return}cu(fT);if(dn){ae=+new Date}var fU=cd(fV,fT,true),fN=fT.dataTransfer.files;if(!fU||ah(fV)){return}if(fN&&fN.length&&window.FileReader&&window.File){var fP=fN.length,fW=Array(fP),fO=0;var fR=function(fZ,fY){var fX=new FileReader;fX.onload=cL(fV,function(){fW[fY]=fX.result;if(++fO==fP){fU=fj(fV.doc,fU);var f0={from:fU,to:fU,text:aQ(fW.join("\n")),origin:"paste"};a5(fV.doc,f0);eH(fV.doc,eu(fU,cG(f0)))}});fX.readAsText(fZ)};for(var fS=0;fS<fP;++fS){fR(fN[fS],fS)}}else{if(fV.state.draggingText&&fV.doc.sel.contains(fU)>-1){fV.state.draggingText(fT);setTimeout(cl(ed,fV),20);return}try{var fW=fT.dataTransfer.getData("Text");if(fW){var fQ=fV.state.draggingText&&fV.listSelections();d1(fV.doc,eu(fU,fU));if(fQ){for(var fS=0;fS<fQ.length;++fS){aR(fV.doc,"",fQ[fS].anchor,fQ[fS].head,"drag")}}fV.replaceSelection(fW,"around","paste");ed(fV)}}catch(fT){}}}function Q(fN,fP){if(dn&&(!fN.state.draggingText||+new Date-ae<100)){d3(fP);return}if(aI(fN,fP)||a0(fN.display,fP)){return}fP.dataTransfer.setData("Text",fN.getSelection());if(fP.dataTransfer.setDragImage&&!ay){var fO=fw("img",null,null,"position: fixed; left: 0; top: 0;");fO.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(dF){fO.width=fO.height=1;fN.display.wrapper.appendChild(fO);fO._top=fO.offsetTop}fP.dataTransfer.setDragImage(fO,0,0);if(dF){fO.parentNode.removeChild(fO)}}}function N(fN,fO){if(Math.abs(fN.doc.scrollTop-fO)<2){return}fN.doc.scrollTop=fO;if(!ce){dp(fN,{top:fO})}if(fN.display.scroller.scrollTop!=fO){fN.display.scroller.scrollTop=fO}if(fN.display.scrollbarV.scrollTop!=fO){fN.display.scrollbarV.scrollTop=fO}if(ce){dp(fN)}dR(fN,100)}function bt(fN,fP,fO){if(fO?fP==fN.doc.scrollLeft:Math.abs(fN.doc.scrollLeft-fP)<2){return}fP=Math.min(fP,fN.display.scroller.scrollWidth-fN.display.scroller.clientWidth);fN.doc.scrollLeft=fP;ei(fN);if(fN.display.scroller.scrollLeft!=fP){fN.display.scroller.scrollLeft=fP}if(fN.display.scrollbarH.scrollLeft!=fP){fN.display.scrollbarH.scrollLeft=fP}}var eW=0,b6=null;if(dn){b6=-0.53}else{if(ce){b6=15}else{if(cV){b6=-0.7}else{if(ay){b6=-1/3}}}}function c(fV,fP){var fY=fP.wheelDeltaX,fX=fP.wheelDeltaY;if(fY==null&&fP.detail&&fP.axis==fP.HORIZONTAL_AXIS){fY=fP.detail}if(fX==null&&fP.detail&&fP.axis==fP.VERTICAL_AXIS){fX=fP.detail}else{if(fX==null){fX=fP.wheelDelta}}var fR=fV.display,fU=fR.scroller;if(!(fY&&fU.scrollWidth>fU.clientWidth||fX&&fU.scrollHeight>fU.clientHeight)){return}if(fX&&bU&&cJ){outer:for(var fW=fP.target,fT=fR.view;fW!=fU;fW=fW.parentNode){for(var fO=0;fO<fT.length;fO++){if(fT[fO].node==fW){fV.display.currentWheelTarget=fW;break outer}}}}if(fY&&!ce&&!dF&&b6!=null){if(fX){N(fV,Math.max(0,Math.min(fU.scrollTop+fX*b6,fU.scrollHeight-fU.clientHeight)))}bt(fV,Math.max(0,Math.min(fU.scrollLeft+fY*b6,fU.scrollWidth-fU.clientWidth)));cu(fP);fR.wheelStartX=null;return}if(fX&&b6!=null){var fN=fX*b6;var fS=fV.doc.scrollTop,fQ=fS+fR.wrapper.clientHeight;if(fN<0){fS=Math.max(0,fS+fN-50)}else{fQ=Math.min(fV.doc.height,fQ+fN+50)}dp(fV,{top:fS,bottom:fQ})}if(eW<20){if(fR.wheelStartX==null){fR.wheelStartX=fU.scrollLeft;fR.wheelStartY=fU.scrollTop;fR.wheelDX=fY;fR.wheelDY=fX;setTimeout(function(){if(fR.wheelStartX==null){return}var fZ=fU.scrollLeft-fR.wheelStartX;var f1=fU.scrollTop-fR.wheelStartY;var f0=(f1&&fR.wheelDY&&f1/fR.wheelDY)||(fZ&&fR.wheelDX&&fZ/fR.wheelDX);fR.wheelStartX=fR.wheelStartY=null;if(!f0){return}b6=(b6*eW+f0)/(eW+1);++eW},200)}else{fR.wheelDX+=fY;fR.wheelDY+=fX}}}function fq(fO,fR,fN){if(typeof fR=="string"){fR=eh[fR];if(!fR){return false}}if(fO.display.pollingFast&&b7(fO)){fO.display.pollingFast=false}var fQ=fO.display.shift,fP=false;try{if(ah(fO)){fO.state.suppressEdits=true}if(fN){fO.display.shift=false}fP=fR(fO)!=bZ}finally{fO.display.shift=fQ;fO.state.suppressEdits=false}return fP}function c9(fN){var fO=fN.state.keyMaps.slice(0);if(fN.options.extraKeys){fO.push(fN.options.extraKeys)}fO.push(fN.options.keyMap);return fO}var an;function eT(fN,fT){var fO=fu(fN.options.keyMap),fR=fO.auto;clearTimeout(an);if(fR&&!eg(fT)){an=setTimeout(function(){if(fu(fN.options.keyMap)==fO){fN.options.keyMap=(fR.call?fR.call(null,fN):fR);fK(fN)}},50)}var fQ=e2(fT,true),fS=false;if(!fQ){return false}var fP=c9(fN);if(fT.shiftKey){fS=j("Shift-"+fQ,fP,function(fU){return fq(fN,fU,true)})||j(fQ,fP,function(fU){if(typeof fU=="string"?/^go[A-Z]/.test(fU):fU.motion){return fq(fN,fU)}})}else{fS=j(fQ,fP,function(fU){return fq(fN,fU)})}if(fS){cu(fT);p(fN);ac(fN,"keyHandled",fN,fQ,fT)}return fS}function dV(fN,fQ,fO){var fP=j("'"+fO+"'",c9(fN),function(fR){return fq(fN,fR,true)});if(fP){cu(fQ);p(fN);ac(fN,"keyHandled",fN,"'"+fO+"'",fQ)}return fP}var c3=null;function q(fQ){var fN=this;s(fN);if(aI(fN,fQ)){return}if(eo&&fQ.keyCode==27){fQ.returnValue=false}var fO=fQ.keyCode;fN.display.shift=fO==16||fQ.shiftKey;var fP=eT(fN,fQ);if(dF){c3=fP?fO:null;if(!fP&&fO==88&&!cT&&(bU?fQ.metaKey:fQ.ctrlKey)){fN.replaceSelection("",null,"cut")}}if(fO==18&&!/\bCodeMirror-crosshair\b/.test(fN.display.lineDiv.className)){aq(fN)}}function aq(fO){var fP=fO.display.lineDiv;fb(fP,"CodeMirror-crosshair");function fN(fQ){if(fQ.keyCode==18||!fQ.altKey){g(fP,"CodeMirror-crosshair");dP(document,"keyup",fN);dP(document,"mouseover",fN)}}bM(document,"keyup",fN);bM(document,"mouseover",fN)}function a7(fN){if(aI(this,fN)){return}if(fN.keyCode==16){this.doc.sel.shift=false}}function cn(fR){var fN=this;if(aI(fN,fR)){return}var fQ=fR.keyCode,fO=fR.charCode;if(dF&&fQ==c3){c3=null;cu(fR);return}if(((dF&&(!fR.which||fR.which<10))||a1)&&eT(fN,fR)){return}var fP=String.fromCharCode(fO==null?fQ:fO);if(dV(fN,fR,fP)){return}if(dn&&!bY){fN.display.inputHasSelection=null}C(fN)}function cq(fN){if(fN.options.readOnly=="nocursor"){return}if(!fN.state.focused){az(fN,"focus",fN);fN.state.focused=true;fb(fN.display.wrapper,"CodeMirror-focused");if(!fN.curOp&&fN.display.selForContextMenu!=fN.doc.sel){eZ(fN);if(cJ){setTimeout(cl(eZ,fN,true),0)}}}bc(fN);p(fN)}function aL(fN){if(fN.state.focused){az(fN,"blur",fN);fN.state.focused=false;g(fN.display.wrapper,"CodeMirror-focused")}clearInterval(fN.display.blinker);setTimeout(function(){if(!fN.state.focused){fN.display.shift=false}},150)}function av(fW,fR){if(aI(fW,fR,"contextmenu")){return}var fT=fW.display;if(a0(fT,fR)||c0(fW,fR)){return}var fV=cd(fW,fR),fN=fT.scroller.scrollTop;if(!fV||dF){return}var fP=fW.options.resetSelectionOnContextMenu;if(fP&&fW.doc.sel.contains(fV)==-1){cL(fW,bJ)(fW.doc,eu(fV),Y)}var fS=fT.input.style.cssText;fT.inputDiv.style.position="absolute";fT.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(fR.clientY-5)+"px; left: "+(fR.clientX-5)+"px; z-index: 1000; background: "+(dn?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";ed(fW);eZ(fW);if(!fW.somethingSelected()){fT.input.value=fT.prevInput=" "}fT.selForContextMenu=fW.doc.sel;clearTimeout(fT.detectingSelectAll);function fQ(){if(fT.input.selectionStart!=null){var fX=fW.somethingSelected();var fY=fT.input.value="\u200b"+(fX?fT.input.value:"");fT.prevInput=fX?"":"\u200b";fT.input.selectionStart=1;fT.input.selectionEnd=fY.length}}function fU(){fT.inputDiv.style.position="relative";fT.input.style.cssText=fS;if(bY){fT.scrollbarV.scrollTop=fT.scroller.scrollTop=fN}bc(fW);if(fT.input.selectionStart!=null){if(!dn||bY){fQ()}var fX=0,fY=function(){if(fT.selForContextMenu==fW.doc.sel&&fT.input.selectionStart==0){cL(fW,eh.selectAll)(fW)}else{if(fX++<10){fT.detectingSelectAll=setTimeout(fY,500)}else{eZ(fW)}}};fT.detectingSelectAll=setTimeout(fY,200)}}if(dn&&!bY){fQ()}if(fE){d3(fR);var fO=function(){dP(window,"mouseup",fO);setTimeout(fU,20)};bM(window,"mouseup",fO)}else{setTimeout(fU,50)}}function c0(fN,fO){if(!eS(fN,"gutterContextMenu")){return false}return fL(fN,fO,"gutterContextMenu",false,az)}var cG=I.changeEnd=function(fN){if(!fN.text){return fN.to}return W(fN.from.line+fN.text.length-1,fh(fN.text).length+(fN.text.length==1?fN.from.ch:0))};function bO(fQ,fP){if(b5(fQ,fP.from)<0){return fQ}if(b5(fQ,fP.to)<=0){return cG(fP)}var fN=fQ.line+fP.text.length-(fP.to.line-fP.from.line)-1,fO=fQ.ch;if(fQ.line==fP.to.line){fO+=cG(fP).ch-fP.to.ch}return W(fN,fO)}function eU(fQ,fR){var fO=[];for(var fP=0;fP<fQ.sel.ranges.length;fP++){var fN=fQ.sel.ranges[fP];fO.push(new dB(bO(fN.anchor,fR),bO(fN.head,fR)))}return cm(fO,fQ.sel.primIndex)}function bk(fP,fO,fN){if(fP.line==fO.line){return W(fN.line,fP.ch-fO.ch+fN.ch)}else{return W(fN.line+(fP.line-fO.line),fP.ch)}}function ad(fX,fU,fO){var fP=[];var fN=W(fX.first,0),fY=fN;for(var fR=0;fR<fU.length;fR++){var fT=fU[fR];var fW=bk(fT.from,fN,fY);var fV=bk(cG(fT),fN,fY);fN=fT.to;fY=fV;if(fO=="around"){var fS=fX.sel.ranges[fR],fQ=b5(fS.head,fS.anchor)<0;fP[fR]=new dB(fQ?fV:fW,fQ?fW:fV)}else{fP[fR]=new dB(fW,fW)}}return new fx(fP,fX.sel.primIndex)}function dv(fO,fQ,fP){var fN={canceled:false,from:fQ.from,to:fQ.to,text:fQ.text,origin:fQ.origin,cancel:function(){this.canceled=true}};if(fP){fN.update=function(fU,fT,fS,fR){if(fU){this.from=fj(fO,fU)}if(fT){this.to=fj(fO,fT)}if(fS){this.text=fS}if(fR!==undefined){this.origin=fR}}}az(fO,"beforeChange",fO,fN);if(fO.cm){az(fO.cm,"beforeChange",fO.cm,fN)}if(fN.canceled){return null}return{from:fN.from,to:fN.to,text:fN.text,origin:fN.origin}}function a5(fQ,fR,fP){if(fQ.cm){if(!fQ.cm.curOp){return cL(fQ.cm,a5)(fQ,fR,fP)}if(fQ.cm.state.suppressEdits){return}}if(eS(fQ,"beforeChange")||fQ.cm&&eS(fQ.cm,"beforeChange")){fR=dv(fQ,fR,true);if(!fR){return}}var fO=fH&&!fP&&cv(fQ,fR.from,fR.to);if(fO){for(var fN=fO.length-1;fN>=0;--fN){K(fQ,{from:fO[fN].from,to:fO[fN].to,text:fN?[""]:fR.text})}}else{K(fQ,fR)}}function K(fP,fQ){if(fQ.text.length==1&&fQ.text[0]==""&&b5(fQ.from,fQ.to)==0){return}var fO=eU(fP,fQ);fm(fP,fQ,fO,fP.cm?fP.cm.curOp.id:NaN);dQ(fP,fQ,fO,dW(fP,fQ));var fN=[];dK(fP,function(fS,fR){if(!fR&&c1(fN,fS.history)==-1){dj(fS.history,fQ);fN.push(fS.history)}dQ(fS,fQ,null,dW(fS,fQ))})}function bV(fY,fW,f0){if(fY.cm&&fY.cm.state.suppressEdits){return}var fV=fY.history,fP,fR=fY.sel;var fN=fW=="undo"?fV.done:fV.undone,fZ=fW=="undo"?fV.undone:fV.done;for(var fS=0;fS<fN.length;fS++){fP=fN[fS];if(f0?fP.ranges&&!fP.equals(fY.sel):!fP.ranges){break}}if(fS==fN.length){return}fV.lastOrigin=fV.lastSelOrigin=null;for(;;){fP=fN.pop();if(fP.ranges){cA(fP,fZ);if(f0&&!fP.equals(fY.sel)){bJ(fY,fP,{clearRedo:false});return}fR=fP}else{break}}var fU=[];cA(fR,fZ);fZ.push({changes:fU,generation:fV.generation});fV.generation=fP.generation||++fV.maxGeneration;var fQ=eS(fY,"beforeChange")||fY.cm&&eS(fY.cm,"beforeChange");for(var fS=fP.changes.length-1;fS>=0;--fS){var fX=fP.changes[fS];fX.origin=fW;if(fQ&&!dv(fY,fX,false)){fN.length=0;return}fU.push(da(fY,fX));var fO=fS?eU(fY,fX,null):fh(fN);dQ(fY,fX,fO,dM(fY,fX));if(!fS&&fY.cm){fY.cm.scrollIntoView(fX)}var fT=[];dK(fY,function(f2,f1){if(!f1&&c1(fT,f2.history)==-1){dj(f2.history,fX);fT.push(f2.history)}dQ(f2,fX,null,dM(f2,fX))})}}function eX(fO,fQ){if(fQ==0){return}fO.first+=fQ;fO.sel=new fx(bH(fO.sel.ranges,function(fR){return new dB(W(fR.anchor.line+fQ,fR.anchor.ch),W(fR.head.line+fQ,fR.head.ch))}),fO.sel.primIndex);if(fO.cm){af(fO.cm,fO.first,fO.first-fQ,fQ);for(var fP=fO.cm.display,fN=fP.viewFrom;fN<fP.viewTo;fN++){R(fO.cm,fN,"gutter")}}}function dQ(fR,fS,fQ,fO){if(fR.cm&&!fR.cm.curOp){return cL(fR.cm,dQ)(fR,fS,fQ,fO)}if(fS.to.line<fR.first){eX(fR,fS.text.length-1-(fS.to.line-fS.from.line));return}if(fS.from.line>fR.lastLine()){return}if(fS.from.line<fR.first){var fN=fS.text.length-1-(fR.first-fS.from.line);eX(fR,fN);fS={from:W(fR.first,0),to:W(fS.to.line+fN,fS.to.ch),text:[fh(fS.text)],origin:fS.origin}}var fP=fR.lastLine();if(fS.to.line>fP){fS={from:fS.from,to:W(fP,eP(fR,fP).text.length),text:[fS.text[0]],origin:fS.origin}}fS.removed=fy(fR,fS.from,fS.to);if(!fQ){fQ=eU(fR,fS,null)}if(fR.cm){aD(fR.cm,fS,fO)}else{e9(fR,fS,fO)}d1(fR,fQ,Y)}function aD(fY,fU,fS){var fX=fY.doc,fT=fY.display,fV=fU.from,fW=fU.to;var fN=false,fR=fV.line;if(!fY.options.lineWrapping){fR=bC(z(eP(fX,fV.line)));fX.iter(fR,fW.line+1,function(f0){if(f0==fT.maxLine){fN=true;return true}})}if(fX.sel.contains(fU.from,fU.to)>-1){V(fY)}e9(fX,fU,fS,a3(fY));if(!fY.options.lineWrapping){fX.iter(fR,fV.line+fU.text.length,function(f1){var f0=dY(f1);if(f0>fT.maxLineLength){fT.maxLine=f1;fT.maxLineLength=f0;fT.maxLineChanged=true;fN=false}});if(fN){fY.curOp.updateMaxLine=true}}fX.frontier=Math.min(fX.frontier,fV.line);dR(fY,400);var fZ=fU.text.length-(fW.line-fV.line)-1;if(fV.line==fW.line&&fU.text.length==1&&!dw(fY.doc,fU)){R(fY,fV.line,"text")}else{af(fY,fV.line,fW.line+1,fZ)}var fP=eS(fY,"changes"),fQ=eS(fY,"change");if(fQ||fP){var fO={from:fV,to:fW,text:fU.text,removed:fU.removed,origin:fU.origin};if(fQ){ac(fY,"change",fY,fO)}if(fP){(fY.curOp.changeObjs||(fY.curOp.changeObjs=[])).push(fO)}}fY.display.selForContextMenu=null}function aR(fQ,fP,fS,fR,fN){if(!fR){fR=fS}if(b5(fR,fS)<0){var fO=fR;fR=fS;fS=fO}if(typeof fP=="string"){fP=aQ(fP)}a5(fQ,{from:fS,to:fR,text:fP,origin:fN})}function dJ(fO,fR){var fS=fO.display,fP=fS.sizer.getBoundingClientRect(),fN=null;if(fR.top+fP.top<0){fN=true}else{if(fR.bottom+fP.top>(window.innerHeight||document.documentElement.clientHeight)){fN=false}}if(fN!=null&&!e5){var fQ=fw("div","\u200b",null,"position: absolute; top: "+(fR.top-fS.viewOffset-eI(fO.display))+"px; height: "+(fR.bottom-fR.top+ba)+"px; left: "+fR.left+"px; width: 2px;");fO.display.lineSpace.appendChild(fQ);fQ.scrollIntoView(fN);fO.display.lineSpace.removeChild(fQ)}}function E(fW,fU,fR,fQ){if(fQ==null){fQ=0}for(;;){var fS=false,fV=dx(fW,fU);var fN=!fR||fR==fU?fV:dx(fW,fR);var fP=H(fW,Math.min(fV.left,fN.left),Math.min(fV.top,fN.top)-fQ,Math.max(fV.left,fN.left),Math.max(fV.bottom,fN.bottom)+fQ);var fT=fW.doc.scrollTop,fO=fW.doc.scrollLeft;if(fP.scrollTop!=null){N(fW,fP.scrollTop);if(Math.abs(fW.doc.scrollTop-fT)>1){fS=true}}if(fP.scrollLeft!=null){bt(fW,fP.scrollLeft);if(Math.abs(fW.doc.scrollLeft-fO)>1){fS=true}}if(!fS){return fV}}}function F(fN,fP,fR,fO,fQ){var fS=H(fN,fP,fR,fO,fQ);if(fS.scrollTop!=null){N(fN,fS.scrollTop)}if(fS.scrollLeft!=null){bt(fN,fS.scrollLeft)}}function H(fT,f1,fQ,f0,fP){var fY=fT.display,fX=aN(fT.display);if(fQ<0){fQ=0}var fW=fT.curOp&&fT.curOp.scrollTop!=null?fT.curOp.scrollTop:fY.scroller.scrollTop;var fO=fY.scroller.clientHeight-ba,fV={};var f3=fT.doc.height+bx(fY);var f4=fQ<fX,fZ=fP>f3-fX;if(fQ<fW){fV.scrollTop=f4?0:fQ}else{if(fP>fW+fO){var fU=Math.min(fQ,(fZ?f3:fP)-fO);if(fU!=fW){fV.scrollTop=fU}}}var fN=fT.curOp&&fT.curOp.scrollLeft!=null?fT.curOp.scrollLeft:fY.scroller.scrollLeft;var fS=fY.scroller.clientWidth-ba;f1+=fY.gutters.offsetWidth;f0+=fY.gutters.offsetWidth;var fR=fY.gutters.offsetWidth;var f2=f1<fR+10;if(f1<fN+fR||f2){if(f2){f1=0}fV.scrollLeft=Math.max(0,f1-10-fR)}else{if(f0>fS+fN-3){fV.scrollLeft=f0+10-fS}}return fV}function cy(fN,fP,fO){if(fP!=null||fO!=null){fd(fN)}if(fP!=null){fN.curOp.scrollLeft=(fN.curOp.scrollLeft==null?fN.doc.scrollLeft:fN.curOp.scrollLeft)+fP}if(fO!=null){fN.curOp.scrollTop=(fN.curOp.scrollTop==null?fN.doc.scrollTop:fN.curOp.scrollTop)+fO}}function fg(fN){fd(fN);var fO=fN.getCursor(),fQ=fO,fP=fO;if(!fN.options.lineWrapping){fQ=fO.ch?W(fO.line,fO.ch-1):fO;fP=W(fO.line,fO.ch+1)}fN.curOp.scrollToPos={from:fQ,to:fP,margin:fN.options.cursorScrollMargin,isCursor:true}}function fd(fN){var fP=fN.curOp.scrollToPos;if(fP){fN.curOp.scrollToPos=null;var fR=dm(fN,fP.from),fQ=dm(fN,fP.to);var fO=H(fN,Math.min(fR.left,fQ.left),Math.min(fR.top,fQ.top)-fP.margin,Math.max(fR.right,fQ.right),Math.max(fR.bottom,fQ.bottom)+fP.margin);fN.scrollTo(fO.scrollLeft,fO.scrollTop)}}function ab(f0,fQ,fZ,fP){var fY=f0.doc,fO;if(fZ==null){fZ="add"}if(fZ=="smart"){if(!f0.doc.mode.indent){fZ="prev"}else{fO=dg(f0,fQ)}}var fU=f0.options.tabSize;var f1=eP(fY,fQ),fT=bI(f1.text,null,fU);if(f1.stateAfter){f1.stateAfter=null}var fN=f1.text.match(/^\s*/)[0],fW;if(!fP&&!/\S/.test(f1.text)){fW=0;fZ="not"}else{if(fZ=="smart"){fW=f0.doc.mode.indent(fO,f1.text.slice(fN.length),f1.text);if(fW==bZ){if(!fP){return}fZ="prev"}}}if(fZ=="prev"){if(fQ>fY.first){fW=bI(eP(fY,fQ-1).text,null,fU)}else{fW=0}}else{if(fZ=="add"){fW=fT+f0.options.indentUnit}else{if(fZ=="subtract"){fW=fT-f0.options.indentUnit}else{if(typeof fZ=="number"){fW=fT+fZ}}}}fW=Math.max(0,fW);var fX="",fV=0;if(f0.options.indentWithTabs){for(var fR=Math.floor(fW/fU);fR;--fR){fV+=fU;fX+="\t"}}if(fV<fW){fX+=cf(fW-fV)}if(fX!=fN){aR(f0.doc,fX,W(fQ,0),W(fQ,fN.length),"+input")}else{for(var fR=0;fR<fY.sel.ranges.length;fR++){var fS=fY.sel.ranges[fR];if(fS.head.line==fQ&&fS.head.ch<fN.length){var fV=W(fQ,fN.length);f(fY,fR,new dB(fV,fV));break}}}f1.stateAfter=null}function eb(fO,fQ,fN,fT){var fS=fQ,fP=fQ,fR=fO.doc;if(typeof fQ=="number"){fP=eP(fR,cO(fR,fQ))}else{fS=bC(fQ)}if(fS==null){return null}if(fT(fP,fS)){R(fO,fS,fN)}return fP}function eA(fN,fT){var fO=fN.doc.sel.ranges,fR=[];for(var fQ=0;fQ<fO.length;fQ++){var fP=fT(fO[fQ]);while(fR.length&&b5(fP.from,fh(fR).to)<=0){var fS=fR.pop();if(b5(fS.from,fP.from)<0){fP.from=fS.from;break}}fR.push(fP)}cz(fN,function(){for(var fU=fR.length-1;fU>=0;fU--){aR(fN.doc,"",fR[fU].from,fR[fU].to,"+delete")}fg(fN)})}function bm(f4,fQ,fY,fX,fS){var fV=fQ.line,fW=fQ.ch,f3=fY;var fN=eP(f4,fV);var f1=true;function f2(){var f5=fV+fY;if(f5<f4.first||f5>=f4.first+f4.size){return(f1=false)}fV=f5;return fN=eP(f4,f5)}function f0(f6){var f5=(fS?v:ag)(fN,fW,fY,true);if(f5==null){if(!f6&&f2()){if(fS){fW=(fY<0?cE:ct)(fN)}else{fW=fY<0?fN.text.length:0}}else{return(f1=false)}}else{fW=f5}return true}if(fX=="char"){f0()}else{if(fX=="column"){f0(true)}else{if(fX=="word"||fX=="group"){var fZ=null,fT=fX=="group";for(var fR=true;;fR=false){if(fY<0&&!f0(!fR)){break}var fO=fN.text.charAt(fW)||"\n";var fP=cp(fO)?"w":fT&&fO=="\n"?"n":!fT||/\s/.test(fO)?null:"p";if(fT&&!fR&&!fP){fP="s"}if(fZ&&fZ!=fP){if(fY<0){fY=1;f0()}break}if(fP){fZ=fP}if(fY>0&&!f0(!fR)){break}}}}}var fU=bK(f4,W(fV,fW),f3,true);if(!f1){fU.hitSide=true}return fU}function bg(fV,fQ,fN,fU){var fT=fV.doc,fS=fQ.left,fR;if(fU=="page"){var fP=Math.min(fV.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);fR=fQ.top+fN*(fP-(fN<0?1.5:0.5)*aN(fV.display))}else{if(fU=="line"){fR=fN>0?fQ.bottom+3:fQ.top-3}}for(;;){var fO=fo(fV,fS,fR);if(!fO.outside){break}if(fN<0?fR<=0:fR>=fT.height){fO.hitSide=true;break}fR+=fN*5}return fO}function ar(fR,fT){var fQ=eP(fR,fT.line).text;var fS=fT.ch,fP=fT.ch;if(fQ){if((fT.xRel<0||fP==fQ.length)&&fS){--fS}else{++fP}var fO=fQ.charAt(fS);var fN=cp(fO)?cp:/\s/.test(fO)?function(fU){return/\s/.test(fU)}:function(fU){return !/\s/.test(fU)&&!cp(fU)};while(fS>0&&fN(fQ.charAt(fS-1))){--fS}while(fP<fQ.length&&fN(fQ.charAt(fP))){++fP}}return new dB(W(fT.line,fS),W(fT.line,fP))}I.prototype={constructor:I,focus:function(){window.focus();ed(this);C(this)},setOption:function(fP,fQ){var fO=this.options,fN=fO[fP];if(fO[fP]==fQ&&fP!="mode"){return}fO[fP]=fQ;if(a4.hasOwnProperty(fP)){cL(this,a4[fP])(this,fQ,fN)}},getOption:function(fN){return this.options[fN]},getDoc:function(){return this.doc},addKeyMap:function(fO,fN){this.state.keyMaps[fN?"push":"unshift"](fO)},removeKeyMap:function(fO){var fP=this.state.keyMaps;for(var fN=0;fN<fP.length;++fN){if(fP[fN]==fO||(typeof fP[fN]!="string"&&fP[fN].name==fO)){fP.splice(fN,1);return true}}},addOverlay:cR(function(fN,fO){var fP=fN.token?fN:I.getMode(this.options,fN);if(fP.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:fP,modeSpec:fN,opaque:fO&&fO.opaque});this.state.modeGen++;af(this)}),removeOverlay:cR(function(fN){var fP=this.state.overlays;for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO].modeSpec;if(fQ==fN||typeof fN=="string"&&fQ.name==fN){fP.splice(fO,1);this.state.modeGen++;af(this);return}}}),indentLine:cR(function(fP,fN,fO){if(typeof fN!="string"&&typeof fN!="number"){if(fN==null){fN=this.options.smartIndent?"smart":"prev"}else{fN=fN?"add":"subtract"}}if(bW(this.doc,fP)){ab(this,fP,fN,fO)}}),indentSelection:cR(function(fS){var fO=this.doc.sel.ranges,fN=-1;for(var fR=0;fR<fO.length;fR++){var fP=fO[fR];if(!fP.empty()){var fU=Math.max(fN,fP.from().line);var fT=fP.to();fN=Math.min(this.lastLine(),fT.line-(fT.ch?0:1))+1;for(var fQ=fU;fQ<fN;++fQ){ab(this,fQ,fS)}}else{if(fP.head.line>fN){ab(this,fP.head.line,fS,true);fN=fP.head.line;if(fR==this.doc.sel.primIndex){fg(this)}}}}}),getTokenAt:function(fU,fO){var fR=this.doc;fU=fj(fR,fU);var fQ=dg(this,fU.line,fO),fT=this.doc.mode;var fN=eP(fR,fU.line);var fS=new ew(fN.text,this.options.tabSize);while(fS.pos<fU.ch&&!fS.eol()){fS.start=fS.pos;var fP=ef(fT,fS,fQ)}return{start:fS.start,end:fS.pos,string:fS.current(),type:fP||null,state:fQ}},getTokenTypeAt:function(fU){fU=fj(this.doc,fU);var fQ=cQ(this,eP(this.doc,fU.line));var fS=0,fT=(fQ.length-1)/2,fP=fU.ch;var fO;if(fP==0){fO=fQ[2]}else{for(;;){var fN=(fS+fT)>>1;if((fN?fQ[fN*2-1]:0)>=fP){fT=fN}else{if(fQ[fN*2+1]<fP){fS=fN+1}else{fO=fQ[fN*2+2];break}}}}var fR=fO?fO.indexOf("cm-overlay "):-1;return fR<0?fO:fR==0?null:fO.slice(0,fR-1)},getModeAt:function(fO){var fN=this.doc.mode;if(!fN.innerMode){return fN}return I.innerMode(fN,this.getTokenAt(fO).state).mode},getHelper:function(fO,fN){return this.getHelpers(fO,fN)[0]},getHelpers:function(fU,fP){var fQ=[];if(!eY.hasOwnProperty(fP)){return eY}var fN=eY[fP],fT=this.getModeAt(fU);if(typeof fT[fP]=="string"){if(fN[fT[fP]]){fQ.push(fN[fT[fP]])}}else{if(fT[fP]){for(var fO=0;fO<fT[fP].length;fO++){var fS=fN[fT[fP][fO]];if(fS){fQ.push(fS)}}}else{if(fT.helperType&&fN[fT.helperType]){fQ.push(fN[fT.helperType])}else{if(fN[fT.name]){fQ.push(fN[fT.name])}}}}for(var fO=0;fO<fN._global.length;fO++){var fR=fN._global[fO];if(fR.pred(fT,this)&&c1(fQ,fR.val)==-1){fQ.push(fR.val)}}return fQ},getStateAfter:function(fO,fN){var fP=this.doc;fO=cO(fP,fO==null?fP.first+fP.size-1:fO);return dg(this,fO+1,fN)},cursorCoords:function(fQ,fO){var fP,fN=this.doc.sel.primary();if(fQ==null){fP=fN.head}else{if(typeof fQ=="object"){fP=fj(this.doc,fQ)}else{fP=fQ?fN.from():fN.to()}}return dx(this,fP,fO||"page")},charCoords:function(fO,fN){return cx(this,fj(this.doc,fO),fN||"page")},coordsChar:function(fN,fO){fN=fJ(this,fN,fO||"page");return fo(this,fN.left,fN.top)},lineAtHeight:function(fN,fO){fN=fJ(this,{top:fN,left:0},fO||"page").top;return bv(this.doc,fN+this.display.viewOffset)},heightAtLine:function(fO,fR){var fN=false,fQ=this.doc.first+this.doc.size-1;if(fO<this.doc.first){fO=this.doc.first}else{if(fO>fQ){fO=fQ;fN=true}}var fP=eP(this.doc,fO);return et(this,fP,{top:0,left:0},fR||"page").top+(fN?this.doc.height-bB(fP):0)},defaultTextHeight:function(){return aN(this.display)},defaultCharWidth:function(){return di(this.display)},setGutterMarker:cR(function(fN,fO,fP){return eb(this,fN,"gutter",function(fQ){var fR=fQ.gutterMarkers||(fQ.gutterMarkers={});fR[fO]=fP;if(!fP&&ex(fR)){fQ.gutterMarkers=null}return true})}),clearGutter:cR(function(fP){var fN=this,fQ=fN.doc,fO=fQ.first;fQ.iter(function(fR){if(fR.gutterMarkers&&fR.gutterMarkers[fP]){fR.gutterMarkers[fP]=null;R(fN,fO,"gutter");if(ex(fR.gutterMarkers)){fR.gutterMarkers=null}}++fO})}),addLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fQ){var fR=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";if(!fQ[fR]){fQ[fR]=fN}else{if(new RegExp("(?:^|\\s)"+fN+"(?:$|\\s)").test(fQ[fR])){return false}else{fQ[fR]+=" "+fN}}return true})}),removeLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fR){var fU=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";var fT=fR[fU];if(!fT){return false}else{if(fN==null){fR[fU]=null}else{var fS=fT.match(new RegExp("(?:^|\\s+)"+fN+"(?:$|\\s+)"));if(!fS){return false}var fQ=fS.index+fS[0].length;fR[fU]=fT.slice(0,fS.index)+(!fS.index||fQ==fT.length?"":" ")+fT.slice(fQ)||null}}return true})}),addLineWidget:cR(function(fP,fO,fN){return bw(this,fP,fO,fN)}),removeLineWidget:function(fN){fN.clear()},lineInfo:function(fN){if(typeof fN=="number"){if(!bW(this.doc,fN)){return null}var fO=fN;fN=eP(this.doc,fN);if(!fN){return null}}else{var fO=bC(fN);if(fO==null){return null}}return{line:fO,handle:fN,text:fN.text,gutterMarkers:fN.gutterMarkers,textClass:fN.textClass,bgClass:fN.bgClass,wrapClass:fN.wrapClass,widgets:fN.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fS,fP,fU,fQ,fW){var fR=this.display;fS=dx(this,fj(this.doc,fS));var fT=fS.bottom,fO=fS.left;fP.style.position="absolute";fR.sizer.appendChild(fP);if(fQ=="over"){fT=fS.top}else{if(fQ=="above"||fQ=="near"){var fN=Math.max(fR.wrapper.clientHeight,this.doc.height),fV=Math.max(fR.sizer.clientWidth,fR.lineSpace.clientWidth);if((fQ=="above"||fS.bottom+fP.offsetHeight>fN)&&fS.top>fP.offsetHeight){fT=fS.top-fP.offsetHeight}else{if(fS.bottom+fP.offsetHeight<=fN){fT=fS.bottom}}if(fO+fP.offsetWidth>fV){fO=fV-fP.offsetWidth}}}fP.style.top=fT+"px";fP.style.left=fP.style.right="";if(fW=="right"){fO=fR.sizer.clientWidth-fP.offsetWidth;fP.style.right="0px"}else{if(fW=="left"){fO=0}else{if(fW=="middle"){fO=(fR.sizer.clientWidth-fP.offsetWidth)/2}}fP.style.left=fO+"px"}if(fU){F(this,fO,fT,fO+fP.offsetWidth,fT+fP.offsetHeight)}},triggerOnKeyDown:cR(q),triggerOnKeyPress:cR(cn),triggerOnKeyUp:cR(a7),execCommand:function(fN){if(eh.hasOwnProperty(fN)){return eh[fN](this)}},findPosH:function(fT,fQ,fR,fO){var fN=1;if(fQ<0){fN=-1;fQ=-fQ}for(var fP=0,fS=fj(this.doc,fT);fP<fQ;++fP){fS=bm(this.doc,fS,fN,fR,fO);if(fS.hitSide){break}}return fS},moveH:cR(function(fO,fP){var fN=this;fN.extendSelectionsBy(function(fQ){if(fN.display.shift||fN.doc.extend||fQ.empty()){return bm(fN.doc,fQ.head,fO,fP,fN.options.rtlMoveVisually)}else{return fO<0?fQ.from():fQ.to()}},cF)}),deleteH:cR(function(fN,fO){var fP=this.doc.sel,fQ=this.doc;if(fP.somethingSelected()){fQ.replaceSelection("",null,"+delete")}else{eA(this,function(fS){var fR=bm(fQ,fS.head,fN,fO,false);return fN<0?{from:fR,to:fS.head}:{from:fS.head,to:fR}})}}),findPosV:function(fS,fP,fT,fV){var fN=1,fR=fV;if(fP<0){fN=-1;fP=-fP}for(var fO=0,fU=fj(this.doc,fS);fO<fP;++fO){var fQ=dx(this,fU,"div");if(fR==null){fR=fQ.left}else{fQ.left=fR}fU=bg(this,fQ,fN,fT);if(fU.hitSide){break}}return fU},moveV:cR(function(fO,fQ){var fN=this,fS=this.doc,fR=[];var fT=!fN.display.shift&&!fS.extend&&fS.sel.somethingSelected();fS.extendSelectionsBy(function(fU){if(fT){return fO<0?fU.from():fU.to()}var fW=dx(fN,fU.head,"div");if(fU.goalColumn!=null){fW.left=fU.goalColumn}fR.push(fW.left);var fV=bg(fN,fW,fO,fQ);if(fQ=="page"&&fU==fS.sel.primary()){cy(fN,null,cx(fN,fV,"div").top-fW.top)}return fV},cF);if(fR.length){for(var fP=0;fP<fS.sel.ranges.length;fP++){fS.sel.ranges[fP].goalColumn=fR[fP]}}}),toggleOverwrite:function(fN){if(fN!=null&&fN==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){fb(this.display.cursorDiv,"CodeMirror-overwrite")}else{g(this.display.cursorDiv,"CodeMirror-overwrite")}az(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return ds()==this.display.input},scrollTo:cR(function(fN,fO){if(fN!=null||fO!=null){fd(this)}if(fN!=null){this.curOp.scrollLeft=fN}if(fO!=null){this.curOp.scrollTop=fO}}),getScrollInfo:function(){var fN=this.display.scroller,fO=ba;return{left:fN.scrollLeft,top:fN.scrollTop,height:fN.scrollHeight-fO,width:fN.scrollWidth-fO,clientHeight:fN.clientHeight-fO,clientWidth:fN.clientWidth-fO}},scrollIntoView:cR(function(fO,fP){if(fO==null){fO={from:this.doc.sel.primary().head,to:null};if(fP==null){fP=this.options.cursorScrollMargin}}else{if(typeof fO=="number"){fO={from:W(fO,0),to:null}}else{if(fO.from==null){fO={from:fO,to:null}}}}if(!fO.to){fO.to=fO.from}fO.margin=fP||0;if(fO.from.line!=null){fd(this);this.curOp.scrollToPos=fO}else{var fN=H(this,Math.min(fO.from.left,fO.to.left),Math.min(fO.from.top,fO.to.top)-fO.margin,Math.max(fO.from.right,fO.to.right),Math.max(fO.from.bottom,fO.to.bottom)+fO.margin);this.scrollTo(fN.scrollLeft,fN.scrollTop)}}),setSize:cR(function(fP,fN){function fO(fQ){return typeof fQ=="number"||/^\d+$/.test(String(fQ))?fQ+"px":fQ}if(fP!=null){this.display.wrapper.style.width=fO(fP)}if(fN!=null){this.display.wrapper.style.height=fO(fN)}if(this.options.lineWrapping){aF(this)}this.curOp.forceUpdate=true;az(this,"refresh",this)}),operation:function(fN){return cz(this,fN)},refresh:cR(function(){var fN=this.display.cachedTextHeight;af(this);this.curOp.forceUpdate=true;ai(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);cN(this);if(fN==null||Math.abs(fN-aN(this.display))>0.5){X(this)}az(this,"refresh",this)}),swapDoc:cR(function(fO){var fN=this.doc;fN.cm=null;dN(this,fO);ai(this);eZ(this);this.scrollTo(fO.scrollLeft,fO.scrollTop);ac(this,"swapDoc",this,fN);return fN}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};bo(I);var eF=I.defaults={};var a4=I.optionHandlers={};function t(fN,fQ,fP,fO){I.defaults[fN]=fQ;if(fP){a4[fN]=fO?function(fR,fT,fS){if(fS!=b2){fP(fR,fT,fS)}}:fP}}var b2=I.Init={toString:function(){return"CodeMirror.Init"}};t("value","",function(fN,fO){fN.setValue(fO)},true);t("mode",null,function(fN,fO){fN.doc.modeOption=fO;bh(fN)},true);t("indentUnit",2,bh,true);t("indentWithTabs",false);t("smartIndent",true);t("tabSize",4,function(fN){dX(fN);ai(fN);af(fN)},true);t("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(fN,fO){fN.options.specialChars=new RegExp(fO.source+(fO.test("\t")?"":"|\t"),"g");fN.refresh()},true);t("specialCharPlaceholder",eN,function(fN){fN.refresh()},true);t("electricChars",true);t("rtlMoveVisually",!aG);t("wholeLineUpdateBefore",true);t("theme","default",function(fN){cB(fN);db(fN)},true);t("keyMap","default",fK);t("extraKeys",null);t("lineWrapping",false,ek,true);t("gutters",[],function(fN){b4(fN.options);db(fN)},true);t("fixedGutter",true,function(fN,fO){fN.display.gutters.style.left=fO?dA(fN.display)+"px":"0";fN.refresh()},true);t("coverGutterNextToScrollbar",false,eB,true);t("lineNumbers",false,function(fN){b4(fN.options);db(fN)},true);t("firstLineNumber",1,db,true);t("lineNumberFormatter",function(fN){return fN},db,true);t("showCursorWhenSelecting",false,br,true);t("resetSelectionOnContextMenu",true);t("readOnly",false,function(fN,fO){if(fO=="nocursor"){aL(fN);fN.display.input.blur();fN.display.disabled=true}else{fN.display.disabled=false;if(!fO){eZ(fN)}}});t("disableInput",false,function(fN,fO){if(!fO){eZ(fN)}},true);t("dragDrop",true);t("cursorBlinkRate",530);t("cursorScrollMargin",0);t("cursorHeight",1);t("workTime",100);t("workDelay",100);t("flattenSpans",true,dX,true);t("addModeClass",false,dX,true);t("pollInterval",100);t("undoDepth",200,function(fN,fO){fN.doc.history.undoDepth=fO});t("historyEventDelay",1250);t("viewportMargin",10,function(fN){fN.refresh()},true);t("maxHighlightLength",10000,dX,true);t("moveInputWithCursor",true,function(fN,fO){if(!fO){fN.display.inputDiv.style.top=fN.display.inputDiv.style.left=0}});t("tabindex",null,function(fN,fO){fN.display.input.tabIndex=fO||""});t("autofocus",null);var c8=I.modes={},aJ=I.mimeModes={};I.defineMode=function(fN,fP){if(!I.defaults.mode&&fN!="null"){I.defaults.mode=fN}if(arguments.length>2){fP.dependencies=[];for(var fO=2;fO<arguments.length;++fO){fP.dependencies.push(arguments[fO])}}c8[fN]=fP};I.defineMIME=function(fO,fN){aJ[fO]=fN};I.resolveMode=function(fN){if(typeof fN=="string"&&aJ.hasOwnProperty(fN)){fN=aJ[fN]}else{if(fN&&typeof fN.name=="string"&&aJ.hasOwnProperty(fN.name)){var fO=aJ[fN.name];if(typeof fO=="string"){fO={name:fO}}fN=ca(fO,fN);fN.name=fO.name}else{if(typeof fN=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(fN)){return I.resolveMode("application/xml")}}}if(typeof fN=="string"){return{name:fN}}else{return fN||{name:"null"}}};I.getMode=function(fO,fN){var fN=I.resolveMode(fN);var fQ=c8[fN.name];if(!fQ){return I.getMode(fO,"text/plain")}var fR=fQ(fO,fN);if(c5.hasOwnProperty(fN.name)){var fP=c5[fN.name];for(var fS in fP){if(!fP.hasOwnProperty(fS)){continue}if(fR.hasOwnProperty(fS)){fR["_"+fS]=fR[fS]}fR[fS]=fP[fS]}}fR.name=fN.name;if(fN.helperType){fR.helperType=fN.helperType}if(fN.modeProps){for(var fS in fN.modeProps){fR[fS]=fN.modeProps[fS]}}return fR};I.defineMode("null",function(){return{token:function(fN){fN.skipToEnd()}}});I.defineMIME("text/plain","null");var c5=I.modeExtensions={};I.extendMode=function(fP,fO){var fN=c5.hasOwnProperty(fP)?c5[fP]:(c5[fP]={});aE(fO,fN)};I.defineExtension=function(fN,fO){I.prototype[fN]=fO};I.defineDocExtension=function(fN,fO){ao.prototype[fN]=fO};I.defineOption=t;var aY=[];I.defineInitHook=function(fN){aY.push(fN)};var eY=I.helpers={};I.registerHelper=function(fO,fN,fP){if(!eY.hasOwnProperty(fO)){eY[fO]=I[fO]={_global:[]}}eY[fO][fN]=fP};I.registerGlobalHelper=function(fP,fO,fN,fQ){I.registerHelper(fP,fO,fQ);eY[fP]._global.push({pred:fN,val:fQ})};var bR=I.copyState=function(fQ,fN){if(fN===true){return fN}if(fQ.copyState){return fQ.copyState(fN)}var fP={};for(var fR in fN){var fO=fN[fR];if(fO instanceof Array){fO=fO.concat([])}fP[fR]=fO}return fP};var bP=I.startState=function(fP,fO,fN){return fP.startState?fP.startState(fO,fN):true};I.innerMode=function(fP,fN){while(fP.innerMode){var fO=fP.innerMode(fN);if(!fO||fO.mode==fP){break}fN=fO.state;fP=fO.mode}return fO||{mode:fP,state:fN}};var eh=I.commands={selectAll:function(fN){fN.setSelection(W(fN.firstLine(),0),W(fN.lastLine()),Y)},singleSelection:function(fN){fN.setSelection(fN.getCursor("anchor"),fN.getCursor("head"),Y)},killLine:function(fN){eA(fN,function(fP){if(fP.empty()){var fO=eP(fN.doc,fP.head.line).text.length;if(fP.head.ch==fO&&fP.head.line<fN.lastLine()){return{from:fP.head,to:W(fP.head.line+1,0)}}else{return{from:fP.head,to:W(fP.head.line,fO)}}}else{return{from:fP.from(),to:fP.to()}}})},deleteLine:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fj(fN.doc,W(fO.to().line+1,0))}})},delLineLeft:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fO.from()}})},undo:function(fN){fN.undo()},redo:function(fN){fN.redo()},undoSelection:function(fN){fN.undoSelection()},redoSelection:function(fN){fN.redoSelection()},goDocStart:function(fN){fN.extendSelection(W(fN.firstLine(),0))},goDocEnd:function(fN){fN.extendSelection(W(fN.lastLine()))},goLineStart:function(fN){fN.extendSelectionsBy(function(fO){return bj(fN,fO.head.line)},cF)},goLineStartSmart:function(fN){fN.extendSelectionsBy(function(fQ){var fT=bj(fN,fQ.head.line);var fP=fN.getLineHandle(fT.line);var fO=a(fP);if(!fO||fO[0].level==0){var fS=Math.max(0,fP.text.search(/\S/));var fR=fQ.head.line==fT.line&&fQ.head.ch<=fS&&fQ.head.ch;return W(fT.line,fR?0:fS)}return fT},cF)},goLineEnd:function(fN){fN.extendSelectionsBy(function(fO){return dt(fN,fO.head.line)},cF)},goLineRight:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:fN.display.lineDiv.offsetWidth+100,top:fP},"div")},cF)},goLineLeft:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:0,top:fP},"div")},cF)},goLineUp:function(fN){fN.moveV(-1,"line")},goLineDown:function(fN){fN.moveV(1,"line")},goPageUp:function(fN){fN.moveV(-1,"page")},goPageDown:function(fN){fN.moveV(1,"page")},goCharLeft:function(fN){fN.moveH(-1,"char")},goCharRight:function(fN){fN.moveH(1,"char")},goColumnLeft:function(fN){fN.moveH(-1,"column")},goColumnRight:function(fN){fN.moveH(1,"column")},goWordLeft:function(fN){fN.moveH(-1,"word")},goGroupRight:function(fN){fN.moveH(1,"group")},goGroupLeft:function(fN){fN.moveH(-1,"group")},goWordRight:function(fN){fN.moveH(1,"word")},delCharBefore:function(fN){fN.deleteH(-1,"char")},delCharAfter:function(fN){fN.deleteH(1,"char")},delWordBefore:function(fN){fN.deleteH(-1,"word")},delWordAfter:function(fN){fN.deleteH(1,"word")},delGroupBefore:function(fN){fN.deleteH(-1,"group")},delGroupAfter:function(fN){fN.deleteH(1,"group")},indentAuto:function(fN){fN.indentSelection("smart")},indentMore:function(fN){fN.indentSelection("add")},indentLess:function(fN){fN.indentSelection("subtract")},insertTab:function(fN){fN.replaceSelection("\t")},insertSoftTab:function(fN){var fP=[],fO=fN.listSelections(),fS=fN.options.tabSize;for(var fR=0;fR<fO.length;fR++){var fT=fO[fR].from();var fQ=bI(fN.getLine(fT.line),fT.ch,fS);fP.push(new Array(fS-fQ%fS+1).join(" "))}fN.replaceSelections(fP)},defaultTab:function(fN){if(fN.somethingSelected()){fN.indentSelection("add")}else{fN.execCommand("insertTab")}},transposeChars:function(fN){cz(fN,function(){var fP=fN.listSelections();for(var fQ=0;fQ<fP.length;fQ++){var fR=fP[fQ].head,fO=eP(fN.doc,fR.line).text;if(fR.ch>0&&fR.ch<fO.length-1){fN.replaceRange(fO.charAt(fR.ch)+fO.charAt(fR.ch-1),W(fR.line,fR.ch-1),W(fR.line,fR.ch+1))}}})},newlineAndIndent:function(fN){cz(fN,function(){var fO=fN.listSelections().length;for(var fQ=0;fQ<fO;fQ++){var fP=fN.listSelections()[fQ];fN.replaceRange("\n",fP.anchor,fP.head,"+input");fN.indentLine(fP.from().line+1,null,true);fg(fN)}})},toggleOverwrite:function(fN){fN.toggleOverwrite()}};var eK=I.keyMap={};eK.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};eK.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};eK.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delLineLeft","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection",fallthrough:["basic","emacsy"]};eK.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};eK["default"]=bU?eK.macDefault:eK.pcDefault;function fu(fN){if(typeof fN=="string"){return eK[fN]}else{return fN}}var j=I.lookupKey=function(fO,fS,fQ){function fR(fX){fX=fu(fX);var fW=fX[fO];if(fW===false){return"stop"}if(fW!=null&&fQ(fW)){return true}if(fX.nofallthrough){return"stop"}var fV=fX.fallthrough;if(fV==null){return false}if(Object.prototype.toString.call(fV)!="[object Array]"){return fR(fV)}for(var fU=0;fU<fV.length;++fU){var fT=fR(fV[fU]);if(fT){return fT}}return false}for(var fP=0;fP<fS.length;++fP){var fN=fR(fS[fP]);if(fN){return fN!="stop"}}};var eg=I.isModifierKey=function(fO){var fN=eQ[fO.keyCode];return fN=="Ctrl"||fN=="Alt"||fN=="Shift"||fN=="Mod"};var e2=I.keyName=function(fO,fP){if(dF&&fO.keyCode==34&&fO["char"]){return false}var fN=eQ[fO.keyCode];if(fN==null||fO.altGraphKey){return false}if(fO.altKey){fN="Alt-"+fN}if(bF?fO.metaKey:fO.ctrlKey){fN="Ctrl-"+fN}if(bF?fO.ctrlKey:fO.metaKey){fN="Cmd-"+fN}if(!fP&&fO.shiftKey){fN="Shift-"+fN}return fN};I.fromTextArea=function(fU,fV){if(!fV){fV={}}fV.value=fU.value;if(!fV.tabindex&&fU.tabindex){fV.tabindex=fU.tabindex}if(!fV.placeholder&&fU.placeholder){fV.placeholder=fU.placeholder}if(fV.autofocus==null){var fN=ds();fV.autofocus=fN==fU||fU.getAttribute("autofocus")!=null&&fN==document.body}function fR(){fU.value=fT.getValue()}if(fU.form){bM(fU.form,"submit",fR);if(!fV.leaveSubmitMethodAlone){var fO=fU.form,fS=fO.submit;try{var fQ=fO.submit=function(){fR();fO.submit=fS;fO.submit();fO.submit=fQ}}catch(fP){}}}fU.style.display="none";var fT=I(function(fW){fU.parentNode.insertBefore(fW,fU.nextSibling)},fV);fT.save=fR;fT.getTextArea=function(){return fU};fT.toTextArea=function(){fR();fU.parentNode.removeChild(fT.getWrapperElement());fU.style.display="";if(fU.form){dP(fU.form,"submit",fR);if(typeof fU.form.submit=="function"){fU.form.submit=fS}}};return fT};var ew=I.StringStream=function(fN,fO){this.pos=this.start=0;this.string=fN;this.tabSize=fO||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};ew.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(fN){var fP=this.string.charAt(this.pos);if(typeof fN=="string"){var fO=fP==fN}else{var fO=fP&&(fN.test?fN.test(fP):fN(fP))}if(fO){++this.pos;return fP}},eatWhile:function(fN){var fO=this.pos;while(this.eat(fN)){}return this.pos>fO},eatSpace:function(){var fN=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>fN},skipToEnd:function(){this.pos=this.string.length},skipTo:function(fN){var fO=this.string.indexOf(fN,this.pos);if(fO>-1){this.pos=fO;return true}},backUp:function(fN){this.pos-=fN},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bI(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bI(this.string,null,this.tabSize)-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},match:function(fR,fO,fN){if(typeof fR=="string"){var fS=function(fT){return fN?fT.toLowerCase():fT};var fQ=this.string.substr(this.pos,fR.length);if(fS(fQ)==fS(fR)){if(fO!==false){this.pos+=fR.length}return true}}else{var fP=this.string.slice(this.pos).match(fR);if(fP&&fP.index>0){return null}if(fP&&fO!==false){this.pos+=fP[0].length}return fP}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(fO,fN){this.lineStart+=fO;try{return fN()}finally{this.lineStart-=fO}}};var P=I.TextMarker=function(fO,fN){this.lines=[];this.type=fN;this.doc=fO};bo(P);P.prototype.clear=function(){if(this.explicitlyCleared){return}var fU=this.doc.cm,fO=fU&&!fU.curOp;if(fO){cw(fU)}if(eS(this,"clear")){var fV=this.find();if(fV){ac(this,"clear",fV.from,fV.to)}}var fP=null,fS=null;for(var fQ=0;fQ<this.lines.length;++fQ){var fW=this.lines[fQ];var fT=eJ(fW.markedSpans,this);if(fU&&!this.collapsed){R(fU,bC(fW),"text")}else{if(fU){if(fT.to!=null){fS=bC(fW)}if(fT.from!=null){fP=bC(fW)}}}fW.markedSpans=el(fW.markedSpans,fT);if(fT.from==null&&this.collapsed&&!e7(this.doc,fW)&&fU){fA(fW,aN(fU.display))}}if(fU&&this.collapsed&&!fU.options.lineWrapping){for(var fQ=0;fQ<this.lines.length;++fQ){var fN=z(this.lines[fQ]),fR=dY(fN);if(fR>fU.display.maxLineLength){fU.display.maxLine=fN;fU.display.maxLineLength=fR;fU.display.maxLineChanged=true}}}if(fP!=null&&fU&&this.collapsed){af(fU,fP,fS+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(fU){ea(fU.doc)}}if(fU){ac(fU,"markerCleared",fU,this)}if(fO){aj(fU)}if(this.parent){this.parent.clear()}};P.prototype.find=function(fQ,fO){if(fQ==null&&this.type=="bookmark"){fQ=1}var fT,fS;for(var fP=0;fP<this.lines.length;++fP){var fN=this.lines[fP];var fR=eJ(fN.markedSpans,this);if(fR.from!=null){fT=W(fO?fN:bC(fN),fR.from);if(fQ==-1){return fT}}if(fR.to!=null){fS=W(fO?fN:bC(fN),fR.to);if(fQ==1){return fS}}}return fT&&{from:fT,to:fS}};P.prototype.changed=function(){var fP=this.find(-1,true),fO=this,fN=this.doc.cm;if(!fP||!fN){return}cz(fN,function(){var fR=fP.line,fS=bC(fP.line);var fQ=eL(fN,fS);if(fQ){ap(fQ);fN.curOp.selectionChanged=fN.curOp.forceUpdate=true}fN.curOp.updateMaxLine=true;if(!e7(fO.doc,fR)&&fO.height!=null){var fU=fO.height;fO.height=null;var fT=cH(fO)-fU;if(fT){fA(fR,fR.height+fT)}}})};P.prototype.attachLine=function(fN){if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;if(!fO.maybeHiddenMarkers||c1(fO.maybeHiddenMarkers,this)==-1){(fO.maybeUnhiddenMarkers||(fO.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(fN)};P.prototype.detachLine=function(fN){this.lines.splice(c1(this.lines,fN),1);if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;(fO.maybeHiddenMarkers||(fO.maybeHiddenMarkers=[])).push(this)}};var aV=0;function ej(fV,fT,fU,fX,fR){if(fX&&fX.shared){return O(fV,fT,fU,fX,fR)}if(fV.cm&&!fV.cm.curOp){return cL(fV.cm,ej)(fV,fT,fU,fX,fR)}var fQ=new P(fV,fR),fW=b5(fT,fU);if(fX){aE(fX,fQ,false)}if(fW>0||fW==0&&fQ.clearWhenEmpty!==false){return fQ}if(fQ.replacedWith){fQ.collapsed=true;fQ.widgetNode=fw("span",[fQ.replacedWith],"CodeMirror-widget");if(!fX.handleMouseEvents){fQ.widgetNode.ignoreEvents=true}if(fX.insertLeft){fQ.widgetNode.insertLeft=true}}if(fQ.collapsed){if(A(fV,fT.line,fT,fU,fQ)||fT.line!=fU.line&&A(fV,fU.line,fT,fU,fQ)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}aX=true}if(fQ.addToHistory){fm(fV,{from:fT,to:fU,origin:"markText"},fV.sel,NaN)}var fO=fT.line,fS=fV.cm,fN;fV.iter(fO,fU.line+1,function(fY){if(fS&&fQ.collapsed&&!fS.options.lineWrapping&&z(fY)==fS.display.maxLine){fN=true}if(fQ.collapsed&&fO!=fT.line){fA(fY,0)}b3(fY,new dU(fQ,fO==fT.line?fT.ch:null,fO==fU.line?fU.ch:null));++fO});if(fQ.collapsed){fV.iter(fT.line,fU.line+1,function(fY){if(e7(fV,fY)){fA(fY,0)}})}if(fQ.clearOnEnter){bM(fQ,"beforeCursorEnter",function(){fQ.clear()})}if(fQ.readOnly){fH=true;if(fV.history.done.length||fV.history.undone.length){fV.clearHistory()}}if(fQ.collapsed){fQ.id=++aV;fQ.atomic=true}if(fS){if(fN){fS.curOp.updateMaxLine=true}if(fQ.collapsed){af(fS,fT.line,fU.line+1)}else{if(fQ.className||fQ.title||fQ.startStyle||fQ.endStyle){for(var fP=fT.line;fP<=fU.line;fP++){R(fS,fP,"text")}}}if(fQ.atomic){ea(fS.doc)}ac(fS,"markerAdded",fS,fQ)}return fQ}var y=I.SharedTextMarker=function(fP,fO){this.markers=fP;this.primary=fO;for(var fN=0;fN<fP.length;++fN){fP[fN].parent=this}};bo(y);y.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var fN=0;fN<this.markers.length;++fN){this.markers[fN].clear()}ac(this,"clear")};y.prototype.find=function(fO,fN){return this.primary.find(fO,fN)};function O(fR,fU,fT,fN,fP){fN=aE(fN);fN.shared=false;var fS=[ej(fR,fU,fT,fN,fP)],fO=fS[0];var fQ=fN.widgetNode;dK(fR,function(fW){if(fQ){fN.widgetNode=fQ.cloneNode(true)}fS.push(ej(fW,fj(fW,fU),fj(fW,fT),fN,fP));for(var fV=0;fV<fW.linked.length;++fV){if(fW.linked[fV].isParent){return}}fO=fh(fS)});return new y(fS,fO)}function es(fN){return fN.findMarks(W(fN.first,0),fN.clipPos(W(fN.lastLine())),function(fO){return fO.parent})}function dk(fS,fT){for(var fQ=0;fQ<fT.length;fQ++){var fO=fT[fQ],fU=fO.find();var fN=fS.clipPos(fU.from),fR=fS.clipPos(fU.to);if(b5(fN,fR)){var fP=ej(fS,fN,fR,fO.primary,fO.primary.type);fO.markers.push(fP);fP.parent=fO}}}function d0(fQ){for(var fP=0;fP<fQ.length;fP++){var fN=fQ[fP],fS=[fN.primary.doc];dK(fN.primary.doc,function(fT){fS.push(fT)});for(var fO=0;fO<fN.markers.length;fO++){var fR=fN.markers[fO];if(c1(fS,fR.doc)==-1){fR.parent=null;fN.markers.splice(fO--,1)}}}}function dU(fN,fP,fO){this.marker=fN;this.from=fP;this.to=fO}function eJ(fP,fN){if(fP){for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO];if(fQ.marker==fN){return fQ}}}}function el(fO,fP){for(var fQ,fN=0;fN<fO.length;++fN){if(fO[fN]!=fP){(fQ||(fQ=[])).push(fO[fN])}}return fQ}function b3(fN,fO){fN.markedSpans=fN.markedSpans?fN.markedSpans.concat([fO]):[fO];fO.marker.attachLine(fN)}function aH(fO,fP,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fP:fV.from<fP);if(fN||fV.from==fP&&fS.type=="bookmark"&&(!fT||!fV.marker.insertLeft)){var fQ=fV.to==null||(fS.inclusiveRight?fV.to>=fP:fV.to>fP);(fU||(fU=[])).push(new dU(fS,fV.from,fQ?null:fV.to))}}}return fU}function ax(fO,fQ,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fP=fV.to==null||(fS.inclusiveRight?fV.to>=fQ:fV.to>fQ);if(fP||fV.from==fQ&&fS.type=="bookmark"&&(!fT||fV.marker.insertLeft)){var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fQ:fV.from<fQ);(fU||(fU=[])).push(new dU(fS,fN?null:fV.from-fQ,fV.to==null?null:fV.to-fQ))}}}return fU}function dW(fZ,fW){var fV=bW(fZ,fW.from.line)&&eP(fZ,fW.from.line).markedSpans;var f2=bW(fZ,fW.to.line)&&eP(fZ,fW.to.line).markedSpans;if(!fV&&!f2){return null}var fO=fW.from.ch,fR=fW.to.ch,fU=b5(fW.from,fW.to)==0;var fT=aH(fV,fO,fU);var f1=ax(f2,fR,fU);var f0=fW.text.length==1,fP=fh(fW.text).length+(f0?fO:0);if(fT){for(var fQ=0;fQ<fT.length;++fQ){var fY=fT[fQ];if(fY.to==null){var f3=eJ(f1,fY.marker);if(!f3){fY.to=fO}else{if(f0){fY.to=f3.to==null?null:f3.to+fP}}}}}if(f1){for(var fQ=0;fQ<f1.length;++fQ){var fY=f1[fQ];if(fY.to!=null){fY.to+=fP}if(fY.from==null){var f3=eJ(fT,fY.marker);if(!f3){fY.from=fP;if(f0){(fT||(fT=[])).push(fY)}}}else{fY.from+=fP;if(f0){(fT||(fT=[])).push(fY)}}}}if(fT){fT=r(fT)}if(f1&&f1!=fT){f1=r(f1)}var fS=[fT];if(!f0){var fX=fW.text.length-2,fN;if(fX>0&&fT){for(var fQ=0;fQ<fT.length;++fQ){if(fT[fQ].to==null){(fN||(fN=[])).push(new dU(fT[fQ].marker,null,null))}}}for(var fQ=0;fQ<fX;++fQ){fS.push(fN)}fS.push(f1)}return fS}function r(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if(fP.from!=null&&fP.from==fP.to&&fP.marker.clearWhenEmpty!==false){fO.splice(fN--,1)}}if(!fO.length){return null}return fO}function dM(fV,fT){var fN=bS(fV,fT);var fW=dW(fV,fT);if(!fN){return fW}if(!fW){return fN}for(var fQ=0;fQ<fN.length;++fQ){var fR=fN[fQ],fS=fW[fQ];if(fR&&fS){spans:for(var fP=0;fP<fS.length;++fP){var fU=fS[fP];for(var fO=0;fO<fR.length;++fO){if(fR[fO].marker==fU.marker){continue spans}}fR.push(fU)}}else{if(fS){fN[fQ]=fS}}}return fN}function cv(fZ,fX,fY){var fR=null;fZ.iter(fX.line,fY.line+1,function(f0){if(f0.markedSpans){for(var f1=0;f1<f0.markedSpans.length;++f1){var f2=f0.markedSpans[f1].marker;if(f2.readOnly&&(!fR||c1(fR,f2)==-1)){(fR||(fR=[])).push(f2)}}}});if(!fR){return null}var fS=[{from:fX,to:fY}];for(var fT=0;fT<fR.length;++fT){var fU=fR[fT],fP=fU.find(0);for(var fQ=0;fQ<fS.length;++fQ){var fO=fS[fQ];if(b5(fO.to,fP.from)<0||b5(fO.from,fP.to)>0){continue}var fW=[fQ,1],fN=b5(fO.from,fP.from),fV=b5(fO.to,fP.to);if(fN<0||!fU.inclusiveLeft&&!fN){fW.push({from:fO.from,to:fP.from})}if(fV>0||!fU.inclusiveRight&&!fV){fW.push({from:fP.to,to:fO.to})}fS.splice.apply(fS,fW);fQ+=fW.length-1}}return fS}function fD(fN){var fP=fN.markedSpans;if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.detachLine(fN)}fN.markedSpans=null}function cM(fN,fP){if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.attachLine(fN)}fN.markedSpans=fP}function w(fN){return fN.inclusiveLeft?-1:0}function bL(fN){return fN.inclusiveRight?1:0}function du(fQ,fO){var fS=fQ.lines.length-fO.lines.length;if(fS!=0){return fS}var fP=fQ.find(),fT=fO.find();var fN=b5(fP.from,fT.from)||w(fQ)-w(fO);if(fN){return -fN}var fR=b5(fP.to,fT.to)||bL(fQ)-bL(fO);if(fR){return fR}return fO.id-fQ.id}function aW(fO,fS){var fN=aX&&fO.markedSpans,fR;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(fQ.marker.collapsed&&(fS?fQ.from:fQ.to)==null&&(!fR||du(fR,fQ.marker)<0)){fR=fQ.marker}}}return fR}function er(fN){return aW(fN,true)}function d7(fN){return aW(fN,false)}function A(fV,fP,fT,fU,fR){var fY=eP(fV,fP);var fN=aX&&fY.markedSpans;if(fN){for(var fQ=0;fQ<fN.length;++fQ){var fO=fN[fQ];if(!fO.marker.collapsed){continue}var fX=fO.marker.find(0);var fW=b5(fX.from,fT)||w(fO.marker)-w(fR);var fS=b5(fX.to,fU)||bL(fO.marker)-bL(fR);if(fW>=0&&fS<=0||fW<=0&&fS>=0){continue}if(fW<=0&&(b5(fX.to,fT)||bL(fO.marker)-w(fR))>0||fW>=0&&(b5(fX.from,fU)||w(fO.marker)-bL(fR))<0){return true}}}}function z(fO){var fN;while(fN=er(fO)){fO=fN.find(-1,true).line}return fO}function i(fP){var fN,fO;while(fN=d7(fP)){fP=fN.find(1,true).line;(fO||(fO=[])).push(fP)}return fO}function aM(fQ,fO){var fN=eP(fQ,fO),fP=z(fN);if(fN==fP){return fO}return bC(fP)}function dG(fQ,fP){if(fP>fQ.lastLine()){return fP}var fO=eP(fQ,fP),fN;if(!e7(fQ,fO)){return fP}while(fN=d7(fO)){fO=fN.find(1,true).line}return bC(fO)+1}function e7(fR,fO){var fN=aX&&fO.markedSpans;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(!fQ.marker.collapsed){continue}if(fQ.from==null){return true}if(fQ.marker.widgetNode){continue}if(fQ.from==0&&fQ.marker.inclusiveLeft&&T(fR,fO,fQ)){return true}}}}function T(fS,fO,fQ){if(fQ.to==null){var fN=fQ.marker.find(1,true);return T(fS,fN.line,eJ(fN.line.markedSpans,fQ.marker))}if(fQ.marker.inclusiveRight&&fQ.to==fO.text.length){return true}for(var fR,fP=0;fP<fO.markedSpans.length;++fP){fR=fO.markedSpans[fP];if(fR.marker.collapsed&&!fR.marker.widgetNode&&fR.from==fQ.to&&(fR.to==null||fR.to!=fQ.from)&&(fR.marker.inclusiveLeft||fQ.marker.inclusiveRight)&&T(fS,fO,fR)){return true}}}var dh=I.LineWidget=function(fN,fQ,fO){if(fO){for(var fP in fO){if(fO.hasOwnProperty(fP)){this[fP]=fO[fP]}}}this.cm=fN;this.node=fQ};bo(dh);function dD(fN,fO,fP){if(bB(fO)<((fN.curOp&&fN.curOp.scrollTop)||fN.doc.scrollTop)){cy(fN,null,fP)}}dh.prototype.clear=function(){var fO=this.cm,fQ=this.line.widgets,fP=this.line,fS=bC(fP);if(fS==null||!fQ){return}for(var fR=0;fR<fQ.length;++fR){if(fQ[fR]==this){fQ.splice(fR--,1)}}if(!fQ.length){fP.widgets=null}var fN=cH(this);cz(fO,function(){dD(fO,fP,-fN);R(fO,fS,"widget");fA(fP,Math.max(0,fP.height-fN))})};dh.prototype.changed=function(){var fO=this.height,fN=this.cm,fP=this.line;this.height=null;var fQ=cH(this)-fO;if(!fQ){return}cz(fN,function(){fN.curOp.forceUpdate=true;dD(fN,fP,fQ);fA(fP,fP.height+fQ)})};function cH(fN){if(fN.height!=null){return fN.height}if(!fF(document.body,fN.node)){bG(fN.cm.display.measure,fw("div",[fN.node],null,"position: relative"))}return fN.height=fN.node.offsetHeight}function bw(fN,fR,fP,fO){var fQ=new dh(fN,fP,fO);if(fQ.noHScroll){fN.display.alignWidgets=true}eb(fN,fR,"widget",function(fT){var fU=fT.widgets||(fT.widgets=[]);if(fQ.insertAt==null){fU.push(fQ)}else{fU.splice(Math.min(fU.length-1,Math.max(0,fQ.insertAt)),0,fQ)}fQ.line=fT;if(!e7(fN.doc,fT)){var fS=bB(fT)<fN.doc.scrollTop;fA(fT,fT.height+cH(fQ));if(fS){cy(fN,null,fQ.height)}fN.curOp.forceUpdate=true}return true});return fQ}var fC=I.Line=function(fP,fO,fN){this.text=fP;cM(this,fO);this.height=fN?fN(this):1};bo(fC);fC.prototype.lineNo=function(){return bC(this)};function dZ(fO,fR,fP,fN){fO.text=fR;if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}if(fO.order!=null){fO.order=null}fD(fO);cM(fO,fP);var fQ=fN?fN(fO):1;if(fQ!=fO.height){fA(fO,fQ)}}function bq(fN){fN.parent=null;fD(fN)}function c2(fP,fO){if(fP){for(;;){var fN=fP.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fN){break}fP=fP.slice(0,fN.index)+fP.slice(fN.index+fN[0].length);var fQ=fN[1]?"bgClass":"textClass";if(fO[fQ]==null){fO[fQ]=fN[2]}else{if(!(new RegExp("(?:^|s)"+fN[2]+"(?:$|s)")).test(fO[fQ])){fO[fQ]+=" "+fN[2]}}}}return fP}function e1(fP,fO){if(fP.blankLine){return fP.blankLine(fO)}if(!fP.innerMode){return}var fN=I.innerMode(fP,fO);if(fN.mode.blankLine){return fN.mode.blankLine(fN.state)}}function ef(fR,fQ,fP){for(var fN=0;fN<10;fN++){var fO=fR.token(fQ,fP);if(fQ.pos>fQ.start){return fO}}throw new Error("Mode "+fR.name+" failed to advance stream.")}function x(fX,fZ,fS,fO,fT,fQ,fR){var fP=fS.flattenSpans;if(fP==null){fP=fX.options.flattenSpans}var fV=0,fU=null;var fY=new ew(fZ,fX.options.tabSize),fN;if(fZ==""){c2(e1(fS,fO),fQ)}while(!fY.eol()){if(fY.pos>fX.options.maxHighlightLength){fP=false;if(fR){dc(fX,fZ,fO,fY.pos)}fY.pos=fZ.length;fN=null}else{fN=c2(ef(fS,fY,fO),fQ)}if(fX.options.addModeClass){var f0=I.innerMode(fS,fO).mode.name;if(f0){fN="m-"+(fN?f0+" "+fN:f0)}}if(!fP||fU!=fN){if(fV<fY.start){fT(fY.start,fU)}fV=fY.start;fU=fN}fY.start=fY.pos}while(fV<fY.pos){var fW=Math.min(fY.pos,fV+50000);fT(fW,fU);fV=fW}}function fa(fU,fW,fN,fR){var fV=[fU.state.modeGen],fQ={};x(fU,fW.text,fU.doc.mode,fN,function(fX,fY){fV.push(fX,fY)},fQ,fR);for(var fO=0;fO<fU.state.overlays.length;++fO){var fS=fU.state.overlays[fO],fT=1,fP=0;x(fU,fW.text,fS.mode,true,function(fX,fZ){var f1=fT;while(fP<fX){var fY=fV[fT];if(fY>fX){fV.splice(fT,1,fX,fV[fT+1],fY)}fT+=2;fP=Math.min(fX,fY)}if(!fZ){return}if(fS.opaque){fV.splice(f1,fT-f1,fX,"cm-overlay "+fZ);fT=f1+2}else{for(;f1<fT;f1+=2){var f0=fV[f1+1];fV[f1+1]=(f0?f0+" ":"")+"cm-overlay "+fZ}}},fQ)}return{styles:fV,classes:fQ.bgClass||fQ.textClass?fQ:null}}function cQ(fO,fP){if(!fP.styles||fP.styles[0]!=fO.state.modeGen){var fN=fa(fO,fP,fP.stateAfter=dg(fO,bC(fP)));fP.styles=fN.styles;if(fN.classes){fP.styleClasses=fN.classes}else{if(fP.styleClasses){fP.styleClasses=null}}}return fP.styles}function dc(fN,fS,fP,fO){var fR=fN.doc.mode;var fQ=new ew(fS,fN.options.tabSize);fQ.start=fQ.pos=fO||0;if(fS==""){e1(fR,fP)}while(!fQ.eol()&&fQ.pos<=fN.options.maxHighlightLength){ef(fR,fQ,fP);fQ.start=fQ.pos}}var dz={},bQ={};function ez(fP,fO){if(!fP||/^\s*$/.test(fP)){return null}var fN=fO.addModeClass?bQ:dz;return fN[fP]||(fN[fP]=fP.replace(/\S+/g,"cm-$&"))}function ev(fO,fS){var fT=fw("span",null,null,cJ?"padding-right: .1px":null);var fQ={pre:fw("pre",[fT]),content:fT,col:0,pos:0,cm:fO};fS.measure={};for(var fR=0;fR<=(fS.rest?fS.rest.length:0);fR++){var fP=fR?fS.rest[fR-1]:fS.line,fN;fQ.pos=0;fQ.addToken=u;if((dn||cJ)&&fO.getOption("lineWrapping")){fQ.addToken=ff(fQ.addToken)}if(bD(fO.display.measure)&&(fN=a(fP))){fQ.addToken=U(fQ.addToken,fN)}fQ.map=[];bf(fP,fQ,cQ(fO,fP));if(fP.styleClasses){if(fP.styleClasses.bgClass){fQ.bgClass=fr(fP.styleClasses.bgClass,fQ.bgClass||"")}if(fP.styleClasses.textClass){fQ.textClass=fr(fP.styleClasses.textClass,fQ.textClass||"")}}if(fQ.map.length==0){fQ.map.push(0,0,fQ.content.appendChild(bd(fO.display.measure)))}if(fR==0){fS.measure.map=fQ.map;fS.measure.cache={}}else{(fS.measure.maps||(fS.measure.maps=[])).push(fQ.map);(fS.measure.caches||(fS.measure.caches=[])).push({})}}az(fO,"renderLine",fO,fS.line,fQ.pre);return fQ}function eN(fO){var fN=fw("span","\u2022","cm-invalidchar");fN.title="\\u"+fO.charCodeAt(0).toString(16);return fN}function u(fS,f2,fN,fQ,f3,f1){if(!f2){return}var fX=fS.cm.options.specialChars,fW=false;if(!fX.test(f2)){fS.col+=f2.length;var fV=document.createTextNode(f2);fS.map.push(fS.pos,fS.pos+f2.length,fV);if(bY){fW=true}fS.pos+=f2.length}else{var fV=document.createDocumentFragment(),fZ=0;while(true){fX.lastIndex=fZ;var fO=fX.exec(f2);var fU=fO?fO.index-fZ:f2.length-fZ;if(fU){var fR=document.createTextNode(f2.slice(fZ,fZ+fU));if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.map.push(fS.pos,fS.pos+fU,fR);fS.col+=fU;fS.pos+=fU}if(!fO){break}fZ+=fU+1;if(fO[0]=="\t"){var fT=fS.cm.options.tabSize,fY=fT-fS.col%fT;var fR=fV.appendChild(fw("span",cf(fY),"cm-tab"));fS.col+=fY}else{var fR=fS.cm.options.specialCharPlaceholder(fO[0]);if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.col+=1}fS.map.push(fS.pos,fS.pos+1,fR);fS.pos++}}if(fN||fQ||f3||fW){var f0=fN||"";if(fQ){f0+=fQ}if(f3){f0+=f3}var fP=fw("span",[fV],f0);if(f1){fP.title=f1}return fS.content.appendChild(fP)}fS.content.appendChild(fV)}function ff(fN){function fO(fP){var fQ=" ";for(var fR=0;fR<fP.length-2;++fR){fQ+=fR%2?" ":"\u00a0"}fQ+=" ";return fQ}return function(fQ,fU,fR,fP,fT,fS){fN(fQ,fU.replace(/ {3,}/g,fO),fR,fP,fT,fS)}}function U(fO,fN){return function(fV,fX,fP,fT,fY,fW){fP=fP?fP+" cm-force-border":"cm-force-border";var fQ=fV.pos,fS=fQ+fX.length;for(;;){for(var fU=0;fU<fN.length;fU++){var fR=fN[fU];if(fR.to>fQ&&fR.from<=fQ){break}}if(fR.to>=fS){return fO(fV,fX,fP,fT,fY,fW)}fO(fV,fX.slice(0,fR.to-fQ),fP,fT,null,fW);fT=null;fX=fX.slice(fR.to-fQ);fQ=fR.to}}}function aa(fO,fQ,fN,fP){var fR=!fP&&fN.widgetNode;if(fR){fO.map.push(fO.pos,fO.pos+fQ,fR);fO.content.appendChild(fR)}fO.pos+=fQ}function bf(fW,f2,fV){var fS=fW.markedSpans,fU=fW.text,f0=0;if(!fS){for(var f5=1;f5<fV.length;f5+=2){f2.addToken(f2,fU.slice(f0,f0=fV[f5]),ez(fV[f5+1],f2.cm.options))}return}var f6=fU.length,fR=0,f5=1,fY="",f7;var f9=0,fN,f8,fZ,ga,fP;for(;;){if(f9==fR){fN=f8=fZ=ga="";fP=null;f9=Infinity;var fT=[];for(var f3=0;f3<fS.length;++f3){var f4=fS[f3],f1=f4.marker;if(f4.from<=fR&&(f4.to==null||f4.to>fR)){if(f4.to!=null&&f9>f4.to){f9=f4.to;f8=""}if(f1.className){fN+=" "+f1.className}if(f1.startStyle&&f4.from==fR){fZ+=" "+f1.startStyle}if(f1.endStyle&&f4.to==f9){f8+=" "+f1.endStyle}if(f1.title&&!ga){ga=f1.title}if(f1.collapsed&&(!fP||du(fP.marker,f1)<0)){fP=f4}}else{if(f4.from>fR&&f9>f4.from){f9=f4.from}}if(f1.type=="bookmark"&&f4.from==fR&&f1.widgetNode){fT.push(f1)}}if(fP&&(fP.from||0)==fR){aa(f2,(fP.to==null?f6+1:fP.to)-fR,fP.marker,fP.from==null);if(fP.to==null){return}}if(!fP&&fT.length){for(var f3=0;f3<fT.length;++f3){aa(f2,0,fT[f3])}}}if(fR>=f6){break}var fX=Math.min(f6,f9);while(true){if(fY){var fO=fR+fY.length;if(!fP){var fQ=fO>fX?fY.slice(0,fX-fR):fY;f2.addToken(f2,fQ,f7?f7+fN:fN,fZ,fR+fQ.length==f9?f8:"",ga)}if(fO>=fX){fY=fY.slice(fX-fR);fR=fX;break}fR=fO;fZ=""}fY=fU.slice(f0,f0=fV[f5++]);f7=ez(fV[f5++],f2.cm.options)}}}function dw(fN,fO){return fO.from.ch==0&&fO.to.ch==0&&fh(fO.text)==""&&(!fN.cm||fN.cm.options.wholeLineUpdateBefore)}function e9(f0,fV,fN,fR){function f1(f3){return fN?fN[f3]:null}function fO(f3,f5,f4){dZ(f3,f5,f4,fR);ac(f3,"change",f3,fV)}var fY=fV.from,fZ=fV.to,f2=fV.text;var fW=eP(f0,fY.line),fX=eP(f0,fZ.line);var fU=fh(f2),fQ=f1(f2.length-1),fT=fZ.line-fY.line;if(dw(f0,fV)){for(var fP=0,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fO(fX,fX.text,fQ);if(fT){f0.remove(fY.line,fT)}if(fS.length){f0.insert(fY.line,fS)}}else{if(fW==fX){if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+fU+fW.text.slice(fZ.ch),fQ)}else{for(var fS=[],fP=1;fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fS.push(new fC(fU+fW.text.slice(fZ.ch),fQ,fR));fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));f0.insert(fY.line+1,fS)}}else{if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+f2[0]+fX.text.slice(fZ.ch),f1(0));f0.remove(fY.line+1,fT)}else{fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));fO(fX,fU+fX.text.slice(fZ.ch),fQ);for(var fP=1,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}if(fT>1){f0.remove(fY.line+1,fT-1)}f0.insert(fY.line+1,fS)}}}ac(f0,"change",f0,fV)}function eC(fO){this.lines=fO;this.parent=null;for(var fP=0,fN=0;fP<fO.length;++fP){fO[fP].parent=this;fN+=fO[fP].height}this.height=fN}eC.prototype={chunkSize:function(){return this.lines.length},removeInner:function(fN,fR){for(var fP=fN,fQ=fN+fR;fP<fQ;++fP){var fO=this.lines[fP];this.height-=fO.height;bq(fO);ac(fO,"delete")}this.lines.splice(fN,fR)},collapse:function(fN){fN.push.apply(fN,this.lines)},insertInner:function(fO,fP,fN){this.height+=fN;this.lines=this.lines.slice(0,fO).concat(fP).concat(this.lines.slice(fO));for(var fQ=0;fQ<fP.length;++fQ){fP[fQ].parent=this}},iterN:function(fN,fQ,fP){for(var fO=fN+fQ;fN<fO;++fN){if(fP(this.lines[fN])){return true}}}};function e8(fQ){this.children=fQ;var fP=0,fN=0;for(var fO=0;fO<fQ.length;++fO){var fR=fQ[fO];fP+=fR.chunkSize();fN+=fR.height;fR.parent=this}this.size=fP;this.height=fN;this.parent=null}e8.prototype={chunkSize:function(){return this.size},removeInner:function(fN,fU){this.size-=fU;for(var fP=0;fP<this.children.length;++fP){var fT=this.children[fP],fR=fT.chunkSize();if(fN<fR){var fQ=Math.min(fU,fR-fN),fS=fT.height;fT.removeInner(fN,fQ);this.height-=fS-fT.height;if(fR==fQ){this.children.splice(fP--,1);fT.parent=null}if((fU-=fQ)==0){break}fN=0}else{fN-=fR}}if(this.size-fU<25&&(this.children.length>1||!(this.children[0] instanceof eC))){var fO=[];this.collapse(fO);this.children=[new eC(fO)];this.children[0].parent=this}},collapse:function(fN){for(var fO=0;fO<this.children.length;++fO){this.children[fO].collapse(fN)}},insertInner:function(fO,fP,fN){this.size+=fP.length;this.height+=fN;for(var fS=0;fS<this.children.length;++fS){var fU=this.children[fS],fT=fU.chunkSize();if(fO<=fT){fU.insertInner(fO,fP,fN);if(fU.lines&&fU.lines.length>50){while(fU.lines.length>50){var fR=fU.lines.splice(fU.lines.length-25,25);var fQ=new eC(fR);fU.height-=fQ.height;this.children.splice(fS+1,0,fQ);fQ.parent=this}this.maybeSpill()}break}fO-=fT}},maybeSpill:function(){if(this.children.length<=10){return}var fQ=this;do{var fO=fQ.children.splice(fQ.children.length-5,5);var fP=new e8(fO);if(!fQ.parent){var fR=new e8(fQ.children);fR.parent=fQ;fQ.children=[fR,fP];fQ=fR}else{fQ.size-=fP.size;fQ.height-=fP.height;var fN=c1(fQ.parent.children,fQ);fQ.parent.children.splice(fN+1,0,fP)}fP.parent=fQ.parent}while(fQ.children.length>10);fQ.parent.maybeSpill()},iterN:function(fN,fT,fS){for(var fO=0;fO<this.children.length;++fO){var fR=this.children[fO],fQ=fR.chunkSize();if(fN<fQ){var fP=Math.min(fT,fQ-fN);if(fR.iterN(fN,fP,fS)){return true}if((fT-=fP)==0){break}fN=0}else{fN-=fQ}}}};var cg=0;var ao=I.Doc=function(fP,fO,fN){if(!(this instanceof ao)){return new ao(fP,fO,fN)}if(fN==null){fN=0}e8.call(this,[new eC([new fC("",null)])]);this.first=fN;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=fN;var fQ=W(fN,0);this.sel=eu(fQ);this.history=new fs(null);this.id=++cg;this.modeOption=fO;if(typeof fP=="string"){fP=aQ(fP)}e9(this,{from:fQ,to:fQ,text:fP});bJ(this,eu(fQ),Y)};ao.prototype=ca(e8.prototype,{constructor:ao,iter:function(fP,fO,fN){if(fN){this.iterN(fP-this.first,fO-fP,fN)}else{this.iterN(this.first,this.first+this.size,fP)}},insert:function(fO,fP){var fN=0;for(var fQ=0;fQ<fP.length;++fQ){fN+=fP[fQ].height}this.insertInner(fO-this.first,fP,fN)},remove:function(fN,fO){this.removeInner(fN-this.first,fO)},getValue:function(fO){var fN=aS(this,this.first,this.first+this.size);if(fO===false){return fN}return fN.join(fO||"\n")},setValue:cs(function(fO){var fP=W(this.first,0),fN=this.first+this.size-1;a5(this,{from:fP,to:W(fN,eP(this,fN).text.length),text:aQ(fO),origin:"setValue"},true);bJ(this,eu(fP))}),replaceRange:function(fO,fQ,fP,fN){fQ=fj(this,fQ);fP=fP?fj(this,fP):fQ;aR(this,fO,fQ,fP,fN)},getRange:function(fQ,fP,fO){var fN=fy(this,fj(this,fQ),fj(this,fP));if(fO===false){return fN}return fN.join(fO||"\n")},getLine:function(fO){var fN=this.getLineHandle(fO);return fN&&fN.text},getLineHandle:function(fN){if(bW(this,fN)){return eP(this,fN)}},getLineNumber:function(fN){return bC(fN)},getLineHandleVisualStart:function(fN){if(typeof fN=="number"){fN=eP(this,fN)}return z(fN)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(fN){return fj(this,fN)},getCursor:function(fP){var fN=this.sel.primary(),fO;if(fP==null||fP=="head"){fO=fN.head}else{if(fP=="anchor"){fO=fN.anchor}else{if(fP=="end"||fP=="to"||fP===false){fO=fN.to()}else{fO=fN.from()}}}return fO},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cs(function(fN,fP,fO){G(this,fj(this,typeof fN=="number"?W(fN,fP||0):fN),null,fO)}),setSelection:cs(function(fO,fP,fN){G(this,fj(this,fO),fj(this,fP||fO),fN)}),extendSelection:cs(function(fP,fN,fO){ft(this,fj(this,fP),fN&&fj(this,fN),fO)}),extendSelections:cs(function(fO,fN){at(this,dC(this,fO,fN))}),extendSelectionsBy:cs(function(fO,fN){at(this,bH(this.sel.ranges,fO),fN)}),setSelections:cs(function(fN,fR,fP){if(!fN.length){return}for(var fQ=0,fO=[];fQ<fN.length;fQ++){fO[fQ]=new dB(fj(this,fN[fQ].anchor),fj(this,fN[fQ].head))}if(fR==null){fR=Math.min(fN.length-1,this.sel.primIndex)}bJ(this,cm(fO,fR),fP)}),addSelection:cs(function(fP,fQ,fO){var fN=this.sel.ranges.slice(0);fN.push(new dB(fj(this,fP),fj(this,fQ||fP)));bJ(this,cm(fN,fN.length-1),fO)}),getSelection:function(fR){var fO=this.sel.ranges,fN;for(var fP=0;fP<fO.length;fP++){var fQ=fy(this,fO[fP].from(),fO[fP].to());fN=fN?fN.concat(fQ):fQ}if(fR===false){return fN}else{return fN.join(fR||"\n")}},getSelections:function(fR){var fQ=[],fN=this.sel.ranges;for(var fO=0;fO<fN.length;fO++){var fP=fy(this,fN[fO].from(),fN[fO].to());if(fR!==false){fP=fP.join(fR||"\n")}fQ[fO]=fP}return fQ},replaceSelection:function(fP,fR,fN){var fQ=[];for(var fO=0;fO<this.sel.ranges.length;fO++){fQ[fO]=fP}this.replaceSelections(fQ,fR,fN||"+input")},replaceSelections:cs(function(fS,fU,fP){var fR=[],fT=this.sel;for(var fQ=0;fQ<fT.ranges.length;fQ++){var fO=fT.ranges[fQ];fR[fQ]={from:fO.from(),to:fO.to(),text:aQ(fS[fQ]),origin:fP}}var fN=fU&&fU!="end"&&ad(this,fR,fU);for(var fQ=fR.length-1;fQ>=0;fQ--){a5(this,fR[fQ])}if(fN){eH(this,fN)}else{if(this.cm){fg(this.cm)}}}),undo:cs(function(){bV(this,"undo")}),redo:cs(function(){bV(this,"redo")}),undoSelection:cs(function(){bV(this,"undo",true)}),redoSelection:cs(function(){bV(this,"redo",true)}),setExtending:function(fN){this.extend=fN},getExtending:function(){return this.extend},historySize:function(){var fQ=this.history,fN=0,fP=0;for(var fO=0;fO<fQ.done.length;fO++){if(!fQ.done[fO].ranges){++fN}}for(var fO=0;fO<fQ.undone.length;fO++){if(!fQ.undone[fO].ranges){++fP}}return{undo:fN,redo:fP}},clearHistory:function(){this.history=new fs(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(fN){if(fN){this.history.lastOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(fN){return this.history.generation==(fN||this.cleanGeneration)},getHistory:function(){return{done:bE(this.history.done),undone:bE(this.history.undone)}},setHistory:function(fO){var fN=this.history=new fs(this.history.maxGeneration);fN.done=bE(fO.done.slice(0),null,true);fN.undone=bE(fO.undone.slice(0),null,true)},markText:function(fP,fO,fN){return ej(this,fj(this,fP),fj(this,fO),fN,"range")},setBookmark:function(fP,fN){var fO={replacedWith:fN&&(fN.nodeType==null?fN.widget:fN),insertLeft:fN&&fN.insertLeft,clearWhenEmpty:false,shared:fN&&fN.shared};fP=fj(this,fP);return ej(this,fP,fP,fO,"bookmark")},findMarksAt:function(fR){fR=fj(this,fR);var fQ=[],fO=eP(this,fR.line).markedSpans;if(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if((fP.from==null||fP.from<=fR.ch)&&(fP.to==null||fP.to>=fR.ch)){fQ.push(fP.marker.parent||fP.marker)}}}return fQ},findMarks:function(fR,fQ,fN){fR=fj(this,fR);fQ=fj(this,fQ);var fO=[],fP=fR.line;this.iter(fR.line,fQ.line+1,function(fS){var fU=fS.markedSpans;if(fU){for(var fT=0;fT<fU.length;fT++){var fV=fU[fT];if(!(fP==fR.line&&fR.ch>fV.to||fV.from==null&&fP!=fR.line||fP==fQ.line&&fV.from>fQ.ch)&&(!fN||fN(fV.marker))){fO.push(fV.marker.parent||fV.marker)}}}++fP});return fO},getAllMarks:function(){var fN=[];this.iter(function(fP){var fO=fP.markedSpans;if(fO){for(var fQ=0;fQ<fO.length;++fQ){if(fO[fQ].from!=null){fN.push(fO[fQ].marker)}}}});return fN},posFromIndex:function(fO){var fN,fP=this.first;this.iter(function(fQ){var fR=fQ.text.length+1;if(fR>fO){fN=fO;return true}fO-=fR;++fP});return fj(this,W(fP,fN))},indexFromPos:function(fO){fO=fj(this,fO);var fN=fO.ch;if(fO.line<this.first||fO.ch<0){return 0}this.iter(this.first,fO.line,function(fP){fN+=fP.text.length+1});return fN},copy:function(fN){var fO=new ao(aS(this,this.first,this.first+this.size),this.modeOption,this.first);fO.scrollTop=this.scrollTop;fO.scrollLeft=this.scrollLeft;fO.sel=this.sel;fO.extend=false;if(fN){fO.history.undoDepth=this.history.undoDepth;fO.setHistory(this.getHistory())}return fO},linkedDoc:function(fN){if(!fN){fN={}}var fQ=this.first,fP=this.first+this.size;if(fN.from!=null&&fN.from>fQ){fQ=fN.from}if(fN.to!=null&&fN.to<fP){fP=fN.to}var fO=new ao(aS(this,fQ,fP),fN.mode||this.modeOption,fQ);if(fN.sharedHist){fO.history=this.history}(this.linked||(this.linked=[])).push({doc:fO,sharedHist:fN.sharedHist});fO.linked=[{doc:this,isParent:true,sharedHist:fN.sharedHist}];dk(fO,es(this));return fO},unlinkDoc:function(fO){if(fO instanceof I){fO=fO.doc}if(this.linked){for(var fP=0;fP<this.linked.length;++fP){var fQ=this.linked[fP];if(fQ.doc!=fO){continue}this.linked.splice(fP,1);fO.unlinkDoc(this);d0(es(this));break}}if(fO.history==this.history){var fN=[fO.id];dK(fO,function(fR){fN.push(fR.id)},true);fO.history=new fs(null);fO.history.done=bE(this.history.done,fN);fO.history.undone=bE(this.history.undone,fN)}},iterLinkedDocs:function(fN){dK(this,fN)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});ao.prototype.eachLine=ao.prototype.iter;var e="iter insert remove copy getEditor".split(" ");for(var bz in ao.prototype){if(ao.prototype.hasOwnProperty(bz)&&c1(e,bz)<0){I.prototype[bz]=(function(fN){return function(){return fN.apply(this.doc,arguments)}})(ao.prototype[bz])}}bo(ao);function dK(fQ,fP,fO){function fN(fW,fU,fS){if(fW.linked){for(var fT=0;fT<fW.linked.length;++fT){var fR=fW.linked[fT];if(fR.doc==fU){continue}var fV=fS&&fR.sharedHist;if(fO&&!fV){continue}fP(fR.doc,fV);fN(fR.doc,fW,fV)}}}fN(fQ,null,true)}function dN(fN,fO){if(fO.cm){throw new Error("This document is already in use.")}fN.doc=fO;fO.cm=fN;X(fN);bh(fN);if(!fN.options.lineWrapping){h(fN)}fN.options.mode=fO.modeOption;af(fN)}function eP(fQ,fS){fS-=fQ.first;if(fS<0||fS>=fQ.size){throw new Error("There is no line "+(fS+fQ.first)+" in the document.")}for(var fN=fQ;!fN.lines;){for(var fO=0;;++fO){var fR=fN.children[fO],fP=fR.chunkSize();if(fS<fP){fN=fR;break}fS-=fP}}return fN.lines[fS]}function fy(fP,fR,fN){var fO=[],fQ=fR.line;fP.iter(fR.line,fN.line+1,function(fS){var fT=fS.text;if(fQ==fN.line){fT=fT.slice(0,fN.ch)}if(fQ==fR.line){fT=fT.slice(fR.ch)}fO.push(fT);++fQ});return fO}function aS(fO,fQ,fP){var fN=[];fO.iter(fQ,fP,function(fR){fN.push(fR.text)});return fN}function fA(fO,fN){var fP=fN-fO.height;if(fP){for(var fQ=fO;fQ;fQ=fQ.parent){fQ.height+=fP}}}function bC(fN){if(fN.parent==null){return null}var fR=fN.parent,fQ=c1(fR.lines,fN);for(var fO=fR.parent;fO;fR=fO,fO=fO.parent){for(var fP=0;;++fP){if(fO.children[fP]==fR){break}fQ+=fO.children[fP].chunkSize()}}return fQ+fR.first}function bv(fP,fS){var fU=fP.first;outer:do{for(var fQ=0;fQ<fP.children.length;++fQ){var fT=fP.children[fQ],fR=fT.height;if(fS<fR){fP=fT;continue outer}fS-=fR;fU+=fT.chunkSize()}return fU}while(!fP.lines);for(var fQ=0;fQ<fP.lines.length;++fQ){var fO=fP.lines[fQ],fN=fO.height;if(fS<fN){break}fS-=fN}return fU+fQ}function bB(fP){fP=z(fP);var fR=0,fO=fP.parent;for(var fQ=0;fQ<fO.lines.length;++fQ){var fN=fO.lines[fQ];if(fN==fP){break}else{fR+=fN.height}}for(var fS=fO.parent;fS;fO=fS,fS=fO.parent){for(var fQ=0;fQ<fS.children.length;++fQ){var fT=fS.children[fQ];if(fT==fO){break}else{fR+=fT.height}}}return fR}function a(fO){var fN=fO.order;if(fN==null){fN=fO.order=a6(fO.text)}return fN}function fs(fN){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=fN||1}function da(fN,fP){var fO={from:b9(fP.from),to:cG(fP),text:fy(fN,fP.from,fP.to)};bN(fN,fO,fP.from.line,fP.to.line+1);dK(fN,function(fQ){bN(fQ,fO,fP.from.line,fP.to.line+1)},true);return fO}function fc(fO){while(fO.length){var fN=fh(fO);if(fN.ranges){fO.pop()}else{break}}}function eq(fO,fN){if(fN){fc(fO.done);return fh(fO.done)}else{if(fO.done.length&&!fh(fO.done).ranges){return fh(fO.done)}else{if(fO.done.length>1&&!fO.done[fO.done.length-2].ranges){fO.done.pop();return fh(fO.done)}}}}function fm(fT,fR,fN,fQ){var fP=fT.history;fP.undone.length=0;var fO=+new Date,fU;if((fP.lastOp==fQ||fP.lastOrigin==fR.origin&&fR.origin&&((fR.origin.charAt(0)=="+"&&fT.cm&&fP.lastModTime>fO-fT.cm.options.historyEventDelay)||fR.origin.charAt(0)=="*"))&&(fU=eq(fP,fP.lastOp==fQ))){var fV=fh(fU.changes);if(b5(fR.from,fR.to)==0&&b5(fR.from,fV.to)==0){fV.to=cG(fR)}else{fU.changes.push(da(fT,fR))}}else{var fS=fh(fP.done);if(!fS||!fS.ranges){cA(fT.sel,fP.done)}fU={changes:[da(fT,fR)],generation:fP.generation};fP.done.push(fU);while(fP.done.length>fP.undoDepth){fP.done.shift();if(!fP.done[0].ranges){fP.done.shift()}}}fP.done.push(fN);fP.generation=++fP.maxGeneration;fP.lastModTime=fP.lastSelTime=fO;fP.lastOp=fQ;fP.lastOrigin=fP.lastSelOrigin=fR.origin;if(!fV){az(fT,"historyAdded")}}function bp(fR,fN,fP,fQ){var fO=fN.charAt(0);return fO=="*"||fO=="+"&&fP.ranges.length==fQ.ranges.length&&fP.somethingSelected()==fQ.somethingSelected()&&new Date-fR.history.lastSelTime<=(fR.cm?fR.cm.options.historyEventDelay:500)}function fG(fS,fQ,fN,fP){var fR=fS.history,fO=fP&&fP.origin;if(fN==fR.lastOp||(fO&&fR.lastSelOrigin==fO&&(fR.lastModTime==fR.lastSelTime&&fR.lastOrigin==fO||bp(fS,fO,fh(fR.done),fQ)))){fR.done[fR.done.length-1]=fQ}else{cA(fQ,fR.done)}fR.lastSelTime=+new Date;fR.lastSelOrigin=fO;fR.lastOp=fN;if(fP&&fP.clearRedo!==false){fc(fR.undone)}}function cA(fO,fN){var fP=fh(fN);if(!(fP&&fP.ranges&&fP.equals(fO))){fN.push(fO)}}function bN(fO,fS,fR,fQ){var fN=fS["spans_"+fO.id],fP=0;fO.iter(Math.max(fO.first,fR),Math.min(fO.first+fO.size,fQ),function(fT){if(fT.markedSpans){(fN||(fN=fS["spans_"+fO.id]={}))[fP]=fT.markedSpans}++fP})}function bb(fP){if(!fP){return null}for(var fO=0,fN;fO<fP.length;++fO){if(fP[fO].marker.explicitlyCleared){if(!fN){fN=fP.slice(0,fO)}}else{if(fN){fN.push(fP[fO])}}}return !fN?fP:fN.length?fN:null}function bS(fQ,fR){var fP=fR["spans_"+fQ.id];if(!fP){return null}for(var fO=0,fN=[];fO<fR.text.length;++fO){fN.push(bb(fP[fO]))}return fN}function bE(fY,fQ,fX){for(var fT=0,fO=[];fT<fY.length;++fT){var fP=fY[fT];if(fP.ranges){fO.push(fX?fx.prototype.deepCopy.call(fP):fP);continue}var fV=fP.changes,fW=[];fO.push({changes:fW});for(var fS=0;fS<fV.length;++fS){var fU=fV[fS],fR;fW.push({from:fU.from,to:fU.to,text:fU.text});if(fQ){for(var fN in fU){if(fR=fN.match(/^spans_(\d+)$/)){if(c1(fQ,Number(fR[1]))>-1){fh(fW)[fN]=fU[fN];delete fU[fN]}}}}}}return fO}function J(fQ,fP,fO,fN){if(fO<fQ.line){fQ.line+=fN}else{if(fP<fQ.line){fQ.line=fP;fQ.ch=0}}}function eR(fQ,fS,fT,fU){for(var fP=0;fP<fQ.length;++fP){var fN=fQ[fP],fR=true;if(fN.ranges){if(!fN.copied){fN=fQ[fP]=fN.deepCopy();fN.copied=true}for(var fO=0;fO<fN.ranges.length;fO++){J(fN.ranges[fO].anchor,fS,fT,fU);J(fN.ranges[fO].head,fS,fT,fU)}continue}for(var fO=0;fO<fN.changes.length;++fO){var fV=fN.changes[fO];if(fT<fV.from.line){fV.from=W(fV.from.line+fU,fV.from.ch);fV.to=W(fV.to.line+fU,fV.to.ch)}else{if(fS<=fV.to.line){fR=false;break}}}if(!fR){fQ.splice(0,fP+1);fP=0}}}function dj(fO,fR){var fQ=fR.from.line,fP=fR.to.line,fN=fR.text.length-(fP-fQ)-1;eR(fO.done,fQ,fP,fN);eR(fO.undone,fQ,fP,fN)}var cu=I.e_preventDefault=function(fN){if(fN.preventDefault){fN.preventDefault()}else{fN.returnValue=false}};var c6=I.e_stopPropagation=function(fN){if(fN.stopPropagation){fN.stopPropagation()}else{fN.cancelBubble=true}};function bA(fN){return fN.defaultPrevented!=null?fN.defaultPrevented:fN.returnValue==false}var d3=I.e_stop=function(fN){cu(fN);c6(fN)};function L(fN){return fN.target||fN.srcElement}function fn(fO){var fN=fO.which;if(fN==null){if(fO.button&1){fN=1}else{if(fO.button&2){fN=3}else{if(fO.button&4){fN=2}}}}if(bU&&fO.ctrlKey&&fN==1){fN=3}return fN}var bM=I.on=function(fQ,fO,fP){if(fQ.addEventListener){fQ.addEventListener(fO,fP,false)}else{if(fQ.attachEvent){fQ.attachEvent("on"+fO,fP)}else{var fR=fQ._handlers||(fQ._handlers={});var fN=fR[fO]||(fR[fO]=[]);fN.push(fP)}}};var dP=I.off=function(fR,fP,fQ){if(fR.removeEventListener){fR.removeEventListener(fP,fQ,false)}else{if(fR.detachEvent){fR.detachEvent("on"+fP,fQ)}else{var fN=fR._handlers&&fR._handlers[fP];if(!fN){return}for(var fO=0;fO<fN.length;++fO){if(fN[fO]==fQ){fN.splice(fO,1);break}}}}};var az=I.signal=function(fR,fQ){var fN=fR._handlers&&fR._handlers[fQ];if(!fN){return}var fO=Array.prototype.slice.call(arguments,2);for(var fP=0;fP<fN.length;++fP){fN[fP].apply(null,fO)}};var be,ch=0;function ac(fS,fR){var fN=fS._handlers&&fS._handlers[fR];if(!fN){return}var fP=Array.prototype.slice.call(arguments,2);if(!be){++ch;be=[];setTimeout(ec,0)}function fO(fT){return function(){fT.apply(null,fP)}}for(var fQ=0;fQ<fN.length;++fQ){be.push(fO(fN[fQ]))}}function ec(){--ch;var fN=be;be=null;for(var fO=0;fO<fN.length;++fO){fN[fO]()}}function aI(fN,fP,fO){az(fN,fO||fP.type,fN,fP);return bA(fP)||fP.codemirrorIgnore}function V(fO){var fN=fO._handlers&&fO._handlers.cursorActivity;if(!fN){return}var fQ=fO.curOp.cursorActivityHandlers||(fO.curOp.cursorActivityHandlers=[]);for(var fP=0;fP<fN.length;++fP){if(c1(fQ,fN[fP])==-1){fQ.push(fN[fP])}}}function eS(fP,fO){var fN=fP._handlers&&fP._handlers[fO];return fN&&fN.length>0}function bo(fN){fN.prototype.on=function(fO,fP){bM(this,fO,fP)};fN.prototype.off=function(fO,fP){dP(this,fO,fP)}}var ba=30;var bZ=I.Pass={toString:function(){return"CodeMirror.Pass"}};var Y={scroll:false},M={origin:"*mouse"},cF={origin:"+move"};function fM(){this.id=null}fM.prototype.set=function(fN,fO){clearTimeout(this.id);this.id=setTimeout(fO,fN)};var bI=I.countColumn=function(fQ,fO,fS,fT,fP){if(fO==null){fO=fQ.search(/[^\s\u00a0]/);if(fO==-1){fO=fQ.length}}for(var fR=fT||0,fU=fP||0;;){var fN=fQ.indexOf("\t",fR);if(fN<0||fN>=fO){return fU+(fO-fR)}fU+=fN-fR;fU+=fS-(fU%fS);fR=fN+1}};function d2(fR,fQ,fS){for(var fT=0,fP=0;;){var fO=fR.indexOf("\t",fT);if(fO==-1){fO=fR.length}var fN=fO-fT;if(fO==fR.length||fP+fN>=fQ){return fT+Math.min(fN,fQ-fP)}fP+=fO-fT;fP+=fS-(fP%fS);fT=fO+1;if(fP>=fQ){return fT}}}var aP=[""];function cf(fN){while(aP.length<=fN){aP.push(fh(aP)+" ")}return aP[fN]}function fh(fN){return fN[fN.length-1]}var dq=function(fN){fN.select()};if(eD){dq=function(fN){fN.selectionStart=0;fN.selectionEnd=fN.value.length}}else{if(dn){dq=function(fO){try{fO.select()}catch(fN){}}}}function c1(fP,fN){for(var fO=0;fO<fP.length;++fO){if(fP[fO]==fN){return fO}}return -1}if([].indexOf){c1=function(fO,fN){return fO.indexOf(fN)}}function bH(fQ,fP){var fN=[];for(var fO=0;fO<fQ.length;fO++){fN[fO]=fP(fQ[fO],fO)}return fN}if([].map){bH=function(fO,fN){return fO.map(fN)}}function ca(fQ,fN){var fP;if(Object.create){fP=Object.create(fQ)}else{var fO=function(){};fO.prototype=fQ;fP=new fO()}if(fN){aE(fN,fP)}return fP}function aE(fP,fO,fN){if(!fO){fO={}}for(var fQ in fP){if(fP.hasOwnProperty(fQ)&&(fN!==false||!fO.hasOwnProperty(fQ))){fO[fQ]=fP[fQ]}}return fO}function cl(fO){var fN=Array.prototype.slice.call(arguments,1);return function(){return fO.apply(null,fN)}}var a2=/[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;var cp=I.isWordChar=function(fN){return/\w/.test(fN)||fN>"\x80"&&(fN.toUpperCase()!=fN.toLowerCase()||a2.test(fN))};function ex(fN){for(var fO in fN){if(fN.hasOwnProperty(fO)&&fN[fO]){return false}}return true}var en=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function e0(fN){return fN.charCodeAt(0)>=768&&en.test(fN)}function fw(fN,fR,fQ,fP){var fS=document.createElement(fN);if(fQ){fS.className=fQ}if(fP){fS.style.cssText=fP}if(typeof fR=="string"){fS.appendChild(document.createTextNode(fR))}else{if(fR){for(var fO=0;fO<fR.length;++fO){fS.appendChild(fR[fO])}}}return fS}var cb;if(document.createRange){cb=function(fP,fQ,fN){var fO=document.createRange();fO.setEnd(fP,fN);fO.setStart(fP,fQ);return fO}}else{cb=function(fP,fQ,fN){var fO=document.body.createTextRange();fO.moveToElementText(fP.parentNode);fO.collapse(true);fO.moveEnd("character",fN);fO.moveStart("character",fQ);return fO}}function dE(fO){for(var fN=fO.childNodes.length;fN>0;--fN){fO.removeChild(fO.firstChild)}return fO}function bG(fN,fO){return dE(fN).appendChild(fO)}function fF(fN,fO){if(fN.contains){return fN.contains(fO)}while(fO=fO.parentNode){if(fO==fN){return true}}}function ds(){return document.activeElement}if(eo){ds=function(){try{return document.activeElement}catch(fN){return document.body}}}function S(fN){return new RegExp("\\b"+fN+"\\b\\s*")}function g(fO,fN){var fP=S(fN);if(fP.test(fO.className)){fO.className=fO.className.replace(fP,"")}}function fb(fO,fN){if(!S(fN).test(fO.className)){fO.className+=" "+fN}}function fr(fP,fN){var fO=fP.split(" ");for(var fQ=0;fQ<fO.length;fQ++){if(fO[fQ]&&!S(fO[fQ]).test(fN)){fN+=" "+fO[fQ]}}return fN}function aw(fQ){if(!document.body.getElementsByClassName){return}var fP=document.body.getElementsByClassName("CodeMirror");for(var fO=0;fO<fP.length;fO++){var fN=fP[fO].CodeMirror;if(fN){fQ(fN)}}}var cr=false;function a8(){if(cr){return}fe();cr=true}function fe(){var fN;bM(window,"resize",function(){if(fN==null){fN=setTimeout(function(){fN=null;d8=null;aw(aK)},100)}});bM(window,"blur",function(){aw(aL)})}var ep=function(){if(bY){return false}var fN=fw("div");return"draggable" in fN||"dragDrop" in fN}();var d8;function l(fN){if(d8!=null){return d8}var fO=fw("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");bG(fN,fO);if(fO.offsetWidth){d8=fO.offsetHeight-fO.clientHeight}return d8||0}var fl;function bd(fN){if(fl==null){var fO=fw("span","\u200b");bG(fN,fw("span",[fO,document.createTextNode("x")]));if(fN.firstChild.offsetHeight!=0){fl=fO.offsetWidth<=1&&fO.offsetHeight>2&&!b1}}if(fl){return fw("span","\u200b")}else{return fw("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}}var fk;function bD(fQ){if(fk!=null){return fk}var fN=bG(fQ,document.createTextNode("A\u062eA"));var fP=cb(fN,0,1).getBoundingClientRect();if(fP.left==fP.right){return false}var fO=cb(fN,1,2).getBoundingClientRect();return fk=(fO.right-fP.right<3)}var aQ=I.splitLines="\n\nb".split(/\n/).length!=3?function(fS){var fT=0,fN=[],fR=fS.length;while(fT<=fR){var fQ=fS.indexOf("\n",fT);if(fQ==-1){fQ=fS.length}var fP=fS.slice(fT,fS.charAt(fQ-1)=="\r"?fQ-1:fQ);var fO=fP.indexOf("\r");if(fO!=-1){fN.push(fP.slice(0,fO));fT+=fO+1}else{fN.push(fP);fT=fQ+1}}return fN}:function(fN){return fN.split(/\r\n?|\n/)};var bi=window.getSelection?function(fO){try{return fO.selectionStart!=fO.selectionEnd}catch(fN){return false}}:function(fP){try{var fN=fP.ownerDocument.selection.createRange()}catch(fO){}if(!fN||fN.parentElement()!=fP){return false}return fN.compareEndPoints("StartToEnd",fN)!=0};var cT=(function(){var fN=fw("div");if("oncopy" in fN){return true}fN.setAttribute("oncopy","return;");return typeof fN.oncopy=="function"})();var eQ={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};I.keyNames=eQ;(function(){for(var fN=0;fN<10;fN++){eQ[fN+48]=eQ[fN+96]=String(fN)}for(var fN=65;fN<=90;fN++){eQ[fN]=String.fromCharCode(fN)}for(var fN=1;fN<=12;fN++){eQ[fN+111]=eQ[fN+63235]="F"+fN}})();function dH(fN,fT,fS,fR){if(!fN){return fR(fT,fS,"ltr")}var fQ=false;for(var fP=0;fP<fN.length;++fP){var fO=fN[fP];if(fO.from<fS&&fO.to>fT||fT==fS&&fO.to==fT){fR(Math.max(fO.from,fT),Math.min(fO.to,fS),fO.level==1?"rtl":"ltr");fQ=true}}if(!fQ){fR(fT,fS,"ltr")}}function dd(fN){return fN.level%2?fN.to:fN.from}function fI(fN){return fN.level%2?fN.from:fN.to}function ct(fO){var fN=a(fO);return fN?dd(fN[0]):0}function cE(fO){var fN=a(fO);if(!fN){return fO.text.length}return fI(fh(fN))}function bj(fO,fR){var fP=eP(fO.doc,fR);var fS=z(fP);if(fS!=fP){fR=bC(fS)}var fN=a(fS);var fQ=!fN?0:fN[0].level%2?cE(fS):ct(fS);return W(fR,fQ)}function dt(fP,fS){var fO,fQ=eP(fP.doc,fS);while(fO=d7(fQ)){fQ=fO.find(1,true).line;fS=null}var fN=a(fQ);var fR=!fN?fQ.text.length:fN[0].level%2?ct(fQ):cE(fQ);return W(fS==null?bC(fQ):fS,fR)}function ak(fO,fP,fN){var fQ=fO[0].level;if(fP==fQ){return true}if(fN==fQ){return false}return fP<fN}var eE;function aB(fN,fR){eE=null;for(var fO=0,fP;fO<fN.length;++fO){var fQ=fN[fO];if(fQ.from<fR&&fQ.to>fR){return fO}if((fQ.from==fR||fQ.to==fR)){if(fP==null){fP=fO}else{if(ak(fN,fQ.level,fN[fP].level)){if(fQ.from!=fQ.to){eE=fP}return fO}else{if(fQ.from!=fQ.to){eE=fO}return fP}}}}return fP}function eO(fN,fQ,fO,fP){if(!fP){return fQ+fO}do{fQ+=fO}while(fQ>0&&e0(fN.text.charAt(fQ)));return fQ}function v(fN,fU,fP,fQ){var fR=a(fN);if(!fR){return ag(fN,fU,fP,fQ)}var fT=aB(fR,fU),fO=fR[fT];var fS=eO(fN,fU,fO.level%2?-fP:fP,fQ);for(;;){if(fS>fO.from&&fS<fO.to){return fS}if(fS==fO.from||fS==fO.to){if(aB(fR,fS)==fT){return fS}fO=fR[fT+=fP];return(fP>0)==fO.level%2?fO.to:fO.from}else{fO=fR[fT+=fP];if(!fO){return null}if((fP>0)==fO.level%2){fS=eO(fN,fO.to,-1,fQ)}else{fS=eO(fN,fO.from,1,fQ)}}}}function ag(fN,fR,fO,fP){var fQ=fR+fO;if(fP){while(fQ>0&&e0(fN.text.charAt(fQ))){fQ+=fO}}return fQ<0||fQ>fN.text.length?null:fQ}var a6=(function(){var fT="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var fR="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function fQ(fX){if(fX<=247){return fT.charAt(fX)}else{if(1424<=fX&&fX<=1524){return"R"}else{if(1536<=fX&&fX<=1773){return fR.charAt(fX-1536)}else{if(1774<=fX&&fX<=2220){return"r"}else{if(8192<=fX&&fX<=8203){return"w"}else{if(fX==8204){return"b"}else{return"L"}}}}}}}var fN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var fW=/[stwN]/,fP=/[LRr]/,fO=/[Lb1n]/,fS=/[1n]/;var fV="L";function fU(fZ,fY,fX){this.level=fZ;this.from=fY;this.to=fX}return function(f7){if(!fN.test(f7)){return false}var gd=f7.length,f3=[];for(var gc=0,fZ;gc<gd;++gc){f3.push(fZ=fQ(f7.charCodeAt(gc)))}for(var gc=0,f6=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="m"){f3[gc]=f6}else{f6=fZ}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="1"&&fX=="r"){f3[gc]="n"}else{if(fP.test(fZ)){fX=fZ;if(fZ=="r"){f3[gc]="R"}}}}for(var gc=1,f6=f3[0];gc<gd-1;++gc){var fZ=f3[gc];if(fZ=="+"&&f6=="1"&&f3[gc+1]=="1"){f3[gc]="1"}else{if(fZ==","&&f6==f3[gc+1]&&(f6=="1"||f6=="n")){f3[gc]=f6}}f6=fZ}for(var gc=0;gc<gd;++gc){var fZ=f3[gc];if(fZ==","){f3[gc]="N"}else{if(fZ=="%"){for(var f0=gc+1;f0<gd&&f3[f0]=="%";++f0){}var ge=(gc&&f3[gc-1]=="!")||(f0<gd&&f3[f0]=="1")?"1":"N";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fX=="L"&&fZ=="1"){f3[gc]="L"}else{if(fP.test(fZ)){fX=fZ}}}for(var gc=0;gc<gd;++gc){if(fW.test(f3[gc])){for(var f0=gc+1;f0<gd&&fW.test(f3[f0]);++f0){}var f4=(gc?f3[gc-1]:fV)=="L";var fY=(f0<gd?f3[f0]:fV)=="L";var ge=f4||fY?"L":"R";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}var gb=[],f8;for(var gc=0;gc<gd;){if(fO.test(f3[gc])){var f1=gc;for(++gc;gc<gd&&fO.test(f3[gc]);++gc){}gb.push(new fU(0,f1,gc))}else{var f2=gc,f5=gb.length;for(++gc;gc<gd&&f3[gc]!="L";++gc){}for(var ga=f2;ga<gc;){if(fS.test(f3[ga])){if(f2<ga){gb.splice(f5,0,new fU(1,f2,ga))}var f9=ga;for(++ga;ga<gc&&fS.test(f3[ga]);++ga){}gb.splice(f5,0,new fU(2,f9,ga));f2=ga}else{++ga}}if(f2<gc){gb.splice(f5,0,new fU(1,f2,gc))}}}if(gb[0].level==1&&(f8=f7.match(/^\s+/))){gb[0].from=f8[0].length;gb.unshift(new fU(0,0,f8[0].length))}if(fh(gb).level==1&&(f8=f7.match(/\s+$/))){fh(gb).to-=f8[0].length;gb.push(new fU(0,gd-f8[0].length,gd))}if(gb[0].level!=fh(gb).level){gb.push(new fU(gb[0].level,gd,gd))}return gb}})();I.version="4.1.1";return I});
3
+ // CodeMirror XML.
4
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("xml",function(y,k){var p=y.indentUnit;var x=k.multilineTagIndentFactor||1;var d=k.multilineTagIndentPastTag;if(d==null){d=true}var w=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};var c=k.alignCDATA;var f,g;function n(F,E){function C(G){E.tokenize=G;return G(F,E)}var D=F.next();if(D=="<"){if(F.eat("!")){if(F.eat("[")){if(F.match("CDATA[")){return C(v("atom","]]>"))}else{return null}}else{if(F.match("--")){return C(v("comment","-->"))}else{if(F.match("DOCTYPE",true,true)){F.eatWhile(/[\w\._\-]/);return C(z(1))}else{return null}}}}else{if(F.eat("?")){F.eatWhile(/[\w\._\-]/);E.tokenize=v("meta","?>");return"meta"}else{f=F.eat("/")?"closeTag":"openTag";E.tokenize=m;return"tag bracket"}}}else{if(D=="&"){var B;if(F.eat("#")){if(F.eat("x")){B=F.eatWhile(/[a-fA-F\d]/)&&F.eat(";")}else{B=F.eatWhile(/[\d]/)&&F.eat(";")}}else{B=F.eatWhile(/[\w\.\-:]/)&&F.eat(";")}return B?"atom":"error"}else{F.eatWhile(/[^&<]/);return null}}}function m(E,D){var C=E.next();if(C==">"||(C=="/"&&E.eat(">"))){D.tokenize=n;f=C==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(C=="="){f="equals";return null}else{if(C=="<"){D.tokenize=n;D.state=l;D.tagName=D.tagStart=null;var B=D.tokenize(E,D);return B?B+" error":"error"}else{if(/[\'\"]/.test(C)){D.tokenize=j(C);D.stringStartCol=E.column();return D.tokenize(E,D)}else{E.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function j(B){var C=function(E,D){while(!E.eol()){if(E.next()==B){D.tokenize=m;break}}return"string"};C.isInAttribute=true;return C}function v(C,B){return function(E,D){while(!E.eol()){if(E.match(B)){D.tokenize=n;break}E.next()}return C}}function z(B){return function(E,D){var C;while((C=E.next())!=null){if(C=="<"){D.tokenize=z(B+1);return D.tokenize(E,D)}else{if(C==">"){if(B==1){D.tokenize=n;break}else{D.tokenize=z(B-1);return D.tokenize(E,D)}}}}return"meta"}}function r(C,B,D){this.prev=C.context;this.tagName=B;this.indent=C.indented;this.startOfLine=D;if(w.doNotIndent.hasOwnProperty(B)||(C.context&&C.context.noIndent)){this.noIndent=true}}function u(B){if(B.context){B.context=B.context.prev}}function q(D,C){var B;while(true){if(!D.context){return}B=D.context.tagName;if(!w.contextGrabbers.hasOwnProperty(B)||!w.contextGrabbers[B].hasOwnProperty(C)){return}u(D)}}function l(B,D,C){if(B=="openTag"){C.tagStart=D.column();return b}else{if(B=="closeTag"){return t}else{return l}}}function b(B,D,C){if(B=="word"){C.tagName=D.current();g="tag";return e}else{g="error";return b}}function t(C,E,D){if(C=="word"){var B=E.current();if(D.context&&D.context.tagName!=B&&w.implicitlyClosed.hasOwnProperty(D.context.tagName)){u(D)}if(D.context&&D.context.tagName==B){g="tag";return s}else{g="tag error";return A}}else{g="error";return A}}function s(C,B,D){if(C!="endTag"){g="error";return s}u(D);return l}function A(B,D,C){g="error";return s(B,D,C)}function e(E,C,F){if(E=="word"){g="attribute";return i}else{if(E=="endTag"||E=="selfcloseTag"){var D=F.tagName,B=F.tagStart;F.tagName=F.tagStart=null;if(E=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(D)){q(F,D)}else{q(F,D);F.context=new r(F,D,B==F.indented)}return l}}g="error";return e}function i(B,D,C){if(B=="equals"){return o}if(!w.allowMissing){g="error"}return e(B,D,C)}function o(B,D,C){if(B=="string"){return h}if(B=="word"&&w.allowUnquoted){g="string";return e}g="error";return e(B,D,C)}function h(B,D,C){if(B=="string"){return h}return e(B,D,C)}return{startState:function(){return{tokenize:n,state:l,indented:0,tagName:null,tagStart:null,context:null}},token:function(D,C){if(!C.tagName&&D.sol()){C.indented=D.indentation()}if(D.eatSpace()){return null}f=null;var B=C.tokenize(D,C);if((B||f)&&B!="comment"){g=null;C.state=C.state(f||B,D,C);if(g){B=g=="error"?B+" error":g}}return B},indent:function(G,C,F){var E=G.context;if(G.tokenize.isInAttribute){if(G.tagStart==G.indented){return G.stringStartCol+1}else{return G.indented+p}}if(E&&E.noIndent){return a.Pass}if(G.tokenize!=m&&G.tokenize!=n){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(d){return G.tagStart+G.tagName.length+2}else{return G.tagStart+p*x}}if(c&&/<!\[CDATA\[/.test(C)){return 0}var B=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(B&&B[1]){while(E){if(E.tagName==B[2]){E=E.prev;break}else{if(w.implicitlyClosed.hasOwnProperty(E.tagName)){E=E.prev}else{break}}}}else{if(B){while(E){var D=w.contextGrabbers[E.tagName];if(D&&D.hasOwnProperty(B[2])){E=E.prev}else{break}}}}while(E&&!E.startOfLine){E=E.prev}if(E){return E.indent+p}else{return 0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml"}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});
5
+ // CodeMirror JS.
6
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(X,ah){var j=X.indentUnit;var x=ah.statementIndent;var aw=ah.jsonld;var w=ah.json||aw;var f=ah.typescript;var ao=function(){function aM(aO){return{type:aO,style:"keyword"}}var aH=aM("keyword a"),aF=aM("keyword b"),aE=aM("keyword c");var aG=aM("operator"),aK={type:"atom",style:"atom"};var aI={"if":aM("if"),"while":aH,"with":aH,"else":aF,"do":aF,"try":aF,"finally":aF,"return":aE,"break":aE,"continue":aE,"new":aE,"delete":aE,"throw":aE,"debugger":aE,"var":aM("var"),"const":aM("var"),let:aM("var"),"function":aM("function"),"catch":aM("catch"),"for":aM("for"),"switch":aM("switch"),"case":aM("case"),"default":aM("default"),"in":aG,"typeof":aG,"instanceof":aG,"true":aK,"false":aK,"null":aK,"undefined":aK,"NaN":aK,"Infinity":aK,"this":aM("this"),module:aM("module"),"class":aM("class"),"super":aM("atom"),yield:aE,"export":aM("export"),"import":aM("import"),"extends":aE};if(f){var aN={type:"variable",style:"variable-3"};var aJ={"interface":aM("interface"),"extends":aM("extends"),constructor:aM("constructor"),"public":aM("public"),"private":aM("private"),"protected":aM("protected"),"static":aM("static"),string:aN,number:aN,bool:aN,any:aN};for(var aL in aJ){aI[aL]=aJ[aL]}}return aI}();var M=/[+\-*&%=<>!?|~^]/;var an=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function C(aH){var aF=false,aE,aG=false;while((aE=aH.next())!=null){if(!aF){if(aE=="/"&&!aG){return}if(aE=="["){aG=true}else{if(aG&&aE=="]"){aG=false}}}aF=!aF&&aE=="\\"}}var P,D;function I(aG,aF,aE){P=aG;D=aE;return aF}function R(aI,aG){var aE=aI.next();if(aE=='"'||aE=="'"){aG.tokenize=O(aE);return aG.tokenize(aI,aG)}else{if(aE=="."&&aI.match(/^\d+(?:[eE][+\-]?\d+)?/)){return I("number","number")}else{if(aE=="."&&aI.match("..")){return I("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aE)){return I(aE)}else{if(aE=="="&&aI.eat(">")){return I("=>","operator")}else{if(aE=="0"&&aI.eat(/x/i)){aI.eatWhile(/[\da-f]/i);return I("number","number")}else{if(/\d/.test(aE)){aI.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return I("number","number")}else{if(aE=="/"){if(aI.eat("*")){aG.tokenize=av;return av(aI,aG)}else{if(aI.eat("/")){aI.skipToEnd();return I("comment","comment")}else{if(aG.lastType=="operator"||aG.lastType=="keyword c"||aG.lastType=="sof"||/^[\[{}\(,;:]$/.test(aG.lastType)){C(aI);aI.eatWhile(/[gimy]/);return I("regexp","string-2")}else{aI.eatWhile(M);return I("operator","operator",aI.current())}}}}else{if(aE=="`"){aG.tokenize=ax;return ax(aI,aG)}else{if(aE=="#"){aI.skipToEnd();return I("error","error")}else{if(M.test(aE)){aI.eatWhile(M);return I("operator","operator",aI.current())}else{aI.eatWhile(/[\w\$_]/);var aH=aI.current(),aF=ao.propertyIsEnumerable(aH)&&ao[aH];return(aF&&aG.lastType!=".")?I(aF.type,aF.style,aH):I("variable","variable",aH)}}}}}}}}}}}}function O(aE){return function(aI,aG){var aH=false,aF;if(aw&&aI.peek()=="@"&&aI.match(an)){aG.tokenize=R;return I("jsonld-keyword","meta")}while((aF=aI.next())!=null){if(aF==aE&&!aH){break}aH=!aH&&aF=="\\"}if(!aH){aG.tokenize=R}return I("string","string")}}function av(aH,aG){var aE=false,aF;while(aF=aH.next()){if(aF=="/"&&aE){aG.tokenize=R;break}aE=(aF=="*")}return I("comment","comment")}function ax(aH,aF){var aG=false,aE;while((aE=aH.next())!=null){if(!aG&&(aE=="`"||aE=="$"&&aH.eat("{"))){aF.tokenize=R;break}aG=!aG&&aE=="\\"}return I("quasi","string-2",aH.current())}var k="([{}])";function ar(aK,aH){if(aH.fatArrowAt){aH.fatArrowAt=null}var aG=aK.string.indexOf("=>",aK.start);if(aG<0){return}var aJ=0,aF=false;for(var aL=aG-1;aL>=0;--aL){var aE=aK.string.charAt(aL);var aI=k.indexOf(aE);if(aI>=0&&aI<3){if(!aJ){++aL;break}if(--aJ==0){break}}else{if(aI>=3&&aI<6){++aJ}else{if(/[$\w]/.test(aE)){aF=true}else{if(aF&&!aJ){++aL;break}}}}}if(aF&&!aJ){aH.fatArrowAt=aL}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function G(aJ,aF,aE,aI,aG,aH){this.indented=aJ;this.column=aF;this.type=aE;this.prev=aG;this.info=aH;if(aI!=null){this.align=aI}}function p(aH,aG){for(var aF=aH.localVars;aF;aF=aF.next){if(aF.name==aG){return true}}for(var aE=aH.context;aE;aE=aE.prev){for(var aF=aE.vars;aF;aF=aF.next){if(aF.name==aG){return true}}}}function e(aI,aF,aE,aH,aJ){var aK=aI.cc;A.state=aI;A.stream=aJ;A.marked=null,A.cc=aK;if(!aI.lexical.hasOwnProperty("align")){aI.lexical.align=true}while(true){var aG=aK.length?aK.pop():w?al:aC;if(aG(aE,aH)){while(aK.length&&aK[aK.length-1].lex){aK.pop()()}if(A.marked){return A.marked}if(aE=="variable"&&p(aI,aH)){return"variable-2"}return aF}}}var A={state:null,column:null,marked:null,cc:null};function Y(){for(var aE=arguments.length-1;aE>=0;aE--){A.cc.push(arguments[aE])}}function ac(){Y.apply(null,arguments);return true}function aq(aF){function aE(aI){for(var aH=aI;aH;aH=aH.next){if(aH.name==aF){return true}}return false}var aG=A.state;if(aG.context){A.marked="def";if(aE(aG.localVars)){return}aG.localVars={name:aF,next:aG.localVars}}else{if(aE(aG.globalVars)){return}if(ah.globalVars){aG.globalVars={name:aF,next:aG.globalVars}}}}var n={name:"this",next:{name:"arguments"}};function t(){A.state.context={prev:A.state.context,vars:A.state.localVars};A.state.localVars=n}function u(){A.state.localVars=A.state.context.vars;A.state.context=A.state.context.prev}function aA(aF,aG){var aE=function(){var aI=A.state,aH=aI.indented;if(aI.lexical.type=="stat"){aH=aI.lexical.indented}aI.lexical=new G(aH,A.stream.column(),aF,null,aI.lexical,aG)};aE.lex=true;return aE}function g(){var aE=A.state;if(aE.lexical.prev){if(aE.lexical.type==")"){aE.indented=aE.lexical.indented}aE.lexical=aE.lexical.prev}}g.lex=true;function o(aE){function aF(aG){if(aG==aE){return ac()}else{if(aE==";"){return Y()}else{return ac(aF)}}}return aF}function aC(aE,aF){if(aE=="var"){return ac(aA("vardef",aF.length),c,o(";"),g)}if(aE=="keyword a"){return ac(aA("form"),al,aC,g)}if(aE=="keyword b"){return ac(aA("form"),aC,g)}if(aE=="{"){return ac(aA("}"),v,g)}if(aE==";"){return ac()}if(aE=="if"){if(A.state.lexical.info=="else"&&A.state.cc[A.state.cc.length-1]==g){A.state.cc.pop()()}return ac(aA("form"),al,aC,g,d)}if(aE=="function"){return ac(J)}if(aE=="for"){return ac(aA("form"),r,aC,g)}if(aE=="variable"){return ac(aA("stat"),aD)}if(aE=="switch"){return ac(aA("form"),al,aA("}","switch"),o("{"),v,g,g)}if(aE=="case"){return ac(al,o(":"))}if(aE=="default"){return ac(o(":"))}if(aE=="catch"){return ac(aA("form"),t,o("("),ad,o(")"),aC,g,u)}if(aE=="module"){return ac(aA("form"),t,E,u,g)}if(aE=="class"){return ac(aA("form"),T,S,g)}if(aE=="export"){return ac(aA("form"),aB,g)}if(aE=="import"){return ac(aA("form"),ae,g)}return Y(aA("stat"),al,o(";"),g)}function al(aE){return W(aE,false)}function az(aE){return W(aE,true)}function W(aF,aH){if(A.state.fatArrowAt==A.stream.start){var aE=aH?K:U;if(aF=="("){return ac(t,aA(")"),ap(h,")"),g,o("=>"),aE,u)}else{if(aF=="variable"){return Y(t,h,o("=>"),aE,u)}}}var aG=aH?i:Z;if(b.hasOwnProperty(aF)){return ac(aG)}if(aF=="function"){return ac(J,aG)}if(aF=="keyword c"){return ac(aH?ai:ag)}if(aF=="("){return ac(aA(")"),ag,au,o(")"),g,aG)}if(aF=="operator"||aF=="spread"){return ac(aH?az:al)}if(aF=="["){return ac(aA("]"),l,g,aG)}if(aF=="{"){return at(q,"}",null,aG)}if(aF=="quasi"){return Y(N,aG)}return ac()}function ag(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(al)}function ai(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(az)}function Z(aE,aF){if(aE==","){return ac(al)}return i(aE,aF,false)}function i(aE,aG,aI){var aF=aI==false?Z:i;var aH=aI==false?al:az;if(aG=="=>"){return ac(t,aI?K:U,u)}if(aE=="operator"){if(/\+\+|--/.test(aG)){return ac(aF)}if(aG=="?"){return ac(al,o(":"),aH)}return ac(aH)}if(aE=="quasi"){return Y(N,aF)}if(aE==";"){return}if(aE=="("){return at(az,")","call",aF)}if(aE=="."){return ac(aj,aF)}if(aE=="["){return ac(aA("]"),ag,o("]"),g,aF)}}function N(aE,aF){if(aE!="quasi"){return Y()}if(aF.slice(aF.length-2)!="${"){return ac(N)}return ac(al,m)}function m(aE){if(aE=="}"){A.marked="string-2";A.state.tokenize=ax;return ac(N)}}function U(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(al)}function K(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(az)}function aD(aE){if(aE==":"){return ac(g,aC)}return Y(Z,o(";"),g)}function aj(aE){if(aE=="variable"){A.marked="property";return ac()}}function q(aE,aF){if(aE=="variable"){A.marked="property";if(aF=="get"||aF=="set"){return ac(F)}}else{if(aE=="number"||aE=="string"){A.marked=aw?"property":(aE+" property")}else{if(aE=="["){return ac(al,o("]"),H)}}}if(b.hasOwnProperty(aE)){return ac(H)}}function F(aE){if(aE!="variable"){return Y(H)}A.marked="property";return ac(J)}function H(aE){if(aE==":"){return ac(az)}if(aE=="("){return Y(J)}}function ap(aG,aE){function aF(aI){if(aI==","){var aH=A.state.lexical;if(aH.info=="call"){aH.pos=(aH.pos||0)+1}return ac(aG,aF)}if(aI==aE){return ac()}return ac(o(aE))}return function(aH){if(aH==aE){return ac()}return Y(aG,aF)}}function at(aH,aE,aG){for(var aF=3;aF<arguments.length;aF++){A.cc.push(arguments[aF])}return ac(aA(aE,aG),ap(aH,aE),g)}function v(aE){if(aE=="}"){return ac()}return Y(aC,v)}function Q(aE){if(f&&aE==":"){return ac(ab)}}function ab(aE){if(aE=="variable"){A.marked="variable-3";return ac()}}function c(){return Y(h,Q,aa,V)}function h(aE,aF){if(aE=="variable"){aq(aF);return ac()}if(aE=="["){return at(h,"]")}if(aE=="{"){return at(ay,"}")}}function ay(aE,aF){if(aE=="variable"&&!A.stream.match(/^\s*:/,false)){aq(aF);return ac(aa)}if(aE=="variable"){A.marked="property"}return ac(o(":"),h,aa)}function aa(aE,aF){if(aF=="="){return ac(az)}}function V(aE){if(aE==","){return ac(c)}}function d(aE,aF){if(aE=="keyword b"&&aF=="else"){return ac(aA("form","else"),aC,g)}}function r(aE){if(aE=="("){return ac(aA(")"),B,o(")"),g)}}function B(aE){if(aE=="var"){return ac(c,o(";"),z)}if(aE==";"){return ac(z)}if(aE=="variable"){return ac(s)}return Y(al,o(";"),z)}function s(aE,aF){if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return ac(Z,z)}function z(aE,aF){if(aE==";"){return ac(y)}if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return Y(al,o(";"),y)}function y(aE){if(aE!=")"){ac(al)}}function J(aE,aF){if(aF=="*"){A.marked="keyword";return ac(J)}if(aE=="variable"){aq(aF);return ac(J)}if(aE=="("){return ac(t,aA(")"),ap(ad,")"),g,aC,u)}}function ad(aE){if(aE=="spread"){return ac(ad)}return Y(h,Q)}function T(aE,aF){if(aE=="variable"){aq(aF);return ac(L)}}function L(aE,aF){if(aF=="extends"){return ac(al)}}function S(aE){if(aE=="{"){return at(q,"}")}}function E(aE,aF){if(aE=="string"){return ac(aC)}if(aE=="variable"){aq(aF);return ac(af)}}function aB(aE,aF){if(aF=="*"){A.marked="keyword";return ac(af,o(";"))}if(aF=="default"){A.marked="keyword";return ac(al,o(";"))}return Y(aC)}function ae(aE){if(aE=="string"){return ac()}return Y(am,af)}function am(aE,aF){if(aE=="{"){return at(am,"}")}if(aE=="variable"){aq(aF)}return ac()}function af(aE,aF){if(aF=="from"){A.marked="keyword";return ac(al)}}function l(aE){if(aE=="]"){return ac()}return Y(az,ak)}function ak(aE){if(aE=="for"){return Y(au,o("]"))}if(aE==","){return ac(ap(az,"]"))}return Y(ap(az,"]"))}function au(aE){if(aE=="for"){return ac(r,au)}if(aE=="if"){return ac(al,au)}}return{startState:function(aF){var aE={tokenize:R,lastType:"sof",cc:[],lexical:new G((aF||0)-j,0,"block",false),localVars:ah.localVars,context:ah.localVars&&{vars:ah.localVars},indented:0};if(ah.globalVars&&typeof ah.globalVars=="object"){aE.globalVars=ah.globalVars}return aE},token:function(aG,aF){if(aG.sol()){if(!aF.lexical.hasOwnProperty("align")){aF.lexical.align=false}aF.indented=aG.indentation();ar(aG,aF)}if(aF.tokenize!=av&&aG.eatSpace()){return null}var aE=aF.tokenize(aG,aF);if(P=="comment"){return aE}aF.lastType=P=="operator"&&(D=="++"||D=="--")?"incdec":P;return e(aF,aE,P,D,aG)},indent:function(aK,aE){if(aK.tokenize==av){return a.Pass}if(aK.tokenize!=R){return 0}var aJ=aE&&aE.charAt(0),aH=aK.lexical;if(!/^\s*else\b/.test(aE)){for(var aG=aK.cc.length-1;aG>=0;--aG){var aL=aK.cc[aG];if(aL==g){aH=aH.prev}else{if(aL!=d){break}}}}if(aH.type=="stat"&&aJ=="}"){aH=aH.prev}if(x&&aH.type==")"&&aH.prev.type=="stat"){aH=aH.prev}var aI=aH.type,aF=aJ==aI;if(aI=="vardef"){return aH.indented+(aK.lastType=="operator"||aK.lastType==","?aH.info+1:0)}else{if(aI=="form"&&aJ=="{"){return aH.indented}else{if(aI=="form"){return aH.indented+j}else{if(aI=="stat"){return aH.indented+(aK.lastType=="operator"||aK.lastType==","?x||j:0)}else{if(aH.info=="switch"&&!aF&&ah.doubleIndentSwitch!=false){return aH.indented+(/^(?:case|default)\b/.test(aE)?j:2*j)}else{if(aH.align){return aH.column+(aF?0:1)}else{return aH.indented+(aF?0:j)}}}}}}},electricChars:":{}",blockCommentStart:w?null:"/*",blockCommentEnd:w?null:"*/",lineComment:w?null:"//",fold:"brace",helperType:w?"json":"javascript",jsonldMode:aw,jsonMode:w}});a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});
7
+ // CodeMirror CSS.
8
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(m){m.defineMode("css",function(N,B){if(!B.propertyKeywords){B=m.resolveMode("text/css")}var H=N.indentUnit,t=B.tokenHooks,M=B.mediaTypes||{},D=B.mediaFeatures||{},A=B.propertyKeywords||{},u=B.nonStandardPropertyKeywords||{},G=B.colorKeywords||{},J=B.valueKeywords||{},w=B.fontProperties||{},E=B.allowNested;var v,F;function O(R,S){v=S;return R}function Q(U,T){var S=U.next();if(t[S]){var R=t[S](U,T);if(R!==false){return R}}if(S=="@"){U.eatWhile(/[\w\\\-]/);return O("def",U.current())}else{if(S=="="||(S=="~"||S=="|")&&U.eat("=")){return O(null,"compare")}else{if(S=='"'||S=="'"){T.tokenize=C(S);return T.tokenize(U,T)}else{if(S=="#"){U.eatWhile(/[\w\\\-]/);return O("atom","hash")}else{if(S=="!"){U.match(/^\s*\w*/);return O("keyword","important")}else{if(/\d/.test(S)||S=="."&&U.eat(/\d/)){U.eatWhile(/[\w.%]/);return O("number","unit")}else{if(S==="-"){if(/[\d.]/.test(U.peek())){U.eatWhile(/[\w.%]/);return O("number","unit")}else{if(U.match(/^[^-]+-/)){return O("meta","meta")}}}else{if(/[,+>*\/]/.test(S)){return O(null,"select-op")}else{if(S=="."&&U.match(/^-?[_a-z][_a-z0-9-]*/i)){return O("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(S)){return O(null,S)}else{if(S=="u"&&U.match("rl(")){U.backUp(1);T.tokenize=P;return O("property","word")}else{if(/[\w\\\-]/.test(S)){U.eatWhile(/[\w\\\-]/);return O("property","word")}else{return O(null,null)}}}}}}}}}}}}}function C(R){return function(V,T){var U=false,S;while((S=V.next())!=null){if(S==R&&!U){if(R==")"){V.backUp(1)}break}U=!U&&S=="\\"}if(S==R||!U&&R!=")"){T.tokenize=null}return O("string","string")}}function P(S,R){S.next();if(!S.match(/\s*[\"\')]/,false)){R.tokenize=C(")")}else{R.tokenize=null}return O(null,"(")}function I(S,R,T){this.type=S;this.indent=R;this.prev=T}function y(S,T,R){S.context=new I(R,T.indentation()+H,S.context);return R}function K(R){R.context=R.context.prev;return R.context.type}function s(R,T,S){return x[S.context.type](R,T,S)}function L(S,U,T,V){for(var R=V||1;R>0;R--){T.context=T.context.prev}return s(S,U,T)}function z(S){var R=S.current().toLowerCase();if(J.hasOwnProperty(R)){F="atom"}else{if(G.hasOwnProperty(R)){F="keyword"}else{F="variable"}}}var x={};x.top=function(R,T,S){if(R=="{"){return y(S,T,"block")}else{if(R=="}"&&S.context.prev){return K(S)}else{if(R=="@media"){return y(S,T,"media")}else{if(R=="@font-face"){return"font_face_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(R)){return"keyframes"}else{if(R&&R.charAt(0)=="@"){return y(S,T,"at")}else{if(R=="hash"){F="builtin"}else{if(R=="word"){F="tag"}else{if(R=="variable-definition"){return"maybeprop"}else{if(R=="interpolation"){return y(S,T,"interpolation")}else{if(R==":"){return"pseudo"}else{if(E&&R=="("){return y(S,T,"params")}}}}}}}}}}}}return S.context.type};x.block=function(R,U,S){if(R=="word"){var T=U.current().toLowerCase();if(A.hasOwnProperty(T)){F="property";return"maybeprop"}else{if(u.hasOwnProperty(T)){F="string-2";return"maybeprop"}else{if(E){F=U.match(/^\s*:/,false)?"property":"tag";return"block"}else{F+=" error";return"maybeprop"}}}}else{if(R=="meta"){return"block"}else{if(!E&&(R=="hash"||R=="qualifier")){F="error";return"block"}else{return x.top(R,U,S)}}}};x.maybeprop=function(R,T,S){if(R==":"){return y(S,T,"prop")}return s(R,T,S)};x.prop=function(R,T,S){if(R==";"){return K(S)}if(R=="{"&&E){return y(S,T,"propBlock")}if(R=="}"||R=="{"){return L(R,T,S)}if(R=="("){return y(S,T,"parens")}if(R=="hash"&&!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(T.current())){F+=" error"}else{if(R=="word"){z(T)}else{if(R=="interpolation"){return y(S,T,"interpolation")}}}return"prop"};x.propBlock=function(S,R,T){if(S=="}"){return K(T)}if(S=="word"){F="property";return"maybeprop"}return T.context.type};x.parens=function(R,T,S){if(R=="{"||R=="}"){return L(R,T,S)}if(R==")"){return K(S)}return"parens"};x.pseudo=function(R,T,S){if(R=="word"){F="variable-3";return S.context.type}return s(R,T,S)};x.media=function(R,U,S){if(R=="("){return y(S,U,"media_parens")}if(R=="}"){return L(R,U,S)}if(R=="{"){return K(S)&&y(S,U,E?"block":"top")}if(R=="word"){var T=U.current().toLowerCase();if(T=="only"||T=="not"||T=="and"){F="keyword"}else{if(M.hasOwnProperty(T)){F="attribute"}else{if(D.hasOwnProperty(T)){F="property"}else{F="error"}}}}return S.context.type};x.media_parens=function(R,T,S){if(R==")"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S,2)}return x.media(R,T,S)};x.font_face_before=function(R,T,S){if(R=="{"){return y(S,T,"font_face")}return s(R,T,S)};x.font_face=function(R,T,S){if(R=="}"){return K(S)}if(R=="word"){if(!w.hasOwnProperty(T.current().toLowerCase())){F="error"}else{F="property"}return"maybeprop"}return"font_face"};x.keyframes=function(R,T,S){if(R=="word"){F="variable";return"keyframes"}if(R=="{"){return y(S,T,"top")}return s(R,T,S)};x.at=function(R,T,S){if(R==";"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S)}if(R=="word"){F="tag"}else{if(R=="hash"){F="builtin"}}return"at"};x.interpolation=function(R,T,S){if(R=="}"){return K(S)}if(R=="{"||R==";"){return L(R,T,S)}if(R!="variable"){F="error"}return"interpolation"};x.params=function(R,T,S){if(R==")"){return K(S)}if(R=="{"||R=="}"){return L(R,T,S)}if(R=="word"){z(T)}return"params"};return{startState:function(R){return{tokenize:null,state:"top",context:new I("top",R||0,null)}},token:function(T,S){if(!S.tokenize&&T.eatSpace()){return null}var R=(S.tokenize||Q)(T,S);if(R&&typeof R=="object"){v=R[1];R=R[0]}F=R;S.state=x[S.state](v,T,S);return F},indent:function(V,T){var S=V.context,U=T&&T.charAt(0);var R=S.indent;if(S.type=="prop"&&U=="}"){S=S.prev}if(S.prev&&(U=="}"&&(S.type=="block"||S.type=="top"||S.type=="interpolation"||S.type=="font_face")||U==")"&&(S.type=="parens"||S.type=="params"||S.type=="media_parens")||U=="{"&&(S.type=="at"||S.type=="media"))){R=S.indent-H;S=S.prev}return R},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function f(u){var t={};for(var s=0;s<u.length;++s){t[u[s]]=true}return t}var a=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],p=f(a);var r=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],i=f(r);var c=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-position","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],h=f(c);var d=["scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-3d-light-color","scrollbar-track-color","shape-inside","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","zoom"],d=f(d);var b=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],k=f(b);var j=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],n=f(j);var o=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],e=f(o);var l=a.concat(r).concat(c).concat(d).concat(b).concat(j);m.registerHelper("hintWords","css",l);function q(v,u){var s=false,t;while((t=v.next())!=null){if(s&&t=="/"){u.tokenize=null;break}s=(t=="*")}return["comment","comment"]}function g(t,s){if(t.skipTo("-->")){t.match("-->");s.tokenize=null}else{t.skipToEnd()}return["comment","comment"]}m.defineMIME("text/css",{mediaTypes:p,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:d,colorKeywords:k,valueKeywords:n,fontProperties:e,tokenHooks:{"<":function(t,s){if(!t.match("!--")){return false}s.tokenize=g;return g(t,s)},"/":function(t,s){if(!t.eat("*")){return false}s.tokenize=q;return q(t,s)}},name:"css"});m.defineMIME("text/x-scss",{mediaTypes:p,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:d,colorKeywords:k,valueKeywords:n,fontProperties:e,allowNested:true,tokenHooks:{"/":function(t,s){if(t.eat("/")){t.skipToEnd();return["comment","comment"]}else{if(t.eat("*")){s.tokenize=q;return q(t,s)}else{return["operator","operator"]}}},":":function(s){if(s.match(/\s*{/)){return[null,"{"]}return false},"$":function(s){s.match(/^[\w-]+/);if(s.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(s){if(!s.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});m.defineMIME("text/x-less",{mediaTypes:p,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:d,colorKeywords:k,valueKeywords:n,fontProperties:e,allowNested:true,tokenHooks:{"/":function(t,s){if(t.eat("/")){t.skipToEnd();return["comment","comment"]}else{if(t.eat("*")){s.tokenize=q;return q(t,s)}else{return["operator","operator"]}}},"@":function(s){if(s.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}s.eatWhile(/[\w\\\-]/);if(s.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})});
9
+ // CodeMirror HTML.
10
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../xml/xml"),require("../javascript/javascript"),require("../css/css"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../xml/xml","../javascript/javascript","../css/css"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("htmlmixed",function(c,d){var b=a.getMode(c,{name:"xml",htmlMode:true,multilineTagIndentFactor:d.multilineTagIndentFactor,multilineTagIndentPastTag:d.multilineTagIndentPastTag});var n=a.getMode(c,"css");var l=[],k=d&&d.scriptTypes;l.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:a.getMode(c,"javascript")});if(k){for(var e=0;e<k.length;++e){var j=k[e];l.push({matches:j.matches,mode:j.mode&&a.getMode(c,j.mode)})}}l.push({matches:/./,mode:a.getMode(c,"text/plain")});function f(t,r){var p=r.htmlState.tagName;var q=b.token(t,r.htmlState);if(p=="script"&&/\btag\b/.test(q)&&t.current()==">"){var u=t.string.slice(Math.max(0,t.pos-100),t.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);u=u?u[1]:"";if(u&&/[\"\']/.test(u.charAt(0))){u=u.slice(1,u.length-1)}for(var o=0;o<l.length;++o){var s=l[o];if(typeof s.matches=="string"?u==s.matches:s.matches.test(u)){if(s.mode){r.token=m;r.localMode=s.mode;r.localState=s.mode.startState&&s.mode.startState(b.indent(r.htmlState,""))}break}}}else{if(p=="style"&&/\btag\b/.test(q)&&t.current()==">"){r.token=g;r.localMode=n;r.localState=n.startState(b.indent(r.htmlState,""))}}return q}function h(s,o,p){var r=s.current();var q=r.search(o),i;if(q>-1){s.backUp(r.length-q)}else{if(i=r.match(/<\/?$/)){s.backUp(r.length);if(!s.match(o,false)){s.match(r)}}}return p}function m(o,i){if(o.match(/^<\/\s*script\s*>/i,false)){i.token=f;i.localState=i.localMode=null;return f(o,i)}return h(o,/<\/\s*script\s*>/,i.localMode.token(o,i.localState))}function g(o,i){if(o.match(/^<\/\s*style\s*>/i,false)){i.token=f;i.localState=i.localMode=null;return f(o,i)}return h(o,/<\/\s*style\s*>/,n.token(o,i.localState))}return{startState:function(){var i=b.startState();return{token:f,localMode:null,localState:null,htmlState:i}},copyState:function(o){if(o.localState){var i=a.copyState(o.localMode,o.localState)}return{token:o.token,localMode:o.localMode,localState:i,htmlState:a.copyState(b,o.htmlState)}},token:function(o,i){return i.token(o,i)},indent:function(o,i){if(!o.localMode||/^\s*<\//.test(i)){return b.indent(o.htmlState,i)}else{if(o.localMode.indent){return o.localMode.indent(o.localState,i)}else{return a.Pass}}},innerMode:function(i){return{state:i.localState||i.htmlState,mode:i.localMode||b}}}},"xml","javascript","css");a.defineMIME("text/html","htmlmixed")});
11
+ // CodeMirror PHP.
12
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a)}else{a(CodeMirror)}}})(function(b){function d(m){var k={},l=m.split(" ");for(var j=0;j<l.length;++j){k[l[j]]=true}return k}function i(j){return function(l,k){if(l.match(j)){k.tokenize=null}else{l.skipToEnd()}return"string"}}function c(j){if(j.length==0){return f}return function(n,m){var l=j[0];for(var k=0;k<l.length;k++){if(n.match(l[k][0])){m.tokenize=c(j.slice(1));return l[k][1]}}m.tokenize=f;return"string"}}function f(n,l){var m=false,k,j=false;if(n.current()=='"'){return"string"}if(n.match("${",false)||n.match("{$",false)){l.tokenize=null;return"string"}if(n.match(/\$[a-zA-Z_][a-zA-Z0-9_]*/)){if(n.match("[",false)){l.tokenize=c([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]])}if(n.match(/\-\>\w/,false)){l.tokenize=c([[["->",null]],[[/[\w]+/,"variable"]]])}return"variable-2"}while(!n.eol()&&(!n.match("{$",false))&&(!n.match(/(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,false)||m)){k=n.next();if(!m&&k=='"'){j=true;break}m=!m&&k=="\\"}if(j){l.tokenize=null;l.phpEncapsStack.pop()}return"string"}var g="abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally";var h="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";var a="func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once";b.registerHelper("hintWords","php",[g,h,a].join(" ").split(" "));var e={name:"clike",helperType:"php",keywords:d(g),blockKeywords:d("catch do else elseif for foreach if switch try while finally"),atoms:d(h),builtin:d(a),multiLineStrings:true,hooks:{"$":function(j){j.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(k,j){if(k.match(/<</)){k.eatWhile(/[\w\.]/);j.tokenize=i(k.current().slice(3));return j.tokenize(k,j)}return false},"#":function(j){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"},"/":function(j){if(j.eat("/")){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"}return false},'"':function(k,j){if(!j.phpEncapsStack){j.phpEncapsStack=[]}j.phpEncapsStack.push(0);j.tokenize=f;return j.tokenize(k,j)},"{":function(j,k){if(k.phpEncapsStack&&k.phpEncapsStack.length>0){k.phpEncapsStack[k.phpEncapsStack.length-1]++}return false},"}":function(j,k){if(k.phpEncapsStack&&k.phpEncapsStack.length>0){if(--k.phpEncapsStack[k.phpEncapsStack.length-1]==0){k.tokenize=f}}return false}}};b.defineMode("php",function(l,m){var n=b.getMode(l,"text/html");var j=b.getMode(l,e);function k(u,s){var r=s.curMode==j;if(u.sol()&&s.pending&&s.pending!='"'&&s.pending!="'"){s.pending=null}if(!r){if(u.match(/^<\?\w*/)){s.curMode=j;s.curState=s.php;return"meta"}if(s.pending=='"'||s.pending=="'"){while(!u.eol()&&u.next()!=s.pending){}var q="string"}else{if(s.pending&&u.pos<s.pending.end){u.pos=s.pending.end;var q=s.pending.style}else{var q=n.token(u,s.curState)}}if(s.pending){s.pending=null}var t=u.current(),p=t.search(/<\?/),o;if(p!=-1){if(q=="string"&&(o=t.match(/[\'\"]$/))&&!/\?>/.test(t)){s.pending=o[0]}else{s.pending={end:u.pos,style:q}}u.backUp(t.length-p)}return q}else{if(r&&s.php.tokenize==null&&u.match("?>")){s.curMode=n;s.curState=s.html;return"meta"}else{return j.token(u,s.curState)}}}return{startState:function(){var o=b.startState(n),p=b.startState(j);return{html:o,php:p,curMode:m.startOpen?j:n,curState:m.startOpen?p:o,pending:null}},copyState:function(r){var p=r.html,q=b.copyState(n,p),t=r.php,o=b.copyState(j,t),s;if(r.curMode==n){s=q}else{s=o}return{html:q,php:o,curMode:r.curMode,curState:s,pending:r.pending}},token:k,indent:function(p,o){if((p.curMode!=j&&/^\s*<\//.test(o))||(p.curMode==j&&/^\?>/.test(o))){return n.indent(p.html,o)}return p.curMode.indent(p.curState,o)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(o){return{state:o.curState,mode:o.curMode}}}},"htmlmixed","clike");b.defineMIME("application/x-httpd-php","php");b.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});b.defineMIME("text/x-php",e)});
assets/js/lib/mousewheel.js ADDED
@@ -0,0 +1,221 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * jQuery Mousewheel 3.1.12
3
+ *
4
+ * Copyright 2014 jQuery Foundation and other contributors
5
+ * Released under the MIT license.
6
+ * http://jquery.org/license
7
+ */
8
+
9
+ (function (factory) {
10
+ if ( typeof define === 'function' && define.amd ) {
11
+ // AMD. Register as an anonymous module.
12
+ define(['jquery'], factory);
13
+ } else if (typeof exports === 'object') {
14
+ // Node/CommonJS style for Browserify
15
+ module.exports = factory;
16
+ } else {
17
+ // Browser globals
18
+ factory(jQuery);
19
+ }
20
+ }(function ($) {
21
+
22
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
23
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
24
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
25
+ slice = Array.prototype.slice,
26
+ nullLowestDeltaTimeout, lowestDelta;
27
+
28
+ if ( $.event.fixHooks ) {
29
+ for ( var i = toFix.length; i; ) {
30
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
31
+ }
32
+ }
33
+
34
+ var special = $.event.special.mousewheel = {
35
+ version: '3.1.12',
36
+
37
+ setup: function() {
38
+ if ( this.addEventListener ) {
39
+ for ( var i = toBind.length; i; ) {
40
+ this.addEventListener( toBind[--i], handler, false );
41
+ }
42
+ } else {
43
+ this.onmousewheel = handler;
44
+ }
45
+ // Store the line height and page height for this particular element
46
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
47
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
48
+ },
49
+
50
+ teardown: function() {
51
+ if ( this.removeEventListener ) {
52
+ for ( var i = toBind.length; i; ) {
53
+ this.removeEventListener( toBind[--i], handler, false );
54
+ }
55
+ } else {
56
+ this.onmousewheel = null;
57
+ }
58
+ // Clean up the data we added to the element
59
+ $.removeData(this, 'mousewheel-line-height');
60
+ $.removeData(this, 'mousewheel-page-height');
61
+ },
62
+
63
+ getLineHeight: function(elem) {
64
+ var $elem = $(elem),
65
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
66
+ if (!$parent.length) {
67
+ $parent = $('body');
68
+ }
69
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
70
+ },
71
+
72
+ getPageHeight: function(elem) {
73
+ return $(elem).height();
74
+ },
75
+
76
+ settings: {
77
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
78
+ normalizeOffset: true // calls getBoundingClientRect for each event
79
+ }
80
+ };
81
+
82
+ $.fn.extend({
83
+ mousewheel: function(fn) {
84
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
85
+ },
86
+
87
+ unmousewheel: function(fn) {
88
+ return this.unbind('mousewheel', fn);
89
+ }
90
+ });
91
+
92
+
93
+ function handler(event) {
94
+ var orgEvent = event || window.event,
95
+ args = slice.call(arguments, 1),
96
+ delta = 0,
97
+ deltaX = 0,
98
+ deltaY = 0,
99
+ absDelta = 0,
100
+ offsetX = 0,
101
+ offsetY = 0;
102
+ event = $.event.fix(orgEvent);
103
+ event.type = 'mousewheel';
104
+
105
+ // Old school scrollwheel delta
106
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
107
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
108
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
109
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
110
+
111
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
112
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
113
+ deltaX = deltaY * -1;
114
+ deltaY = 0;
115
+ }
116
+
117
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
118
+ delta = deltaY === 0 ? deltaX : deltaY;
119
+
120
+ // New school wheel delta (wheel event)
121
+ if ( 'deltaY' in orgEvent ) {
122
+ deltaY = orgEvent.deltaY * -1;
123
+ delta = deltaY;
124
+ }
125
+ if ( 'deltaX' in orgEvent ) {
126
+ deltaX = orgEvent.deltaX;
127
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
128
+ }
129
+
130
+ // No change actually happened, no reason to go any further
131
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
132
+
133
+ // Need to convert lines and pages to pixels if we aren't already in pixels
134
+ // There are three delta modes:
135
+ // * deltaMode 0 is by pixels, nothing to do
136
+ // * deltaMode 1 is by lines
137
+ // * deltaMode 2 is by pages
138
+ if ( orgEvent.deltaMode === 1 ) {
139
+ var lineHeight = $.data(this, 'mousewheel-line-height');
140
+ delta *= lineHeight;
141
+ deltaY *= lineHeight;
142
+ deltaX *= lineHeight;
143
+ } else if ( orgEvent.deltaMode === 2 ) {
144
+ var pageHeight = $.data(this, 'mousewheel-page-height');
145
+ delta *= pageHeight;
146
+ deltaY *= pageHeight;
147
+ deltaX *= pageHeight;
148
+ }
149
+
150
+ // Store lowest absolute delta to normalize the delta values
151
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
152
+
153
+ if ( !lowestDelta || absDelta < lowestDelta ) {
154
+ lowestDelta = absDelta;
155
+
156
+ // Adjust older deltas if necessary
157
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
158
+ lowestDelta /= 40;
159
+ }
160
+ }
161
+
162
+ // Adjust older deltas if necessary
163
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
164
+ // Divide all the things by 40!
165
+ delta /= 40;
166
+ deltaX /= 40;
167
+ deltaY /= 40;
168
+ }
169
+
170
+ // Get a whole, normalized value for the deltas
171
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
172
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
173
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
174
+
175
+ // Normalise offsetX and offsetY properties
176
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
177
+ var boundingRect = this.getBoundingClientRect();
178
+ offsetX = event.clientX - boundingRect.left;
179
+ offsetY = event.clientY - boundingRect.top;
180
+ }
181
+
182
+ // Add information to the event object
183
+ event.deltaX = deltaX;
184
+ event.deltaY = deltaY;
185
+ event.deltaFactor = lowestDelta;
186
+ event.offsetX = offsetX;
187
+ event.offsetY = offsetY;
188
+ // Go ahead and set deltaMode to 0 since we converted to pixels
189
+ // Although this is a little odd since we overwrite the deltaX/Y
190
+ // properties with normalized deltas.
191
+ event.deltaMode = 0;
192
+
193
+ // Add event and delta to the front of the arguments
194
+ args.unshift(event, delta, deltaX, deltaY);
195
+
196
+ // Clearout lowestDelta after sometime to better
197
+ // handle multiple device types that give different
198
+ // a different lowestDelta
199
+ // Ex: trackpad = 3 and mouse wheel = 120
200
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
201
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
202
+
203
+ return ($.event.dispatch || $.event.handle).apply(this, args);
204
+ }
205
+
206
+ function nullLowestDelta() {
207
+ lowestDelta = null;
208
+ }
209
+
210
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
211
+ // If this is an older event and the delta is divisable by 120,
212
+ // then we are assuming that the browser is treating this as an
213
+ // older mouse wheel event and that we should divide the deltas
214
+ // by 40 to try and get a more usable deltaFactor.
215
+ // Side note, this actually impacts the reported scroll distance
216
+ // in older browsers and can cause scrolling to be slower than native.
217
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
218
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
219
+ }
220
+
221
+ }));
assets/js/media-delete.js ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ jQuery( document ).ready( function( $ ) {
2
+
3
+ // Delete multiple images from slider
4
+ $('a.soliloquy-slides-delete').click(function(e) {
5
+
6
+ //Prevent Default
7
+ e.preventDefault();
8
+
9
+ // Bail out if the user does not actually want to remove the image.
10
+ var confirm_delete = confirm(soliloquy_metabox.remove_multiple);
11
+ if ( ! confirm_delete ) {
12
+ return false;
13
+ }
14
+
15
+
16
+ // Build array of image attachment IDs
17
+ var attach_ids = [];
18
+
19
+ //Get all selectd Images
20
+ $('ul#soliloquy-output > li.selected').each(function() {
21
+
22
+ attach_ids.push($(this).attr('id'));
23
+
24
+ });
25
+
26
+ // Prepare our data to be sent via Ajax.
27
+ var remove = {
28
+ action: 'soliloquy_remove_slides',
29
+ attachment_ids:attach_ids,
30
+ post_id: soliloquy_metabox.id,
31
+ nonce: soliloquy_metabox.remove_nonce
32
+ };
33
+
34
+ // Process the Ajax response and output all the necessary data.
35
+ $.post(
36
+ soliloquy_metabox.ajax,
37
+ remove,
38
+ function(response) {
39
+
40
+ // Remove each image
41
+ $('ul#soliloquy-output > li.selected').remove();
42
+
43
+ //Hide Bulk Actions
44
+ $( '.soliloquy-bulk-actions' ).fadeOut();
45
+
46
+ //Uncheck the checkbox
47
+ $('.soliloquy-select-all').prop('checked', false);
48
+
49
+ // Refresh the modal view to ensure no items are still checked if they have been removed.
50
+ $('.soliloquy-load-library').attr('data-soliloquy-offset', 0).addClass('has-search').trigger('click');
51
+
52
+ // Repopulate the Soliloquy Slide Collection
53
+ SoliloquySlidesUpdate( false );
54
+
55
+ //Get Slide Count
56
+ var list = $('#soliloquy-output li').length;
57
+
58
+ //Update the slide count text
59
+ $('.soliloquy-count').text( list.toString() );
60
+
61
+ //If there are no slides
62
+ if ( list === 0 ){
63
+
64
+ //Make sure bulk actions are out of view
65
+ $( '.soliloquy-bulk-actions' ).fadeOut();
66
+
67
+ //Fade out Settings header
68
+ $('.soliloquy-slide-header').fadeOut().addClass('soliloquy-hidden');
69
+
70
+ //Add Empty Slider Content
71
+ $('#soliloquy-empty-slider').removeClass('soliloquy-hidden').fadeIn();
72
+
73
+ }
74
+
75
+ },
76
+ 'json'
77
+ );
78
+ });
79
+
80
+ // Process image removal from a gallery.
81
+ $('#soliloquy-settings-content ').on('click', '.soliloquy-remove-slide', function(e){
82
+ e.preventDefault();
83
+
84
+ // Bail out if the user does not actually want to remove the image.
85
+ var confirm_delete = confirm(soliloquy_metabox.remove);
86
+ if ( ! confirm_delete ){
87
+
88
+ return;
89
+ }
90
+
91
+ // Prepare our data to be sent via Ajax.
92
+ var attach_id = $(this).parent().attr('id'),
93
+ remove = {
94
+ action: 'soliloquy_remove_slide',
95
+ attachment_id: attach_id,
96
+ post_id: soliloquy_metabox.id,
97
+ nonce: soliloquy_metabox.remove_nonce
98
+ };
99
+
100
+ // Process the Ajax response and output all the necessary data.
101
+ $.post(
102
+ soliloquy_metabox.ajax,
103
+ remove,
104
+ function(response) {
105
+ $('#' + attach_id).fadeOut('normal', function() {
106
+ $(this).remove();
107
+
108
+ // Refresh the modal view to ensure no items are still checked if they have been removed.
109
+ $('.soliloquy-load-library').attr('data-soliloquy-offset', 0).addClass('has-search').trigger('click');
110
+
111
+ // Repopulate the Envira Gallery Image Collection
112
+ SoliloquySlidesUpdate( false );
113
+
114
+ //Get the slide count
115
+ var list = $('#soliloquy-output li').length;
116
+
117
+ //Update Slide Count
118
+ $('.soliloquy-count').text( list.toString() );
119
+
120
+ if ( list === 0 ){
121
+
122
+ //Make sure bulk actions are out of view
123
+ $( '.soliloquy-bulk-actions' ).fadeOut();
124
+
125
+ //Fade out Settings header
126
+ $('.soliloquy-slide-header').fadeOut().addClass('soliloquy-hidden');
127
+
128
+ //Add Empty Slider Content
129
+ $('#soliloquy-empty-slider').removeClass('soliloquy-hidden').fadeIn();
130
+ }
131
+
132
+ });
133
+ },
134
+ 'json'
135
+ );
136
+ });
137
+ } );
assets/js/media-edit-bulk.js ADDED
@@ -0,0 +1,365 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Single Image View
3
+ * - Renders an <li> element within the bulk edit view
4
+ */
5
+ var SoliloquyBulkEditImageView = wp.Backbone.View.extend( {
6
+
7
+ /**
8
+ * The Tag Name and Tag's Class(es)
9
+ */
10
+
11
+ tagName: 'li',
12
+ className: 'attachment',
13
+
14
+ /**
15
+ * Template
16
+ * - The template to load inside the above tagName element
17
+ */
18
+ template: wp.template( 'soliloquy-meta-bulk-editor-slides' ),
19
+
20
+ /**
21
+ * Initialize
22
+ *
23
+ * @param object model SoliloquyImage Backbone Model
24
+ */
25
+ initialize: function( args ) {
26
+
27
+ // Assign the model to this view
28
+ this.model = args.model;
29
+
30
+ },
31
+
32
+ /**
33
+ * Render
34
+ * - Binds the model to the view, so we populate the view's fields and data
35
+ */
36
+ render: function() {
37
+
38
+ // Get HTML
39
+ this.$el.html( this.template( this.model.attributes ) );
40
+ return this;
41
+
42
+ }
43
+
44
+ } );
45
+
46
+ /**
47
+ * Bulk Edit View
48
+ */
49
+ var SoliloquyBulkEditView = wp.Backbone.View.extend( {
50
+
51
+ /**
52
+ * The Tag Name and Tag's Class(es)
53
+ */
54
+ id: 'soliloquy-meta-edit-bulk',
55
+ tagName: 'div',
56
+ className: 'edit-attachment-frame mode-select hide-menu hide-router',
57
+
58
+ /**
59
+ * Template
60
+ * - The template to load inside the above tagName element
61
+ */
62
+ template: wp.template( 'soliloquy-meta-bulk-editor' ),
63
+
64
+ /**
65
+ * Events
66
+ * - Functions to call when specific events occur
67
+ */
68
+ events: {
69
+ 'keyup input': 'updateItem',
70
+ 'keyup textarea': 'updateItem',
71
+ 'change input': 'updateItem',
72
+ 'change textarea': 'updateItem',
73
+ 'blur textarea': 'updateItem',
74
+ 'change select': 'updateItem',
75
+
76
+ 'click .actions a.soliloquy-meta-submit': 'saveItem',
77
+
78
+ 'keyup input#link-search': 'searchLinks',
79
+ 'click div.query-results li': 'insertLink',
80
+
81
+ 'click button.media-file': 'insertMediaFileLink',
82
+ 'click button.attachment-page': 'insertAttachmentPageLink',
83
+ },
84
+
85
+ /**
86
+ * Initialize
87
+ *
88
+ * @param object model SoliloquyImage Backbone Model
89
+ */
90
+ initialize: function( args ) {
91
+
92
+ // Define loading and loaded events, which update the UI with what's happening.
93
+ this.on( 'loading', this.loading, this );
94
+ this.on( 'loaded', this.loaded, this );
95
+
96
+ // Set some flags
97
+ this.is_loading = false;
98
+ this.collection = args.collection;
99
+ this.child_views = args.child_views;
100
+
101
+ // The model will be blank, as we want the user's settings for each
102
+ // option to then apply to the entire collection
103
+ this.model = new SoliloquySlide();
104
+
105
+ },
106
+
107
+ /**
108
+ * Render
109
+ * - Binds the collection to the view, so we populate the view's attachments grid
110
+ */
111
+ render: function() {
112
+
113
+ // Get HTML
114
+ this.$el.html( this.template( this.model.toJSON() ) );
115
+
116
+ // Render selected items
117
+ this.collection.forEach( function( model ) {
118
+ // Init with model
119
+ var child_view = new SoliloquyBulkEditImageView( {
120
+ model: model
121
+ } );
122
+
123
+ // Render view within our main view
124
+ this.$el.find( 'ul.attachments' ).append( child_view.render().el );
125
+ }, this );
126
+
127
+ // If any child views exist, render them now
128
+ if ( this.child_views.length > 0 ) {
129
+ this.child_views.forEach( function( view ) {
130
+ // Init with model
131
+ var child_view = new view( {
132
+ model: this.model
133
+ } );
134
+
135
+ // Render view within our main view
136
+ this.$el.find( 'div.addons' ).append( child_view.render().el );
137
+ }, this );
138
+ }
139
+
140
+ // Set caption
141
+ this.$el.find( 'textarea[name=caption]' ).val( this.model.get( 'caption' ) );
142
+
143
+ // Init QuickTags on the caption editor
144
+ // Delay is required for the first load for some reason
145
+ setTimeout( function() {
146
+ quicktags( {
147
+ id: 'caption',
148
+ buttons:'strong,em,link,ul,ol,li,close'
149
+ } );
150
+ QTags._buttonsInit();
151
+ }, 100 );
152
+
153
+ // Init Link Searching
154
+ wpLink.init;
155
+
156
+ // Return
157
+ return this;
158
+
159
+ },
160
+
161
+ /**
162
+ * Renders an error using
163
+ * wp.media.view.SoliloquyError
164
+ */
165
+ renderError: function( error ) {
166
+
167
+ // Define model
168
+ var model = {};
169
+ model.error = error;
170
+
171
+ // Define view
172
+ var view = new wp.media.view.SoliloquyError( {
173
+ model: model
174
+ } );
175
+
176
+ // Return rendered view
177
+ return view.render().el;
178
+
179
+ },
180
+
181
+ /**
182
+ * Tells the view we're loading by displaying a spinner
183
+ */
184
+ loading: function() {
185
+
186
+ // Set a flag so we know we're loading data
187
+ this.is_loading = true;
188
+
189
+ // Show the spinner
190
+ this.$el.find( '.spinner' ).css( 'visibility', 'visible' );
191
+
192
+ },
193
+
194
+ /**
195
+ * Hides the loading spinner
196
+ */
197
+ loaded: function( response ) {
198
+
199
+ // Set a flag so we know we're not loading anything now
200
+ this.is_loading = false;
201
+
202
+ // Hide the spinner
203
+ this.$el.find( '.spinner' ).css( 'visibility', 'hidden' );
204
+
205
+ // Display the error message, if it's provided
206
+ if ( typeof response !== 'undefined' ) {
207
+ this.$el.find( 'ul.attachments' ).before( this.renderError( response ) );
208
+ }
209
+
210
+ },
211
+
212
+ /**
213
+ * Updates the model based on the changed view data
214
+ */
215
+ updateItem: function( event ) {
216
+
217
+ // Check if the target has a name. If not, it's not a model value we want to store
218
+ if ( event.target.name == '' ) {
219
+ return;
220
+ }
221
+
222
+ // Update the model's value, depending on the input type
223
+ if ( event.target.type == 'checkbox' ) {
224
+ value = ( event.target.checked ? 1 : 0 );
225
+ } else {
226
+ value = event.target.value;
227
+ }
228
+
229
+ // Update the model
230
+ this.model.set( event.target.name, value );
231
+
232
+ },
233
+
234
+ /**
235
+ * Saves the image metadata
236
+ */
237
+ saveItem: function() {
238
+
239
+ // Tell the View we're loading
240
+ this.trigger( 'loading' );
241
+
242
+ // Build an array of image IDs
243
+ var image_ids = [];
244
+ this.collection.forEach( function( model ) {
245
+ image_ids.push( model.id );
246
+ }, this );
247
+
248
+ // Make an AJAX request to save the image metadata for the collection's images
249
+ wp.media.ajax( 'soliloquy_bulk_save_meta', {
250
+ context: this,
251
+ data: {
252
+ nonce: soliloquy_metabox.save_nonce,
253
+ post_id: soliloquy_metabox.id,
254
+ meta: this.model.attributes,
255
+ image_ids: image_ids,
256
+ },
257
+ success: function( response ) {
258
+
259
+ // For each image, update the model based on the edited information before inserting it as JSON
260
+ // into the underlying image.
261
+ this.collection.forEach( function( model ) {
262
+
263
+ for ( var key in this.model.attributes ) {
264
+ value = this.model.attributes[ key ];
265
+
266
+ // If the value is not blank, assign the value to the image model
267
+ if ( value.length > 0 ) {
268
+ model.set( key, value );
269
+ }
270
+ }
271
+
272
+ // Assign the model to the underlying image item in the DOM
273
+ var item = JSON.stringify( model.attributes );
274
+ jQuery( 'ul#soliloquy li#' + model.get( 'id' ) ).attr( 'data-solioquy-image-model', item );
275
+ jQuery( 'ul#soliloquy li#' + model.get( 'id' ) + ' div.title' ).text( model.get( 'title' ) );
276
+
277
+ }, this );
278
+
279
+ // Tell the view we've finished successfully
280
+ this.trigger( 'loaded loaded:success' );
281
+
282
+ // Close the modal
283
+ SoliloquyModalWindow.close();
284
+ },
285
+ error: function( error_message ) {
286
+
287
+ // Tell wp.media we've finished, but there was an error
288
+ this.trigger( 'loaded loaded:error', error_message );
289
+
290
+ }
291
+ } );
292
+
293
+ },
294
+
295
+ /**
296
+ * Inserts the direct media link for the Media Library item
297
+ *
298
+ * The button triggering this event is only displayed if we are editing a
299
+ * Media Library item, so there's no need to perform further checks
300
+ */
301
+ insertMediaFileLink: function( event ) {
302
+
303
+ // Tell the View we're loading
304
+ this.trigger( 'loading' );
305
+
306
+ // Update model
307
+ this.model.set( 'link', response.media_link );
308
+
309
+ // Tell the view we've finished successfully
310
+ this.trigger( 'loaded loaded:success' );
311
+
312
+ // Re-render the view
313
+ this.render();
314
+
315
+ },
316
+
317
+ /**
318
+ * Inserts the attachment page link for the Media Library item
319
+ *
320
+ * The button triggering this event is only displayed if we are editing a
321
+ * Media Library item, so there's no need to perform further checks
322
+ */
323
+ insertAttachmentPageLink: function( event ) {
324
+
325
+ // Tell the View we're loading
326
+ this.trigger( 'loading' );
327
+
328
+ // Update model
329
+ this.model.set( 'link', response.media_link );
330
+
331
+ // Tell the view we've finished successfully
332
+ this.trigger( 'loaded loaded:success' );
333
+
334
+ // Re-render the view
335
+ this.render();
336
+
337
+ }
338
+
339
+ } );
340
+
341
+ jQuery( document ).ready( function( $ ) {
342
+
343
+ // Bulk Edit Slides
344
+ $( '#soliloquy-settings-content' ).on( 'click', 'a.soliloquy-slides-edit', function( e ) {
345
+
346
+ // Prevent default action
347
+ e.preventDefault();
348
+
349
+ // (Re)populate the collection
350
+ // The collection can change based on whether the user previously selected specific slides
351
+ SoliloquySlidesUpdate( true ); // true = only selected images
352
+
353
+ // Pass the collection of images for this gallery to the modal view, as well
354
+ // as the selected attachment
355
+ SoliloquyModalWindow.content( new SoliloquyBulkEditView( {
356
+ collection: SoliloquySlides,
357
+ child_views: SoliloquyChildViews,
358
+ } ) );
359
+
360
+ // Open the modal window
361
+ SoliloquyModalWindow.open();
362
+
363
+ } );
364
+
365
+ } );
assets/js/media-edit.js ADDED
@@ -0,0 +1,575 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ /**
3
+ * Slide Model
4
+ */
5
+ var SoliloquySlide = Backbone.Model.extend( {
6
+
7
+ /**
8
+ * Defaults
9
+ * As we always populate this model with existing data, we
10
+ * leave these blank to just show how this model is structured.
11
+ */
12
+ defaults: {
13
+ 'id': '',
14
+ 'title': '',
15
+ 'caption': '',
16
+ 'alt': '',
17
+ 'link': '',
18
+ 'type': '',
19
+
20
+ },
21
+
22
+ } );
23
+
24
+ /**
25
+ * Images Collection
26
+ * - Comprises of all slides in an Soliloquy Slider
27
+ * - Each image is represented by an SoliloquySlides Model
28
+ */
29
+ var SoliloquySlides = new Backbone.Collection;
30
+
31
+ /**
32
+ * Modal Window
33
+ */
34
+ var SoliloquyModalWindow = new wp.media.view.Modal( {
35
+ controller: {
36
+ trigger: function() {
37
+
38
+ }
39
+ }
40
+ } );
41
+
42
+ /**
43
+ * View
44
+ */
45
+ var SoliloquyView = wp.Backbone.View.extend( {
46
+
47
+ /**
48
+ * The Tag Name and Tag's Class(es)
49
+ */
50
+ id: 'soliloquy-meta-edit',
51
+ tagName: 'div',
52
+ className: 'edit-attachment-frame mode-select hide-menu hide-router',
53
+
54
+ /**
55
+ * Template
56
+ * - The template to load inside the above tagName element
57
+ */
58
+ template: wp.template( 'soliloquy-meta-editor' ),
59
+
60
+ /**
61
+ * Events
62
+ * - Functions to call when specific events occur
63
+ */
64
+ events: {
65
+ 'click .edit-media-header .left': 'loadPreviousItem',
66
+ 'click .edit-media-header .right': 'loadNextItem',
67
+
68
+ 'keyup input': 'updateItem',
69
+ 'keyup textarea': 'updateItem',
70
+ 'change input': 'updateItem',
71
+ 'change textarea': 'updateItem',
72
+ 'keyup .CodeMirror': 'updateCode',
73
+ 'blur textarea': 'updateItem',
74
+
75
+ 'change select': 'updateItem',
76
+
77
+ 'click a.soliloquy-meta-submit': 'saveItem',
78
+
79
+ 'keyup input#link-search': 'searchLinks',
80
+ 'click div.query-results li': 'insertLink',
81
+
82
+ 'click a.soliloquy-thumbnail': 'insertThumb',
83
+ 'click a.soliloquy-thumbnail-delete': 'removeThumb',
84
+
85
+ 'click button.media-file': 'insertMediaFileLink',
86
+ 'click button.attachment-page': 'insertAttachmentPageLink',
87
+ },
88
+
89
+ /**
90
+ * Initialize
91
+ *
92
+ * @param object model SoliloquyImage Backbone Model
93
+ */
94
+ initialize: function( args ) {
95
+
96
+ // Set some flags
97
+ this.is_loading = false;
98
+ this.collection = args.collection;
99
+ this.child_views = args.child_views;
100
+ this.attachment_id = args.attachment_id;
101
+ this.attachment_index = 0;
102
+ this.search_timer = '';
103
+
104
+ // Get the model from the collection
105
+ var count = 0;
106
+ this.collection.each( function( model ) {
107
+ // If this model's id matches the attachment id, this is the model we want
108
+ if ( model.get( 'id' ) == this.attachment_id ) {
109
+ this.model = model;
110
+ this.attachment_index = count;
111
+ return false;
112
+ }
113
+
114
+ // Increment the index count
115
+ count++;
116
+ }, this );
117
+
118
+ },
119
+ updateCode: function( e ){
120
+
121
+ console.log('logged');
122
+ $model = this.model;
123
+
124
+ $textarea = this.$el.find('.soliloquy-html-slide-code');
125
+
126
+ $model.set( 'code', this.editor.getValue(), { silent: true } );
127
+
128
+ $textarea.text();
129
+
130
+ },
131
+ insertThumb: function( e ){
132
+
133
+ $model = this.model;
134
+
135
+ e.preventDefault();
136
+
137
+ // Get input field class name
138
+ var fieldClassName = this.$el.data('field');
139
+
140
+ var soliloquy_media_frame = wp.media.frames.soliloquy_media_frame = wp.media({
141
+ className: 'media-frame soliloquy-media-frame',
142
+ frame: 'select',
143
+ multiple: false,
144
+ title: soliloquy_metabox.videoframe,
145
+ library: {
146
+ type: 'image'
147
+ },
148
+ button: {
149
+ text: soliloquy_metabox.videouse
150
+ }
151
+ });
152
+
153
+ soliloquy_media_frame.on('select', function(){
154
+
155
+ // Grab our attachment selection and construct a JSON representation of the model.
156
+ var thumbnail = soliloquy_media_frame.state().get('selection').first().toJSON();
157
+
158
+ $model.set( 'src', thumbnail.url, { silent: true } );
159
+ jQuery('div.thumbnail > img', $parent.find('.media-frame-content') ).attr('src', thumbnail.url );
160
+
161
+ });
162
+
163
+ // Now that everything has been set, let's open up the frame.
164
+ soliloquy_media_frame.open();
165
+ },
166
+
167
+ removeThumb: function(e){
168
+
169
+ e.preventDefault();
170
+
171
+ $model = this.model;
172
+ $parent = this.$el.parent();
173
+
174
+ jQuery('div.thumbnail > img', $parent.find('.media-frame-content') ).attr('src','' );
175
+
176
+ $model.set( 'src', '', { silent: true } );
177
+
178
+ },
179
+ /**
180
+ * Render
181
+ * - Binds the model to the view, so we populate the view's fields and data
182
+ */
183
+ render: function() {
184
+
185
+ // Get HTML
186
+ this.$el.html( this.template( this.model.attributes ) );
187
+ // If any child views exist, render them now
188
+ if ( this.child_views.length > 0 ) {
189
+ this.child_views.forEach( function( view ) {
190
+ // Init with model
191
+ var child_view = new view( {
192
+ model: this.model
193
+ } );
194
+
195
+ // Render view within our main view
196
+ this.$el.find( 'div.addons' ).append( child_view.render().el );
197
+
198
+ }, this );
199
+ }
200
+
201
+ // Set caption
202
+ this.$el.find( 'textarea[name=caption]' ).val( this.model.get( 'caption' ) );
203
+
204
+ // Init QuickTags on the caption editor
205
+ // Delay is required for the first load for some reason
206
+ setTimeout( function() {
207
+ quicktags( {
208
+ id: 'caption',
209
+ buttons:'strong,em,link,ul,ol,li,close'
210
+ } );
211
+ QTags._buttonsInit();
212
+ }, 500 );
213
+
214
+ // Init Link Searching
215
+ wpLink.init;
216
+
217
+ // Enable / disable the buttons depending on the index
218
+ if ( this.attachment_index == 0 ) {
219
+ // Disable left button
220
+ this.$el.find( 'button.left' ).addClass( 'disabled' );
221
+ }
222
+ if ( this.attachment_index == ( this.collection.length - 1 ) ) {
223
+ // Disable right button
224
+ this.$el.find( 'button.right' ).addClass( 'disabled' );
225
+ }
226
+
227
+ textarea = this.$el.find('.soliloquy-html-slide-code');
228
+
229
+ if (textarea.length) {
230
+
231
+ this.editor = CodeMirror.fromTextArea( textarea[0] , {
232
+ enterMode: 'keep',
233
+ indentUnit: 4,
234
+ electricChars: false,
235
+ lineNumbers: true,
236
+ lineWrapping: true,
237
+ matchBrackets: true,
238
+ mode: 'php',
239
+ smartIndent: false,
240
+ tabMode: 'shift',
241
+ theme: 'ttcn'
242
+ });
243
+
244
+ }
245
+
246
+ this.$el.trigger( 'soliloquyRenderMeta' );
247
+
248
+ // Return
249
+ return this;
250
+
251
+ },
252
+
253
+ /**
254
+ * Tells the view we're loading by displaying a spinner
255
+ */
256
+ loading: function() {
257
+
258
+ // Set a flag so we know we're loading data
259
+ this.is_loading = true;
260
+
261
+ // Show the spinner
262
+ this.$el.find( '.spinner' ).css( 'visibility', 'visible' );
263
+
264
+ },
265
+
266
+ /**
267
+ * Hides the loading spinner
268
+ */
269
+ loaded: function( response ) {
270
+
271
+ // Set a flag so we know we're not loading anything now
272
+ this.is_loading = false;
273
+
274
+ // Hide the spinner
275
+ this.$el.find( '.spinner' ).css( 'visibility', 'hidden' );
276
+
277
+ // Display the error message, if it's provided
278
+ if ( typeof response !== 'undefined' ) {
279
+ alert( response );
280
+ }
281
+
282
+ },
283
+
284
+ /**
285
+ * Load the previous model in the collection
286
+ */
287
+ loadPreviousItem: function() {
288
+
289
+ // Decrement the index
290
+ this.attachment_index--;
291
+
292
+ // Get the model at the new index from the collection
293
+ this.model = this.collection.at( this.attachment_index );
294
+
295
+ // Update the attachment_id
296
+ this.attachment_id = this.model.get( 'id' );
297
+
298
+ // Re-render the view
299
+ this.render();
300
+
301
+ },
302
+
303
+ /**
304
+ * Load the next model in the collection
305
+ */
306
+ loadNextItem: function() {
307
+
308
+ // Increment the index
309
+ this.attachment_index++;
310
+
311
+ // Get the model at the new index from the collection
312
+ this.model = this.collection.at( this.attachment_index );
313
+
314
+ // Update the attachment_id
315
+ this.attachment_id = this.model.get( 'id' );
316
+
317
+ // Re-render the view
318
+ this.render();
319
+
320
+
321
+ },
322
+
323
+ /**
324
+ * Updates the model based on the changed view data
325
+ */
326
+ updateItem: function( event ) {
327
+
328
+ // Check if the target has a name. If not, it's not a model value we want to store
329
+ if ( event.target.name == '' ) {
330
+ return;
331
+ }
332
+
333
+ // Update the model's value, depending on the input type
334
+ if ( event.target.type == 'checkbox' ) {
335
+ value = ( event.target.checked ? 1 : 0 );
336
+ } else {
337
+ value = event.target.value;
338
+ }
339
+
340
+ // Update the model
341
+ this.model.set( event.target.name, value );
342
+
343
+ },
344
+
345
+ /**
346
+ * Saves the image metadata
347
+ */
348
+ saveItem: function( event ) {
349
+
350
+ event.preventDefault();
351
+
352
+ // Tell the View we're loading
353
+ this.trigger( 'loading' );
354
+
355
+ // Make an AJAX request to save the image metadata
356
+ wp.media.ajax( 'soliloquy_save_meta', {
357
+ context: this,
358
+ data: {
359
+ nonce: soliloquy_metabox.save_nonce,
360
+ post_id: soliloquy_metabox.id,
361
+ attach_id: this.model.get( 'id' ),
362
+ meta: this.model.attributes,
363
+ },
364
+ success: function( response ) {
365
+
366
+ // Tell the view we've finished successfully
367
+ this.trigger( 'loaded loaded:success' );
368
+
369
+ // Assign the model's JSON string back to the underlying item
370
+ var item = JSON.stringify( this.model.attributes );
371
+ jQuery( 'ul#soliloquy-output li#' + this.model.get( 'id' ) ).attr( 'data-soliloquy-image-model', item );
372
+ // Show the user the 'saved' notice for 1.5 seconds
373
+ var saved = this.$el.find( '.saved' );
374
+ saved.fadeIn();
375
+ setTimeout( function() {
376
+ saved.fadeOut();
377
+ }, 1500 );
378
+
379
+ },
380
+ error: function( error_message ) {
381
+
382
+ // Tell wp.media we've finished, but there was an error
383
+ this.trigger( 'loaded loaded:error', error_message );
384
+
385
+ }
386
+ } );
387
+
388
+ },
389
+
390
+ /**
391
+ * Searches Links
392
+ */
393
+ searchLinks: function( event ) {
394
+
395
+
396
+ },
397
+
398
+ /**
399
+ * Inserts the clicked link into the URL field
400
+ */
401
+ insertLink: function( event ) {
402
+
403
+
404
+
405
+ },
406
+
407
+ /**
408
+ * Inserts the direct media link for the Media Library item
409
+ *
410
+ * The button triggering this event is only displayed if we are editing a
411
+ * Media Library item, so there's no need to perform further checks
412
+ */
413
+ insertMediaFileLink: function( event ) {
414
+
415
+ // Tell the View we're loading
416
+ this.trigger( 'loading' );
417
+
418
+ // Make an AJAX request to get the media link
419
+ wp.media.ajax( 'soliloquy_get_attachment_links', {
420
+ context: this,
421
+ data: {
422
+ nonce: soliloquy_metabox.save_nonce,
423
+ attachment_id: this.model.get( 'id' ),
424
+ },
425
+ success: function( response ) {
426
+
427
+ // Update model
428
+ this.model.set( 'link', response.media_link );
429
+
430
+ // Tell the view we've finished successfully
431
+ this.trigger( 'loaded loaded:success' );
432
+
433
+ // Re-render the view
434
+ this.render();
435
+
436
+ },
437
+ error: function( error_message ) {
438
+
439
+ // Tell wp.media we've finished, but there was an error
440
+ this.trigger( 'loaded loaded:error', error_message );
441
+
442
+ }
443
+ } );
444
+
445
+ },
446
+
447
+ /**
448
+ * Inserts the attachment page link for the Media Library item
449
+ *
450
+ * The button triggering this event is only displayed if we are editing a
451
+ * Media Library item, so there's no need to perform further checks
452
+ */
453
+ insertAttachmentPageLink: function( event ) {
454
+
455
+ // Tell the View we're loading
456
+ this.trigger( 'loading' );
457
+
458
+ // Make an AJAX request to get the media link
459
+ wp.media.ajax( 'soliloquy_get_attachment_links', {
460
+ context: this,
461
+ data: {
462
+ nonce: soliloquy_metabox.save_nonce,
463
+ attachment_id: this.model.get( 'id' ),
464
+ },
465
+ success: function( response ) {
466
+
467
+ // Update model
468
+ this.model.set( 'link', response.attachment_page );
469
+
470
+ // Tell the view we've finished successfully
471
+ this.trigger( 'loaded loaded:success' );
472
+
473
+ // Re-render the view
474
+ this.render();
475
+
476
+ },
477
+ error: function( error_message ) {
478
+
479
+ // Tell wp.media we've finished, but there was an error
480
+ this.trigger( 'loaded loaded:error', error_message );
481
+
482
+ }
483
+ } );
484
+
485
+ }
486
+
487
+ } );
488
+
489
+ /**
490
+ * Sub Views
491
+ * - Addons must populate this array with their own Backbone Views, which will be appended
492
+ * to the settings region
493
+ */
494
+ var SoliloquyChildViews = [];
495
+ var SoliloquyContentViews = [];
496
+
497
+ /**
498
+ * DOM
499
+ */
500
+ ;(function($) {
501
+
502
+ $( document ).ready( function() {
503
+
504
+ soliloquy_edit = {
505
+
506
+ init: function(){
507
+
508
+ // Populate the collection
509
+ SoliloquySlidesUpdate();
510
+
511
+ // Edit Image
512
+ $( '#soliloquy-settings-content' ).on( 'click.soliloquyModify', '.soliloquy-modify-slide', function( e ) {
513
+
514
+ // Prevent default action
515
+ e.preventDefault();
516
+
517
+ // Get the selected attachment
518
+ var attachment_id = $( this ).parent().data( 'soliloquy-slide' );
519
+
520
+ // Pass the collection of images for this gallery to the modal view, as well
521
+ // as the selected attachment
522
+ SoliloquyModalWindow.content( new SoliloquyView( {
523
+ collection: SoliloquySlides,
524
+ child_views: SoliloquyChildViews,
525
+ attachment_id: attachment_id,
526
+ } ) );
527
+
528
+ // Open the modal window
529
+ SoliloquyModalWindow.open();
530
+
531
+ $('.CodeMirror').each(function(i, el){
532
+ el.CodeMirror.refresh();
533
+ });
534
+
535
+ } );
536
+
537
+ }
538
+ }
539
+
540
+ soliloquy_edit.init();
541
+
542
+ } );
543
+
544
+ $(document).on('soliloquyUploaded', function() {
545
+
546
+ soliloquy_edit.init();
547
+
548
+ });
549
+
550
+ })(jQuery);
551
+
552
+ /**
553
+ * Populates the SoliloquySlides Backbone collection
554
+ *
555
+ * Called when images are added, deleted or reordered
556
+ * Doesn't need to be called when an image is edited, as the model will be updated automatically in the collection
557
+ */
558
+ function SoliloquySlidesUpdate( selected ) {
559
+
560
+ // Clear the collection
561
+ SoliloquySlides.reset();
562
+
563
+ var $items = 'ul#soliloquy-output li.soliloquy-slide' + ( selected ? '.selected' : '' );
564
+
565
+ // Iterate through the gallery images in the DOM, adding them to the collection
566
+ jQuery( $items ).each( function() {
567
+
568
+ // Build an SoliloquyImage Backbone Model from the JSON supplied in the element
569
+ var soliloquy_slide = jQuery.parseJSON( jQuery( this ).attr( 'data-soliloquy-image-model' ) );
570
+
571
+ // Add the model to the collection
572
+ SoliloquySlides.add( new SoliloquySlide( soliloquy_slide ) );
573
+ } );
574
+
575
+ }
assets/js/media-insert.js ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Creates and handles a wp.media instance for soliloquy Galleries, allowing
3
+ * the user to insert images from the Media Library into their Gallery
4
+ */
5
+ jQuery( document ).ready( function( $ ) {
6
+
7
+ // Add Images
8
+ $( 'a.soliloquy-media-library' ).on( 'click', function( e ) {
9
+
10
+ // Prevent default action
11
+ e.preventDefault();
12
+
13
+ // If the wp.media.frames.soliloquy instance already exists, reopen it
14
+ if ( wp.media.frames.soliloquy ) {
15
+ wp.media.frames.soliloquy.open();
16
+
17
+ return;
18
+
19
+ } else {
20
+
21
+ // Create the wp.media.frames.soliloquy instance (one time)
22
+ wp.media.frames.soliloquy = new wp.media.view.MediaFrame.Post( {
23
+
24
+ title: wp.media.view.l10n.insertIntoPost,
25
+ button: {
26
+ text: wp.media.view.l10n.insertIntoPost,
27
+ },
28
+ multiple: true,
29
+ // Library WordPress query arguments.
30
+ library: {
31
+ // mime type. e.g. 'image', 'image/jpeg'
32
+ type: 'image',
33
+
34
+ }
35
+ } );
36
+ }
37
+
38
+ // Mark existing Gallery images as selected when the modal is opened
39
+ wp.media.frames.soliloquy.on( 'open', function() {
40
+
41
+ // Get any previously selected images
42
+ var selection = wp.media.frames.soliloquy.state().get( 'selection' );
43
+
44
+ // Get images that already exist in the gallery, and select each one in the modal
45
+ $( 'ul#soliloquy-output li' ).each( function() {
46
+
47
+ var attachment = wp.media.attachment( $( this ).attr( 'id' ) );
48
+
49
+ selection.add( attachment ? [ attachment ] : [] );
50
+
51
+ } );
52
+
53
+ } );
54
+
55
+ //Trigger Event when the frame is ready.
56
+ wp.media.frames.soliloquy.on( 'ready', function(e){
57
+
58
+ });
59
+ // Insert into Gallery Button Clicked
60
+ wp.media.frames.soliloquy.on( 'insert', function( selection ) {
61
+
62
+ // Get state
63
+ var state = wp.media.frames.soliloquy.state(),
64
+ images = [];
65
+
66
+ // Iterate through selected images, building an images array
67
+ selection.each( function( attachment ) {
68
+
69
+ // Get the chosen options for this image (size, alignment, link type, link URL)
70
+ var display = state.display( attachment ).toJSON(),
71
+ type = attachment.get( 'type' );
72
+
73
+ // Change the image link parameter based on the "Link To" setting the user chose in the media view
74
+ switch ( display.link ) {
75
+ case 'none':
76
+ attachment.set( 'link', '' );
77
+ break;
78
+ case 'file':
79
+ attachment.set( 'link', attachment.get( 'url' ) );
80
+ break;
81
+ case 'post':
82
+ // Already linked to post by default
83
+ break;
84
+ case 'custom':
85
+ attachment.set( 'link', display.linkUrl );
86
+ break;
87
+ }
88
+
89
+ //Only allow images selections to be inserted
90
+ if ( type === 'image' ){
91
+
92
+ // Add the image to the images array
93
+ images.push( attachment.toJSON() );
94
+ }
95
+
96
+ }, this );
97
+ // Send the ajax request with our data to be processed.
98
+ $.post(
99
+ soliloquy_metabox.ajax,
100
+ {
101
+ action: 'soliloquy_insert_slides',
102
+ nonce: soliloquy_metabox.insert_nonce,
103
+ post_id: soliloquy_metabox.id,
104
+ images: images,
105
+ },
106
+ function( response ) {
107
+ // Response should be a JSON success with the HTML for the image grid
108
+ if ( response ) {
109
+
110
+
111
+ // Set the image grid to the HTML we received
112
+ $( '#soliloquy-output' ).html( response.data );
113
+
114
+ // Repopulate the Soliloquy Slide Collection
115
+ SoliloquySlidesUpdate();
116
+ var list = $('#soliloquy-output li').length;
117
+
118
+ //update the count value
119
+ $('.soliloquy-count').text( list.toString() );
120
+
121
+ if ( list > 0 ){
122
+
123
+ $('#soliloquy-empty-slider').fadeOut().addClass('soliloquy-hidden');
124
+ $('.soliloquy-slide-header').removeClass('soliloquy-hidden').fadeIn();
125
+ $( '.soliloquy-bulk-actions' ).fadeOut();
126
+
127
+ }
128
+ }
129
+
130
+ },
131
+ 'json'
132
+ );
133
+
134
+ } );
135
+
136
+ // Open the media frame
137
+ wp.media.frames.soliloquy.open();
138
+ // Remove the 'Create Gallery' left hand menu item in the modal, as we don't
139
+ // want users inserting galleries!
140
+ $( 'div.media-menu a.media-menu-item:nth-child(2)' ).addClass( 'hidden' );
141
+ $( 'div.media-menu a.media-menu-item:nth-child(4)' ).addClass( 'hidden' );
142
+ $( 'div.media-menu a.media-menu-item:nth-child(6)' ).addClass( 'hidden' );
143
+
144
+ return;
145
+
146
+ } );
147
+
148
+ } );
assets/js/media-manage.js ADDED
@@ -0,0 +1,513 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Handles Mangement functions, deselection and sorting of media in an Soliloquy slider
3
+ */
4
+ ;(function ($, window, document, soliloquy_metabox ) {
5
+
6
+ "use strict";
7
+
8
+ var soliloquy_manage = {
9
+
10
+ //Init, Triggers all functions, used as callback on JS events.
11
+ init: function(){
12
+
13
+ this.select_all();
14
+
15
+ this.sortable();
16
+
17
+ this.select();
18
+
19
+ this.display();
20
+
21
+ this.chosen();
22
+
23
+ this.slide_size();
24
+
25
+ this.uploadImage();
26
+
27
+ this.toggleStatus();
28
+
29
+ this.tooltip();
30
+
31
+ this.clear_selected();
32
+
33
+ //Init the Clipboard
34
+ new Clipboard('.soliloquy-clipboard');
35
+
36
+ //Prevent Default Action on check
37
+ $('ul#soliloquy-output').on('click', 'a.check', function(e){
38
+
39
+ e.preventDefault();
40
+
41
+ });
42
+
43
+ //Prevent Default on Clipboard
44
+ $('.soliloquy-clipboard').on( 'click', function(e){
45
+ e.preventDefault();
46
+ });
47
+
48
+ //How many slides are in the list
49
+ var list = $('#soliloquy-output li').length;
50
+
51
+ //Set the Count
52
+ $('.soliloquy-count').text( list.toString() );
53
+
54
+ // Initialise conditional fields
55
+ $('input,select').conditional();
56
+
57
+ },
58
+
59
+ //Toggles slides status
60
+ toggleStatus: function(){
61
+
62
+ $( '#soliloquy-settings-content' ).on( 'click.soliloquyStatus', '.soliloquy-slide-status', function( e ) {
63
+ // Prevent default action
64
+ e.preventDefault();
65
+ if ( $(this).hasClass('list-status') ){
66
+
67
+ var $parent = $(this).parent().parent().parent();
68
+
69
+ }else{
70
+ var $parent = $(this).parent();
71
+
72
+ }
73
+
74
+ var $this = $(this),
75
+ $data = $this.data('status'),
76
+ $list_view = $parent.find('.soliloquy-slide-status.list-status'),
77
+ $grid_view = $parent.find('.soliloquy-slide-status.grid-status'),
78
+ $view = $this.parent().parent().data('view'),
79
+ id = $this.data('id'),
80
+ $icon = $grid_view.find('span.dashicons'),
81
+ $text = $list_view.find('span'),
82
+ $tooltip = $this.data('soliloquy-tooltip');
83
+
84
+ //Set the slider sta
85
+ if ( $data === 'active' ){
86
+ var $status = 'pending';
87
+ } else{
88
+ var $status = 'active';
89
+
90
+ }
91
+
92
+
93
+ var opts = {
94
+ url: soliloquy_metabox.ajax,
95
+ type: 'post',
96
+ async: true,
97
+ cache: false,
98
+ dataType: 'json',
99
+ data: {
100
+ action: 'soliloquy_change_slide_status',
101
+ post_id: soliloquy_metabox.id,
102
+ slide_id: id,
103
+ status: $status,
104
+ nonce: soliloquy_metabox.save_nonce
105
+ },
106
+ success: function(response) {
107
+
108
+ if( $status === 'active' ){
109
+ //Toggle Classes
110
+ $grid_view.removeClass('soliloquy-draft-slide').addClass('soliloquy-active-slide');
111
+ $list_view.removeClass('soliloquy-draft-slide').addClass('soliloquy-active-slide');
112
+
113
+ //Set the proper icons
114
+ $icon.removeClass('dashicons-hidden').addClass('dashicons-visibility');
115
+
116
+ //Set the Text
117
+ $text.text( soliloquy_metabox.active );
118
+ $grid_view.attr('data-soliloquy-tooltip', soliloquy_metabox.active );
119
+
120
+ //Set the Data
121
+ $list_view.data('status','active');
122
+ $grid_view.data('status','active');
123
+
124
+ }else{
125
+
126
+ //Toggle Classes
127
+ $grid_view.removeClass('soliloquy-active-slide').addClass('soliloquy-draft-slide');
128
+ $list_view.removeClass('soliloquy-active-slide').addClass('soliloquy-draft-slide');
129
+
130
+ //Set the proper icons
131
+ $icon.removeClass('dashicons-visibility').addClass('dashicons-hidden');
132
+
133
+ //Set the text
134
+ $text.text( soliloquy_metabox.draft );
135
+ //Set the Data
136
+ $list_view.data('status','pending');
137
+ $grid_view.data('status','pending');
138
+ $grid_view.attr('data-soliloquy-tooltip', soliloquy_metabox.draft );
139
+
140
+ }
141
+
142
+ },
143
+ error: function(xhr, textStatus ,e) {
144
+ return;
145
+ }
146
+ };
147
+ $.ajax( opts );
148
+
149
+
150
+ });
151
+ },
152
+ tooltip: function(){
153
+ $('[data-soliloquy-tooltip]').on( 'mouseover', function(e){
154
+ e.preventDefault();
155
+ var $this = $(this),
156
+ $data = $this.data('soliloquy-tooltip');
157
+
158
+ console.log( $data );
159
+
160
+ });
161
+ },
162
+ //Select all slides
163
+ select_all: function(){
164
+
165
+ //Select all
166
+ $('.soliloquy-select-all').change( function() {
167
+
168
+ var checked = this.checked;
169
+
170
+ if ( checked ){
171
+ $('ul#soliloquy-output li').addClass( 'selected' );
172
+ $( '.soliloquy-bulk-actions' ).fadeIn();
173
+
174
+ var selected = $('ul#soliloquy-output li.selected').length;
175
+
176
+ $('.select-all').text( soliloquy_metabox.selected );
177
+ $('.soliloquy-count').text( selected.toString() );
178
+ $('.soliloquy-clear-selected').fadeIn();
179
+
180
+
181
+ }else{
182
+
183
+ $('ul#soliloquy-output li').removeClass( 'selected' );
184
+ $( '.soliloquy-bulk-actions' ).fadeOut();
185
+
186
+ var list = $('ul#soliloquy-output li').length;
187
+
188
+ $('.select-all').text( soliloquy_metabox.select_all );
189
+ $('.soliloquy-count').text( list.toString() );
190
+ $('.soliloquy-clear-selected').fadeOut();
191
+
192
+ }
193
+
194
+ });
195
+ },
196
+
197
+ //Makes Slides Sortable
198
+ sortable: function(){
199
+ // Make slider items sortable.
200
+ var slider = $('#soliloquy-output');
201
+
202
+ slider.sortable({
203
+ containment: '#soliloquy-slider-main',
204
+ items: 'li',
205
+ cursor: 'move',
206
+ forcePlaceholderSize: true,
207
+ placeholder: 'dropzone',
208
+ update: function(event, ui) {
209
+ // Make ajax request to sort out items.
210
+ var opts = {
211
+ url: soliloquy_metabox.ajax,
212
+ type: 'post',
213
+ async: true,
214
+ cache: false,
215
+ dataType: 'json',
216
+ data: {
217
+ action: 'soliloquy_sort_images',
218
+ order: slider.sortable('toArray').toString(),
219
+ post_id: soliloquy_metabox.id,
220
+ nonce: soliloquy_metabox.sort
221
+ },
222
+ success: function(response) {
223
+ // Repopulate the Soliloquy slider Slide Collection
224
+ SoliloquySlidesUpdate();
225
+
226
+ return;
227
+ },
228
+ error: function(xhr, textStatus ,e) {
229
+ return;
230
+ }
231
+ };
232
+ $.ajax( opts );
233
+ }
234
+ });
235
+ },
236
+
237
+ //Select a slide
238
+ select: function(){
239
+
240
+ // Select / deselect images
241
+ var soliloquy_shift_key_pressed = false,
242
+ soliloquy_last_selected_image = false;
243
+
244
+ $( 'li.soliloquy-slide .soliloquy-item-content, .soliloquy-list li a.check' ).on( 'click', function(e) {
245
+
246
+ var $this = $(this),
247
+ slider_item = $( this ).parent();
248
+ console.log($this);
249
+ console.log(slider_item);
250
+ e.preventDefault();
251
+
252
+ if ( $( slider_item ).hasClass( 'selected' ) ) {
253
+
254
+ $( slider_item ).removeClass( 'selected' );
255
+
256
+ soliloquy_last_selected_image = false;
257
+
258
+ var selected = $('ul#soliloquy-output li.selected').length;
259
+
260
+ if( selected !== 0 ){
261
+
262
+ $('.select-all').text( soliloquy_metabox.selected );
263
+ $('.soliloquy-count').text( selected.toString() );
264
+ $('.soliloquy-clear-selected').fadeIn();
265
+
266
+
267
+ } else{
268
+
269
+ var list = $('ul#soliloquy-output li').length;
270
+
271
+ $('.select-all').text( soliloquy_metabox.select_all );
272
+ $('.soliloquy-count').text( list.toString() );
273
+ $('.soliloquy-clear-selected').fadeOut();
274
+
275
+ }
276
+
277
+ } else {
278
+
279
+ // If the shift key is being held down, and there's another image selected, select every image between this clicked image
280
+ // and the other selected image
281
+ if ( soliloquy_shift_key_pressed && soliloquy_last_selected_image !== false ) {
282
+
283
+ // Get index of the selected image and the last image
284
+ var start_index = $( 'ul#soliloquy-output li' ).index( $( soliloquy_last_selected_image ) ),
285
+ end_index = $( 'ul#soliloquy-output li' ).index( $( slider_item ) ),
286
+ i = 0;
287
+
288
+ // Select images within the range
289
+ if ( start_index < end_index ) {
290
+ for ( i = start_index; i <= end_index; i++ ) {
291
+ $( 'ul#soliloquy-output li:eq( ' + i + ')' ).addClass( 'selected' );
292
+ }
293
+ } else {
294
+ for ( i = end_index; i <= start_index; i++ ) {
295
+ $( 'ul#soliloquy-output li:eq( ' + i + ')' ).addClass( 'selected' );
296
+ }
297
+ }
298
+ }
299
+
300
+ // Select the clicked image
301
+ $( slider_item ).addClass( 'selected' );
302
+ soliloquy_last_selected_image = $( slider_item );
303
+
304
+ selected = $('ul#soliloquy-output li.selected').length;
305
+ $('.soliloquy-clear-selected').fadeIn();
306
+
307
+ $('.select-all').text( soliloquy_metabox.selected );
308
+ $('.soliloquy-count').text( selected.toString() );
309
+ }
310
+
311
+ // Show/hide 'Deleted Selected Images from Slider' button depending on whether
312
+ // any slides have been selected
313
+ if ( $( 'ul#soliloquy-output > li.selected' ).length > 0 ) {
314
+
315
+ $( '.soliloquy-bulk-actions' ).fadeIn();
316
+
317
+ } else {
318
+
319
+ $( '.soliloquy-bulk-actions' ).fadeOut();
320
+ }
321
+
322
+ } );
323
+
324
+ // Determine whether the shift key is pressed or not
325
+ $( document ).on( 'keyup keydown', function( e ) {
326
+
327
+ soliloquy_shift_key_pressed = e.shiftKey;
328
+
329
+ } );
330
+ },
331
+
332
+ //Updates slider dimenisons on Config screen
333
+ slide_size: function(){
334
+ // Set size of slider dimension fields when changing size type.
335
+ $(document).on('change', '#soliloquy-config-slider-size', function(){
336
+ var $this = $(this),
337
+ value = $this.val(),
338
+ width = $this.find(':selected').data('soliloquy-width'),
339
+ height = $this.find(':selected').data('soliloquy-height');
340
+
341
+ // Do nothing if the default value is the new value.
342
+ if ( 'default' == value ) {
343
+
344
+ $('#soliloquy-config-slider-width').val(soliloquy_metabox.slide_width);
345
+ $('#soliloquy-config-slider-height').val(soliloquy_metabox.slide_height);
346
+ }
347
+
348
+ // Otherwise, attempt to grab width/height data and apply it to dimensions.
349
+ if ( width ) {
350
+ $('#soliloquy-config-slider-width').val(width);
351
+ }
352
+
353
+ if ( height ) {
354
+ $('#soliloquy-config-slider-height').val(height);
355
+ }
356
+ });
357
+ },
358
+ //Clear Selected Slides
359
+ clear_selected: function(){
360
+
361
+ $('.soliloquy-clear-selected').on('click', function(e){
362
+
363
+ e.preventDefault();
364
+
365
+ var list = $('#soliloquy-output li').length;
366
+
367
+ $('ul#soliloquy-output li').removeClass( 'selected' );
368
+
369
+ $('.select-all').text( soliloquy_metabox.select_all );
370
+ $('.soliloquy-count').text( list.toString() );
371
+ $('.soliloquy-select-all').prop('checked', false);
372
+ $( '.soliloquy-bulk-actions' ).fadeOut();
373
+
374
+ $( this ).fadeOut();
375
+
376
+ });
377
+ },
378
+
379
+ //Change ul#soliloquy-output display type. Uses ajax to store data for each slider
380
+ display: function(){
381
+
382
+ //Toggle Grid/List Display
383
+ $( 'a.soliloquy-display' ).on( 'click', function(e){
384
+
385
+ //Prevent Default
386
+ e.preventDefault();
387
+
388
+ //Don't do anything is its already active.
389
+ if ( $(this).hasClass('active-display') ){
390
+ return;
391
+ }
392
+
393
+ var $this = $(this),
394
+ $view = $this.data('soliloquy-display'),
395
+ $output = $('#soliloquy-output'),
396
+ opts = {
397
+ url: soliloquy_metabox.ajax,
398
+ type: 'post',
399
+ async: true,
400
+ cache: false,
401
+ dataType: 'json',
402
+ data: {
403
+ action: 'soliloquy_slider_view',
404
+ post_id: soliloquy_metabox.id,
405
+ view: $view,
406
+ nonce: soliloquy_metabox.save_nonce
407
+ },
408
+ success: function(response) {
409
+
410
+ }
411
+ };
412
+
413
+ $.ajax( opts );
414
+
415
+
416
+ //Find the current active button and remove class
417
+ $('.soliloquy-display-toggle').find('.active-display').removeClass('active-display');
418
+
419
+ //Add the active class to $this
420
+ $this.addClass('active-display');
421
+
422
+ if( $view === 'grid' ){
423
+
424
+ $output.removeClass('soliloquy-list').addClass('soliloquy-grid');
425
+
426
+ }else if ( $view === 'list' ){
427
+
428
+ $output.removeClass('soliloquy-grid').addClass('soliloquy-list');
429
+
430
+ }
431
+
432
+ });
433
+
434
+ },
435
+
436
+ //Chosen Select Boxes Init
437
+ chosen: function(){
438
+
439
+ //Create the Select boxes
440
+ $('.soliloquy-chosen').each(function (){
441
+
442
+ //Get the options from the data.
443
+ var data_options = $(this).data('soliloquy-chosen-options');
444
+
445
+ $(this).chosen( data_options );
446
+
447
+ });
448
+
449
+ },
450
+
451
+ //Upload Image functioned Used in Woo and FC addons fallback.
452
+ uploadImage: function(){
453
+
454
+ $('.soliloquy-insert-image').on('click', function(e){
455
+
456
+ var soliloquy_image_frame;
457
+
458
+ e.preventDefault();
459
+
460
+ var $button = $( event.currentTarget ),
461
+ input_box = $button.parent().find('input');
462
+ console.log( input_box )
463
+ if ( soliloquy_image_frame ) {
464
+
465
+ soliloquy_image_frame.open();
466
+
467
+ return;
468
+
469
+ };
470
+
471
+ soliloquy_image_frame = wp.media.frames.soliloquy_image_frame = wp.media({
472
+
473
+ frame: 'select',
474
+ library: {
475
+ type: 'image'
476
+ },
477
+ title: soliloquy_metabox.insert_image,
478
+ button: {
479
+ text: soliloquy_metabox.insert_image,
480
+ },
481
+ contentUserSetting: false,
482
+ multiple: false
483
+ });
484
+
485
+ soliloquy_image_frame.on( 'select', function() {
486
+
487
+ var attachment = soliloquy_image_frame.state().get('selection').first().toJSON();
488
+
489
+ input_box.val( attachment.url );
490
+
491
+ });
492
+
493
+ soliloquy_image_frame.open();
494
+
495
+ });
496
+ }
497
+ };
498
+
499
+ //DOM ready
500
+ $(function(){
501
+
502
+ soliloquy_manage.init();
503
+
504
+ });
505
+
506
+ //Re init on type change
507
+ $(document).on( 'soliloquyType', function(){
508
+
509
+ soliloquy_manage.init();
510
+
511
+ });
512
+
513
+ })( jQuery , window, document, soliloquy_metabox );
assets/js/media-upload.js ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * Hooks into the global Plupload instance ('uploader'), which is set when includes/admin/metaboxes.php calls media_form()
3
+ * We hook into this global instance and apply our own changes during and after the upload.
4
+ *
5
+ * @since 1.3.1.3
6
+ */
7
+ ;(function ($, window, document, soliloquy_media_uploader ) {
8
+ $(function() {
9
+
10
+ if ( typeof uploader !== 'undefined' ) {
11
+
12
+ //soliloquy_media_uploader.uploader_files_computer
13
+ $( 'input#plupload-browse-button' ).val( soliloquy_media_uploader.uploader_files_computer );
14
+ $('.drag-drop-info').text( soliloquy_media_uploader.uploader_info_text );
15
+
16
+ // Set a custom progress bar
17
+ $('#soliloquy .drag-drop-inside').append( '<div class="soliloquy-progress-bar"><div></div></div>' );
18
+ var soliloquy_bar = $('#soliloquy .soliloquy-progress-bar'),
19
+ soliloquy_progress = $('#soliloquy .soliloquy-progress-bar div'),
20
+ soliloquy_output = $('#soliloquy-output');
21
+
22
+ // Files Added for Uploading
23
+ uploader.bind( 'FilesAdded', function ( up, files ) {
24
+ $( soliloquy_bar ).fadeIn();
25
+ });
26
+
27
+ // File Uploading - show progress bar
28
+ uploader.bind( 'UploadProgress', function( up, file ) {
29
+ $( soliloquy_progress ).css({
30
+ 'width': up.total.percent + '%'
31
+ });
32
+ });
33
+
34
+ // File Uploaded - AJAX call to process image and add to screen.
35
+ uploader.bind( 'FileUploaded', function( up, file, info ) {
36
+
37
+ // AJAX call to soliloquy to store the newly uploaded image in the meta against this Gallery
38
+ $.post(
39
+ soliloquy_media_uploader.ajax,
40
+ {
41
+ action: 'soliloquy_load_image',
42
+ nonce: soliloquy_media_uploader.load_image,
43
+ id: info.response,
44
+ post_id: soliloquy_media_uploader.id
45
+ },
46
+ function(res){
47
+
48
+ // Prepend or append the new image to the existing grid of images,
49
+ // depending on the media_position setting
50
+ switch ( soliloquy_media_uploader.media_position ) {
51
+ case 'before':
52
+ $(soliloquy_output).prepend(res);
53
+ break;
54
+ case 'after':
55
+ default:
56
+ $(soliloquy_output).append(res);
57
+ break;
58
+ }
59
+
60
+ $( document ).trigger('soliloquyUploaded');
61
+
62
+ $(res).find('.wp-editor-container').each(function(i, el){
63
+
64
+ var id = $(el).attr('id').split('-')[4];
65
+ quicktags({id: 'soliloquy-caption-' + id, buttons: 'strong,em,link,ul,ol,li,close'});
66
+ QTags._buttonsInit(); // Force buttons to initialize.
67
+
68
+ });
69
+
70
+ //How many slides are inserted into slider
71
+ var list = $('#soliloquy-output li').length;
72
+
73
+ //update the count value
74
+ $('.soliloquy-count').text( list.toString() );
75
+
76
+ //Hides empty slider screen
77
+ if ( list > 0 ){
78
+
79
+ $('#soliloquy-empty-slider').fadeOut().addClass('soliloquy-hidden');
80
+ $('.soliloquy-slide-header').removeClass('soliloquy-hidden').fadeIn();
81
+
82
+ }
83
+
84
+ },
85
+ 'json'
86
+ );
87
+ });
88
+
89
+ // Files Uploaded
90
+ uploader.bind( 'UploadComplete', function() {
91
+
92
+ // Hide Progress Bar
93
+ $( soliloquy_bar ).fadeOut();
94
+
95
+ });
96
+
97
+ // File Upload Error
98
+ uploader.bind('Error', function(up, err) {
99
+
100
+ // Show message
101
+ $('#soliloquy-upload-error').html( '<div class="error fade"><p>' + err.file.name + ': ' + err.message + '</p></div>' );
102
+ up.refresh();
103
+
104
+ });
105
+
106
+ }
107
+
108
+ });
109
+ })( jQuery , window, document, soliloquy_media_uploader );
assets/js/metabox.js CHANGED
@@ -1,872 +1,13 @@
1
- /* ==========================================================
2
- * metabox.js
3
- * http://soliloquywp.com/
4
- * ==========================================================
5
- * Copyright 2014 Thomas Griffin.
6
- *
7
- * Licensed under the GPL License, Version 2.0 or later (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.gnu.org/licenses/gpl-2.0.html
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- * ========================================================== */
19
- ;(function($){
20
- $(function(){
21
- // Initialize the slider tabs.
22
- var soliloquy_tabs = $('#soliloquy-tabs'),
23
- soliloquy_tabs_nav = $('#soliloquy-tabs-nav'),
24
- soliloquy_tabs_hash = window.location.hash,
25
- soliloquy_tabs_hash_sani = window.location.hash.replace('!', '');
26
-
27
- // If we have a hash and it begins with "soliloquy-tab", set the proper tab to be opened.
28
- if ( soliloquy_tabs_hash && soliloquy_tabs_hash.indexOf('soliloquy-tab-') >= 0 ) {
29
- $('.soliloquy-active').removeClass('soliloquy-active');
30
- soliloquy_tabs_nav.find('li a[href="' + soliloquy_tabs_hash_sani + '"]').parent().addClass('soliloquy-active');
31
- soliloquy_tabs.find(soliloquy_tabs_hash_sani).addClass('soliloquy-active').show();
32
-
33
- // Update the post action to contain our hash so the proper tab can be loaded on save.
34
- var post_action = $('#post').attr('action');
35
- if ( post_action ) {
36
- post_action = post_action.split('#')[0];
37
- $('#post').attr('action', post_action + soliloquy_tabs_hash);
38
- }
39
- }
40
-
41
- // Change tabs on click.
42
- $(document).on('click', '#soliloquy-tabs-nav li a', function(e){
43
- e.preventDefault();
44
- var $this = $(this);
45
- if ( $this.parent().hasClass('soliloquy-active') ) {
46
- return;
47
- } else {
48
- window.location.hash = soliloquy_tabs_hash = this.hash.split('#').join('#!');
49
- var current = soliloquy_tabs_nav.find('.soliloquy-active').removeClass('soliloquy-active').find('a').attr('href');
50
- $this.parent().addClass('soliloquy-active');
51
- soliloquy_tabs.find(current).removeClass('soliloquy-active').hide();
52
- soliloquy_tabs.find($this.attr('href')).addClass('soliloquy-active').show();
53
-
54
- // Update the post action to contain our hash so the proper tab can be loaded on save.
55
- var post_action = $('#post').attr('action');
56
- if ( post_action ) {
57
- post_action = post_action.split('#')[0];
58
- $('#post').attr('action', post_action + soliloquy_tabs_hash);
59
- }
60
- }
61
- });
62
-
63
- // Load plupload if necessary.
64
- var soliloquy_uploader;
65
- if ( $('input[name="_soliloquy[type]"]').length > 0 && 'default' == $('input[name="_soliloquy[type]"]:checked').val() ) {
66
- soliloquyPlupload();
67
- }
68
-
69
- // Conditionally show necessary fields.
70
- soliloquyConditionals();
71
-
72
- // Handle the meta icon helper.
73
- if ( 0 !== $('.soliloquy-helper-needed').length ) {
74
- $('<div class="soliloquy-meta-helper-overlay" />').prependTo('#soliloquy');
75
- }
76
-
77
- $(document).on('click', '.soliloquy-meta-icon', function(e){
78
- e.preventDefault();
79
- var $this = $(this),
80
- container = $this.parent(),
81
- helper = $this.next();
82
- if ( helper.is(':visible') ) {
83
- $('.soliloquy-meta-helper-overlay').remove();
84
- container.removeClass('soliloquy-helper-active');
85
- } else {
86
- if ( 0 === $('.soliloquy-meta-helper-overlay').length ) {
87
- $('<div class="soliloquy-meta-helper-overlay" />').prependTo('#soliloquy');
88
- }
89
- container.addClass('soliloquy-helper-active');
90
- }
91
- });
92
-
93
- // Handle switching between different slider types.
94
- $(document).on('change', 'input[name="_soliloquy[type]"]:radio', function(e){
95
- var $this = $(this);
96
- $('.soliloquy-type-spinner .soliloquy-spinner').css({'display' : 'inline-block', 'margin-top' : '-1px'});
97
-
98
- // Prepare our data to be sent via Ajax.
99
- var change = {
100
- action: 'soliloquy_change_type',
101
- post_id: soliloquy_metabox.id,
102
- type: $this.val(),
103
- nonce: soliloquy_metabox.change_nonce
104
- };
105
-
106
- // Process the Ajax response and output all the necessary data.
107
- $.post(
108
- soliloquy_metabox.ajax,
109
- change,
110
- function(response) {
111
- // Append the response data.
112
- if ( 'default' == response.type ) {
113
- $('#soliloquy-slider-main').html(response.html);
114
- soliloquyPlupload();
115
- } else {
116
- $('#soliloquy-slider-main').html(response.html);
117
- }
118
-
119
- // Fire an event to attach to.
120
- $(document).trigger('soliloquySliderType', response);
121
-
122
- // Remove the spinner.
123
- $('.soliloquy-type-spinner .soliloquy-spinner').hide();
124
- },
125
- 'json'
126
- );
127
- });
128
-
129
- // Open up the media manager modal.
130
- $(document).on('click', '.soliloquy-media-library', function(e){
131
- e.preventDefault();
132
-
133
- // Show the modal.
134
- soliloquy_main_frame = true;
135
- $('#soliloquy-upload-ui').appendTo('body').show();
136
- });
137
-
138
- // Add the selected state to images when selected from the library view.
139
- $('.soliloquy-slider').on('click', '.thumbnail, .check, .media-modal-icon', function(e){
140
- e.preventDefault();
141
- if ( $(this).parent().parent().hasClass('soliloquy-in-slider') )
142
- return;
143
- if ( $(this).parent().parent().hasClass('selected') )
144
- $(this).parent().parent().removeClass('details selected');
145
- else
146
- $(this).parent().parent().addClass('details selected');
147
- });
148
-
149
- // Load more images into the library view.
150
- $(document).on('click', '.soliloquy-load-library', function(e){
151
- e.preventDefault();
152
- var $this = $(this);
153
- $this.next().css({'display' : 'inline-block', 'margin-top' : '14px', 'margin-left' : '-5px'});
154
-
155
- // Prepare our data to be sent via Ajax.
156
- var load = {
157
- action: 'soliloquy_load_library',
158
- offset: parseInt($this.attr('data-soliloquy-offset')),
159
- post_id: soliloquy_metabox.id,
160
- nonce: soliloquy_metabox.load_slider
161
- };
162
-
163
- // Process the Ajax response and output all the necessary data.
164
- $.post(
165
- soliloquy_metabox.ajax,
166
- load,
167
- function(response) {
168
- $this.attr('data-soliloquy-offset', parseInt($this.attr('data-soliloquy-offset')) + 20);
169
-
170
- // Append the response data.
171
- if ( response && response.html && $this.hasClass('has-search') ) {
172
- $('.soliloquy-slider').html(response.html);
173
- $this.removeClass('has-search');
174
- } else {
175
- $('.soliloquy-slider').append(response.html);
176
- }
177
-
178
- // Remove the spinner.
179
- $this.next().hide();
180
- },
181
- 'json'
182
- );
183
- });
184
-
185
- // Load images related to the search term specified
186
- $(document).on('keyup keydown', '#soliloquy-slider-search', function(){
187
- var $this = $(this);
188
- $this.prev().css({'display' : 'inline-block', 'margin-top' : '1px', 'vertical-align' : 'middle', 'margin-right' : '4px'});
189
-
190
- var text = $(this).val();
191
- var search = {
192
- action: 'soliloquy_library_search',
193
- nonce: soliloquy_metabox.library_search,
194
- post_id: soliloquy_metabox.id,
195
- search: text
196
- };
197
-
198
- // Send the ajax request with a delay (500ms after the user stops typing).
199
- delay(function() {
200
- // Process the Ajax response and output all the necessary data.
201
- $.post(
202
- soliloquy_metabox.ajax,
203
- search,
204
- function(response) {
205
- // Notify the load button that we have entered a search and reset the offset counter.
206
- $('.soliloquy-load-library').addClass('has-search').attr('data-soliloquy-offset', parseInt(0));
207
-
208
- // Append the response data.
209
- if ( response )
210
- $('.soliloquy-slider').html(response.html);
211
-
212
- // Remove the spinner.
213
- $this.prev().hide();
214
- },
215
- 'json'
216
- );
217
- }, '500');
218
- });
219
-
220
- // Process inserting slides into slider when the Insert button is pressed.
221
- $(document).on('click', '.soliloquy-media-insert', function(e){
222
- e.preventDefault();
223
- var $this = $(this),
224
- text = $this.text(),
225
- data = {
226
- action: 'soliloquy_insert_slides',
227
- nonce: soliloquy_metabox.insert_nonce,
228
- post_id: soliloquy_metabox.id,
229
- images: {},
230
- videos: {},
231
- html: {}
232
- },
233
- selected = false,
234
- video = false,
235
- html = false,
236
- insert_e = e;
237
- $this.text(soliloquy_metabox.inserting);
238
-
239
- // Loop through potential data to send when inserting images.
240
- // First, we loop through the selected items and add them to the data var.
241
- $('.soliloquy-media-frame').find('.attachment.selected:not(.soliloquy-in-slider)').each(function(i, el){
242
- data.images[i] = $(el).attr('data-attachment-id');
243
- selected = true;
244
- });
245
-
246
- // Next, we loop through any video slides that have been created.
247
- $('.soliloquy-media-frame').find('.soliloquy-video-slide-holder').each(function(i, el){
248
- data.videos[i] = {
249
- title: $(el).find('.soliloquy-video-slide-title').val(),
250
- url: $(el).find('.soliloquy-video-slide-url').val(),
251
- thumb: $(el).find('.soliloquy-video-slide-thumbnail').val(),
252
- caption: $(el).find('.soliloquy-video-slide-caption').val()
253
- };
254
- video = true;
255
- });
256
-
257
- // Finally, we loop through any HTML slides that have been created.
258
- $('.soliloquy-media-frame').find('.soliloquy-html-slide-holder').each(function(i, el){
259
- data.html[i] = {
260
- title: $(el).find('.soliloquy-html-slide-title').val(),
261
- code: $(el).find('.soliloquy-html-slide-code').val(),
262
- thumb: $(el).find('.soliloquy-html-slide-thumbnail').val()
263
- };
264
- html = true;
265
- });
266
-
267
- // Send the ajax request with our data to be processed.
268
- $.post(
269
- soliloquy_metabox.ajax,
270
- data,
271
- function(response){
272
- // Set small delay before closing modal.
273
- setTimeout(function(){
274
- // Re-append modal to correct spot and revert text back to default.
275
- append_and_hide(insert_e);
276
- $this.text(text);
277
-
278
- // If we have selected items, be sure to properly load first images back into view.
279
- if ( selected )
280
- $('.soliloquy-load-library').attr('data-soliloquy-offset', 0).addClass('has-search').trigger('click');
281
- }, 500);
282
- },
283
- 'json'
284
- );
285
-
286
- });
287
-
288
- // Change content areas and active menu states on media router click.
289
- $(document).on('click', '.soliloquy-media-frame .media-menu-item', function(e){
290
- e.preventDefault();
291
- var $this = $(this),
292
- old_content = $this.parent().find('.active').removeClass('active').data('soliloquy-content'),
293
- new_content = $this.addClass('active').data('soliloquy-content');
294
- $('#soliloquy-' + old_content).hide();
295
- $('#soliloquy-' + new_content).show();
296
- });
297
-
298
- // Load in new video slides when the add video slide button is clicked.
299
- $(document).on('click', '.soliloquy-add-video-slide', function(e){
300
- e.preventDefault();
301
- var number = parseInt($(this).attr('data-soliloquy-video-number')),
302
- id = 'soliloquy-video-slide-' + $(this).attr('data-soliloquy-html-number');
303
- $(this).attr('data-soliloquy-video-number', number + 1 ).parent().before(soliloquyGetVideoSlideMarkup(number));
304
- });
305
-
306
- function soliloquyGetVideoSlideMarkup(number) {
307
- var html = '';
308
- html += '<div class="soliloquy-video-slide-holder"><p class="no-margin-top"><a href="#" class="button button-secondary soliloquy-delete-video-slide" title="' + soliloquy_metabox.removeslide + '">' + soliloquy_metabox.removeslide + '</a><label for="soliloquy-video-slide-' + number + '-title"><strong>' + soliloquy_metabox.videoslide + '</strong></label><br /><input type="text" class="soliloquy-video-slide-title" id="soliloquy-video-slide-' + number + '-title" value="" placeholder="' + soliloquy_metabox.videoplace + '" /></p><p><label for="soliloquy-video-slide-' + number + '"><strong>' + soliloquy_metabox.videotitle + '</strong></label><br /><input type="text" class="soliloquy-video-slide-url" id="soliloquy-video-slide-' + number + '" value="" placeholder="' + soliloquy_metabox.videooutput + '" /></p><p><label for="soliloquy-video-slide-' + number + '-thumbnail"><strong>' + soliloquy_metabox.videothumb + '</strong></label><br /><input type="text" class="soliloquy-video-slide-thumbnail" id="soliloquy-video-slide-' + number + '-thumbnail" value="" placeholder="' + soliloquy_metabox.videosrc + '" /> <span><a href="#" class="soliloquy-video-thumbnail button button-primary">' + soliloquy_metabox.videoselect + '</a> <a href="#" class="soliloquy-video-thumbnail-delete button button-secondary">' + soliloquy_metabox.videodelete + '</a></span></p><p class="no-margin-bottom"><label for="soliloquy-video-slide-' + number + '-caption"><strong>' + soliloquy_metabox.videocaption + '</strong></label><br /><textarea class="soliloquy-video-slide-caption" id="soliloquy-video-slide-' + number + '-caption"></textarea></p></div>';
309
- return html;
310
- }
311
-
312
- // Enable easy video thumbnail selection.
313
- $(document).on('click', '.soliloquy-video-thumbnail', function(e){
314
- e.preventDefault();
315
-
316
- var soliloquy_media_frame = wp.media.frames.soliloquy_media_frame = wp.media({
317
- className: 'media-frame soliloquy-media-frame',
318
- frame: 'select',
319
- multiple: false,
320
- title: soliloquy_metabox.videoframe,
321
- library: {
322
- type: 'image'
323
- },
324
- button: {
325
- text: soliloquy_metabox.videouse
326
- }
327
- }),
328
- $this = $(this);
329
-
330
- soliloquy_media_frame.on('select', function(){
331
- // Grab our attachment selection and construct a JSON representation of the model.
332
- var thumbnail = soliloquy_media_frame.state().get('selection').first().toJSON();
333
-
334
- // Send the attachment URL to our custom input field via jQuery.
335
- $this.parent().prev().val(thumbnail.url);
336
- });
337
-
338
- // Now that everything has been set, let's open up the frame.
339
- soliloquy_media_frame.open();
340
- });
341
-
342
- // Empty the video thumbnail field.
343
- $(document).on('click', '.soliloquy-video-thumbnail-delete', function(e){
344
- e.preventDefault();
345
- $(this).parent().prev().val('');
346
- });
347
-
348
- // Delete a video slide from the DOM when the user clicks to remove it.
349
- $(document).on('click', '#soliloquy-video-slides .soliloquy-delete-video-slide', function(e){
350
- e.preventDefault();
351
- $(this).parent().parent().remove();
352
- });
353
-
354
- var soliloquy_html_holder = {};
355
-
356
- // Initialize the code editor for HTML slides.
357
- $('.soliloquy-html').find('.soliloquy-html-code').each(function(i, el){
358
- var id = $(el).attr('id');
359
- soliloquy_html_holder[id] = CodeMirror.fromTextArea(el, {
360
- enterMode: 'keep',
361
- indentUnit: 4,
362
- electricChars: false,
363
- lineNumbers: true,
364
- lineWrapping: true,
365
- matchBrackets: true,
366
- mode: 'php',
367
- smartIndent: false,
368
- tabMode: 'shift',
369
- theme: 'solarized dark'
370
- });
371
- soliloquy_html_holder[id].on('blur', function(obj){
372
- $('#' + id).text(obj.getValue());
373
- });
374
- soliloquy_html_holder[id].refresh();
375
- });
376
-
377
- // Load in new HTML slides when the add HTML slide button is clicked.
378
- $(document).on('click', '.soliloquy-add-html-slide', function(e){
379
- e.preventDefault();
380
- var number = parseInt($(this).attr('data-soliloquy-html-number')),
381
- id = 'soliloquy-html-slide-' + $(this).attr('data-soliloquy-html-number');
382
- $(this).attr('data-soliloquy-html-number', number + 1 ).parent().before(soliloquyGetHtmlSlideMarkup(number));
383
- soliloquy_html_holder[id] = CodeMirror.fromTextArea(document.getElementById(id), {
384
- enterMode: 'keep',
385
- indentUnit: 4,
386
- electricChars: false,
387
- lineNumbers: true,
388
- lineWrapping: true,
389
- matchBrackets: true,
390
- mode: 'php',
391
- smartIndent: false,
392
- tabMode: 'shift',
393
- theme: 'solarized dark'
394
- });
395
- soliloquy_html_holder[id].on('blur', function(obj){
396
- $('#' + id).text(obj.getValue());
397
- });
398
- soliloquy_html_holder[id].refresh();
399
- });
400
-
401
- function soliloquyGetHtmlSlideMarkup(number) {
402
- var html = '';
403
- html += '<div class="soliloquy-html-slide-holder"><p class="no-margin-top"><a href="#" class="button button-secondary soliloquy-delete-html-slide" title="' + soliloquy_metabox.removeslide + '">' + soliloquy_metabox.removeslide + '</a><label for="soliloquy-html-slide-' + number + '-title"><strong>' + soliloquy_metabox.htmlslide + '</strong></label><br /><input type="text" class="soliloquy-html-slide-title" id="soliloquy-html-slide-' + number + '-title" value="" placeholder="' + soliloquy_metabox.htmlplace + '" /></p><p class="no-margin-bottom"><label for="soliloquy-html-slide-' + number + '"><strong>' + soliloquy_metabox.htmlcode + '</strong></label><br /><textarea class="soliloquy-html-slide-code" id="soliloquy-html-slide-' + number + '">' + soliloquy_metabox.htmlstart + '</textarea><p><label for="soliloquy-html-slide-' + number + '-thumbnail"><strong>' + soliloquy_metabox.htmlthumb + '</strong></label><br /><input type="text" class="soliloquy-html-slide-thumbnail" id="soliloquy-html-slide-' + number + '-thumbnail" value="" placeholder="' + soliloquy_metabox.htmlsrc + '" /> <span><a href="#" class="soliloquy-html-thumbnail button button-primary">' + soliloquy_metabox.htmlselect + '</a> <a href="#" class="soliloquy-html-thumbnail-delete button button-secondary">' + soliloquy_metabox.htmldelete + '</a></span></p></div>';
404
- return html;
405
- }
406
-
407
- // Enable easy HTML thumbnail selection.
408
- $(document).on('click', '.soliloquy-html-thumbnail', function(e){
409
- e.preventDefault();
410
-
411
- var soliloquy_media_frame = wp.media.frames.soliloquy_media_frame = wp.media({
412
- className: 'media-frame soliloquy-media-frame',
413
- frame: 'select',
414
- multiple: false,
415
- title: soliloquy_metabox.htmlframe,
416
- library: {
417
- type: 'image'
418
- },
419
- button: {
420
- text: soliloquy_metabox.htmluse
421
- }
422
- }),
423
- $this = $(this);
424
-
425
- soliloquy_media_frame.on('select', function(){
426
- // Grab our attachment selection and construct a JSON representation of the model.
427
- var thumbnail = soliloquy_media_frame.state().get('selection').first().toJSON();
428
-
429
- // Send the attachment URL to our custom input field via jQuery.
430
- $this.parent().prev().val(thumbnail.url);
431
- });
432
-
433
- // Now that everything has been set, let's open up the frame.
434
- soliloquy_media_frame.open();
435
- });
436
-
437
- // Delete an HTML slide from the DOM when the user clicks to remove it.
438
- $(document).on('click', '#soliloquy-html-slides .soliloquy-delete-html-slide', function(e){
439
- e.preventDefault();
440
- $(this).parent().parent().remove();
441
- });
442
-
443
- // Empty the HTML thumbnail field.
444
- $(document).on('click', '.soliloquy-html-thumbnail-delete', function(e){
445
- e.preventDefault();
446
- $(this).parent().prev().val('');
447
- });
448
-
449
- // Make slider items sortable.
450
- var slider = $('#soliloquy-output');
451
-
452
- // Use ajax to make the images sortable.
453
- slider.sortable({
454
- containment: '#soliloquy',
455
- items: 'li',
456
- cursor: 'move',
457
- forcePlaceholderSize: true,
458
- placeholder: 'dropzone',
459
- update: function(event, ui) {
460
- // Make ajax request to sort out items.
461
- var opts = {
462
- url: soliloquy_metabox.ajax,
463
- type: 'post',
464
- async: true,
465
- cache: false,
466
- dataType: 'json',
467
- data: {
468
- action: 'soliloquy_sort_images',
469
- order: slider.sortable('toArray').toString(),
470
- post_id: soliloquy_metabox.id,
471
- nonce: soliloquy_metabox.sort
472
- },
473
- success: function(response) {
474
- return;
475
- },
476
- error: function(xhr, textStatus ,e) {
477
- return;
478
- }
479
- };
480
- $.ajax(opts);
481
- }
482
- });
483
-
484
- // Process image removal from a slider.
485
- $(document).on('click', '#soliloquy .soliloquy-remove-slide', function(e){
486
- e.preventDefault();
487
-
488
- // Bail out if the user does not actually want to remove the image.
489
- var confirm_delete = confirm(soliloquy_metabox.remove);
490
- if ( ! confirm_delete )
491
- return;
492
-
493
- // Prepare our data to be sent via Ajax.
494
- var attach_id = $(this).parent().attr('id'),
495
- remove = {
496
- action: 'soliloquy_remove_slide',
497
- attachment_id: attach_id,
498
- post_id: soliloquy_metabox.id,
499
- nonce: soliloquy_metabox.remove_nonce
500
- };
501
-
502
- // Process the Ajax response and output all the necessary data.
503
- $.post(
504
- soliloquy_metabox.ajax,
505
- remove,
506
- function(response) {
507
- $('#' + attach_id).fadeOut('normal', function() {
508
- $(this).remove();
509
-
510
- // Refresh the modal view to ensure no items are still checked if they have been removed.
511
- $('.soliloquy-load-library').attr('data-soliloquy-offset', 0).addClass('has-search').trigger('click');
512
- });
513
- },
514
- 'json'
515
- );
516
- });
517
-
518
- // Open up the media modal area for modifying slider metadata.
519
- var soliloquy_main_frame_meta = false;
520
- $(document).on('click.soliloquyModify', '#soliloquy .soliloquy-modify-slide', function(e){
521
- e.preventDefault();
522
- var attach_id = $(this).parent().data('soliloquy-slide'),
523
- formfield = 'soliloquy-meta-' + attach_id;
524
-
525
- // Show the modal.
526
- soliloquy_main_frame_meta = true;
527
- $('#' + formfield).appendTo('body').show();
528
-
529
- // Refresh any HTML slides.
530
- $.each(soliloquy_html_holder, function(){
531
- this.refresh();
532
- });
533
-
534
- // Close the modal window on user action
535
- var append_and_hide_meta = function(e){
536
- e.preventDefault();
537
- $('#' + formfield).appendTo('#' + attach_id).hide();
538
- soliloquy_main_frame_meta = false;
539
- $(document).off('click.soliloquyLink');
540
- };
541
- $(document).on('click.soliloquyIframe', '.media-modal-close, .media-modal-backdrop', append_and_hide_meta);
542
- $(document).off('keydown.soliloquyIframe').on('keydown.soliloquyIframe', function(e){
543
- if ( 27 == e.keyCode && soliloquy_main_frame_meta ) {
544
- append_and_hide_meta(e);
545
- }
546
- });
547
- $(document).on('click.soliloquyLink', '.ed_button', function(){
548
- // Set custom z-index for link dialog box.
549
- $('#wp-link-backdrop').css('zIndex', '170100');
550
- $('#wp-link-wrap').css('zIndex', '171005' );
551
- });
552
- });
553
-
554
- // Save the slider metadata.
555
- $(document).on('click', '.soliloquy-meta-submit', function(e){
556
- e.preventDefault();
557
- var $this = $(this),
558
- default_t = $this.text(),
559
- attach_id = $this.data('soliloquy-item'),
560
- formfield = 'soliloquy-meta-' + attach_id,
561
- meta = {};
562
-
563
- // Output saving text...
564
- $this.text(soliloquy_metabox.saving);
565
-
566
- // Add the title since it is a special field.
567
- meta.caption = $('#soliloquy-meta-table-' + attach_id).find('textarea[name="_soliloquy[meta_caption]"]').val();
568
-
569
- // Get all meta fields and values.
570
- $('#soliloquy-meta-table-' + attach_id).find(':input,select').not('.ed_button').each(function(i, el){
571
- if ( $(this).data('soliloquy-meta') ) {
572
- if ( 'checkbox' == $(this).attr('type') || 'radio' == $(this).attr('type') ) {
573
- meta[$(this).data('soliloquy-meta')] = $(this).is(':checked') ? 1 : 0;
574
- } else if ( 'select' == $(this).attr('type') ) {
575
- meta[$(this).data('soliloquy-meta')] = $(this).find(':selected').val();
576
- } else {
577
- meta[$(this).data('soliloquy-meta')] = $(this).val();
578
- }
579
- }
580
- });
581
-
582
- // Prepare the data to be sent.
583
- var data = {
584
- action: 'soliloquy_save_meta',
585
- nonce: soliloquy_metabox.save_nonce,
586
- attach_id: attach_id,
587
- post_id: soliloquy_metabox.id,
588
- meta: meta
589
- };
590
-
591
- $.post(
592
- soliloquy_metabox.ajax,
593
- data,
594
- function(res){
595
- setTimeout(function(){
596
- $('#' + formfield).appendTo('#' + attach_id).hide();
597
- $this.text(default_t);
598
- }, 500);
599
- },
600
- 'json'
601
- );
602
- });
603
-
604
- // Append spinner when importing a slider.
605
- $(document).on('click', '#soliloquy-import-submit', function(e){
606
- $(this).next().css('display', 'inline-block');
607
- if ( $('#soliloquy-config-import-slider').val().length === 0 ) {
608
- e.preventDefault();
609
- $(this).next().hide();
610
- alert(soliloquy_metabox.import);
611
- }
612
- });
613
-
614
- // Polling function for typing and other user centric items.
615
- var delay = (function() {
616
- var timer = 0;
617
- return function(callback, ms) {
618
- clearTimeout(timer);
619
- timer = setTimeout(callback, ms);
620
- };
621
- })();
622
-
623
- // Close the modal window on user action.
624
- var soliloquy_main_frame = false;
625
- var append_and_hide = function(e){
626
- e.preventDefault();
627
- $('#soliloquy-upload-ui').appendTo('#soliloquy-upload-ui-wrapper').hide();
628
- soliloquyRefresh();
629
- soliloquy_main_frame = false;
630
- };
631
- $(document).on('click', '#soliloquy-upload-ui .media-modal-close, #soliloquy-upload-ui .media-modal-backdrop', append_and_hide);
632
- $(document).on('keydown', function(e){
633
- if ( 27 == e.keyCode && soliloquy_main_frame )
634
- append_and_hide(e);
635
- });
636
-
637
- // Function to refresh images in the slider.
638
- function soliloquyRefresh(){
639
- var data = {
640
- action: 'soliloquy_refresh',
641
- post_id: soliloquy_metabox.id,
642
- nonce: soliloquy_metabox.refresh_nonce
643
- };
644
-
645
- $('.max-upload-size').after('<span class="spinner soliloquy-spinner soliloquy-spinner-refresh"></span>');
646
- $('.soliloquy-spinner-refresh').css({'display' : 'inline-block', 'margin-top' : '-3px'});
647
-
648
- $.post(
649
- soliloquy_metabox.ajax,
650
- data,
651
- function(res){
652
- if ( res && res.success ) {
653
- $('#soliloquy-output').html(res.success);
654
- $('#soliloquy-output').find('.wp-editor-wrap').each(function(i, el){
655
- var qt = $(el).find('.quicktags-toolbar');
656
- if ( qt.length > 0 ) {
657
- return;
658
- }
659
-
660
- var arr = $(el).attr('id').split('-'),
661
- id = arr.slice(3, -1).join('-');
662
- quicktags({id: 'soliloquy-caption-' + id, buttons: 'strong,em,link,ul,ol,li,close'});
663
- QTags._buttonsInit(); // Force buttons to initialize.
664
- });
665
-
666
- // Initialize any code editors that have been generated with HTML slides.
667
- $('.soliloquy-html').find('.soliloquy-html-code').each(function(i, el){
668
- var id = $(el).attr('id');
669
- soliloquy_html_holder[id] = CodeMirror.fromTextArea(el, {
670
- enterMode: 'keep',
671
- indentUnit: 4,
672
- electricChars: false,
673
- lineNumbers: true,
674
- lineWrapping: true,
675
- matchBrackets: true,
676
- mode: 'php',
677
- smartIndent: false,
678
- tabMode: 'shift',
679
- theme: 'solarized dark'
680
- });
681
- soliloquy_html_holder[id].on('blur', function(obj){
682
- $('#' + id).text(obj.getValue());
683
- });
684
- soliloquy_html_holder[id].refresh();
685
- });
686
-
687
- // Trigger a custom event for 3rd party scripts.
688
- $('#soliloquy-output').trigger({ type: 'soliloquyRefreshed', html: res.success, id: soliloquy_metabox.id });
689
- }
690
-
691
- // Remove the spinner.
692
- $('.soliloquy-spinner-refresh').fadeOut(300, function(){
693
- $(this).remove();
694
- });
695
- },
696
- 'json'
697
- );
698
- }
699
-
700
- // Function to show conditional fields.
701
- function soliloquyConditionals() {
702
- var soliloquy_mobile_option = $('#soliloquy-config-mobile');
703
- if ( soliloquy_mobile_option.is(':checked') )
704
- $('#soliloquy-config-mobile-size-box').fadeIn(300);
705
- soliloquy_mobile_option.on('change', function(){
706
- if ( $(this).is(':checked') )
707
- $('#soliloquy-config-mobile-size-box').fadeIn(300);
708
- else
709
- $('#soliloquy-config-mobile-size-box').fadeOut(300);
710
- });
711
- }
712
-
713
- // Function to initialize plupload.
714
- function soliloquyPlupload() {
715
- // Append the custom loading progress bar.
716
- $('#soliloquy .drag-drop-inside').append('<div class="soliloquy-progress-bar"><div></div></div>');
717
-
718
- // Prepare variables.
719
- soliloquy_uploader = new plupload.Uploader(soliloquy_metabox.plupload);
720
- var soliloquy_bar = $('#soliloquy .soliloquy-progress-bar'),
721
- soliloquy_progress = $('#soliloquy .soliloquy-progress-bar div'),
722
- soliloquy_output = $('#soliloquy-output');
723
-
724
- // Only move forward if the uploader is present.
725
- if ( soliloquy_uploader ) {
726
- soliloquy_uploader.bind('Init', function(up) {
727
- var uploaddiv = $('#soliloquy-plupload-upload-ui');
728
-
729
- // If drag and drop, make that happen.
730
- if ( up.features.dragdrop && ! $(document.body).hasClass('mobile') ) {
731
- uploaddiv.addClass('drag-drop');
732
- $('#soliloquy-drag-drop-area').bind('dragover.wp-uploader', function(){
733
- uploaddiv.addClass('drag-over');
734
- }).bind('dragleave.wp-uploader, drop.wp-uploader', function(){
735
- uploaddiv.removeClass('drag-over');
736
- });
737
- } else {
738
- uploaddiv.removeClass('drag-drop');
739
- $('#soliloquy-drag-drop-area').unbind('.wp-uploader');
740
- }
741
-
742
- // If we have an HTML4 runtime, hide the flash bypass.
743
- if ( up.runtime == 'html4' )
744
- $('.upload-flash-bypass').hide();
745
- });
746
-
747
- // Initialize the uploader.
748
- soliloquy_uploader.init();
749
-
750
- // Bind to the FilesAdded event to show the progess bar.
751
- soliloquy_uploader.bind('FilesAdded', function(up, files){
752
- var hundredmb = 100 * 1024 * 1024,
753
- max = parseInt(up.settings.max_file_size, 10);
754
-
755
- // Remove any errors.
756
- $('#soliloquy-upload-error').html('');
757
-
758
- // Show the progress bar.
759
- $(soliloquy_bar).show().css('display', 'block');
760
-
761
- // Upload the files.
762
- plupload.each(files, function(file){
763
- if ( max > hundredmb && file.size > hundredmb && up.runtime != 'html5' ) {
764
- soliloquyUploadError( up, file, true );
765
- }
766
- });
767
-
768
- // Refresh and start.
769
- up.refresh();
770
- up.start();
771
- });
772
-
773
- // Bind to the UploadProgress event to manipulate the progress bar.
774
- soliloquy_uploader.bind('UploadProgress', function(up, file){
775
- $(soliloquy_progress).css('width', up.total.percent + '%');
776
- });
777
-
778
- // Bind to the FileUploaded event to set proper UI display for slider.
779
- soliloquy_uploader.bind('FileUploaded', function(up, file, info){
780
- // Make an ajax request to generate and output the image in the slider UI.
781
- $.post(
782
- soliloquy_metabox.ajax,
783
- {
784
- action: 'soliloquy_load_image',
785
- nonce: soliloquy_metabox.load_image,
786
- id: info.response,
787
- post_id: soliloquy_metabox.id
788
- },
789
- function(res){
790
- $(soliloquy_output).append(res);
791
- $(res).find('.wp-editor-container').each(function(i, el){
792
- var id = $(el).attr('id').split('-')[3];
793
- quicktags({id: 'soliloquy-caption-' + id, buttons: 'strong,em,link,ul,ol,li,close'});
794
- QTags._buttonsInit(); // Force buttons to initialize.
795
- });
796
- },
797
- 'json'
798
- );
799
- });
800
-
801
- // Bind to the UploadComplete event to hide and reset the progress bar.
802
- soliloquy_uploader.bind('UploadComplete', function(){
803
- $(soliloquy_bar).hide().css('display', 'none');
804
- $(soliloquy_progress).removeAttr('style');
805
- });
806
-
807
- // Bind to any errors and output them on the screen.
808
- soliloquy_uploader.bind('Error', function(up, error) {
809
- var hundredmb = 100 * 1024 * 1024,
810
- error_el = $('#soliloquy-upload-error'),
811
- max;
812
- switch (error) {
813
- case plupload.FAILED:
814
- case plupload.FILE_EXTENSION_ERROR:
815
- error_el.html('<p class="error">' + pluploadL10n.upload_failed + '</p>');
816
- break;
817
- case plupload.FILE_SIZE_ERROR:
818
- soliloquyUploadError(up, error.file);
819
- break;
820
- case plupload.IMAGE_FORMAT_ERROR:
821
- wpFileError(fileObj, pluploadL10n.not_an_image);
822
- break;
823
- case plupload.IMAGE_MEMORY_ERROR:
824
- wpFileError(fileObj, pluploadL10n.image_memory_exceeded);
825
- break;
826
- case plupload.IMAGE_DIMENSIONS_ERROR:
827
- wpFileError(fileObj, pluploadL10n.image_dimensions_exceeded);
828
- break;
829
- case plupload.GENERIC_ERROR:
830
- wpQueueError(pluploadL10n.upload_failed);
831
- break;
832
- case plupload.IO_ERROR:
833
- max = parseInt(uploader.settings.max_file_size, 10);
834
-
835
- if ( max > hundredmb && fileObj.size > hundredmb )
836
- wpFileError(fileObj, pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>'));
837
- else
838
- wpQueueError(pluploadL10n.io_error);
839
- break;
840
- case plupload.HTTP_ERROR:
841
- wpQueueError(pluploadL10n.http_error);
842
- break;
843
- case plupload.INIT_ERROR:
844
- $('.media-upload-form').addClass('html-uploader');
845
- break;
846
- case plupload.SECURITY_ERROR:
847
- wpQueueError(pluploadL10n.security_error);
848
- break;
849
- default:
850
- soliloquyUploadError(up, error.file);
851
- break;
852
- }
853
- up.refresh();
854
- });
855
- }
856
- }
857
-
858
- // Function for displaying file upload errors.
859
- function soliloquyUploadError( up, file, over100mb ) {
860
- var message;
861
-
862
- if ( over100mb ) {
863
- message = pluploadL10n.big_upload_queued.replace('%s', file.name) + ' ' + pluploadL10n.big_upload_failed.replace('%1$s', '<a class="uploader-html" href="#">').replace('%2$s', '</a>');
864
- } else {
865
- message = pluploadL10n.file_exceeds_size_limit.replace('%s', file.name);
866
- }
867
-
868
- $('#soliloquy-upload-error').html('<div class="error fade"><p>' + message + '</p></div>');
869
- up.removeFile(file);
870
- }
871
- });
872
- }(jQuery));
1
+ /* global soliloquy_metabox, uploader, QTags, quicktags */
2
+ /**
3
+ * You'll need to use CodeKit or similar, as this file is a placeholder to combine
4
+ * the following JS files into min/metabox-min.js:
5
+ *
6
+ * - slider-helper.js
7
+ * - slider-types.js
8
+ * - media-delete.js
9
+ * - media-edit.js
10
+ * - media-insert.js
11
+ * - media-manage.js
12
+ * - media-upload.js
13
+ */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/js/min/addons-min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function($,a,o,e){$(function(){function a(a){$(a).attr("disabled")&&$(a).removeAttr("disabled"),$(a).parent().parent().hasClass("soliloquy-addon-not-installed")&&$(a).text(e.install)}$(".soliloquy-chosen").each(function(){$(this).chosen({disable_search:!0})}),$("#soliloquy-addon-filter").on("change",function(){var a=$(this),o=a.val(),e=$("#soliloquy-addons-area"),n=e.data("soliloquy-filter"),t=$("#soliloquy-addons-area .soliloquy-addon");switch(t.show(),o){case"asc":t.sort(function(a,o){return $(a).data("addon-title").localeCompare($(o).data("addon-title"))}).each(function(a,o){$(o).removeClass("last"),e.append(o).hide().fadeIn(100)}),$("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass("last");break;case"desc":t.sort(function(a,o){return $(o).data("addon-title").localeCompare($(a).data("addon-title"))}).each(function(a,o){$(o).removeClass("last"),e.append(o).hide().fadeIn(100)}),$("#soliloquy-addons-area .soliloquy-addon:nth-child(3n)").addClass("last");break;case"active":t.hide().filter('[data-addon-status="active"]').show(),t.removeClass("last"),$("#soliloquy-addons-area .soliloquy-addon:visible").each(function(a){(a+1)%3===0&&$(this).addClass("last")});break;case"inactive":t.hide().filter('[data-addon-status="inactive"]').show(),t.removeClass("last"),$("#soliloquy-addons-area .soliloquy-addon:visible").each(function(a){(a+1)%3===0&&$(this).addClass("last")});break;case"installed":var l=0;t.hide().filter('[data-addon-status="not_installed"]').show(),t.removeClass("last"),$("#soliloquy-addons-area .soliloquy-addon:visible").each(function(a){(a+1)%3===0&&$(this).addClass("last")})}}),$("#soliloquy-addons-area").on("click.refreshInstallAddon",".soliloquy-addon-action-button",function(o){o.preventDefault();var e=$(this),n=$("#soliloquy-addons-area").find(".soliloquy-addon-action-button");$.each(n,function(o,n){return e===n?!0:void a(n)})}),$("#soliloquy-addons-area").on("click.activateAddon",".soliloquy-activate-addon",function(a){a.preventDefault();var o=$(this),n=o.attr("rel"),t=o.parent().parent(),l=o.parent().parent().find(".addon-status").children("span");$(".soliloquy-addon-error").remove(),o.text(e.activating),o.next().css({display:"inline-block","margin-top":"0px"});var i={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_activate_addon",nonce:e.activate_nonce,plugin:n},success:function(a){return a&&!0!==a?void t.slideDown("normal",function(){$(this).after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.next().hide(),$(".soliloquy-addon-error").delay(3e3).slideUp()}):(o.text(e.deactivate).removeClass("soliloquy-activate-addon").addClass("soliloquy-deactivate-addon"),l.text(e.active),t.removeClass("soliloquy-addon-inactive").addClass("soliloquy-addon-active"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(i)}),$("#soliloquy-addons-area").on("click.deactivateAddon",".soliloquy-deactivate-addon",function(a){a.preventDefault();var o=$(this),n=o.attr("rel"),t=o.parent().parent(),l=o.parent().parent().find(".addon-status").children("span");$(".soliloquy-addon-error").remove(),o.text(e.deactivating),o.next().css({display:"inline-block","margin-top":"0px"});var i={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_deactivate_addon",nonce:e.deactivate_nonce,plugin:n},success:function(a){return a&&!0!==a?void t.slideDown("normal",function(){$(this).after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.next().hide(),$(".soliloquy-addon-error").delay(3e3).slideUp()}):(o.text(e.activate).removeClass("soliloquy-deactivate-addon").addClass("soliloquy-activate-addon"),l.text(e.inactive),t.removeClass("soliloquy-addon-active").addClass("soliloquy-addon-inactive"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(i)}),$("#soliloquy-addons-area").on("click.installAddon",".soliloquy-install-addon",function(a){a.preventDefault();var o=$(this),n=o.attr("rel"),t=o.parent().parent(),l=o.parent().parent().find(".addon-status").children("span");$(".soliloquy-addon-error").remove(),o.text(e.installing),o.next().css({display:"inline-block","margin-top":"0px"});var i={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_install_addon",nonce:e.install_nonce,plugin:n},success:function(a){return a.error?void t.slideDown("normal",function(){o.parent().parent().after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.text(e.install),o.next().hide(),$(".soliloquy-addon-error").delay(4e3).slideUp()}):a.form?(t.slideDown("normal",function(){$(this).after('<div class="soliloquy-addon-error">'+a.form+"</div>"),o.next().hide()}),o.attr("disabled",!0),void $("#soliloquy-addons-area").on("click.installCredsAddon","#upgrade",function(a){a.preventDefault(),o.next().hide(),$(this).val(e.installing),$(this).next().css({display:"inline-block","margin-top":"0px"});var i=$(this).parent().parent().find("#hostname").val(),s=$(this).parent().parent().find("#username").val(),d=$(this).parent().parent().find("#password").val(),r=$(this),c=$(this).parent().parent().parent().parent(),u={url:ajaxurl,type:"post",async:!0,cache:!1,dataType:"json",data:{action:"soliloquy_install_addon",nonce:e.install_nonce,plugin:n,hostname:i,username:s,password:d},success:function(a){return a.error?void t.slideDown("normal",function(){o.parent().parent().after('<div class="soliloquy-addon-error"><strong>'+a.error+"</strong></div>"),o.text(e.install),o.next().hide(),$(".soliloquy-addon-error").delay(4e3).slideUp()}):a.form?(o.next().hide(),$(".soliloquy-inline-error").remove(),$(r).val(e.proceed),void $(r).after('<span class="soliloquy-inline-error">'+e.connect_error+"</span>")):($(c).remove(),o.show(),o.text(e.activate).removeClass("soliloquy-install-addon").addClass("soliloquy-activate-addon"),o.attr("rel",a.plugin),o.removeAttr("disabled"),l.text(e.inactive),t.removeClass("soliloquy-addon-not-installed").addClass("soliloquy-addon-inactive"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(u)})):(o.text(e.activate).removeClass("soliloquy-install-addon").addClass("soliloquy-activate-addon"),o.attr("rel",a.plugin),l.text(e.inactive),t.removeClass("soliloquy-addon-not-installed").addClass("soliloquy-addon-inactive"),void o.next().hide())},error:function(a,e,n){o.next().hide()}};$.ajax(i)})})}(jQuery,window,document,soliloquy_addons);
assets/js/min/chosen.jquery-min.js ADDED
@@ -0,0 +1 @@
 
1
+ (function(){var $,t,e,s,i,r={}.hasOwnProperty,o=function(t,e){function s(){this.constructor=t}for(var i in e)r.call(e,i)&&(t[i]=e[i]);return s.prototype=e.prototype,t.prototype=new s,t.__super__=e.prototype,t};s=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,s,i,r,o,n;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:this.escapeExpression(t.label),title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),o=t.childNodes,n=[],i=0,r=o.length;r>i;i++)s=o[i],n.push(this.add_option(s,e,t.disabled));return n},t.prototype.add_option=function(t,e,s){return"OPTION"===t.nodeName.toUpperCase()?(""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,title:t.title?t.title:void 0,selected:t.selected,disabled:s===!0?s:t.disabled,group_array_index:e,group_label:null!=e?this.parsed[e].label:null,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},t.prototype.escapeExpression=function(t){var e,s;return null==t||t===!1?"":/[\&\<\>\"\'\`]/.test(t)?(e={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},s=/&(?!\w+;)|[\<\>\"\'\`]/g,t.replace(s,function(t){return e[t]||"&amp;"})):t},t}(),s.select_to_array=function(t){var e,i,r,o,n;for(i=new s,n=t.childNodes,r=0,o=n.length;o>r;r++)e=n[r],i.add_node(e);return i.parsed},t=function(){function t(e,s){this.form_field=e,this.options=null!=s?s:{},t.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(),this.on_ready())}return t.prototype.set_default_values=function(){var t=this;return this.click_test_action=function(e){return t.test_active_click(e)},this.activate_action=function(e){return t.activate_field(e)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=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,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?"<b class='group-name'>"+t.group_label+"</b>"+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(t){var e=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return e.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(t){var e=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return e.blur_test()},100))},t.prototype.results_option_build=function(t){var e,s,i,r,o,n,l;for(e="",r=0,l=this.results_data,o=0,n=l.length;n>o&&(s=l[o],i="",i=s.group?this.result_add_group(s):this.result_add_option(s),""!==i&&(r++,e+=i),(null!=t?t.first:void 0)&&(s.selected&&this.is_multiple?this.choice_build(s):s.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(s))),!(r>=this.max_shown_results));o++);return e},t.prototype.result_add_option=function(t){var e,s;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.style.cssText=t.style,s.setAttribute("data-option-array-index",t.array_index),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.result_add_group=function(t){var e,s;return(t.search_match||t.group_match)&&t.active_options>0?(e=[],e.push("group-result"),t.classes&&e.push(t.classes),s=document.createElement("li"),s.className=e.join(" "),s.innerHTML=t.search_text,t.title&&(s.title=t.title),this.outerHTML(s)):""},t.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing?this.winnow_results():void 0},t.prototype.reset_single_select_options=function(){var t,e,s,i,r;for(i=this.results_data,r=[],e=0,s=i.length;s>e;e++)t=i[e],t.selected?r.push(t.selected=!1):r.push(void 0);return r},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(t){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,s,i,r,o,n,l,h,c,a,_;for(this.no_results_clear(),i=0,o=this.get_search_text(),t=o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),h=new RegExp(t,"i"),s=this.get_search_regex(t),_=this.results_data,c=0,a=_.length;a>c;c++)e=_[c],e.search_match=!1,r=null,this.include_option_in_results(e)&&(e.group&&(e.group_match=!1,e.active_options=0),null!=e.group_array_index&&this.results_data[e.group_array_index]&&(r=this.results_data[e.group_array_index],0===r.active_options&&r.search_match&&(i+=1),r.active_options+=1),e.search_text=e.group?e.label:e.html,(!e.group||this.group_search)&&(e.search_match=this.search_string_match(e.search_text,s),e.search_match&&!e.group&&(i+=1),e.search_match?(o.length&&(n=e.search_text.search(h),l=e.search_text.substr(0,n+o.length)+"</em>"+e.search_text.substr(n+o.length),e.search_text=l.substr(0,n)+"<em>"+l.substr(n)),null!=r&&(r.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0)));return this.result_clear_highlight(),1>i&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e;return e=this.search_contains?"":"^",new RegExp(e+t,"i")},t.prototype.search_string_match=function(t,e){var s,i,r,o;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(i=t.replace(/\[|\]/g,"").split(" "),i.length))for(r=0,o=i.length;o>r;r++)if(s=i[r],e.test(s))return!0},t.prototype.choices_count=function(){var t,e,s,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=this.form_field.options,e=0,s=i.length;s>e;e++)t=i[e],t.selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){return t.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},t.prototype.keyup_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),e){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(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:case 18:break;default:return this.results_search()}},t.prototype.clipboard_event_checker=function(t){var e=this;return setTimeout(function(){return e.results_search()},50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return this.is_multiple&&!this.display_selected_options&&t.selected?!1:!this.display_disabled_options&&t.disabled?!1:t.empty?!1:!0},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){return this.touch_started?this.search_results_mouseup(t):void 0},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:(e=document.createElement("div"),e.appendChild(t),e.innerHTML)},t.browser_is_supported=function(){return/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:/IEMobile/i.test(window.navigator.userAgent)?!1:/Windows Phone/i.test(window.navigator.userAgent)?!1:/BlackBerry/i.test(window.navigator.userAgent)?!1:/BB10/i.test(window.navigator.userAgent)?!1:"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!0},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),$=jQuery,$.fn.extend({chosen:function(s){return t.browser_is_supported()?this.each(function(t){var i,r;return i=$(this),r=i.data("chosen"),"destroy"===s?void(r instanceof e&&r.destroy()):void(r instanceof e||i.data("chosen",new e(this,s)))}):this}}),e=function(t){function e(){return i=e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.setup=function(){return this.form_field_jq=$(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},e.prototype.set_up_html=function(){var t,e;return t=["chosen-container"],t.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),e={"class":t.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(e.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=$("<div />",e),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"><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()},e.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},e.prototype.register_observers=function(){var t=this;return this.container.bind("touchstart.chosen",function(e){return t.container_mousedown(e),e.preventDefault()}),this.container.bind("touchend.chosen",function(e){return t.container_mouseup(e),e.preventDefault()}),this.container.bind("mousedown.chosen",function(e){t.container_mousedown(e)}),this.container.bind("mouseup.chosen",function(e){t.container_mouseup(e)}),this.container.bind("mouseenter.chosen",function(e){t.mouse_enter(e)}),this.container.bind("mouseleave.chosen",function(e){t.mouse_leave(e)}),this.search_results.bind("mouseup.chosen",function(e){t.search_results_mouseup(e)}),this.search_results.bind("mouseover.chosen",function(e){t.search_results_mouseover(e)}),this.search_results.bind("mouseout.chosen",function(e){t.search_results_mouseout(e)}),this.search_results.bind("mousewheel.chosen DOMMouseScroll.chosen",function(e){t.search_results_mousewheel(e)}),this.search_results.bind("touchstart.chosen",function(e){t.search_results_touchstart(e)}),this.search_results.bind("touchmove.chosen",function(e){t.search_results_touchmove(e)}),this.search_results.bind("touchend.chosen",function(e){t.search_results_touchend(e)}),this.form_field_jq.bind("chosen:updated.chosen",function(e){t.results_update_field(e)}),this.form_field_jq.bind("chosen:activate.chosen",function(e){t.activate_field(e)}),this.form_field_jq.bind("chosen:open.chosen",function(e){t.container_mousedown(e)}),this.form_field_jq.bind("chosen:close.chosen",function(e){t.input_blur(e)}),this.search_field.bind("blur.chosen",function(e){t.input_blur(e)}),this.search_field.bind("keyup.chosen",function(e){t.keyup_checker(e)}),this.search_field.bind("keydown.chosen",function(e){t.keydown_checker(e)}),this.search_field.bind("focus.chosen",function(e){t.input_focus(e)}),this.search_field.bind("cut.chosen",function(e){t.clipboard_event_checker(e)}),this.search_field.bind("paste.chosen",function(e){t.clipboard_event_checker(e)}),this.is_multiple?this.search_choices.bind("click.chosen",function(e){t.choices_click(e)}):this.container.bind("click.chosen",function(t){t.preventDefault()})},e.prototype.destroy=function(){return $(this.container[0].ownerDocument).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()},e.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))},e.prototype.container_mousedown=function(t){return this.is_disabled||(t&&"mousedown"===t.type&&!this.results_showing&&t.preventDefault(),null!=t&&$(t.target).hasClass("search-choice-close"))?void 0:(this.active_field?this.is_multiple||!t||$(t.target)[0]!==this.selected_item[0]&&!$(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),$(this.container[0].ownerDocument).bind("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},e.prototype.container_mouseup=function(t){return"ABBR"!==t.target.nodeName||this.is_disabled?void 0:this.results_reset(t)},e.prototype.search_results_mousewheel=function(t){var e;return t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e?(t.preventDefault(),"DOMMouseScroll"===t.type&&(e=40*e),this.search_results.scrollTop(e+this.search_results.scrollTop())):void 0},e.prototype.blur_test=function(t){return!this.active_field&&this.container.hasClass("chosen-container-active")?this.close_field():void 0},e.prototype.close_field=function(){return $(this.container[0].ownerDocument).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()},e.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()},e.prototype.test_active_click=function(t){var e;return e=$(t.target).closest(".chosen-container"),e.length&&this.container[0]===e[0]?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.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},e.prototype.result_do_highlight=function(t){var e,s,i,r,o;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),i=parseInt(this.search_results.css("maxHeight"),10),o=this.search_results.scrollTop(),r=i+o,s=this.result_highlight.position().top+this.search_results.scrollTop(),e=s+this.result_highlight.outerHeight(),e>=r)return this.search_results.scrollTop(e-i>0?e-i:0);if(o>s)return this.search_results.scrollTop(s)}},e.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},e.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.results_showing=!0,this.search_field.focus(),this.search_field.val(this.search_field.val()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},e.prototype.update_results_content=function(t){return this.search_results.html(t)},e.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},e.prototype.set_tab_index=function(t){var e;return this.form_field.tabIndex?(e=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=e):void 0},e.prototype.set_label_behavior=function(){var t=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=$("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0?this.form_field_label.bind("click.chosen",function(e){return t.is_multiple?t.container_mousedown(e):t.activate_field()}):void 0},e.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"))},e.prototype.search_results_mouseup=function(t){var e;return e=$(t.target).hasClass("active-result")?$(t.target):$(t.target).parents(".active-result").first(),e.length?(this.result_highlight=e,this.result_select(t),this.search_field.focus()):void 0},e.prototype.search_results_mouseover=function(t){var e;return e=$(t.target).hasClass("active-result")?$(t.target):$(t.target).parents(".active-result").first(),e?this.result_do_highlight(e):void 0},e.prototype.search_results_mouseout=function(t){return $(t.target).hasClass("active-result")?this.result_clear_highlight():void 0},e.prototype.choice_build=function(t){var e,s,i=this;return e=$("<li />",{"class":"search-choice"}).html("<span>"+this.choice_label(t)+"</span>"),t.disabled?e.addClass("search-choice-disabled"):(s=$("<a />",{"class":"search-choice-close","data-option-array-index":t.array_index}),s.bind("click.chosen",function(t){return i.choice_destroy_link_click(t)}),e.append(s)),this.search_container.before(e)},e.prototype.choice_destroy_link_click=function(t){return t.preventDefault(),t.stopPropagation(),this.is_disabled?void 0:this.choice_destroy($(t.target))},e.prototype.choice_destroy=function(t){return this.result_deselect(t[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(),t.parents("li").first().remove(),this.search_field_scale()):void 0},e.prototype.results_reset=function(){return this.reset_single_select_options(),this.form_field.options[0].selected=!0,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},e.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},e.prototype.result_select=function(t){var e,s;return this.result_highlight?(e=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?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),s=this.results_data[e[0].getAttribute("data-option-array-index")],s.selected=!0,this.form_field.options[s.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(s):this.single_set_selected_text(this.choice_label(s)),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.show_search_field_default(),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[s.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())):void 0},e.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===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").html(t)},e.prototype.result_deselect=function(t){var e;return e=this.results_data[t],this.form_field.options[e.options_index].disabled?!1:(e.selected=!1,this.form_field.options[e.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[e.options_index].value}),this.search_field_scale(),!0)},e.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},e.prototype.get_search_text=function(){return $("<div/>").text($.trim(this.search_field.val())).html()},e.prototype.winnow_results_set_highlight=function(){var t,e;return e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),t=e.length?e.first():this.search_results.find(".active-result").first(),null!=t?this.result_do_highlight(t):void 0},e.prototype.no_results=function(t){var e;return e=$('<li class="no-results">'+this.results_none_found+' "<span></span>"</li>'),e.find("span").first().html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},e.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},e.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last(),t.length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(t){var e,s;switch(e=null!=(s=t.which)?s:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:this.results_showing&&t.preventDefault();break;case 32:this.disable_search&&t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},e.prototype.search_field_scale=function(){var t,e,s,i,r,o,n,l,h;if(this.is_multiple){for(s=0,n=0,r="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,h=o.length;h>l;l++)i=o[l],r+=i+":"+this.search_field.css(i)+";";return t=$("<div />",{style:r}),t.text(this.search_field.val()),$("body").append(t),n=t.width()+25,t.remove(),e=this.container.outerWidth(),n>e-10&&(n=e-10),this.search_field.css({width:n+"px"})}},e}(t)}).call(this);
assets/js/min/clipboard-min.js ADDED
@@ -0,0 +1 @@
 
1
+ !function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.Clipboard=t()}}(function(){var t,e,n;return function o(t,e,n){function r(c,s){if(!e[c]){if(!t[c]){var a="function"==typeof require&&require;if(!s&&a)return a(c,!0);if(i)return i(c,!0);var u=new Error("Cannot find module '"+c+"'");throw u.code="MODULE_NOT_FOUND",u}var l=e[c]={exports:{}};t[c][0].call(l.exports,function(e){var n=t[c][1][e];return r(n?n:e)},l,l.exports,o,t,e,n)}return e[c].exports}for(var i="function"==typeof require&&require,c=0;c<n.length;c++)r(n[c]);return r}({1:[function(t,e,n){var o=t("matches-selector");e.exports=function(t,e,n){for(var r=n?t:t.parentNode;r&&r!==document;){if(o(r,e))return r;r=r.parentNode}}},{"matches-selector":5}],2:[function(t,e,n){function o(t,e,n,o,i){var c=r.apply(this,arguments);return t.addEventListener(n,c,i),{destroy:function(){t.removeEventListener(n,c,i)}}}function r(t,e,n,o){return function(n){n.delegateTarget=i(n.target,e,!0),n.delegateTarget&&o.call(t,n)}}var i=t("closest");e.exports=o},{closest:1}],3:[function(t,e,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return"string"==typeof t||t instanceof String},n.fn=function(t){var e=Object.prototype.toString.call(t);return"[object Function]"===e}},{}],4:[function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!s.string(e))throw new TypeError("Second argument must be a String");if(!s.fn(n))throw new TypeError("Third argument must be a Function");if(s.node(t))return r(t,e,n);if(s.nodeList(t))return i(t,e,n);if(s.string(t))return c(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function c(t,e,n){return a(document.body,t,e,n)}var s=t("./is"),a=t("delegate");e.exports=o},{"./is":3,delegate:2}],5:[function(t,e,n){function o(t,e){if(i)return i.call(t,e);for(var n=t.parentNode.querySelectorAll(e),o=0;o<n.length;++o)if(n[o]==t)return!0;return!1}var r=Element.prototype,i=r.matchesSelector||r.webkitMatchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector;e.exports=o},{}],6:[function(t,e,n){function o(t){var e;if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName)t.focus(),t.setSelectionRange(0,t.value.length),e=t.value;else{t.hasAttribute("contenteditable")&&t.focus();var n=window.getSelection(),o=document.createRange();o.selectNodeContents(t),n.removeAllRanges(),n.addRange(o),e=n.toString()}return e}e.exports=o},{}],7:[function(t,e,n){function o(){}o.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;r>o;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,c=o.length;c>i;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},e.exports=o},{}],8:[function(e,n,o){!function(r,i){if("function"==typeof t&&t.amd)t(["module","select"],i);else if("undefined"!=typeof o)i(n,e("select"));else{var c={exports:{}};i(c,r.select),r.clipboardAction=c.exports}}(this,function(t,e){"use strict";function n(t){return t&&t.__esModule?t:{"default":t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var r=n(e),i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},c=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),s=function(){function t(e){o(this,t),this.resolveOptions(e),this.initSelection()}return t.prototype.resolveOptions=function e(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=t.action,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""},t.prototype.initSelection=function n(){if(this.text&&this.target)throw new Error('Multiple attributes declared, use either "target" or "text"');if(this.text)this.selectFake();else{if(!this.target)throw new Error('Missing required attributes, use either "target" or "text"');this.selectTarget()}},t.prototype.selectFake=function s(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandler=document.body.addEventListener("click",function(){return t.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="fixed",this.fakeElem.style[e?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,r["default"])(this.fakeElem),this.copyText()},t.prototype.removeFake=function a(){this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},t.prototype.selectTarget=function u(){this.selectedText=(0,r["default"])(this.target),this.copyText()},t.prototype.copyText=function l(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)},t.prototype.handleResult=function f(t){t?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},t.prototype.clearSelection=function d(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},t.prototype.destroy=function p(){this.removeFake()},c(t,[{key:"action",set:function h(){var t=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function g(){return this._action}},{key:"target",set:function y(t){if(void 0!==t){if(!t||"object"!==("undefined"==typeof t?"undefined":i(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');this._target=t}},get:function m(){return this._target}}]),t}();t.exports=s})},{select:6}],9:[function(e,n,o){!function(r,i){if("function"==typeof t&&t.amd)t(["module","./clipboard-action","tiny-emitter","good-listener"],i);else if("undefined"!=typeof o)i(n,e("./clipboard-action"),e("tiny-emitter"),e("good-listener"));else{var c={exports:{}};i(c,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=c.exports}}(this,function(t,e,n,o){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var u=r(e),l=r(n),f=r(o),d=function(t){function e(n,o){i(this,e);var r=c(this,t.call(this));return r.resolveOptions(o),r.listenClick(n),r}return s(e,t),e.prototype.resolveOptions=function n(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText},e.prototype.listenClick=function o(t){var e=this;this.listener=(0,f["default"])(t,"click",function(t){return e.onClick(t)})},e.prototype.onClick=function r(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new u["default"]({action:this.action(e),target:this.target(e),text:this.text(e),trigger:e,emitter:this})},e.prototype.defaultAction=function l(t){return a("action",t)},e.prototype.defaultTarget=function d(t){var e=a("target",t);return e?document.querySelector(e):void 0},e.prototype.defaultText=function p(t){return a("text",t)},e.prototype.destroy=function h(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},e}(l["default"]);t.exports=d})},{"./clipboard-action":8,"good-listener":4,"tiny-emitter":7}]},{},[9])(9)});
assets/js/min/codemirror-min.js CHANGED
@@ -1,6 +1,13 @@
1
- window.CodeMirror=function(){function e(r,n){if(!(this instanceof e))return new e(r,n);this.options=n=n||{};for(var i in bo)!n.hasOwnProperty(i)&&bo.hasOwnProperty(i)&&(n[i]=bo[i]);h(n);var o="string"==typeof n.value?0:n.value.first,a=this.display=t(r,o);a.wrapper.CodeMirror=this,c(this),n.autofocus&&!Qi&&gt(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,draggingText:!1,highlight:new ni},s(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap");var l=n.value;"string"==typeof l&&(l=new Eo(n.value,n.mode)),st(this,_n)(this,l),Ii&&setTimeout(di(mt,this,!0),20),yt(this);var u;try{u=document.activeElement==a.input}catch(f){}u||n.autofocus&&!Qi?setTimeout(di(Dt,this),20):It(this),st(this,function(){for(var e in yo)yo.propertyIsEnumerable(e)&&yo[e](this,n[e],xo);for(var t=0;t<Co.length;++t)Co[t](this)})()}function t(e,t){var r={},n=r.input=gi("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;");return Ri?n.style.width="1000px":n.setAttribute("wrap","off"),Zi&&(n.style.border="1px solid black"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),r.inputDiv=gi("div",[n],null,"overflow: hidden; position: relative; width: 3px; height: 0px;"),r.scrollbarH=gi("div",[gi("div",null,null,"height: 1px")],"CodeMirror-hscrollbar"),r.scrollbarV=gi("div",[gi("div",null,null,"width: 1px")],"CodeMirror-vscrollbar"),r.scrollbarFiller=gi("div",null,"CodeMirror-scrollbar-filler"),r.gutterFiller=gi("div",null,"CodeMirror-gutter-filler"),r.lineDiv=gi("div",null,"CodeMirror-code"),r.selectionDiv=gi("div",null,null,"position: relative; z-index: 1"),r.cursor=gi("div"," ","CodeMirror-cursor"),r.otherCursor=gi("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"),r.measure=gi("div",null,"CodeMirror-measure"),r.lineSpace=gi("div",[r.measure,r.selectionDiv,r.lineDiv,r.cursor,r.otherCursor],null,"position: relative; outline: none"),r.mover=gi("div",[gi("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=gi("div",[r.mover],"CodeMirror-sizer"),r.heightForcer=gi("div",null,null,"position: absolute; height: "+Po+"px; width: 1px;"),r.gutters=gi("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=gi("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=gi("div",[r.inputDiv,r.scrollbarH,r.scrollbarV,r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),qi&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),e.appendChild?e.appendChild(r.wrapper):e(r.wrapper),Zi&&(n.style.width="0px"),Ri||(r.scroller.draggable=!0),Ui?(r.inputDiv.style.height="1px",r.inputDiv.style.position="absolute"):qi&&(r.scrollbarH.style.minWidth=r.scrollbarV.style.minWidth="18px"),r.viewOffset=r.lastSizeC=0,r.showingFrom=r.showingTo=t,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.prevInput="",r.alignWidgets=!1,r.pollingFast=!1,r.poll=new ni,r.cachedCharWidth=r.cachedTextHeight=null,r.measureLineCache=[],r.measureLineCachePos=0,r.inaccurateSelection=!1,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r}function r(t){t.doc.mode=e.getMode(t.options,t.doc.modeOption),n(t)}function n(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.frontier=e.doc.first,H(e,100),e.state.modeGen++,e.curOp&&ft(e)}function i(e){e.options.lineWrapping?(e.display.wrapper.className+=" CodeMirror-wrap",e.display.sizer.style.minWidth=""):(e.display.wrapper.className=e.display.wrapper.className.replace(" CodeMirror-wrap",""),d(e)),a(e),ft(e),U(e),setTimeout(function(){p(e)},100)}function o(e){var t=it(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/ot(e.display)-3);return function(i){return Yr(e.doc,i)?0:r?(Math.ceil(i.text.length/n)||1)*t:t}}function a(e){var t=e.doc,r=o(e);t.iter(function(e){var t=r(e);t!=e.height&&Ln(e,t)})}function l(e){var t=So[e.options.keyMap],r=t.style;e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(r?" cm-keymap-"+r:"")}function s(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),U(e)}function u(e){c(e),ft(e),setTimeout(function(){g(e)},20)}function c(e){var t=e.display.gutters,r=e.options.gutters;vi(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(gi("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none"}function f(e,t){if(0==t.height)return 0;for(var r=t.text.length,n,i=t;n=Kr(i);){var o=n.find();i=kn(e,o.from.line),r+=o.from.ch-o.to.ch}for(i=t;n=Ur(i);){var o=n.find();r-=i.text.length-o.from.ch,i=kn(e,o.to.line),r+=i.text.length-o.to.ch}return r}function d(e){var t=e.display,r=e.doc;t.maxLine=kn(r,r.first),t.maxLineLength=f(r,t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var n=f(r,e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)})}function h(e){var t=si(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}function p(e){var t=e.display,r=e.doc.height,n=r+q(t);t.sizer.style.minHeight=t.heightForcer.style.top=n+"px",t.gutters.style.height=Math.max(n,t.scroller.clientHeight-Po)+"px";var i=Math.max(n,t.scroller.scrollHeight),o=t.scroller.scrollWidth>t.scroller.clientWidth+1,a=i>t.scroller.clientHeight+1;a?(t.scrollbarV.style.display="block",t.scrollbarV.style.bottom=o?_i(t.measure)+"px":"0",t.scrollbarV.firstChild.style.height=i-t.scroller.clientHeight+t.scrollbarV.clientHeight+"px"):(t.scrollbarV.style.display="",t.scrollbarV.firstChild.style.height="0"),o?(t.scrollbarH.style.display="block",t.scrollbarH.style.right=a?_i(t.measure)+"px":"0",t.scrollbarH.firstChild.style.width=t.scroller.scrollWidth-t.scroller.clientWidth+t.scrollbarH.clientWidth+"px"):(t.scrollbarH.style.display="",t.scrollbarH.firstChild.style.width="0"),o&&a?(t.scrollbarFiller.style.display="block",t.scrollbarFiller.style.height=t.scrollbarFiller.style.width=_i(t.measure)+"px"):t.scrollbarFiller.style.display="",o&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(t.gutterFiller.style.display="block",t.gutterFiller.style.height=_i(t.measure)+"px",t.gutterFiller.style.width=t.gutters.offsetWidth+"px"):t.gutterFiller.style.display="",$i&&0===_i(t.measure)&&(t.scrollbarV.style.minWidth=t.scrollbarH.style.minHeight=Xi?"18px":"12px",t.scrollbarV.style.pointerEvents=t.scrollbarH.style.pointerEvents="none")}function m(e,t,r){var n=e.scroller.scrollTop,i=e.wrapper.clientHeight;"number"==typeof r?n=r:r&&(n=r.top,i=r.bottom-r.top),n=Math.floor(n-I(e));var o=Math.ceil(n+i);return{from:Tn(t,n),to:Tn(t,o)}}function g(e){var t=e.display;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=b(t)-t.scroller.scrollLeft+e.doc.scrollLeft,n=t.gutters.offsetWidth,i=r+"px",o=t.lineDiv.firstChild;o;o=o.nextSibling)if(o.alignable)for(var a=0,l=o.alignable;a<l.length;++a)l[a].style.left=i;e.options.fixedGutter&&(t.gutters.style.left=r+n+"px")}}function v(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=y(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(gi("div",[gi("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-a),n.lineNumWidth=n.lineNumInnerWidth+a,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",!0}return!1}function y(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function b(e){return xi(e.scroller).left-xi(e.sizer).left}function x(e,t,r,n){for(var i=e.display.showingFrom,o=e.display.showingTo,a,l=m(e.display,e.doc,r),s=!0;;s=!1){var u=e.display.scroller.clientWidth;if(!w(e,t,l,n))break;if(a=!0,t=[],A(e),p(e),s&&e.options.lineWrapping&&u!=e.display.scroller.clientWidth)n=!0;else if(n=!1,r&&(r=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,"number"==typeof r?r:r.top)),l=m(e.display,e.doc,r),l.from>=e.display.showingFrom&&l.to<=e.display.showingTo)break}return a&&(Qn(e,"update",e),(e.display.showingFrom!=i||e.display.showingTo!=o)&&Qn(e,"viewportChange",e,e.display.showingFrom,e.display.showingTo)),a}function w(e,t,r,n){var i=e.display,o=e.doc;if(!i.wrapper.offsetWidth)return i.showingFrom=i.showingTo=o.first,void(i.viewOffset=0);if(!(!n&&0==t.length&&r.from>i.showingFrom&&r.to<i.showingTo)){v(e)&&(t=[{from:o.first,to:o.first+o.size}]);var a=i.sizer.style.marginLeft=i.gutters.offsetWidth+"px";i.scrollbarH.style.left=e.options.fixedGutter?a:"0";var l=1/0;if(e.options.lineNumbers)for(var s=0;s<t.length;++s)t[s].diff&&t[s].from<l&&(l=t[s].from);var u=o.first+o.size,c=Math.max(r.from-e.options.viewportMargin,o.first),f=Math.min(u,r.to+e.options.viewportMargin);if(i.showingFrom<c&&c-i.showingFrom<20&&(c=Math.max(o.first,i.showingFrom)),i.showingTo>f&&i.showingTo-f<20&&(f=Math.min(u,i.showingTo)),oo)for(c=Sn(Xr(o,kn(o,c)));u>f&&Yr(o,kn(o,f));)++f;var d=[{from:Math.max(i.showingFrom,o.first),to:Math.min(i.showingTo,u)}];if(d=d[0].from>=d[0].to?[]:C(d,t),oo)for(var s=0;s<d.length;++s)for(var h=d[s],p;p=Ur(kn(o,h.to-1));){var m=p.find().from.line;if(!(m>h.from)){d.splice(s--,1);break}h.to=m}for(var g=0,s=0;s<d.length;++s){var h=d[s];h.from<c&&(h.from=c),h.to>f&&(h.to=f),h.from>=h.to?d.splice(s--,1):g+=h.to-h.from}if(!n&&g==f-c&&c==i.showingFrom&&f==i.showingTo)return void k(e);d.sort(function(e,t){return e.from-t.from});try{var y=document.activeElement}catch(b){}.7*(f-c)>g&&(i.lineDiv.style.display="none"),L(e,c,f,d,l),i.lineDiv.style.display="",y&&document.activeElement!=y&&y.offsetHeight&&y.focus();var x=c!=i.showingFrom||f!=i.showingTo||i.lastSizeC!=i.wrapper.clientHeight;return x&&(i.lastSizeC=i.wrapper.clientHeight,H(e,400)),i.showingFrom=c,i.showingTo=f,i.gutters.style.height="",_(e),k(e),!0}}function _(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=t.lineDiv.firstChild,i;n;n=n.nextSibling)if(n.lineObj){if(qi){var o=n.offsetTop+n.offsetHeight;i=o-r,r=o}else{var a=xi(n);i=a.bottom-a.top}var l=n.lineObj.height-i;if(2>i&&(i=it(t)),l>.001||-.001>l){Ln(n.lineObj,i);var s=n.lineObj.widgets;if(s)for(var u=0;u<s.length;++u)s[u].height=s[u].node.offsetHeight}}}function k(e){var t=e.display.viewOffset=An(e,kn(e.doc,e.display.showingFrom));e.display.mover.style.top=t+"px"}function C(e,t){for(var r=0,n=t.length||0;n>r;++r){for(var i=t[r],o=[],a=i.diff||0,l=0,s=e.length;s>l;++l){var u=e[l];i.to<=u.from&&i.diff?o.push({from:u.from+a,to:u.to+a}):i.to<=u.from||i.from>=u.to?o.push(u):(i.from>u.from&&o.push({from:u.from,to:i.from}),i.to<u.to&&o.push({from:i.to+a,to:u.to+a}))}e=o}return e}function M(e){for(var t=e.display,r={},n={},i=t.gutters.firstChild,o=0;i;i=i.nextSibling,++o)r[e.options.gutters[o]]=i.offsetLeft,n[e.options.gutters[o]]=i.offsetWidth;return{fixedPos:b(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function L(e,t,r,n,i){function o(t){var r=t.nextSibling;return Ri&&Ji&&e.display.currentWheelTarget==t?(t.style.display="none",t.lineObj=null):t.parentNode.removeChild(t),r}var a=M(e),l=e.display,s=e.options.lineNumbers;n.length||Ri&&e.display.currentWheelTarget||vi(l.lineDiv);var u=l.lineDiv,c=u.firstChild,f=n.shift(),d=t;for(e.doc.iter(t,r,function(t){if(f&&f.to==d&&(f=n.shift()),Yr(e.doc,t)){if(0!=t.height&&Ln(t,0),t.widgets&&c&&c.previousSibling)for(var r=0;r<t.widgets.length;++r){var l=t.widgets[r];if(l.showIfHidden){var h=c.previousSibling;if(/pre/i.test(h.nodeName)){var p=gi("div",null,null,"position: relative");h.parentNode.replaceChild(p,h),p.appendChild(h),h=p}var m=h.appendChild(gi("div",[l.node],"CodeMirror-linewidget"));l.handleMouseEvents||(m.ignoreEvents=!0),T(l,m,h,a)}}}else if(f&&f.from<=d&&f.to>d){for(;c.lineObj!=t;)c=o(c);s&&d>=i&&c.lineNumber&&bi(c.lineNumber,y(e.options,d)),c=c.nextSibling}else{if(t.widgets)for(var g=0,v=c,b;v&&20>g;++g,v=v.nextSibling)if(v.lineObj==t&&/div/i.test(v.nodeName)){b=v;break}var x=S(e,t,d,a,b);if(x!=b)u.insertBefore(x,c);else{for(;c!=b;)c=o(c);c=c.nextSibling}x.lineObj=t}++d});c;)c=o(c)}function S(e,t,r,n,i){var o=fn(e,t),a=o.pre,l=t.gutterMarkers,s=e.display,u,c=o.bgClass?o.bgClass+" "+(t.bgClass||""):t.bgClass;if(!(e.options.lineNumbers||l||c||t.wrapClass||t.widgets))return a;if(i){i.alignable=null;for(var f=!0,d=0,h=null,p=i.firstChild,m;p;p=m)if(m=p.nextSibling,/\bCodeMirror-linewidget\b/.test(p.className)){for(var g=0;g<t.widgets.length;++g){var v=t.widgets[g];if(v.node==p.firstChild){v.above||h||(h=p),T(v,p,i,n),++d;break}}if(g==t.widgets.length){f=!1;break}}else i.removeChild(p);i.insertBefore(a,h),f&&d==t.widgets.length&&(u=i,i.className=t.wrapClass||"")}if(u||(u=gi("div",null,t.wrapClass,"position: relative"),u.appendChild(a)),c&&u.insertBefore(gi("div",null,c+" CodeMirror-linebackground"),u.firstChild),e.options.lineNumbers||l){var b=u.insertBefore(gi("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px"),a);if(e.options.fixedGutter&&(u.alignable||(u.alignable=[])).push(b),!e.options.lineNumbers||l&&l["CodeMirror-linenumbers"]||(u.lineNumber=b.appendChild(gi("div",y(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+s.lineNumInnerWidth+"px"))),l)for(var x=0;x<e.options.gutters.length;++x){var w=e.options.gutters[x],_=l.hasOwnProperty(w)&&l[w];_&&b.appendChild(gi("div",[_],"CodeMirror-gutter-elt","left: "+n.gutterLeft[w]+"px; width: "+n.gutterWidth[w]+"px"))}}if(qi&&(u.style.zIndex=2),t.widgets&&u!=i)for(var g=0,k=t.widgets;g<k.length;++g){var v=k[g],C=gi("div",[v.node],"CodeMirror-linewidget");v.handleMouseEvents||(C.ignoreEvents=!0),T(v,C,u,n),v.above?u.insertBefore(C,e.options.lineNumbers&&0!=t.height?b:a):u.appendChild(C),Qn(v,"redraw")}return u}function T(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function A(e){var t=e.display,r=Yt(e.doc.sel.from,e.doc.sel.to);if(r||e.options.showCursorWhenSelecting?z(e):t.cursor.style.display=t.otherCursor.style.display="none",r?t.selectionDiv.style.display="none":N(e),e.options.moveInputWithCursor){var n=et(e,e.doc.sel.head,"div"),i=xi(t.wrapper),o=xi(t.lineDiv);t.inputDiv.style.top=Math.max(0,Math.min(t.wrapper.clientHeight-10,n.top+o.top-i.top))+"px",t.inputDiv.style.left=Math.max(0,Math.min(t.wrapper.clientWidth-10,n.left+o.left-i.left))+"px"}}function z(e){var t=e.display,r=et(e,e.doc.sel.head,"div");t.cursor.style.left=r.left+"px",t.cursor.style.top=r.top+"px",t.cursor.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",t.cursor.style.display="",r.other?(t.otherCursor.style.display="",t.otherCursor.style.left=r.other.left+"px",t.otherCursor.style.top=r.other.top+"px",t.otherCursor.style.height=.85*(r.other.bottom-r.other.top)+"px"):t.otherCursor.style.display="none"}function N(e){function t(e,t,r,n){0>t&&(t=0),a.appendChild(gi("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px; top: "+t+"px; width: "+(null==r?l-e:r)+"px; height: "+(n-t)+"px"))}function r(r,n,o){function a(t,n){return J(e,Xt(r,t),"div",u,n)}var u=kn(i,r),c=u.text.length,f,d;return Ci(zn(u),n||0,null==o?c:o,function(e,r,i){var u=a(e,"left"),h,p,m;if(e==r)h=u,p=m=u.left;else{if(h=a(r-1,"right"),"rtl"==i){var g=u;u=h,h=g}p=u.left,m=h.right}null==n&&0==e&&(p=s),h.top-u.top>3&&(t(p,u.top,null,u.bottom),p=s,u.bottom<h.top&&t(p,u.bottom,null,h.top)),null==o&&r==c&&(m=l),(!f||u.top<f.top||u.top==f.top&&u.left<f.left)&&(f=u),(!d||h.bottom>d.bottom||h.bottom==d.bottom&&h.right>d.right)&&(d=h),s+1>p&&(p=s),t(p,h.top,m-p,h.bottom)}),{start:f,end:d}}var n=e.display,i=e.doc,o=e.doc.sel,a=document.createDocumentFragment(),l=n.lineSpace.offsetWidth,s=P(e.display);if(o.from.line==o.to.line)r(o.from.line,o.from.ch,o.to.ch);else{var u=kn(i,o.from.line),c=kn(i,o.to.line),f=Xr(i,u)==Xr(i,c),d=r(o.from.line,o.from.ch,f?u.text.length:null).end,h=r(o.to.line,f?0:null,o.to.ch).start;f&&(d.top<h.top-2?(t(d.right,d.top,null,d.bottom),t(s,h.top,h.left,h.bottom)):t(d.right,d.top,h.left-d.right,d.bottom)),d.bottom<h.top&&t(s,d.bottom,null,h.top)}yi(n.selectionDiv,a),n.selectionDiv.style.display=""}function W(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursor.style.visibility=t.otherCursor.style.visibility="",e.options.cursorBlinkRate>0&&(t.blinker=setInterval(function(){t.cursor.style.visibility=t.otherCursor.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate))}}function H(e,t){e.doc.mode.startState&&e.doc.frontier<e.display.showingTo&&e.state.highlight.set(t,di(E,e))}function E(e){var t=e.doc;if(t.frontier<t.first&&(t.frontier=t.first),!(t.frontier>=e.display.showingTo)){var r=+new Date+e.options.workTime,n=_r(t.mode,D(e,t.frontier)),i=[],o;t.iter(t.frontier,Math.min(t.first+t.size,e.display.showingTo+500),function(a){if(t.frontier>=e.display.showingFrom){var l=a.styles;a.styles=ln(e,a,n,!0);for(var s=!l||l.length!=a.styles.length,u=0;!s&&u<l.length;++u)s=l[u]!=a.styles[u];s&&(o&&o.end==t.frontier?o.end++:i.push(o={start:t.frontier,end:t.frontier+1})),a.stateAfter=_r(t.mode,n)}else un(e,a.text,n),a.stateAfter=t.frontier%5==0?_r(t.mode,n):null;return++t.frontier,+new Date>r?(H(e,e.options.workDelay),!0):void 0}),i.length&&st(e,function(){for(var e=0;e<i.length;++e)ft(this,i[e].start,i[e].end)})()}}function O(e,t,r){for(var n,i,o=e.doc,a=r?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=kn(o,l-1);if(s.stateAfter&&(!r||l<=o.frontier))return l;var u=ii(s.text,null,e.options.tabSize);(null==i||n>u)&&(i=l-1,n=u)}return i}function D(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return!0;var o=O(e,t,r),a=o>n.first&&kn(n,o-1).stateAfter;return a=a?_r(n.mode,a):kr(n.mode),n.iter(o,t,function(r){un(e,r.text,a);var l=o==t-1||o%5==0||o>=i.showingFrom&&o<i.showingTo;r.stateAfter=l?_r(n.mode,a):null,++o}),r&&(n.frontier=o),a}function I(e){return e.lineSpace.offsetTop}function q(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function P(e){var t=yi(e.measure,gi("pre",null,null,"text-align: left")).appendChild(gi("span","x"));return t.offsetLeft}function F(e,t,r,n,i){var o=-1;if(n=n||B(e,t),n.crude){var a=n.left+r*n.width;return{left:a,right:a+n.width,top:n.top,bottom:n.bottom}}for(var l=r;;l+=o){var s=n[l];if(s)break;0>o&&0==l&&(o=1)}return i=l>r?"left":r>l?"right":i,"left"==i&&s.leftSide?s=s.leftSide:"right"==i&&s.rightSide&&(s=s.rightSide),{left:r>l?s.right:s.left,right:l>r?s.left:s.right,top:s.top,bottom:s.bottom}}function V(e,t){for(var r=e.display.measureLineCache,n=0;n<r.length;++n){var i=r[n];if(i.text==t.text&&i.markedSpans==t.markedSpans&&e.display.scroller.clientWidth==i.width&&i.classes==t.textClass+"|"+t.wrapClass)return i}}function R(e,t){var r=V(e,t);r&&(r.text=r.measure=r.markedSpans=null)}function B(e,t){var r=V(e,t);if(r)return r.measure;var n=G(e,t),i=e.display.measureLineCache,o={text:t.text,width:e.display.scroller.clientWidth,markedSpans:t.markedSpans,measure:n,classes:t.textClass+"|"+t.wrapClass};return 16==i.length?i[++e.display.measureLineCachePos%16]=o:i.push(o),n}function G(e,t){function r(e){var t=e.top-p.top,r=e.bottom-p.top;r>v&&(r=v),0>t&&(t=0);for(var n=m.length-2;n>=0;n-=2){var i=m[n],o=m[n+1];if(!(i>r||t>o)&&(t>=i&&o>=r||i>=t&&r>=o||Math.min(r,o)-Math.max(t,i)>=r-t>>1)){m[n]=Math.min(t,i),m[n+1]=Math.max(r,o);break}}return 0>n&&(n=m.length,m.push(t,r)),{left:e.left-p.left,right:e.right-p.left,top:n,bottom:null}}function n(e){e.bottom=m[e.top+1],e.top=m[e.top]}if(!e.options.lineWrapping&&t.text.length>=e.options.crudeMeasuringFrom)return j(e,t);var i=e.display,o=fi(t.text.length),a=fn(e,t,o,!0).pre;if(Ii&&!qi&&!e.options.lineWrapping&&a.childNodes.length>100){for(var l=document.createDocumentFragment(),s=10,u=a.childNodes.length,c=0,f=Math.ceil(u/s);f>c;++c){for(var d=gi("div",null,null,"display: inline-block"),h=0;s>h&&u;++h)d.appendChild(a.firstChild),--u;l.appendChild(d)}a.appendChild(l)}yi(i.measure,a);var p=xi(i.lineDiv),m=[],g=fi(t.text.length),v=a.offsetHeight;Pi&&i.measure.first!=a&&yi(i.measure,a);for(var c=0,y;c<o.length;++c)if(y=o[c]){var b=y,x=null;if(/\bCodeMirror-widget\b/.test(y.className)&&y.getClientRects){1==y.firstChild.nodeType&&(b=y.firstChild);var w=b.getClientRects();w.length>1&&(x=g[c]=r(w[0]),x.rightSide=r(w[w.length-1]))}x||(x=g[c]=r(xi(b))),y.measureRight&&(x.right=xi(y.measureRight).left-p.left),y.leftSide&&(x.leftSide=r(xi(y.leftSide)))}vi(e.display.measure);for(var c=0,y;c<g.length;++c)(y=g[c])&&(n(y),y.leftSide&&n(y.leftSide),y.rightSide&&n(y.rightSide));return g}function j(e,t){var r=new zo(t.text.slice(0,100),null);t.textClass&&(r.textClass=t.textClass);var n=G(e,r),i=F(e,r,0,n,"left"),o=F(e,r,99,n,"right");return{crude:!0,top:i.top,left:i.left,bottom:i.bottom,width:(o.right-i.left)/100}}function K(e,t){var r=!1;if(t.markedSpans)for(var n=0;n<t.markedSpans;++n){var i=t.markedSpans[n];!i.collapsed||null!=i.to&&i.to!=t.text.length||(r=!0)}var o=!r&&V(e,t);if(o||t.text.length>=e.options.crudeMeasuringFrom)return F(e,t,t.text.length,o&&o.measure,"right").right;var a=fn(e,t,null,!0).pre,l=a.appendChild(ki(e.display.measure));return yi(e.display.measure,a),xi(l).right-xi(e.display.lineDiv).left}function U(e){e.display.measureLineCache.length=e.display.measureLineCachePos=0,e.display.cachedCharWidth=e.display.cachedTextHeight=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function X(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Y(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function Z(e,t,r,n){if(t.widgets)for(var i=0;i<t.widgets.length;++i)if(t.widgets[i].above){var o=tn(t.widgets[i]);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var a=An(e,t);if("local"==n?a+=I(e.display):a-=e.display.viewOffset,"page"==n||"window"==n){var l=xi(e.display.lineSpace);a+=l.top+("window"==n?0:Y());var s=l.left+("window"==n?0:X());r.left+=s,r.right+=s}return r.top+=a,r.bottom+=a,r}function Q(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=X(),i-=Y();else if("local"==r||!r){var o=xi(e.display.sizer);n+=o.left,i+=o.top}var a=xi(e.display.lineSpace);return{left:n-a.left,top:i-a.top}}function J(e,t,r,n,i){return n||(n=kn(e.doc,t.line)),Z(e,n,F(e,n,t.ch,null,i),r)}function et(e,t,r,n,i){function o(t,o){var a=F(e,n,t,i,o?"right":"left");return o?a.left=a.right:a.right=a.left,Z(e,n,a,r)}function a(e,t){var r=l[t],n=r.level%2;return e==Mi(r)&&t&&r.level<l[t-1].level?(r=l[--t],e=Li(r)-(r.level%2?0:1),n=!0):e==Li(r)&&t<l.length-1&&r.level<l[t+1].level&&(r=l[++t],e=Mi(r)-r.level%2,n=!1),n&&e==r.to&&e>r.from?o(e-1):o(e,n)}n=n||kn(e.doc,t.line),i||(i=B(e,n));var l=zn(n),s=t.ch;if(!l)return o(s);var u=Wi(l,s),c=a(s,u);return null!=Zo&&(c.other=a(s,Zo)),c}function tt(e,t,r,n){var i=new Xt(e,t);return i.xRel=n,r&&(i.outside=!0),i}function rt(e,t,r){var n=e.doc;if(r+=e.display.viewOffset,0>r)return tt(n.first,0,!0,-1);var i=Tn(n,r),o=n.first+n.size-1;if(i>o)return tt(n.first+n.size-1,kn(n,o).text.length,!0,1);for(0>t&&(t=0);;){var a=kn(n,i),l=nt(e,a,i,t,r),s=Ur(a),u=s&&s.find();if(!s||!(l.ch>u.from.ch||l.ch==u.from.ch&&l.xRel>0))return l;i=u.to.line}}function nt(e,t,r,n,i){function o(n){var i=et(e,Xt(r,n),"line",t,u);return l=!0,a>i.bottom?i.left-s:a<i.top?i.left+s:(l=!1,i.left)}var a=i-An(e,t),l=!1,s=2*e.display.wrapper.clientWidth,u=B(e,t),c=zn(t),f=t.text.length,d=Si(t),h=Ti(t),p=o(d),m=l,g=o(h),v=l;if(n>g)return tt(r,h,v,1);for(;;){if(c?h==d||h==Ei(t,d,1):1>=h-d){for(var y=p>n||g-n>=n-p?d:h,b=n-(y==d?p:g);mi(t.text.charAt(y));)++y;var x=tt(r,y,y==d?m:v,0>b?-1:b?1:0);return x}var w=Math.ceil(f/2),_=d+w;if(c){_=d;for(var k=0;w>k;++k)_=Ei(t,_,1)}var C=o(_);C>n?(h=_,g=C,(v=l)&&(g+=1e3),f=w):(d=_,p=C,m=l,f-=w)}}function it(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ao){ao=gi("pre");for(var t=0;49>t;++t)ao.appendChild(document.createTextNode("x")),ao.appendChild(gi("br"));ao.appendChild(document.createTextNode("x"))}yi(e.measure,ao);var r=ao.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),vi(e.measure),r||1}function ot(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=gi("span","x"),r=gi("pre",[t]);yi(e.measure,r);var n=t.offsetWidth;return n>2&&(e.cachedCharWidth=n),n||10}function at(e){e.curOp={changes:[],forceUpdate:!1,updateInput:null,userSelChange:null,textChanged:null,selectionChanged:!1,cursorActivity:!1,updateMaxLine:!1,updateScrollPos:!1,id:++lo},qo++||(Io=[])}function lt(e){var t=e.curOp,r=e.doc,n=e.display;if(e.curOp=null,t.updateMaxLine&&d(e),n.maxLineChanged&&!e.options.lineWrapping&&n.maxLine){var i=K(e,n.maxLine);n.sizer.style.minWidth=Math.max(0,i+3+Po)+"px",n.maxLineChanged=!1;var o=Math.max(0,n.sizer.offsetLeft+n.sizer.offsetWidth-n.scroller.clientWidth);o<r.scrollLeft&&!t.updateScrollPos&&Tt(e,Math.min(n.scroller.scrollLeft,o),!0)}var a,l;if(t.updateScrollPos)a=t.updateScrollPos;else if(t.selectionChanged&&n.scroller.clientHeight){var s=et(e,r.sel.head);a=dr(e,s.left,s.top,s.left,s.bottom)}if((t.changes.length||t.forceUpdate||a&&null!=a.scrollTop)&&(l=x(e,t.changes,a&&a.scrollTop,t.forceUpdate),e.display.scroller.offsetHeight&&(e.doc.scrollTop=e.display.scroller.scrollTop)),!l&&t.selectionChanged&&A(e),t.updateScrollPos){var u=Math.max(0,Math.min(n.scroller.scrollHeight-n.scroller.clientHeight,a.scrollTop)),c=Math.max(0,Math.min(n.scroller.scrollWidth-n.scroller.clientWidth,a.scrollLeft));n.scroller.scrollTop=n.scrollbarV.scrollTop=r.scrollTop=u,n.scroller.scrollLeft=n.scrollbarH.scrollLeft=r.scrollLeft=c,g(e),t.scrollToPos&&cr(e,tr(e.doc,t.scrollToPos.from),tr(e.doc,t.scrollToPos.to),t.scrollToPos.margin)}else a&&ur(e);t.selectionChanged&&W(e),e.state.focused&&t.updateInput&&mt(e,t.userSelChange);var f=t.maybeHiddenMarkers,h=t.maybeUnhiddenMarkers;if(f)for(var p=0;p<f.length;++p)f[p].lines.length||Zn(f[p],"hide");if(h)for(var p=0;p<h.length;++p)h[p].lines.length&&Zn(h[p],"unhide");var m;if(--qo||(m=Io,Io=null),t.textChanged&&Zn(e,"change",e,t.textChanged),t.cursorActivity&&Zn(e,"cursorActivity",e),m)for(var p=0;p<m.length;++p)m[p]()}function st(e,t){return function(){var r=e||this,n=!r.curOp;n&&at(r);try{var i=t.apply(r,arguments)}finally{n&&lt(r)}return i}}function ut(e){return function(){var t=this.cm&&!this.cm.curOp,r;t&&at(this.cm);try{r=e.apply(this,arguments)}finally{t&&lt(this.cm)}return r}}function ct(e,t){var r=!e.curOp,n;r&&at(e);try{n=t()}finally{r&&lt(e)}return n}function ft(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),e.curOp.changes.push({from:t,to:r,diff:n})}function dt(e){e.display.pollingFast||e.display.poll.set(e.options.pollInterval,function(){pt(e),e.state.focused&&dt(e)})}function ht(e){function t(){var n=pt(e);n||r?(e.display.pollingFast=!1,dt(e)):(r=!0,e.display.poll.set(60,t))}var r=!1;e.display.pollingFast=!0,e.display.poll.set(20,t)}function pt(e){var t=e.display.input,r=e.display.prevInput,n=e.doc,i=n.sel;if(!e.state.focused||$o(t)||vt(e)||e.options.disableInput)return!1;e.state.pasteIncoming&&e.state.fakedLastChar&&(t.value=t.value.substring(0,t.value.length-1),e.state.fakedLastChar=!1);var o=t.value;if(o==r&&Yt(i.from,i.to))return!1;if(Vi&&!Pi&&e.display.inputHasSelection===o)return mt(e,!0),!1;var a=!e.curOp;a&&at(e),i.shift=!1;for(var l=0,s=Math.min(r.length,o.length);s>l&&r.charCodeAt(l)==o.charCodeAt(l);)++l;var u=i.from,c=i.to,f=o.slice(l);l<r.length?u=Xt(u.line,u.ch-(r.length-l)):e.state.overwrite&&Yt(u,c)&&!e.state.pasteIncoming&&(c=Xt(c.line,Math.min(kn(n,c.line).text.length,c.ch+f.length)));var d=e.curOp.updateInput,h={from:u,to:c,text:Uo(f),origin:e.state.pasteIncoming?"paste":e.state.cutIncoming?"cut":"+input"};if(Rt(e.doc,h,"end"),e.curOp.updateInput=d,Qn(e,"inputRead",e,h),f&&!e.state.pasteIncoming&&e.options.electricChars&&e.options.smartIndent&&i.head.ch<100){var p=e.getModeAt(i.head).electricChars;if(p)for(var m=0;m<p.length;m++)if(f.indexOf(p.charAt(m))>-1){mr(e,i.head.line,"smart");break}}return o.length>1e3||o.indexOf("\n")>-1?t.value=e.display.prevInput="":e.display.prevInput=o,a&&lt(e),e.state.pasteIncoming=e.state.cutIncoming=!1,!0}function mt(e,t){var r,n,i=e.doc;if(Yt(i.sel.from,i.sel.to))t&&(e.display.prevInput=e.display.input.value="",Vi&&!Pi&&(e.display.inputHasSelection=null));else{e.display.prevInput="",r=Xo&&(i.sel.to.line-i.sel.from.line>100||(n=e.getSelection()).length>1e3);var o=r?"-":n||e.getSelection();e.display.input.value=o,e.state.focused&&li(e.display.input),Vi&&!Pi&&(e.display.inputHasSelection=o)}e.display.inaccurateSelection=r}function gt(e){"nocursor"==e.options.readOnly||Qi&&document.activeElement==e.display.input||e.display.input.focus()}function vt(e){return e.options.readOnly||e.doc.cantEdit}function yt(e){function t(){e.state.focused&&setTimeout(di(gt,e),0)}function r(){null==l&&(l=setTimeout(function(){l=null,a.cachedCharWidth=a.cachedTextHeight=jo=null,U(e),ct(e,di(ft,e))},100))}function n(){for(var e=a.wrapper.parentNode;e&&e!=document.body;e=e.parentNode);e?setTimeout(n,5e3):Yn(window,"resize",r)}function i(t){Jn(e,t)||e.options.onDragEvent&&e.options.onDragEvent(e,Rn(t))||Kn(t)}function o(t){a.inaccurateSelection&&(a.prevInput="",a.inaccurateSelection=!1,a.input.value=e.getSelection(),li(a.input)),"cut"==t.type&&(e.state.cutIncoming=!0)}var a=e.display;Xn(a.scroller,"mousedown",st(e,wt)),Ii?Xn(a.scroller,"dblclick",st(e,function(t){if(!Jn(e,t)){var r=xt(e,t);if(r&&!Ct(e,t)&&!bt(e.display,t)){Bn(t);var n=br(kn(e.doc,r.line).text,r);ir(e.doc,n.from,n.to)}}})):Xn(a.scroller,"dblclick",function(t){Jn(e,t)||Bn(t)}),Xn(a.lineSpace,"selectstart",function(e){bt(a,e)||Bn(e)}),no||Xn(a.scroller,"contextmenu",function(t){qt(e,t)}),Xn(a.scroller,"scroll",function(){a.scroller.clientHeight&&(St(e,a.scroller.scrollTop),Tt(e,a.scroller.scrollLeft,!0),Zn(e,"scroll",e))}),Xn(a.scrollbarV,"scroll",function(){a.scroller.clientHeight&&St(e,a.scrollbarV.scrollTop)}),Xn(a.scrollbarH,"scroll",function(){a.scroller.clientHeight&&Tt(e,a.scrollbarH.scrollLeft)}),Xn(a.scroller,"mousewheel",function(t){At(e,t)}),Xn(a.scroller,"DOMMouseScroll",function(t){At(e,t)}),Xn(a.scrollbarH,"mousedown",t),Xn(a.scrollbarV,"mousedown",t),Xn(a.wrapper,"scroll",function(){a.wrapper.scrollTop=a.wrapper.scrollLeft=0});var l;Xn(window,"resize",r),setTimeout(n,5e3),Xn(a.input,"keyup",st(e,function(t){Jn(e,t)||e.options.onKeyEvent&&e.options.onKeyEvent(e,Rn(t))||16==t.keyCode&&(e.doc.sel.shift=!1)})),Xn(a.input,"input",function(){Vi&&!Pi&&e.display.inputHasSelection&&(e.display.inputHasSelection=null),ht(e)}),Xn(a.input,"keydown",st(e,Et)),Xn(a.input,"keypress",st(e,Ot)),Xn(a.input,"focus",di(Dt,e)),Xn(a.input,"blur",di(It,e)),e.options.dragDrop&&(Xn(a.scroller,"dragstart",function(t){Lt(e,t)}),Xn(a.scroller,"dragenter",i),Xn(a.scroller,"dragover",i),Xn(a.scroller,"drop",st(e,Mt))),Xn(a.scroller,"paste",function(t){bt(a,t)||(gt(e),ht(e))}),Xn(a.input,"paste",function(){if(Ri&&!e.state.fakedLastChar&&!(new Date-e.state.lastMiddleDown<200)){var t=a.input.selectionStart,r=a.input.selectionEnd;a.input.value+="$",a.input.selectionStart=t,a.input.selectionEnd=r,e.state.fakedLastChar=!0}e.state.pasteIncoming=!0,ht(e)}),Xn(a.input,"cut",o),Xn(a.input,"copy",o),Ui&&Xn(a.sizer,"mouseup",function(){document.activeElement==a.input&&a.input.blur(),gt(e)})}function bt(e,t){for(var r=Un(t);r!=e.wrapper;r=r.parentNode)if(!r||r.ignoreEvents||r.parentNode==e.sizer&&r!=e.mover)return!0
2
- }function xt(e,t,r){var n=e.display;if(!r){var i=Un(t);if(i==n.scrollbarH||i==n.scrollbarH.firstChild||i==n.scrollbarV||i==n.scrollbarV.firstChild||i==n.scrollbarFiller||i==n.gutterFiller)return null}var o,a,l=xi(n.lineSpace);try{o=t.clientX,a=t.clientY}catch(t){return null}return rt(e,o-l.left,a-l.top)}function wt(e){function t(e){if(!Yt(v,e)){if(v=e,"single"==c)return void ir(i.doc,tr(a,s),e);if(p=tr(a,p),g=tr(a,g),"double"==c){var t=br(kn(a,e.line).text,e);Zt(e,p)?ir(i.doc,t.from,g):ir(i.doc,p,t.to)}else"triple"==c&&(Zt(e,p)?ir(i.doc,g,tr(a,Xt(e.line,0))):ir(i.doc,p,tr(a,Xt(e.line+1,0))))}}function r(e){var n=++b,l=xt(i,e,!0);if(l)if(Yt(l,d)){var s=e.clientY<y.top?-20:e.clientY>y.bottom?20:0;s&&setTimeout(st(i,function(){b==n&&(o.scroller.scrollTop+=s,r(e))}),50)}else{i.state.focused||Dt(i),d=l,t(l);var u=m(o,a);(l.line>=u.to||l.line<u.from)&&setTimeout(st(i,function(){b==n&&r(e)}),150)}}function n(e){b=1/0,Bn(e),gt(i),Yn(document,"mousemove",x),Yn(document,"mouseup",w)}if(!Jn(this,e)){var i=this,o=i.display,a=i.doc,l=a.sel;if(l.shift=e.shiftKey,bt(o,e))return void(Ri||(o.scroller.draggable=!1,setTimeout(function(){o.scroller.draggable=!0},100)));if(!Ct(i,e)){var s=xt(i,e);switch($n(e)){case 3:return void(no&&qt.call(i,i,e));case 2:return Ri&&(i.state.lastMiddleDown=+new Date),s&&ir(i.doc,s),setTimeout(di(gt,i),20),void Bn(e)}if(!s)return void(Un(e)==o.scroller&&Bn(e));i.state.focused||Dt(i);var u=+new Date,c="single";if(uo&&uo.time>u-400&&Yt(uo.pos,s))c="triple",Bn(e),setTimeout(di(gt,i),20),xr(i,s.line);else if(so&&so.time>u-400&&Yt(so.pos,s)){c="double",uo={time:u,pos:s},Bn(e);var f=br(kn(a,s.line).text,s);ir(i.doc,f.from,f.to)}else so={time:u,pos:s};var d=s;if(i.options.dragDrop&&Go&&!vt(i)&&!Yt(l.from,l.to)&&!Zt(s,l.from)&&!Zt(l.to,s)&&"single"==c){var h=st(i,function(t){Ri&&(o.scroller.draggable=!1),i.state.draggingText=!1,Yn(document,"mouseup",h),Yn(o.scroller,"drop",h),Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)<10&&(Bn(t),ir(i.doc,s),gt(i),Ii&&!Pi&&setTimeout(function(){document.body.focus(),gt(i)},20))});return Ri&&(o.scroller.draggable=!0),i.state.draggingText=h,o.scroller.dragDrop&&o.scroller.dragDrop(),Xn(document,"mouseup",h),void Xn(o.scroller,"drop",h)}Bn(e),"single"==c&&ir(i.doc,tr(a,s));var p=l.from,g=l.to,v=s,y=xi(o.wrapper),b=0,x=st(i,function(e){Ii||$n(e)?r(e):n(e)}),w=st(i,n);Xn(document,"mousemove",x),Xn(document,"mouseup",w)}}}function _t(e,t,r,n,i){try{var o=t.clientX,a=t.clientY}catch(t){return!1}if(o>=Math.floor(xi(e.display.gutters).right))return!1;n&&Bn(t);var l=e.display,s=xi(l.lineDiv);if(a>s.bottom||!ti(e,r))return jn(t);a-=s.top-l.viewOffset;for(var u=0;u<e.options.gutters.length;++u){var c=l.gutters.childNodes[u];if(c&&xi(c).right>=o){var f=Tn(e.doc,a),d=e.options.gutters[u];return i(e,r,e,f,d,t),jn(t)}}}function kt(e,t){return ti(e,"gutterContextMenu")?_t(e,t,"gutterContextMenu",!1,Zn):!1}function Ct(e,t){return _t(e,t,"gutterClick",!0,Qn)}function Mt(e){var t=this;if(!(Jn(t,e)||bt(t.display,e)||t.options.onDragEvent&&t.options.onDragEvent(t,Rn(e)))){Bn(e),Vi&&(co=+new Date);var r=xt(t,e,!0),n=e.dataTransfer.files;if(r&&!vt(t))if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),a=0,l=function(e,n){var l=new FileReader;l.onload=function(){o[n]=l.result,++a==i&&(r=tr(t.doc,r),Rt(t.doc,{from:r,to:r,text:Uo(o.join("\n")),origin:"paste"},"around"))},l.readAsText(e)},s=0;i>s;++s)l(n[s],s);else{if(t.state.draggingText&&!Zt(r,t.doc.sel.from)&&!Zt(t.doc.sel.to,r))return t.state.draggingText(e),void setTimeout(di(gt,t),20);try{var o=e.dataTransfer.getData("Text");if(o){var u=t.doc.sel.from,c=t.doc.sel.to;ar(t.doc,r,r),t.state.draggingText&&$t(t.doc,"",u,c,"paste"),t.replaceSelection(o,null,"paste"),gt(t)}}catch(e){}}}}function Lt(e,t){if(Vi&&(!e.state.draggingText||+new Date-co<100))return void Kn(t);if(!Jn(e,t)&&!bt(e.display,t)){var r=e.getSelection();if(t.dataTransfer.setData("Text",r),t.dataTransfer.setDragImage&&!Ki){var n=gi("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",ji&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),ji&&n.parentNode.removeChild(n)}}}function St(e,t){Math.abs(e.doc.scrollTop-t)<2||(e.doc.scrollTop=t,Di||x(e,[],t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t),e.display.scrollbarV.scrollTop!=t&&(e.display.scrollbarV.scrollTop=t),Di&&x(e,[]),H(e,100))}function Tt(e,t,r){(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)||(t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),e.doc.scrollLeft=t,g(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbarH.scrollLeft!=t&&(e.display.scrollbarH.scrollLeft=t))}function At(e,t){var r=t.wheelDeltaX,n=t.wheelDeltaY;null==r&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(r=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta);var i=e.display,o=i.scroller;if(r&&o.scrollWidth>o.clientWidth||n&&o.scrollHeight>o.clientHeight){if(n&&Ji&&Ri)for(var a=t.target;a!=o;a=a.parentNode)if(a.lineObj){e.display.currentWheelTarget=a;break}if(r&&!Di&&!ji&&null!=ho)return n&&St(e,Math.max(0,Math.min(o.scrollTop+n*ho,o.scrollHeight-o.clientHeight))),Tt(e,Math.max(0,Math.min(o.scrollLeft+r*ho,o.scrollWidth-o.clientWidth))),Bn(t),void(i.wheelStartX=null);if(n&&null!=ho){var l=n*ho,s=e.doc.scrollTop,u=s+i.wrapper.clientHeight;0>l?s=Math.max(0,s+l-50):u=Math.min(e.doc.height,u+l+50),x(e,[],{top:s,bottom:u})}20>fo&&(null==i.wheelStartX?(i.wheelStartX=o.scrollLeft,i.wheelStartY=o.scrollTop,i.wheelDX=r,i.wheelDY=n,setTimeout(function(){if(null!=i.wheelStartX){var e=o.scrollLeft-i.wheelStartX,t=o.scrollTop-i.wheelStartY,r=t&&i.wheelDY&&t/i.wheelDY||e&&i.wheelDX&&e/i.wheelDX;i.wheelStartX=i.wheelStartY=null,r&&(ho=(ho*fo+r)/(fo+1),++fo)}},200)):(i.wheelDX+=r,i.wheelDY+=n))}}function zt(e,t,r){if("string"==typeof t&&(t=Lo[t],!t))return!1;e.display.pollingFast&&pt(e)&&(e.display.pollingFast=!1);var n=e.doc,i=n.sel.shift,o=!1;try{vt(e)&&(e.state.suppressEdits=!0),r&&(n.sel.shift=!1),o=t(e)!=Fo}finally{n.sel.shift=i,e.state.suppressEdits=!1}return o}function Nt(e){var t=e.state.keyMaps.slice(0);return e.options.extraKeys&&t.push(e.options.extraKeys),t.push(e.options.keyMap),t}function Wt(e,t){var r=Cr(e.options.keyMap),n=r.auto;clearTimeout(po),n&&!Lr(t)&&(po=setTimeout(function(){Cr(e.options.keyMap)==r&&(e.options.keyMap=n.call?n.call(null,e):n,l(e))},50));var i=Sr(t,!0),o=!1;if(!i)return!1;var a=Nt(e);return o=t.shiftKey?Mr("Shift-"+i,a,function(t){return zt(e,t,!0)})||Mr(i,a,function(t){return("string"==typeof t?/^go[A-Z]/.test(t):t.motion)?zt(e,t):void 0}):Mr(i,a,function(t){return zt(e,t)}),o&&(Bn(t),W(e),Pi&&(t.oldKeyCode=t.keyCode,t.keyCode=0),Qn(e,"keyHandled",e,i,t)),o}function Ht(e,t,r){var n=Mr("'"+r+"'",Nt(e),function(t){return zt(e,t,!0)});return n&&(Bn(t),W(e),Qn(e,"keyHandled",e,"'"+r+"'",t)),n}function Et(e){var t=this;if(t.state.focused||Dt(t),!(Jn(t,e)||t.options.onKeyEvent&&t.options.onKeyEvent(t,Rn(e)))){Ii&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.doc.sel.shift=16==r||e.shiftKey;var n=Wt(t,e);ji&&(mo=n?r:null,!n&&88==r&&!Xo&&(Ji?e.metaKey:e.ctrlKey)&&t.replaceSelection(""))}}function Ot(e){var t=this;if(!(Jn(t,e)||t.options.onKeyEvent&&t.options.onKeyEvent(t,Rn(e)))){var r=e.keyCode,n=e.charCode;if(ji&&r==mo)return mo=null,void Bn(e);if(!(ji&&(!e.which||e.which<10)||Ui)||!Wt(t,e)){var i=String.fromCharCode(null==n?r:n);Ht(t,e,i)||(Vi&&!Pi&&(t.display.inputHasSelection=null),ht(t))}}}function Dt(e){"nocursor"!=e.options.readOnly&&(e.state.focused||(Zn(e,"focus",e),e.state.focused=!0,-1==e.display.wrapper.className.search(/\bCodeMirror-focused\b/)&&(e.display.wrapper.className+=" CodeMirror-focused"),e.curOp||(mt(e,!0),Ri&&setTimeout(di(mt,e,!0),0))),dt(e),W(e))}function It(e){e.state.focused&&(Zn(e,"blur",e),e.state.focused=!1,e.display.wrapper.className=e.display.wrapper.className.replace(" CodeMirror-focused","")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.doc.sel.shift=!1)},150)}function qt(e,t){function r(){if(null!=i.input.selectionStart){var e=i.input.value="​"+(Yt(o.from,o.to)?"":i.input.value);i.prevInput="​",i.input.selectionStart=1,i.input.selectionEnd=e.length}}function n(){if(i.inputDiv.style.position="relative",i.input.style.cssText=u,Pi&&(i.scrollbarV.scrollTop=i.scroller.scrollTop=l),dt(e),null!=i.input.selectionStart){(!Ii||Pi)&&r(),clearTimeout(go);var t=0,n=function(){"​"==i.prevInput&&0==i.input.selectionStart?st(e,Lo.selectAll)(e):t++<10?go=setTimeout(n,500):mt(e)};go=setTimeout(n,200)}}if(!Jn(e,t,"contextmenu")){var i=e.display,o=e.doc.sel;if(!bt(i,t)&&!kt(e,t)){var a=xt(e,t),l=i.scroller.scrollTop;if(a&&!ji){var s=e.options.resetSelectionOnContextMenu;s&&(Yt(o.from,o.to)||Zt(a,o.from)||!Zt(a,o.to))&&st(e,ar)(e.doc,a,a);var u=i.input.style.cssText;if(i.inputDiv.style.position="absolute",i.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(t.clientY-5)+"px; left: "+(t.clientX-5)+"px; z-index: 1000; background: transparent; outline: none;border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);",gt(e),mt(e,!0),Yt(o.from,o.to)&&(i.input.value=i.prevInput=" "),Ii&&!Pi&&r(),no){Kn(t);var c=function(){Yn(window,"mouseup",c),setTimeout(n,20)};Xn(window,"mouseup",c)}else setTimeout(n,50)}}}}function Pt(e,t,r){if(!Zt(t.from,r))return tr(e,r);var n=t.text.length-1-(t.to.line-t.from.line);if(r.line>t.to.line+n){var i=r.line-n,o=e.first+e.size-1;return i>o?Xt(o,kn(e,o).text.length):rr(r,kn(e,i).text.length)}if(r.line==t.to.line+n)return rr(r,ai(t.text).length+(1==t.text.length?t.from.ch:0)+kn(e,t.to.line).text.length-t.to.ch);var a=r.line-t.from.line;return rr(r,t.text[a].length+(a?0:t.from.ch))}function Ft(e,t,r){if(r&&"object"==typeof r)return{anchor:Pt(e,t,r.anchor),head:Pt(e,t,r.head)};if("start"==r)return{anchor:t.from,head:t.from};var n=vo(t);if("around"==r)return{anchor:t.from,head:n};if("end"==r)return{anchor:n,head:n};var i=function(e){if(Zt(e,t.from))return e;if(!Zt(t.to,e))return n;var r=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=n.ch-t.to.ch),Xt(r,i)};return{anchor:i(e.sel.anchor),head:i(e.sel.head)}}function Vt(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){this.canceled=!0}};return r&&(n.update=function(t,r,n,i){t&&(this.from=tr(e,t)),r&&(this.to=tr(e,r)),n&&(this.text=n),void 0!==i&&(this.origin=i)}),Zn(e,"beforeChange",e,n),e.cm&&Zn(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function Rt(e,t,r,n){if(e.cm){if(!e.cm.curOp)return st(e.cm,Rt)(e,t,r,n);if(e.cm.state.suppressEdits)return}if(!(ti(e,"beforeChange")||e.cm&&ti(e.cm,"beforeChange"))||(t=Vt(e,t,!0))){var i=io&&!n&&Vr(e,t.from,t.to);if(i){for(var o=i.length-1;o>=1;--o)Bt(e,{from:i[o].from,to:i[o].to,text:[""]});i.length&&Bt(e,{from:i[0].from,to:i[0].to,text:t.text},r)}else Bt(e,t,r)}}function Bt(e,t,r){if(1!=t.text.length||""!=t.text[0]||!Yt(t.from,t.to)){var n=Ft(e,t,r);En(e,t,n,e.cm?e.cm.curOp.id:0/0),Kt(e,t,n,qr(e,t));var i=[];wn(e,function(e,r){r||-1!=si(i,e.history)||(Fn(e.history,t),i.push(e.history)),Kt(e,t,null,qr(e,t))})}}function Gt(e,t){if(!e.cm||!e.cm.state.suppressEdits){var r=e.history,n=("undo"==t?r.done:r.undone).pop();if(n){var i={changes:[],anchorBefore:n.anchorAfter,headBefore:n.headAfter,anchorAfter:n.anchorBefore,headAfter:n.headBefore,generation:r.generation};("undo"==t?r.undone:r.done).push(i),r.generation=n.generation||++r.maxGeneration;for(var o=ti(e,"beforeChange")||e.cm&&ti(e.cm,"beforeChange"),a=n.changes.length-1;a>=0;--a){var l=n.changes[a];if(l.origin=t,o&&!Vt(e,l,!1))return void(("undo"==t?r.done:r.undone).length=0);i.changes.push(Hn(e,l));var s=a?Ft(e,l,null):{anchor:n.anchorBefore,head:n.headBefore};Kt(e,l,s,Fr(e,l));var u=[];wn(e,function(e,t){t||-1!=si(u,e.history)||(Fn(e.history,l),u.push(e.history)),Kt(e,l,null,Fr(e,l))})}}}}function jt(e,t){function r(e){return Xt(e.line+t,e.ch)}e.first+=t,e.cm&&ft(e.cm,e.first,e.first,t),e.sel.head=r(e.sel.head),e.sel.anchor=r(e.sel.anchor),e.sel.from=r(e.sel.from),e.sel.to=r(e.sel.to)}function Kt(e,t,r,n){if(e.cm&&!e.cm.curOp)return st(e.cm,Kt)(e,t,r,n);if(t.to.line<e.first)return void jt(e,t.text.length-1-(t.to.line-t.from.line));if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);jt(e,i),t={from:Xt(e.first,0),to:Xt(t.to.line+i,t.to.ch),text:[ai(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:Xt(o,kn(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Cn(e,t.from,t.to),r||(r=Ft(e,t,null)),e.cm?Ut(e.cm,t,n,r):yn(e,t,n,r)}}function Ut(e,t,r,n){var i=e.doc,a=e.display,l=t.from,s=t.to,u=!1,c=l.line;e.options.lineWrapping||(c=Sn(Xr(i,kn(i,l.line))),i.iter(c,s.line+1,function(e){return e==a.maxLine?(u=!0,!0):void 0})),Zt(i.sel.head,t.from)||Zt(t.to,i.sel.head)||(e.curOp.cursorActivity=!0),yn(i,t,r,n,o(e)),e.options.lineWrapping||(i.iter(c,l.line+t.text.length,function(e){var t=f(i,e);t>a.maxLineLength&&(a.maxLine=e,a.maxLineLength=t,a.maxLineChanged=!0,u=!1)}),u&&(e.curOp.updateMaxLine=!0)),i.frontier=Math.min(i.frontier,l.line),H(e,400);var d=t.text.length-(s.line-l.line)-1;if(ft(e,l.line,s.line+1,d),ti(e,"change")){var h={from:l,to:s,text:t.text,removed:t.removed,origin:t.origin};if(e.curOp.textChanged){for(var p=e.curOp.textChanged;p.next;p=p.next);p.next=h}else e.curOp.textChanged=h}}function $t(e,t,r,n,i){if(n||(n=r),Zt(n,r)){var o=n;n=r,r=o}"string"==typeof t&&(t=Uo(t)),Rt(e,{from:r,to:n,text:t,origin:i},null)}function Xt(e,t){return this instanceof Xt?(this.line=e,void(this.ch=t)):new Xt(e,t)}function Yt(e,t){return e.line==t.line&&e.ch==t.ch}function Zt(e,t){return e.line<t.line||e.line==t.line&&e.ch<t.ch}function Qt(e,t){return e.line-t.line||e.ch-t.ch}function Jt(e){return Xt(e.line,e.ch)}function er(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function tr(e,t){if(t.line<e.first)return Xt(e.first,0);var r=e.first+e.size-1;return t.line>r?Xt(r,kn(e,r).text.length):rr(t,kn(e,t.line).text.length)}function rr(e,t){var r=e.ch;return null==r||r>t?Xt(e.line,t):0>r?Xt(e.line,0):e}function nr(e,t){return t>=e.first&&t<e.first+e.size}function ir(e,t,r,n){if(e.sel.shift||e.sel.extend){var i=e.sel.anchor;if(r){var o=Zt(t,i);o!=Zt(r,i)?(i=t,t=r):o!=Zt(t,r)&&(t=r)}ar(e,i,t,n)}else ar(e,t,r||t,n);e.cm&&(e.cm.curOp.userSelChange=!0)}function or(e,t,r){var n={anchor:t,head:r};return Zn(e,"beforeSelectionChange",e,n),e.cm&&Zn(e.cm,"beforeSelectionChange",e.cm,n),n.anchor=tr(e,n.anchor),n.head=tr(e,n.head),n}function ar(e,t,r,n,i){if(!i&&ti(e,"beforeSelectionChange")||e.cm&&ti(e.cm,"beforeSelectionChange")){var o=or(e,t,r);r=o.head,t=o.anchor}var a=e.sel;if(a.goalColumn=null,null==n&&(n=Zt(r,a.head)?-1:1),(i||!Yt(t,a.anchor))&&(t=sr(e,t,n,"push"!=i)),(i||!Yt(r,a.head))&&(r=sr(e,r,n,"push"!=i)),!Yt(a.anchor,t)||!Yt(a.head,r)){a.anchor=t,a.head=r;var l=Zt(r,t);a.from=l?r:t,a.to=l?t:r,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=e.cm.curOp.cursorActivity=!0),Qn(e,"cursorActivity",e)}}function lr(e){ar(e.doc,e.doc.sel.from,e.doc.sel.to,null,"push")}function sr(e,t,r,n){var i=!1,o=t,a=r||1;e.cantEdit=!1;e:for(;;){var l=kn(e,o.line);if(l.markedSpans)for(var s=0;s<l.markedSpans.length;++s){var u=l.markedSpans[s],c=u.marker;if((null==u.from||(c.inclusiveLeft?u.from<=o.ch:u.from<o.ch))&&(null==u.to||(c.inclusiveRight?u.to>=o.ch:u.to>o.ch))){if(n&&(Zn(c,"beforeCursorEnter"),c.explicitlyCleared)){if(l.markedSpans){--s;continue}break}if(!c.atomic)continue;var f=c.find()[0>a?"from":"to"];if(Yt(f,o)&&(f.ch+=a,f.ch<0?f=f.line>e.first?tr(e,Xt(f.line-1)):null:f.ch>l.text.length&&(f=f.line<e.first+e.size-1?Xt(f.line+1,0):null),!f)){if(i)return n?(e.cantEdit=!0,Xt(e.first,0)):sr(e,t,r,!0);i=!0,f=t,a=-a}o=f;continue e}}return o}}function ur(e){var t=cr(e,e.doc.sel.head,null,e.options.cursorScrollMargin);if(e.state.focused){var r=e.display,n=xi(r.sizer),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!Yi){var o=gi("div","​",null,"position: absolute; top: "+(t.top-r.viewOffset)+"px; height: "+(t.bottom-t.top+Po)+"px; left: "+t.left+"px; width: 2px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}function cr(e,t,r,n){for(null==n&&(n=0);;){var i=!1,o=et(e,t),a=r&&r!=t?et(e,r):o,l=dr(e,Math.min(o.left,a.left),Math.min(o.top,a.top)-n,Math.max(o.left,a.left),Math.max(o.bottom,a.bottom)+n),s=e.doc.scrollTop,u=e.doc.scrollLeft;if(null!=l.scrollTop&&(St(e,l.scrollTop),Math.abs(e.doc.scrollTop-s)>1&&(i=!0)),null!=l.scrollLeft&&(Tt(e,l.scrollLeft),Math.abs(e.doc.scrollLeft-u)>1&&(i=!0)),!i)return o}}function fr(e,t,r,n,i){var o=dr(e,t,r,n,i);null!=o.scrollTop&&St(e,o.scrollTop),null!=o.scrollLeft&&Tt(e,o.scrollLeft)}function dr(e,t,r,n,i){var o=e.display,a=it(e.display);0>r&&(r=0);var l=o.scroller.clientHeight-Po,s=o.scroller.scrollTop,u={},c=e.doc.height+q(o),f=a>r,d=i>c-a;if(s>r)u.scrollTop=f?0:r;else if(i>s+l){var h=Math.min(r,(d?c:i)-l);h!=s&&(u.scrollTop=h)}var p=o.scroller.clientWidth-Po,m=o.scroller.scrollLeft;t+=o.gutters.offsetWidth,n+=o.gutters.offsetWidth;var g=o.gutters.offsetWidth,v=g+10>t;return m+g>t||v?(v&&(t=0),u.scrollLeft=Math.max(0,t-10-g)):n>p+m-3&&(u.scrollLeft=n+10-p),u}function hr(e,t,r){e.curOp.updateScrollPos={scrollLeft:null==t?e.doc.scrollLeft:t,scrollTop:null==r?e.doc.scrollTop:r}}function pr(e,t,r){var n=e.curOp.updateScrollPos||(e.curOp.updateScrollPos={scrollLeft:e.doc.scrollLeft,scrollTop:e.doc.scrollTop}),i=e.display.scroller;n.scrollTop=Math.max(0,Math.min(i.scrollHeight-i.clientHeight,n.scrollTop+r)),n.scrollLeft=Math.max(0,Math.min(i.scrollWidth-i.clientWidth,n.scrollLeft+t))}function mr(e,t,r,n){var i=e.doc;if(null==r&&(r="add"),"smart"==r)if(e.doc.mode.indent)var o=D(e,t);else r="prev";var a=e.options.tabSize,l=kn(i,t),s=ii(l.text,null,a),u=l.text.match(/^\s*/)[0],c;if(n||/\S/.test(l.text)){if("smart"==r&&(c=e.doc.mode.indent(o,l.text.slice(u.length),l.text),c==Fo)){if(!n)return;r="prev"}}else c=0,r="not";"prev"==r?c=t>i.first?ii(kn(i,t-1).text,null,a):0:"add"==r?c=s+e.options.indentUnit:"subtract"==r?c=s-e.options.indentUnit:"number"==typeof r&&(c=s+r),c=Math.max(0,c);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)d+=a,f+=" ";c>d&&(f+=oi(c-d)),f!=u?$t(e.doc,f,Xt(t,0),Xt(t,u.length),"+input"):i.sel.head.line==t&&i.sel.head.ch<u.length&&ar(i,Xt(t,u.length),Xt(t,u.length),1),l.stateAfter=null}function gr(e,t,r){var n=t,i=t,o=e.doc;return"number"==typeof t?i=kn(o,er(o,t)):n=Sn(t),null==n?null:r(i,n)?(ft(e,n,n+1),i):null}function vr(e,t,r,n,i){function o(){var t=l+r;return t<e.first||t>=e.first+e.size?f=!1:(l=t,c=kn(e,t))}function a(e){var t=(i?Ei:Oi)(c,s,r,!0);if(null==t){if(e||!o())return f=!1;s=i?(0>r?Ti:Si)(c):0>r?c.text.length:0}else s=t;return!0}var l=t.line,s=t.ch,u=r,c=kn(e,l),f=!0;if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var d=null,h="group"==n,p=!0;!(0>r)||a(!p);p=!1){var m=c.text.charAt(s)||"\n",g=hi(m)?"w":h?/\s/.test(m)?null:"p":null;if(d&&d!=g){0>r&&(r=1,a());break}if(g&&(d=g),r>0&&!a(!p))break}var v=sr(e,Xt(l,s),u,!0);return f||(v.hitSide=!0),v}function yr(e,t,r,n){var i=e.doc,o=t.left,a;if("page"==n){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);a=t.top+r*(l-(0>r?1.5:.5)*it(e.display))}else"line"==n&&(a=r>0?t.bottom+3:t.top-3);for(;;){var s=rt(e,o,a);if(!s.outside)break;if(0>r?0>=a:a>=i.height){s.hitSide=!0;break}a+=5*r}return s}function br(e,t){var r=t.ch,n=t.ch;if(e){(t.xRel<0||n==e.length)&&r?--r:++n;for(var i=e.charAt(r),o=hi(i)?hi:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!hi(e)};r>0&&o(e.charAt(r-1));)--r;for(;n<e.length&&o(e.charAt(n));)++n}return{from:Xt(t.line,r),to:Xt(t.line,n)}}function xr(e,t){ir(e.doc,Xt(t,0),tr(e.doc,Xt(t+1,0)))}function wr(t,r,n,i){e.defaults[t]=r,n&&(yo[t]=i?function(e,t,r){r!=xo&&n(e,t,r)}:n)}function _r(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function kr(e,t,r){return e.startState?e.startState(t,r):!0}function Cr(e){return"string"==typeof e?So[e]:e}function Mr(e,t,r){function n(t){t=Cr(t);var i=t[e];if(i===!1)return"stop";if(null!=i&&r(i))return!0;if(t.nofallthrough)return"stop";var o=t.fallthrough;if(null==o)return!1;if("[object Array]"!=Object.prototype.toString.call(o))return n(o);for(var a=0,l=o.length;l>a;++a){var s=n(o[a]);if(s)return s}return!1}for(var i=0;i<t.length;++i){var o=n(t[i]);if(o)return"stop"!=o}}function Lr(e){var t=Yo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Sr(e,t){if(ji&&34==e.keyCode&&e["char"])return!1;var r=Yo[e.keyCode];return null==r||e.altGraphKey?!1:(e.altKey&&(r="Alt-"+r),(ro?e.metaKey:e.ctrlKey)&&(r="Ctrl-"+r),(ro?e.ctrlKey:e.metaKey)&&(r="Cmd-"+r),!t&&e.shiftKey&&(r="Shift-"+r),r)}function Tr(e,t){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0}function Ar(e,t){this.lines=[],this.type=t,this.doc=e}function zr(e,t,r,n,i){if(n&&n.shared)return Wr(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return st(e.cm,zr)(e,t,r,n,i);var o=new Ar(e,i);if(n&&ci(n,o),Zt(r,t)||Yt(t,r)&&o.clearWhenEmpty!==!1)return o;if(o.replacedWith&&(o.collapsed=!0,o.replacedWith=gi("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||(o.replacedWith.ignoreEvents=!0)),o.collapsed){if($r(e,t.line,t,r,o)||t.line!=r.line&&$r(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");oo=!0}o.addToHistory&&En(e,{from:t,to:r,origin:"markText"},{head:e.sel.head,anchor:e.sel.anchor},0/0);var a=t.line,l=e.cm,s;return e.iter(a,r.line+1,function(n){l&&o.collapsed&&!l.options.lineWrapping&&Xr(e,n)==l.display.maxLine&&(s=!0);var i={from:null,to:null,marker:o};a==t.line&&(i.from=t.ch),a==r.line&&(i.to=r.ch),o.collapsed&&a!=t.line&&Ln(n,0),Or(n,i),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Yr(e,t)&&Ln(t,0)}),o.clearOnEnter&&Xn(o,"beforeCursorEnter",function(){o.clear()}),o.readOnly&&(io=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++To,o.atomic=!0),l&&(s&&(l.curOp.updateMaxLine=!0),(o.className||o.title||o.startStyle||o.endStyle||o.collapsed)&&ft(l,t.line,r.line+1),o.atomic&&lr(l)),o}function Nr(e,t){this.markers=e,this.primary=t;for(var r=0,n=this;r<e.length;++r)e[r].parent=this,Xn(e[r],"clear",function(){n.clear()})}function Wr(e,t,r,n,i){n=ci(n),n.shared=!1;var o=[zr(e,t,r,n,i)],a=o[0],l=n.replacedWith;return wn(e,function(e){l&&(n.replacedWith=l.cloneNode(!0)),o.push(zr(e,tr(e,t),tr(e,r),n,i));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=ai(o)}),new Nr(o,a)}function Hr(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Er(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Or(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Dr(e,t,r){if(e)for(var n=0,i;n<e.length;++n){var o=e[n],a=o.marker,l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);if(l||o.from==t&&"bookmark"==a.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(i||(i=[])).push({from:o.from,to:s?null:o.to,marker:a})}}return i}function Ir(e,t,r){if(e)for(var n=0,i;n<e.length;++n){var o=e[n],a=o.marker,l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);if(l||o.from==t&&"bookmark"==a.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(i||(i=[])).push({from:s?null:o.from-t,to:null==o.to?null:o.to-t,marker:a})}}return i}function qr(e,t){var r=nr(e,t.from.line)&&kn(e,t.from.line).markedSpans,n=nr(e,t.to.line)&&kn(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,a=Yt(t.from,t.to),l=Dr(r,i,a),s=Ir(n,o,a),u=1==t.text.length,c=ai(t.text).length+(u?i:0);if(l)for(var f=0;f<l.length;++f){var d=l[f];if(null==d.to){var h=Hr(s,d.marker);h?u&&(d.to=null==h.to?null:h.to+c):d.to=i}}if(s)for(var f=0;f<s.length;++f){var d=s[f];if(null!=d.to&&(d.to+=c),null==d.from){var h=Hr(l,d.marker);h||(d.from=c,u&&(l||(l=[])).push(d))}else d.from+=c,u&&(l||(l=[])).push(d)}l&&(l=Pr(l)),s&&s!=l&&(s=Pr(s));var p=[l];if(!u){var m=t.text.length-2,g;if(m>0&&l)for(var f=0;f<l.length;++f)null==l[f].to&&(g||(g=[])).push({from:null,to:null,marker:l[f].marker});for(var f=0;m>f;++f)p.push(g);p.push(s)}return p}function Pr(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&r.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Fr(e,t){var r=Dn(e,t),n=qr(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],a=n[i];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],u=0;u<o.length;++u)if(o[u].marker==s.marker)continue e;o.push(s)}else a&&(r[i]=a)}return r}function Vr(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=si(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var a=n[o],l=a.find(),s=0;s<i.length;++s){var u=i[s];if(!Zt(u.to,l.from)&&!Zt(l.to,u.from)){var c=[s,1];(Zt(u.from,l.from)||!a.inclusiveLeft&&Yt(u.from,l.from))&&c.push({from:u.from,to:l.from}),(Zt(l.to,u.to)||!a.inclusiveRight&&Yt(u.to,l.to))&&c.push({from:l.to,to:u.to}),i.splice.apply(i,c),s+=c.length-1}}return i}function Rr(e){return e.inclusiveLeft?-1:0}function Br(e){return e.inclusiveRight?1:0}function Gr(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=Qt(n.from,i.from)||Rr(e)-Rr(t);if(o)return-o;var a=Qt(n.to,i.to)||Br(e)-Br(t);return a?a:t.id-e.id}function jr(e,t){var r=oo&&e.markedSpans,n;if(r)for(var i,o=0;o<r.length;++o)i=r[o],i.marker.collapsed&&null==(t?i.from:i.to)&&(!n||Gr(n,i.marker)<0)&&(n=i.marker);return n}function Kr(e){return jr(e,!0)}function Ur(e){return jr(e,!1)}function $r(e,t,r,n,i){var o=kn(e,t),a=oo&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var u=s.marker.find(!0),c=Qt(u.from,r)||Rr(s.marker)-Rr(i),f=Qt(u.to,n)||Br(s.marker)-Br(i);if(!(c>=0&&0>=f||0>=c&&f>=0)&&(0>=c&&(Qt(u.to,r)||Br(s.marker)-Rr(i))>0||c>=0&&(Qt(u.from,n)||Rr(s.marker)-Br(i))<0))return!0}}}function Xr(e,t){for(var r;r=Kr(t);)t=kn(e,r.find().from.line);return t}function Yr(e,t){var r=oo&&t.markedSpans;if(r)for(var n,i=0;i<r.length;++i)if(n=r[i],n.marker.collapsed){if(null==n.from)return!0;if(!n.marker.replacedWith&&0==n.from&&n.marker.inclusiveLeft&&Zr(e,t,n))return!0}}function Zr(e,t,r){if(null==r.to){var n=r.marker.find().to,i=kn(e,n.line);return Zr(e,i,Hr(i.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var o,a=0;a<t.markedSpans.length;++a)if(o=t.markedSpans[a],o.marker.collapsed&&!o.marker.replacedWith&&o.from==r.to&&(null==o.to||o.to!=r.from)&&(o.marker.inclusiveLeft||r.marker.inclusiveRight)&&Zr(e,t,o))return!0}function Qr(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function Jr(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function en(e){return function(){var t=!this.cm.curOp;t&&at(this.cm);try{var r=e.apply(this,arguments)}finally{t&&lt(this.cm)}return r}}function tn(e){return null!=e.height?e.height:(e.node.parentNode&&1==e.node.parentNode.nodeType||yi(e.cm.display.measure,gi("div",[e.node],null,"position: relative")),e.height=e.node.offsetHeight)}function rn(e,t,r,n){var i=new Ao(e,r,n);return i.noHScroll&&(e.display.alignWidgets=!0),gr(e,t,function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,!Yr(e.doc,t)||i.showIfHidden){var n=An(e,t)<e.doc.scrollTop;Ln(t,t.height+tn(i)),n&&pr(e,0,i.height)}return!0}),i}function nn(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Qr(e),Jr(e,r);var i=n?n(e):1;i!=e.height&&Ln(e,i)}function on(e){e.parent=null,Qr(e)}function an(t,r,n,i,o,a){var l=n.flattenSpans;null==l&&(l=t.options.flattenSpans);var s=0,u=null,c=new Tr(r,t.options.tabSize),f;for(""==r&&n.blankLine&&n.blankLine(i);!c.eol();){if(c.pos>t.options.maxHighlightLength?(l=!1,a&&un(t,r,i,c.pos),c.pos=r.length,f=null):f=n.token(c,i),t.options.addModeClass){var d=e.innerMode(n,i).mode.name;d&&(f="m-"+(f?d+" "+f:d))}l&&u==f||(s<c.start&&o(c.start,u),s=c.start,u=f),c.start=c.pos}for(;s<c.pos;){var h=Math.min(c.pos,s+5e4);o(h,u),s=h}}function ln(e,t,r,n){var i=[e.state.modeGen];an(e,t.text,e.doc.mode,r,function(e,t){i.push(e,t)},n);for(var o=0;o<e.state.overlays.length;++o){var a=e.state.overlays[o],l=1,s=0;an(e,t.text,a.mode,!0,function(e,t){for(var r=l;e>s;){var n=i[l];n>e&&i.splice(l,1,e,i[l+1],n),l+=2,s=Math.min(e,n)}if(t)if(a.opaque)i.splice(r,l-r,e,t),l=r+2;else for(;l>r;r+=2){var o=i[r+1];i[r+1]=o?o+" "+t:t}})}return i}function sn(e,t){return t.styles&&t.styles[0]==e.state.modeGen||(t.styles=ln(e,t,t.stateAfter=D(e,Sn(t)))),t.styles}function un(e,t,r,n){var i=e.doc.mode,o=new Tr(t,e.options.tabSize);for(o.start=o.pos=n||0,""==t&&i.blankLine&&i.blankLine(r);!o.eol()&&o.pos<=e.options.maxHighlightLength;)i.token(o,r),o.start=o.pos}function cn(e,t){if(!e)return null;for(;;){var r=e.match(/(?:^|\s)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}var i=t.cm.options.addModeClass?Wo:No;return i[e]||(i[e]="cm-"+e.replace(/ +/g," cm-"))}function fn(e,t,r,n){for(var i,o=t,a=!0;i=Kr(o);)o=kn(e.doc,i.find().from.line);var l={pre:gi("pre"),col:0,pos:0,measure:null,measuredSomething:!1,cm:e,copyWidgets:n};do{o.text&&(a=!1),l.measure=o==t&&r,l.pos=0,l.addToken=l.measure?pn:hn,(Ii||Ri)&&e.getOption("lineWrapping")&&(l.addToken=mn(l.addToken));var s=vn(o,l,sn(e,o));r&&o==t&&!l.measuredSomething&&(r[0]=l.pre.appendChild(ki(e.display.measure)),l.measuredSomething=!0),s&&(o=kn(e.doc,s.to.line))}while(s);!r||l.measuredSomething||r[0]||(r[0]=l.pre.appendChild(a?gi("span"," "):ki(e.display.measure))),l.pre.firstChild||Yr(e.doc,t)||l.pre.appendChild(document.createTextNode(" "));var u;if(r&&Vi&&(u=zn(o))){var c=u.length-1;u[c].from==u[c].to&&--c;var f=u[c],d=u[c-1];if(f.from+1==f.to&&d&&f.level<d.level){var h=r[l.pos-1];h&&h.parentNode.insertBefore(h.measureRight=ki(e.display.measure),h.nextSibling)}}var p=l.textClass?l.textClass+" "+(t.textClass||""):t.textClass;return p&&(l.pre.className=p),Zn(e,"renderLine",e,t,l.pre),l}function dn(e){var t=gi("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t}function hn(e,t,r,n,i,o){if(t){var a=e.cm.options.specialChars;if(a.test(t))for(var l=document.createDocumentFragment(),s=0;;){a.lastIndex=s;var u=a.exec(t),c=u?u.index-s:t.length-s;if(c&&(l.appendChild(document.createTextNode(t.slice(s,s+c))),e.col+=c),!u)break;if(s+=c+1," "==u[0]){var f=e.cm.options.tabSize,d=f-e.col%f;l.appendChild(gi("span",oi(d),"cm-tab")),e.col+=d}else{var h=e.cm.options.specialCharPlaceholder(u[0]);l.appendChild(h),e.col+=1}}else{e.col+=t.length;var l=document.createTextNode(t)}if(r||n||i||e.measure){var p=r||"";n&&(p+=n),i&&(p+=i);var h=gi("span",[l],p);return o&&(h.title=o),e.pre.appendChild(h)}e.pre.appendChild(l)}}function pn(e,t,r,n,i){for(var o=e.cm.options.lineWrapping,a=0;a<t.length;++a){for(var l=0==a,s=a+1;s<t.length&&mi(t.charAt(s));)++s;var u=t.slice(a,s);a=s-1,a&&o&&wi(t,a)&&e.pre.appendChild(gi("wbr"));var c=e.measure[e.pos],f=e.measure[e.pos]=hn(e,u,r,l&&n,a==t.length-1&&i);c&&(f.leftSide=c.leftSide||c),Ii&&o&&" "==u&&a&&!/\s/.test(t.charAt(a-1))&&a<t.length-1&&!/\s/.test(t.charAt(a+1))&&(f.style.whiteSpace="normal"),e.pos+=u.length
3
- }t.length&&(e.measuredSomething=!0)}function mn(e){function t(e){for(var t=" ",r=0;r<e.length-2;++r)t+=r%2?" ":" ";return t+=" "}return function(r,n,i,o,a,l){return e(r,n.replace(/ {3,}/g,t),i,o,a,l)}}function gn(e,t,r,n){var i=!n&&r.replacedWith;if(i&&(e.copyWidgets&&(i=i.cloneNode(!0)),e.pre.appendChild(i),e.measure)){if(t)e.measure[e.pos]=i;else{var o=ki(e.cm.display.measure);if("bookmark"!=r.type||r.insertLeft){if(e.measure[e.pos])return;e.measure[e.pos]=e.pre.insertBefore(o,i)}else e.measure[e.pos]=e.pre.appendChild(o)}e.measuredSomething=!0}e.pos+=t}function vn(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var a=i.length,l=0,s=1,u="",c,f=0,d,h,p,m,g;;){if(f==l){d=h=p=m="",g=null,f=1/0;for(var v=[],y=0;y<n.length;++y){var b=n[y],x=b.marker;b.from<=l&&(null==b.to||b.to>l)?(null!=b.to&&f>b.to&&(f=b.to,h=""),x.className&&(d+=" "+x.className),x.startStyle&&b.from==l&&(p+=" "+x.startStyle),x.endStyle&&b.to==f&&(h+=" "+x.endStyle),x.title&&!m&&(m=x.title),x.collapsed&&(!g||Gr(g.marker,x)<0)&&(g=b)):b.from>l&&f>b.from&&(f=b.from),"bookmark"==x.type&&b.from==l&&x.replacedWith&&v.push(x)}if(g&&(g.from||0)==l&&(gn(t,(null==g.to?a:g.to)-l,g.marker,null==g.from),null==g.to))return g.marker.find();if(!g&&v.length)for(var y=0;y<v.length;++y)gn(t,0,v[y])}if(l>=a)break;for(var w=Math.min(a,f);;){if(u){var _=l+u.length;if(!g){var k=_>w?u.slice(0,w-l):u;t.addToken(t,k,c?c+d:d,p,l+k.length==f?h:"",m)}if(_>=w){u=u.slice(w-l),l=w;break}l=_,p=""}u=i.slice(o,o=r[s++]),c=cn(r[s++],t)}}else for(var s=1;s<r.length;s+=2)t.addToken(t,i.slice(o,o=r[s]),cn(r[s+1],t))}function yn(e,t,r,n,i){function o(e){return r?r[e]:null}function a(e,r,n){nn(e,r,n,i),Qn(e,"change",e,t)}var l=t.from,s=t.to,u=t.text,c=kn(e,l.line),f=kn(e,s.line),d=ai(u),h=o(u.length-1),p=s.line-l.line;if(0!=l.ch||0!=s.ch||""!=d||e.cm&&!e.cm.options.wholeLineUpdateBefore)if(c==f)if(1==u.length)a(c,c.text.slice(0,l.ch)+d+c.text.slice(s.ch),h);else{for(var m=[],g=1,v=u.length-1;v>g;++g)m.push(new zo(u[g],o(g),i));m.push(new zo(d+c.text.slice(s.ch),h,i)),a(c,c.text.slice(0,l.ch)+u[0],o(0)),e.insert(l.line+1,m)}else if(1==u.length)a(c,c.text.slice(0,l.ch)+u[0]+f.text.slice(s.ch),o(0)),e.remove(l.line+1,p);else{a(c,c.text.slice(0,l.ch)+u[0],o(0)),a(f,d+f.text.slice(s.ch),h);for(var g=1,v=u.length-1,m=[];v>g;++g)m.push(new zo(u[g],o(g),i));p>1&&e.remove(l.line+1,p-1),e.insert(l.line+1,m)}else{for(var g=0,v=u.length-1,m=[];v>g;++g)m.push(new zo(u[g],o(g),i));a(f,f.text,h),p&&e.remove(l.line,p),m.length&&e.insert(l.line,m)}Qn(e,"change",e,t),ar(e,n.anchor,n.head,null,!0)}function bn(e){this.lines=e,this.parent=null;for(var t=0,r=e.length,n=0;r>t;++t)e[t].parent=this,n+=e[t].height;this.height=n}function xn(e){this.children=e;for(var t=0,r=0,n=0,i=e.length;i>n;++n){var o=e[n];t+=o.chunkSize(),r+=o.height,o.parent=this}this.size=t,this.height=r,this.parent=null}function wn(e,t,r){function n(e,i,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=i){var s=o&&l.sharedHist;(!r||s)&&(t(l.doc,s),n(l.doc,e,s))}}}n(e,null,!0)}function _n(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,a(e),r(e),e.options.lineWrapping||d(e),e.options.mode=t.modeOption,ft(e)}function kn(e,t){for(t-=e.first;!e.lines;)for(var r=0;;++r){var n=e.children[r],i=n.chunkSize();if(i>t){e=n;break}t-=i}return e.lines[t]}function Cn(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function Mn(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function Ln(e,t){for(var r=t-e.height,n=e;n;n=n.parent)n.height+=r}function Sn(e){if(null==e.parent)return null;for(var t=e.parent,r=si(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function Tn(e,t){var r=e.first;e:do{for(var n=0,i=e.children.length;i>n;++n){var o=e.children[n],a=o.height;if(a>t){e=o;continue e}t-=a,r+=o.chunkSize()}return r}while(!e.lines);for(var n=0,i=e.lines.length;i>n;++n){var l=e.lines[n],s=l.height;if(s>t)break;t-=s}return r+n}function An(e,t){t=Xr(e.doc,t);for(var r=0,n=t.parent,i=0;i<n.lines.length;++i){var o=n.lines[i];if(o==t)break;r+=o.height}for(var a=n.parent;a;n=a,a=n.parent)for(var i=0;i<a.children.length;++i){var l=a.children[i];if(l==n)break;r+=l.height}return r}function zn(e){var t=e.order;return null==t&&(t=e.order=Qo(e.text)),t}function Nn(e){return{done:[],undone:[],undoDepth:1/0,lastTime:0,lastOp:null,lastOrigin:null,generation:e||1,maxGeneration:e||1}}function Wn(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Hn(e,t){var r={line:t.from.line,ch:t.from.ch},n={from:r,to:vo(t),text:Cn(e,t.from,t.to)};return Wn(e,n,t.from.line,t.to.line+1),wn(e,function(e){Wn(e,n,t.from.line,t.to.line+1)},!0),n}function En(e,t,r,n){var i=e.history;i.undone.length=0;var o=+new Date,a=ai(i.done);if(a&&(i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastTime>o-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))){var l=ai(a.changes);Yt(t.from,t.to)&&Yt(t.from,l.to)?l.to=vo(t):a.changes.push(Hn(e,t)),a.anchorAfter=r.anchor,a.headAfter=r.head}else for(a={changes:[Hn(e,t)],generation:i.generation,anchorBefore:e.sel.anchor,headBefore:e.sel.head,anchorAfter:r.anchor,headAfter:r.head},i.done.push(a);i.done.length>i.undoDepth;)i.done.shift();i.generation=++i.maxGeneration,i.lastTime=o,i.lastOp=n,i.lastOrigin=t.origin}function On(e){if(!e)return null;for(var t=0,r;t<e.length;++t)e[t].marker.explicitlyCleared?r||(r=e.slice(0,t)):r&&r.push(e[t]);return r?r.length?r:null:e}function Dn(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=0,i=[];n<t.text.length;++n)i.push(On(r[n]));return i}function In(e,t){for(var r=0,n=[];r<e.length;++r){var i=e[r],o=i.changes,a=[];n.push({changes:a,anchorBefore:i.anchorBefore,headBefore:i.headBefore,anchorAfter:i.anchorAfter,headAfter:i.headAfter});for(var l=0;l<o.length;++l){var s=o[l],u;if(a.push({from:s.from,to:s.to,text:s.text}),t)for(var c in s)(u=c.match(/^spans_(\d+)$/))&&si(t,Number(u[1]))>-1&&(ai(a)[c]=s[c],delete s[c])}}return n}function qn(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function Pn(e,t,r,n){for(var i=0;i<e.length;++i){for(var o=e[i],a=!0,l=0;l<o.changes.length;++l){var s=o.changes[l];if(o.copied||(s.from=Jt(s.from),s.to=Jt(s.to)),r<s.from.line)s.from.line+=n,s.to.line+=n;else if(t<=s.to.line){a=!1;break}}o.copied||(o.anchorBefore=Jt(o.anchorBefore),o.headBefore=Jt(o.headBefore),o.anchorAfter=Jt(o.anchorAfter),o.readAfter=Jt(o.headAfter),o.copied=!0),a?(qn(o.anchorBefore),qn(o.headBefore),qn(o.anchorAfter),qn(o.headAfter)):(e.splice(0,i+1),i=0)}}function Fn(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;Pn(e.done,r,n,i),Pn(e.undone,r,n,i)}function Vn(){Kn(this)}function Rn(e){return e.stop||(e.stop=Vn),e}function Bn(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Gn(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function jn(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Kn(e){Bn(e),Gn(e)}function Un(e){return e.target||e.srcElement}function $n(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),Ji&&e.ctrlKey&&1==t&&(t=3),t}function Xn(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={}),i=n[t]||(n[t]=[]);i.push(r)}}function Yn(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers&&e._handlers[t];if(!n)return;for(var i=0;i<n.length;++i)if(n[i]==r){n.splice(i,1);break}}}function Zn(e,t){var r=e._handlers&&e._handlers[t];if(r)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function Qn(e,t){function r(e){return function(){e.apply(null,i)}}var n=e._handlers&&e._handlers[t];if(n){var i=Array.prototype.slice.call(arguments,2);Io||(++qo,Io=[],setTimeout(ei,0));for(var o=0;o<n.length;++o)Io.push(r(n[o]))}}function Jn(e,t,r){return Zn(e,r||t.type,e,t),jn(t)||t.codemirrorIgnore}function ei(){--qo;var e=Io;Io=null;for(var t=0;t<e.length;++t)e[t]()}function ti(e,t){var r=e._handlers&&e._handlers[t];return r&&r.length>0}function ri(e){e.prototype.on=function(e,t){Xn(this,e,t)},e.prototype.off=function(e,t){Yn(this,e,t)}}function ni(){this.id=null}function ii(e,t,r,n,i){null==t&&(t=e.search(/[^\s\u00a0]/),-1==t&&(t=e.length));for(var o=n||0,a=i||0;t>o;++o)" "==e.charAt(o)?a+=r-a%r:++a;return a}function oi(e){for(;Vo.length<=e;)Vo.push(ai(Vo)+" ");return Vo[e]}function ai(e){return e[e.length-1]}function li(e){if(Zi)e.selectionStart=0,e.selectionEnd=e.value.length;else try{e.select()}catch(t){}}function si(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;n>r;++r)if(e[r]==t)return r;return-1}function ui(e,t){function r(){}r.prototype=e;var n=new r;return t&&ci(t,n),n}function ci(e,t){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function fi(e){for(var t=[],r=0;e>r;++r)t.push(void 0);return t}function di(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function hi(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ro.test(e))}function pi(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}function mi(e){return e.charCodeAt(0)>=768&&Bo.test(e)}function gi(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)bi(i,t);else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function vi(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function yi(e,t){return vi(e).appendChild(t)}function bi(e,t){Pi?(e.innerHTML="",e.appendChild(document.createTextNode(t))):e.textContent=t}function xi(e){return e.getBoundingClientRect()}function wi(){return!1}function _i(e){if(null!=jo)return jo;var t=gi("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");return yi(e,t),t.offsetWidth&&(jo=t.offsetHeight-t.clientHeight),jo||0}function ki(e){if(null==Ko){var t=gi("span","​");yi(e,gi("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ko=t.offsetWidth<=1&&t.offsetHeight>2&&!qi)}return Ko?gi("span","​"):gi("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px")}function Ci(e,t,r,n){if(!e)return n(t,r,"ltr");for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<r&&a.to>t||t==r&&a.to==t)&&(n(Math.max(a.from,t),Math.min(a.to,r),1==a.level?"rtl":"ltr"),i=!0)}i||n(t,r,"ltr")}function Mi(e){return e.level%2?e.to:e.from}function Li(e){return e.level%2?e.from:e.to}function Si(e){var t=zn(e);return t?Mi(t[0]):0}function Ti(e){var t=zn(e);return t?Li(ai(t)):e.text.length}function Ai(e,t){var r=kn(e.doc,t),n=Xr(e.doc,r);n!=r&&(t=Sn(n));var i=zn(n),o=i?i[0].level%2?Ti(n):Si(n):0;return Xt(t,o)}function zi(e,t){for(var r,n;r=Ur(n=kn(e.doc,t));)t=r.find().to.line;var i=zn(n),o=i?i[0].level%2?Si(n):Ti(n):n.text.length;return Xt(t,o)}function Ni(e,t,r){var n=e[0].level;return t==n?!0:r==n?!1:r>t}function Wi(e,t){Zo=null;for(var r=0,n;r<e.length;++r){var i=e[r];if(i.from<t&&i.to>t)return r;if(i.from==t||i.to==t){if(null!=n)return Ni(e,i.level,e[n].level)?(i.from!=i.to&&(Zo=n),r):(i.from!=i.to&&(Zo=r),n);n=r}}return n}function Hi(e,t,r,n){if(!n)return t+r;do t+=r;while(t>0&&mi(e.text.charAt(t)));return t}function Ei(e,t,r,n){var i=zn(e);if(!i)return Oi(e,t,r,n);for(var o=Wi(i,t),a=i[o],l=Hi(e,t,a.level%2?-r:r,n);;){if(l>a.from&&l<a.to)return l;if(l==a.from||l==a.to)return Wi(i,l)==o?l:(a=i[o+=r],r>0==a.level%2?a.to:a.from);if(a=i[o+=r],!a)return null;l=r>0==a.level%2?Hi(e,a.to,-1,n):Hi(e,a.from,1,n)}}function Oi(e,t,r,n){var i=t+r;if(n)for(;i>0&&mi(e.text.charAt(i));)i+=r;return 0>i||i>e.text.length?null:i}var Di=/gecko\/\d/i.test(navigator.userAgent),Ii=/MSIE \d/.test(navigator.userAgent),qi=Ii&&(null==document.documentMode||document.documentMode<8),Pi=Ii&&(null==document.documentMode||document.documentMode<9),Fi=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent),Vi=Ii||Fi,Ri=/WebKit\//.test(navigator.userAgent),Bi=Ri&&/Qt\/\d+\.\d+/.test(navigator.userAgent),Gi=/Chrome\//.test(navigator.userAgent),ji=/Opera\//.test(navigator.userAgent),Ki=/Apple Computer/.test(navigator.vendor),Ui=/KHTML\//.test(navigator.userAgent),$i=/Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent),Xi=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent),Yi=/PhantomJS/.test(navigator.userAgent),Zi=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent),Qi=Zi||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent),Ji=Zi||/Mac/.test(navigator.platform),eo=/win/i.test(navigator.platform),to=ji&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);to&&(to=Number(to[1])),to&&to>=15&&(ji=!1,Ri=!0);var ro=Ji&&(Bi||ji&&(null==to||12.11>to)),no=Di||Ii&&!Pi,io=!1,oo=!1,ao,lo=0,so,uo,co=0,fo=0,ho=null;Ii?ho=-.53:Di?ho=15:Gi?ho=-.7:Ki&&(ho=-1/3);var po,mo=null,go,vo=e.changeEnd=function(e){return e.text?Xt(e.from.line+e.text.length-1,ai(e.text).length+(1==e.text.length?e.from.ch:0)):e.to};e.Pos=Xt,e.prototype={constructor:e,focus:function(){window.focus(),gt(this),ht(this)},setOption:function(e,t){var r=this.options,n=r[e];(r[e]!=t||"mode"==e)&&(r[e]=t,yo.hasOwnProperty(e)&&st(this,yo[e])(this,t,n))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](e)},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||"string"!=typeof t[r]&&t[r].name==e)return t.splice(r,1),!0},addOverlay:st(null,function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");this.state.overlays.push({mode:n,modeSpec:t,opaque:r&&r.opaque}),this.state.modeGen++,ft(this)}),removeOverlay:st(null,function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void ft(this)}}),indentLine:st(null,function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),nr(this.doc,e)&&mr(this,e,t,r)}),indentSelection:st(null,function(e){var t=this.doc.sel;if(Yt(t.from,t.to))return mr(this,t.from.line,e,!0);for(var r=t.to.line-(t.to.ch?0:1),n=t.from.line;r>=n;++n)mr(this,n,e)}),getTokenAt:function(e,t){var r=this.doc;e=tr(r,e);for(var n=D(this,e.line,t),i=this.doc.mode,o=kn(r,e.line),a=new Tr(o.text,this.options.tabSize);a.pos<e.ch&&!a.eol();){a.start=a.pos;var l=i.token(a,n)}return{start:a.start,end:a.pos,string:a.current(),className:l||null,type:l||null,state:n}},getTokenTypeAt:function(e){e=tr(this.doc,e);var t=sn(this,kn(this.doc,e.line)),r=0,n=(t.length-1)/2,i=e.ch;if(0==i)return t[2];for(;;){var o=r+n>>1;if((o?t[2*o-1]:0)>=i)n=o;else{if(!(t[2*o+1]<i))return t[2*o+2];r=o+1}}},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!Mo.hasOwnProperty(t))return Mo;var n=Mo[t],i=this.getModeAt(e);if("string"==typeof i[t])n[i[t]]&&r.push(n[i[t]]);else if(i[t])for(var o=0;o<i[t].length;o++){var a=n[i[t][o]];a&&r.push(a)}else i.helperType&&n[i.helperType]?r.push(n[i.helperType]):n[i.name]&&r.push(n[i.name]);for(var o=0;o<n._global.length;o++){var l=n._global[o];l.pred(i,this)&&-1==si(r,l.val)&&r.push(l.val)}return r},getStateAfter:function(e,t){var r=this.doc;return e=er(r,null==e?r.first+r.size-1:e),D(this,e+1,t)},cursorCoords:function(e,t){var r,n=this.doc.sel;return r=null==e?n.head:"object"==typeof e?tr(this.doc,e):e?n.from:n.to,et(this,r,t||"page")},charCoords:function(e,t){return J(this,tr(this.doc,e),t||"page")},coordsChar:function(e,t){return e=Q(this,e,t||"page"),rt(this,e.left,e.top)},lineAtHeight:function(e,t){return e=Q(this,{top:e,left:0},t||"page").top,Tn(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t){var r=!1,n=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>n&&(e=n,r=!0);var i=kn(this.doc,e);return Z(this,kn(this.doc,e),{top:0,left:0},t||"page").top+(r?i.height:0)},defaultTextHeight:function(){return it(this.display)},defaultCharWidth:function(){return ot(this.display)},setGutterMarker:st(null,function(e,t,r){return gr(this,e,function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&pi(n)&&(e.gutterMarkers=null),!0})}),clearGutter:st(null,function(e){var t=this,r=t.doc,n=r.first;r.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&(r.gutterMarkers[e]=null,ft(t,n,n+1),pi(r.gutterMarkers)&&(r.gutterMarkers=null)),++n})}),addLineClass:st(null,function(e,t,r){return gr(this,e,function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"wrapClass";if(e[n]){if(new RegExp("(?:^|\\s)"+r+"(?:$|\\s)").test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:st(null,function(e,t,r){return gr(this,e,function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(new RegExp("(?:^|\\s+)"+r+"(?:$|\\s+)"));if(!o)return!1;var a=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0})}),addLineWidget:st(null,function(e,t,r){return rn(this,e,t,r)}),removeLineWidget:function(e){e.clear()},lineInfo:function(e){if("number"==typeof e){if(!nr(this.doc,e))return null;var t=e;if(e=kn(this.doc,e),!e)return null}else{var t=Sn(e);if(null==t)return null}return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},getViewport:function(){return{from:this.display.showingFrom,to:this.display.showingTo}},addWidget:function(e,t,r,n,i){var o=this.display;e=et(this,tr(this.doc,e));var a=e.bottom,l=e.left;if(t.style.position="absolute",o.sizer.appendChild(t),"over"==n)a=e.top;else if("above"==n||"near"==n){var s=Math.max(o.wrapper.clientHeight,this.doc.height),u=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>u&&(l=u-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==i?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?l=0:"middle"==i&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),r&&fr(this,l,a,l+t.offsetWidth,a+t.offsetHeight)},triggerOnKeyDown:st(null,Et),execCommand:function(e){return Lo.hasOwnProperty(e)?Lo[e](this):void 0},findPosH:function(e,t,r,n){var i=1;0>t&&(i=-1,t=-t);for(var o=0,a=tr(this.doc,e);t>o&&(a=vr(this.doc,a,i,r,n),!a.hitSide);++o);return a},moveH:st(null,function(e,t){var r=this.doc.sel,n;n=r.shift||r.extend||Yt(r.from,r.to)?vr(this.doc,r.head,e,t,this.options.rtlMoveVisually):0>e?r.from:r.to,ir(this.doc,n,n,e)}),deleteH:st(null,function(e,t){var r=this.doc.sel;Yt(r.from,r.to)?$t(this.doc,"",r.from,vr(this.doc,r.head,e,t,!1),"+delete"):$t(this.doc,"",r.from,r.to,"+delete"),this.curOp.userSelChange=!0}),findPosV:function(e,t,r,n){var i=1,o=n;0>t&&(i=-1,t=-t);for(var a=0,l=tr(this.doc,e);t>a;++a){var s=et(this,l,"div");if(null==o?o=s.left:s.left=o,l=yr(this,s,i,r),l.hitSide)break}return l},moveV:st(null,function(e,t){var r=this.doc.sel,n,i;if(r.shift||r.extend||Yt(r.from,r.to)){var o=et(this,r.head,"div");null!=r.goalColumn&&(o.left=r.goalColumn),n=yr(this,o,e,t),"page"==t&&pr(this,0,J(this,n,"div").top-o.top),i=o.left}else n=0>e?r.from:r.to;ir(this.doc,n,n,e),null!=i&&(r.goalColumn=i)}),toggleOverwrite:function(e){(null==e||e!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?this.display.cursor.className+=" CodeMirror-overwrite":this.display.cursor.className=this.display.cursor.className.replace(" CodeMirror-overwrite",""))},hasFocus:function(){return this.state.focused},scrollTo:st(null,function(e,t){hr(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller,t=Po;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-t,width:e.scrollWidth-t,clientHeight:e.clientHeight-t,clientWidth:e.clientWidth-t}},scrollIntoView:st(null,function(e,t){null==e?e={from:this.doc.sel.head,to:null}:"number"==typeof e?e={from:Xt(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),t||(t=0);var r=e;null!=e.from.line&&(this.curOp.scrollToPos={from:e.from,to:e.to,margin:t},r={from:et(this,e.from),to:et(this,e.to)});var n=dr(this,Math.min(r.from.left,r.to.left),Math.min(r.from.top,r.to.top)-t,Math.max(r.from.right,r.to.right),Math.max(r.from.bottom,r.to.bottom)+t);hr(this,n.scrollLeft,n.scrollTop)}),setSize:st(null,function(e,t){function r(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e}null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&(this.display.measureLineCache.length=this.display.measureLineCachePos=0),this.curOp.forceUpdate=!0}),operation:function(e){return ct(this,e)},refresh:st(null,function(){var e=null==this.display.cachedTextHeight;U(this),hr(this,this.doc.scrollLeft,this.doc.scrollTop),ft(this),e&&a(this)}),swapDoc:st(null,function(e){var t=this.doc;return t.cm=null,_n(this,e),U(this),mt(this,!0),hr(this,e.scrollLeft,e.scrollTop),Qn(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ri(e);var yo=e.optionHandlers={},bo=e.defaults={},xo=e.Init={toString:function(){return"CodeMirror.Init"}};wr("value","",function(e,t){e.setValue(t)},!0),wr("mode",null,function(e,t){e.doc.modeOption=t,r(e)},!0),wr("indentUnit",2,r,!0),wr("indentWithTabs",!1),wr("smartIndent",!0),wr("tabSize",4,function(e){n(e),U(e),ft(e)},!0),wr("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(e,t){e.options.specialChars=new RegExp(t.source+(t.test(" ")?"":"| "),"g"),e.refresh()},!0),wr("specialCharPlaceholder",dn,function(e){e.refresh()},!0),wr("electricChars",!0),wr("rtlMoveVisually",!eo),wr("wholeLineUpdateBefore",!0),wr("theme","default",function(e){s(e),u(e)},!0),wr("keyMap","default",l),wr("extraKeys",null),wr("onKeyEvent",null),wr("onDragEvent",null),wr("lineWrapping",!1,i,!0),wr("gutters",[],function(e){h(e.options),u(e)},!0),wr("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?b(e.display)+"px":"0",e.refresh()},!0),wr("coverGutterNextToScrollbar",!1,p,!0),wr("lineNumbers",!1,function(e){h(e.options),u(e)},!0),wr("firstLineNumber",1,u,!0),wr("lineNumberFormatter",function(e){return e},u,!0),wr("showCursorWhenSelecting",!1,A,!0),wr("resetSelectionOnContextMenu",!0),wr("readOnly",!1,function(e,t){"nocursor"==t?(It(e),e.display.input.blur(),e.display.disabled=!0):(e.display.disabled=!1,t||mt(e,!0))}),wr("disableInput",!1,function(e,t){t||mt(e,!0)},!0),wr("dragDrop",!0),wr("cursorBlinkRate",530),wr("cursorScrollMargin",0),wr("cursorHeight",1),wr("workTime",100),wr("workDelay",100),wr("flattenSpans",!0,n,!0),wr("addModeClass",!1,n,!0),wr("pollInterval",100),wr("undoDepth",40,function(e,t){e.doc.history.undoDepth=t}),wr("historyEventDelay",500),wr("viewportMargin",10,function(e){e.refresh()},!0),wr("maxHighlightLength",1e4,n,!0),wr("crudeMeasuringFrom",1e4),wr("moveInputWithCursor",!0,function(e,t){t||(e.display.inputDiv.style.top=e.display.inputDiv.style.left=0)}),wr("tabindex",null,function(e,t){e.display.input.tabIndex=t||""}),wr("autofocus",null);var wo=e.modes={},_o=e.mimeModes={};e.defineMode=function(t,r){if(e.defaults.mode||"null"==t||(e.defaults.mode=t),arguments.length>2){r.dependencies=[];for(var n=2;n<arguments.length;++n)r.dependencies.push(arguments[n])}wo[t]=r},e.defineMIME=function(e,t){_o[e]=t},e.resolveMode=function(t){if("string"==typeof t&&_o.hasOwnProperty(t))t=_o[t];else if(t&&"string"==typeof t.name&&_o.hasOwnProperty(t.name)){var r=_o[t.name];t=ui(r,t),t.name=r.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return e.resolveMode("application/xml");return"string"==typeof t?{name:t}:t||{name:"null"}},e.getMode=function(t,r){var r=e.resolveMode(r),n=wo[r.name];if(!n)return e.getMode(t,"text/plain");var i=n(t,r);if(ko.hasOwnProperty(r.name)){var o=ko[r.name];for(var a in o)o.hasOwnProperty(a)&&(i.hasOwnProperty(a)&&(i["_"+a]=i[a]),i[a]=o[a])}if(i.name=r.name,r.helperType&&(i.helperType=r.helperType),r.modeProps)for(var a in r.modeProps)i[a]=r.modeProps[a];return i},e.defineMode("null",function(){return{token:function(e){e.skipToEnd()}}}),e.defineMIME("text/plain","null");var ko=e.modeExtensions={};e.extendMode=function(e,t){var r=ko.hasOwnProperty(e)?ko[e]:ko[e]={};ci(t,r)},e.defineExtension=function(t,r){e.prototype[t]=r},e.defineDocExtension=function(e,t){Eo.prototype[e]=t},e.defineOption=wr;var Co=[];e.defineInitHook=function(e){Co.push(e)};var Mo=e.helpers={};e.registerHelper=function(t,r,n){Mo.hasOwnProperty(t)||(Mo[t]=e[t]={_global:[]}),Mo[t][r]=n},e.registerGlobalHelper=function(t,r,n,i){e.registerHelper(t,r,i),Mo[t]._global.push({pred:n,val:i})},e.isWordChar=hi,e.copyState=_r,e.startState=kr,e.innerMode=function(e,t){for(;e.innerMode;){var r=e.innerMode(t);if(!r||r.mode==e)break;t=r.state,e=r.mode}return r||{mode:e,state:t}};var Lo=e.commands={selectAll:function(e){e.setSelection(Xt(e.firstLine(),0),Xt(e.lastLine()))},killLine:function(e){var t=e.getCursor(!0),r=e.getCursor(!1),n=!Yt(t,r);n||e.getLine(t.line).length!=t.ch?e.replaceRange("",t,n?r:Xt(t.line),"+delete"):e.replaceRange("",t,Xt(t.line+1,0),"+delete")},deleteLine:function(e){var t=e.getCursor().line;e.replaceRange("",Xt(t,0),Xt(t),"+delete")},delLineLeft:function(e){var t=e.getCursor();e.replaceRange("",Xt(t.line,0),t,"+delete")},undo:function(e){e.undo()},redo:function(e){e.redo()},goDocStart:function(e){e.extendSelection(Xt(e.firstLine(),0))},goDocEnd:function(e){e.extendSelection(Xt(e.lastLine()))},goLineStart:function(e){e.extendSelection(Ai(e,e.getCursor().line))},goLineStartSmart:function(e){var t=e.getCursor(),r=Ai(e,t.line),n=e.getLineHandle(r.line),i=zn(n);if(i&&0!=i[0].level)e.extendSelection(r);else{var o=Math.max(0,n.text.search(/\S/)),a=t.line==r.line&&t.ch<=o&&t.ch;e.extendSelection(Xt(r.line,a?0:o))}},goLineEnd:function(e){e.extendSelection(zi(e,e.getCursor().line))},goLineRight:function(e){var t=e.charCoords(e.getCursor(),"div").top+5;e.extendSelection(e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:t},"div"))},goLineLeft:function(e){var t=e.charCoords(e.getCursor(),"div").top+5;e.extendSelection(e.coordsChar({left:0,top:t},"div"))},goLineUp:function(e){e.moveV(-1,"line")},goLineDown:function(e){e.moveV(1,"line")},goPageUp:function(e){e.moveV(-1,"page")},goPageDown:function(e){e.moveV(1,"page")},goCharLeft:function(e){e.moveH(-1,"char")},goCharRight:function(e){e.moveH(1,"char")},goColumnLeft:function(e){e.moveH(-1,"column")},goColumnRight:function(e){e.moveH(1,"column")},goWordLeft:function(e){e.moveH(-1,"word")},goGroupRight:function(e){e.moveH(1,"group")},goGroupLeft:function(e){e.moveH(-1,"group")},goWordRight:function(e){e.moveH(1,"word")},delCharBefore:function(e){e.deleteH(-1,"char")},delCharAfter:function(e){e.deleteH(1,"char")},delWordBefore:function(e){e.deleteH(-1,"word")},delWordAfter:function(e){e.deleteH(1,"word")},delGroupBefore:function(e){e.deleteH(-1,"group")},delGroupAfter:function(e){e.deleteH(1,"group")},indentAuto:function(e){e.indentSelection("smart")},indentMore:function(e){e.indentSelection("add")},indentLess:function(e){e.indentSelection("subtract")},insertTab:function(e){e.replaceSelection(" ","end","+input")},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.replaceSelection(" ","end","+input")},transposeChars:function(e){var t=e.getCursor(),r=e.getLine(t.line);t.ch>0&&t.ch<r.length-1&&e.replaceRange(r.charAt(t.ch)+r.charAt(t.ch-1),Xt(t.line,t.ch-1),Xt(t.line,t.ch+1))},newlineAndIndent:function(e){st(e,function(){e.replaceSelection("\n","end","+input"),e.indentLine(e.getCursor().line,null,!0)})()},toggleOverwrite:function(e){e.toggleOverwrite()}},So=e.keyMap={};So.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite"},So.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Alt-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore",fallthrough:"basic"},So.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delLineLeft",fallthrough:["basic","emacsy"]},So["default"]=Ji?So.macDefault:So.pcDefault,So.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"},e.lookupKey=Mr,e.isModifierKey=Lr,e.keyName=Sr,e.fromTextArea=function(t,r){function n(){t.value=u.getValue()}if(r||(r={}),r.value=t.value,!r.tabindex&&t.tabindex&&(r.tabindex=t.tabindex),!r.placeholder&&t.placeholder&&(r.placeholder=t.placeholder),null==r.autofocus){var i=document.body;try{i=document.activeElement}catch(o){}r.autofocus=i==t||null!=t.getAttribute("autofocus")&&i==document.body}if(t.form&&(Xn(t.form,"submit",n),!r.leaveSubmitMethodAlone)){var a=t.form,l=a.submit;try{var s=a.submit=function(){n(),a.submit=l,a.submit(),a.submit=s}}catch(o){}}t.style.display="none";var u=e(function(e){t.parentNode.insertBefore(e,t.nextSibling)},r);return u.save=n,u.getTextArea=function(){return t},u.toTextArea=function(){n(),t.parentNode.removeChild(u.getWrapperElement()),t.style.display="",t.form&&(Yn(t.form,"submit",n),"function"==typeof t.form.submit&&(t.form.submit=l))},u},Tr.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){return this.pos<this.string.length?this.string.charAt(this.pos++):void 0},eat:function(e){var t=this.string.charAt(this.pos);if("string"==typeof e)var r=t==e;else var r=t&&(e.test?e.test(t):e(t));return r?(++this.pos,t):void 0},eatWhile:function(e){for(var t=this.pos;this.eat(e););return this.pos>t},eatSpace:function(){for(var e=this.pos;/[\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);return t>-1?(this.pos=t,!0):void 0},backUp:function(e){this.pos-=e},column:function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=ii(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?ii(this.string,this.lineStart,this.tabSize):0)
4
- },indentation:function(){return ii(this.string,null,this.tabSize)-(this.lineStart?ii(this.string,this.lineStart,this.tabSize):0)},match:function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&t!==!1&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e},o=this.string.substr(this.pos,e.length);return i(o)==i(e)?(t!==!1&&(this.pos+=e.length),!0):void 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}}},e.StringStream=Tr,e.TextMarker=Ar,ri(Ar),Ar.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&at(e),ti(this,"clear")){var r=this.find();r&&Qn(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Hr(a.markedSpans,this);null!=l.to&&(i=Sn(a)),a.markedSpans=Er(a.markedSpans,l),null!=l.from?n=Sn(a):this.collapsed&&!Yr(this.doc,a)&&e&&Ln(a,it(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var o=0;o<this.lines.length;++o){var s=Xr(e.doc,this.lines[o]),u=f(e.doc,s);u>e.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=n&&e&&ft(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&lr(e)),t&&lt(e)}},Ar.prototype.find=function(e){for(var t,r,n=0;n<this.lines.length;++n){var i=this.lines[n],o=Hr(i.markedSpans,this);if(null!=o.from||null!=o.to){var a=Sn(i);null!=o.from&&(t=Xt(a,o.from)),null!=o.to&&(r=Xt(a,o.to))}}return"bookmark"!=this.type||e?t&&{from:t,to:r}:t},Ar.prototype.changed=function(){var e=this.find(),t=this.doc.cm;if(e&&t){"bookmark"!=this.type&&(e=e.from);var r=kn(this.doc,e.line);if(R(t,r),e.line>=t.display.showingFrom&&e.line<t.display.showingTo){for(var n=t.display.lineDiv.firstChild;n;n=n.nextSibling)if(n.lineObj==r){n.offsetHeight!=r.height&&Ln(r,n.offsetHeight);break}ct(t,function(){t.curOp.selectionChanged=t.curOp.forceUpdate=t.curOp.updateMaxLine=!0})}}},Ar.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=si(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ar.prototype.detachLine=function(e){if(this.lines.splice(si(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}};var To=0;e.SharedTextMarker=Nr,ri(Nr),Nr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Qn(this,"clear")}},Nr.prototype.find=function(){return this.primary.find()};var Ao=e.LineWidget=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.cm=e,this.node=t};ri(Ao),Ao.prototype.clear=en(function(){var e=this.line.widgets,t=Sn(this.line);if(null!=t&&e){for(var r=0;r<e.length;++r)e[r]==this&&e.splice(r--,1);e.length||(this.line.widgets=null);var n=An(this.cm,this.line)<this.cm.doc.scrollTop;Ln(this.line,Math.max(0,this.line.height-tn(this))),n&&pr(this.cm,0,-this.height),ft(this.cm,t,t+1)}}),Ao.prototype.changed=en(function(){var e=this.height;this.height=null;var t=tn(this)-e;if(t){Ln(this.line,this.line.height+t);var r=Sn(this.line);ft(this.cm,r,r+1)}});var zo=e.Line=function(e,t,r){this.text=e,Jr(this,t),this.height=r?r(this):1};ri(zo),zo.prototype.lineNo=function(){return Sn(this)};var No={},Wo={};bn.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;n>r;++r){var i=this.lines[r];this.height-=i.height,on(i),Qn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.splice.apply(e,[e.length,0].concat(this.lines))},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0,i=t.length;i>n;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;n>e;++e)if(r(this.lines[e]))return!0}},xn.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(i>e){var o=Math.min(t,i-e),a=n.height;if(n.removeInner(e,o),this.height-=a-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25){var l=[];this.collapse(l),this.children=[new bn(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0,r=this.children.length;r>t;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0,i=this.children.length;i>n;++n){var o=this.children[n],a=o.chunkSize();if(a>=e){if(o.insertInner(e,t,r),o.lines&&o.lines.length>50){for(;o.lines.length>50;){var l=o.lines.splice(o.lines.length-25,25),s=new bn(l);o.height-=s.height,this.children.splice(n+1,0,s),s.parent=this}this.maybeSpill()}break}e-=a}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=e.children.splice(e.children.length-5,5),r=new xn(t);if(e.parent){e.size-=r.size,e.height-=r.height;var n=si(e.parent.children,e);e.parent.children.splice(n+1,0,r)}else{var i=new xn(e.children);i.parent=e,e.children=[i,r],e=i}r.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0,i=this.children.length;i>n;++n){var o=this.children[n],a=o.chunkSize();if(a>e){var l=Math.min(t,a-e);if(o.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=a}}};var Ho=0,Eo=e.Doc=function(e,t,r){if(!(this instanceof Eo))return new Eo(e,t,r);null==r&&(r=0),xn.call(this,[new bn([new zo("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.history=Nn(),this.cleanGeneration=1,this.frontier=r;var n=Xt(r,0);this.sel={from:n,to:n,head:n,anchor:n,shift:!1,extend:!1,goalColumn:null},this.id=++Ho,this.modeOption=t,"string"==typeof e&&(e=Uo(e)),yn(this,{from:n,to:n,text:e},null,{head:n,anchor:n})};Eo.prototype=ui(xn.prototype,{constructor:Eo,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0,i=t.length;i>n;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Mn(this,this.first,this.first+this.size);return e===!1?t:t.join(e||"\n")},setValue:function(e){var t=Xt(this.first,0),r=this.first+this.size-1;Rt(this,{from:t,to:Xt(r,kn(this,r).text.length),text:Uo(e),origin:"setValue"},{head:t,anchor:t},!0)},replaceRange:function(e,t,r,n){t=tr(this,t),r=r?tr(this,r):t,$t(this,e,t,r,n)},getRange:function(e,t,r){var n=Cn(this,tr(this,e),tr(this,t));return r===!1?n:n.join(r||"\n")},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},setLine:function(e,t){nr(this,e)&&$t(this,t,Xt(e,0),tr(this,Xt(e)))},removeLine:function(e){e?$t(this,"",tr(this,Xt(e-1)),tr(this,Xt(e))):$t(this,"",Xt(0,0),tr(this,Xt(1,0)))},getLineHandle:function(e){return nr(this,e)?kn(this,e):void 0},getLineNumber:function(e){return Sn(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=kn(this,e)),Xr(this,e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return tr(this,e)},getCursor:function(e){var t=this.sel,r;return r=null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||e===!1?t.to:t.from,Jt(r)},somethingSelected:function(){return!Yt(this.sel.head,this.sel.anchor)},setCursor:ut(function(e,t,r){var n=tr(this,"number"==typeof e?Xt(e,t||0):e);r?ir(this,n):ar(this,n,n)}),setSelection:ut(function(e,t,r){ar(this,tr(this,e),tr(this,t||e),r)}),extendSelection:ut(function(e,t,r){ir(this,tr(this,e),t&&tr(this,t),r)}),getSelection:function(e){return this.getRange(this.sel.from,this.sel.to,e)},replaceSelection:function(e,t,r){Rt(this,{from:this.sel.from,to:this.sel.to,text:Uo(e),origin:r},t||"around")},undo:ut(function(){Gt(this,"undo")}),redo:ut(function(){Gt(this,"redo")}),setExtending:function(e){this.sel.extend=e},historySize:function(){var e=this.history;return{undo:e.done.length,redo:e.undone.length}},clearHistory:function(){this.history=Nn(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:In(this.history.done),undone:In(this.history.undone)}},setHistory:function(e){var t=this.history=Nn(this.history.maxGeneration);t.done=e.done.slice(0),t.undone=e.undone.slice(0)},markText:function(e,t,r){return zr(this,tr(this,e),tr(this,t),r,"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1};return e=tr(this,e),zr(this,e,e,r,"bookmark")},findMarksAt:function(e){e=tr(this,e);var t=[],r=kn(this,e.line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first;return this.iter(function(n){var i=n.text.length+1;return i>e?(t=e,!0):(e-=i,void++r)}),tr(this,Xt(r,t))},indexFromPos:function(e){e=tr(this,e);var t=e.ch;return e.line<this.first||e.ch<0?0:(this.iter(this.first,e.line,function(e){t+=e.text.length+1}),t)},copy:function(e){var t=new Eo(Mn(this,this.first,this.first+this.size),this.modeOption,this.first);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel={from:this.sel.from,to:this.sel.to,head:this.sel.head,anchor:this.sel.anchor,shift:this.sel.shift,extend:!1,goalColumn:this.sel.goalColumn},e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new Eo(Mn(this,t,r),e.mode||this.modeOption,t);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],n},unlinkDoc:function(t){if(t instanceof e&&(t=t.doc),this.linked)for(var r=0;r<this.linked.length;++r){var n=this.linked[r];if(n.doc==t){this.linked.splice(r,1),t.unlinkDoc(this);break}}if(t.history==this.history){var i=[t.id];wn(t,function(e){i.push(e.id)},!0),t.history=Nn(),t.history.done=In(this.history.done,i),t.history.undone=In(this.history.undone,i)}},iterLinkedDocs:function(e){wn(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm}}),Eo.prototype.eachLine=Eo.prototype.iter;var Oo="iter insert remove copy getEditor".split(" ");for(var Do in Eo.prototype)Eo.prototype.hasOwnProperty(Do)&&si(Oo,Do)<0&&(e.prototype[Do]=function(e){return function(){return e.apply(this.doc,arguments)}}(Eo.prototype[Do]));ri(Eo),e.e_stop=Kn,e.e_preventDefault=Bn,e.e_stopPropagation=Gn;var Io,qo=0;e.on=Xn,e.off=Yn,e.signal=Zn;var Po=30,Fo=e.Pass={toString:function(){return"CodeMirror.Pass"}};ni.prototype={set:function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)}},e.countColumn=ii;var Vo=[""],Ro=/[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,Bo=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;e.replaceGetRect=function(e){xi=e};var Go=function(){if(Pi)return!1;var e=gi("div");return"draggable"in e||"dragDrop"in e}();Di?wi=function(e,t){return 36==e.charCodeAt(t-1)&&39==e.charCodeAt(t)}:Ki&&!/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)?wi=function(e,t){return/\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(e.slice(t-1,t+1))}:Ri&&/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)?wi=function(e,t){var r=e.charCodeAt(t-1);return r>=8208&&8212>=r}:Ri&&(wi=function(e,t){if(t>1&&45==e.charCodeAt(t-1)){if(/\w/.test(e.charAt(t-2))&&/[^\-?\.]/.test(e.charAt(t)))return!0;if(t>2&&/[\d\.,]/.test(e.charAt(t-2))&&/[\d\.,]/.test(e.charAt(t)))return!1}return/[~!#%&*)=+}\]\\|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|\u2026[\w~`@#$%\^&*(_=+{[><]/.test(e.slice(t-1,t+1))});var jo,Ko,Uo=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;n>=t;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(r.push(o.slice(0,a)),t+=a+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)};e.splitLines=Uo;var $o=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(t){return!1}}:function(e){try{var t=e.ownerDocument.selection.createRange()}catch(r){}return t&&t.parentElement()==e?0!=t.compareEndPoints("StartToEnd",t):!1},Xo=function(){var e=gi("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),"function"==typeof e.oncopy)}(),Yo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};e.keyNames=Yo,function(){for(var e=0;10>e;e++)Yo[e+48]=Yo[e+96]=String(e);for(var e=65;90>=e;e++)Yo[e]=String.fromCharCode(e);for(var e=1;12>=e;e++)Yo[e+111]=Yo[e+63235]="F"+e}();var Zo,Qo=function(){function e(e){return 255>=e?t.charAt(e):e>=1424&&1524>=e?"R":e>=1536&&1791>=e?r.charAt(e-1536):e>=1792&&2220>=e?"r":"L"}var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,s="L";return function(t){if(!n.test(t))return!1;for(var r=t.length,u=[],c=0,f;r>c;++c)u.push(f=e(t.charCodeAt(c)));for(var c=0,d=s;r>c;++c){var f=u[c];"m"==f?u[c]=d:d=f}for(var c=0,h=s;r>c;++c){var f=u[c];"1"==f&&"r"==h?u[c]="n":o.test(f)&&(h=f,"r"==f&&(u[c]="R"))}for(var c=1,d=u[0];r-1>c;++c){var f=u[c];"+"==f&&"1"==d&&"1"==u[c+1]?u[c]="1":","!=f||d!=u[c+1]||"1"!=d&&"n"!=d||(u[c]=d),d=f}for(var c=0;r>c;++c){var f=u[c];if(","==f)u[c]="N";else if("%"==f){for(var p=c+1;r>p&&"%"==u[p];++p);for(var m=c&&"!"==u[c-1]||r>p&&"1"==u[p]?"1":"N",g=c;p>g;++g)u[g]=m;c=p-1}}for(var c=0,h=s;r>c;++c){var f=u[c];"L"==h&&"1"==f?u[c]="L":o.test(f)&&(h=f)}for(var c=0;r>c;++c)if(i.test(u[c])){for(var p=c+1;r>p&&i.test(u[p]);++p);for(var v="L"==(c?u[c-1]:s),y="L"==(r>p?u[p]:s),m=v||y?"L":"R",g=c;p>g;++g)u[g]=m;c=p-1}for(var b=[],x,c=0;r>c;)if(a.test(u[c])){var w=c;for(++c;r>c&&a.test(u[c]);++c);b.push({from:w,to:c,level:0})}else{var _=c,k=b.length;for(++c;r>c&&"L"!=u[c];++c);for(var g=_;c>g;)if(l.test(u[g])){g>_&&b.splice(k,0,{from:_,to:g,level:1});var C=g;for(++g;c>g&&l.test(u[g]);++g);b.splice(k,0,{from:C,to:g,level:2}),_=g}else++g;c>_&&b.splice(k,0,{from:_,to:c,level:1})}return 1==b[0].level&&(x=t.match(/^\s+/))&&(b[0].from=x[0].length,b.unshift({from:0,to:x[0].length,level:0})),1==ai(b).level&&(x=t.match(/\s+$/))&&(ai(b).to-=x[0].length,b.push({from:r-x[0].length,to:r,level:0})),b[0].level!=ai(b).level&&b.push({from:r,to:r,level:b[0].level}),b}}();return e.version="3.21.0",e}(),CodeMirror.defineMode("xml",function(e,t){function r(e,t){function r(r){return t.tokenize=r,r(e,t)}var i=e.next();if("<"==i){if(e.eat("!"))return e.eat("[")?e.match("CDATA[")?r(o("atom","]]>")):null:e.match("--")?r(o("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),r(a(1))):null;if(e.eat("?"))return e.eatWhile(/[\w\._\-]/),t.tokenize=o("meta","?>"),"meta";var l=e.eat("/");_="";for(var s;s=e.eat(/[^\s\u00a0=<>\"\'\/?]/);)_+=s;return _?(k=l?"closeTag":"openTag",t.tokenize=n,"tag"):"tag error"}if("&"==i){var u;return u=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),u?"atom":"error"}return e.eatWhile(/[^&<]/),null}function n(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=r,k=">"==n?"endTag":"selfcloseTag","tag";if("="==n)return k="equals",null;if("<"==n){t.tokenize=r,t.state=c,t.tagName=t.tagStart=null;var o=t.tokenize(e,t);return o?o+" error":"error"}return/[\'\"]/.test(n)?(t.tokenize=i(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.eatWhile(/[^\s\u00a0=<>\"\']/),"word")}function i(e){var t=function(t,r){for(;!t.eol();)if(t.next()==e){r.tokenize=n;break}return"string"};return t.isInAttribute=!0,t}function o(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=r;break}n.next()}return e}}function a(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i)return n.tokenize=a(e+1),n.tokenize(t,n);if(">"==i){if(1==e){n.tokenize=r;break}return n.tokenize=a(e-1),n.tokenize(t,n)}}return"meta"}}function l(e,t,r){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=r,(x.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function s(e){e.context&&(e.context=e.context.prev)}function u(e,t){for(var r;;){if(!e.context)return;if(r=e.context.tagName.toLowerCase(),!x.contextGrabbers.hasOwnProperty(r)||!x.contextGrabbers[r].hasOwnProperty(t))return;s(e)}}function c(e,t,r){if("openTag"==e)return r.tagName=_,r.tagStart=t.column(),h;if("closeTag"==e){var n=!1;return r.context?r.context.tagName!=_&&(x.implicitlyClosed.hasOwnProperty(r.context.tagName.toLowerCase())&&s(r),n=!r.context||r.context.tagName!=_):n=!0,n&&(C="error"),n?d:f}return c}function f(e,t,r){return"endTag"!=e?(C="error",f):(s(r),c)}function d(e,t,r){return C="error",f(e,t,r)}function h(e,t,r){if("word"==e)return C="attribute",p;if("endTag"==e||"selfcloseTag"==e){var n=r.tagName,i=r.tagStart;return r.tagName=r.tagStart=null,"selfcloseTag"==e||x.autoSelfClosers.hasOwnProperty(n.toLowerCase())?u(r,n.toLowerCase()):(u(r,n.toLowerCase()),r.context=new l(r,n,i==r.indented)),c}return C="error",h}function p(e,t,r){return"equals"==e?m:(x.allowMissing||(C="error"),h(e,t,r))}function m(e,t,r){return"string"==e?g:"word"==e&&x.allowUnquoted?(C="string",h):(C="error",h(e,t,r))}function g(e,t,r){return"string"==e?g:h(e,t,r)}var v=e.indentUnit,y=t.multilineTagIndentFactor||1,b=t.multilineTagIndentPastTag||!0,x=t.htmlMode?{autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1},w=t.alignCDATA,_,k,C;return{startState:function(){return{tokenize:r,state:c,indented:0,tagName:null,tagStart:null,context:null}},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;_=k=null;var r=t.tokenize(e,t);return(r||k)&&"comment"!=r&&(C=null,t.state=t.state(k||r,e,t),C&&(r="error"==C?r+" error":C)),r},indent:function(e,t,i){var o=e.context;if(e.tokenize.isInAttribute)return e.stringStartCol+1;if(o&&o.noIndent)return CodeMirror.Pass;if(e.tokenize!=n&&e.tokenize!=r)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return b?e.tagStart+e.tagName.length+2:e.tagStart+v*y;if(w&&/<!\[CDATA\[/.test(t))return 0;for(o&&/^<\//.test(t)&&(o=o.prev);o&&!o.startOfLine;)o=o.prev;return o?o.indent+v:0},electricChars:"/",blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:t.htmlMode?"html":"xml",helperType:t.htmlMode?"html":"xml"}}),CodeMirror.defineMIME("text/xml","xml"),CodeMirror.defineMIME("application/xml","xml"),CodeMirror.mimeModes.hasOwnProperty("text/html")||CodeMirror.defineMIME("text/html",{name:"xml",htmlMode:!0}),CodeMirror.defineMode("javascript",function(e,t){function r(e){for(var t=!1,r,n=!1;null!=(r=e.next());){if(!t){if("/"==r&&!n)return;"["==r?n=!0:n&&"]"==r&&(n=!1)}t=!t&&"\\"==r}}function n(e,t,r){return bt=e,xt=r,t}function i(e,t){var i=e.next();if('"'==i||"'"==i)return t.tokenize=o(i),t.tokenize(e,t);if("."==i&&e.match(/^\d+(?:[eE][+\-]?\d+)?/))return n("number","number");if("."==i&&e.match(".."))return n("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(i))return n(i);if("="==i&&e.eat(">"))return n("=>","operator");if("0"==i&&e.eat(/x/i))return e.eatWhile(/[\da-f]/i),n("number","number");if(/\d/.test(i))return e.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/),n("number","number");if("/"==i)return e.eat("*")?(t.tokenize=a,a(e,t)):e.eat("/")?(e.skipToEnd(),n("comment","comment")):"operator"==t.lastType||"keyword c"==t.lastType||"sof"==t.lastType||/^[\[{}\(,;:]$/.test(t.lastType)?(r(e),e.eatWhile(/[gimy]/),n("regexp","string-2")):(e.eatWhile(yt),n("operator","operator",e.current()));if("`"==i)return t.tokenize=l,l(e,t);if("#"==i)return e.skipToEnd(),n("error","error");if(yt.test(i))return e.eatWhile(yt),n("operator","operator",e.current());e.eatWhile(/[\w\$_]/);var s=e.current(),u=vt.propertyIsEnumerable(s)&&vt[s];return u&&"."!=t.lastType?n(u.type,u.style,s):n("variable","variable",s)}function o(e){return function(t,r){for(var o=!1,a;null!=(a=t.next())&&(a!=e||o);)o=!o&&"\\"==a;return o||(r.tokenize=i),n("string","string")}}function a(e,t){for(var r=!1,o;o=e.next();){if("/"==o&&r){t.tokenize=i;break}r="*"==o}return n("comment","comment")}function l(e,t){for(var r=!1,o;null!=(o=e.next());){if(!r&&("`"==o||"$"==o&&e.eat("{"))){t.tokenize=i;break}r=!r&&"\\"==o}return n("quasi","string-2",e.current())}function s(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var r=e.string.indexOf("=>",e.start);if(!(0>r)){for(var n=0,i=!1,o=r-1;o>=0;--o){var a=e.string.charAt(o),l=wt.indexOf(a);if(l>=0&&3>l){if(!n){++o;break}if(0==--n)break}else if(l>=3&&6>l)++n;else if(/[$\w]/.test(a))i=!0;else if(i&&!n){++o;break}}i&&!n&&(t.fatArrowAt=o)}}function u(e,t,r,n,i,o){this.indented=e,this.column=t,this.type=r,this.prev=i,this.info=o,null!=n&&(this.align=n)}function c(e,t){for(var r=e.localVars;r;r=r.next)if(r.name==t)return!0;for(var n=e.context;n;n=n.prev)for(var r=n.vars;r;r=r.next)if(r.name==t)return!0}function f(e,t,r,n,i){var o=e.cc;for(kt.state=e,kt.stream=i,kt.marked=null,kt.cc=o,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;){var a=o.length?o.pop():mt?w:x;if(a(r,n)){for(;o.length&&o[o.length-1].lex;)o.pop()();return kt.marked?kt.marked:"variable"==r&&c(e,n)?"variable-2":t}}}function d(){for(var e=arguments.length-1;e>=0;e--)kt.cc.push(arguments[e])}function h(){return d.apply(null,arguments),!0}function p(e){function r(t){for(var r=t;r;r=r.next)if(r.name==e)return!0;return!1}var n=kt.state;if(n.context){if(kt.marked="def",r(n.localVars))return;n.localVars={name:e,next:n.localVars}}else{if(r(n.globalVars))return;t.globalVars&&(n.globalVars={name:e,next:n.globalVars})}}function m(){kt.state.context={prev:kt.state.context,vars:kt.state.localVars},kt.state.localVars=Ct}function g(){kt.state.localVars=kt.state.context.vars,kt.state.context=kt.state.context.prev}function v(e,t){var r=function(){var r=kt.state,n=r.indented;"stat"==r.lexical.type&&(n=r.lexical.indented),r.lexical=new u(n,kt.stream.column(),e,null,r.lexical,t)};return r.lex=!0,r}function y(){var e=kt.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function b(e){return function(t){return t==e?h():";"==e?d():h(arguments.callee)}}function x(e,t){return"var"==e?h(v("vardef",t.length),R,b(";"),y):"keyword a"==e?h(v("form"),w,x,y):"keyword b"==e?h(v("form"),x,y):"{"==e?h(v("}"),P,y):";"==e?h():"if"==e?h(v("form"),w,x,y,U):"function"==e?h(et):"for"==e?h(v("form"),X,x,y):"variable"==e?h(v("stat"),W):"switch"==e?h(v("form"),w,v("}","switch"),b("{"),P,y,y):"case"==e?h(w,b(":")):"default"==e?h(b(":")):"catch"==e?h(v("form"),m,b("("),tt,b(")"),x,y,g):"module"==e?h(v("form"),m,ot,g,y):"class"==e?h(v("form"),rt,it,y):"export"==e?h(v("form"),at,y):"import"==e?h(v("form"),lt,y):d(v("stat"),w,b(";"),y)}function w(e){return k(e,!1)}function _(e){return k(e,!0)}function k(e,t){if(kt.state.fatArrowAt==kt.stream.start){var r=t?N:z;if("("==e)return h(m,v(")"),I(B,")"),y,b("=>"),r,g);if("variable"==e)return d(m,B,b("=>"),r,g)}var n=t?S:L;return _t.hasOwnProperty(e)?h(n):"function"==e?h(et):"keyword c"==e?h(t?M:C):"("==e?h(v(")"),C,dt,b(")"),y,n):"operator"==e||"spread"==e?h(t?_:w):"["==e?h(v("]"),ct,y,n):"{"==e?q(E,"}",null,n):h()}function C(e){return e.match(/[;\}\)\],]/)?d():d(w)}function M(e){return e.match(/[;\}\)\],]/)?d():d(_)}function L(e,t){return","==e?h(w):S(e,t,!1)}function S(e,t,r){var n=0==r?L:S,i=0==r?w:_;return"=>"==t?h(m,r?N:z,g):"operator"==e?/\+\+|--/.test(t)?h(n):"?"==t?h(w,b(":"),i):h(i):"quasi"==e?(kt.cc.push(n),T(t)):";"!=e?"("==e?q(_,")","call",n):"."==e?h(H,n):"["==e?h(v("]"),C,b("]"),y,n):void 0:void 0}function T(e){return"${"!=e.slice(e.length-2)?h():h(w,A)}function A(e){return"}"==e?(kt.marked="string-2",kt.state.tokenize=l,h()):void 0}function z(e){return s(kt.stream,kt.state),d("{"==e?x:w)}function N(e){return s(kt.stream,kt.state),d("{"==e?x:_)}function W(e){return":"==e?h(y,x):d(L,b(";"),y)}function H(e){return"variable"==e?(kt.marked="property",h()):void 0}function E(e,t){if("variable"==e){if(kt.marked="property","get"==t||"set"==t)return h(O)}else if("number"==e||"string"==e)kt.marked=e+" property";else if("["==e)return h(w,b("]"),D);return _t.hasOwnProperty(e)?h(D):void 0}function O(e){return"variable"!=e?d(D):(kt.marked="property",h(et))}function D(e){return":"==e?h(_):"("==e?d(et):void 0}function I(e,t){function r(n){if(","==n){var i=kt.state.lexical;return"call"==i.info&&(i.pos=(i.pos||0)+1),h(e,r)}return n==t?h():h(b(t))}return function(n){return n==t?h():d(e,r)}}function q(e,t,r){for(var n=3;n<arguments.length;n++)kt.cc.push(arguments[n]);return h(v(t,r),I(e,t),y)}function P(e){return"}"==e?h():d(x,P)}function F(e){return gt&&":"==e?h(V):void 0}function V(e){return"variable"==e?(kt.marked="variable-3",h()):void 0}function R(){return d(B,F,j,K)}function B(e,t){return"variable"==e?(p(t),h()):"["==e?q(B,"]"):"{"==e?q(G,"}"):void 0}function G(e,t){return"variable"!=e||kt.stream.match(/^\s*:/,!1)?("variable"==e&&(kt.marked="property"),h(b(":"),B,j)):(p(t),h(j))}function j(e,t){return"="==t?h(_):void 0}function K(e){return","==e?h(R):void 0}function U(e,t){return"keyword b"==e&&"else"==t?h(v("form"),x,y):void 0}function X(e){return"("==e?h(v(")"),Y,b(")"),y):void 0}function Y(e){return"var"==e?h(R,b(";"),Q):";"==e?h(Q):"variable"==e?h(Z):d(w,b(";"),Q)}function Z(e,t){return"in"==t||"of"==t?(kt.marked="keyword",h(w)):h(L,Q)}function Q(e,t){return";"==e?h(J):"in"==t||"of"==t?(kt.marked="keyword",h(w)):d(w,b(";"),J)}function J(e){")"!=e&&h(w)}function et(e,t){return"*"==t?(kt.marked="keyword",h(et)):"variable"==e?(p(t),h(et)):"("==e?h(m,v(")"),I(tt,")"),y,x,g):void 0}function tt(e){return"spread"==e?h(tt):d(B,F)}function rt(e,t){return"variable"==e?(p(t),h(nt)):void 0}function nt(e,t){return"extends"==t?h(w):void 0}function it(e){return"{"==e?q(E,"}"):void 0}function ot(e,t){return"string"==e?h(x):"variable"==e?(p(t),h(ut)):void 0}function at(e,t){return"*"==t?(kt.marked="keyword",h(ut,b(";"))):"default"==t?(kt.marked="keyword",h(w,b(";"))):d(x)}function lt(e){return"string"==e?h():d(st,ut)}function st(e,t){return"{"==e?q(st,"}"):("variable"==e&&p(t),h())}function ut(e,t){return"from"==t?(kt.marked="keyword",h(w)):void 0}function ct(e){return"]"==e?h():d(_,ft)}function ft(e){return"for"==e?d(dt,b("]")):","==e?h(I(_,"]")):d(I(_,"]"))}function dt(e){return"for"==e?h(X,dt):"if"==e?h(w,dt):void 0}var ht=e.indentUnit,pt=t.statementIndent,mt=t.json,gt=t.typescript,vt=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),r=e("keyword b"),n=e("keyword c"),i=e("operator"),o={type:"atom",style:"atom"},a={"if":e("if"),"while":t,"with":t,"else":r,"do":r,"try":r,"finally":r,"return":n,"break":n,"continue":n,"new":n,"delete":n,"throw":n,"debugger":n,"var":e("var"),"const":e("var"),let:e("var"),"function":e("function"),"catch":e("catch"),"for":e("for"),"switch":e("switch"),"case":e("case"),"default":e("default"),"in":i,"typeof":i,"instanceof":i,"true":o,"false":o,"null":o,undefined:o,NaN:o,Infinity:o,"this":e("this"),module:e("module"),"class":e("class"),"super":e("atom"),"yield":n,"export":e("export"),"import":e("import"),"extends":n};if(gt){var l={type:"variable",style:"variable-3"},s={"interface":e("interface"),"extends":e("extends"),constructor:e("constructor"),"public":e("public"),"private":e("private"),"protected":e("protected"),"static":e("static"),string:l,number:l,bool:l,any:l};for(var u in s)a[u]=s[u]}return a}(),yt=/[+\-*&%=<>!?|~^]/,bt,xt,wt="([{}])",_t={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,"this":!0},kt={state:null,column:null,marked:null,cc:null},Ct={name:"this",next:{name:"arguments"}};return y.lex=!0,{startState:function(e){var r={tokenize:i,lastType:"sof",cc:[],lexical:new u((e||0)-ht,0,"block",!1),localVars:t.localVars,context:t.localVars&&{vars:t.localVars},indented:0};
5
- return t.globalVars&&(r.globalVars=t.globalVars),r},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),s(e,t)),t.tokenize!=a&&e.eatSpace())return null;var r=t.tokenize(e,t);return"comment"==bt?r:(t.lastType="operator"!=bt||"++"!=xt&&"--"!=xt?bt:"incdec",f(t,r,bt,xt,e))},indent:function(e,r){if(e.tokenize==a)return CodeMirror.Pass;if(e.tokenize!=i)return 0;for(var n=r&&r.charAt(0),o=e.lexical,l=e.cc.length-1;l>=0;--l){var s=e.cc[l];if(s==y)o=o.prev;else if(s!=U)break}"stat"==o.type&&"}"==n&&(o=o.prev),pt&&")"==o.type&&"stat"==o.prev.type&&(o=o.prev);var u=o.type,c=n==u;return"vardef"==u?o.indented+("operator"==e.lastType||","==e.lastType?o.info+1:0):"form"==u&&"{"==n?o.indented:"form"==u?o.indented+ht:"stat"==u?o.indented+("operator"==e.lastType||","==e.lastType?pt||ht:0):"switch"!=o.info||c||0==t.doubleIndentSwitch?o.align?o.column+(c?0:1):o.indented+(c?0:ht):o.indented+(/^(?:case|default)\b/.test(r)?ht:2*ht)},electricChars:":{}",blockCommentStart:mt?null:"/*",blockCommentEnd:mt?null:"*/",lineComment:mt?null:"//",fold:"brace",helperType:mt?"json":"javascript",jsonMode:mt}}),CodeMirror.defineMIME("text/javascript","javascript"),CodeMirror.defineMIME("text/ecmascript","javascript"),CodeMirror.defineMIME("application/javascript","javascript"),CodeMirror.defineMIME("application/ecmascript","javascript"),CodeMirror.defineMIME("application/json",{name:"javascript",json:!0}),CodeMirror.defineMIME("application/x-json",{name:"javascript",json:!0}),CodeMirror.defineMIME("text/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMIME("application/typescript",{name:"javascript",typescript:!0}),CodeMirror.defineMode("css",function(e,t){function r(e,t){return w=t,e}function n(e,t){var n=e.next();if(h[n]){var a=h[n](e,t);if(a!==!1)return a}return"@"==n?(e.eatWhile(/[\w\\\-]/),r("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?r(null,"compare"):'"'==n||"'"==n?(t.tokenize=i(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),r("atom","hash")):"!"==n?(e.match(/^\s*\w*/),r("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),r("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?r(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?r("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?r(null,n):"u"==n&&e.match("rl(")?(e.backUp(1),t.tokenize=o,r("property","word")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),r("property","word")):r(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),r("number","unit")):e.match(/^[^-]+-/)?r("meta","meta"):void 0}function i(e){return function(t,n){for(var i=!1,o;null!=(o=t.next());){if(o==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==o}return(o==e||!i&&")"!=e)&&(n.tokenize=null),r("string","string")}}function o(e,t){return e.next(),t.tokenize=e.match(/\s*[\"\']/,!1)?null:i(")"),r(null,"(")}function a(e,t,r){this.type=e,this.indent=t,this.prev=r}function l(e,t,r){return e.context=new a(r,t.indentation()+d,e.context),r}function s(e){return e.context=e.context.prev,e.context.type}function u(e,t,r){return k[r.context.type](e,t,r)}function c(e,t,r,n){for(var i=n||1;i>0;i--)r.context=r.context.prev;return u(e,t,r)}function f(e){var t=e.current().toLowerCase();_=y.hasOwnProperty(t)?"atom":v.hasOwnProperty(t)?"keyword":"variable"}t.propertyKeywords||(t=CodeMirror.resolveMode("text/css"));var d=e.indentUnit,h=t.tokenHooks,p=t.mediaTypes||{},m=t.mediaFeatures||{},g=t.propertyKeywords||{},v=t.colorKeywords||{},y=t.valueKeywords||{},b=t.fontProperties||{},x=t.allowNested,w,_,k={};return k.top=function(e,t,r){if("{"==e)return l(r,t,"block");if("}"==e&&r.context.prev)return s(r);if("@media"==e)return l(r,t,"media");if("@font-face"==e)return"font_face_before";if(e&&"@"==e.charAt(0))return l(r,t,"at");if("hash"==e)_="builtin";else if("word"==e)_="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return l(r,t,"interpolation");if(":"==e)return"pseudo";if(x&&"("==e)return l(r,t,"params")}return r.context.type},k.block=function(e,t,r){return"word"==e?g.hasOwnProperty(t.current().toLowerCase())?(_="property","maybeprop"):x?(_=t.match(/^\s*:/,!1)?"property":"tag","block"):(_+=" error","maybeprop"):"meta"==e?"block":x||"hash"!=e&&"qualifier"!=e?k.top(e,t,r):(_="error","block")},k.maybeprop=function(e,t,r){return":"==e?l(r,t,"prop"):u(e,t,r)},k.prop=function(e,t,r){if(";"==e)return s(r);if("{"==e&&x)return l(r,t,"propBlock");if("}"==e||"{"==e)return c(e,t,r);if("("==e)return l(r,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(t.current())){if("word"==e)f(t);else if("interpolation"==e)return l(r,t,"interpolation")}else _+=" error";return"prop"},k.propBlock=function(e,t,r){return"}"==e?s(r):"word"==e?(_="property","maybeprop"):r.context.type},k.parens=function(e,t,r){return"{"==e||"}"==e?c(e,t,r):")"==e?s(r):"parens"},k.pseudo=function(e,t,r){return"word"==e?(_="variable-3",r.context.type):u(e,t,r)},k.media=function(e,t,r){if("("==e)return l(r,t,"media_parens");if("}"==e)return c(e,t,r);if("{"==e)return s(r)&&l(r,t,x?"block":"top");if("word"==e){var n=t.current().toLowerCase();_="only"==n||"not"==n||"and"==n?"keyword":p.hasOwnProperty(n)?"attribute":m.hasOwnProperty(n)?"property":"error"}return r.context.type},k.media_parens=function(e,t,r){return")"==e?s(r):"{"==e||"}"==e?c(e,t,r,2):k.media(e,t,r)},k.font_face_before=function(e,t,r){return"{"==e?l(r,t,"font_face"):u(e,t,r)},k.font_face=function(e,t,r){return"}"==e?s(r):"word"==e?(_=b.hasOwnProperty(t.current().toLowerCase())?"property":"error","maybeprop"):"font_face"},k.at=function(e,t,r){return";"==e?s(r):"{"==e||"}"==e?c(e,t,r):("word"==e?_="tag":"hash"==e&&(_="builtin"),"at")},k.interpolation=function(e,t,r){return"}"==e?s(r):"{"==e||";"==e?c(e,t,r):("variable"!=e&&(_="error"),"interpolation")},k.params=function(e,t,r){return")"==e?s(r):"{"==e||"}"==e?c(e,t,r):("word"==e&&f(t),"params")},{startState:function(e){return{tokenize:null,state:"top",context:new a("top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var r=(t.tokenize||n)(e,t);return r&&"object"==typeof r&&(w=r[1],r=r[0]),_=r,t.state=k[t.state](w,e,t),_},indent:function(e,t){var r=e.context,n=t&&t.charAt(0),i=r.indent;return!r.prev||("}"!=n||"block"!=r.type&&"top"!=r.type&&"interpolation"!=r.type&&"font_face"!=r.type)&&(")"!=n||"parens"!=r.type&&"params"!=r.type&&"media_parens"!=r.type)&&("{"!=n||"at"!=r.type&&"media"!=r.type)||(i=r.indent-d,r=r.prev),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}}),function(){function e(e){for(var t={},r=0;r<e.length;++r)t[e[r]]=!0;return t}function t(e,t){for(var r=!1,n;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}function r(e,t){return e.skipTo("-->")?(e.match("-->"),t.tokenize=null):e.skipToEnd(),["comment","comment"]}var n=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(n),o=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid"],a=e(o),l=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","baseline-shift","binding","bleed","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-feature-settings","font-family","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-weight","grid-cell","grid-column","grid-column-align","grid-column-sizing","grid-column-span","grid-columns","grid-flow","grid-row","grid-row-align","grid-row-sizing","grid-row-span","grid-rows","grid-template","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","justify-content","left","letter-spacing","line-break","line-height","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marker-offset","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","max-height","max-width","min-height","min-width","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotation","rotation-point","ruby-align","ruby-overhang","ruby-position","ruby-span","shape-inside","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-outline","text-overflow","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","word-break","word-spacing","word-wrap","z-index","zoom","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-profile","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","kerning","text-anchor","writing-mode"],s=e(l),u=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],c=e(u),f=["above","absolute","activeborder","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","auto","avoid","avoid-column","avoid-page","avoid-region","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","column","compact","condensed","contain","content","content-box","context-menu","continuous","copy","cover","crop","cross","crosshair","currentcolor","cursive","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","disc","discard","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ew-resize","expanded","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-table","inset","inside","intrinsic","invert","italic","justify","kannada","katakana","katakana-iroha","keep-all","khmer","landscape","lao","large","larger","left","level","lighter","line-through","linear","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","malayalam","match","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","nw-resize","nwse-resize","oblique","octal","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","round","row-resize","rtl","run-in","running","s-resize","sans-serif","scroll","scrollbar","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","semi-condensed","semi-expanded","separate","serif","show","sidama","single","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","solid","somali","source-atop","source-in","source-out","source-over","space","square","square-button","start","static","status-bar","stretch","stroke","sub","subpixel-antialiased","super","sw-resize","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","transparent","ultra-condensed","ultra-expanded","underline","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","vertical","vertical-text","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","x-large","x-small","xor","xx-large","xx-small"],d=e(f),h=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],p=e(h),m=n.concat(o).concat(l).concat(u).concat(f);CodeMirror.registerHelper("hintWords","css",m),CodeMirror.defineMIME("text/css",{mediaTypes:i,mediaFeatures:a,propertyKeywords:s,colorKeywords:c,valueKeywords:d,fontProperties:p,tokenHooks:{"<":function(e,t){return e.match("!--")?(t.tokenize=r,r(e,t)):!1},"/":function(e,r){return e.eat("*")?(r.tokenize=t,t(e,r)):!1}},name:"css"}),CodeMirror.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:a,propertyKeywords:s,colorKeywords:c,valueKeywords:d,fontProperties:p,allowNested:!0,tokenHooks:{"/":function(e,r){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(r.tokenize=t,t(e,r)):["operator","operator"]},":":function(e){return e.match(/\s*{/)?[null,"{"]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return e.eat("{")?[null,"interpolation"]:!1}},name:"css",helperType:"scss"}),CodeMirror.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:a,propertyKeywords:s,colorKeywords:c,valueKeywords:d,fontProperties:p,allowNested:!0,tokenHooks:{"/":function(e,r){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(r.tokenize=t,t(e,r)):["operator","operator"]},"@":function(e){return e.match(/^(charset|document|font-face|import|keyframes|media|namespace|page|supports)\b/,!1)?!1:(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"})}(),CodeMirror.defineMode("htmlmixed",function(e,t){function r(e,t){var r=t.htmlState.tagName,n=a.token(e,t.htmlState);if("script"==r&&/\btag\b/.test(n)&&">"==e.current()){var u=e.string.slice(Math.max(0,e.pos-100),e.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i);u=u?u[1]:"",u&&/[\"\']/.test(u.charAt(0))&&(u=u.slice(1,u.length-1));for(var c=0;c<s.length;++c){var f=s[c];if("string"==typeof f.matches?u==f.matches:f.matches.test(u)){f.mode&&(t.token=i,t.localMode=f.mode,t.localState=f.mode.startState&&f.mode.startState(a.indent(t.htmlState,"")));break}}}else"style"==r&&/\btag\b/.test(n)&&">"==e.current()&&(t.token=o,t.localMode=l,t.localState=l.startState(a.indent(t.htmlState,"")));return n}function n(e,t,r){var n=e.current(),i=n.search(t),o;return i>-1?e.backUp(n.length-i):(o=n.match(/<\/?$/))&&(e.backUp(n.length),e.match(t,!1)||e.match(n)),r}function i(e,t){return e.match(/^<\/\s*script\s*>/i,!1)?(t.token=r,t.localState=t.localMode=null,r(e,t)):n(e,/<\/\s*script\s*>/,t.localMode.token(e,t.localState))}function o(e,t){return e.match(/^<\/\s*style\s*>/i,!1)?(t.token=r,t.localState=t.localMode=null,r(e,t)):n(e,/<\/\s*style\s*>/,l.token(e,t.localState))}var a=CodeMirror.getMode(e,{name:"xml",htmlMode:!0}),l=CodeMirror.getMode(e,"css"),s=[],u=t&&t.scriptTypes;if(s.push({matches:/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i,mode:CodeMirror.getMode(e,"javascript")}),u)for(var c=0;c<u.length;++c){var f=u[c];s.push({matches:f.matches,mode:f.mode&&CodeMirror.getMode(e,f.mode)})}return s.push({matches:/./,mode:CodeMirror.getMode(e,"text/plain")}),{startState:function(){var e=a.startState();return{token:r,localMode:null,localState:null,htmlState:e}},copyState:function(e){if(e.localState)var t=CodeMirror.copyState(e.localMode,e.localState);return{token:e.token,localMode:e.localMode,localState:t,htmlState:CodeMirror.copyState(a,e.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(e,t){return!e.localMode||/^\s*<\//.test(t)?a.indent(e.htmlState,t):e.localMode.indent?e.localMode.indent(e.localState,t):CodeMirror.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||a}}}},"xml","javascript","css"),CodeMirror.defineMIME("text/html","htmlmixed"),function(){function e(e){for(var t={},r=e.split(" "),n=0;n<r.length;++n)t[r[n]]=!0;return t}function t(e){return function(t,r){return t.match(e)?r.tokenize=null:t.skipToEnd(),"string"}}var r={name:"clike",keywords:e("abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally"),blockKeywords:e("catch do else elseif for foreach if switch try while finally"),atoms:e("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"),builtin:e("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once"),multiLineStrings:!0,hooks:{$:function(e){return e.eatWhile(/[\w\$_]/),"variable-2"
6
- },"<":function(e,r){return e.match(/<</)?(e.eatWhile(/[\w\.]/),r.tokenize=t(e.current().slice(3)),r.tokenize(e,r)):!1},"#":function(e){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"},"/":function(e){if(e.eat("/")){for(;!e.eol()&&!e.match("?>",!1);)e.next();return"comment"}return!1}}};CodeMirror.defineMode("php",function(e,t){function n(e,t){var r=t.curMode==o;if(e.sol()&&t.pending&&'"'!=t.pending&&"'"!=t.pending&&(t.pending=null),r)return r&&null==t.php.tokenize&&e.match("?>")?(t.curMode=i,t.curState=t.html,"meta"):o.token(e,t.curState);if(e.match(/^<\?\w*/))return t.curMode=o,t.curState=t.php,"meta";if('"'==t.pending||"'"==t.pending){for(;!e.eol()&&e.next()!=t.pending;);var n="string"}else if(t.pending&&e.pos<t.pending.end){e.pos=t.pending.end;var n=t.pending.style}else var n=i.token(e,t.curState);t.pending&&(t.pending=null);var a=e.current(),l=a.search(/<\?/),s;return-1!=l&&(t.pending="string"==n&&(s=a.match(/[\'\"]$/))&&!/\?>/.test(a)?s[0]:{end:e.pos,style:n},e.backUp(a.length-l)),n}var i=CodeMirror.getMode(e,"text/html"),o=CodeMirror.getMode(e,r);return{startState:function(){var e=CodeMirror.startState(i),r=CodeMirror.startState(o);return{html:e,php:r,curMode:t.startOpen?o:i,curState:t.startOpen?r:e,pending:null}},copyState:function(e){var t=e.html,r=CodeMirror.copyState(i,t),n=e.php,a=CodeMirror.copyState(o,n),l;return l=e.curMode==i?r:a,{html:r,php:a,curMode:e.curMode,curState:l,pending:e.pending}},token:n,indent:function(e,t){return e.curMode!=o&&/^\s*<\//.test(t)||e.curMode==o&&/^\?>/.test(t)?i.indent(e.html,t):e.curMode.indent(e.curState,t)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},"htmlmixed","clike"),CodeMirror.defineMIME("application/x-httpd-php","php"),CodeMirror.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:!0}),CodeMirror.defineMIME("text/x-php",r)}();
1
+ // CodeMirror base.
2
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){module.exports=a()}else{if(typeof define=="function"&&define.amd){return define([],a)}else{this.CodeMirror=a()}}})(function(){var ce=/gecko\/\d/i.test(navigator.userAgent);var eo=/MSIE \d/.test(navigator.userAgent);var b1=eo&&(document.documentMode==null||document.documentMode<8);var bY=eo&&(document.documentMode==null||document.documentMode<9);var bX=eo&&(document.documentMode==null||document.documentMode<10);var by=/Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent);var dn=eo||by;var cJ=/WebKit\//.test(navigator.userAgent);var dr=cJ&&/Qt\/\d+\.\d+/.test(navigator.userAgent);var cV=/Chrome\//.test(navigator.userAgent);var dF=/Opera\//.test(navigator.userAgent);var ay=/Apple Computer/.test(navigator.vendor);var a1=/KHTML\//.test(navigator.userAgent);var cP=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent);var e5=/PhantomJS/.test(navigator.userAgent);var eD=/AppleWebKit/.test(navigator.userAgent)&&/Mobile\/\w+/.test(navigator.userAgent);var dS=eD||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent);var bU=eD||/Mac/.test(navigator.platform);var aG=/win/i.test(navigator.platform);var aO=dF&&navigator.userAgent.match(/Version\/(\d*\.\d*)/);if(aO){aO=Number(aO[1])}if(aO&&aO>=15){dF=false;cJ=true}var bF=bU&&(dr||dF&&(aO==null||aO<12.11));var fE=ce||(dn&&!bY);var fH=false,aX=false;function I(fO,fP){if(!(this instanceof I)){return new I(fO,fP)}this.options=fP=fP||{};aE(eF,fP,false);b4(fP);var fR=fP.value;if(typeof fR=="string"){fR=new ao(fR,fP.mode)}this.doc=fR;var fQ=this.display=new em(fO,fR);fQ.wrapper.CodeMirror=this;dO(this);cB(this);if(fP.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(fP.autofocus&&!dS){ed(this)}this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,draggingText:false,highlight:new fM()};if(eo){setTimeout(cl(eZ,this,true),20)}fp(this);a8();var fN=this;cz(this,function(){fN.curOp.forceUpdate=true;dN(fN,fR);if((fP.autofocus&&!dS)||ds()==fQ.input){setTimeout(cl(cq,fN),20)}else{aL(fN)}for(var fT in a4){if(a4.hasOwnProperty(fT)){a4[fT](fN,fP[fT],b2)}}for(var fS=0;fS<aY.length;++fS){aY[fS](fN)}})}function em(fN,fP){var fQ=this;var fO=fQ.input=fw("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");if(cJ){fO.style.width="1000px"}else{fO.setAttribute("wrap","off")}if(eD){fO.style.border="1px solid black"}fO.setAttribute("autocorrect","off");fO.setAttribute("autocapitalize","off");fO.setAttribute("spellcheck","false");fQ.inputDiv=fw("div",[fO],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");fQ.scrollbarH=fw("div",[fw("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");fQ.scrollbarV=fw("div",[fw("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");fQ.scrollbarFiller=fw("div",null,"CodeMirror-scrollbar-filler");fQ.gutterFiller=fw("div",null,"CodeMirror-gutter-filler");fQ.lineDiv=fw("div",null,"CodeMirror-code");fQ.selectionDiv=fw("div",null,null,"position: relative; z-index: 1");fQ.cursorDiv=fw("div",null,"CodeMirror-cursors");fQ.measure=fw("div",null,"CodeMirror-measure");fQ.lineMeasure=fw("div",null,"CodeMirror-measure");fQ.lineSpace=fw("div",[fQ.measure,fQ.lineMeasure,fQ.selectionDiv,fQ.cursorDiv,fQ.lineDiv],null,"position: relative; outline: none");fQ.mover=fw("div",[fw("div",[fQ.lineSpace],"CodeMirror-lines")],null,"position: relative");fQ.sizer=fw("div",[fQ.mover],"CodeMirror-sizer");fQ.heightForcer=fw("div",null,null,"position: absolute; height: "+ba+"px; width: 1px;");fQ.gutters=fw("div",null,"CodeMirror-gutters");fQ.lineGutter=null;fQ.scroller=fw("div",[fQ.sizer,fQ.heightForcer,fQ.gutters],"CodeMirror-scroll");fQ.scroller.setAttribute("tabIndex","-1");fQ.wrapper=fw("div",[fQ.inputDiv,fQ.scrollbarH,fQ.scrollbarV,fQ.scrollbarFiller,fQ.gutterFiller,fQ.scroller],"CodeMirror");if(b1){fQ.gutters.style.zIndex=-1;fQ.scroller.style.paddingRight=0}if(eD){fO.style.width="0px"}if(!cJ){fQ.scroller.draggable=true}if(a1){fQ.inputDiv.style.height="1px";fQ.inputDiv.style.position="absolute"}if(b1){fQ.scrollbarH.style.minHeight=fQ.scrollbarV.style.minWidth="18px"}if(fN.appendChild){fN.appendChild(fQ.wrapper)}else{fN(fQ.wrapper)}fQ.viewFrom=fQ.viewTo=fP.first;fQ.view=[];fQ.externalMeasured=null;fQ.viewOffset=0;fQ.lastSizeC=0;fQ.updateLineNumbers=null;fQ.lineNumWidth=fQ.lineNumInnerWidth=fQ.lineNumChars=null;fQ.prevInput="";fQ.alignWidgets=false;fQ.pollingFast=false;fQ.poll=new fM();fQ.cachedCharWidth=fQ.cachedTextHeight=fQ.cachedPaddingH=null;fQ.inaccurateSelection=false;fQ.maxLine=null;fQ.maxLineLength=0;fQ.maxLineChanged=false;fQ.wheelDX=fQ.wheelDY=fQ.wheelStartX=fQ.wheelStartY=null;fQ.shift=false;fQ.selForContextMenu=null}function bh(fN){fN.doc.mode=I.getMode(fN.options,fN.doc.modeOption);dX(fN)}function dX(fN){fN.doc.iter(function(fO){if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}});fN.doc.frontier=fN.doc.first;dR(fN,100);fN.state.modeGen++;if(fN.curOp){af(fN)}}function ek(fN){if(fN.options.lineWrapping){fb(fN.display.wrapper,"CodeMirror-wrap");fN.display.sizer.style.minWidth=""}else{g(fN.display.wrapper,"CodeMirror-wrap");h(fN)}X(fN);af(fN);ai(fN);setTimeout(function(){eB(fN)},100)}function a3(fN){var fP=aN(fN.display),fO=fN.options.lineWrapping;var fQ=fO&&Math.max(5,fN.display.scroller.clientWidth/di(fN.display)-3);return function(fS){if(e7(fN.doc,fS)){return 0}var fR=0;if(fS.widgets){for(var fT=0;fT<fS.widgets.length;fT++){if(fS.widgets[fT].height){fR+=fS.widgets[fT].height}}}if(fO){return fR+(Math.ceil(fS.text.length/fQ)||1)*fP}else{return fR+fP}}}function X(fN){var fP=fN.doc,fO=a3(fN);fP.iter(function(fQ){var fR=fO(fQ);if(fR!=fQ.height){fA(fQ,fR)}})}function fK(fN){var fP=eK[fN.options.keyMap],fO=fP.style;fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-keymap-\S+/g,"")+(fO?" cm-keymap-"+fO:"")}function cB(fN){fN.display.wrapper.className=fN.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+fN.options.theme.replace(/(^|\s)\s*/g," cm-s-");ai(fN)}function db(fN){dO(fN);af(fN);setTimeout(function(){ei(fN)},20)}function dO(fN){var fO=fN.display.gutters,fS=fN.options.gutters;dE(fO);for(var fP=0;fP<fS.length;++fP){var fQ=fS[fP];var fR=fO.appendChild(fw("div",null,"CodeMirror-gutter "+fQ));if(fQ=="CodeMirror-linenumbers"){fN.display.lineGutter=fR;fR.style.width=(fN.display.lineNumWidth||1)+"px"}}fO.style.display=fP?"":"none";cN(fN)}function cN(fN){var fO=fN.display.gutters.offsetWidth;fN.display.sizer.style.marginLeft=fO+"px";fN.display.scrollbarH.style.left=fN.options.fixedGutter?fO+"px":0}function dY(fP){if(fP.height==0){return 0}var fO=fP.text.length,fN,fR=fP;while(fN=er(fR)){var fQ=fN.find(0,true);fR=fQ.from.line;fO+=fQ.from.ch-fQ.to.ch}fR=fP;while(fN=d7(fR)){var fQ=fN.find(0,true);fO-=fR.text.length-fQ.from.ch;fR=fQ.to.line;fO+=fR.text.length-fQ.to.ch}return fO}function h(fN){var fP=fN.display,fO=fN.doc;fP.maxLine=eP(fO,fO.first);fP.maxLineLength=dY(fP.maxLine);fP.maxLineChanged=true;fO.iter(function(fR){var fQ=dY(fR);if(fQ>fP.maxLineLength){fP.maxLineLength=fQ;fP.maxLine=fR}})}function b4(fN){var fO=c1(fN.gutters,"CodeMirror-linenumbers");if(fO==-1&&fN.lineNumbers){fN.gutters=fN.gutters.concat(["CodeMirror-linenumbers"])}else{if(fO>-1&&!fN.lineNumbers){fN.gutters=fN.gutters.slice(0);fN.gutters.splice(fO,1)}}}function df(fO){var fN=fO.display.scroller;return{clientHeight:fN.clientHeight,barHeight:fO.display.scrollbarV.clientHeight,scrollWidth:fN.scrollWidth,clientWidth:fN.clientWidth,barWidth:fO.display.scrollbarH.clientWidth,docHeight:Math.round(fO.doc.height+bx(fO.display))}}function eB(fN,fS){if(!fS){fS=df(fN)}var fU=fN.display;var fR=fS.docHeight+ba;var fT=fS.scrollWidth>fS.clientWidth;var fP=fR>fS.clientHeight;if(fP){fU.scrollbarV.style.display="block";fU.scrollbarV.style.bottom=fT?l(fU.measure)+"px":"0";fU.scrollbarV.firstChild.style.height=Math.max(0,fR-fS.clientHeight+(fS.barHeight||fU.scrollbarV.clientHeight))+"px"}else{fU.scrollbarV.style.display="";fU.scrollbarV.firstChild.style.height="0"}if(fT){fU.scrollbarH.style.display="block";fU.scrollbarH.style.right=fP?l(fU.measure)+"px":"0";fU.scrollbarH.firstChild.style.width=(fS.scrollWidth-fS.clientWidth+(fS.barWidth||fU.scrollbarH.clientWidth))+"px"}else{fU.scrollbarH.style.display="";fU.scrollbarH.firstChild.style.width="0"}if(fT&&fP){fU.scrollbarFiller.style.display="block";fU.scrollbarFiller.style.height=fU.scrollbarFiller.style.width=l(fU.measure)+"px"}else{fU.scrollbarFiller.style.display=""}if(fT&&fN.options.coverGutterNextToScrollbar&&fN.options.fixedGutter){fU.gutterFiller.style.display="block";fU.gutterFiller.style.height=l(fU.measure)+"px";fU.gutterFiller.style.width=fU.gutters.offsetWidth+"px"}else{fU.gutterFiller.style.display=""}if(!fN.state.checkedOverlayScrollbar&&fS.clientHeight>0){if(l(fU.measure)===0){var fO=bU&&!cP?"12px":"18px";fU.scrollbarV.style.minWidth=fU.scrollbarH.style.minHeight=fO;var fQ=function(fV){if(L(fV)!=fU.scrollbarV&&L(fV)!=fU.scrollbarH){cL(fN,d5)(fV)}};bM(fU.scrollbarV,"mousedown",fQ);bM(fU.scrollbarH,"mousedown",fQ)}fN.state.checkedOverlayScrollbar=true}}function bT(fP,fT,fV){var fQ=fV&&fV.top!=null?fV.top:fP.scroller.scrollTop;fQ=Math.floor(fQ-eI(fP));var fN=fV&&fV.bottom!=null?fV.bottom:fQ+fP.wrapper.clientHeight;var fR=bv(fT,fQ),fS=bv(fT,fN);if(fV&&fV.ensure){var fO=fV.ensure.from.line,fU=fV.ensure.to.line;if(fO<fR){return{from:fO,to:bv(fT,bB(eP(fT,fO))+fP.wrapper.clientHeight)}}if(Math.min(fU,fT.lastLine())>=fS){return{from:bv(fT,bB(eP(fT,fU))-fP.wrapper.clientHeight),to:fU}}}return{from:fR,to:fS}}function ei(fV){var fT=fV.display,fU=fT.view;if(!fT.alignWidgets&&(!fT.gutters.firstChild||!fV.options.fixedGutter)){return}var fR=dA(fT)-fT.scroller.scrollLeft+fV.doc.scrollLeft;var fN=fT.gutters.offsetWidth,fO=fR+"px";for(var fQ=0;fQ<fU.length;fQ++){if(!fU[fQ].hidden){if(fV.options.fixedGutter&&fU[fQ].gutter){fU[fQ].gutter.style.left=fO}var fS=fU[fQ].alignable;if(fS){for(var fP=0;fP<fS.length;fP++){fS[fP].style.left=fO}}}}if(fV.options.fixedGutter){fT.gutters.style.left=(fR+fN)+"px"}}function dI(fN){if(!fN.options.lineNumbers){return false}var fS=fN.doc,fO=d4(fN.options,fS.first+fS.size-1),fR=fN.display;if(fO.length!=fR.lineNumChars){var fT=fR.measure.appendChild(fw("div",[fw("div",fO)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var fP=fT.firstChild.offsetWidth,fQ=fT.offsetWidth-fP;fR.lineGutter.style.width="";fR.lineNumInnerWidth=Math.max(fP,fR.lineGutter.offsetWidth-fQ);fR.lineNumWidth=fR.lineNumInnerWidth+fQ;fR.lineNumChars=fR.lineNumInnerWidth?fO.length:-1;fR.lineGutter.style.width=fR.lineNumWidth+"px";cN(fN);return true}return false}function d4(fN,fO){return String(fN.lineNumberFormatter(fO+fN.firstLineNumber))}function dA(fN){return fN.scroller.getBoundingClientRect().left-fN.sizer.getBoundingClientRect().left}function dp(fS,fV,fW){var fU=fS.display.viewFrom,fT=fS.display.viewTo,fQ;var fN=bT(fS.display,fS.doc,fV);for(var fP=true;;fP=false){var fO=fS.display.scroller.clientWidth;if(!cZ(fS,fN,fW)){break}fQ=true;if(fS.display.maxLineChanged&&!fS.options.lineWrapping){b(fS)}var fR=df(fS);br(fS);de(fS,fR);eB(fS,fR);if(cJ&&fS.options.lineWrapping){fz(fS,fR)}if(fP&&fS.options.lineWrapping&&fO!=fS.display.scroller.clientWidth){fW=true;continue}fW=false;if(fV&&fV.top!=null){fV={top:Math.min(fR.docHeight-ba-fR.clientHeight,fV.top)}}fN=bT(fS.display,fS.doc,fV);if(fN.from>=fS.display.viewFrom&&fN.to<=fS.display.viewTo){break}}fS.display.updateLineNumbers=null;if(fQ){ac(fS,"update",fS);if(fS.display.viewFrom!=fU||fS.display.viewTo!=fT){ac(fS,"viewportChange",fS,fS.display.viewFrom,fS.display.viewTo)}}return fQ}function cZ(fX,fP,fY){var fR=fX.display,fW=fX.doc;if(!fR.wrapper.offsetWidth){d9(fX);return}if(!fY&&fP.from>=fR.viewFrom&&fP.to<=fR.viewTo&&cU(fX)==0){return}if(dI(fX)){d9(fX)}var fV=eM(fX);var fQ=fW.first+fW.size;var fU=Math.max(fP.from-fX.options.viewportMargin,fW.first);var fT=Math.min(fQ,fP.to+fX.options.viewportMargin);if(fR.viewFrom<fU&&fU-fR.viewFrom<20){fU=Math.max(fW.first,fR.viewFrom)}if(fR.viewTo>fT&&fR.viewTo-fT<20){fT=Math.min(fQ,fR.viewTo)}if(aX){fU=aM(fX.doc,fU);fT=dG(fX.doc,fT)}var fO=fU!=fR.viewFrom||fT!=fR.viewTo||fR.lastSizeC!=fR.wrapper.clientHeight;cD(fX,fU,fT);fR.viewOffset=bB(eP(fX.doc,fR.viewFrom));fX.display.mover.style.top=fR.viewOffset+"px";var fN=cU(fX);if(!fO&&fN==0&&!fY){return}var fS=ds();if(fN>4){fR.lineDiv.style.display="none"}cc(fX,fR.updateLineNumbers,fV);if(fN>4){fR.lineDiv.style.display=""}if(fS&&ds()!=fS&&fS.offsetHeight){fS.focus()}dE(fR.cursorDiv);dE(fR.selectionDiv);if(fO){fR.lastSizeC=fR.wrapper.clientHeight;dR(fX,400)}aZ(fX);return true}function b(fN){var fR=fN.display;var fP=dT(fN,fR.maxLine,fR.maxLine.text.length).left;fR.maxLineChanged=false;var fO=Math.max(0,fP+3);var fQ=Math.max(0,fR.sizer.offsetLeft+fO+ba-fR.scroller.clientWidth);fR.sizer.style.minWidth=fO+"px";if(fQ<fN.doc.scrollLeft){bt(fN,Math.min(fR.scroller.scrollLeft,fQ),true)}}function de(fN,fO){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top=fO.docHeight+"px";fN.display.gutters.style.height=Math.max(fO.docHeight,fO.clientHeight-ba)+"px"}function fz(fN,fO){if(fN.display.sizer.offsetWidth+fN.display.gutters.offsetWidth<fN.display.scroller.clientWidth-1){fN.display.sizer.style.minHeight=fN.display.heightForcer.style.top="0px";fN.display.gutters.style.height=fO.docHeight+"px"}}function aZ(fU){var fS=fU.display;var fO=fS.lineDiv.offsetTop;for(var fP=0;fP<fS.view.length;fP++){var fV=fS.view[fP],fW;if(fV.hidden){continue}if(b1){var fR=fV.node.offsetTop+fV.node.offsetHeight;fW=fR-fO;fO=fR}else{var fQ=fV.node.getBoundingClientRect();fW=fQ.bottom-fQ.top}var fT=fV.line.height-fW;if(fW<2){fW=aN(fS)}if(fT>0.001||fT<-0.001){fA(fV.line,fW);b0(fV.line);if(fV.rest){for(var fN=0;fN<fV.rest.length;fN++){b0(fV.rest[fN])}}}}}function b0(fN){if(fN.widgets){for(var fO=0;fO<fN.widgets.length;++fO){fN.widgets[fO].height=fN.widgets[fO].node.offsetHeight}}}function eM(fN){var fR=fN.display,fQ={},fP={};for(var fS=fR.gutters.firstChild,fO=0;fS;fS=fS.nextSibling,++fO){fQ[fN.options.gutters[fO]]=fS.offsetLeft;fP[fN.options.gutters[fO]]=fS.offsetWidth}return{fixedPos:dA(fR),gutterTotalWidth:fR.gutters.offsetWidth,gutterLeft:fQ,gutterWidth:fP,wrapperWidth:fR.wrapper.clientWidth}}function cc(fY,fP,fX){var fU=fY.display,f0=fY.options.lineNumbers;var fN=fU.lineDiv,fZ=fN.firstChild;function fT(f2){var f1=f2.nextSibling;if(cJ&&bU&&fY.display.currentWheelTarget==f2){f2.style.display="none"}else{f2.parentNode.removeChild(f2)}return f1}var fV=fU.view,fS=fU.viewFrom;for(var fQ=0;fQ<fV.length;fQ++){var fR=fV[fQ];if(fR.hidden){}else{if(!fR.node){var fO=aA(fY,fR,fS,fX);fN.insertBefore(fO,fZ)}else{while(fZ!=fR.node){fZ=fT(fZ)}var fW=f0&&fP!=null&&fP<=fS&&fR.lineNumber;if(fR.changes){if(c1(fR.changes,"gutter")>-1){fW=false}Z(fY,fR,fS,fX)}if(fW){dE(fR.lineNumber);fR.lineNumber.appendChild(document.createTextNode(d4(fY.options,fS)))}fZ=fR.node.nextSibling}}fS+=fR.size}while(fZ){fZ=fT(fZ)}}function Z(fN,fP,fR,fS){for(var fO=0;fO<fP.changes.length;fO++){var fQ=fP.changes[fO];if(fQ=="text"){eV(fN,fP)}else{if(fQ=="gutter"){cY(fN,fP,fR,fS)}else{if(fQ=="class"){dl(fP)}else{if(fQ=="widget"){al(fP,fS)}}}}}fP.changes=null}function fi(fN){if(fN.node==fN.text){fN.node=fw("div",null,null,"position: relative");if(fN.text.parentNode){fN.text.parentNode.replaceChild(fN.node,fN.text)}fN.node.appendChild(fN.text);if(b1){fN.node.style.zIndex=2}}return fN.node}function d6(fO){var fN=fO.bgClass?fO.bgClass+" "+(fO.line.bgClass||""):fO.line.bgClass;if(fN){fN+=" CodeMirror-linebackground"}if(fO.background){if(fN){fO.background.className=fN}else{fO.background.parentNode.removeChild(fO.background);fO.background=null}}else{if(fN){var fP=fi(fO);fO.background=fP.insertBefore(fw("div",null,fN),fP.firstChild)}}}function dy(fN,fO){var fP=fN.display.externalMeasured;if(fP&&fP.line==fO.line){fN.display.externalMeasured=null;fO.measure=fP.measure;return fP.built}return ev(fN,fO)}function eV(fN,fQ){var fO=fQ.text.className;var fP=dy(fN,fQ);if(fQ.text==fQ.node){fQ.node=fP.pre}fQ.text.parentNode.replaceChild(fP.pre,fQ.text);fQ.text=fP.pre;if(fP.bgClass!=fQ.bgClass||fP.textClass!=fQ.textClass){fQ.bgClass=fP.bgClass;fQ.textClass=fP.textClass;dl(fQ)}else{if(fO){fQ.text.className=fO}}}function dl(fO){d6(fO);if(fO.line.wrapClass){fi(fO).className=fO.line.wrapClass}else{if(fO.node!=fO.text){fO.node.className=""}}var fN=fO.textClass?fO.textClass+" "+(fO.line.textClass||""):fO.line.textClass;fO.text.className=fN||""}function cY(fV,fT,fS,fU){if(fT.gutter){fT.node.removeChild(fT.gutter);fT.gutter=null}var fQ=fT.line.gutterMarkers;if(fV.options.lineNumbers||fQ){var fO=fi(fT);var fR=fT.gutter=fO.insertBefore(fw("div",null,"CodeMirror-gutter-wrapper","position: absolute; left: "+(fV.options.fixedGutter?fU.fixedPos:-fU.gutterTotalWidth)+"px"),fT.text);if(fV.options.lineNumbers&&(!fQ||!fQ["CodeMirror-linenumbers"])){fT.lineNumber=fR.appendChild(fw("div",d4(fV.options,fS),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+fU.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+fV.display.lineNumInnerWidth+"px"))}if(fQ){for(var fP=0;fP<fV.options.gutters.length;++fP){var fN=fV.options.gutters[fP],fW=fQ.hasOwnProperty(fN)&&fQ[fN];if(fW){fR.appendChild(fw("div",[fW],"CodeMirror-gutter-elt","left: "+fU.gutterLeft[fN]+"px; width: "+fU.gutterWidth[fN]+"px"))}}}}}function al(fN,fQ){if(fN.alignable){fN.alignable=null}for(var fP=fN.node.firstChild,fO;fP;fP=fO){var fO=fP.nextSibling;if(fP.className=="CodeMirror-linewidget"){fN.node.removeChild(fP)}}e4(fN,fQ)}function aA(fN,fP,fQ,fR){var fO=dy(fN,fP);fP.text=fP.node=fO.pre;if(fO.bgClass){fP.bgClass=fO.bgClass}if(fO.textClass){fP.textClass=fO.textClass}dl(fP);cY(fN,fP,fQ,fR);e4(fP,fR);return fP.node}function e4(fO,fP){fB(fO.line,fO,fP,true);if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fB(fO.rest[fN],fO,fP,false)}}}function fB(fV,fS,fU,fQ){if(!fV.widgets){return}var fN=fi(fS);for(var fP=0,fT=fV.widgets;fP<fT.length;++fP){var fR=fT[fP],fO=fw("div",[fR.node],"CodeMirror-linewidget");if(!fR.handleMouseEvents){fO.ignoreEvents=true}bu(fR,fO,fS,fU);if(fQ&&fR.above){fN.insertBefore(fO,fS.gutter||fS.text)}else{fN.appendChild(fO)}ac(fR,"redraw")}}function bu(fQ,fP,fN,fR){if(fQ.noHScroll){(fN.alignable||(fN.alignable=[])).push(fP);var fO=fR.wrapperWidth;fP.style.left=fR.fixedPos+"px";if(!fQ.coverGutter){fO-=fR.gutterTotalWidth;fP.style.paddingLeft=fR.gutterTotalWidth+"px"}fP.style.width=fO+"px"}if(fQ.coverGutter){fP.style.zIndex=5;fP.style.position="relative";if(!fQ.noHScroll){fP.style.marginLeft=-fR.gutterTotalWidth+"px"}}}var W=I.Pos=function(fN,fO){if(!(this instanceof W)){return new W(fN,fO)}this.line=fN;this.ch=fO};var b5=I.cmpPos=function(fO,fN){return fO.line-fN.line||fO.ch-fN.ch};function b9(fN){return W(fN.line,fN.ch)}function bn(fO,fN){return b5(fO,fN)<0?fN:fO}function am(fO,fN){return b5(fO,fN)<0?fO:fN}function fx(fN,fO){this.ranges=fN;this.primIndex=fO}fx.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(fN){if(fN==this){return true}if(fN.primIndex!=this.primIndex||fN.ranges.length!=this.ranges.length){return false}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP],fQ=fN.ranges[fP];if(b5(fO.anchor,fQ.anchor)!=0||b5(fO.head,fQ.head)!=0){return false}}return true},deepCopy:function(){for(var fN=[],fO=0;fO<this.ranges.length;fO++){fN[fO]=new dB(b9(this.ranges[fO].anchor),b9(this.ranges[fO].head))}return new fx(fN,this.primIndex)},somethingSelected:function(){for(var fN=0;fN<this.ranges.length;fN++){if(!this.ranges[fN].empty()){return true}}return false},contains:function(fQ,fN){if(!fN){fN=fQ}for(var fP=0;fP<this.ranges.length;fP++){var fO=this.ranges[fP];if(b5(fN,fO.from())>=0&&b5(fQ,fO.to())<=0){return fP}}return -1}};function dB(fN,fO){this.anchor=fN;this.head=fO}dB.prototype={from:function(){return am(this.anchor,this.head)},to:function(){return bn(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function cm(fN,fU){var fP=fN[fU];fN.sort(function(fX,fW){return b5(fX.from(),fW.from())});fU=c1(fN,fP);for(var fR=1;fR<fN.length;fR++){var fV=fN[fR],fO=fN[fR-1];if(b5(fO.to(),fV.from())>=0){var fS=am(fO.from(),fV.from()),fT=bn(fO.to(),fV.to());var fQ=fO.empty()?fV.from()==fV.head:fO.from()==fO.head;if(fR<=fU){--fU}fN.splice(--fR,2,new dB(fQ?fT:fS,fQ?fS:fT))}}return new fx(fN,fU)}function eu(fN,fO){return new fx([new dB(fN,fO||fN)],0)}function cO(fN,fO){return Math.max(fN.first,Math.min(fO,fN.first+fN.size-1))}function fj(fO,fP){if(fP.line<fO.first){return W(fO.first,0)}var fN=fO.first+fO.size-1;if(fP.line>fN){return W(fN,eP(fO,fN).text.length)}return e3(fP,eP(fO,fP.line).text.length)}function e3(fP,fO){var fN=fP.ch;if(fN==null||fN>fO){return W(fP.line,fO)}else{if(fN<0){return W(fP.line,0)}else{return fP}}}function bW(fO,fN){return fN>=fO.first&&fN<fO.first+fO.size}function dC(fP,fQ){for(var fN=[],fO=0;fO<fQ.length;fO++){fN[fO]=fj(fP,fQ[fO])}return fN}function e6(fS,fO,fR,fN){if(fS.cm&&fS.cm.display.shift||fS.extend){var fQ=fO.anchor;if(fN){var fP=b5(fR,fQ)<0;if(fP!=(b5(fN,fQ)<0)){fQ=fR;fR=fN}else{if(fP!=(b5(fR,fN)<0)){fR=fN}}}return new dB(fQ,fR)}else{return new dB(fN||fR,fR)}}function ft(fQ,fP,fN,fO){bJ(fQ,new fx([e6(fQ,fQ.sel.primary(),fP,fN)],0),fO)}function at(fS,fR,fP){for(var fO=[],fQ=0;fQ<fS.sel.ranges.length;fQ++){fO[fQ]=e6(fS,fS.sel.ranges[fQ],fR[fQ],null)}var fN=cm(fO,fS.sel.primIndex);bJ(fS,fN,fP)}function f(fR,fQ,fO,fP){var fN=fR.sel.ranges.slice(0);fN[fQ]=fO;bJ(fR,cm(fN,fR.sel.primIndex),fP)}function G(fQ,fO,fP,fN){bJ(fQ,eu(fO,fP),fN)}function d(fP,fN){var fO={ranges:fN.ranges,update:function(fQ){this.ranges=[];for(var fR=0;fR<fQ.length;fR++){this.ranges[fR]=new dB(fj(fP,fQ[fR].anchor),fj(fP,fQ[fR].head))}}};az(fP,"beforeSelectionChange",fP,fO);if(fP.cm){az(fP.cm,"beforeSelectionChange",fP.cm,fO)}if(fO.ranges!=fN.ranges){return cm(fO.ranges,fO.ranges.length-1)}else{return fN}}function eH(fR,fQ,fO){var fN=fR.history.done,fP=fh(fN);if(fP&&fP.ranges){fN[fN.length-1]=fQ;d1(fR,fQ,fO)}else{bJ(fR,fQ,fO)}}function bJ(fP,fO,fN){d1(fP,fO,fN);fG(fP,fP.sel,fP.cm?fP.cm.curOp.id:NaN,fN)}function d1(fQ,fP,fO){if(eS(fQ,"beforeSelectionChange")||fQ.cm&&eS(fQ.cm,"beforeSelectionChange")){fP=d(fQ,fP)}var fN=b5(fP.primary().head,fQ.sel.primary().head)<0?-1:1;cS(fQ,o(fQ,fP,fN,true));if(!(fO&&fO.scroll===false)&&fQ.cm){fg(fQ.cm)}}function cS(fO,fN){if(fN.equals(fO.sel)){return}fO.sel=fN;if(fO.cm){fO.cm.curOp.updateInput=fO.cm.curOp.selectionChanged=true;V(fO.cm)}ac(fO,"cursorActivity",fO)}function ea(fN){cS(fN,o(fN,fN.sel,null,false),Y)}function o(fV,fN,fS,fT){var fP;for(var fQ=0;fQ<fN.ranges.length;fQ++){var fR=fN.ranges[fQ];var fU=bK(fV,fR.anchor,fS,fT);var fO=bK(fV,fR.head,fS,fT);if(fP||fU!=fR.anchor||fO!=fR.head){if(!fP){fP=fN.ranges.slice(0,fQ)}fP[fQ]=new dB(fU,fO)}}return fP?cm(fP,fN.primIndex):fN}function bK(fW,fV,fS,fT){var fX=false,fP=fV;var fQ=fS||1;fW.cantEdit=false;search:for(;;){var fY=eP(fW,fP.line);if(fY.markedSpans){for(var fR=0;fR<fY.markedSpans.length;++fR){var fN=fY.markedSpans[fR],fO=fN.marker;if((fN.from==null||(fO.inclusiveLeft?fN.from<=fP.ch:fN.from<fP.ch))&&(fN.to==null||(fO.inclusiveRight?fN.to>=fP.ch:fN.to>fP.ch))){if(fT){az(fO,"beforeCursorEnter");if(fO.explicitlyCleared){if(!fY.markedSpans){break}else{--fR;continue}}}if(!fO.atomic){continue}var fU=fO.find(fQ<0?-1:1);if(b5(fU,fP)==0){fU.ch+=fQ;if(fU.ch<0){if(fU.line>fW.first){fU=fj(fW,W(fU.line-1))}else{fU=null}}else{if(fU.ch>fY.text.length){if(fU.line<fW.first+fW.size-1){fU=W(fU.line+1,0)}else{fU=null}}}if(!fU){if(fX){if(!fT){return bK(fW,fV,fS,true)}fW.cantEdit=true;return W(fW.first,0)}fX=true;fU=fV;fQ=-fQ}}fP=fU;continue search}}}return fP}}function br(fZ){var fU=fZ.display,fY=fZ.doc;var fW=document.createDocumentFragment();var fQ=document.createDocumentFragment();for(var fS=0;fS<fY.sel.ranges.length;fS++){var fT=fY.sel.ranges[fS];var fR=fT.empty();if(fR||fZ.options.showCursorWhenSelecting){B(fZ,fT,fW)}if(!fR){bs(fZ,fT,fQ)}}if(fZ.options.moveInputWithCursor){var fV=dx(fZ,fY.sel.primary().head,"div");var fN=fU.wrapper.getBoundingClientRect(),fP=fU.lineDiv.getBoundingClientRect();var fX=Math.max(0,Math.min(fU.wrapper.clientHeight-10,fV.top+fP.top-fN.top));var fO=Math.max(0,Math.min(fU.wrapper.clientWidth-10,fV.left+fP.left-fN.left));fU.inputDiv.style.top=fX+"px";fU.inputDiv.style.left=fO+"px"}bG(fU.cursorDiv,fW);bG(fU.selectionDiv,fQ)}function B(fN,fQ,fP){var fS=dx(fN,fQ.head,"div");var fR=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor"));fR.style.left=fS.left+"px";fR.style.top=fS.top+"px";fR.style.height=Math.max(0,fS.bottom-fS.top)*fN.options.cursorHeight+"px";if(fS.other){var fO=fP.appendChild(fw("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));fO.style.display="";fO.style.left=fS.other.left+"px";fO.style.top=fS.other.top+"px";fO.style.height=(fS.other.bottom-fS.other.top)*0.85+"px"}}function bs(fR,fX,fS){var f0=fR.display,f4=fR.doc;var fN=document.createDocumentFragment();var fW=eG(fR.display),fQ=fW.left,f1=f0.lineSpace.offsetWidth-fW.right;function fY(f8,f7,f6,f5){if(f7<0){f7=0}f7=Math.round(f7);f5=Math.round(f5);fN.appendChild(fw("div",null,"CodeMirror-selected","position: absolute; left: "+f8+"px; top: "+f7+"px; width: "+(f6==null?f1-f8:f6)+"px; height: "+(f5-f7)+"px"))}function fO(f6,f8,gb){var f7=eP(f4,f6);var f9=f7.text.length;var gc,f5;function ga(ge,gd){return cx(fR,W(f6,ge),"div",f7,gd)}dH(a(f7),f8||0,gb==null?f9:gb,function(gk,gj,gd){var gg=ga(gk,"left"),gh,gi,gf;if(gk==gj){gh=gg;gi=gf=gg.left}else{gh=ga(gj-1,"right");if(gd=="rtl"){var ge=gg;gg=gh;gh=ge}gi=gg.left;gf=gh.right}if(f8==null&&gk==0){gi=fQ}if(gh.top-gg.top>3){fY(gi,gg.top,null,gg.bottom);gi=fQ;if(gg.bottom<gh.top){fY(gi,gg.bottom,null,gh.top)}}if(gb==null&&gj==f9){gf=f1}if(!gc||gg.top<gc.top||gg.top==gc.top&&gg.left<gc.left){gc=gg}if(!f5||gh.bottom>f5.bottom||gh.bottom==f5.bottom&&gh.right>f5.right){f5=gh}if(gi<fQ+1){gi=fQ}fY(gi,gh.top,gf-gi,gh.bottom)});return{start:gc,end:f5}}var f3=fX.from(),f2=fX.to();if(f3.line==f2.line){fO(f3.line,f3.ch,f2.ch)}else{var fP=eP(f4,f3.line),fU=eP(f4,f2.line);var fT=z(fP)==z(fU);var fV=fO(f3.line,f3.ch,fT?fP.text.length+1:null).end;var fZ=fO(f2.line,fT?0:null,f2.ch).start;if(fT){if(fV.top<fZ.top-2){fY(fV.right,fV.top,null,fV.bottom);fY(fQ,fZ.top,fZ.left,fZ.bottom)}else{fY(fV.right,fV.top,fZ.left-fV.right,fV.bottom)}}if(fV.bottom<fZ.top){fY(fQ,fV.bottom,null,fZ.top)}}fS.appendChild(fN)}function p(fN){if(!fN.state.focused){return}var fP=fN.display;clearInterval(fP.blinker);var fO=true;fP.cursorDiv.style.visibility="";if(fN.options.cursorBlinkRate>0){fP.blinker=setInterval(function(){fP.cursorDiv.style.visibility=(fO=!fO)?"":"hidden"},fN.options.cursorBlinkRate)}}function dR(fN,fO){if(fN.doc.mode.startState&&fN.doc.frontier<fN.display.viewTo){fN.state.highlight.set(fO,cl(cC,fN))}}function cC(fN){var fQ=fN.doc;if(fQ.frontier<fQ.first){fQ.frontier=fQ.first}if(fQ.frontier>=fN.display.viewTo){return}var fO=+new Date+fN.options.workTime;var fP=bR(fQ.mode,dg(fN,fQ.frontier));cz(fN,function(){fQ.iter(fQ.frontier,Math.min(fQ.first+fQ.size,fN.display.viewTo+500),function(fR){if(fQ.frontier>=fN.display.viewFrom){var fT=fR.styles;var fU=fa(fN,fR,fP,true);fR.styles=fU.styles;if(fU.classes){fR.styleClasses=fU.classes}else{if(fR.styleClasses){fR.styleClasses=null}}var fV=!fT||fT.length!=fR.styles.length;for(var fS=0;!fV&&fS<fT.length;++fS){fV=fT[fS]!=fR.styles[fS]}if(fV){R(fN,fQ.frontier,"text")}fR.stateAfter=bR(fQ.mode,fP)}else{dc(fN,fR.text,fP);fR.stateAfter=fQ.frontier%5==0?bR(fQ.mode,fP):null}++fQ.frontier;if(+new Date>fO){dR(fN,fN.options.workDelay);return true}})})}function co(fT,fN,fQ){var fO,fR,fS=fT.doc;var fP=fQ?-1:fN-(fT.doc.mode.innerMode?1000:100);for(var fW=fN;fW>fP;--fW){if(fW<=fS.first){return fS.first}var fV=eP(fS,fW-1);if(fV.stateAfter&&(!fQ||fW<=fS.frontier)){return fW}var fU=bI(fV.text,null,fT.options.tabSize);if(fR==null||fO>fU){fR=fW-1;fO=fU}}return fR}function dg(fN,fT,fO){var fR=fN.doc,fQ=fN.display;if(!fR.mode.startState){return true}var fS=co(fN,fT,fO),fP=fS>fR.first&&eP(fR,fS-1).stateAfter;if(!fP){fP=bP(fR.mode)}else{fP=bR(fR.mode,fP)}fR.iter(fS,fT,function(fU){dc(fN,fU.text,fP);var fV=fS==fT-1||fS%5==0||fS>=fQ.viewFrom&&fS<fQ.viewTo;fU.stateAfter=fV?bR(fR.mode,fP):null;++fS});if(fO){fR.frontier=fS}return fP}function eI(fN){return fN.lineSpace.offsetTop}function bx(fN){return fN.mover.offsetHeight-fN.lineSpace.offsetHeight}function eG(fQ){if(fQ.cachedPaddingH){return fQ.cachedPaddingH}var fP=bG(fQ.measure,fw("pre","x"));var fN=window.getComputedStyle?window.getComputedStyle(fP):fP.currentStyle;var fO={left:parseInt(fN.paddingLeft),right:parseInt(fN.paddingRight)};if(!isNaN(fO.left)&&!isNaN(fO.right)){fQ.cachedPaddingH=fO}return fO}function b8(fU,fQ,fT){var fP=fU.options.lineWrapping;var fR=fP&&fU.display.scroller.clientWidth;if(!fQ.measure.heights||fP&&fQ.measure.width!=fR){var fS=fQ.measure.heights=[];if(fP){fQ.measure.width=fR;var fW=fQ.text.firstChild.getClientRects();for(var fN=0;fN<fW.length-1;fN++){var fV=fW[fN],fO=fW[fN+1];if(Math.abs(fV.bottom-fO.bottom)>2){fS.push((fV.bottom+fO.top)/2-fT.top)}}}fS.push(fT.bottom-fT.top)}}function cj(fP,fN,fQ){if(fP.line==fN){return{map:fP.measure.map,cache:fP.measure.cache}}for(var fO=0;fO<fP.rest.length;fO++){if(fP.rest[fO]==fN){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO]}}}for(var fO=0;fO<fP.rest.length;fO++){if(bC(fP.rest[fO])>fQ){return{map:fP.measure.maps[fO],cache:fP.measure.caches[fO],before:true}}}}function cK(fN,fP){fP=z(fP);var fR=bC(fP);var fO=fN.display.externalMeasured=new bl(fN.doc,fP,fR);fO.lineN=fR;var fQ=fO.built=ev(fN,fO);fO.text=fQ.pre;bG(fN.display.lineMeasure,fQ.pre);return fO}function dT(fN,fO,fQ,fP){return D(fN,aU(fN,fO),fQ,fP)}function eL(fN,fP){if(fP>=fN.display.viewFrom&&fP<fN.display.viewTo){return fN.display.view[c7(fN,fP)]}var fO=fN.display.externalMeasured;if(fO&&fP>=fO.lineN&&fP<fO.lineN+fO.size){return fO}}function aU(fN,fP){var fQ=bC(fP);var fO=eL(fN,fQ);if(fO&&!fO.text){fO=null}else{if(fO&&fO.changes){Z(fN,fO,fQ,eM(fN))}}if(!fO){fO=cK(fN,fP)}var fR=cj(fO,fP,fQ);return{line:fP,view:fO,rect:null,map:fR.map,cache:fR.cache,before:fR.before,hasHeights:false}}function D(fN,fS,fQ,fO){if(fS.before){fQ=-1}var fP=fQ+(fO||""),fR;if(fS.cache.hasOwnProperty(fP)){fR=fS.cache[fP]}else{if(!fS.rect){fS.rect=fS.view.text.getBoundingClientRect()}if(!fS.hasHeights){b8(fN,fS.view,fS.rect);fS.hasHeights=true}fR=k(fN,fS,fQ,fO);if(!fR.bogus){fS.cache[fP]=fR}}return{left:fR.left,right:fR.right,top:fR.top,bottom:fR.bottom}}var ee={left:0,right:0,top:0,bottom:0};function k(fU,f2,fW,fS){var f5=f2.map;var fZ,fR,fQ,fN;for(var f1=0;f1<f5.length;f1+=3){var f4=f5[f1],f0=f5[f1+1];if(fW<f4){fR=0;fQ=1;fN="left"}else{if(fW<f0){fR=fW-f4;fQ=fR+1}else{if(f1==f5.length-3||fW==f0&&f5[f1+3]>fW){fQ=f0-f4;fR=fQ-1;if(fW>=f0){fN="right"}}}}if(fR!=null){fZ=f5[f1+2];if(f4==f0&&fS==(fZ.insertLeft?"left":"right")){fN=fS}if(fS=="left"&&fR==0){while(f1&&f5[f1-2]==f5[f1-3]&&f5[f1-1].insertLeft){fZ=f5[(f1-=3)+2];fN="left"}}if(fS=="right"&&fR==f0-f4){while(f1<f5.length-3&&f5[f1+3]==f5[f1+4]&&!f5[f1+5].insertLeft){fZ=f5[(f1+=3)+2];fN="right"}}break}}var fO;if(fZ.nodeType==3){while(fR&&e0(f2.line.text.charAt(f4+fR))){--fR}while(f4+fQ<f0&&e0(f2.line.text.charAt(f4+fQ))){++fQ}if(bY&&fR==0&&fQ==f0-f4){fO=fZ.parentNode.getBoundingClientRect()}else{if(dn&&fU.options.lineWrapping){var fP=cb(fZ,fR,fQ).getClientRects();if(fP.length){fO=fP[fS=="right"?fP.length-1:0]}else{fO=ee}}else{fO=cb(fZ,fR,fQ).getBoundingClientRect()||ee}}}else{if(fR>0){fN=fS="right"}var fP;if(fU.options.lineWrapping&&(fP=fZ.getClientRects()).length>1){fO=fP[fS=="right"?fP.length-1:0]}else{fO=fZ.getBoundingClientRect()}}if(bY&&!fR&&(!fO||!fO.left&&!fO.right)){var fT=fZ.parentNode.getClientRects()[0];if(fT){fO={left:fT.left,right:fT.left+di(fU.display),top:fT.top,bottom:fT.bottom}}else{fO=ee}}var fY,fX=(fO.bottom+fO.top)/2-f2.rect.top;var f3=f2.view.measure.heights;for(var f1=0;f1<f3.length-1;f1++){if(fX<f3[f1]){break}}fY=f1?f3[f1-1]:0;fX=f3[f1];var fV={left:(fN=="right"?fO.right:fO.left)-f2.rect.left,right:(fN=="left"?fO.left:fO.right)-f2.rect.left,top:fY,bottom:fX};if(!fO.left&&!fO.right){fV.bogus=true}return fV}function ap(fO){if(fO.measure){fO.measure.cache={};fO.measure.heights=null;if(fO.rest){for(var fN=0;fN<fO.rest.length;fN++){fO.measure.caches[fN]={}}}}}function aF(fN){fN.display.externalMeasure=null;dE(fN.display.lineMeasure);for(var fO=0;fO<fN.display.view.length;fO++){ap(fN.display.view[fO])}}function ai(fN){aF(fN);fN.display.cachedCharWidth=fN.display.cachedTextHeight=fN.display.cachedPaddingH=null;if(!fN.options.lineWrapping){fN.display.maxLineChanged=true}fN.display.lineNumChars=null}function ck(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ci(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function et(fT,fQ,fS,fO){if(fQ.widgets){for(var fP=0;fP<fQ.widgets.length;++fP){if(fQ.widgets[fP].above){var fV=cH(fQ.widgets[fP]);fS.top+=fV;fS.bottom+=fV}}}if(fO=="line"){return fS}if(!fO){fO="local"}var fR=bB(fQ);if(fO=="local"){fR+=eI(fT.display)}else{fR-=fT.display.viewOffset}if(fO=="page"||fO=="window"){var fN=fT.display.lineSpace.getBoundingClientRect();fR+=fN.top+(fO=="window"?0:ci());var fU=fN.left+(fO=="window"?0:ck());fS.left+=fU;fS.right+=fU}fS.top+=fR;fS.bottom+=fR;return fS}function fJ(fO,fR,fP){if(fP=="div"){return fR}var fT=fR.left,fS=fR.top;if(fP=="page"){fT-=ck();fS-=ci()}else{if(fP=="local"||!fP){var fQ=fO.display.sizer.getBoundingClientRect();fT+=fQ.left;fS+=fQ.top}}var fN=fO.display.lineSpace.getBoundingClientRect();return{left:fT-fN.left,top:fS-fN.top}}function cx(fN,fR,fQ,fP,fO){if(!fP){fP=eP(fN.doc,fR.line)}return et(fN,fP,dT(fN,fP,fR.ch,fO),fQ)}function dx(fV,fU,fP,fT,fX){fT=fT||eP(fV.doc,fU.line);if(!fX){fX=aU(fV,fT)}function fR(f0,fZ){var fY=D(fV,fX,f0,fZ?"right":"left");if(fZ){fY.left=fY.right}else{fY.right=fY.left}return et(fV,fT,fY,fP)}function fW(f1,fY){var fZ=fS[fY],f0=fZ.level%2;if(f1==dd(fZ)&&fY&&fZ.level<fS[fY-1].level){fZ=fS[--fY];f1=fI(fZ)-(fZ.level%2?0:1);f0=true}else{if(f1==fI(fZ)&&fY<fS.length-1&&fZ.level<fS[fY+1].level){fZ=fS[++fY];f1=dd(fZ)-fZ.level%2;f0=false}}if(f0&&f1==fZ.to&&f1>fZ.from){return fR(f1-1)}return fR(f1,f0)}var fS=a(fT),fN=fU.ch;if(!fS){return fR(fN)}var fO=aB(fS,fN);var fQ=fW(fN,fO);if(eE!=null){fQ.other=fW(fN,eE)}return fQ}function dm(fN,fR){var fQ=0,fR=fj(fN.doc,fR);if(!fN.options.lineWrapping){fQ=di(fN.display)*fR.ch}var fO=eP(fN.doc,fR.line);var fP=bB(fO)+eI(fN.display);return{left:fQ,right:fQ,top:fP,bottom:fP+fO.height}}function fv(fN,fO,fP,fR){var fQ=W(fN,fO);fQ.xRel=fR;if(fP){fQ.outside=true}return fQ}function fo(fU,fR,fQ){var fT=fU.doc;fQ+=fU.display.viewOffset;if(fQ<0){return fv(fT.first,0,true,-1)}var fP=bv(fT,fQ),fV=fT.first+fT.size-1;if(fP>fV){return fv(fT.first+fT.size-1,eP(fT,fV).text.length,true,1)}if(fR<0){fR=0}var fO=eP(fT,fP);for(;;){var fW=cI(fU,fO,fP,fR,fQ);var fS=d7(fO);var fN=fS&&fS.find(0,true);if(fS&&(fW.ch>fN.from.ch||fW.ch==fN.from.ch&&fW.xRel>0)){fP=bC(fO=fN.to.line)}else{return fW}}}function cI(fX,fP,f0,fZ,fY){var fW=fY-bB(fP);var fT=false,f6=2*fX.display.wrapper.clientWidth;var f3=aU(fX,fP);function ga(gc){var gd=dx(fX,W(f0,gc),"line",fP,f3);fT=true;if(fW>gd.bottom){return gd.left-f6}else{if(fW<gd.top){return gd.left+f6}else{fT=false}}return gd.left}var f2=a(fP),f5=fP.text.length;var f7=ct(fP),fQ=cE(fP);var f4=ga(f7),fN=fT,fO=ga(fQ),fS=fT;if(fZ>fO){return fv(f0,fQ,fS,1)}for(;;){if(f2?fQ==f7||fQ==v(fP,f7,1):fQ-f7<=1){var f1=fZ<f4||fZ-f4<=fO-fZ?f7:fQ;var f9=fZ-(f1==f7?f4:fO);while(e0(fP.text.charAt(f1))){++f1}var fV=fv(f0,f1,f1==f7?fN:fS,f9<-1?-1:f9>1?1:0);return fV}var fU=Math.ceil(f5/2),gb=f7+fU;if(f2){gb=f7;for(var f8=0;f8<fU;++f8){gb=v(fP,gb,1)}}var fR=ga(gb);if(fR>fZ){fQ=gb;fO=fR;if(fS=fT){fO+=1000}f5=fU}else{f7=gb;f4=fR;fN=fT;f5-=fU}}}var aC;function aN(fP){if(fP.cachedTextHeight!=null){return fP.cachedTextHeight}if(aC==null){aC=fw("pre");for(var fO=0;fO<49;++fO){aC.appendChild(document.createTextNode("x"));aC.appendChild(fw("br"))}aC.appendChild(document.createTextNode("x"))}bG(fP.measure,aC);var fN=aC.offsetHeight/50;if(fN>3){fP.cachedTextHeight=fN}dE(fP.measure);return fN||1}function di(fR){if(fR.cachedCharWidth!=null){return fR.cachedCharWidth}var fN=fw("span","xxxxxxxxxx");var fQ=fw("pre",[fN]);bG(fR.measure,fQ);var fP=fN.getBoundingClientRect(),fO=(fP.right-fP.left)/10;if(fO>2){fR.cachedCharWidth=fO}return fO||10}var dL=0;function cw(fN){fN.curOp={viewChanged:false,startHeight:fN.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,id:++dL};if(!ch++){be=[]}}function aj(fY){var fT=fY.curOp,fX=fY.doc,fU=fY.display;fY.curOp=null;if(fT.updateMaxLine){h(fY)}if(fT.viewChanged||fT.forceUpdate||fT.scrollTop!=null||fT.scrollToPos&&(fT.scrollToPos.from.line<fU.viewFrom||fT.scrollToPos.to.line>=fU.viewTo)||fU.maxLineChanged&&fY.options.lineWrapping){var fR=dp(fY,{top:fT.scrollTop,ensure:fT.scrollToPos},fT.forceUpdate);if(fY.display.scroller.offsetHeight){fY.doc.scrollTop=fY.display.scroller.scrollTop}}if(!fR&&fT.selectionChanged){br(fY)}if(!fR&&fT.startHeight!=fY.doc.height){eB(fY)}if(fT.scrollTop!=null&&fU.scroller.scrollTop!=fT.scrollTop){var fV=Math.max(0,Math.min(fU.scroller.scrollHeight-fU.scroller.clientHeight,fT.scrollTop));fU.scroller.scrollTop=fU.scrollbarV.scrollTop=fX.scrollTop=fV}if(fT.scrollLeft!=null&&fU.scroller.scrollLeft!=fT.scrollLeft){var fO=Math.max(0,Math.min(fU.scroller.scrollWidth-fU.scroller.clientWidth,fT.scrollLeft));fU.scroller.scrollLeft=fU.scrollbarH.scrollLeft=fX.scrollLeft=fO;ei(fY)}if(fT.scrollToPos){var fW=E(fY,fj(fY.doc,fT.scrollToPos.from),fj(fY.doc,fT.scrollToPos.to),fT.scrollToPos.margin);if(fT.scrollToPos.isCursor&&fY.state.focused){dJ(fY,fW)}}if(fT.selectionChanged){p(fY)}if(fY.state.focused&&fT.updateInput){eZ(fY,fT.typing)}var fS=fT.maybeHiddenMarkers,fN=fT.maybeUnhiddenMarkers;if(fS){for(var fQ=0;fQ<fS.length;++fQ){if(!fS[fQ].lines.length){az(fS[fQ],"hide")}}}if(fN){for(var fQ=0;fQ<fN.length;++fQ){if(fN[fQ].lines.length){az(fN[fQ],"unhide")}}}var fP;if(!--ch){fP=be;be=null}if(fT.changeObjs){az(fY,"changes",fY,fT.changeObjs)}if(fP){for(var fQ=0;fQ<fP.length;++fQ){fP[fQ]()}}if(fT.cursorActivityHandlers){for(var fQ=0;fQ<fT.cursorActivityHandlers.length;fQ++){fT.cursorActivityHandlers[fQ](fY)}}}function cz(fN,fO){if(fN.curOp){return fO()}cw(fN);try{return fO()}finally{aj(fN)}}function cL(fN,fO){return function(){if(fN.curOp){return fO.apply(fN,arguments)}cw(fN);try{return fO.apply(fN,arguments)}finally{aj(fN)}}}function cR(fN){return function(){if(this.curOp){return fN.apply(this,arguments)}cw(this);try{return fN.apply(this,arguments)}finally{aj(this)}}}function cs(fN){return function(){var fO=this.cm;if(!fO||fO.curOp){return fN.apply(this,arguments)}cw(fO);try{return fN.apply(this,arguments)}finally{aj(fO)}}}function bl(fP,fN,fO){this.line=fN;this.rest=i(fN);this.size=this.rest?bC(fh(this.rest))-fO+1:1;this.node=this.text=null;this.hidden=e7(fP,fN)}function ey(fN,fT,fS){var fR=[],fP;for(var fQ=fT;fQ<fS;fQ=fP){var fO=new bl(fN.doc,eP(fN.doc,fQ),fQ);fP=fQ+fO.size;fR.push(fO)}return fR}function af(fU,fS,fT,fV){if(fS==null){fS=fU.doc.first}if(fT==null){fT=fU.doc.first+fU.doc.size}if(!fV){fV=0}var fP=fU.display;if(fV&&fT<fP.viewTo&&(fP.updateLineNumbers==null||fP.updateLineNumbers>fS)){fP.updateLineNumbers=fS}fU.curOp.viewChanged=true;if(fS>=fP.viewTo){if(aX&&aM(fU.doc,fS)<fP.viewTo){d9(fU)}}else{if(fT<=fP.viewFrom){if(aX&&dG(fU.doc,fT+fV)>fP.viewFrom){d9(fU)}else{fP.viewFrom+=fV;fP.viewTo+=fV}}else{if(fS<=fP.viewFrom&&fT>=fP.viewTo){d9(fU)}else{if(fS<=fP.viewFrom){var fR=cX(fU,fT,fT+fV,1);if(fR){fP.view=fP.view.slice(fR.index);fP.viewFrom=fR.lineN;fP.viewTo+=fV}else{d9(fU)}}else{if(fT>=fP.viewTo){var fR=cX(fU,fS,fS,-1);if(fR){fP.view=fP.view.slice(0,fR.index);fP.viewTo=fR.lineN}else{d9(fU)}}else{var fQ=cX(fU,fS,fS,-1);var fO=cX(fU,fT,fT+fV,1);if(fQ&&fO){fP.view=fP.view.slice(0,fQ.index).concat(ey(fU,fQ.lineN,fO.lineN)).concat(fP.view.slice(fO.index));fP.viewTo+=fV}else{d9(fU)}}}}}}var fN=fP.externalMeasured;if(fN){if(fT<fN.lineN){fN.lineN+=fV}else{if(fS<fN.lineN+fN.size){fP.externalMeasured=null}}}}function R(fO,fP,fS){fO.curOp.viewChanged=true;var fT=fO.display,fR=fO.display.externalMeasured;if(fR&&fP>=fR.lineN&&fP<fR.lineN+fR.size){fT.externalMeasured=null}if(fP<fT.viewFrom||fP>=fT.viewTo){return}var fQ=fT.view[c7(fO,fP)];if(fQ.node==null){return}var fN=fQ.changes||(fQ.changes=[]);if(c1(fN,fS)==-1){fN.push(fS)}}function d9(fN){fN.display.viewFrom=fN.display.viewTo=fN.doc.first;fN.display.view=[];fN.display.viewOffset=0}function c7(fN,fQ){if(fQ>=fN.display.viewTo){return null}fQ-=fN.display.viewFrom;if(fQ<0){return null}var fO=fN.display.view;for(var fP=0;fP<fO.length;fP++){fQ-=fO[fP].size;if(fQ<0){return fP}}}function cX(fV,fP,fR,fO){var fS=c7(fV,fP),fU,fT=fV.display.view;if(!aX){return{index:fS,lineN:fR}}for(var fQ=0,fN=fV.display.viewFrom;fQ<fS;fQ++){fN+=fT[fQ].size}if(fN!=fP){if(fO>0){if(fS==fT.length-1){return null}fU=(fN+fT[fS].size)-fP;fS++}else{fU=fN-fP}fP+=fU;fR+=fU}while(aM(fV.doc,fR)!=fR){if(fS==(fO<0?0:fT.length-1)){return null}fR+=fO*fT[fS-(fO<0?1:0)].size;fS+=fO}return{index:fS,lineN:fR}}function cD(fN,fR,fQ){var fP=fN.display,fO=fP.view;if(fO.length==0||fR>=fP.viewTo||fQ<=fP.viewFrom){fP.view=ey(fN,fR,fQ);fP.viewFrom=fR}else{if(fP.viewFrom>fR){fP.view=ey(fN,fR,fP.viewFrom).concat(fP.view)}else{if(fP.viewFrom<fR){fP.view=fP.view.slice(c7(fN,fR))}}fP.viewFrom=fR;if(fP.viewTo<fQ){fP.view=fP.view.concat(ey(fN,fP.viewTo,fQ))}else{if(fP.viewTo>fQ){fP.view=fP.view.slice(0,c7(fN,fQ))}}}fP.viewTo=fQ}function cU(fN){var fO=fN.display.view,fR=0;for(var fQ=0;fQ<fO.length;fQ++){var fP=fO[fQ];if(!fP.hidden&&(!fP.node||fP.changes)){++fR}}return fR}function bc(fN){if(fN.display.pollingFast){return}fN.display.poll.set(fN.options.pollInterval,function(){b7(fN);if(fN.state.focused){bc(fN)}})}function C(fN){var fO=false;fN.display.pollingFast=true;function fP(){var fQ=b7(fN);if(!fQ&&!fO){fO=true;fN.display.poll.set(60,fP)}else{fN.display.pollingFast=false;bc(fN)}}fN.display.poll.set(20,fP)}function b7(fR){var fS=fR.display.input,fV=fR.display.prevInput,f6=fR.doc;if(!fR.state.focused||(bi(fS)&&!fV)||ah(fR)||fR.options.disableInput){return false}if(fR.state.pasteIncoming&&fR.state.fakedLastChar){fS.value=fS.value.substring(0,fS.value.length-1);fR.state.fakedLastChar=false}var fU=fS.value;if(fU==fV&&!fR.somethingSelected()){return false}if(dn&&!bY&&fR.display.inputHasSelection===fU){eZ(fR);return false}var f2=!fR.curOp;if(f2){cw(fR)}fR.display.shift=false;if(fU.charCodeAt(0)==8203&&f6.sel==fR.display.selForContextMenu&&!fV){fV="\u200b"}var f1=0,fY=Math.min(fV.length,fU.length);while(f1<fY&&fV.charCodeAt(f1)==fU.charCodeAt(f1)){++f1}var fO=fU.slice(f1),fW=aQ(fO);var f5=fR.state.pasteIncoming&&fW.length>1&&f6.sel.ranges.length==fW.length;for(var f3=f6.sel.ranges.length-1;f3>=0;f3--){var fX=f6.sel.ranges[f3];var fZ=fX.from(),fN=fX.to();if(f1<fV.length){fZ=W(fZ.line,fZ.ch-(fV.length-f1))}else{if(fR.state.overwrite&&fX.empty()&&!fR.state.pasteIncoming){fN=W(fN.line,Math.min(eP(f6,fN.line).text.length,fN.ch+fh(fW).length))}}var fQ=fR.curOp.updateInput;var f4={from:fZ,to:fN,text:f5?[fW[f3]]:fW,origin:fR.state.pasteIncoming?"paste":fR.state.cutIncoming?"cut":"+input"};a5(fR.doc,f4);ac(fR,"inputRead",fR,f4);if(fO&&!fR.state.pasteIncoming&&fR.options.electricChars&&fR.options.smartIndent&&fX.head.ch<100&&(!f3||f6.sel.ranges[f3-1].head.line!=fX.head.line)){var fT=fR.getModeAt(fX.head);if(fT.electricChars){for(var f0=0;f0<fT.electricChars.length;f0++){if(fO.indexOf(fT.electricChars.charAt(f0))>-1){ab(fR,fX.head.line,"smart");break}}}else{if(fT.electricInput){var fP=cG(f4);if(fT.electricInput.test(eP(f6,fP.line).text.slice(0,fP.ch))){ab(fR,fX.head.line,"smart")}}}}}fg(fR);fR.curOp.updateInput=fQ;fR.curOp.typing=true;if(fU.length>1000||fU.indexOf("\n")>-1){fS.value=fR.display.prevInput=""}else{fR.display.prevInput=fU}if(f2){aj(fR)}fR.state.pasteIncoming=fR.state.cutIncoming=false;return true}function eZ(fN,fR){var fO,fQ,fT=fN.doc;if(fN.somethingSelected()){fN.display.prevInput="";var fP=fT.sel.primary();fO=cT&&(fP.to().line-fP.from().line>100||(fQ=fN.getSelection()).length>1000);var fS=fO?"-":fQ||fN.getSelection();fN.display.input.value=fS;if(fN.state.focused){dq(fN.display.input)}if(dn&&!bY){fN.display.inputHasSelection=fS}}else{if(!fR){fN.display.prevInput=fN.display.input.value="";if(dn&&!bY){fN.display.inputHasSelection=null}}}fN.display.inaccurateSelection=fO}function ed(fN){if(fN.options.readOnly!="nocursor"&&(!dS||ds()!=fN.display.input)){fN.display.input.focus()}}function s(fN){if(!fN.state.focused){ed(fN);cq(fN)}}function ah(fN){return fN.options.readOnly||fN.doc.cantEdit}function fp(fN){var fP=fN.display;bM(fP.scroller,"mousedown",cL(fN,d5));if(eo){bM(fP.scroller,"dblclick",cL(fN,function(fT){if(aI(fN,fT)){return}var fU=cd(fN,fT);if(!fU||m(fN,fT)||a0(fN.display,fT)){return}cu(fT);var fS=ar(fN.doc,fU);ft(fN.doc,fS.anchor,fS.head)}))}else{bM(fP.scroller,"dblclick",function(fS){aI(fN,fS)||cu(fS)})}bM(fP.lineSpace,"selectstart",function(fS){if(!a0(fP,fS)){cu(fS)}});if(!fE){bM(fP.scroller,"contextmenu",function(fS){av(fN,fS)})}bM(fP.scroller,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scroller.scrollTop);bt(fN,fP.scroller.scrollLeft,true);az(fN,"scroll",fN)}});bM(fP.scrollbarV,"scroll",function(){if(fP.scroller.clientHeight){N(fN,fP.scrollbarV.scrollTop)}});bM(fP.scrollbarH,"scroll",function(){if(fP.scroller.clientHeight){bt(fN,fP.scrollbarH.scrollLeft)}});bM(fP.scroller,"mousewheel",function(fS){c(fN,fS)});bM(fP.scroller,"DOMMouseScroll",function(fS){c(fN,fS)});function fR(){if(fN.state.focused){setTimeout(cl(ed,fN),0)}}bM(fP.scrollbarH,"mousedown",fR);bM(fP.scrollbarV,"mousedown",fR);bM(fP.wrapper,"scroll",function(){fP.wrapper.scrollTop=fP.wrapper.scrollLeft=0});bM(fP.input,"keyup",cL(fN,a7));bM(fP.input,"input",function(){if(dn&&!bY&&fN.display.inputHasSelection){fN.display.inputHasSelection=null}C(fN)});bM(fP.input,"keydown",cL(fN,q));bM(fP.input,"keypress",cL(fN,cn));bM(fP.input,"focus",cl(cq,fN));bM(fP.input,"blur",cl(aL,fN));function fO(fS){if(!aI(fN,fS)){d3(fS)}}if(fN.options.dragDrop){bM(fP.scroller,"dragstart",function(fS){Q(fN,fS)});bM(fP.scroller,"dragenter",fO);bM(fP.scroller,"dragover",fO);bM(fP.scroller,"drop",cL(fN,a9))}bM(fP.scroller,"paste",function(fS){if(a0(fP,fS)){return}fN.state.pasteIncoming=true;ed(fN);C(fN)});bM(fP.input,"paste",function(){if(cJ&&!fN.state.fakedLastChar&&!(new Date-fN.state.lastMiddleDown<200)){var fT=fP.input.selectionStart,fS=fP.input.selectionEnd;fP.input.value+="$";fP.input.selectionStart=fT;fP.input.selectionEnd=fS;fN.state.fakedLastChar=true}fN.state.pasteIncoming=true;C(fN)});function fQ(fW){if(fN.somethingSelected()){if(fP.inaccurateSelection){fP.prevInput="";fP.inaccurateSelection=false;fP.input.value=fN.getSelection();dq(fP.input)}}else{var fX="",fT=[];for(var fU=0;fU<fN.doc.sel.ranges.length;fU++){var fS=fN.doc.sel.ranges[fU].head.line;var fV={anchor:W(fS,0),head:W(fS+1,0)};fT.push(fV);fX+=fN.getRange(fV.anchor,fV.head)}if(fW.type=="cut"){fN.setSelections(fT,null,Y)}else{fP.prevInput="";fP.input.value=fX;dq(fP.input)}}if(fW.type=="cut"){fN.state.cutIncoming=true}}bM(fP.input,"cut",fQ);bM(fP.input,"copy",fQ);if(a1){bM(fP.sizer,"mouseup",function(){if(ds()==fP.input){fP.input.blur()}ed(fN)})}}function aK(fN){var fO=fN.display;fO.cachedCharWidth=fO.cachedTextHeight=fO.cachedPaddingH=null;fN.setSize()}function a0(fO,fN){for(var fP=L(fN);fP!=fO.wrapper;fP=fP.parentNode){if(!fP||fP.ignoreEvents||fP.parentNode==fO.sizer&&fP!=fO.mover){return true}}}function cd(fX,fR,fO,fP){var fT=fX.display;if(!fO){var fS=L(fR);if(fS==fT.scrollbarH||fS==fT.scrollbarV||fS==fT.scrollbarFiller||fS==fT.gutterFiller){return null}}var fW,fU,fN=fT.lineSpace.getBoundingClientRect();try{fW=fR.clientX-fN.left;fU=fR.clientY-fN.top}catch(fR){return null}var fV=fo(fX,fW,fU),fY;if(fP&&fV.xRel==1&&(fY=eP(fX.doc,fV.line).text).length==fV.ch){var fQ=bI(fY,fY.length,fX.options.tabSize)-fY.length;fV=W(fV.line,Math.max(0,Math.round((fW-eG(fX.display).left)/di(fX.display))-fQ))}return fV}function d5(fP){if(aI(this,fP)){return}var fN=this,fO=fN.display;fO.shift=fP.shiftKey;if(a0(fO,fP)){if(!cJ){fO.scroller.draggable=false;setTimeout(function(){fO.scroller.draggable=true},100)}return}if(m(fN,fP)){return}var fQ=cd(fN,fP);window.focus();switch(fn(fP)){case 1:if(fQ){au(fN,fP,fQ)}else{if(L(fP)==fO.scroller){cu(fP)}}break;case 2:if(cJ){fN.state.lastMiddleDown=+new Date}if(fQ){ft(fN.doc,fQ)}setTimeout(cl(ed,fN),20);cu(fP);break;case 3:if(fE){av(fN,fP)}break}}var c4,cW;function au(fN,fS,fT){setTimeout(cl(s,fN),0);var fO=+new Date,fP;if(cW&&cW.time>fO-400&&b5(cW.pos,fT)==0){fP="triple"}else{if(c4&&c4.time>fO-400&&b5(c4.pos,fT)==0){fP="double";cW={time:fO,pos:fT}}else{fP="single";c4={time:fO,pos:fT}}}var fQ=fN.doc.sel,fR=bU?fS.metaKey:fS.ctrlKey;if(fN.options.dragDrop&&ep&&!fR&&!ah(fN)&&fP=="single"&&fQ.contains(fT)>-1&&fQ.somethingSelected()){aT(fN,fS,fT)}else{n(fN,fS,fT,fP,fR)}}function aT(fO,fQ,fR){var fP=fO.display;var fN=cL(fO,function(fS){if(cJ){fP.scroller.draggable=false}fO.state.draggingText=false;dP(document,"mouseup",fN);dP(fP.scroller,"drop",fN);if(Math.abs(fQ.clientX-fS.clientX)+Math.abs(fQ.clientY-fS.clientY)<10){cu(fS);ft(fO.doc,fR);ed(fO);if(eo&&!bY){setTimeout(function(){document.body.focus();ed(fO)},20)}}});if(cJ){fP.scroller.draggable=true}fO.state.draggingText=fN;if(fP.scroller.dragDrop){fP.scroller.dragDrop()}bM(document,"mouseup",fN);bM(fP.scroller,"drop",fN)}function n(fQ,f4,fP,fN,fS){var f1=fQ.display,f6=fQ.doc;cu(f4);var fO,f5,fR=f6.sel;if(fS&&!f4.shiftKey){f5=f6.sel.contains(fP);if(f5>-1){fO=f6.sel.ranges[f5]}else{fO=new dB(fP,fP)}}else{fO=f6.sel.primary()}if(f4.altKey){fN="rect";if(!fS){fO=new dB(fP,fP)}fP=cd(fQ,f4,true,true);f5=-1}else{if(fN=="double"){var f2=ar(f6,fP);if(fQ.display.shift||f6.extend){fO=e6(f6,fO,f2.anchor,f2.head)}else{fO=f2}}else{if(fN=="triple"){var fV=new dB(W(fP.line,0),fj(f6,W(fP.line+1,0)));if(fQ.display.shift||f6.extend){fO=e6(f6,fO,fV.anchor,fV.head)}else{fO=fV}}else{fO=e6(f6,fO,fP)}}}if(!fS){f5=0;bJ(f6,new fx([fO],0),M);fR=f6.sel}else{if(f5>-1){f(f6,f5,fO,M)}else{f5=f6.sel.ranges.length;bJ(f6,cm(f6.sel.ranges.concat([fO]),f5),{scroll:false,origin:"*mouse"})}}var f0=fP;function fZ(gh){if(b5(f0,gh)==0){return}f0=gh;if(fN=="rect"){var f8=[],ge=fQ.options.tabSize;var f7=bI(eP(f6,fP.line).text,fP.ch,ge);var gk=bI(eP(f6,gh.line).text,gh.ch,ge);var f9=Math.min(f7,gk),gi=Math.max(f7,gk);for(var gl=Math.min(fP.line,gh.line),gb=Math.min(fQ.lastLine(),Math.max(fP.line,gh.line));gl<=gb;gl++){var gj=eP(f6,gl).text,ga=d2(gj,f9,ge);if(f9==gi){f8.push(new dB(W(gl,ga),W(gl,ga)))}else{if(gj.length>ga){f8.push(new dB(W(gl,ga),W(gl,d2(gj,gi,ge))))}}}if(!f8.length){f8.push(new dB(fP,fP))}bJ(f6,cm(fR.ranges.slice(0,f5).concat(f8),f5),M)}else{var gf=fO;var gc=gf.anchor,gg=gh;if(fN!="single"){if(fN=="double"){var gd=ar(f6,gh)}else{var gd=new dB(W(gh.line,0),fj(f6,W(gh.line+1,0)))}if(b5(gd.anchor,gc)>0){gg=gd.head;gc=am(gf.from(),gd.anchor)}else{gg=gd.anchor;gc=bn(gf.to(),gd.head)}}var f8=fR.ranges.slice(0);f8[f5]=new dB(fj(f6,gc),gg);bJ(f6,cm(f8,f5),M)}}var fX=f1.wrapper.getBoundingClientRect();var fT=0;function f3(f9){var f7=++fT;var gb=cd(fQ,f9,true,fN=="rect");if(!gb){return}if(b5(gb,f0)!=0){s(fQ);fZ(gb);var ga=bT(f1,f6);if(gb.line>=ga.to||gb.line<ga.from){setTimeout(cL(fQ,function(){if(fT==f7){f3(f9)}}),150)}}else{var f8=f9.clientY<fX.top?-20:f9.clientY>fX.bottom?20:0;if(f8){setTimeout(cL(fQ,function(){if(fT!=f7){return}f1.scroller.scrollTop+=f8;f3(f9)}),50)}}}function fW(f7){fT=Infinity;cu(f7);ed(fQ);dP(document,"mousemove",fY);dP(document,"mouseup",fU);f6.history.lastSelOrigin=null}var fY=cL(fQ,function(f7){if((dn&&!bX)?!f7.buttons:!fn(f7)){fW(f7)}else{f3(f7)}});var fU=cL(fQ,fW);bM(document,"mousemove",fY);bM(document,"mouseup",fU)}function fL(fY,fU,fW,fX,fQ){try{var fO=fU.clientX,fN=fU.clientY}catch(fU){return false}if(fO>=Math.floor(fY.display.gutters.getBoundingClientRect().right)){return false}if(fX){cu(fU)}var fV=fY.display;var fT=fV.lineDiv.getBoundingClientRect();if(fN>fT.bottom||!eS(fY,fW)){return bA(fU)}fN-=fT.top-fV.viewOffset;for(var fR=0;fR<fY.options.gutters.length;++fR){var fS=fV.gutters.childNodes[fR];if(fS&&fS.getBoundingClientRect().right>=fO){var fZ=bv(fY.doc,fN);var fP=fY.options.gutters[fR];fQ(fY,fW,fY,fZ,fP,fU);return bA(fU)}}}function m(fN,fO){return fL(fN,fO,"gutterClick",true,ac)}var ae=0;function a9(fT){var fV=this;if(aI(fV,fT)||a0(fV.display,fT)){return}cu(fT);if(dn){ae=+new Date}var fU=cd(fV,fT,true),fN=fT.dataTransfer.files;if(!fU||ah(fV)){return}if(fN&&fN.length&&window.FileReader&&window.File){var fP=fN.length,fW=Array(fP),fO=0;var fR=function(fZ,fY){var fX=new FileReader;fX.onload=cL(fV,function(){fW[fY]=fX.result;if(++fO==fP){fU=fj(fV.doc,fU);var f0={from:fU,to:fU,text:aQ(fW.join("\n")),origin:"paste"};a5(fV.doc,f0);eH(fV.doc,eu(fU,cG(f0)))}});fX.readAsText(fZ)};for(var fS=0;fS<fP;++fS){fR(fN[fS],fS)}}else{if(fV.state.draggingText&&fV.doc.sel.contains(fU)>-1){fV.state.draggingText(fT);setTimeout(cl(ed,fV),20);return}try{var fW=fT.dataTransfer.getData("Text");if(fW){var fQ=fV.state.draggingText&&fV.listSelections();d1(fV.doc,eu(fU,fU));if(fQ){for(var fS=0;fS<fQ.length;++fS){aR(fV.doc,"",fQ[fS].anchor,fQ[fS].head,"drag")}}fV.replaceSelection(fW,"around","paste");ed(fV)}}catch(fT){}}}function Q(fN,fP){if(dn&&(!fN.state.draggingText||+new Date-ae<100)){d3(fP);return}if(aI(fN,fP)||a0(fN.display,fP)){return}fP.dataTransfer.setData("Text",fN.getSelection());if(fP.dataTransfer.setDragImage&&!ay){var fO=fw("img",null,null,"position: fixed; left: 0; top: 0;");fO.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(dF){fO.width=fO.height=1;fN.display.wrapper.appendChild(fO);fO._top=fO.offsetTop}fP.dataTransfer.setDragImage(fO,0,0);if(dF){fO.parentNode.removeChild(fO)}}}function N(fN,fO){if(Math.abs(fN.doc.scrollTop-fO)<2){return}fN.doc.scrollTop=fO;if(!ce){dp(fN,{top:fO})}if(fN.display.scroller.scrollTop!=fO){fN.display.scroller.scrollTop=fO}if(fN.display.scrollbarV.scrollTop!=fO){fN.display.scrollbarV.scrollTop=fO}if(ce){dp(fN)}dR(fN,100)}function bt(fN,fP,fO){if(fO?fP==fN.doc.scrollLeft:Math.abs(fN.doc.scrollLeft-fP)<2){return}fP=Math.min(fP,fN.display.scroller.scrollWidth-fN.display.scroller.clientWidth);fN.doc.scrollLeft=fP;ei(fN);if(fN.display.scroller.scrollLeft!=fP){fN.display.scroller.scrollLeft=fP}if(fN.display.scrollbarH.scrollLeft!=fP){fN.display.scrollbarH.scrollLeft=fP}}var eW=0,b6=null;if(dn){b6=-0.53}else{if(ce){b6=15}else{if(cV){b6=-0.7}else{if(ay){b6=-1/3}}}}function c(fV,fP){var fY=fP.wheelDeltaX,fX=fP.wheelDeltaY;if(fY==null&&fP.detail&&fP.axis==fP.HORIZONTAL_AXIS){fY=fP.detail}if(fX==null&&fP.detail&&fP.axis==fP.VERTICAL_AXIS){fX=fP.detail}else{if(fX==null){fX=fP.wheelDelta}}var fR=fV.display,fU=fR.scroller;if(!(fY&&fU.scrollWidth>fU.clientWidth||fX&&fU.scrollHeight>fU.clientHeight)){return}if(fX&&bU&&cJ){outer:for(var fW=fP.target,fT=fR.view;fW!=fU;fW=fW.parentNode){for(var fO=0;fO<fT.length;fO++){if(fT[fO].node==fW){fV.display.currentWheelTarget=fW;break outer}}}}if(fY&&!ce&&!dF&&b6!=null){if(fX){N(fV,Math.max(0,Math.min(fU.scrollTop+fX*b6,fU.scrollHeight-fU.clientHeight)))}bt(fV,Math.max(0,Math.min(fU.scrollLeft+fY*b6,fU.scrollWidth-fU.clientWidth)));cu(fP);fR.wheelStartX=null;return}if(fX&&b6!=null){var fN=fX*b6;var fS=fV.doc.scrollTop,fQ=fS+fR.wrapper.clientHeight;if(fN<0){fS=Math.max(0,fS+fN-50)}else{fQ=Math.min(fV.doc.height,fQ+fN+50)}dp(fV,{top:fS,bottom:fQ})}if(eW<20){if(fR.wheelStartX==null){fR.wheelStartX=fU.scrollLeft;fR.wheelStartY=fU.scrollTop;fR.wheelDX=fY;fR.wheelDY=fX;setTimeout(function(){if(fR.wheelStartX==null){return}var fZ=fU.scrollLeft-fR.wheelStartX;var f1=fU.scrollTop-fR.wheelStartY;var f0=(f1&&fR.wheelDY&&f1/fR.wheelDY)||(fZ&&fR.wheelDX&&fZ/fR.wheelDX);fR.wheelStartX=fR.wheelStartY=null;if(!f0){return}b6=(b6*eW+f0)/(eW+1);++eW},200)}else{fR.wheelDX+=fY;fR.wheelDY+=fX}}}function fq(fO,fR,fN){if(typeof fR=="string"){fR=eh[fR];if(!fR){return false}}if(fO.display.pollingFast&&b7(fO)){fO.display.pollingFast=false}var fQ=fO.display.shift,fP=false;try{if(ah(fO)){fO.state.suppressEdits=true}if(fN){fO.display.shift=false}fP=fR(fO)!=bZ}finally{fO.display.shift=fQ;fO.state.suppressEdits=false}return fP}function c9(fN){var fO=fN.state.keyMaps.slice(0);if(fN.options.extraKeys){fO.push(fN.options.extraKeys)}fO.push(fN.options.keyMap);return fO}var an;function eT(fN,fT){var fO=fu(fN.options.keyMap),fR=fO.auto;clearTimeout(an);if(fR&&!eg(fT)){an=setTimeout(function(){if(fu(fN.options.keyMap)==fO){fN.options.keyMap=(fR.call?fR.call(null,fN):fR);fK(fN)}},50)}var fQ=e2(fT,true),fS=false;if(!fQ){return false}var fP=c9(fN);if(fT.shiftKey){fS=j("Shift-"+fQ,fP,function(fU){return fq(fN,fU,true)})||j(fQ,fP,function(fU){if(typeof fU=="string"?/^go[A-Z]/.test(fU):fU.motion){return fq(fN,fU)}})}else{fS=j(fQ,fP,function(fU){return fq(fN,fU)})}if(fS){cu(fT);p(fN);ac(fN,"keyHandled",fN,fQ,fT)}return fS}function dV(fN,fQ,fO){var fP=j("'"+fO+"'",c9(fN),function(fR){return fq(fN,fR,true)});if(fP){cu(fQ);p(fN);ac(fN,"keyHandled",fN,"'"+fO+"'",fQ)}return fP}var c3=null;function q(fQ){var fN=this;s(fN);if(aI(fN,fQ)){return}if(eo&&fQ.keyCode==27){fQ.returnValue=false}var fO=fQ.keyCode;fN.display.shift=fO==16||fQ.shiftKey;var fP=eT(fN,fQ);if(dF){c3=fP?fO:null;if(!fP&&fO==88&&!cT&&(bU?fQ.metaKey:fQ.ctrlKey)){fN.replaceSelection("",null,"cut")}}if(fO==18&&!/\bCodeMirror-crosshair\b/.test(fN.display.lineDiv.className)){aq(fN)}}function aq(fO){var fP=fO.display.lineDiv;fb(fP,"CodeMirror-crosshair");function fN(fQ){if(fQ.keyCode==18||!fQ.altKey){g(fP,"CodeMirror-crosshair");dP(document,"keyup",fN);dP(document,"mouseover",fN)}}bM(document,"keyup",fN);bM(document,"mouseover",fN)}function a7(fN){if(aI(this,fN)){return}if(fN.keyCode==16){this.doc.sel.shift=false}}function cn(fR){var fN=this;if(aI(fN,fR)){return}var fQ=fR.keyCode,fO=fR.charCode;if(dF&&fQ==c3){c3=null;cu(fR);return}if(((dF&&(!fR.which||fR.which<10))||a1)&&eT(fN,fR)){return}var fP=String.fromCharCode(fO==null?fQ:fO);if(dV(fN,fR,fP)){return}if(dn&&!bY){fN.display.inputHasSelection=null}C(fN)}function cq(fN){if(fN.options.readOnly=="nocursor"){return}if(!fN.state.focused){az(fN,"focus",fN);fN.state.focused=true;fb(fN.display.wrapper,"CodeMirror-focused");if(!fN.curOp&&fN.display.selForContextMenu!=fN.doc.sel){eZ(fN);if(cJ){setTimeout(cl(eZ,fN,true),0)}}}bc(fN);p(fN)}function aL(fN){if(fN.state.focused){az(fN,"blur",fN);fN.state.focused=false;g(fN.display.wrapper,"CodeMirror-focused")}clearInterval(fN.display.blinker);setTimeout(function(){if(!fN.state.focused){fN.display.shift=false}},150)}function av(fW,fR){if(aI(fW,fR,"contextmenu")){return}var fT=fW.display;if(a0(fT,fR)||c0(fW,fR)){return}var fV=cd(fW,fR),fN=fT.scroller.scrollTop;if(!fV||dF){return}var fP=fW.options.resetSelectionOnContextMenu;if(fP&&fW.doc.sel.contains(fV)==-1){cL(fW,bJ)(fW.doc,eu(fV),Y)}var fS=fT.input.style.cssText;fT.inputDiv.style.position="absolute";fT.input.style.cssText="position: fixed; width: 30px; height: 30px; top: "+(fR.clientY-5)+"px; left: "+(fR.clientX-5)+"px; z-index: 1000; background: "+(dn?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";ed(fW);eZ(fW);if(!fW.somethingSelected()){fT.input.value=fT.prevInput=" "}fT.selForContextMenu=fW.doc.sel;clearTimeout(fT.detectingSelectAll);function fQ(){if(fT.input.selectionStart!=null){var fX=fW.somethingSelected();var fY=fT.input.value="\u200b"+(fX?fT.input.value:"");fT.prevInput=fX?"":"\u200b";fT.input.selectionStart=1;fT.input.selectionEnd=fY.length}}function fU(){fT.inputDiv.style.position="relative";fT.input.style.cssText=fS;if(bY){fT.scrollbarV.scrollTop=fT.scroller.scrollTop=fN}bc(fW);if(fT.input.selectionStart!=null){if(!dn||bY){fQ()}var fX=0,fY=function(){if(fT.selForContextMenu==fW.doc.sel&&fT.input.selectionStart==0){cL(fW,eh.selectAll)(fW)}else{if(fX++<10){fT.detectingSelectAll=setTimeout(fY,500)}else{eZ(fW)}}};fT.detectingSelectAll=setTimeout(fY,200)}}if(dn&&!bY){fQ()}if(fE){d3(fR);var fO=function(){dP(window,"mouseup",fO);setTimeout(fU,20)};bM(window,"mouseup",fO)}else{setTimeout(fU,50)}}function c0(fN,fO){if(!eS(fN,"gutterContextMenu")){return false}return fL(fN,fO,"gutterContextMenu",false,az)}var cG=I.changeEnd=function(fN){if(!fN.text){return fN.to}return W(fN.from.line+fN.text.length-1,fh(fN.text).length+(fN.text.length==1?fN.from.ch:0))};function bO(fQ,fP){if(b5(fQ,fP.from)<0){return fQ}if(b5(fQ,fP.to)<=0){return cG(fP)}var fN=fQ.line+fP.text.length-(fP.to.line-fP.from.line)-1,fO=fQ.ch;if(fQ.line==fP.to.line){fO+=cG(fP).ch-fP.to.ch}return W(fN,fO)}function eU(fQ,fR){var fO=[];for(var fP=0;fP<fQ.sel.ranges.length;fP++){var fN=fQ.sel.ranges[fP];fO.push(new dB(bO(fN.anchor,fR),bO(fN.head,fR)))}return cm(fO,fQ.sel.primIndex)}function bk(fP,fO,fN){if(fP.line==fO.line){return W(fN.line,fP.ch-fO.ch+fN.ch)}else{return W(fN.line+(fP.line-fO.line),fP.ch)}}function ad(fX,fU,fO){var fP=[];var fN=W(fX.first,0),fY=fN;for(var fR=0;fR<fU.length;fR++){var fT=fU[fR];var fW=bk(fT.from,fN,fY);var fV=bk(cG(fT),fN,fY);fN=fT.to;fY=fV;if(fO=="around"){var fS=fX.sel.ranges[fR],fQ=b5(fS.head,fS.anchor)<0;fP[fR]=new dB(fQ?fV:fW,fQ?fW:fV)}else{fP[fR]=new dB(fW,fW)}}return new fx(fP,fX.sel.primIndex)}function dv(fO,fQ,fP){var fN={canceled:false,from:fQ.from,to:fQ.to,text:fQ.text,origin:fQ.origin,cancel:function(){this.canceled=true}};if(fP){fN.update=function(fU,fT,fS,fR){if(fU){this.from=fj(fO,fU)}if(fT){this.to=fj(fO,fT)}if(fS){this.text=fS}if(fR!==undefined){this.origin=fR}}}az(fO,"beforeChange",fO,fN);if(fO.cm){az(fO.cm,"beforeChange",fO.cm,fN)}if(fN.canceled){return null}return{from:fN.from,to:fN.to,text:fN.text,origin:fN.origin}}function a5(fQ,fR,fP){if(fQ.cm){if(!fQ.cm.curOp){return cL(fQ.cm,a5)(fQ,fR,fP)}if(fQ.cm.state.suppressEdits){return}}if(eS(fQ,"beforeChange")||fQ.cm&&eS(fQ.cm,"beforeChange")){fR=dv(fQ,fR,true);if(!fR){return}}var fO=fH&&!fP&&cv(fQ,fR.from,fR.to);if(fO){for(var fN=fO.length-1;fN>=0;--fN){K(fQ,{from:fO[fN].from,to:fO[fN].to,text:fN?[""]:fR.text})}}else{K(fQ,fR)}}function K(fP,fQ){if(fQ.text.length==1&&fQ.text[0]==""&&b5(fQ.from,fQ.to)==0){return}var fO=eU(fP,fQ);fm(fP,fQ,fO,fP.cm?fP.cm.curOp.id:NaN);dQ(fP,fQ,fO,dW(fP,fQ));var fN=[];dK(fP,function(fS,fR){if(!fR&&c1(fN,fS.history)==-1){dj(fS.history,fQ);fN.push(fS.history)}dQ(fS,fQ,null,dW(fS,fQ))})}function bV(fY,fW,f0){if(fY.cm&&fY.cm.state.suppressEdits){return}var fV=fY.history,fP,fR=fY.sel;var fN=fW=="undo"?fV.done:fV.undone,fZ=fW=="undo"?fV.undone:fV.done;for(var fS=0;fS<fN.length;fS++){fP=fN[fS];if(f0?fP.ranges&&!fP.equals(fY.sel):!fP.ranges){break}}if(fS==fN.length){return}fV.lastOrigin=fV.lastSelOrigin=null;for(;;){fP=fN.pop();if(fP.ranges){cA(fP,fZ);if(f0&&!fP.equals(fY.sel)){bJ(fY,fP,{clearRedo:false});return}fR=fP}else{break}}var fU=[];cA(fR,fZ);fZ.push({changes:fU,generation:fV.generation});fV.generation=fP.generation||++fV.maxGeneration;var fQ=eS(fY,"beforeChange")||fY.cm&&eS(fY.cm,"beforeChange");for(var fS=fP.changes.length-1;fS>=0;--fS){var fX=fP.changes[fS];fX.origin=fW;if(fQ&&!dv(fY,fX,false)){fN.length=0;return}fU.push(da(fY,fX));var fO=fS?eU(fY,fX,null):fh(fN);dQ(fY,fX,fO,dM(fY,fX));if(!fS&&fY.cm){fY.cm.scrollIntoView(fX)}var fT=[];dK(fY,function(f2,f1){if(!f1&&c1(fT,f2.history)==-1){dj(f2.history,fX);fT.push(f2.history)}dQ(f2,fX,null,dM(f2,fX))})}}function eX(fO,fQ){if(fQ==0){return}fO.first+=fQ;fO.sel=new fx(bH(fO.sel.ranges,function(fR){return new dB(W(fR.anchor.line+fQ,fR.anchor.ch),W(fR.head.line+fQ,fR.head.ch))}),fO.sel.primIndex);if(fO.cm){af(fO.cm,fO.first,fO.first-fQ,fQ);for(var fP=fO.cm.display,fN=fP.viewFrom;fN<fP.viewTo;fN++){R(fO.cm,fN,"gutter")}}}function dQ(fR,fS,fQ,fO){if(fR.cm&&!fR.cm.curOp){return cL(fR.cm,dQ)(fR,fS,fQ,fO)}if(fS.to.line<fR.first){eX(fR,fS.text.length-1-(fS.to.line-fS.from.line));return}if(fS.from.line>fR.lastLine()){return}if(fS.from.line<fR.first){var fN=fS.text.length-1-(fR.first-fS.from.line);eX(fR,fN);fS={from:W(fR.first,0),to:W(fS.to.line+fN,fS.to.ch),text:[fh(fS.text)],origin:fS.origin}}var fP=fR.lastLine();if(fS.to.line>fP){fS={from:fS.from,to:W(fP,eP(fR,fP).text.length),text:[fS.text[0]],origin:fS.origin}}fS.removed=fy(fR,fS.from,fS.to);if(!fQ){fQ=eU(fR,fS,null)}if(fR.cm){aD(fR.cm,fS,fO)}else{e9(fR,fS,fO)}d1(fR,fQ,Y)}function aD(fY,fU,fS){var fX=fY.doc,fT=fY.display,fV=fU.from,fW=fU.to;var fN=false,fR=fV.line;if(!fY.options.lineWrapping){fR=bC(z(eP(fX,fV.line)));fX.iter(fR,fW.line+1,function(f0){if(f0==fT.maxLine){fN=true;return true}})}if(fX.sel.contains(fU.from,fU.to)>-1){V(fY)}e9(fX,fU,fS,a3(fY));if(!fY.options.lineWrapping){fX.iter(fR,fV.line+fU.text.length,function(f1){var f0=dY(f1);if(f0>fT.maxLineLength){fT.maxLine=f1;fT.maxLineLength=f0;fT.maxLineChanged=true;fN=false}});if(fN){fY.curOp.updateMaxLine=true}}fX.frontier=Math.min(fX.frontier,fV.line);dR(fY,400);var fZ=fU.text.length-(fW.line-fV.line)-1;if(fV.line==fW.line&&fU.text.length==1&&!dw(fY.doc,fU)){R(fY,fV.line,"text")}else{af(fY,fV.line,fW.line+1,fZ)}var fP=eS(fY,"changes"),fQ=eS(fY,"change");if(fQ||fP){var fO={from:fV,to:fW,text:fU.text,removed:fU.removed,origin:fU.origin};if(fQ){ac(fY,"change",fY,fO)}if(fP){(fY.curOp.changeObjs||(fY.curOp.changeObjs=[])).push(fO)}}fY.display.selForContextMenu=null}function aR(fQ,fP,fS,fR,fN){if(!fR){fR=fS}if(b5(fR,fS)<0){var fO=fR;fR=fS;fS=fO}if(typeof fP=="string"){fP=aQ(fP)}a5(fQ,{from:fS,to:fR,text:fP,origin:fN})}function dJ(fO,fR){var fS=fO.display,fP=fS.sizer.getBoundingClientRect(),fN=null;if(fR.top+fP.top<0){fN=true}else{if(fR.bottom+fP.top>(window.innerHeight||document.documentElement.clientHeight)){fN=false}}if(fN!=null&&!e5){var fQ=fw("div","\u200b",null,"position: absolute; top: "+(fR.top-fS.viewOffset-eI(fO.display))+"px; height: "+(fR.bottom-fR.top+ba)+"px; left: "+fR.left+"px; width: 2px;");fO.display.lineSpace.appendChild(fQ);fQ.scrollIntoView(fN);fO.display.lineSpace.removeChild(fQ)}}function E(fW,fU,fR,fQ){if(fQ==null){fQ=0}for(;;){var fS=false,fV=dx(fW,fU);var fN=!fR||fR==fU?fV:dx(fW,fR);var fP=H(fW,Math.min(fV.left,fN.left),Math.min(fV.top,fN.top)-fQ,Math.max(fV.left,fN.left),Math.max(fV.bottom,fN.bottom)+fQ);var fT=fW.doc.scrollTop,fO=fW.doc.scrollLeft;if(fP.scrollTop!=null){N(fW,fP.scrollTop);if(Math.abs(fW.doc.scrollTop-fT)>1){fS=true}}if(fP.scrollLeft!=null){bt(fW,fP.scrollLeft);if(Math.abs(fW.doc.scrollLeft-fO)>1){fS=true}}if(!fS){return fV}}}function F(fN,fP,fR,fO,fQ){var fS=H(fN,fP,fR,fO,fQ);if(fS.scrollTop!=null){N(fN,fS.scrollTop)}if(fS.scrollLeft!=null){bt(fN,fS.scrollLeft)}}function H(fT,f1,fQ,f0,fP){var fY=fT.display,fX=aN(fT.display);if(fQ<0){fQ=0}var fW=fT.curOp&&fT.curOp.scrollTop!=null?fT.curOp.scrollTop:fY.scroller.scrollTop;var fO=fY.scroller.clientHeight-ba,fV={};var f3=fT.doc.height+bx(fY);var f4=fQ<fX,fZ=fP>f3-fX;if(fQ<fW){fV.scrollTop=f4?0:fQ}else{if(fP>fW+fO){var fU=Math.min(fQ,(fZ?f3:fP)-fO);if(fU!=fW){fV.scrollTop=fU}}}var fN=fT.curOp&&fT.curOp.scrollLeft!=null?fT.curOp.scrollLeft:fY.scroller.scrollLeft;var fS=fY.scroller.clientWidth-ba;f1+=fY.gutters.offsetWidth;f0+=fY.gutters.offsetWidth;var fR=fY.gutters.offsetWidth;var f2=f1<fR+10;if(f1<fN+fR||f2){if(f2){f1=0}fV.scrollLeft=Math.max(0,f1-10-fR)}else{if(f0>fS+fN-3){fV.scrollLeft=f0+10-fS}}return fV}function cy(fN,fP,fO){if(fP!=null||fO!=null){fd(fN)}if(fP!=null){fN.curOp.scrollLeft=(fN.curOp.scrollLeft==null?fN.doc.scrollLeft:fN.curOp.scrollLeft)+fP}if(fO!=null){fN.curOp.scrollTop=(fN.curOp.scrollTop==null?fN.doc.scrollTop:fN.curOp.scrollTop)+fO}}function fg(fN){fd(fN);var fO=fN.getCursor(),fQ=fO,fP=fO;if(!fN.options.lineWrapping){fQ=fO.ch?W(fO.line,fO.ch-1):fO;fP=W(fO.line,fO.ch+1)}fN.curOp.scrollToPos={from:fQ,to:fP,margin:fN.options.cursorScrollMargin,isCursor:true}}function fd(fN){var fP=fN.curOp.scrollToPos;if(fP){fN.curOp.scrollToPos=null;var fR=dm(fN,fP.from),fQ=dm(fN,fP.to);var fO=H(fN,Math.min(fR.left,fQ.left),Math.min(fR.top,fQ.top)-fP.margin,Math.max(fR.right,fQ.right),Math.max(fR.bottom,fQ.bottom)+fP.margin);fN.scrollTo(fO.scrollLeft,fO.scrollTop)}}function ab(f0,fQ,fZ,fP){var fY=f0.doc,fO;if(fZ==null){fZ="add"}if(fZ=="smart"){if(!f0.doc.mode.indent){fZ="prev"}else{fO=dg(f0,fQ)}}var fU=f0.options.tabSize;var f1=eP(fY,fQ),fT=bI(f1.text,null,fU);if(f1.stateAfter){f1.stateAfter=null}var fN=f1.text.match(/^\s*/)[0],fW;if(!fP&&!/\S/.test(f1.text)){fW=0;fZ="not"}else{if(fZ=="smart"){fW=f0.doc.mode.indent(fO,f1.text.slice(fN.length),f1.text);if(fW==bZ){if(!fP){return}fZ="prev"}}}if(fZ=="prev"){if(fQ>fY.first){fW=bI(eP(fY,fQ-1).text,null,fU)}else{fW=0}}else{if(fZ=="add"){fW=fT+f0.options.indentUnit}else{if(fZ=="subtract"){fW=fT-f0.options.indentUnit}else{if(typeof fZ=="number"){fW=fT+fZ}}}}fW=Math.max(0,fW);var fX="",fV=0;if(f0.options.indentWithTabs){for(var fR=Math.floor(fW/fU);fR;--fR){fV+=fU;fX+="\t"}}if(fV<fW){fX+=cf(fW-fV)}if(fX!=fN){aR(f0.doc,fX,W(fQ,0),W(fQ,fN.length),"+input")}else{for(var fR=0;fR<fY.sel.ranges.length;fR++){var fS=fY.sel.ranges[fR];if(fS.head.line==fQ&&fS.head.ch<fN.length){var fV=W(fQ,fN.length);f(fY,fR,new dB(fV,fV));break}}}f1.stateAfter=null}function eb(fO,fQ,fN,fT){var fS=fQ,fP=fQ,fR=fO.doc;if(typeof fQ=="number"){fP=eP(fR,cO(fR,fQ))}else{fS=bC(fQ)}if(fS==null){return null}if(fT(fP,fS)){R(fO,fS,fN)}return fP}function eA(fN,fT){var fO=fN.doc.sel.ranges,fR=[];for(var fQ=0;fQ<fO.length;fQ++){var fP=fT(fO[fQ]);while(fR.length&&b5(fP.from,fh(fR).to)<=0){var fS=fR.pop();if(b5(fS.from,fP.from)<0){fP.from=fS.from;break}}fR.push(fP)}cz(fN,function(){for(var fU=fR.length-1;fU>=0;fU--){aR(fN.doc,"",fR[fU].from,fR[fU].to,"+delete")}fg(fN)})}function bm(f4,fQ,fY,fX,fS){var fV=fQ.line,fW=fQ.ch,f3=fY;var fN=eP(f4,fV);var f1=true;function f2(){var f5=fV+fY;if(f5<f4.first||f5>=f4.first+f4.size){return(f1=false)}fV=f5;return fN=eP(f4,f5)}function f0(f6){var f5=(fS?v:ag)(fN,fW,fY,true);if(f5==null){if(!f6&&f2()){if(fS){fW=(fY<0?cE:ct)(fN)}else{fW=fY<0?fN.text.length:0}}else{return(f1=false)}}else{fW=f5}return true}if(fX=="char"){f0()}else{if(fX=="column"){f0(true)}else{if(fX=="word"||fX=="group"){var fZ=null,fT=fX=="group";for(var fR=true;;fR=false){if(fY<0&&!f0(!fR)){break}var fO=fN.text.charAt(fW)||"\n";var fP=cp(fO)?"w":fT&&fO=="\n"?"n":!fT||/\s/.test(fO)?null:"p";if(fT&&!fR&&!fP){fP="s"}if(fZ&&fZ!=fP){if(fY<0){fY=1;f0()}break}if(fP){fZ=fP}if(fY>0&&!f0(!fR)){break}}}}}var fU=bK(f4,W(fV,fW),f3,true);if(!f1){fU.hitSide=true}return fU}function bg(fV,fQ,fN,fU){var fT=fV.doc,fS=fQ.left,fR;if(fU=="page"){var fP=Math.min(fV.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);fR=fQ.top+fN*(fP-(fN<0?1.5:0.5)*aN(fV.display))}else{if(fU=="line"){fR=fN>0?fQ.bottom+3:fQ.top-3}}for(;;){var fO=fo(fV,fS,fR);if(!fO.outside){break}if(fN<0?fR<=0:fR>=fT.height){fO.hitSide=true;break}fR+=fN*5}return fO}function ar(fR,fT){var fQ=eP(fR,fT.line).text;var fS=fT.ch,fP=fT.ch;if(fQ){if((fT.xRel<0||fP==fQ.length)&&fS){--fS}else{++fP}var fO=fQ.charAt(fS);var fN=cp(fO)?cp:/\s/.test(fO)?function(fU){return/\s/.test(fU)}:function(fU){return !/\s/.test(fU)&&!cp(fU)};while(fS>0&&fN(fQ.charAt(fS-1))){--fS}while(fP<fQ.length&&fN(fQ.charAt(fP))){++fP}}return new dB(W(fT.line,fS),W(fT.line,fP))}I.prototype={constructor:I,focus:function(){window.focus();ed(this);C(this)},setOption:function(fP,fQ){var fO=this.options,fN=fO[fP];if(fO[fP]==fQ&&fP!="mode"){return}fO[fP]=fQ;if(a4.hasOwnProperty(fP)){cL(this,a4[fP])(this,fQ,fN)}},getOption:function(fN){return this.options[fN]},getDoc:function(){return this.doc},addKeyMap:function(fO,fN){this.state.keyMaps[fN?"push":"unshift"](fO)},removeKeyMap:function(fO){var fP=this.state.keyMaps;for(var fN=0;fN<fP.length;++fN){if(fP[fN]==fO||(typeof fP[fN]!="string"&&fP[fN].name==fO)){fP.splice(fN,1);return true}}},addOverlay:cR(function(fN,fO){var fP=fN.token?fN:I.getMode(this.options,fN);if(fP.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:fP,modeSpec:fN,opaque:fO&&fO.opaque});this.state.modeGen++;af(this)}),removeOverlay:cR(function(fN){var fP=this.state.overlays;for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO].modeSpec;if(fQ==fN||typeof fN=="string"&&fQ.name==fN){fP.splice(fO,1);this.state.modeGen++;af(this);return}}}),indentLine:cR(function(fP,fN,fO){if(typeof fN!="string"&&typeof fN!="number"){if(fN==null){fN=this.options.smartIndent?"smart":"prev"}else{fN=fN?"add":"subtract"}}if(bW(this.doc,fP)){ab(this,fP,fN,fO)}}),indentSelection:cR(function(fS){var fO=this.doc.sel.ranges,fN=-1;for(var fR=0;fR<fO.length;fR++){var fP=fO[fR];if(!fP.empty()){var fU=Math.max(fN,fP.from().line);var fT=fP.to();fN=Math.min(this.lastLine(),fT.line-(fT.ch?0:1))+1;for(var fQ=fU;fQ<fN;++fQ){ab(this,fQ,fS)}}else{if(fP.head.line>fN){ab(this,fP.head.line,fS,true);fN=fP.head.line;if(fR==this.doc.sel.primIndex){fg(this)}}}}}),getTokenAt:function(fU,fO){var fR=this.doc;fU=fj(fR,fU);var fQ=dg(this,fU.line,fO),fT=this.doc.mode;var fN=eP(fR,fU.line);var fS=new ew(fN.text,this.options.tabSize);while(fS.pos<fU.ch&&!fS.eol()){fS.start=fS.pos;var fP=ef(fT,fS,fQ)}return{start:fS.start,end:fS.pos,string:fS.current(),type:fP||null,state:fQ}},getTokenTypeAt:function(fU){fU=fj(this.doc,fU);var fQ=cQ(this,eP(this.doc,fU.line));var fS=0,fT=(fQ.length-1)/2,fP=fU.ch;var fO;if(fP==0){fO=fQ[2]}else{for(;;){var fN=(fS+fT)>>1;if((fN?fQ[fN*2-1]:0)>=fP){fT=fN}else{if(fQ[fN*2+1]<fP){fS=fN+1}else{fO=fQ[fN*2+2];break}}}}var fR=fO?fO.indexOf("cm-overlay "):-1;return fR<0?fO:fR==0?null:fO.slice(0,fR-1)},getModeAt:function(fO){var fN=this.doc.mode;if(!fN.innerMode){return fN}return I.innerMode(fN,this.getTokenAt(fO).state).mode},getHelper:function(fO,fN){return this.getHelpers(fO,fN)[0]},getHelpers:function(fU,fP){var fQ=[];if(!eY.hasOwnProperty(fP)){return eY}var fN=eY[fP],fT=this.getModeAt(fU);if(typeof fT[fP]=="string"){if(fN[fT[fP]]){fQ.push(fN[fT[fP]])}}else{if(fT[fP]){for(var fO=0;fO<fT[fP].length;fO++){var fS=fN[fT[fP][fO]];if(fS){fQ.push(fS)}}}else{if(fT.helperType&&fN[fT.helperType]){fQ.push(fN[fT.helperType])}else{if(fN[fT.name]){fQ.push(fN[fT.name])}}}}for(var fO=0;fO<fN._global.length;fO++){var fR=fN._global[fO];if(fR.pred(fT,this)&&c1(fQ,fR.val)==-1){fQ.push(fR.val)}}return fQ},getStateAfter:function(fO,fN){var fP=this.doc;fO=cO(fP,fO==null?fP.first+fP.size-1:fO);return dg(this,fO+1,fN)},cursorCoords:function(fQ,fO){var fP,fN=this.doc.sel.primary();if(fQ==null){fP=fN.head}else{if(typeof fQ=="object"){fP=fj(this.doc,fQ)}else{fP=fQ?fN.from():fN.to()}}return dx(this,fP,fO||"page")},charCoords:function(fO,fN){return cx(this,fj(this.doc,fO),fN||"page")},coordsChar:function(fN,fO){fN=fJ(this,fN,fO||"page");return fo(this,fN.left,fN.top)},lineAtHeight:function(fN,fO){fN=fJ(this,{top:fN,left:0},fO||"page").top;return bv(this.doc,fN+this.display.viewOffset)},heightAtLine:function(fO,fR){var fN=false,fQ=this.doc.first+this.doc.size-1;if(fO<this.doc.first){fO=this.doc.first}else{if(fO>fQ){fO=fQ;fN=true}}var fP=eP(this.doc,fO);return et(this,fP,{top:0,left:0},fR||"page").top+(fN?this.doc.height-bB(fP):0)},defaultTextHeight:function(){return aN(this.display)},defaultCharWidth:function(){return di(this.display)},setGutterMarker:cR(function(fN,fO,fP){return eb(this,fN,"gutter",function(fQ){var fR=fQ.gutterMarkers||(fQ.gutterMarkers={});fR[fO]=fP;if(!fP&&ex(fR)){fQ.gutterMarkers=null}return true})}),clearGutter:cR(function(fP){var fN=this,fQ=fN.doc,fO=fQ.first;fQ.iter(function(fR){if(fR.gutterMarkers&&fR.gutterMarkers[fP]){fR.gutterMarkers[fP]=null;R(fN,fO,"gutter");if(ex(fR.gutterMarkers)){fR.gutterMarkers=null}}++fO})}),addLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fQ){var fR=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";if(!fQ[fR]){fQ[fR]=fN}else{if(new RegExp("(?:^|\\s)"+fN+"(?:$|\\s)").test(fQ[fR])){return false}else{fQ[fR]+=" "+fN}}return true})}),removeLineClass:cR(function(fP,fO,fN){return eb(this,fP,"class",function(fR){var fU=fO=="text"?"textClass":fO=="background"?"bgClass":"wrapClass";var fT=fR[fU];if(!fT){return false}else{if(fN==null){fR[fU]=null}else{var fS=fT.match(new RegExp("(?:^|\\s+)"+fN+"(?:$|\\s+)"));if(!fS){return false}var fQ=fS.index+fS[0].length;fR[fU]=fT.slice(0,fS.index)+(!fS.index||fQ==fT.length?"":" ")+fT.slice(fQ)||null}}return true})}),addLineWidget:cR(function(fP,fO,fN){return bw(this,fP,fO,fN)}),removeLineWidget:function(fN){fN.clear()},lineInfo:function(fN){if(typeof fN=="number"){if(!bW(this.doc,fN)){return null}var fO=fN;fN=eP(this.doc,fN);if(!fN){return null}}else{var fO=bC(fN);if(fO==null){return null}}return{line:fO,handle:fN,text:fN.text,gutterMarkers:fN.gutterMarkers,textClass:fN.textClass,bgClass:fN.bgClass,wrapClass:fN.wrapClass,widgets:fN.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(fS,fP,fU,fQ,fW){var fR=this.display;fS=dx(this,fj(this.doc,fS));var fT=fS.bottom,fO=fS.left;fP.style.position="absolute";fR.sizer.appendChild(fP);if(fQ=="over"){fT=fS.top}else{if(fQ=="above"||fQ=="near"){var fN=Math.max(fR.wrapper.clientHeight,this.doc.height),fV=Math.max(fR.sizer.clientWidth,fR.lineSpace.clientWidth);if((fQ=="above"||fS.bottom+fP.offsetHeight>fN)&&fS.top>fP.offsetHeight){fT=fS.top-fP.offsetHeight}else{if(fS.bottom+fP.offsetHeight<=fN){fT=fS.bottom}}if(fO+fP.offsetWidth>fV){fO=fV-fP.offsetWidth}}}fP.style.top=fT+"px";fP.style.left=fP.style.right="";if(fW=="right"){fO=fR.sizer.clientWidth-fP.offsetWidth;fP.style.right="0px"}else{if(fW=="left"){fO=0}else{if(fW=="middle"){fO=(fR.sizer.clientWidth-fP.offsetWidth)/2}}fP.style.left=fO+"px"}if(fU){F(this,fO,fT,fO+fP.offsetWidth,fT+fP.offsetHeight)}},triggerOnKeyDown:cR(q),triggerOnKeyPress:cR(cn),triggerOnKeyUp:cR(a7),execCommand:function(fN){if(eh.hasOwnProperty(fN)){return eh[fN](this)}},findPosH:function(fT,fQ,fR,fO){var fN=1;if(fQ<0){fN=-1;fQ=-fQ}for(var fP=0,fS=fj(this.doc,fT);fP<fQ;++fP){fS=bm(this.doc,fS,fN,fR,fO);if(fS.hitSide){break}}return fS},moveH:cR(function(fO,fP){var fN=this;fN.extendSelectionsBy(function(fQ){if(fN.display.shift||fN.doc.extend||fQ.empty()){return bm(fN.doc,fQ.head,fO,fP,fN.options.rtlMoveVisually)}else{return fO<0?fQ.from():fQ.to()}},cF)}),deleteH:cR(function(fN,fO){var fP=this.doc.sel,fQ=this.doc;if(fP.somethingSelected()){fQ.replaceSelection("",null,"+delete")}else{eA(this,function(fS){var fR=bm(fQ,fS.head,fN,fO,false);return fN<0?{from:fR,to:fS.head}:{from:fS.head,to:fR}})}}),findPosV:function(fS,fP,fT,fV){var fN=1,fR=fV;if(fP<0){fN=-1;fP=-fP}for(var fO=0,fU=fj(this.doc,fS);fO<fP;++fO){var fQ=dx(this,fU,"div");if(fR==null){fR=fQ.left}else{fQ.left=fR}fU=bg(this,fQ,fN,fT);if(fU.hitSide){break}}return fU},moveV:cR(function(fO,fQ){var fN=this,fS=this.doc,fR=[];var fT=!fN.display.shift&&!fS.extend&&fS.sel.somethingSelected();fS.extendSelectionsBy(function(fU){if(fT){return fO<0?fU.from():fU.to()}var fW=dx(fN,fU.head,"div");if(fU.goalColumn!=null){fW.left=fU.goalColumn}fR.push(fW.left);var fV=bg(fN,fW,fO,fQ);if(fQ=="page"&&fU==fS.sel.primary()){cy(fN,null,cx(fN,fV,"div").top-fW.top)}return fV},cF);if(fR.length){for(var fP=0;fP<fS.sel.ranges.length;fP++){fS.sel.ranges[fP].goalColumn=fR[fP]}}}),toggleOverwrite:function(fN){if(fN!=null&&fN==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){fb(this.display.cursorDiv,"CodeMirror-overwrite")}else{g(this.display.cursorDiv,"CodeMirror-overwrite")}az(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return ds()==this.display.input},scrollTo:cR(function(fN,fO){if(fN!=null||fO!=null){fd(this)}if(fN!=null){this.curOp.scrollLeft=fN}if(fO!=null){this.curOp.scrollTop=fO}}),getScrollInfo:function(){var fN=this.display.scroller,fO=ba;return{left:fN.scrollLeft,top:fN.scrollTop,height:fN.scrollHeight-fO,width:fN.scrollWidth-fO,clientHeight:fN.clientHeight-fO,clientWidth:fN.clientWidth-fO}},scrollIntoView:cR(function(fO,fP){if(fO==null){fO={from:this.doc.sel.primary().head,to:null};if(fP==null){fP=this.options.cursorScrollMargin}}else{if(typeof fO=="number"){fO={from:W(fO,0),to:null}}else{if(fO.from==null){fO={from:fO,to:null}}}}if(!fO.to){fO.to=fO.from}fO.margin=fP||0;if(fO.from.line!=null){fd(this);this.curOp.scrollToPos=fO}else{var fN=H(this,Math.min(fO.from.left,fO.to.left),Math.min(fO.from.top,fO.to.top)-fO.margin,Math.max(fO.from.right,fO.to.right),Math.max(fO.from.bottom,fO.to.bottom)+fO.margin);this.scrollTo(fN.scrollLeft,fN.scrollTop)}}),setSize:cR(function(fP,fN){function fO(fQ){return typeof fQ=="number"||/^\d+$/.test(String(fQ))?fQ+"px":fQ}if(fP!=null){this.display.wrapper.style.width=fO(fP)}if(fN!=null){this.display.wrapper.style.height=fO(fN)}if(this.options.lineWrapping){aF(this)}this.curOp.forceUpdate=true;az(this,"refresh",this)}),operation:function(fN){return cz(this,fN)},refresh:cR(function(){var fN=this.display.cachedTextHeight;af(this);this.curOp.forceUpdate=true;ai(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);cN(this);if(fN==null||Math.abs(fN-aN(this.display))>0.5){X(this)}az(this,"refresh",this)}),swapDoc:cR(function(fO){var fN=this.doc;fN.cm=null;dN(this,fO);ai(this);eZ(this);this.scrollTo(fO.scrollLeft,fO.scrollTop);ac(this,"swapDoc",this,fN);return fN}),getInputField:function(){return this.display.input},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}};bo(I);var eF=I.defaults={};var a4=I.optionHandlers={};function t(fN,fQ,fP,fO){I.defaults[fN]=fQ;if(fP){a4[fN]=fO?function(fR,fT,fS){if(fS!=b2){fP(fR,fT,fS)}}:fP}}var b2=I.Init={toString:function(){return"CodeMirror.Init"}};t("value","",function(fN,fO){fN.setValue(fO)},true);t("mode",null,function(fN,fO){fN.doc.modeOption=fO;bh(fN)},true);t("indentUnit",2,bh,true);t("indentWithTabs",false);t("smartIndent",true);t("tabSize",4,function(fN){dX(fN);ai(fN);af(fN)},true);t("specialChars",/[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g,function(fN,fO){fN.options.specialChars=new RegExp(fO.source+(fO.test("\t")?"":"|\t"),"g");fN.refresh()},true);t("specialCharPlaceholder",eN,function(fN){fN.refresh()},true);t("electricChars",true);t("rtlMoveVisually",!aG);t("wholeLineUpdateBefore",true);t("theme","default",function(fN){cB(fN);db(fN)},true);t("keyMap","default",fK);t("extraKeys",null);t("lineWrapping",false,ek,true);t("gutters",[],function(fN){b4(fN.options);db(fN)},true);t("fixedGutter",true,function(fN,fO){fN.display.gutters.style.left=fO?dA(fN.display)+"px":"0";fN.refresh()},true);t("coverGutterNextToScrollbar",false,eB,true);t("lineNumbers",false,function(fN){b4(fN.options);db(fN)},true);t("firstLineNumber",1,db,true);t("lineNumberFormatter",function(fN){return fN},db,true);t("showCursorWhenSelecting",false,br,true);t("resetSelectionOnContextMenu",true);t("readOnly",false,function(fN,fO){if(fO=="nocursor"){aL(fN);fN.display.input.blur();fN.display.disabled=true}else{fN.display.disabled=false;if(!fO){eZ(fN)}}});t("disableInput",false,function(fN,fO){if(!fO){eZ(fN)}},true);t("dragDrop",true);t("cursorBlinkRate",530);t("cursorScrollMargin",0);t("cursorHeight",1);t("workTime",100);t("workDelay",100);t("flattenSpans",true,dX,true);t("addModeClass",false,dX,true);t("pollInterval",100);t("undoDepth",200,function(fN,fO){fN.doc.history.undoDepth=fO});t("historyEventDelay",1250);t("viewportMargin",10,function(fN){fN.refresh()},true);t("maxHighlightLength",10000,dX,true);t("moveInputWithCursor",true,function(fN,fO){if(!fO){fN.display.inputDiv.style.top=fN.display.inputDiv.style.left=0}});t("tabindex",null,function(fN,fO){fN.display.input.tabIndex=fO||""});t("autofocus",null);var c8=I.modes={},aJ=I.mimeModes={};I.defineMode=function(fN,fP){if(!I.defaults.mode&&fN!="null"){I.defaults.mode=fN}if(arguments.length>2){fP.dependencies=[];for(var fO=2;fO<arguments.length;++fO){fP.dependencies.push(arguments[fO])}}c8[fN]=fP};I.defineMIME=function(fO,fN){aJ[fO]=fN};I.resolveMode=function(fN){if(typeof fN=="string"&&aJ.hasOwnProperty(fN)){fN=aJ[fN]}else{if(fN&&typeof fN.name=="string"&&aJ.hasOwnProperty(fN.name)){var fO=aJ[fN.name];if(typeof fO=="string"){fO={name:fO}}fN=ca(fO,fN);fN.name=fO.name}else{if(typeof fN=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(fN)){return I.resolveMode("application/xml")}}}if(typeof fN=="string"){return{name:fN}}else{return fN||{name:"null"}}};I.getMode=function(fO,fN){var fN=I.resolveMode(fN);var fQ=c8[fN.name];if(!fQ){return I.getMode(fO,"text/plain")}var fR=fQ(fO,fN);if(c5.hasOwnProperty(fN.name)){var fP=c5[fN.name];for(var fS in fP){if(!fP.hasOwnProperty(fS)){continue}if(fR.hasOwnProperty(fS)){fR["_"+fS]=fR[fS]}fR[fS]=fP[fS]}}fR.name=fN.name;if(fN.helperType){fR.helperType=fN.helperType}if(fN.modeProps){for(var fS in fN.modeProps){fR[fS]=fN.modeProps[fS]}}return fR};I.defineMode("null",function(){return{token:function(fN){fN.skipToEnd()}}});I.defineMIME("text/plain","null");var c5=I.modeExtensions={};I.extendMode=function(fP,fO){var fN=c5.hasOwnProperty(fP)?c5[fP]:(c5[fP]={});aE(fO,fN)};I.defineExtension=function(fN,fO){I.prototype[fN]=fO};I.defineDocExtension=function(fN,fO){ao.prototype[fN]=fO};I.defineOption=t;var aY=[];I.defineInitHook=function(fN){aY.push(fN)};var eY=I.helpers={};I.registerHelper=function(fO,fN,fP){if(!eY.hasOwnProperty(fO)){eY[fO]=I[fO]={_global:[]}}eY[fO][fN]=fP};I.registerGlobalHelper=function(fP,fO,fN,fQ){I.registerHelper(fP,fO,fQ);eY[fP]._global.push({pred:fN,val:fQ})};var bR=I.copyState=function(fQ,fN){if(fN===true){return fN}if(fQ.copyState){return fQ.copyState(fN)}var fP={};for(var fR in fN){var fO=fN[fR];if(fO instanceof Array){fO=fO.concat([])}fP[fR]=fO}return fP};var bP=I.startState=function(fP,fO,fN){return fP.startState?fP.startState(fO,fN):true};I.innerMode=function(fP,fN){while(fP.innerMode){var fO=fP.innerMode(fN);if(!fO||fO.mode==fP){break}fN=fO.state;fP=fO.mode}return fO||{mode:fP,state:fN}};var eh=I.commands={selectAll:function(fN){fN.setSelection(W(fN.firstLine(),0),W(fN.lastLine()),Y)},singleSelection:function(fN){fN.setSelection(fN.getCursor("anchor"),fN.getCursor("head"),Y)},killLine:function(fN){eA(fN,function(fP){if(fP.empty()){var fO=eP(fN.doc,fP.head.line).text.length;if(fP.head.ch==fO&&fP.head.line<fN.lastLine()){return{from:fP.head,to:W(fP.head.line+1,0)}}else{return{from:fP.head,to:W(fP.head.line,fO)}}}else{return{from:fP.from(),to:fP.to()}}})},deleteLine:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fj(fN.doc,W(fO.to().line+1,0))}})},delLineLeft:function(fN){eA(fN,function(fO){return{from:W(fO.from().line,0),to:fO.from()}})},undo:function(fN){fN.undo()},redo:function(fN){fN.redo()},undoSelection:function(fN){fN.undoSelection()},redoSelection:function(fN){fN.redoSelection()},goDocStart:function(fN){fN.extendSelection(W(fN.firstLine(),0))},goDocEnd:function(fN){fN.extendSelection(W(fN.lastLine()))},goLineStart:function(fN){fN.extendSelectionsBy(function(fO){return bj(fN,fO.head.line)},cF)},goLineStartSmart:function(fN){fN.extendSelectionsBy(function(fQ){var fT=bj(fN,fQ.head.line);var fP=fN.getLineHandle(fT.line);var fO=a(fP);if(!fO||fO[0].level==0){var fS=Math.max(0,fP.text.search(/\S/));var fR=fQ.head.line==fT.line&&fQ.head.ch<=fS&&fQ.head.ch;return W(fT.line,fR?0:fS)}return fT},cF)},goLineEnd:function(fN){fN.extendSelectionsBy(function(fO){return dt(fN,fO.head.line)},cF)},goLineRight:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:fN.display.lineDiv.offsetWidth+100,top:fP},"div")},cF)},goLineLeft:function(fN){fN.extendSelectionsBy(function(fO){var fP=fN.charCoords(fO.head,"div").top+5;return fN.coordsChar({left:0,top:fP},"div")},cF)},goLineUp:function(fN){fN.moveV(-1,"line")},goLineDown:function(fN){fN.moveV(1,"line")},goPageUp:function(fN){fN.moveV(-1,"page")},goPageDown:function(fN){fN.moveV(1,"page")},goCharLeft:function(fN){fN.moveH(-1,"char")},goCharRight:function(fN){fN.moveH(1,"char")},goColumnLeft:function(fN){fN.moveH(-1,"column")},goColumnRight:function(fN){fN.moveH(1,"column")},goWordLeft:function(fN){fN.moveH(-1,"word")},goGroupRight:function(fN){fN.moveH(1,"group")},goGroupLeft:function(fN){fN.moveH(-1,"group")},goWordRight:function(fN){fN.moveH(1,"word")},delCharBefore:function(fN){fN.deleteH(-1,"char")},delCharAfter:function(fN){fN.deleteH(1,"char")},delWordBefore:function(fN){fN.deleteH(-1,"word")},delWordAfter:function(fN){fN.deleteH(1,"word")},delGroupBefore:function(fN){fN.deleteH(-1,"group")},delGroupAfter:function(fN){fN.deleteH(1,"group")},indentAuto:function(fN){fN.indentSelection("smart")},indentMore:function(fN){fN.indentSelection("add")},indentLess:function(fN){fN.indentSelection("subtract")},insertTab:function(fN){fN.replaceSelection("\t")},insertSoftTab:function(fN){var fP=[],fO=fN.listSelections(),fS=fN.options.tabSize;for(var fR=0;fR<fO.length;fR++){var fT=fO[fR].from();var fQ=bI(fN.getLine(fT.line),fT.ch,fS);fP.push(new Array(fS-fQ%fS+1).join(" "))}fN.replaceSelections(fP)},defaultTab:function(fN){if(fN.somethingSelected()){fN.indentSelection("add")}else{fN.execCommand("insertTab")}},transposeChars:function(fN){cz(fN,function(){var fP=fN.listSelections();for(var fQ=0;fQ<fP.length;fQ++){var fR=fP[fQ].head,fO=eP(fN.doc,fR.line).text;if(fR.ch>0&&fR.ch<fO.length-1){fN.replaceRange(fO.charAt(fR.ch)+fO.charAt(fR.ch-1),W(fR.line,fR.ch-1),W(fR.line,fR.ch+1))}}})},newlineAndIndent:function(fN){cz(fN,function(){var fO=fN.listSelections().length;for(var fQ=0;fQ<fO;fQ++){var fP=fN.listSelections()[fQ];fN.replaceRange("\n",fP.anchor,fP.head,"+input");fN.indentLine(fP.from().line+1,null,true);fg(fN)}})},toggleOverwrite:function(fN){fN.toggleOverwrite()}};var eK=I.keyMap={};eK.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"};eK.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-Up":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Down":"goDocEnd","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"};eK.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineStart","Cmd-Right":"goLineEnd","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delLineLeft","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection",fallthrough:["basic","emacsy"]};eK.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars"};eK["default"]=bU?eK.macDefault:eK.pcDefault;function fu(fN){if(typeof fN=="string"){return eK[fN]}else{return fN}}var j=I.lookupKey=function(fO,fS,fQ){function fR(fX){fX=fu(fX);var fW=fX[fO];if(fW===false){return"stop"}if(fW!=null&&fQ(fW)){return true}if(fX.nofallthrough){return"stop"}var fV=fX.fallthrough;if(fV==null){return false}if(Object.prototype.toString.call(fV)!="[object Array]"){return fR(fV)}for(var fU=0;fU<fV.length;++fU){var fT=fR(fV[fU]);if(fT){return fT}}return false}for(var fP=0;fP<fS.length;++fP){var fN=fR(fS[fP]);if(fN){return fN!="stop"}}};var eg=I.isModifierKey=function(fO){var fN=eQ[fO.keyCode];return fN=="Ctrl"||fN=="Alt"||fN=="Shift"||fN=="Mod"};var e2=I.keyName=function(fO,fP){if(dF&&fO.keyCode==34&&fO["char"]){return false}var fN=eQ[fO.keyCode];if(fN==null||fO.altGraphKey){return false}if(fO.altKey){fN="Alt-"+fN}if(bF?fO.metaKey:fO.ctrlKey){fN="Ctrl-"+fN}if(bF?fO.ctrlKey:fO.metaKey){fN="Cmd-"+fN}if(!fP&&fO.shiftKey){fN="Shift-"+fN}return fN};I.fromTextArea=function(fU,fV){if(!fV){fV={}}fV.value=fU.value;if(!fV.tabindex&&fU.tabindex){fV.tabindex=fU.tabindex}if(!fV.placeholder&&fU.placeholder){fV.placeholder=fU.placeholder}if(fV.autofocus==null){var fN=ds();fV.autofocus=fN==fU||fU.getAttribute("autofocus")!=null&&fN==document.body}function fR(){fU.value=fT.getValue()}if(fU.form){bM(fU.form,"submit",fR);if(!fV.leaveSubmitMethodAlone){var fO=fU.form,fS=fO.submit;try{var fQ=fO.submit=function(){fR();fO.submit=fS;fO.submit();fO.submit=fQ}}catch(fP){}}}fU.style.display="none";var fT=I(function(fW){fU.parentNode.insertBefore(fW,fU.nextSibling)},fV);fT.save=fR;fT.getTextArea=function(){return fU};fT.toTextArea=function(){fR();fU.parentNode.removeChild(fT.getWrapperElement());fU.style.display="";if(fU.form){dP(fU.form,"submit",fR);if(typeof fU.form.submit=="function"){fU.form.submit=fS}}};return fT};var ew=I.StringStream=function(fN,fO){this.pos=this.start=0;this.string=fN;this.tabSize=fO||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};ew.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(fN){var fP=this.string.charAt(this.pos);if(typeof fN=="string"){var fO=fP==fN}else{var fO=fP&&(fN.test?fN.test(fP):fN(fP))}if(fO){++this.pos;return fP}},eatWhile:function(fN){var fO=this.pos;while(this.eat(fN)){}return this.pos>fO},eatSpace:function(){var fN=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>fN},skipToEnd:function(){this.pos=this.string.length},skipTo:function(fN){var fO=this.string.indexOf(fN,this.pos);if(fO>-1){this.pos=fO;return true}},backUp:function(fN){this.pos-=fN},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bI(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bI(this.string,null,this.tabSize)-(this.lineStart?bI(this.string,this.lineStart,this.tabSize):0)},match:function(fR,fO,fN){if(typeof fR=="string"){var fS=function(fT){return fN?fT.toLowerCase():fT};var fQ=this.string.substr(this.pos,fR.length);if(fS(fQ)==fS(fR)){if(fO!==false){this.pos+=fR.length}return true}}else{var fP=this.string.slice(this.pos).match(fR);if(fP&&fP.index>0){return null}if(fP&&fO!==false){this.pos+=fP[0].length}return fP}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(fO,fN){this.lineStart+=fO;try{return fN()}finally{this.lineStart-=fO}}};var P=I.TextMarker=function(fO,fN){this.lines=[];this.type=fN;this.doc=fO};bo(P);P.prototype.clear=function(){if(this.explicitlyCleared){return}var fU=this.doc.cm,fO=fU&&!fU.curOp;if(fO){cw(fU)}if(eS(this,"clear")){var fV=this.find();if(fV){ac(this,"clear",fV.from,fV.to)}}var fP=null,fS=null;for(var fQ=0;fQ<this.lines.length;++fQ){var fW=this.lines[fQ];var fT=eJ(fW.markedSpans,this);if(fU&&!this.collapsed){R(fU,bC(fW),"text")}else{if(fU){if(fT.to!=null){fS=bC(fW)}if(fT.from!=null){fP=bC(fW)}}}fW.markedSpans=el(fW.markedSpans,fT);if(fT.from==null&&this.collapsed&&!e7(this.doc,fW)&&fU){fA(fW,aN(fU.display))}}if(fU&&this.collapsed&&!fU.options.lineWrapping){for(var fQ=0;fQ<this.lines.length;++fQ){var fN=z(this.lines[fQ]),fR=dY(fN);if(fR>fU.display.maxLineLength){fU.display.maxLine=fN;fU.display.maxLineLength=fR;fU.display.maxLineChanged=true}}}if(fP!=null&&fU&&this.collapsed){af(fU,fP,fS+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(fU){ea(fU.doc)}}if(fU){ac(fU,"markerCleared",fU,this)}if(fO){aj(fU)}if(this.parent){this.parent.clear()}};P.prototype.find=function(fQ,fO){if(fQ==null&&this.type=="bookmark"){fQ=1}var fT,fS;for(var fP=0;fP<this.lines.length;++fP){var fN=this.lines[fP];var fR=eJ(fN.markedSpans,this);if(fR.from!=null){fT=W(fO?fN:bC(fN),fR.from);if(fQ==-1){return fT}}if(fR.to!=null){fS=W(fO?fN:bC(fN),fR.to);if(fQ==1){return fS}}}return fT&&{from:fT,to:fS}};P.prototype.changed=function(){var fP=this.find(-1,true),fO=this,fN=this.doc.cm;if(!fP||!fN){return}cz(fN,function(){var fR=fP.line,fS=bC(fP.line);var fQ=eL(fN,fS);if(fQ){ap(fQ);fN.curOp.selectionChanged=fN.curOp.forceUpdate=true}fN.curOp.updateMaxLine=true;if(!e7(fO.doc,fR)&&fO.height!=null){var fU=fO.height;fO.height=null;var fT=cH(fO)-fU;if(fT){fA(fR,fR.height+fT)}}})};P.prototype.attachLine=function(fN){if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;if(!fO.maybeHiddenMarkers||c1(fO.maybeHiddenMarkers,this)==-1){(fO.maybeUnhiddenMarkers||(fO.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(fN)};P.prototype.detachLine=function(fN){this.lines.splice(c1(this.lines,fN),1);if(!this.lines.length&&this.doc.cm){var fO=this.doc.cm.curOp;(fO.maybeHiddenMarkers||(fO.maybeHiddenMarkers=[])).push(this)}};var aV=0;function ej(fV,fT,fU,fX,fR){if(fX&&fX.shared){return O(fV,fT,fU,fX,fR)}if(fV.cm&&!fV.cm.curOp){return cL(fV.cm,ej)(fV,fT,fU,fX,fR)}var fQ=new P(fV,fR),fW=b5(fT,fU);if(fX){aE(fX,fQ,false)}if(fW>0||fW==0&&fQ.clearWhenEmpty!==false){return fQ}if(fQ.replacedWith){fQ.collapsed=true;fQ.widgetNode=fw("span",[fQ.replacedWith],"CodeMirror-widget");if(!fX.handleMouseEvents){fQ.widgetNode.ignoreEvents=true}if(fX.insertLeft){fQ.widgetNode.insertLeft=true}}if(fQ.collapsed){if(A(fV,fT.line,fT,fU,fQ)||fT.line!=fU.line&&A(fV,fU.line,fT,fU,fQ)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}aX=true}if(fQ.addToHistory){fm(fV,{from:fT,to:fU,origin:"markText"},fV.sel,NaN)}var fO=fT.line,fS=fV.cm,fN;fV.iter(fO,fU.line+1,function(fY){if(fS&&fQ.collapsed&&!fS.options.lineWrapping&&z(fY)==fS.display.maxLine){fN=true}if(fQ.collapsed&&fO!=fT.line){fA(fY,0)}b3(fY,new dU(fQ,fO==fT.line?fT.ch:null,fO==fU.line?fU.ch:null));++fO});if(fQ.collapsed){fV.iter(fT.line,fU.line+1,function(fY){if(e7(fV,fY)){fA(fY,0)}})}if(fQ.clearOnEnter){bM(fQ,"beforeCursorEnter",function(){fQ.clear()})}if(fQ.readOnly){fH=true;if(fV.history.done.length||fV.history.undone.length){fV.clearHistory()}}if(fQ.collapsed){fQ.id=++aV;fQ.atomic=true}if(fS){if(fN){fS.curOp.updateMaxLine=true}if(fQ.collapsed){af(fS,fT.line,fU.line+1)}else{if(fQ.className||fQ.title||fQ.startStyle||fQ.endStyle){for(var fP=fT.line;fP<=fU.line;fP++){R(fS,fP,"text")}}}if(fQ.atomic){ea(fS.doc)}ac(fS,"markerAdded",fS,fQ)}return fQ}var y=I.SharedTextMarker=function(fP,fO){this.markers=fP;this.primary=fO;for(var fN=0;fN<fP.length;++fN){fP[fN].parent=this}};bo(y);y.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var fN=0;fN<this.markers.length;++fN){this.markers[fN].clear()}ac(this,"clear")};y.prototype.find=function(fO,fN){return this.primary.find(fO,fN)};function O(fR,fU,fT,fN,fP){fN=aE(fN);fN.shared=false;var fS=[ej(fR,fU,fT,fN,fP)],fO=fS[0];var fQ=fN.widgetNode;dK(fR,function(fW){if(fQ){fN.widgetNode=fQ.cloneNode(true)}fS.push(ej(fW,fj(fW,fU),fj(fW,fT),fN,fP));for(var fV=0;fV<fW.linked.length;++fV){if(fW.linked[fV].isParent){return}}fO=fh(fS)});return new y(fS,fO)}function es(fN){return fN.findMarks(W(fN.first,0),fN.clipPos(W(fN.lastLine())),function(fO){return fO.parent})}function dk(fS,fT){for(var fQ=0;fQ<fT.length;fQ++){var fO=fT[fQ],fU=fO.find();var fN=fS.clipPos(fU.from),fR=fS.clipPos(fU.to);if(b5(fN,fR)){var fP=ej(fS,fN,fR,fO.primary,fO.primary.type);fO.markers.push(fP);fP.parent=fO}}}function d0(fQ){for(var fP=0;fP<fQ.length;fP++){var fN=fQ[fP],fS=[fN.primary.doc];dK(fN.primary.doc,function(fT){fS.push(fT)});for(var fO=0;fO<fN.markers.length;fO++){var fR=fN.markers[fO];if(c1(fS,fR.doc)==-1){fR.parent=null;fN.markers.splice(fO--,1)}}}}function dU(fN,fP,fO){this.marker=fN;this.from=fP;this.to=fO}function eJ(fP,fN){if(fP){for(var fO=0;fO<fP.length;++fO){var fQ=fP[fO];if(fQ.marker==fN){return fQ}}}}function el(fO,fP){for(var fQ,fN=0;fN<fO.length;++fN){if(fO[fN]!=fP){(fQ||(fQ=[])).push(fO[fN])}}return fQ}function b3(fN,fO){fN.markedSpans=fN.markedSpans?fN.markedSpans.concat([fO]):[fO];fO.marker.attachLine(fN)}function aH(fO,fP,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fP:fV.from<fP);if(fN||fV.from==fP&&fS.type=="bookmark"&&(!fT||!fV.marker.insertLeft)){var fQ=fV.to==null||(fS.inclusiveRight?fV.to>=fP:fV.to>fP);(fU||(fU=[])).push(new dU(fS,fV.from,fQ?null:fV.to))}}}return fU}function ax(fO,fQ,fT){if(fO){for(var fR=0,fU;fR<fO.length;++fR){var fV=fO[fR],fS=fV.marker;var fP=fV.to==null||(fS.inclusiveRight?fV.to>=fQ:fV.to>fQ);if(fP||fV.from==fQ&&fS.type=="bookmark"&&(!fT||fV.marker.insertLeft)){var fN=fV.from==null||(fS.inclusiveLeft?fV.from<=fQ:fV.from<fQ);(fU||(fU=[])).push(new dU(fS,fN?null:fV.from-fQ,fV.to==null?null:fV.to-fQ))}}}return fU}function dW(fZ,fW){var fV=bW(fZ,fW.from.line)&&eP(fZ,fW.from.line).markedSpans;var f2=bW(fZ,fW.to.line)&&eP(fZ,fW.to.line).markedSpans;if(!fV&&!f2){return null}var fO=fW.from.ch,fR=fW.to.ch,fU=b5(fW.from,fW.to)==0;var fT=aH(fV,fO,fU);var f1=ax(f2,fR,fU);var f0=fW.text.length==1,fP=fh(fW.text).length+(f0?fO:0);if(fT){for(var fQ=0;fQ<fT.length;++fQ){var fY=fT[fQ];if(fY.to==null){var f3=eJ(f1,fY.marker);if(!f3){fY.to=fO}else{if(f0){fY.to=f3.to==null?null:f3.to+fP}}}}}if(f1){for(var fQ=0;fQ<f1.length;++fQ){var fY=f1[fQ];if(fY.to!=null){fY.to+=fP}if(fY.from==null){var f3=eJ(fT,fY.marker);if(!f3){fY.from=fP;if(f0){(fT||(fT=[])).push(fY)}}}else{fY.from+=fP;if(f0){(fT||(fT=[])).push(fY)}}}}if(fT){fT=r(fT)}if(f1&&f1!=fT){f1=r(f1)}var fS=[fT];if(!f0){var fX=fW.text.length-2,fN;if(fX>0&&fT){for(var fQ=0;fQ<fT.length;++fQ){if(fT[fQ].to==null){(fN||(fN=[])).push(new dU(fT[fQ].marker,null,null))}}}for(var fQ=0;fQ<fX;++fQ){fS.push(fN)}fS.push(f1)}return fS}function r(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if(fP.from!=null&&fP.from==fP.to&&fP.marker.clearWhenEmpty!==false){fO.splice(fN--,1)}}if(!fO.length){return null}return fO}function dM(fV,fT){var fN=bS(fV,fT);var fW=dW(fV,fT);if(!fN){return fW}if(!fW){return fN}for(var fQ=0;fQ<fN.length;++fQ){var fR=fN[fQ],fS=fW[fQ];if(fR&&fS){spans:for(var fP=0;fP<fS.length;++fP){var fU=fS[fP];for(var fO=0;fO<fR.length;++fO){if(fR[fO].marker==fU.marker){continue spans}}fR.push(fU)}}else{if(fS){fN[fQ]=fS}}}return fN}function cv(fZ,fX,fY){var fR=null;fZ.iter(fX.line,fY.line+1,function(f0){if(f0.markedSpans){for(var f1=0;f1<f0.markedSpans.length;++f1){var f2=f0.markedSpans[f1].marker;if(f2.readOnly&&(!fR||c1(fR,f2)==-1)){(fR||(fR=[])).push(f2)}}}});if(!fR){return null}var fS=[{from:fX,to:fY}];for(var fT=0;fT<fR.length;++fT){var fU=fR[fT],fP=fU.find(0);for(var fQ=0;fQ<fS.length;++fQ){var fO=fS[fQ];if(b5(fO.to,fP.from)<0||b5(fO.from,fP.to)>0){continue}var fW=[fQ,1],fN=b5(fO.from,fP.from),fV=b5(fO.to,fP.to);if(fN<0||!fU.inclusiveLeft&&!fN){fW.push({from:fO.from,to:fP.from})}if(fV>0||!fU.inclusiveRight&&!fV){fW.push({from:fP.to,to:fO.to})}fS.splice.apply(fS,fW);fQ+=fW.length-1}}return fS}function fD(fN){var fP=fN.markedSpans;if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.detachLine(fN)}fN.markedSpans=null}function cM(fN,fP){if(!fP){return}for(var fO=0;fO<fP.length;++fO){fP[fO].marker.attachLine(fN)}fN.markedSpans=fP}function w(fN){return fN.inclusiveLeft?-1:0}function bL(fN){return fN.inclusiveRight?1:0}function du(fQ,fO){var fS=fQ.lines.length-fO.lines.length;if(fS!=0){return fS}var fP=fQ.find(),fT=fO.find();var fN=b5(fP.from,fT.from)||w(fQ)-w(fO);if(fN){return -fN}var fR=b5(fP.to,fT.to)||bL(fQ)-bL(fO);if(fR){return fR}return fO.id-fQ.id}function aW(fO,fS){var fN=aX&&fO.markedSpans,fR;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(fQ.marker.collapsed&&(fS?fQ.from:fQ.to)==null&&(!fR||du(fR,fQ.marker)<0)){fR=fQ.marker}}}return fR}function er(fN){return aW(fN,true)}function d7(fN){return aW(fN,false)}function A(fV,fP,fT,fU,fR){var fY=eP(fV,fP);var fN=aX&&fY.markedSpans;if(fN){for(var fQ=0;fQ<fN.length;++fQ){var fO=fN[fQ];if(!fO.marker.collapsed){continue}var fX=fO.marker.find(0);var fW=b5(fX.from,fT)||w(fO.marker)-w(fR);var fS=b5(fX.to,fU)||bL(fO.marker)-bL(fR);if(fW>=0&&fS<=0||fW<=0&&fS>=0){continue}if(fW<=0&&(b5(fX.to,fT)||bL(fO.marker)-w(fR))>0||fW>=0&&(b5(fX.from,fU)||w(fO.marker)-bL(fR))<0){return true}}}}function z(fO){var fN;while(fN=er(fO)){fO=fN.find(-1,true).line}return fO}function i(fP){var fN,fO;while(fN=d7(fP)){fP=fN.find(1,true).line;(fO||(fO=[])).push(fP)}return fO}function aM(fQ,fO){var fN=eP(fQ,fO),fP=z(fN);if(fN==fP){return fO}return bC(fP)}function dG(fQ,fP){if(fP>fQ.lastLine()){return fP}var fO=eP(fQ,fP),fN;if(!e7(fQ,fO)){return fP}while(fN=d7(fO)){fO=fN.find(1,true).line}return bC(fO)+1}function e7(fR,fO){var fN=aX&&fO.markedSpans;if(fN){for(var fQ,fP=0;fP<fN.length;++fP){fQ=fN[fP];if(!fQ.marker.collapsed){continue}if(fQ.from==null){return true}if(fQ.marker.widgetNode){continue}if(fQ.from==0&&fQ.marker.inclusiveLeft&&T(fR,fO,fQ)){return true}}}}function T(fS,fO,fQ){if(fQ.to==null){var fN=fQ.marker.find(1,true);return T(fS,fN.line,eJ(fN.line.markedSpans,fQ.marker))}if(fQ.marker.inclusiveRight&&fQ.to==fO.text.length){return true}for(var fR,fP=0;fP<fO.markedSpans.length;++fP){fR=fO.markedSpans[fP];if(fR.marker.collapsed&&!fR.marker.widgetNode&&fR.from==fQ.to&&(fR.to==null||fR.to!=fQ.from)&&(fR.marker.inclusiveLeft||fQ.marker.inclusiveRight)&&T(fS,fO,fR)){return true}}}var dh=I.LineWidget=function(fN,fQ,fO){if(fO){for(var fP in fO){if(fO.hasOwnProperty(fP)){this[fP]=fO[fP]}}}this.cm=fN;this.node=fQ};bo(dh);function dD(fN,fO,fP){if(bB(fO)<((fN.curOp&&fN.curOp.scrollTop)||fN.doc.scrollTop)){cy(fN,null,fP)}}dh.prototype.clear=function(){var fO=this.cm,fQ=this.line.widgets,fP=this.line,fS=bC(fP);if(fS==null||!fQ){return}for(var fR=0;fR<fQ.length;++fR){if(fQ[fR]==this){fQ.splice(fR--,1)}}if(!fQ.length){fP.widgets=null}var fN=cH(this);cz(fO,function(){dD(fO,fP,-fN);R(fO,fS,"widget");fA(fP,Math.max(0,fP.height-fN))})};dh.prototype.changed=function(){var fO=this.height,fN=this.cm,fP=this.line;this.height=null;var fQ=cH(this)-fO;if(!fQ){return}cz(fN,function(){fN.curOp.forceUpdate=true;dD(fN,fP,fQ);fA(fP,fP.height+fQ)})};function cH(fN){if(fN.height!=null){return fN.height}if(!fF(document.body,fN.node)){bG(fN.cm.display.measure,fw("div",[fN.node],null,"position: relative"))}return fN.height=fN.node.offsetHeight}function bw(fN,fR,fP,fO){var fQ=new dh(fN,fP,fO);if(fQ.noHScroll){fN.display.alignWidgets=true}eb(fN,fR,"widget",function(fT){var fU=fT.widgets||(fT.widgets=[]);if(fQ.insertAt==null){fU.push(fQ)}else{fU.splice(Math.min(fU.length-1,Math.max(0,fQ.insertAt)),0,fQ)}fQ.line=fT;if(!e7(fN.doc,fT)){var fS=bB(fT)<fN.doc.scrollTop;fA(fT,fT.height+cH(fQ));if(fS){cy(fN,null,fQ.height)}fN.curOp.forceUpdate=true}return true});return fQ}var fC=I.Line=function(fP,fO,fN){this.text=fP;cM(this,fO);this.height=fN?fN(this):1};bo(fC);fC.prototype.lineNo=function(){return bC(this)};function dZ(fO,fR,fP,fN){fO.text=fR;if(fO.stateAfter){fO.stateAfter=null}if(fO.styles){fO.styles=null}if(fO.order!=null){fO.order=null}fD(fO);cM(fO,fP);var fQ=fN?fN(fO):1;if(fQ!=fO.height){fA(fO,fQ)}}function bq(fN){fN.parent=null;fD(fN)}function c2(fP,fO){if(fP){for(;;){var fN=fP.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fN){break}fP=fP.slice(0,fN.index)+fP.slice(fN.index+fN[0].length);var fQ=fN[1]?"bgClass":"textClass";if(fO[fQ]==null){fO[fQ]=fN[2]}else{if(!(new RegExp("(?:^|s)"+fN[2]+"(?:$|s)")).test(fO[fQ])){fO[fQ]+=" "+fN[2]}}}}return fP}function e1(fP,fO){if(fP.blankLine){return fP.blankLine(fO)}if(!fP.innerMode){return}var fN=I.innerMode(fP,fO);if(fN.mode.blankLine){return fN.mode.blankLine(fN.state)}}function ef(fR,fQ,fP){for(var fN=0;fN<10;fN++){var fO=fR.token(fQ,fP);if(fQ.pos>fQ.start){return fO}}throw new Error("Mode "+fR.name+" failed to advance stream.")}function x(fX,fZ,fS,fO,fT,fQ,fR){var fP=fS.flattenSpans;if(fP==null){fP=fX.options.flattenSpans}var fV=0,fU=null;var fY=new ew(fZ,fX.options.tabSize),fN;if(fZ==""){c2(e1(fS,fO),fQ)}while(!fY.eol()){if(fY.pos>fX.options.maxHighlightLength){fP=false;if(fR){dc(fX,fZ,fO,fY.pos)}fY.pos=fZ.length;fN=null}else{fN=c2(ef(fS,fY,fO),fQ)}if(fX.options.addModeClass){var f0=I.innerMode(fS,fO).mode.name;if(f0){fN="m-"+(fN?f0+" "+fN:f0)}}if(!fP||fU!=fN){if(fV<fY.start){fT(fY.start,fU)}fV=fY.start;fU=fN}fY.start=fY.pos}while(fV<fY.pos){var fW=Math.min(fY.pos,fV+50000);fT(fW,fU);fV=fW}}function fa(fU,fW,fN,fR){var fV=[fU.state.modeGen],fQ={};x(fU,fW.text,fU.doc.mode,fN,function(fX,fY){fV.push(fX,fY)},fQ,fR);for(var fO=0;fO<fU.state.overlays.length;++fO){var fS=fU.state.overlays[fO],fT=1,fP=0;x(fU,fW.text,fS.mode,true,function(fX,fZ){var f1=fT;while(fP<fX){var fY=fV[fT];if(fY>fX){fV.splice(fT,1,fX,fV[fT+1],fY)}fT+=2;fP=Math.min(fX,fY)}if(!fZ){return}if(fS.opaque){fV.splice(f1,fT-f1,fX,"cm-overlay "+fZ);fT=f1+2}else{for(;f1<fT;f1+=2){var f0=fV[f1+1];fV[f1+1]=(f0?f0+" ":"")+"cm-overlay "+fZ}}},fQ)}return{styles:fV,classes:fQ.bgClass||fQ.textClass?fQ:null}}function cQ(fO,fP){if(!fP.styles||fP.styles[0]!=fO.state.modeGen){var fN=fa(fO,fP,fP.stateAfter=dg(fO,bC(fP)));fP.styles=fN.styles;if(fN.classes){fP.styleClasses=fN.classes}else{if(fP.styleClasses){fP.styleClasses=null}}}return fP.styles}function dc(fN,fS,fP,fO){var fR=fN.doc.mode;var fQ=new ew(fS,fN.options.tabSize);fQ.start=fQ.pos=fO||0;if(fS==""){e1(fR,fP)}while(!fQ.eol()&&fQ.pos<=fN.options.maxHighlightLength){ef(fR,fQ,fP);fQ.start=fQ.pos}}var dz={},bQ={};function ez(fP,fO){if(!fP||/^\s*$/.test(fP)){return null}var fN=fO.addModeClass?bQ:dz;return fN[fP]||(fN[fP]=fP.replace(/\S+/g,"cm-$&"))}function ev(fO,fS){var fT=fw("span",null,null,cJ?"padding-right: .1px":null);var fQ={pre:fw("pre",[fT]),content:fT,col:0,pos:0,cm:fO};fS.measure={};for(var fR=0;fR<=(fS.rest?fS.rest.length:0);fR++){var fP=fR?fS.rest[fR-1]:fS.line,fN;fQ.pos=0;fQ.addToken=u;if((dn||cJ)&&fO.getOption("lineWrapping")){fQ.addToken=ff(fQ.addToken)}if(bD(fO.display.measure)&&(fN=a(fP))){fQ.addToken=U(fQ.addToken,fN)}fQ.map=[];bf(fP,fQ,cQ(fO,fP));if(fP.styleClasses){if(fP.styleClasses.bgClass){fQ.bgClass=fr(fP.styleClasses.bgClass,fQ.bgClass||"")}if(fP.styleClasses.textClass){fQ.textClass=fr(fP.styleClasses.textClass,fQ.textClass||"")}}if(fQ.map.length==0){fQ.map.push(0,0,fQ.content.appendChild(bd(fO.display.measure)))}if(fR==0){fS.measure.map=fQ.map;fS.measure.cache={}}else{(fS.measure.maps||(fS.measure.maps=[])).push(fQ.map);(fS.measure.caches||(fS.measure.caches=[])).push({})}}az(fO,"renderLine",fO,fS.line,fQ.pre);return fQ}function eN(fO){var fN=fw("span","\u2022","cm-invalidchar");fN.title="\\u"+fO.charCodeAt(0).toString(16);return fN}function u(fS,f2,fN,fQ,f3,f1){if(!f2){return}var fX=fS.cm.options.specialChars,fW=false;if(!fX.test(f2)){fS.col+=f2.length;var fV=document.createTextNode(f2);fS.map.push(fS.pos,fS.pos+f2.length,fV);if(bY){fW=true}fS.pos+=f2.length}else{var fV=document.createDocumentFragment(),fZ=0;while(true){fX.lastIndex=fZ;var fO=fX.exec(f2);var fU=fO?fO.index-fZ:f2.length-fZ;if(fU){var fR=document.createTextNode(f2.slice(fZ,fZ+fU));if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.map.push(fS.pos,fS.pos+fU,fR);fS.col+=fU;fS.pos+=fU}if(!fO){break}fZ+=fU+1;if(fO[0]=="\t"){var fT=fS.cm.options.tabSize,fY=fT-fS.col%fT;var fR=fV.appendChild(fw("span",cf(fY),"cm-tab"));fS.col+=fY}else{var fR=fS.cm.options.specialCharPlaceholder(fO[0]);if(bY){fV.appendChild(fw("span",[fR]))}else{fV.appendChild(fR)}fS.col+=1}fS.map.push(fS.pos,fS.pos+1,fR);fS.pos++}}if(fN||fQ||f3||fW){var f0=fN||"";if(fQ){f0+=fQ}if(f3){f0+=f3}var fP=fw("span",[fV],f0);if(f1){fP.title=f1}return fS.content.appendChild(fP)}fS.content.appendChild(fV)}function ff(fN){function fO(fP){var fQ=" ";for(var fR=0;fR<fP.length-2;++fR){fQ+=fR%2?" ":"\u00a0"}fQ+=" ";return fQ}return function(fQ,fU,fR,fP,fT,fS){fN(fQ,fU.replace(/ {3,}/g,fO),fR,fP,fT,fS)}}function U(fO,fN){return function(fV,fX,fP,fT,fY,fW){fP=fP?fP+" cm-force-border":"cm-force-border";var fQ=fV.pos,fS=fQ+fX.length;for(;;){for(var fU=0;fU<fN.length;fU++){var fR=fN[fU];if(fR.to>fQ&&fR.from<=fQ){break}}if(fR.to>=fS){return fO(fV,fX,fP,fT,fY,fW)}fO(fV,fX.slice(0,fR.to-fQ),fP,fT,null,fW);fT=null;fX=fX.slice(fR.to-fQ);fQ=fR.to}}}function aa(fO,fQ,fN,fP){var fR=!fP&&fN.widgetNode;if(fR){fO.map.push(fO.pos,fO.pos+fQ,fR);fO.content.appendChild(fR)}fO.pos+=fQ}function bf(fW,f2,fV){var fS=fW.markedSpans,fU=fW.text,f0=0;if(!fS){for(var f5=1;f5<fV.length;f5+=2){f2.addToken(f2,fU.slice(f0,f0=fV[f5]),ez(fV[f5+1],f2.cm.options))}return}var f6=fU.length,fR=0,f5=1,fY="",f7;var f9=0,fN,f8,fZ,ga,fP;for(;;){if(f9==fR){fN=f8=fZ=ga="";fP=null;f9=Infinity;var fT=[];for(var f3=0;f3<fS.length;++f3){var f4=fS[f3],f1=f4.marker;if(f4.from<=fR&&(f4.to==null||f4.to>fR)){if(f4.to!=null&&f9>f4.to){f9=f4.to;f8=""}if(f1.className){fN+=" "+f1.className}if(f1.startStyle&&f4.from==fR){fZ+=" "+f1.startStyle}if(f1.endStyle&&f4.to==f9){f8+=" "+f1.endStyle}if(f1.title&&!ga){ga=f1.title}if(f1.collapsed&&(!fP||du(fP.marker,f1)<0)){fP=f4}}else{if(f4.from>fR&&f9>f4.from){f9=f4.from}}if(f1.type=="bookmark"&&f4.from==fR&&f1.widgetNode){fT.push(f1)}}if(fP&&(fP.from||0)==fR){aa(f2,(fP.to==null?f6+1:fP.to)-fR,fP.marker,fP.from==null);if(fP.to==null){return}}if(!fP&&fT.length){for(var f3=0;f3<fT.length;++f3){aa(f2,0,fT[f3])}}}if(fR>=f6){break}var fX=Math.min(f6,f9);while(true){if(fY){var fO=fR+fY.length;if(!fP){var fQ=fO>fX?fY.slice(0,fX-fR):fY;f2.addToken(f2,fQ,f7?f7+fN:fN,fZ,fR+fQ.length==f9?f8:"",ga)}if(fO>=fX){fY=fY.slice(fX-fR);fR=fX;break}fR=fO;fZ=""}fY=fU.slice(f0,f0=fV[f5++]);f7=ez(fV[f5++],f2.cm.options)}}}function dw(fN,fO){return fO.from.ch==0&&fO.to.ch==0&&fh(fO.text)==""&&(!fN.cm||fN.cm.options.wholeLineUpdateBefore)}function e9(f0,fV,fN,fR){function f1(f3){return fN?fN[f3]:null}function fO(f3,f5,f4){dZ(f3,f5,f4,fR);ac(f3,"change",f3,fV)}var fY=fV.from,fZ=fV.to,f2=fV.text;var fW=eP(f0,fY.line),fX=eP(f0,fZ.line);var fU=fh(f2),fQ=f1(f2.length-1),fT=fZ.line-fY.line;if(dw(f0,fV)){for(var fP=0,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fO(fX,fX.text,fQ);if(fT){f0.remove(fY.line,fT)}if(fS.length){f0.insert(fY.line,fS)}}else{if(fW==fX){if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+fU+fW.text.slice(fZ.ch),fQ)}else{for(var fS=[],fP=1;fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}fS.push(new fC(fU+fW.text.slice(fZ.ch),fQ,fR));fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));f0.insert(fY.line+1,fS)}}else{if(f2.length==1){fO(fW,fW.text.slice(0,fY.ch)+f2[0]+fX.text.slice(fZ.ch),f1(0));f0.remove(fY.line+1,fT)}else{fO(fW,fW.text.slice(0,fY.ch)+f2[0],f1(0));fO(fX,fU+fX.text.slice(fZ.ch),fQ);for(var fP=1,fS=[];fP<f2.length-1;++fP){fS.push(new fC(f2[fP],f1(fP),fR))}if(fT>1){f0.remove(fY.line+1,fT-1)}f0.insert(fY.line+1,fS)}}}ac(f0,"change",f0,fV)}function eC(fO){this.lines=fO;this.parent=null;for(var fP=0,fN=0;fP<fO.length;++fP){fO[fP].parent=this;fN+=fO[fP].height}this.height=fN}eC.prototype={chunkSize:function(){return this.lines.length},removeInner:function(fN,fR){for(var fP=fN,fQ=fN+fR;fP<fQ;++fP){var fO=this.lines[fP];this.height-=fO.height;bq(fO);ac(fO,"delete")}this.lines.splice(fN,fR)},collapse:function(fN){fN.push.apply(fN,this.lines)},insertInner:function(fO,fP,fN){this.height+=fN;this.lines=this.lines.slice(0,fO).concat(fP).concat(this.lines.slice(fO));for(var fQ=0;fQ<fP.length;++fQ){fP[fQ].parent=this}},iterN:function(fN,fQ,fP){for(var fO=fN+fQ;fN<fO;++fN){if(fP(this.lines[fN])){return true}}}};function e8(fQ){this.children=fQ;var fP=0,fN=0;for(var fO=0;fO<fQ.length;++fO){var fR=fQ[fO];fP+=fR.chunkSize();fN+=fR.height;fR.parent=this}this.size=fP;this.height=fN;this.parent=null}e8.prototype={chunkSize:function(){return this.size},removeInner:function(fN,fU){this.size-=fU;for(var fP=0;fP<this.children.length;++fP){var fT=this.children[fP],fR=fT.chunkSize();if(fN<fR){var fQ=Math.min(fU,fR-fN),fS=fT.height;fT.removeInner(fN,fQ);this.height-=fS-fT.height;if(fR==fQ){this.children.splice(fP--,1);fT.parent=null}if((fU-=fQ)==0){break}fN=0}else{fN-=fR}}if(this.size-fU<25&&(this.children.length>1||!(this.children[0] instanceof eC))){var fO=[];this.collapse(fO);this.children=[new eC(fO)];this.children[0].parent=this}},collapse:function(fN){for(var fO=0;fO<this.children.length;++fO){this.children[fO].collapse(fN)}},insertInner:function(fO,fP,fN){this.size+=fP.length;this.height+=fN;for(var fS=0;fS<this.children.length;++fS){var fU=this.children[fS],fT=fU.chunkSize();if(fO<=fT){fU.insertInner(fO,fP,fN);if(fU.lines&&fU.lines.length>50){while(fU.lines.length>50){var fR=fU.lines.splice(fU.lines.length-25,25);var fQ=new eC(fR);fU.height-=fQ.height;this.children.splice(fS+1,0,fQ);fQ.parent=this}this.maybeSpill()}break}fO-=fT}},maybeSpill:function(){if(this.children.length<=10){return}var fQ=this;do{var fO=fQ.children.splice(fQ.children.length-5,5);var fP=new e8(fO);if(!fQ.parent){var fR=new e8(fQ.children);fR.parent=fQ;fQ.children=[fR,fP];fQ=fR}else{fQ.size-=fP.size;fQ.height-=fP.height;var fN=c1(fQ.parent.children,fQ);fQ.parent.children.splice(fN+1,0,fP)}fP.parent=fQ.parent}while(fQ.children.length>10);fQ.parent.maybeSpill()},iterN:function(fN,fT,fS){for(var fO=0;fO<this.children.length;++fO){var fR=this.children[fO],fQ=fR.chunkSize();if(fN<fQ){var fP=Math.min(fT,fQ-fN);if(fR.iterN(fN,fP,fS)){return true}if((fT-=fP)==0){break}fN=0}else{fN-=fQ}}}};var cg=0;var ao=I.Doc=function(fP,fO,fN){if(!(this instanceof ao)){return new ao(fP,fO,fN)}if(fN==null){fN=0}e8.call(this,[new eC([new fC("",null)])]);this.first=fN;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=fN;var fQ=W(fN,0);this.sel=eu(fQ);this.history=new fs(null);this.id=++cg;this.modeOption=fO;if(typeof fP=="string"){fP=aQ(fP)}e9(this,{from:fQ,to:fQ,text:fP});bJ(this,eu(fQ),Y)};ao.prototype=ca(e8.prototype,{constructor:ao,iter:function(fP,fO,fN){if(fN){this.iterN(fP-this.first,fO-fP,fN)}else{this.iterN(this.first,this.first+this.size,fP)}},insert:function(fO,fP){var fN=0;for(var fQ=0;fQ<fP.length;++fQ){fN+=fP[fQ].height}this.insertInner(fO-this.first,fP,fN)},remove:function(fN,fO){this.removeInner(fN-this.first,fO)},getValue:function(fO){var fN=aS(this,this.first,this.first+this.size);if(fO===false){return fN}return fN.join(fO||"\n")},setValue:cs(function(fO){var fP=W(this.first,0),fN=this.first+this.size-1;a5(this,{from:fP,to:W(fN,eP(this,fN).text.length),text:aQ(fO),origin:"setValue"},true);bJ(this,eu(fP))}),replaceRange:function(fO,fQ,fP,fN){fQ=fj(this,fQ);fP=fP?fj(this,fP):fQ;aR(this,fO,fQ,fP,fN)},getRange:function(fQ,fP,fO){var fN=fy(this,fj(this,fQ),fj(this,fP));if(fO===false){return fN}return fN.join(fO||"\n")},getLine:function(fO){var fN=this.getLineHandle(fO);return fN&&fN.text},getLineHandle:function(fN){if(bW(this,fN)){return eP(this,fN)}},getLineNumber:function(fN){return bC(fN)},getLineHandleVisualStart:function(fN){if(typeof fN=="number"){fN=eP(this,fN)}return z(fN)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(fN){return fj(this,fN)},getCursor:function(fP){var fN=this.sel.primary(),fO;if(fP==null||fP=="head"){fO=fN.head}else{if(fP=="anchor"){fO=fN.anchor}else{if(fP=="end"||fP=="to"||fP===false){fO=fN.to()}else{fO=fN.from()}}}return fO},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cs(function(fN,fP,fO){G(this,fj(this,typeof fN=="number"?W(fN,fP||0):fN),null,fO)}),setSelection:cs(function(fO,fP,fN){G(this,fj(this,fO),fj(this,fP||fO),fN)}),extendSelection:cs(function(fP,fN,fO){ft(this,fj(this,fP),fN&&fj(this,fN),fO)}),extendSelections:cs(function(fO,fN){at(this,dC(this,fO,fN))}),extendSelectionsBy:cs(function(fO,fN){at(this,bH(this.sel.ranges,fO),fN)}),setSelections:cs(function(fN,fR,fP){if(!fN.length){return}for(var fQ=0,fO=[];fQ<fN.length;fQ++){fO[fQ]=new dB(fj(this,fN[fQ].anchor),fj(this,fN[fQ].head))}if(fR==null){fR=Math.min(fN.length-1,this.sel.primIndex)}bJ(this,cm(fO,fR),fP)}),addSelection:cs(function(fP,fQ,fO){var fN=this.sel.ranges.slice(0);fN.push(new dB(fj(this,fP),fj(this,fQ||fP)));bJ(this,cm(fN,fN.length-1),fO)}),getSelection:function(fR){var fO=this.sel.ranges,fN;for(var fP=0;fP<fO.length;fP++){var fQ=fy(this,fO[fP].from(),fO[fP].to());fN=fN?fN.concat(fQ):fQ}if(fR===false){return fN}else{return fN.join(fR||"\n")}},getSelections:function(fR){var fQ=[],fN=this.sel.ranges;for(var fO=0;fO<fN.length;fO++){var fP=fy(this,fN[fO].from(),fN[fO].to());if(fR!==false){fP=fP.join(fR||"\n")}fQ[fO]=fP}return fQ},replaceSelection:function(fP,fR,fN){var fQ=[];for(var fO=0;fO<this.sel.ranges.length;fO++){fQ[fO]=fP}this.replaceSelections(fQ,fR,fN||"+input")},replaceSelections:cs(function(fS,fU,fP){var fR=[],fT=this.sel;for(var fQ=0;fQ<fT.ranges.length;fQ++){var fO=fT.ranges[fQ];fR[fQ]={from:fO.from(),to:fO.to(),text:aQ(fS[fQ]),origin:fP}}var fN=fU&&fU!="end"&&ad(this,fR,fU);for(var fQ=fR.length-1;fQ>=0;fQ--){a5(this,fR[fQ])}if(fN){eH(this,fN)}else{if(this.cm){fg(this.cm)}}}),undo:cs(function(){bV(this,"undo")}),redo:cs(function(){bV(this,"redo")}),undoSelection:cs(function(){bV(this,"undo",true)}),redoSelection:cs(function(){bV(this,"redo",true)}),setExtending:function(fN){this.extend=fN},getExtending:function(){return this.extend},historySize:function(){var fQ=this.history,fN=0,fP=0;for(var fO=0;fO<fQ.done.length;fO++){if(!fQ.done[fO].ranges){++fN}}for(var fO=0;fO<fQ.undone.length;fO++){if(!fQ.undone[fO].ranges){++fP}}return{undo:fN,redo:fP}},clearHistory:function(){this.history=new fs(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(fN){if(fN){this.history.lastOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(fN){return this.history.generation==(fN||this.cleanGeneration)},getHistory:function(){return{done:bE(this.history.done),undone:bE(this.history.undone)}},setHistory:function(fO){var fN=this.history=new fs(this.history.maxGeneration);fN.done=bE(fO.done.slice(0),null,true);fN.undone=bE(fO.undone.slice(0),null,true)},markText:function(fP,fO,fN){return ej(this,fj(this,fP),fj(this,fO),fN,"range")},setBookmark:function(fP,fN){var fO={replacedWith:fN&&(fN.nodeType==null?fN.widget:fN),insertLeft:fN&&fN.insertLeft,clearWhenEmpty:false,shared:fN&&fN.shared};fP=fj(this,fP);return ej(this,fP,fP,fO,"bookmark")},findMarksAt:function(fR){fR=fj(this,fR);var fQ=[],fO=eP(this,fR.line).markedSpans;if(fO){for(var fN=0;fN<fO.length;++fN){var fP=fO[fN];if((fP.from==null||fP.from<=fR.ch)&&(fP.to==null||fP.to>=fR.ch)){fQ.push(fP.marker.parent||fP.marker)}}}return fQ},findMarks:function(fR,fQ,fN){fR=fj(this,fR);fQ=fj(this,fQ);var fO=[],fP=fR.line;this.iter(fR.line,fQ.line+1,function(fS){var fU=fS.markedSpans;if(fU){for(var fT=0;fT<fU.length;fT++){var fV=fU[fT];if(!(fP==fR.line&&fR.ch>fV.to||fV.from==null&&fP!=fR.line||fP==fQ.line&&fV.from>fQ.ch)&&(!fN||fN(fV.marker))){fO.push(fV.marker.parent||fV.marker)}}}++fP});return fO},getAllMarks:function(){var fN=[];this.iter(function(fP){var fO=fP.markedSpans;if(fO){for(var fQ=0;fQ<fO.length;++fQ){if(fO[fQ].from!=null){fN.push(fO[fQ].marker)}}}});return fN},posFromIndex:function(fO){var fN,fP=this.first;this.iter(function(fQ){var fR=fQ.text.length+1;if(fR>fO){fN=fO;return true}fO-=fR;++fP});return fj(this,W(fP,fN))},indexFromPos:function(fO){fO=fj(this,fO);var fN=fO.ch;if(fO.line<this.first||fO.ch<0){return 0}this.iter(this.first,fO.line,function(fP){fN+=fP.text.length+1});return fN},copy:function(fN){var fO=new ao(aS(this,this.first,this.first+this.size),this.modeOption,this.first);fO.scrollTop=this.scrollTop;fO.scrollLeft=this.scrollLeft;fO.sel=this.sel;fO.extend=false;if(fN){fO.history.undoDepth=this.history.undoDepth;fO.setHistory(this.getHistory())}return fO},linkedDoc:function(fN){if(!fN){fN={}}var fQ=this.first,fP=this.first+this.size;if(fN.from!=null&&fN.from>fQ){fQ=fN.from}if(fN.to!=null&&fN.to<fP){fP=fN.to}var fO=new ao(aS(this,fQ,fP),fN.mode||this.modeOption,fQ);if(fN.sharedHist){fO.history=this.history}(this.linked||(this.linked=[])).push({doc:fO,sharedHist:fN.sharedHist});fO.linked=[{doc:this,isParent:true,sharedHist:fN.sharedHist}];dk(fO,es(this));return fO},unlinkDoc:function(fO){if(fO instanceof I){fO=fO.doc}if(this.linked){for(var fP=0;fP<this.linked.length;++fP){var fQ=this.linked[fP];if(fQ.doc!=fO){continue}this.linked.splice(fP,1);fO.unlinkDoc(this);d0(es(this));break}}if(fO.history==this.history){var fN=[fO.id];dK(fO,function(fR){fN.push(fR.id)},true);fO.history=new fs(null);fO.history.done=bE(this.history.done,fN);fO.history.undone=bE(this.history.undone,fN)}},iterLinkedDocs:function(fN){dK(this,fN)},getMode:function(){return this.mode},getEditor:function(){return this.cm}});ao.prototype.eachLine=ao.prototype.iter;var e="iter insert remove copy getEditor".split(" ");for(var bz in ao.prototype){if(ao.prototype.hasOwnProperty(bz)&&c1(e,bz)<0){I.prototype[bz]=(function(fN){return function(){return fN.apply(this.doc,arguments)}})(ao.prototype[bz])}}bo(ao);function dK(fQ,fP,fO){function fN(fW,fU,fS){if(fW.linked){for(var fT=0;fT<fW.linked.length;++fT){var fR=fW.linked[fT];if(fR.doc==fU){continue}var fV=fS&&fR.sharedHist;if(fO&&!fV){continue}fP(fR.doc,fV);fN(fR.doc,fW,fV)}}}fN(fQ,null,true)}function dN(fN,fO){if(fO.cm){throw new Error("This document is already in use.")}fN.doc=fO;fO.cm=fN;X(fN);bh(fN);if(!fN.options.lineWrapping){h(fN)}fN.options.mode=fO.modeOption;af(fN)}function eP(fQ,fS){fS-=fQ.first;if(fS<0||fS>=fQ.size){throw new Error("There is no line "+(fS+fQ.first)+" in the document.")}for(var fN=fQ;!fN.lines;){for(var fO=0;;++fO){var fR=fN.children[fO],fP=fR.chunkSize();if(fS<fP){fN=fR;break}fS-=fP}}return fN.lines[fS]}function fy(fP,fR,fN){var fO=[],fQ=fR.line;fP.iter(fR.line,fN.line+1,function(fS){var fT=fS.text;if(fQ==fN.line){fT=fT.slice(0,fN.ch)}if(fQ==fR.line){fT=fT.slice(fR.ch)}fO.push(fT);++fQ});return fO}function aS(fO,fQ,fP){var fN=[];fO.iter(fQ,fP,function(fR){fN.push(fR.text)});return fN}function fA(fO,fN){var fP=fN-fO.height;if(fP){for(var fQ=fO;fQ;fQ=fQ.parent){fQ.height+=fP}}}function bC(fN){if(fN.parent==null){return null}var fR=fN.parent,fQ=c1(fR.lines,fN);for(var fO=fR.parent;fO;fR=fO,fO=fO.parent){for(var fP=0;;++fP){if(fO.children[fP]==fR){break}fQ+=fO.children[fP].chunkSize()}}return fQ+fR.first}function bv(fP,fS){var fU=fP.first;outer:do{for(var fQ=0;fQ<fP.children.length;++fQ){var fT=fP.children[fQ],fR=fT.height;if(fS<fR){fP=fT;continue outer}fS-=fR;fU+=fT.chunkSize()}return fU}while(!fP.lines);for(var fQ=0;fQ<fP.lines.length;++fQ){var fO=fP.lines[fQ],fN=fO.height;if(fS<fN){break}fS-=fN}return fU+fQ}function bB(fP){fP=z(fP);var fR=0,fO=fP.parent;for(var fQ=0;fQ<fO.lines.length;++fQ){var fN=fO.lines[fQ];if(fN==fP){break}else{fR+=fN.height}}for(var fS=fO.parent;fS;fO=fS,fS=fO.parent){for(var fQ=0;fQ<fS.children.length;++fQ){var fT=fS.children[fQ];if(fT==fO){break}else{fR+=fT.height}}}return fR}function a(fO){var fN=fO.order;if(fN==null){fN=fO.order=a6(fO.text)}return fN}function fs(fN){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=fN||1}function da(fN,fP){var fO={from:b9(fP.from),to:cG(fP),text:fy(fN,fP.from,fP.to)};bN(fN,fO,fP.from.line,fP.to.line+1);dK(fN,function(fQ){bN(fQ,fO,fP.from.line,fP.to.line+1)},true);return fO}function fc(fO){while(fO.length){var fN=fh(fO);if(fN.ranges){fO.pop()}else{break}}}function eq(fO,fN){if(fN){fc(fO.done);return fh(fO.done)}else{if(fO.done.length&&!fh(fO.done).ranges){return fh(fO.done)}else{if(fO.done.length>1&&!fO.done[fO.done.length-2].ranges){fO.done.pop();return fh(fO.done)}}}}function fm(fT,fR,fN,fQ){var fP=fT.history;fP.undone.length=0;var fO=+new Date,fU;if((fP.lastOp==fQ||fP.lastOrigin==fR.origin&&fR.origin&&((fR.origin.charAt(0)=="+"&&fT.cm&&fP.lastModTime>fO-fT.cm.options.historyEventDelay)||fR.origin.charAt(0)=="*"))&&(fU=eq(fP,fP.lastOp==fQ))){var fV=fh(fU.changes);if(b5(fR.from,fR.to)==0&&b5(fR.from,fV.to)==0){fV.to=cG(fR)}else{fU.changes.push(da(fT,fR))}}else{var fS=fh(fP.done);if(!fS||!fS.ranges){cA(fT.sel,fP.done)}fU={changes:[da(fT,fR)],generation:fP.generation};fP.done.push(fU);while(fP.done.length>fP.undoDepth){fP.done.shift();if(!fP.done[0].ranges){fP.done.shift()}}}fP.done.push(fN);fP.generation=++fP.maxGeneration;fP.lastModTime=fP.lastSelTime=fO;fP.lastOp=fQ;fP.lastOrigin=fP.lastSelOrigin=fR.origin;if(!fV){az(fT,"historyAdded")}}function bp(fR,fN,fP,fQ){var fO=fN.charAt(0);return fO=="*"||fO=="+"&&fP.ranges.length==fQ.ranges.length&&fP.somethingSelected()==fQ.somethingSelected()&&new Date-fR.history.lastSelTime<=(fR.cm?fR.cm.options.historyEventDelay:500)}function fG(fS,fQ,fN,fP){var fR=fS.history,fO=fP&&fP.origin;if(fN==fR.lastOp||(fO&&fR.lastSelOrigin==fO&&(fR.lastModTime==fR.lastSelTime&&fR.lastOrigin==fO||bp(fS,fO,fh(fR.done),fQ)))){fR.done[fR.done.length-1]=fQ}else{cA(fQ,fR.done)}fR.lastSelTime=+new Date;fR.lastSelOrigin=fO;fR.lastOp=fN;if(fP&&fP.clearRedo!==false){fc(fR.undone)}}function cA(fO,fN){var fP=fh(fN);if(!(fP&&fP.ranges&&fP.equals(fO))){fN.push(fO)}}function bN(fO,fS,fR,fQ){var fN=fS["spans_"+fO.id],fP=0;fO.iter(Math.max(fO.first,fR),Math.min(fO.first+fO.size,fQ),function(fT){if(fT.markedSpans){(fN||(fN=fS["spans_"+fO.id]={}))[fP]=fT.markedSpans}++fP})}function bb(fP){if(!fP){return null}for(var fO=0,fN;fO<fP.length;++fO){if(fP[fO].marker.explicitlyCleared){if(!fN){fN=fP.slice(0,fO)}}else{if(fN){fN.push(fP[fO])}}}return !fN?fP:fN.length?fN:null}function bS(fQ,fR){var fP=fR["spans_"+fQ.id];if(!fP){return null}for(var fO=0,fN=[];fO<fR.text.length;++fO){fN.push(bb(fP[fO]))}return fN}function bE(fY,fQ,fX){for(var fT=0,fO=[];fT<fY.length;++fT){var fP=fY[fT];if(fP.ranges){fO.push(fX?fx.prototype.deepCopy.call(fP):fP);continue}var fV=fP.changes,fW=[];fO.push({changes:fW});for(var fS=0;fS<fV.length;++fS){var fU=fV[fS],fR;fW.push({from:fU.from,to:fU.to,text:fU.text});if(fQ){for(var fN in fU){if(fR=fN.match(/^spans_(\d+)$/)){if(c1(fQ,Number(fR[1]))>-1){fh(fW)[fN]=fU[fN];delete fU[fN]}}}}}}return fO}function J(fQ,fP,fO,fN){if(fO<fQ.line){fQ.line+=fN}else{if(fP<fQ.line){fQ.line=fP;fQ.ch=0}}}function eR(fQ,fS,fT,fU){for(var fP=0;fP<fQ.length;++fP){var fN=fQ[fP],fR=true;if(fN.ranges){if(!fN.copied){fN=fQ[fP]=fN.deepCopy();fN.copied=true}for(var fO=0;fO<fN.ranges.length;fO++){J(fN.ranges[fO].anchor,fS,fT,fU);J(fN.ranges[fO].head,fS,fT,fU)}continue}for(var fO=0;fO<fN.changes.length;++fO){var fV=fN.changes[fO];if(fT<fV.from.line){fV.from=W(fV.from.line+fU,fV.from.ch);fV.to=W(fV.to.line+fU,fV.to.ch)}else{if(fS<=fV.to.line){fR=false;break}}}if(!fR){fQ.splice(0,fP+1);fP=0}}}function dj(fO,fR){var fQ=fR.from.line,fP=fR.to.line,fN=fR.text.length-(fP-fQ)-1;eR(fO.done,fQ,fP,fN);eR(fO.undone,fQ,fP,fN)}var cu=I.e_preventDefault=function(fN){if(fN.preventDefault){fN.preventDefault()}else{fN.returnValue=false}};var c6=I.e_stopPropagation=function(fN){if(fN.stopPropagation){fN.stopPropagation()}else{fN.cancelBubble=true}};function bA(fN){return fN.defaultPrevented!=null?fN.defaultPrevented:fN.returnValue==false}var d3=I.e_stop=function(fN){cu(fN);c6(fN)};function L(fN){return fN.target||fN.srcElement}function fn(fO){var fN=fO.which;if(fN==null){if(fO.button&1){fN=1}else{if(fO.button&2){fN=3}else{if(fO.button&4){fN=2}}}}if(bU&&fO.ctrlKey&&fN==1){fN=3}return fN}var bM=I.on=function(fQ,fO,fP){if(fQ.addEventListener){fQ.addEventListener(fO,fP,false)}else{if(fQ.attachEvent){fQ.attachEvent("on"+fO,fP)}else{var fR=fQ._handlers||(fQ._handlers={});var fN=fR[fO]||(fR[fO]=[]);fN.push(fP)}}};var dP=I.off=function(fR,fP,fQ){if(fR.removeEventListener){fR.removeEventListener(fP,fQ,false)}else{if(fR.detachEvent){fR.detachEvent("on"+fP,fQ)}else{var fN=fR._handlers&&fR._handlers[fP];if(!fN){return}for(var fO=0;fO<fN.length;++fO){if(fN[fO]==fQ){fN.splice(fO,1);break}}}}};var az=I.signal=function(fR,fQ){var fN=fR._handlers&&fR._handlers[fQ];if(!fN){return}var fO=Array.prototype.slice.call(arguments,2);for(var fP=0;fP<fN.length;++fP){fN[fP].apply(null,fO)}};var be,ch=0;function ac(fS,fR){var fN=fS._handlers&&fS._handlers[fR];if(!fN){return}var fP=Array.prototype.slice.call(arguments,2);if(!be){++ch;be=[];setTimeout(ec,0)}function fO(fT){return function(){fT.apply(null,fP)}}for(var fQ=0;fQ<fN.length;++fQ){be.push(fO(fN[fQ]))}}function ec(){--ch;var fN=be;be=null;for(var fO=0;fO<fN.length;++fO){fN[fO]()}}function aI(fN,fP,fO){az(fN,fO||fP.type,fN,fP);return bA(fP)||fP.codemirrorIgnore}function V(fO){var fN=fO._handlers&&fO._handlers.cursorActivity;if(!fN){return}var fQ=fO.curOp.cursorActivityHandlers||(fO.curOp.cursorActivityHandlers=[]);for(var fP=0;fP<fN.length;++fP){if(c1(fQ,fN[fP])==-1){fQ.push(fN[fP])}}}function eS(fP,fO){var fN=fP._handlers&&fP._handlers[fO];return fN&&fN.length>0}function bo(fN){fN.prototype.on=function(fO,fP){bM(this,fO,fP)};fN.prototype.off=function(fO,fP){dP(this,fO,fP)}}var ba=30;var bZ=I.Pass={toString:function(){return"CodeMirror.Pass"}};var Y={scroll:false},M={origin:"*mouse"},cF={origin:"+move"};function fM(){this.id=null}fM.prototype.set=function(fN,fO){clearTimeout(this.id);this.id=setTimeout(fO,fN)};var bI=I.countColumn=function(fQ,fO,fS,fT,fP){if(fO==null){fO=fQ.search(/[^\s\u00a0]/);if(fO==-1){fO=fQ.length}}for(var fR=fT||0,fU=fP||0;;){var fN=fQ.indexOf("\t",fR);if(fN<0||fN>=fO){return fU+(fO-fR)}fU+=fN-fR;fU+=fS-(fU%fS);fR=fN+1}};function d2(fR,fQ,fS){for(var fT=0,fP=0;;){var fO=fR.indexOf("\t",fT);if(fO==-1){fO=fR.length}var fN=fO-fT;if(fO==fR.length||fP+fN>=fQ){return fT+Math.min(fN,fQ-fP)}fP+=fO-fT;fP+=fS-(fP%fS);fT=fO+1;if(fP>=fQ){return fT}}}var aP=[""];function cf(fN){while(aP.length<=fN){aP.push(fh(aP)+" ")}return aP[fN]}function fh(fN){return fN[fN.length-1]}var dq=function(fN){fN.select()};if(eD){dq=function(fN){fN.selectionStart=0;fN.selectionEnd=fN.value.length}}else{if(dn){dq=function(fO){try{fO.select()}catch(fN){}}}}function c1(fP,fN){for(var fO=0;fO<fP.length;++fO){if(fP[fO]==fN){return fO}}return -1}if([].indexOf){c1=function(fO,fN){return fO.indexOf(fN)}}function bH(fQ,fP){var fN=[];for(var fO=0;fO<fQ.length;fO++){fN[fO]=fP(fQ[fO],fO)}return fN}if([].map){bH=function(fO,fN){return fO.map(fN)}}function ca(fQ,fN){var fP;if(Object.create){fP=Object.create(fQ)}else{var fO=function(){};fO.prototype=fQ;fP=new fO()}if(fN){aE(fN,fP)}return fP}function aE(fP,fO,fN){if(!fO){fO={}}for(var fQ in fP){if(fP.hasOwnProperty(fQ)&&(fN!==false||!fO.hasOwnProperty(fQ))){fO[fQ]=fP[fQ]}}return fO}function cl(fO){var fN=Array.prototype.slice.call(arguments,1);return function(){return fO.apply(null,fN)}}var a2=/[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;var cp=I.isWordChar=function(fN){return/\w/.test(fN)||fN>"\x80"&&(fN.toUpperCase()!=fN.toLowerCase()||a2.test(fN))};function ex(fN){for(var fO in fN){if(fN.hasOwnProperty(fO)&&fN[fO]){return false}}return true}var en=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function e0(fN){return fN.charCodeAt(0)>=768&&en.test(fN)}function fw(fN,fR,fQ,fP){var fS=document.createElement(fN);if(fQ){fS.className=fQ}if(fP){fS.style.cssText=fP}if(typeof fR=="string"){fS.appendChild(document.createTextNode(fR))}else{if(fR){for(var fO=0;fO<fR.length;++fO){fS.appendChild(fR[fO])}}}return fS}var cb;if(document.createRange){cb=function(fP,fQ,fN){var fO=document.createRange();fO.setEnd(fP,fN);fO.setStart(fP,fQ);return fO}}else{cb=function(fP,fQ,fN){var fO=document.body.createTextRange();fO.moveToElementText(fP.parentNode);fO.collapse(true);fO.moveEnd("character",fN);fO.moveStart("character",fQ);return fO}}function dE(fO){for(var fN=fO.childNodes.length;fN>0;--fN){fO.removeChild(fO.firstChild)}return fO}function bG(fN,fO){return dE(fN).appendChild(fO)}function fF(fN,fO){if(fN.contains){return fN.contains(fO)}while(fO=fO.parentNode){if(fO==fN){return true}}}function ds(){return document.activeElement}if(eo){ds=function(){try{return document.activeElement}catch(fN){return document.body}}}function S(fN){return new RegExp("\\b"+fN+"\\b\\s*")}function g(fO,fN){var fP=S(fN);if(fP.test(fO.className)){fO.className=fO.className.replace(fP,"")}}function fb(fO,fN){if(!S(fN).test(fO.className)){fO.className+=" "+fN}}function fr(fP,fN){var fO=fP.split(" ");for(var fQ=0;fQ<fO.length;fQ++){if(fO[fQ]&&!S(fO[fQ]).test(fN)){fN+=" "+fO[fQ]}}return fN}function aw(fQ){if(!document.body.getElementsByClassName){return}var fP=document.body.getElementsByClassName("CodeMirror");for(var fO=0;fO<fP.length;fO++){var fN=fP[fO].CodeMirror;if(fN){fQ(fN)}}}var cr=false;function a8(){if(cr){return}fe();cr=true}function fe(){var fN;bM(window,"resize",function(){if(fN==null){fN=setTimeout(function(){fN=null;d8=null;aw(aK)},100)}});bM(window,"blur",function(){aw(aL)})}var ep=function(){if(bY){return false}var fN=fw("div");return"draggable" in fN||"dragDrop" in fN}();var d8;function l(fN){if(d8!=null){return d8}var fO=fw("div",null,null,"width: 50px; height: 50px; overflow-x: scroll");bG(fN,fO);if(fO.offsetWidth){d8=fO.offsetHeight-fO.clientHeight}return d8||0}var fl;function bd(fN){if(fl==null){var fO=fw("span","\u200b");bG(fN,fw("span",[fO,document.createTextNode("x")]));if(fN.firstChild.offsetHeight!=0){fl=fO.offsetWidth<=1&&fO.offsetHeight>2&&!b1}}if(fl){return fw("span","\u200b")}else{return fw("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px")}}var fk;function bD(fQ){if(fk!=null){return fk}var fN=bG(fQ,document.createTextNode("A\u062eA"));var fP=cb(fN,0,1).getBoundingClientRect();if(fP.left==fP.right){return false}var fO=cb(fN,1,2).getBoundingClientRect();return fk=(fO.right-fP.right<3)}var aQ=I.splitLines="\n\nb".split(/\n/).length!=3?function(fS){var fT=0,fN=[],fR=fS.length;while(fT<=fR){var fQ=fS.indexOf("\n",fT);if(fQ==-1){fQ=fS.length}var fP=fS.slice(fT,fS.charAt(fQ-1)=="\r"?fQ-1:fQ);var fO=fP.indexOf("\r");if(fO!=-1){fN.push(fP.slice(0,fO));fT+=fO+1}else{fN.push(fP);fT=fQ+1}}return fN}:function(fN){return fN.split(/\r\n?|\n/)};var bi=window.getSelection?function(fO){try{return fO.selectionStart!=fO.selectionEnd}catch(fN){return false}}:function(fP){try{var fN=fP.ownerDocument.selection.createRange()}catch(fO){}if(!fN||fN.parentElement()!=fP){return false}return fN.compareEndPoints("StartToEnd",fN)!=0};var cT=(function(){var fN=fw("div");if("oncopy" in fN){return true}fN.setAttribute("oncopy","return;");return typeof fN.oncopy=="function"})();var eQ={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",107:"=",109:"-",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"};I.keyNames=eQ;(function(){for(var fN=0;fN<10;fN++){eQ[fN+48]=eQ[fN+96]=String(fN)}for(var fN=65;fN<=90;fN++){eQ[fN]=String.fromCharCode(fN)}for(var fN=1;fN<=12;fN++){eQ[fN+111]=eQ[fN+63235]="F"+fN}})();function dH(fN,fT,fS,fR){if(!fN){return fR(fT,fS,"ltr")}var fQ=false;for(var fP=0;fP<fN.length;++fP){var fO=fN[fP];if(fO.from<fS&&fO.to>fT||fT==fS&&fO.to==fT){fR(Math.max(fO.from,fT),Math.min(fO.to,fS),fO.level==1?"rtl":"ltr");fQ=true}}if(!fQ){fR(fT,fS,"ltr")}}function dd(fN){return fN.level%2?fN.to:fN.from}function fI(fN){return fN.level%2?fN.from:fN.to}function ct(fO){var fN=a(fO);return fN?dd(fN[0]):0}function cE(fO){var fN=a(fO);if(!fN){return fO.text.length}return fI(fh(fN))}function bj(fO,fR){var fP=eP(fO.doc,fR);var fS=z(fP);if(fS!=fP){fR=bC(fS)}var fN=a(fS);var fQ=!fN?0:fN[0].level%2?cE(fS):ct(fS);return W(fR,fQ)}function dt(fP,fS){var fO,fQ=eP(fP.doc,fS);while(fO=d7(fQ)){fQ=fO.find(1,true).line;fS=null}var fN=a(fQ);var fR=!fN?fQ.text.length:fN[0].level%2?ct(fQ):cE(fQ);return W(fS==null?bC(fQ):fS,fR)}function ak(fO,fP,fN){var fQ=fO[0].level;if(fP==fQ){return true}if(fN==fQ){return false}return fP<fN}var eE;function aB(fN,fR){eE=null;for(var fO=0,fP;fO<fN.length;++fO){var fQ=fN[fO];if(fQ.from<fR&&fQ.to>fR){return fO}if((fQ.from==fR||fQ.to==fR)){if(fP==null){fP=fO}else{if(ak(fN,fQ.level,fN[fP].level)){if(fQ.from!=fQ.to){eE=fP}return fO}else{if(fQ.from!=fQ.to){eE=fO}return fP}}}}return fP}function eO(fN,fQ,fO,fP){if(!fP){return fQ+fO}do{fQ+=fO}while(fQ>0&&e0(fN.text.charAt(fQ)));return fQ}function v(fN,fU,fP,fQ){var fR=a(fN);if(!fR){return ag(fN,fU,fP,fQ)}var fT=aB(fR,fU),fO=fR[fT];var fS=eO(fN,fU,fO.level%2?-fP:fP,fQ);for(;;){if(fS>fO.from&&fS<fO.to){return fS}if(fS==fO.from||fS==fO.to){if(aB(fR,fS)==fT){return fS}fO=fR[fT+=fP];return(fP>0)==fO.level%2?fO.to:fO.from}else{fO=fR[fT+=fP];if(!fO){return null}if((fP>0)==fO.level%2){fS=eO(fN,fO.to,-1,fQ)}else{fS=eO(fN,fO.from,1,fQ)}}}}function ag(fN,fR,fO,fP){var fQ=fR+fO;if(fP){while(fQ>0&&e0(fN.text.charAt(fQ))){fQ+=fO}}return fQ<0||fQ>fN.text.length?null:fQ}var a6=(function(){var fT="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var fR="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function fQ(fX){if(fX<=247){return fT.charAt(fX)}else{if(1424<=fX&&fX<=1524){return"R"}else{if(1536<=fX&&fX<=1773){return fR.charAt(fX-1536)}else{if(1774<=fX&&fX<=2220){return"r"}else{if(8192<=fX&&fX<=8203){return"w"}else{if(fX==8204){return"b"}else{return"L"}}}}}}}var fN=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var fW=/[stwN]/,fP=/[LRr]/,fO=/[Lb1n]/,fS=/[1n]/;var fV="L";function fU(fZ,fY,fX){this.level=fZ;this.from=fY;this.to=fX}return function(f7){if(!fN.test(f7)){return false}var gd=f7.length,f3=[];for(var gc=0,fZ;gc<gd;++gc){f3.push(fZ=fQ(f7.charCodeAt(gc)))}for(var gc=0,f6=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="m"){f3[gc]=f6}else{f6=fZ}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fZ=="1"&&fX=="r"){f3[gc]="n"}else{if(fP.test(fZ)){fX=fZ;if(fZ=="r"){f3[gc]="R"}}}}for(var gc=1,f6=f3[0];gc<gd-1;++gc){var fZ=f3[gc];if(fZ=="+"&&f6=="1"&&f3[gc+1]=="1"){f3[gc]="1"}else{if(fZ==","&&f6==f3[gc+1]&&(f6=="1"||f6=="n")){f3[gc]=f6}}f6=fZ}for(var gc=0;gc<gd;++gc){var fZ=f3[gc];if(fZ==","){f3[gc]="N"}else{if(fZ=="%"){for(var f0=gc+1;f0<gd&&f3[f0]=="%";++f0){}var ge=(gc&&f3[gc-1]=="!")||(f0<gd&&f3[f0]=="1")?"1":"N";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}}for(var gc=0,fX=fV;gc<gd;++gc){var fZ=f3[gc];if(fX=="L"&&fZ=="1"){f3[gc]="L"}else{if(fP.test(fZ)){fX=fZ}}}for(var gc=0;gc<gd;++gc){if(fW.test(f3[gc])){for(var f0=gc+1;f0<gd&&fW.test(f3[f0]);++f0){}var f4=(gc?f3[gc-1]:fV)=="L";var fY=(f0<gd?f3[f0]:fV)=="L";var ge=f4||fY?"L":"R";for(var ga=gc;ga<f0;++ga){f3[ga]=ge}gc=f0-1}}var gb=[],f8;for(var gc=0;gc<gd;){if(fO.test(f3[gc])){var f1=gc;for(++gc;gc<gd&&fO.test(f3[gc]);++gc){}gb.push(new fU(0,f1,gc))}else{var f2=gc,f5=gb.length;for(++gc;gc<gd&&f3[gc]!="L";++gc){}for(var ga=f2;ga<gc;){if(fS.test(f3[ga])){if(f2<ga){gb.splice(f5,0,new fU(1,f2,ga))}var f9=ga;for(++ga;ga<gc&&fS.test(f3[ga]);++ga){}gb.splice(f5,0,new fU(2,f9,ga));f2=ga}else{++ga}}if(f2<gc){gb.splice(f5,0,new fU(1,f2,gc))}}}if(gb[0].level==1&&(f8=f7.match(/^\s+/))){gb[0].from=f8[0].length;gb.unshift(new fU(0,0,f8[0].length))}if(fh(gb).level==1&&(f8=f7.match(/\s+$/))){fh(gb).to-=f8[0].length;gb.push(new fU(0,gd-f8[0].length,gd))}if(gb[0].level!=fh(gb).level){gb.push(new fU(gb[0].level,gd,gd))}return gb}})();I.version="4.1.1";return I});
3
+ // CodeMirror XML.
4
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("xml",function(y,k){var p=y.indentUnit;var x=k.multilineTagIndentFactor||1;var d=k.multilineTagIndentPastTag;if(d==null){d=true}var w=k.htmlMode?{autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true}:{autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};var c=k.alignCDATA;var f,g;function n(F,E){function C(G){E.tokenize=G;return G(F,E)}var D=F.next();if(D=="<"){if(F.eat("!")){if(F.eat("[")){if(F.match("CDATA[")){return C(v("atom","]]>"))}else{return null}}else{if(F.match("--")){return C(v("comment","-->"))}else{if(F.match("DOCTYPE",true,true)){F.eatWhile(/[\w\._\-]/);return C(z(1))}else{return null}}}}else{if(F.eat("?")){F.eatWhile(/[\w\._\-]/);E.tokenize=v("meta","?>");return"meta"}else{f=F.eat("/")?"closeTag":"openTag";E.tokenize=m;return"tag bracket"}}}else{if(D=="&"){var B;if(F.eat("#")){if(F.eat("x")){B=F.eatWhile(/[a-fA-F\d]/)&&F.eat(";")}else{B=F.eatWhile(/[\d]/)&&F.eat(";")}}else{B=F.eatWhile(/[\w\.\-:]/)&&F.eat(";")}return B?"atom":"error"}else{F.eatWhile(/[^&<]/);return null}}}function m(E,D){var C=E.next();if(C==">"||(C=="/"&&E.eat(">"))){D.tokenize=n;f=C==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(C=="="){f="equals";return null}else{if(C=="<"){D.tokenize=n;D.state=l;D.tagName=D.tagStart=null;var B=D.tokenize(E,D);return B?B+" error":"error"}else{if(/[\'\"]/.test(C)){D.tokenize=j(C);D.stringStartCol=E.column();return D.tokenize(E,D)}else{E.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function j(B){var C=function(E,D){while(!E.eol()){if(E.next()==B){D.tokenize=m;break}}return"string"};C.isInAttribute=true;return C}function v(C,B){return function(E,D){while(!E.eol()){if(E.match(B)){D.tokenize=n;break}E.next()}return C}}function z(B){return function(E,D){var C;while((C=E.next())!=null){if(C=="<"){D.tokenize=z(B+1);return D.tokenize(E,D)}else{if(C==">"){if(B==1){D.tokenize=n;break}else{D.tokenize=z(B-1);return D.tokenize(E,D)}}}}return"meta"}}function r(C,B,D){this.prev=C.context;this.tagName=B;this.indent=C.indented;this.startOfLine=D;if(w.doNotIndent.hasOwnProperty(B)||(C.context&&C.context.noIndent)){this.noIndent=true}}function u(B){if(B.context){B.context=B.context.prev}}function q(D,C){var B;while(true){if(!D.context){return}B=D.context.tagName;if(!w.contextGrabbers.hasOwnProperty(B)||!w.contextGrabbers[B].hasOwnProperty(C)){return}u(D)}}function l(B,D,C){if(B=="openTag"){C.tagStart=D.column();return b}else{if(B=="closeTag"){return t}else{return l}}}function b(B,D,C){if(B=="word"){C.tagName=D.current();g="tag";return e}else{g="error";return b}}function t(C,E,D){if(C=="word"){var B=E.current();if(D.context&&D.context.tagName!=B&&w.implicitlyClosed.hasOwnProperty(D.context.tagName)){u(D)}if(D.context&&D.context.tagName==B){g="tag";return s}else{g="tag error";return A}}else{g="error";return A}}function s(C,B,D){if(C!="endTag"){g="error";return s}u(D);return l}function A(B,D,C){g="error";return s(B,D,C)}function e(E,C,F){if(E=="word"){g="attribute";return i}else{if(E=="endTag"||E=="selfcloseTag"){var D=F.tagName,B=F.tagStart;F.tagName=F.tagStart=null;if(E=="selfcloseTag"||w.autoSelfClosers.hasOwnProperty(D)){q(F,D)}else{q(F,D);F.context=new r(F,D,B==F.indented)}return l}}g="error";return e}function i(B,D,C){if(B=="equals"){return o}if(!w.allowMissing){g="error"}return e(B,D,C)}function o(B,D,C){if(B=="string"){return h}if(B=="word"&&w.allowUnquoted){g="string";return e}g="error";return e(B,D,C)}function h(B,D,C){if(B=="string"){return h}return e(B,D,C)}return{startState:function(){return{tokenize:n,state:l,indented:0,tagName:null,tagStart:null,context:null}},token:function(D,C){if(!C.tagName&&D.sol()){C.indented=D.indentation()}if(D.eatSpace()){return null}f=null;var B=C.tokenize(D,C);if((B||f)&&B!="comment"){g=null;C.state=C.state(f||B,D,C);if(g){B=g=="error"?B+" error":g}}return B},indent:function(G,C,F){var E=G.context;if(G.tokenize.isInAttribute){if(G.tagStart==G.indented){return G.stringStartCol+1}else{return G.indented+p}}if(E&&E.noIndent){return a.Pass}if(G.tokenize!=m&&G.tokenize!=n){return F?F.match(/^(\s*)/)[0].length:0}if(G.tagName){if(d){return G.tagStart+G.tagName.length+2}else{return G.tagStart+p*x}}if(c&&/<!\[CDATA\[/.test(C)){return 0}var B=C&&/^<(\/)?([\w_:\.-]*)/.exec(C);if(B&&B[1]){while(E){if(E.tagName==B[2]){E=E.prev;break}else{if(w.implicitlyClosed.hasOwnProperty(E.tagName)){E=E.prev}else{break}}}}else{if(B){while(E){var D=w.contextGrabbers[E.tagName];if(D&&D.hasOwnProperty(B[2])){E=E.prev}else{break}}}}while(E&&!E.startOfLine){E=E.prev}if(E){return E.indent+p}else{return 0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:k.htmlMode?"html":"xml",helperType:k.htmlMode?"html":"xml"}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});
5
+ // CodeMirror JS.
6
+ (function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("javascript",function(X,ah){var j=X.indentUnit;var x=ah.statementIndent;var aw=ah.jsonld;var w=ah.json||aw;var f=ah.typescript;var ao=function(){function aM(aO){return{type:aO,style:"keyword"}}var aH=aM("keyword a"),aF=aM("keyword b"),aE=aM("keyword c");var aG=aM("operator"),aK={type:"atom",style:"atom"};var aI={"if":aM("if"),"while":aH,"with":aH,"else":aF,"do":aF,"try":aF,"finally":aF,"return":aE,"break":aE,"continue":aE,"new":aE,"delete":aE,"throw":aE,"debugger":aE,"var":aM("var"),"const":aM("var"),let:aM("var"),"function":aM("function"),"catch":aM("catch"),"for":aM("for"),"switch":aM("switch"),"case":aM("case"),"default":aM("default"),"in":aG,"typeof":aG,"instanceof":aG,"true":aK,"false":aK,"null":aK,"undefined":aK,"NaN":aK,"Infinity":aK,"this":aM("this"),module:aM("module"),"class":aM("class"),"super":aM("atom"),yield:aE,"export":aM("export"),"import":aM("import"),"extends":aE};if(f){var aN={type:"variable",style:"variable-3"};var aJ={"interface":aM("interface"),"extends":aM("extends"),constructor:aM("constructor"),"public":aM("public"),"private":aM("private"),"protected":aM("protected"),"static":aM("static"),string:aN,number:aN,bool:aN,any:aN};for(var aL in aJ){aI[aL]=aJ[aL]}}return aI}();var M=/[+\-*&%=<>!?|~^]/;var an=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function C(aH){var aF=false,aE,aG=false;while((aE=aH.next())!=null){if(!aF){if(aE=="/"&&!aG){return}if(aE=="["){aG=true}else{if(aG&&aE=="]"){aG=false}}}aF=!aF&&aE=="\\"}}var P,D;function I(aG,aF,aE){P=aG;D=aE;return aF}function R(aI,aG){var aE=aI.next();if(aE=='"'||aE=="'"){aG.tokenize=O(aE);return aG.tokenize(aI,aG)}else{if(aE=="."&&aI.match(/^\d+(?:[eE][+\-]?\d+)?/)){return I("number","number")}else{if(aE=="."&&aI.match("..")){return I("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aE)){return I(aE)}else{if(aE=="="&&aI.eat(">")){return I("=>","operator")}else{if(aE=="0"&&aI.eat(/x/i)){aI.eatWhile(/[\da-f]/i);return I("number","number")}else{if(/\d/.test(aE)){aI.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return I("number","number")}else{if(aE=="/"){if(aI.eat("*")){aG.tokenize=av;return av(aI,aG)}else{if(aI.eat("/")){aI.skipToEnd();return I("comment","comment")}else{if(aG.lastType=="operator"||aG.lastType=="keyword c"||aG.lastType=="sof"||/^[\[{}\(,;:]$/.test(aG.lastType)){C(aI);aI.eatWhile(/[gimy]/);return I("regexp","string-2")}else{aI.eatWhile(M);return I("operator","operator",aI.current())}}}}else{if(aE=="`"){aG.tokenize=ax;return ax(aI,aG)}else{if(aE=="#"){aI.skipToEnd();return I("error","error")}else{if(M.test(aE)){aI.eatWhile(M);return I("operator","operator",aI.current())}else{aI.eatWhile(/[\w\$_]/);var aH=aI.current(),aF=ao.propertyIsEnumerable(aH)&&ao[aH];return(aF&&aG.lastType!=".")?I(aF.type,aF.style,aH):I("variable","variable",aH)}}}}}}}}}}}}function O(aE){return function(aI,aG){var aH=false,aF;if(aw&&aI.peek()=="@"&&aI.match(an)){aG.tokenize=R;return I("jsonld-keyword","meta")}while((aF=aI.next())!=null){if(aF==aE&&!aH){break}aH=!aH&&aF=="\\"}if(!aH){aG.tokenize=R}return I("string","string")}}function av(aH,aG){var aE=false,aF;while(aF=aH.next()){if(aF=="/"&&aE){aG.tokenize=R;break}aE=(aF=="*")}return I("comment","comment")}function ax(aH,aF){var aG=false,aE;while((aE=aH.next())!=null){if(!aG&&(aE=="`"||aE=="$"&&aH.eat("{"))){aF.tokenize=R;break}aG=!aG&&aE=="\\"}return I("quasi","string-2",aH.current())}var k="([{}])";function ar(aK,aH){if(aH.fatArrowAt){aH.fatArrowAt=null}var aG=aK.string.indexOf("=>",aK.start);if(aG<0){return}var aJ=0,aF=false;for(var aL=aG-1;aL>=0;--aL){var aE=aK.string.charAt(aL);var aI=k.indexOf(aE);if(aI>=0&&aI<3){if(!aJ){++aL;break}if(--aJ==0){break}}else{if(aI>=3&&aI<6){++aJ}else{if(/[$\w]/.test(aE)){aF=true}else{if(aF&&!aJ){++aL;break}}}}}if(aF&&!aJ){aH.fatArrowAt=aL}}var b={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function G(aJ,aF,aE,aI,aG,aH){this.indented=aJ;this.column=aF;this.type=aE;this.prev=aG;this.info=aH;if(aI!=null){this.align=aI}}function p(aH,aG){for(var aF=aH.localVars;aF;aF=aF.next){if(aF.name==aG){return true}}for(var aE=aH.context;aE;aE=aE.prev){for(var aF=aE.vars;aF;aF=aF.next){if(aF.name==aG){return true}}}}function e(aI,aF,aE,aH,aJ){var aK=aI.cc;A.state=aI;A.stream=aJ;A.marked=null,A.cc=aK;if(!aI.lexical.hasOwnProperty("align")){aI.lexical.align=true}while(true){var aG=aK.length?aK.pop():w?al:aC;if(aG(aE,aH)){while(aK.length&&aK[aK.length-1].lex){aK.pop()()}if(A.marked){return A.marked}if(aE=="variable"&&p(aI,aH)){return"variable-2"}return aF}}}var A={state:null,column:null,marked:null,cc:null};function Y(){for(var aE=arguments.length-1;aE>=0;aE--){A.cc.push(arguments[aE])}}function ac(){Y.apply(null,arguments);return true}function aq(aF){function aE(aI){for(var aH=aI;aH;aH=aH.next){if(aH.name==aF){return true}}return false}var aG=A.state;if(aG.context){A.marked="def";if(aE(aG.localVars)){return}aG.localVars={name:aF,next:aG.localVars}}else{if(aE(aG.globalVars)){return}if(ah.globalVars){aG.globalVars={name:aF,next:aG.globalVars}}}}var n={name:"this",next:{name:"arguments"}};function t(){A.state.context={prev:A.state.context,vars:A.state.localVars};A.state.localVars=n}function u(){A.state.localVars=A.state.context.vars;A.state.context=A.state.context.prev}function aA(aF,aG){var aE=function(){var aI=A.state,aH=aI.indented;if(aI.lexical.type=="stat"){aH=aI.lexical.indented}aI.lexical=new G(aH,A.stream.column(),aF,null,aI.lexical,aG)};aE.lex=true;return aE}function g(){var aE=A.state;if(aE.lexical.prev){if(aE.lexical.type==")"){aE.indented=aE.lexical.indented}aE.lexical=aE.lexical.prev}}g.lex=true;function o(aE){function aF(aG){if(aG==aE){return ac()}else{if(aE==";"){return Y()}else{return ac(aF)}}}return aF}function aC(aE,aF){if(aE=="var"){return ac(aA("vardef",aF.length),c,o(";"),g)}if(aE=="keyword a"){return ac(aA("form"),al,aC,g)}if(aE=="keyword b"){return ac(aA("form"),aC,g)}if(aE=="{"){return ac(aA("}"),v,g)}if(aE==";"){return ac()}if(aE=="if"){if(A.state.lexical.info=="else"&&A.state.cc[A.state.cc.length-1]==g){A.state.cc.pop()()}return ac(aA("form"),al,aC,g,d)}if(aE=="function"){return ac(J)}if(aE=="for"){return ac(aA("form"),r,aC,g)}if(aE=="variable"){return ac(aA("stat"),aD)}if(aE=="switch"){return ac(aA("form"),al,aA("}","switch"),o("{"),v,g,g)}if(aE=="case"){return ac(al,o(":"))}if(aE=="default"){return ac(o(":"))}if(aE=="catch"){return ac(aA("form"),t,o("("),ad,o(")"),aC,g,u)}if(aE=="module"){return ac(aA("form"),t,E,u,g)}if(aE=="class"){return ac(aA("form"),T,S,g)}if(aE=="export"){return ac(aA("form"),aB,g)}if(aE=="import"){return ac(aA("form"),ae,g)}return Y(aA("stat"),al,o(";"),g)}function al(aE){return W(aE,false)}function az(aE){return W(aE,true)}function W(aF,aH){if(A.state.fatArrowAt==A.stream.start){var aE=aH?K:U;if(aF=="("){return ac(t,aA(")"),ap(h,")"),g,o("=>"),aE,u)}else{if(aF=="variable"){return Y(t,h,o("=>"),aE,u)}}}var aG=aH?i:Z;if(b.hasOwnProperty(aF)){return ac(aG)}if(aF=="function"){return ac(J,aG)}if(aF=="keyword c"){return ac(aH?ai:ag)}if(aF=="("){return ac(aA(")"),ag,au,o(")"),g,aG)}if(aF=="operator"||aF=="spread"){return ac(aH?az:al)}if(aF=="["){return ac(aA("]"),l,g,aG)}if(aF=="{"){return at(q,"}",null,aG)}if(aF=="quasi"){return Y(N,aG)}return ac()}function ag(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(al)}function ai(aE){if(aE.match(/[;\}\)\],]/)){return Y()}return Y(az)}function Z(aE,aF){if(aE==","){return ac(al)}return i(aE,aF,false)}function i(aE,aG,aI){var aF=aI==false?Z:i;var aH=aI==false?al:az;if(aG=="=>"){return ac(t,aI?K:U,u)}if(aE=="operator"){if(/\+\+|--/.test(aG)){return ac(aF)}if(aG=="?"){return ac(al,o(":"),aH)}return ac(aH)}if(aE=="quasi"){return Y(N,aF)}if(aE==";"){return}if(aE=="("){return at(az,")","call",aF)}if(aE=="."){return ac(aj,aF)}if(aE=="["){return ac(aA("]"),ag,o("]"),g,aF)}}function N(aE,aF){if(aE!="quasi"){return Y()}if(aF.slice(aF.length-2)!="${"){return ac(N)}return ac(al,m)}function m(aE){if(aE=="}"){A.marked="string-2";A.state.tokenize=ax;return ac(N)}}function U(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(al)}function K(aE){ar(A.stream,A.state);if(aE=="{"){return Y(aC)}return Y(az)}function aD(aE){if(aE==":"){return ac(g,aC)}return Y(Z,o(";"),g)}function aj(aE){if(aE=="variable"){A.marked="property";return ac()}}function q(aE,aF){if(aE=="variable"){A.marked="property";if(aF=="get"||aF=="set"){return ac(F)}}else{if(aE=="number"||aE=="string"){A.marked=aw?"property":(aE+" property")}else{if(aE=="["){return ac(al,o("]"),H)}}}if(b.hasOwnProperty(aE)){return ac(H)}}function F(aE){if(aE!="variable"){return Y(H)}A.marked="property";return ac(J)}function H(aE){if(aE==":"){return ac(az)}if(aE=="("){return Y(J)}}function ap(aG,aE){function aF(aI){if(aI==","){var aH=A.state.lexical;if(aH.info=="call"){aH.pos=(aH.pos||0)+1}return ac(aG,aF)}if(aI==aE){return ac()}return ac(o(aE))}return function(aH){if(aH==aE){return ac()}return Y(aG,aF)}}function at(aH,aE,aG){for(var aF=3;aF<arguments.length;aF++){A.cc.push(arguments[aF])}return ac(aA(aE,aG),ap(aH,aE),g)}function v(aE){if(aE=="}"){return ac()}return Y(aC,v)}function Q(aE){if(f&&aE==":"){return ac(ab)}}function ab(aE){if(aE=="variable"){A.marked="variable-3";return ac()}}function c(){return Y(h,Q,aa,V)}function h(aE,aF){if(aE=="variable"){aq(aF);return ac()}if(aE=="["){return at(h,"]")}if(aE=="{"){return at(ay,"}")}}function ay(aE,aF){if(aE=="variable"&&!A.stream.match(/^\s*:/,false)){aq(aF);return ac(aa)}if(aE=="variable"){A.marked="property"}return ac(o(":"),h,aa)}function aa(aE,aF){if(aF=="="){return ac(az)}}function V(aE){if(aE==","){return ac(c)}}function d(aE,aF){if(aE=="keyword b"&&aF=="else"){return ac(aA("form","else"),aC,g)}}function r(aE){if(aE=="("){return ac(aA(")"),B,o(")"),g)}}function B(aE){if(aE=="var"){return ac(c,o(";"),z)}if(aE==";"){return ac(z)}if(aE=="variable"){return ac(s)}return Y(al,o(";"),z)}function s(aE,aF){if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return ac(Z,z)}function z(aE,aF){if(aE==";"){return ac(y)}if(aF=="in"||aF=="of"){A.marked="keyword";return ac(al)}return Y(al,o(";"),y)}function y(aE){if(aE!=")"){ac(al)}}function J(aE,aF){if(aF=="*"){A.marked="keyword";return ac(J)}if(aE=="variable"){aq(aF);return ac(J