Brizy – Page Builder - Version 1.0.115

Version Description

  • 2020-03-10 =
  • Fixed: Removed Nucleo
  • Fixed: Added Font Awesome4
  • Fixed: Removed all possible screenshot extensions al leaved only jpeg
  • Fixed: Force jQuery enqueue.
  • Fixed: Removed some unused code added Select2 as a dependency
  • Fixed: Removed Site Settings feature as this was never used
Download this release

Release Info

Developer themefusecom
Plugin Icon 128x128 Brizy – Page Builder
Version 1.0.115
Comparing to
See all releases

Code changes from version 1.0.114 to 1.0.115

README.md CHANGED
@@ -3,7 +3,7 @@ Contributors: themefuse<br>
3
  Requires at least: 4.5<br>
4
  Tested up to: 5.3.2<br>
5
  Requires PHP: 5.6<br>
6
- Stable tag: 1.0.114<br>
7
  License: GPLv3<br>
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -118,6 +118,14 @@ $bodyHtml = apply_filters( 'brizy_content', $html->get_body(), Brizy_Editor_Proj
118
 
119
  ## Changelog
120
 
 
 
 
 
 
 
 
 
121
  ### 1.0.114 - 2020-02-12 ###
122
  * Fixed: Builder settings page access
123
 
3
  Requires at least: 4.5<br>
4
  Tested up to: 5.3.2<br>
5
  Requires PHP: 5.6<br>
6
+ Stable tag: 1.0.115<br>
7
  License: GPLv3<br>
8
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
 
118
 
119
  ## Changelog
120
 
121
+ ### 1.0.115 - 2020-03-10 ###
122
+ * Fixed: Removed Nucleo
123
+ * Fixed: Added Font Awesome4
124
+ * Fixed: Removed all possible screenshot extensions al leaved only jpeg
125
+ * Fixed: Force jQuery enqueue.
126
+ * Fixed: Removed some unused code added Select2 as a dependency
127
+ * Fixed: Removed Site Settings feature as this was never used
128
+
129
  ### 1.0.114 - 2020-02-12 ###
130
  * Fixed: Builder settings page access
131
 
admin/main.php CHANGED
@@ -257,12 +257,6 @@ class Brizy_Admin_Main {
257
  array(),
258
  Brizy_Editor::get()->get_version()
259
  );
260
- wp_enqueue_style(
261
- Brizy_Editor::get()->get_slug() . '-select2',
262
- 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.6-rc.0/css/select2.min.css',
263
- array(),
264
- true
265
- );
266
 
267
  wp_enqueue_script(
268
  Brizy_Editor::get()->get_slug() . '-admin-js',
@@ -602,4 +596,4 @@ class Brizy_Admin_Main {
602
  public function global_data_updated() {
603
  Brizy_Editor_Post::mark_all_for_compilation();
604
  }
605
- }
257
  array(),
258
  Brizy_Editor::get()->get_version()
259
  );
 
 
 
 
 
 
260
 
261
  wp_enqueue_script(
262
  Brizy_Editor::get()->get_slug() . '-admin-js',
596
  public function global_data_updated() {
597
  Brizy_Editor_Post::mark_all_for_compilation();
598
  }
599
+ }
admin/site-settings.php DELETED
@@ -1,19 +0,0 @@
1
- <?php
2
- /** Load WordPress Bootstrap */
3
-
4
- /** WordPress Administration Bootstrap */
5
- require_once( '../../../../wp-load.php' );
6
- require_once( ABSPATH . 'wp-admin/includes/file.php' );
7
-
8
- if(!is_user_logged_in() || !current_user_can('administrator') ) {
9
- wp_redirect(admin_url());
10
- exit;
11
- }
12
-
13
- if ( class_exists( 'Brizy_Admin_SiteSettings_Main' ) ) {
14
- $settings = new Brizy_Admin_SiteSettings_Main( 'admin/site-settings.php' );
15
- $settings->run();
16
- } else {
17
- echo "You must activate Brizy in order to see this page.";
18
- }
19
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/css/bootstrap.min.css DELETED
@@ -1,7 +0,0 @@
1
- /*!
2
- * Bootstrap v4.1.3 (https://getbootstrap.com/)
3
- * Copyright 2011-2018 The Bootstrap Authors
4
- * Copyright 2011-2018 Twitter, Inc.
5
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
6
- */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}@-ms-viewport{width:device-width}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}dfn{font-style:italic}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent;-webkit-text-decoration-skip:objects}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-family:inherit;font-weight:500;line-height:1.2;color:inherit}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:80%;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:80%;color:#6c757d}.blockquote-footer::before{content:"\2014 \00A0"}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-break:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:576px){.container{max-width:540px}}@media (min-width:768px){.container{max-width:720px}}@media (min-width:992px){.container{max-width:960px}}@media (min-width:1200px){.container{max-width:1140px}}.container-fluid{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;min-height:1px;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media (min-width:576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media (min-width:768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media (min-width:992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media (min-width:1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:none}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;background-color:transparent}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table .table{background-color:#fff}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#212529;border-color:#32383e}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#212529}.table-dark td,.table-dark th,.table-dark thead th{border-color:#32383e}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{background-color:rgba(255,255,255,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-sm>.table-bordered{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-md>.table-bordered{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-lg>.table-bordered{border:0}}@media (max-width:1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:-ms-autohiding-scrollbar}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(2.25rem + 2px);padding:.375rem .75rem;font-size:1rem;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media screen and (prefers-reduced-motion:reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:transparent;border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding-top:.375rem;padding-bottom:.375rem;margin-bottom:0;line-height:1.5;color:#212529;background-color:transparent;border:solid transparent;border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.8125rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(2.875rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#28a745}.valid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.custom-select.is-valid,.form-control.is-valid,.was-validated .custom-select:valid,.was-validated .form-control:valid{border-color:#28a745}.custom-select.is-valid:focus,.form-control.is-valid:focus,.was-validated .custom-select:valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-select.is-valid~.valid-feedback,.custom-select.is-valid~.valid-tooltip,.form-control.is-valid~.valid-feedback,.form-control.is-valid~.valid-tooltip,.was-validated .custom-select:valid~.valid-feedback,.was-validated .custom-select:valid~.valid-tooltip,.was-validated .form-control:valid~.valid-feedback,.was-validated .form-control:valid~.valid-tooltip{display:block}.form-control-file.is-valid~.valid-feedback,.form-control-file.is-valid~.valid-tooltip,.was-validated .form-control-file:valid~.valid-feedback,.was-validated .form-control-file:valid~.valid-tooltip{display:block}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{background-color:#71dd8a}.custom-control-input.is-valid~.valid-feedback,.custom-control-input.is-valid~.valid-tooltip,.was-validated .custom-control-input:valid~.valid-feedback,.was-validated .custom-control-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(40,167,69,.25)}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label::after,.was-validated .custom-file-input:valid~.custom-file-label::after{border-color:inherit}.custom-file-input.is-valid~.valid-feedback,.custom-file-input.is-valid~.valid-tooltip,.was-validated .custom-file-input:valid~.valid-feedback,.was-validated .custom-file-input:valid~.valid-tooltip{display:block}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:80%;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.custom-select.is-invalid,.form-control.is-invalid,.was-validated .custom-select:invalid,.was-validated .form-control:invalid{border-color:#dc3545}.custom-select.is-invalid:focus,.form-control.is-invalid:focus,.was-validated .custom-select:invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-select.is-invalid~.invalid-feedback,.custom-select.is-invalid~.invalid-tooltip,.form-control.is-invalid~.invalid-feedback,.form-control.is-invalid~.invalid-tooltip,.was-validated .custom-select:invalid~.invalid-feedback,.was-validated .custom-select:invalid~.invalid-tooltip,.was-validated .form-control:invalid~.invalid-feedback,.was-validated .form-control:invalid~.invalid-tooltip{display:block}.form-control-file.is-invalid~.invalid-feedback,.form-control-file.is-invalid~.invalid-tooltip,.was-validated .form-control-file:invalid~.invalid-feedback,.was-validated .form-control-file:invalid~.invalid-tooltip{display:block}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{background-color:#efa2a9}.custom-control-input.is-invalid~.invalid-feedback,.custom-control-input.is-invalid~.invalid-tooltip,.was-validated .custom-control-input:invalid~.invalid-feedback,.was-validated .custom-control-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(220,53,69,.25)}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label::after,.was-validated .custom-file-input:invalid~.custom-file-label::after{border-color:inherit}.custom-file-input.is-invalid~.invalid-feedback,.custom-file-input.is-invalid~.invalid-tooltip,.was-validated .custom-file-input:invalid~.invalid-feedback,.was-validated .custom-file-input:invalid~.invalid-tooltip{display:block}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media (min-width:576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media screen and (prefers-reduced-motion:reduce){.btn{transition:none}}.btn:focus,.btn:hover{text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-primary{color:#007bff;background-color:transparent;background-image:none;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:transparent}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;background-color:transparent;background-image:none;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:transparent}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;background-color:transparent;background-image:none;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:transparent}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;background-color:transparent;background-image:none;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:transparent}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;background-color:transparent;background-image:none;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:transparent}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;background-color:transparent;background-image:none;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:transparent}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;background-color:transparent;background-image:none;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:transparent}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;background-color:transparent;background-image:none;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:transparent}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;background-color:transparent}.btn-link:hover{color:#0056b3;text-decoration:underline;background-color:transparent;border-color:transparent}.btn-link.focus,.btn-link:focus{text-decoration:underline;border-color:transparent;box-shadow:none}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media screen and (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media screen and (prefers-reduced-motion:reduce){.collapsing{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid transparent;border-bottom:0;border-left:.3em solid transparent}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-right{right:0;left:auto}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid transparent;border-bottom:.3em solid;border-left:.3em solid transparent}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:0;border-bottom:.3em solid transparent;border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;width:0;height:0;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;width:0;height:0;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid transparent;border-right:.3em solid;border-bottom:.3em solid transparent}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#f8f9fa}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#6c757d;background-color:transparent}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:0 1 auto;flex:0 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group,.btn-group-vertical .btn+.btn,.btn-group-vertical .btn+.btn-group,.btn-group-vertical .btn-group+.btn,.btn-group-vertical .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical .btn,.btn-group-vertical .btn-group{width:100%}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:last-child),.input-group>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{height:calc(2.875rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{height:calc(1.8125rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-append:not(:last-child)>.btn,.input-group>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;display:block;min-height:1.5rem;padding-left:1.5rem}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;z-index:-1;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:active~.custom-control-label::before{color:#fff;background-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:#dee2e6}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background-repeat:no-repeat;background-position:center center;background-size:50% 50%}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::before{background-color:#007bff}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 4'%3E%3Cpath stroke='%23fff' d='M0 2h4'/%3E%3C/svg%3E")}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::before{background-color:#007bff}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='3' fill='%23fff'/%3E%3C/svg%3E")}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(2.25rem + 2px);padding:.375rem 1.75rem .375rem .75rem;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E") no-repeat right .75rem center;background-size:8px 10px;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(128,189,255,.5)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{opacity:0}.custom-select-sm{height:calc(1.8125rem + 2px);padding-top:.375rem;padding-bottom:.375rem;font-size:75%}.custom-select-lg{height:calc(2.875rem + 2px);padding-top:.375rem;padding-bottom:.375rem;font-size:125%}.custom-file{position:relative;display:inline-block;width:100%;height:calc(2.25rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(2.25rem + 2px);margin:0;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:focus~.custom-file-label::after{border-color:#80bdff}.custom-file-input:disabled~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(2.25rem + 2px);padding:.375rem .75rem;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:2.25rem;padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:1px solid #ced4da;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;padding-left:0;background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-.25rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media screen and (prefers-reduced-motion:reduce){.custom-range::-webkit-slider-thumb{transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media screen and (prefers-reduced-motion:reduce){.custom-range::-moz-range-thumb{transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:#dee2e6;border-color:transparent;border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media screen and (prefers-reduced-motion:reduce){.custom-range::-ms-thumb{transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:transparent;cursor:pointer;background-color:transparent;border-color:transparent;border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media screen and (prefers-reduced-motion:reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-item{margin-bottom:-1px}.nav-tabs .nav-link{border:1px solid transparent;border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:transparent;border-color:transparent}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar>.container,.navbar>.container-fluid{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:transparent;border:1px solid transparent;border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler:not(:disabled):not(.disabled){cursor:pointer}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:no-repeat center center;background-size:100% 100%}@media (max-width:575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media (max-width:767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media (max-width:991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media (max-width:1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{padding-right:0;padding-left:0}}@media (min-width:1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-collapse{display:-ms-flexbox!important;display:flex!important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0, 0, 0, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255, 255, 255, 0.5)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E")}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group:first-child .list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card>.list-group:last-child .list-group-item:last-child{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-header+.list-group .list-group-item:first-child{border-top:0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-.625rem;margin-bottom:-.75rem;margin-left:-.625rem;border-bottom:0}.card-header-pills{margin-right:-.625rem;margin-left:-.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem}.card-img{width:100%;border-radius:calc(.25rem - 1px)}.card-img-top{width:100%;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img-bottom{width:100%;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.card-deck .card{margin-bottom:15px}@media (min-width:576px){.card-deck{-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{display:-ms-flexbox;display:flex;-ms-flex:1 0 0%;flex:1 0 0%;-ms-flex-direction:column;flex-direction:column;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.card-group>.card{margin-bottom:15px}@media (min-width:576px){.card-group{-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:first-child .card-header,.card-group>.card:first-child .card-img-top{border-top-right-radius:0}.card-group>.card:first-child .card-footer,.card-group>.card:first-child .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:last-child .card-header,.card-group>.card:last-child .card-img-top{border-top-left-radius:0}.card-group>.card:last-child .card-footer,.card-group>.card:last-child .card-img-bottom{border-bottom-left-radius:0}.card-group>.card:only-child{border-radius:.25rem}.card-group>.card:only-child .card-header,.card-group>.card:only-child .card-img-top{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.card-group>.card:only-child .card-footer,.card-group>.card:only-child .card-img-bottom{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.card-group>.card:not(:first-child):not(:last-child):not(:only-child){border-radius:0}.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-footer,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-header,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-bottom,.card-group>.card:not(:first-child):not(:last-child):not(:only-child) .card-img-top{border-radius:0}}.card-columns .card{margin-bottom:.75rem}@media (min-width:576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion .card:not(:first-of-type):not(:last-of-type){border-bottom:0;border-radius:0}.accordion .card:not(:first-of-type) .card-header:first-child{border-radius:0}.accordion .card:first-of-type{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion .card:last-of-type{border-top-left-radius:0;border-top-right-radius:0}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{display:inline-block;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:2;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-link:not(:disabled):not(.disabled){cursor:pointer}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:1;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}.badge-primary[href]:focus,.badge-primary[href]:hover{color:#fff;text-decoration:none;background-color:#0062cc}.badge-secondary{color:#fff;background-color:#6c757d}.badge-secondary[href]:focus,.badge-secondary[href]:hover{color:#fff;text-decoration:none;background-color:#545b62}.badge-success{color:#fff;background-color:#28a745}.badge-success[href]:focus,.badge-success[href]:hover{color:#fff;text-decoration:none;background-color:#1e7e34}.badge-info{color:#fff;background-color:#17a2b8}.badge-info[href]:focus,.badge-info[href]:hover{color:#fff;text-decoration:none;background-color:#117a8b}.badge-warning{color:#212529;background-color:#ffc107}.badge-warning[href]:focus,.badge-warning[href]:hover{color:#212529;text-decoration:none;background-color:#d39e00}.badge-danger{color:#fff;background-color:#dc3545}.badge-danger[href]:focus,.badge-danger[href]:hover{color:#fff;text-decoration:none;background-color:#bd2130}.badge-light{color:#212529;background-color:#f8f9fa}.badge-light[href]:focus,.badge-light[href]:hover{color:#212529;text-decoration:none;background-color:#dae0e5}.badge-dark{color:#fff;background-color:#343a40}.badge-dark[href]:focus,.badge-dark[href]:hover{color:#fff;text-decoration:none;background-color:#1d2124}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media (min-width:576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid transparent;border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media screen and (prefers-reduced-motion:reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:progress-bar-stripes 1s linear infinite;animation:progress-bar-stripes 1s linear infinite}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;margin-bottom:-1px;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.list-group-item:focus,.list-group-item:hover{z-index:1;text-decoration:none}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-flush .list-group-item{border-right:0;border-left:0;border-radius:0}.list-group-flush:first-child .list-group-item:first-child{border-top:0}.list-group-flush:last-child .list-group-item:last-child{border-bottom:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:not(:disabled):not(.disabled){cursor:pointer}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{color:#000;text-decoration:none;opacity:.75}button.close{padding:0;background-color:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0,-25%);transform:translate(0,-25%)}@media screen and (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:translate(0,0);transform:translate(0,0)}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - (.5rem * 2))}.modal-dialog-centered::before{display:block;height:calc(100vh - (.5rem * 2));content:""}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem;border-bottom:1px solid #e9ecef;border-top-left-radius:.3rem;border-top-right-radius:.3rem}.modal-header .close{padding:1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:1rem;border-top:1px solid #e9ecef}.modal-footer>:not(:first-child){margin-left:.25rem}.modal-footer>:not(:last-child){margin-right:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-centered{min-height:calc(100% - (1.75rem * 2))}.modal-dialog-centered::before{height:calc(100vh - (1.75rem * 2))}.modal-sm{max-width:300px}}@media (min-width:992px){.modal-lg{max-width:800px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:transparent;border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;white-space:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:transparent;border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top] .arrow,.bs-popover-top .arrow{bottom:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=top] .arrow::after,.bs-popover-auto[x-placement^=top] .arrow::before,.bs-popover-top .arrow::after,.bs-popover-top .arrow::before{border-width:.5rem .5rem 0}.bs-popover-auto[x-placement^=top] .arrow::before,.bs-popover-top .arrow::before{bottom:0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top] .arrow::after,.bs-popover-top .arrow::after{bottom:1px;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right] .arrow,.bs-popover-right .arrow{left:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right] .arrow::after,.bs-popover-auto[x-placement^=right] .arrow::before,.bs-popover-right .arrow::after,.bs-popover-right .arrow::before{border-width:.5rem .5rem .5rem 0}.bs-popover-auto[x-placement^=right] .arrow::before,.bs-popover-right .arrow::before{left:0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right] .arrow::after,.bs-popover-right .arrow::after{left:1px;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom] .arrow,.bs-popover-bottom .arrow{top:calc((.5rem + 1px) * -1)}.bs-popover-auto[x-placement^=bottom] .arrow::after,.bs-popover-auto[x-placement^=bottom] .arrow::before,.bs-popover-bottom .arrow::after,.bs-popover-bottom .arrow::before{border-width:0 .5rem .5rem .5rem}.bs-popover-auto[x-placement^=bottom] .arrow::before,.bs-popover-bottom .arrow::before{top:0;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom] .arrow::after,.bs-popover-bottom .arrow::after{top:1px;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left] .arrow,.bs-popover-left .arrow{right:calc((.5rem + 1px) * -1);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left] .arrow::after,.bs-popover-auto[x-placement^=left] .arrow::before,.bs-popover-left .arrow::after,.bs-popover-left .arrow::before{border-width:.5rem 0 .5rem .5rem}.bs-popover-auto[x-placement^=left] .arrow::before,.bs-popover-left .arrow::before{right:0;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left] .arrow::after,.bs-popover-left .arrow::after{right:1px;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;color:inherit;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-item{position:relative;display:none;-ms-flex-align:center;align-items:center;width:100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block;transition:-webkit-transform .6s ease;transition:transform .6s ease;transition:transform .6s ease,-webkit-transform .6s ease}@media screen and (prefers-reduced-motion:reduce){.carousel-item-next,.carousel-item-prev,.carousel-item.active{transition:none}}.carousel-item-next,.carousel-item-prev{position:absolute;top:0}.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translateX(0);transform:translateX(0)}@supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.carousel-item-next.carousel-item-left,.carousel-item-prev.carousel-item-right{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.active.carousel-item-right,.carousel-item-next{-webkit-transform:translateX(100%);transform:translateX(100%)}@supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.active.carousel-item-right,.carousel-item-next{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.active.carousel-item-left,.carousel-item-prev{-webkit-transform:translateX(-100%);transform:translateX(-100%)}@supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.active.carousel-item-left,.carousel-item-prev{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.carousel-fade .carousel-item{opacity:0;transition-duration:.6s;transition-property:opacity}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{opacity:0}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-prev,.carousel-fade .carousel-item-next,.carousel-fade .carousel-item-prev,.carousel-fade .carousel-item.active{-webkit-transform:translateX(0);transform:translateX(0)}@supports ((-webkit-transform-style:preserve-3d) or (transform-style:preserve-3d)){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-prev,.carousel-fade .carousel-item-next,.carousel-fade .carousel-item-prev,.carousel-fade .carousel-item.active{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;color:#fff;text-align:center;opacity:.5}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:transparent no-repeat center center;background-size:100% 100%}.carousel-control-prev-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M5.25 0l-4 4 4 4 1.5-1.5-2.5-2.5 2.5-2.5-1.5-1.5z'/%3E%3C/svg%3E")}.carousel-control-next-icon{background-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 8 8'%3E%3Cpath d='M2.75 0l-1.5 1.5 2.5 2.5-2.5 2.5 1.5 1.5 4-4-4-4z'/%3E%3C/svg%3E")}.carousel-indicators{position:absolute;right:0;bottom:10px;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{position:relative;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:rgba(255,255,255,.5)}.carousel-indicators li::before{position:absolute;top:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators li::after{position:absolute;bottom:-10px;left:0;display:inline-block;width:100%;height:10px;content:""}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}.align-baseline{vertical-align:baseline!important}.align-top{vertical-align:top!important}.align-middle{vertical-align:middle!important}.align-bottom{vertical-align:bottom!important}.align-text-bottom{vertical-align:text-bottom!important}.align-text-top{vertical-align:text-top!important}.bg-primary{background-color:#007bff!important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc!important}.bg-secondary{background-color:#6c757d!important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62!important}.bg-success{background-color:#28a745!important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34!important}.bg-info{background-color:#17a2b8!important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b!important}.bg-warning{background-color:#ffc107!important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00!important}.bg-danger{background-color:#dc3545!important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130!important}.bg-light{background-color:#f8f9fa!important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5!important}.bg-dark{background-color:#343a40!important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124!important}.bg-white{background-color:#fff!important}.bg-transparent{background-color:transparent!important}.border{border:1px solid #dee2e6!important}.border-top{border-top:1px solid #dee2e6!important}.border-right{border-right:1px solid #dee2e6!important}.border-bottom{border-bottom:1px solid #dee2e6!important}.border-left{border-left:1px solid #dee2e6!important}.border-0{border:0!important}.border-top-0{border-top:0!important}.border-right-0{border-right:0!important}.border-bottom-0{border-bottom:0!important}.border-left-0{border-left:0!important}.border-primary{border-color:#007bff!important}.border-secondary{border-color:#6c757d!important}.border-success{border-color:#28a745!important}.border-info{border-color:#17a2b8!important}.border-warning{border-color:#ffc107!important}.border-danger{border-color:#dc3545!important}.border-light{border-color:#f8f9fa!important}.border-dark{border-color:#343a40!important}.border-white{border-color:#fff!important}.rounded{border-radius:.25rem!important}.rounded-top{border-top-left-radius:.25rem!important;border-top-right-radius:.25rem!important}.rounded-right{border-top-right-radius:.25rem!important;border-bottom-right-radius:.25rem!important}.rounded-bottom{border-bottom-right-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-left{border-top-left-radius:.25rem!important;border-bottom-left-radius:.25rem!important}.rounded-circle{border-radius:50%!important}.rounded-0{border-radius:0!important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none!important}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:-ms-flexbox!important;display:flex!important}.d-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}@media (min-width:576px){.d-sm-none{display:none!important}.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:-ms-flexbox!important;display:flex!important}.d-sm-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:768px){.d-md-none{display:none!important}.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:-ms-flexbox!important;display:flex!important}.d-md-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:992px){.d-lg-none{display:none!important}.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:-ms-flexbox!important;display:flex!important}.d-lg-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media (min-width:1200px){.d-xl-none{display:none!important}.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:-ms-flexbox!important;display:flex!important}.d-xl-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}@media print{.d-print-none{display:none!important}.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:-ms-flexbox!important;display:flex!important}.d-print-inline-flex{display:-ms-inline-flexbox!important;display:inline-flex!important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-center{-ms-flex-align:center!important;align-items:center!important}.align-items-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}@media (min-width:576px){.flex-sm-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-sm-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-sm-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-sm-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-sm-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-sm-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-sm-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-sm-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-sm-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-sm-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-sm-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-sm-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-sm-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-sm-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-sm-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-sm-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-sm-center{-ms-flex-align:center!important;align-items:center!important}.align-items-sm-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-sm-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-sm-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-sm-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-sm-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-sm-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-sm-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-sm-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-sm-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-sm-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-sm-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-sm-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-sm-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-sm-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:768px){.flex-md-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-md-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-md-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-md-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-md-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-md-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-md-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-md-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-md-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-md-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-md-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-md-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-md-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-md-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-md-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-md-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-md-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-md-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-md-center{-ms-flex-align:center!important;align-items:center!important}.align-items-md-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-md-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-md-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-md-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-md-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-md-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-md-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-md-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-md-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-md-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-md-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-md-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-md-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-md-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:992px){.flex-lg-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-lg-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-lg-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-lg-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-lg-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-lg-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-lg-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-lg-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-lg-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-lg-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-lg-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-lg-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-lg-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-lg-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-lg-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-lg-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-lg-center{-ms-flex-align:center!important;align-items:center!important}.align-items-lg-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-lg-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-lg-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-lg-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-lg-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-lg-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-lg-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-lg-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-lg-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-lg-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-lg-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-lg-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-lg-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-lg-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}@media (min-width:1200px){.flex-xl-row{-ms-flex-direction:row!important;flex-direction:row!important}.flex-xl-column{-ms-flex-direction:column!important;flex-direction:column!important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse!important;flex-direction:row-reverse!important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse!important;flex-direction:column-reverse!important}.flex-xl-wrap{-ms-flex-wrap:wrap!important;flex-wrap:wrap!important}.flex-xl-nowrap{-ms-flex-wrap:nowrap!important;flex-wrap:nowrap!important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse!important;flex-wrap:wrap-reverse!important}.flex-xl-fill{-ms-flex:1 1 auto!important;flex:1 1 auto!important}.flex-xl-grow-0{-ms-flex-positive:0!important;flex-grow:0!important}.flex-xl-grow-1{-ms-flex-positive:1!important;flex-grow:1!important}.flex-xl-shrink-0{-ms-flex-negative:0!important;flex-shrink:0!important}.flex-xl-shrink-1{-ms-flex-negative:1!important;flex-shrink:1!important}.justify-content-xl-start{-ms-flex-pack:start!important;justify-content:flex-start!important}.justify-content-xl-end{-ms-flex-pack:end!important;justify-content:flex-end!important}.justify-content-xl-center{-ms-flex-pack:center!important;justify-content:center!important}.justify-content-xl-between{-ms-flex-pack:justify!important;justify-content:space-between!important}.justify-content-xl-around{-ms-flex-pack:distribute!important;justify-content:space-around!important}.align-items-xl-start{-ms-flex-align:start!important;align-items:flex-start!important}.align-items-xl-end{-ms-flex-align:end!important;align-items:flex-end!important}.align-items-xl-center{-ms-flex-align:center!important;align-items:center!important}.align-items-xl-baseline{-ms-flex-align:baseline!important;align-items:baseline!important}.align-items-xl-stretch{-ms-flex-align:stretch!important;align-items:stretch!important}.align-content-xl-start{-ms-flex-line-pack:start!important;align-content:flex-start!important}.align-content-xl-end{-ms-flex-line-pack:end!important;align-content:flex-end!important}.align-content-xl-center{-ms-flex-line-pack:center!important;align-content:center!important}.align-content-xl-between{-ms-flex-line-pack:justify!important;align-content:space-between!important}.align-content-xl-around{-ms-flex-line-pack:distribute!important;align-content:space-around!important}.align-content-xl-stretch{-ms-flex-line-pack:stretch!important;align-content:stretch!important}.align-self-xl-auto{-ms-flex-item-align:auto!important;align-self:auto!important}.align-self-xl-start{-ms-flex-item-align:start!important;align-self:flex-start!important}.align-self-xl-end{-ms-flex-item-align:end!important;align-self:flex-end!important}.align-self-xl-center{-ms-flex-item-align:center!important;align-self:center!important}.align-self-xl-baseline{-ms-flex-item-align:baseline!important;align-self:baseline!important}.align-self-xl-stretch{-ms-flex-item-align:stretch!important;align-self:stretch!important}}.float-left{float:left!important}.float-right{float:right!important}.float-none{float:none!important}@media (min-width:576px){.float-sm-left{float:left!important}.float-sm-right{float:right!important}.float-sm-none{float:none!important}}@media (min-width:768px){.float-md-left{float:left!important}.float-md-right{float:right!important}.float-md-none{float:none!important}}@media (min-width:992px){.float-lg-left{float:left!important}.float-lg-right{float:right!important}.float-lg-none{float:none!important}}@media (min-width:1200px){.float-xl-left{float:left!important}.float-xl-right{float:right!important}.float-xl-none{float:none!important}}.position-static{position:static!important}.position-relative{position:relative!important}.position-absolute{position:absolute!important}.position-fixed{position:fixed!important}.position-sticky{position:-webkit-sticky!important;position:sticky!important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports ((position:-webkit-sticky) or (position:sticky)){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075)!important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15)!important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175)!important}.shadow-none{box-shadow:none!important}.w-25{width:25%!important}.w-50{width:50%!important}.w-75{width:75%!important}.w-100{width:100%!important}.w-auto{width:auto!important}.h-25{height:25%!important}.h-50{height:50%!important}.h-75{height:75%!important}.h-100{height:100%!important}.h-auto{height:auto!important}.mw-100{max-width:100%!important}.mh-100{max-height:100%!important}.m-0{margin:0!important}.mt-0,.my-0{margin-top:0!important}.mr-0,.mx-0{margin-right:0!important}.mb-0,.my-0{margin-bottom:0!important}.ml-0,.mx-0{margin-left:0!important}.m-1{margin:.25rem!important}.mt-1,.my-1{margin-top:.25rem!important}.mr-1,.mx-1{margin-right:.25rem!important}.mb-1,.my-1{margin-bottom:.25rem!important}.ml-1,.mx-1{margin-left:.25rem!important}.m-2{margin:.5rem!important}.mt-2,.my-2{margin-top:.5rem!important}.mr-2,.mx-2{margin-right:.5rem!important}.mb-2,.my-2{margin-bottom:.5rem!important}.ml-2,.mx-2{margin-left:.5rem!important}.m-3{margin:1rem!important}.mt-3,.my-3{margin-top:1rem!important}.mr-3,.mx-3{margin-right:1rem!important}.mb-3,.my-3{margin-bottom:1rem!important}.ml-3,.mx-3{margin-left:1rem!important}.m-4{margin:1.5rem!important}.mt-4,.my-4{margin-top:1.5rem!important}.mr-4,.mx-4{margin-right:1.5rem!important}.mb-4,.my-4{margin-bottom:1.5rem!important}.ml-4,.mx-4{margin-left:1.5rem!important}.m-5{margin:3rem!important}.mt-5,.my-5{margin-top:3rem!important}.mr-5,.mx-5{margin-right:3rem!important}.mb-5,.my-5{margin-bottom:3rem!important}.ml-5,.mx-5{margin-left:3rem!important}.p-0{padding:0!important}.pt-0,.py-0{padding-top:0!important}.pr-0,.px-0{padding-right:0!important}.pb-0,.py-0{padding-bottom:0!important}.pl-0,.px-0{padding-left:0!important}.p-1{padding:.25rem!important}.pt-1,.py-1{padding-top:.25rem!important}.pr-1,.px-1{padding-right:.25rem!important}.pb-1,.py-1{padding-bottom:.25rem!important}.pl-1,.px-1{padding-left:.25rem!important}.p-2{padding:.5rem!important}.pt-2,.py-2{padding-top:.5rem!important}.pr-2,.px-2{padding-right:.5rem!important}.pb-2,.py-2{padding-bottom:.5rem!important}.pl-2,.px-2{padding-left:.5rem!important}.p-3{padding:1rem!important}.pt-3,.py-3{padding-top:1rem!important}.pr-3,.px-3{padding-right:1rem!important}.pb-3,.py-3{padding-bottom:1rem!important}.pl-3,.px-3{padding-left:1rem!important}.p-4{padding:1.5rem!important}.pt-4,.py-4{padding-top:1.5rem!important}.pr-4,.px-4{padding-right:1.5rem!important}.pb-4,.py-4{padding-bottom:1.5rem!important}.pl-4,.px-4{padding-left:1.5rem!important}.p-5{padding:3rem!important}.pt-5,.py-5{padding-top:3rem!important}.pr-5,.px-5{padding-right:3rem!important}.pb-5,.py-5{padding-bottom:3rem!important}.pl-5,.px-5{padding-left:3rem!important}.m-auto{margin:auto!important}.mt-auto,.my-auto{margin-top:auto!important}.mr-auto,.mx-auto{margin-right:auto!important}.mb-auto,.my-auto{margin-bottom:auto!important}.ml-auto,.mx-auto{margin-left:auto!important}@media (min-width:576px){.m-sm-0{margin:0!important}.mt-sm-0,.my-sm-0{margin-top:0!important}.mr-sm-0,.mx-sm-0{margin-right:0!important}.mb-sm-0,.my-sm-0{margin-bottom:0!important}.ml-sm-0,.mx-sm-0{margin-left:0!important}.m-sm-1{margin:.25rem!important}.mt-sm-1,.my-sm-1{margin-top:.25rem!important}.mr-sm-1,.mx-sm-1{margin-right:.25rem!important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem!important}.ml-sm-1,.mx-sm-1{margin-left:.25rem!important}.m-sm-2{margin:.5rem!important}.mt-sm-2,.my-sm-2{margin-top:.5rem!important}.mr-sm-2,.mx-sm-2{margin-right:.5rem!important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem!important}.ml-sm-2,.mx-sm-2{margin-left:.5rem!important}.m-sm-3{margin:1rem!important}.mt-sm-3,.my-sm-3{margin-top:1rem!important}.mr-sm-3,.mx-sm-3{margin-right:1rem!important}.mb-sm-3,.my-sm-3{margin-bottom:1rem!important}.ml-sm-3,.mx-sm-3{margin-left:1rem!important}.m-sm-4{margin:1.5rem!important}.mt-sm-4,.my-sm-4{margin-top:1.5rem!important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem!important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem!important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem!important}.m-sm-5{margin:3rem!important}.mt-sm-5,.my-sm-5{margin-top:3rem!important}.mr-sm-5,.mx-sm-5{margin-right:3rem!important}.mb-sm-5,.my-sm-5{margin-bottom:3rem!important}.ml-sm-5,.mx-sm-5{margin-left:3rem!important}.p-sm-0{padding:0!important}.pt-sm-0,.py-sm-0{padding-top:0!important}.pr-sm-0,.px-sm-0{padding-right:0!important}.pb-sm-0,.py-sm-0{padding-bottom:0!important}.pl-sm-0,.px-sm-0{padding-left:0!important}.p-sm-1{padding:.25rem!important}.pt-sm-1,.py-sm-1{padding-top:.25rem!important}.pr-sm-1,.px-sm-1{padding-right:.25rem!important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem!important}.pl-sm-1,.px-sm-1{padding-left:.25rem!important}.p-sm-2{padding:.5rem!important}.pt-sm-2,.py-sm-2{padding-top:.5rem!important}.pr-sm-2,.px-sm-2{padding-right:.5rem!important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem!important}.pl-sm-2,.px-sm-2{padding-left:.5rem!important}.p-sm-3{padding:1rem!important}.pt-sm-3,.py-sm-3{padding-top:1rem!important}.pr-sm-3,.px-sm-3{padding-right:1rem!important}.pb-sm-3,.py-sm-3{padding-bottom:1rem!important}.pl-sm-3,.px-sm-3{padding-left:1rem!important}.p-sm-4{padding:1.5rem!important}.pt-sm-4,.py-sm-4{padding-top:1.5rem!important}.pr-sm-4,.px-sm-4{padding-right:1.5rem!important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem!important}.pl-sm-4,.px-sm-4{padding-left:1.5rem!important}.p-sm-5{padding:3rem!important}.pt-sm-5,.py-sm-5{padding-top:3rem!important}.pr-sm-5,.px-sm-5{padding-right:3rem!important}.pb-sm-5,.py-sm-5{padding-bottom:3rem!important}.pl-sm-5,.px-sm-5{padding-left:3rem!important}.m-sm-auto{margin:auto!important}.mt-sm-auto,.my-sm-auto{margin-top:auto!important}.mr-sm-auto,.mx-sm-auto{margin-right:auto!important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto!important}.ml-sm-auto,.mx-sm-auto{margin-left:auto!important}}@media (min-width:768px){.m-md-0{margin:0!important}.mt-md-0,.my-md-0{margin-top:0!important}.mr-md-0,.mx-md-0{margin-right:0!important}.mb-md-0,.my-md-0{margin-bottom:0!important}.ml-md-0,.mx-md-0{margin-left:0!important}.m-md-1{margin:.25rem!important}.mt-md-1,.my-md-1{margin-top:.25rem!important}.mr-md-1,.mx-md-1{margin-right:.25rem!important}.mb-md-1,.my-md-1{margin-bottom:.25rem!important}.ml-md-1,.mx-md-1{margin-left:.25rem!important}.m-md-2{margin:.5rem!important}.mt-md-2,.my-md-2{margin-top:.5rem!important}.mr-md-2,.mx-md-2{margin-right:.5rem!important}.mb-md-2,.my-md-2{margin-bottom:.5rem!important}.ml-md-2,.mx-md-2{margin-left:.5rem!important}.m-md-3{margin:1rem!important}.mt-md-3,.my-md-3{margin-top:1rem!important}.mr-md-3,.mx-md-3{margin-right:1rem!important}.mb-md-3,.my-md-3{margin-bottom:1rem!important}.ml-md-3,.mx-md-3{margin-left:1rem!important}.m-md-4{margin:1.5rem!important}.mt-md-4,.my-md-4{margin-top:1.5rem!important}.mr-md-4,.mx-md-4{margin-right:1.5rem!important}.mb-md-4,.my-md-4{margin-bottom:1.5rem!important}.ml-md-4,.mx-md-4{margin-left:1.5rem!important}.m-md-5{margin:3rem!important}.mt-md-5,.my-md-5{margin-top:3rem!important}.mr-md-5,.mx-md-5{margin-right:3rem!important}.mb-md-5,.my-md-5{margin-bottom:3rem!important}.ml-md-5,.mx-md-5{margin-left:3rem!important}.p-md-0{padding:0!important}.pt-md-0,.py-md-0{padding-top:0!important}.pr-md-0,.px-md-0{padding-right:0!important}.pb-md-0,.py-md-0{padding-bottom:0!important}.pl-md-0,.px-md-0{padding-left:0!important}.p-md-1{padding:.25rem!important}.pt-md-1,.py-md-1{padding-top:.25rem!important}.pr-md-1,.px-md-1{padding-right:.25rem!important}.pb-md-1,.py-md-1{padding-bottom:.25rem!important}.pl-md-1,.px-md-1{padding-left:.25rem!important}.p-md-2{padding:.5rem!important}.pt-md-2,.py-md-2{padding-top:.5rem!important}.pr-md-2,.px-md-2{padding-right:.5rem!important}.pb-md-2,.py-md-2{padding-bottom:.5rem!important}.pl-md-2,.px-md-2{padding-left:.5rem!important}.p-md-3{padding:1rem!important}.pt-md-3,.py-md-3{padding-top:1rem!important}.pr-md-3,.px-md-3{padding-right:1rem!important}.pb-md-3,.py-md-3{padding-bottom:1rem!important}.pl-md-3,.px-md-3{padding-left:1rem!important}.p-md-4{padding:1.5rem!important}.pt-md-4,.py-md-4{padding-top:1.5rem!important}.pr-md-4,.px-md-4{padding-right:1.5rem!important}.pb-md-4,.py-md-4{padding-bottom:1.5rem!important}.pl-md-4,.px-md-4{padding-left:1.5rem!important}.p-md-5{padding:3rem!important}.pt-md-5,.py-md-5{padding-top:3rem!important}.pr-md-5,.px-md-5{padding-right:3rem!important}.pb-md-5,.py-md-5{padding-bottom:3rem!important}.pl-md-5,.px-md-5{padding-left:3rem!important}.m-md-auto{margin:auto!important}.mt-md-auto,.my-md-auto{margin-top:auto!important}.mr-md-auto,.mx-md-auto{margin-right:auto!important}.mb-md-auto,.my-md-auto{margin-bottom:auto!important}.ml-md-auto,.mx-md-auto{margin-left:auto!important}}@media (min-width:992px){.m-lg-0{margin:0!important}.mt-lg-0,.my-lg-0{margin-top:0!important}.mr-lg-0,.mx-lg-0{margin-right:0!important}.mb-lg-0,.my-lg-0{margin-bottom:0!important}.ml-lg-0,.mx-lg-0{margin-left:0!important}.m-lg-1{margin:.25rem!important}.mt-lg-1,.my-lg-1{margin-top:.25rem!important}.mr-lg-1,.mx-lg-1{margin-right:.25rem!important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem!important}.ml-lg-1,.mx-lg-1{margin-left:.25rem!important}.m-lg-2{margin:.5rem!important}.mt-lg-2,.my-lg-2{margin-top:.5rem!important}.mr-lg-2,.mx-lg-2{margin-right:.5rem!important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem!important}.ml-lg-2,.mx-lg-2{margin-left:.5rem!important}.m-lg-3{margin:1rem!important}.mt-lg-3,.my-lg-3{margin-top:1rem!important}.mr-lg-3,.mx-lg-3{margin-right:1rem!important}.mb-lg-3,.my-lg-3{margin-bottom:1rem!important}.ml-lg-3,.mx-lg-3{margin-left:1rem!important}.m-lg-4{margin:1.5rem!important}.mt-lg-4,.my-lg-4{margin-top:1.5rem!important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem!important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem!important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem!important}.m-lg-5{margin:3rem!important}.mt-lg-5,.my-lg-5{margin-top:3rem!important}.mr-lg-5,.mx-lg-5{margin-right:3rem!important}.mb-lg-5,.my-lg-5{margin-bottom:3rem!important}.ml-lg-5,.mx-lg-5{margin-left:3rem!important}.p-lg-0{padding:0!important}.pt-lg-0,.py-lg-0{padding-top:0!important}.pr-lg-0,.px-lg-0{padding-right:0!important}.pb-lg-0,.py-lg-0{padding-bottom:0!important}.pl-lg-0,.px-lg-0{padding-left:0!important}.p-lg-1{padding:.25rem!important}.pt-lg-1,.py-lg-1{padding-top:.25rem!important}.pr-lg-1,.px-lg-1{padding-right:.25rem!important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem!important}.pl-lg-1,.px-lg-1{padding-left:.25rem!important}.p-lg-2{padding:.5rem!important}.pt-lg-2,.py-lg-2{padding-top:.5rem!important}.pr-lg-2,.px-lg-2{padding-right:.5rem!important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem!important}.pl-lg-2,.px-lg-2{padding-left:.5rem!important}.p-lg-3{padding:1rem!important}.pt-lg-3,.py-lg-3{padding-top:1rem!important}.pr-lg-3,.px-lg-3{padding-right:1rem!important}.pb-lg-3,.py-lg-3{padding-bottom:1rem!important}.pl-lg-3,.px-lg-3{padding-left:1rem!important}.p-lg-4{padding:1.5rem!important}.pt-lg-4,.py-lg-4{padding-top:1.5rem!important}.pr-lg-4,.px-lg-4{padding-right:1.5rem!important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem!important}.pl-lg-4,.px-lg-4{padding-left:1.5rem!important}.p-lg-5{padding:3rem!important}.pt-lg-5,.py-lg-5{padding-top:3rem!important}.pr-lg-5,.px-lg-5{padding-right:3rem!important}.pb-lg-5,.py-lg-5{padding-bottom:3rem!important}.pl-lg-5,.px-lg-5{padding-left:3rem!important}.m-lg-auto{margin:auto!important}.mt-lg-auto,.my-lg-auto{margin-top:auto!important}.mr-lg-auto,.mx-lg-auto{margin-right:auto!important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto!important}.ml-lg-auto,.mx-lg-auto{margin-left:auto!important}}@media (min-width:1200px){.m-xl-0{margin:0!important}.mt-xl-0,.my-xl-0{margin-top:0!important}.mr-xl-0,.mx-xl-0{margin-right:0!important}.mb-xl-0,.my-xl-0{margin-bottom:0!important}.ml-xl-0,.mx-xl-0{margin-left:0!important}.m-xl-1{margin:.25rem!important}.mt-xl-1,.my-xl-1{margin-top:.25rem!important}.mr-xl-1,.mx-xl-1{margin-right:.25rem!important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem!important}.ml-xl-1,.mx-xl-1{margin-left:.25rem!important}.m-xl-2{margin:.5rem!important}.mt-xl-2,.my-xl-2{margin-top:.5rem!important}.mr-xl-2,.mx-xl-2{margin-right:.5rem!important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem!important}.ml-xl-2,.mx-xl-2{margin-left:.5rem!important}.m-xl-3{margin:1rem!important}.mt-xl-3,.my-xl-3{margin-top:1rem!important}.mr-xl-3,.mx-xl-3{margin-right:1rem!important}.mb-xl-3,.my-xl-3{margin-bottom:1rem!important}.ml-xl-3,.mx-xl-3{margin-left:1rem!important}.m-xl-4{margin:1.5rem!important}.mt-xl-4,.my-xl-4{margin-top:1.5rem!important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem!important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem!important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem!important}.m-xl-5{margin:3rem!important}.mt-xl-5,.my-xl-5{margin-top:3rem!important}.mr-xl-5,.mx-xl-5{margin-right:3rem!important}.mb-xl-5,.my-xl-5{margin-bottom:3rem!important}.ml-xl-5,.mx-xl-5{margin-left:3rem!important}.p-xl-0{padding:0!important}.pt-xl-0,.py-xl-0{padding-top:0!important}.pr-xl-0,.px-xl-0{padding-right:0!important}.pb-xl-0,.py-xl-0{padding-bottom:0!important}.pl-xl-0,.px-xl-0{padding-left:0!important}.p-xl-1{padding:.25rem!important}.pt-xl-1,.py-xl-1{padding-top:.25rem!important}.pr-xl-1,.px-xl-1{padding-right:.25rem!important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem!important}.pl-xl-1,.px-xl-1{padding-left:.25rem!important}.p-xl-2{padding:.5rem!important}.pt-xl-2,.py-xl-2{padding-top:.5rem!important}.pr-xl-2,.px-xl-2{padding-right:.5rem!important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem!important}.pl-xl-2,.px-xl-2{padding-left:.5rem!important}.p-xl-3{padding:1rem!important}.pt-xl-3,.py-xl-3{padding-top:1rem!important}.pr-xl-3,.px-xl-3{padding-right:1rem!important}.pb-xl-3,.py-xl-3{padding-bottom:1rem!important}.pl-xl-3,.px-xl-3{padding-left:1rem!important}.p-xl-4{padding:1.5rem!important}.pt-xl-4,.py-xl-4{padding-top:1.5rem!important}.pr-xl-4,.px-xl-4{padding-right:1.5rem!important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem!important}.pl-xl-4,.px-xl-4{padding-left:1.5rem!important}.p-xl-5{padding:3rem!important}.pt-xl-5,.py-xl-5{padding-top:3rem!important}.pr-xl-5,.px-xl-5{padding-right:3rem!important}.pb-xl-5,.py-xl-5{padding-bottom:3rem!important}.pl-xl-5,.px-xl-5{padding-left:3rem!important}.m-xl-auto{margin:auto!important}.mt-xl-auto,.my-xl-auto{margin-top:auto!important}.mr-xl-auto,.mx-xl-auto{margin-right:auto!important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto!important}.ml-xl-auto,.mx-xl-auto{margin-left:auto!important}}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}.text-justify{text-align:justify!important}.text-nowrap{white-space:nowrap!important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left!important}.text-right{text-align:right!important}.text-center{text-align:center!important}@media (min-width:576px){.text-sm-left{text-align:left!important}.text-sm-right{text-align:right!important}.text-sm-center{text-align:center!important}}@media (min-width:768px){.text-md-left{text-align:left!important}.text-md-right{text-align:right!important}.text-md-center{text-align:center!important}}@media (min-width:992px){.text-lg-left{text-align:left!important}.text-lg-right{text-align:right!important}.text-lg-center{text-align:center!important}}@media (min-width:1200px){.text-xl-left{text-align:left!important}.text-xl-right{text-align:right!important}.text-xl-center{text-align:center!important}}.text-lowercase{text-transform:lowercase!important}.text-uppercase{text-transform:uppercase!important}.text-capitalize{text-transform:capitalize!important}.font-weight-light{font-weight:300!important}.font-weight-normal{font-weight:400!important}.font-weight-bold{font-weight:700!important}.font-italic{font-style:italic!important}.text-white{color:#fff!important}.text-primary{color:#007bff!important}a.text-primary:focus,a.text-primary:hover{color:#0062cc!important}.text-secondary{color:#6c757d!important}a.text-secondary:focus,a.text-secondary:hover{color:#545b62!important}.text-success{color:#28a745!important}a.text-success:focus,a.text-success:hover{color:#1e7e34!important}.text-info{color:#17a2b8!important}a.text-info:focus,a.text-info:hover{color:#117a8b!important}.text-warning{color:#ffc107!important}a.text-warning:focus,a.text-warning:hover{color:#d39e00!important}.text-danger{color:#dc3545!important}a.text-danger:focus,a.text-danger:hover{color:#bd2130!important}.text-light{color:#f8f9fa!important}a.text-light:focus,a.text-light:hover{color:#dae0e5!important}.text-dark{color:#343a40!important}a.text-dark:focus,a.text-dark:hover{color:#1d2124!important}.text-body{color:#212529!important}.text-muted{color:#6c757d!important}.text-black-50{color:rgba(0,0,0,.5)!important}.text-white-50{color:rgba(255,255,255,.5)!important}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.visible{visibility:visible!important}.invisible{visibility:hidden!important}@media print{*,::after,::before{text-shadow:none!important;box-shadow:none!important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap!important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px!important}.container{min-width:992px!important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6!important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}
7
- /*# sourceMappingURL=bootstrap.min.css.map */
 
 
 
 
 
 
 
admin/site-settings/css/codemirror.css DELETED
@@ -1,346 +0,0 @@
1
- /* BASICS */
2
-
3
- .CodeMirror {
4
- /* Set height, width, borders, and global font properties here */
5
- font-family: monospace;
6
- height: 300px;
7
- color: black;
8
- direction: ltr;
9
- }
10
-
11
- /* PADDING */
12
-
13
- .CodeMirror-lines {
14
- padding: 4px 0; /* Vertical padding around content */
15
- }
16
- .CodeMirror pre {
17
- padding: 0 4px; /* Horizontal padding of content */
18
- }
19
-
20
- .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
21
- background-color: white; /* The little square between H and V scrollbars */
22
- }
23
-
24
- /* GUTTER */
25
-
26
- .CodeMirror-gutters {
27
- border-right: 1px solid #ddd;
28
- background-color: #f7f7f7;
29
- white-space: nowrap;
30
- }
31
- .CodeMirror-linenumbers {}
32
- .CodeMirror-linenumber {
33
- padding: 0 3px 0 5px;
34
- min-width: 20px;
35
- text-align: right;
36
- color: #999;
37
- white-space: nowrap;
38
- }
39
-
40
- .CodeMirror-guttermarker { color: black; }
41
- .CodeMirror-guttermarker-subtle { color: #999; }
42
-
43
- /* CURSOR */
44
-
45
- .CodeMirror-cursor {
46
- border-left: 1px solid black;
47
- border-right: none;
48
- width: 0;
49
- }
50
- /* Shown when moving in bi-directional text */
51
- .CodeMirror div.CodeMirror-secondarycursor {
52
- border-left: 1px solid silver;
53
- }
54
- .cm-fat-cursor .CodeMirror-cursor {
55
- width: auto;
56
- border: 0 !important;
57
- background: #7e7;
58
- }
59
- .cm-fat-cursor div.CodeMirror-cursors {
60
- z-index: 1;
61
- }
62
- .cm-fat-cursor-mark {
63
- background-color: rgba(20, 255, 20, 0.5);
64
- -webkit-animation: blink 1.06s steps(1) infinite;
65
- -moz-animation: blink 1.06s steps(1) infinite;
66
- animation: blink 1.06s steps(1) infinite;
67
- }
68
- .cm-animate-fat-cursor {
69
- width: auto;
70
- border: 0;
71
- -webkit-animation: blink 1.06s steps(1) infinite;
72
- -moz-animation: blink 1.06s steps(1) infinite;
73
- animation: blink 1.06s steps(1) infinite;
74
- background-color: #7e7;
75
- }
76
- @-moz-keyframes blink {
77
- 0% {}
78
- 50% { background-color: transparent; }
79
- 100% {}
80
- }
81
- @-webkit-keyframes blink {
82
- 0% {}
83
- 50% { background-color: transparent; }
84
- 100% {}
85
- }
86
- @keyframes blink {
87
- 0% {}
88
- 50% { background-color: transparent; }
89
- 100% {}
90
- }
91
-
92
- /* Can style cursor different in overwrite (non-insert) mode */
93
- .CodeMirror-overwrite .CodeMirror-cursor {}
94
-
95
- .cm-tab { display: inline-block; text-decoration: inherit; }
96
-
97
- .CodeMirror-rulers {
98
- position: absolute;
99
- left: 0; right: 0; top: -50px; bottom: -20px;
100
- overflow: hidden;
101
- }
102
- .CodeMirror-ruler {
103
- border-left: 1px solid #ccc;
104
- top: 0; bottom: 0;
105
- position: absolute;
106
- }
107
-
108
- /* DEFAULT THEME */
109
-
110
- .cm-s-default .cm-header {color: blue;}
111
- .cm-s-default .cm-quote {color: #090;}
112
- .cm-negative {color: #d44;}
113
- .cm-positive {color: #292;}
114
- .cm-header, .cm-strong {font-weight: bold;}
115
- .cm-em {font-style: italic;}
116
- .cm-link {text-decoration: underline;}
117
- .cm-strikethrough {text-decoration: line-through;}
118
-
119
- .cm-s-default .cm-keyword {color: #708;}
120
- .cm-s-default .cm-atom {color: #219;}
121
- .cm-s-default .cm-number {color: #164;}
122
- .cm-s-default .cm-def {color: #00f;}
123
- .cm-s-default .cm-variable,
124
- .cm-s-default .cm-punctuation,
125
- .cm-s-default .cm-property,
126
- .cm-s-default .cm-operator {}
127
- .cm-s-default .cm-variable-2 {color: #05a;}
128
- .cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}
129
- .cm-s-default .cm-comment {color: #a50;}
130
- .cm-s-default .cm-string {color: #a11;}
131
- .cm-s-default .cm-string-2 {color: #f50;}
132
- .cm-s-default .cm-meta {color: #555;}
133
- .cm-s-default .cm-qualifier {color: #555;}
134
- .cm-s-default .cm-builtin {color: #30a;}
135
- .cm-s-default .cm-bracket {color: #997;}
136
- .cm-s-default .cm-tag {color: #170;}
137
- .cm-s-default .cm-attribute {color: #00c;}
138
- .cm-s-default .cm-hr {color: #999;}
139
- .cm-s-default .cm-link {color: #00c;}
140
-
141
- .cm-s-default .cm-error {color: #f00;}
142
- .cm-invalidchar {color: #f00;}
143
-
144
- .CodeMirror-composing { border-bottom: 2px solid; }
145
-
146
- /* Default styles for common addons */
147
-
148
- div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}
149
- div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}
150
- .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }
151
- .CodeMirror-activeline-background {background: #e8f2ff;}
152
-
153
- /* STOP */
154
-
155
- /* The rest of this file contains styles related to the mechanics of
156
- the editor. You probably shouldn't touch them. */
157
-
158
- .CodeMirror {
159
- position: relative;
160
- overflow: hidden;
161
- background: white;
162
- }
163
-
164
- .CodeMirror-scroll {
165
- overflow: scroll !important; /* Things will break if this is overridden */
166
- /* 30px is the magic margin used to hide the element's real scrollbars */
167
- /* See overflow: hidden in .CodeMirror */
168
- margin-bottom: -30px; margin-right: -30px;
169
- padding-bottom: 30px;
170
- height: 100%;
171
- outline: none; /* Prevent dragging from highlighting the element */
172
- position: relative;
173
- }
174
- .CodeMirror-sizer {
175
- position: relative;
176
- border-right: 30px solid transparent;
177
- }
178
-
179
- /* The fake, visible scrollbars. Used to force redraw during scrolling
180
- before actual scrolling happens, thus preventing shaking and
181
- flickering artifacts. */
182
- .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
183
- position: absolute;
184
- z-index: 6;
185
- display: none;
186
- }
187
- .CodeMirror-vscrollbar {
188
- right: 0; top: 0;
189
- overflow-x: hidden;
190
- overflow-y: scroll;
191
- }
192
- .CodeMirror-hscrollbar {
193
- bottom: 0; left: 0;
194
- overflow-y: hidden;
195
- overflow-x: scroll;
196
- }
197
- .CodeMirror-scrollbar-filler {
198
- right: 0; bottom: 0;
199
- }
200
- .CodeMirror-gutter-filler {
201
- left: 0; bottom: 0;
202
- }
203
-
204
- .CodeMirror-gutters {
205
- position: absolute; left: 0; top: 0;
206
- min-height: 100%;
207
- z-index: 3;
208
- }
209
- .CodeMirror-gutter {
210
- white-space: normal;
211
- height: 100%;
212
- display: inline-block;
213
- vertical-align: top;
214
- margin-bottom: -30px;
215
- }
216
- .CodeMirror-gutter-wrapper {
217
- position: absolute;
218
- z-index: 4;
219
- background: none !important;
220
- border: none !important;
221
- }
222
- .CodeMirror-gutter-background {
223
- position: absolute;
224
- top: 0; bottom: 0;
225
- z-index: 4;
226
- }
227
- .CodeMirror-gutter-elt {
228
- position: absolute;
229
- cursor: default;
230
- z-index: 4;
231
- }
232
- .CodeMirror-gutter-wrapper ::selection { background-color: transparent }
233
- .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
234
-
235
- .CodeMirror-lines {
236
- cursor: text;
237
- min-height: 1px; /* prevents collapsing before first draw */
238
- }
239
- .CodeMirror pre {
240
- /* Reset some styles that the rest of the page might have set */
241
- -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
242
- border-width: 0;
243
- background: transparent;
244
- font-family: inherit;
245
- font-size: inherit;
246
- margin: 0;
247
- white-space: pre;
248
- word-wrap: normal;
249
- line-height: inherit;
250
- color: inherit;
251
- z-index: 2;
252
- position: relative;
253
- overflow: visible;
254
- -webkit-tap-highlight-color: transparent;
255
- -webkit-font-variant-ligatures: contextual;
256
- font-variant-ligatures: contextual;
257
- }
258
- .CodeMirror-wrap pre {
259
- word-wrap: break-word;
260
- white-space: pre-wrap;
261
- word-break: normal;
262
- }
263
-
264
- .CodeMirror-linebackground {
265
- position: absolute;
266
- left: 0; right: 0; top: 0; bottom: 0;
267
- z-index: 0;
268
- }
269
-
270
- .CodeMirror-linewidget {
271
- position: relative;
272
- z-index: 2;
273
- padding: 0.1px; /* Force widget margins to stay inside of the container */
274
- }
275
-
276
- .CodeMirror-widget {}
277
-
278
- .CodeMirror-rtl pre { direction: rtl; }
279
-
280
- .CodeMirror-code {
281
- outline: none;
282
- }
283
-
284
- /* Force content-box sizing for the elements where we expect it */
285
- .CodeMirror-scroll,
286
- .CodeMirror-sizer,
287
- .CodeMirror-gutter,
288
- .CodeMirror-gutters,
289
- .CodeMirror-linenumber {
290
- -moz-box-sizing: content-box;
291
- box-sizing: content-box;
292
- }
293
-
294
- .CodeMirror-measure {
295
- position: absolute;
296
- width: 100%;
297
- height: 0;
298
- overflow: hidden;
299
- visibility: hidden;
300
- }
301
-
302
- .CodeMirror-cursor {
303
- position: absolute;
304
- pointer-events: none;
305
- }
306
- .CodeMirror-measure pre { position: static; }
307
-
308
- div.CodeMirror-cursors {
309
- visibility: hidden;
310
- position: relative;
311
- z-index: 3;
312
- }
313
- div.CodeMirror-dragcursors {
314
- visibility: visible;
315
- }
316
-
317
- .CodeMirror-focused div.CodeMirror-cursors {
318
- visibility: visible;
319
- }
320
-
321
- .CodeMirror-selected { background: #d9d9d9; }
322
- .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
323
- .CodeMirror-crosshair { cursor: crosshair; }
324
- .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }
325
- .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }
326
-
327
- .cm-searching {
328
- background-color: #ffa;
329
- background-color: rgba(255, 255, 0, .4);
330
- }
331
-
332
- /* Used to force a border model for a node */
333
- .cm-force-border { padding-right: .1px; }
334
-
335
- @media print {
336
- /* Hide the cursor when printing */
337
- .CodeMirror div.CodeMirror-cursors {
338
- visibility: hidden;
339
- }
340
- }
341
-
342
- /* See issue #2901 */
343
- .cm-tab-wrap-hack:after { content: ''; }
344
-
345
- /* Help users use markselection to safely style text background */
346
- span.CodeMirror-selectedtext { background: none; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/css/select2.min.css DELETED
@@ -1 +0,0 @@
1
- .select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:28px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding-left:8px;padding-right:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:8px;padding-left:20px}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:32px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-block;overflow:hidden;padding-left:8px;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background-color:white;border:1px solid #aaa;border-radius:4px;box-sizing:border-box;display:block;position:absolute;left:-100000px;width:100%;z-index:1051}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:6px;user-select:none;-webkit-user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container--open .select2-dropdown{left:0}.select2-container--open .select2-dropdown--above{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--open .select2-dropdown--below{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99;background-color:#fff;filter:alpha(opacity=0)}.select2-hidden-accessible{border:0 !important;clip:rect(0 0 0 0) !important;-webkit-clip-path:inset(50%) !important;clip-path:inset(50%) !important;height:1px !important;overflow:hidden !important;padding:0 !important;position:absolute !important;width:1px !important;white-space:nowrap !important}.select2-container--default .select2-selection--single{background-color:#fff;border:1px solid #aaa;border-radius:4px}.select2-container--default .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--default .select2-selection--single .select2-selection__arrow{height:26px;position:absolute;top:1px;right:1px;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--default[dir="rtl"] .select2-selection--single .select2-selection__arrow{left:1px;right:auto}.select2-container--default.select2-container--disabled .select2-selection--single{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--default .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text}.select2-container--default .select2-selection--multiple .select2-selection__rendered{box-sizing:border-box;list-style:none;margin:0;padding:0 5px;width:100%}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{color:#999;margin-top:5px;float:left}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:#999;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#333}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__placeholder,.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-search--inline{float:right}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice{margin-left:5px;margin-right:auto}.select2-container--default[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--default.select2-container--focus .select2-selection--multiple{border:solid black 1px;outline:0}.select2-container--default.select2-container--disabled .select2-selection--multiple{background-color:#eee;cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid #aaa}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:0;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#5897fb;color:white}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic .select2-selection--single{background-color:#f7f7f7;border:1px solid #aaa;border-radius:4px;outline:0;background-image:-webkit-linear-gradient(top, #fff 50%, #eee 100%);background-image:-o-linear-gradient(top, #fff 50%, #eee 100%);background-image:linear-gradient(to bottom, #fff 50%, #eee 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic .select2-selection--single:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--single .select2-selection__rendered{color:#444;line-height:28px}.select2-container--classic .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:bold;margin-right:10px}.select2-container--classic .select2-selection--single .select2-selection__placeholder{color:#999}.select2-container--classic .select2-selection--single .select2-selection__arrow{background-color:#ddd;border:none;border-left:1px solid #aaa;border-top-right-radius:4px;border-bottom-right-radius:4px;height:26px;position:absolute;top:1px;right:1px;width:20px;background-image:-webkit-linear-gradient(top, #eee 50%, #ccc 100%);background-image:-o-linear-gradient(top, #eee 50%, #ccc 100%);background-image:linear-gradient(to bottom, #eee 50%, #ccc 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0)}.select2-container--classic .select2-selection--single .select2-selection__arrow b{border-color:#888 transparent transparent transparent;border-style:solid;border-width:5px 4px 0 4px;height:0;left:50%;margin-left:-4px;margin-top:-2px;position:absolute;top:50%;width:0}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__clear{float:left}.select2-container--classic[dir="rtl"] .select2-selection--single .select2-selection__arrow{border:none;border-right:1px solid #aaa;border-radius:0;border-top-left-radius:4px;border-bottom-left-radius:4px;left:1px;right:auto}.select2-container--classic.select2-container--open .select2-selection--single{border:1px solid #5897fb}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow{background:transparent;border:none}.select2-container--classic.select2-container--open .select2-selection--single .select2-selection__arrow b{border-color:transparent transparent #888 transparent;border-width:0 4px 5px 4px}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--single{border-top:none;border-top-left-radius:0;border-top-right-radius:0;background-image:-webkit-linear-gradient(top, #fff 0%, #eee 50%);background-image:-o-linear-gradient(top, #fff 0%, #eee 50%);background-image:linear-gradient(to bottom, #fff 0%, #eee 50%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0)}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--single{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;background-image:-webkit-linear-gradient(top, #eee 50%, #fff 100%);background-image:-o-linear-gradient(top, #eee 50%, #fff 100%);background-image:linear-gradient(to bottom, #eee 50%, #fff 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0)}.select2-container--classic .select2-selection--multiple{background-color:white;border:1px solid #aaa;border-radius:4px;cursor:text;outline:0}.select2-container--classic .select2-selection--multiple:focus{border:1px solid #5897fb}.select2-container--classic .select2-selection--multiple .select2-selection__rendered{list-style:none;margin:0;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__clear{display:none}.select2-container--classic .select2-selection--multiple .select2-selection__choice{background-color:#e4e4e4;border:1px solid #aaa;border-radius:4px;cursor:default;float:left;margin-right:5px;margin-top:5px;padding:0 5px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove{color:#888;cursor:pointer;display:inline-block;font-weight:bold;margin-right:2px}.select2-container--classic .select2-selection--multiple .select2-selection__choice__remove:hover{color:#555}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice{float:right;margin-left:5px;margin-right:auto}.select2-container--classic[dir="rtl"] .select2-selection--multiple .select2-selection__choice__remove{margin-left:2px;margin-right:auto}.select2-container--classic.select2-container--open .select2-selection--multiple{border:1px solid #5897fb}.select2-container--classic.select2-container--open.select2-container--above .select2-selection--multiple{border-top:none;border-top-left-radius:0;border-top-right-radius:0}.select2-container--classic.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--classic .select2-search--dropdown .select2-search__field{border:1px solid #aaa;outline:0}.select2-container--classic .select2-search--inline .select2-search__field{outline:0;box-shadow:none}.select2-container--classic .select2-dropdown{background-color:#fff;border:1px solid transparent}.select2-container--classic .select2-dropdown--above{border-bottom:none}.select2-container--classic .select2-dropdown--below{border-top:none}.select2-container--classic .select2-results>.select2-results__options{max-height:200px;overflow-y:auto}.select2-container--classic .select2-results__option[role=group]{padding:0}.select2-container--classic .select2-results__option[aria-disabled=true]{color:grey}.select2-container--classic .select2-results__option--highlighted[aria-selected]{background-color:#3875d7;color:#fff}.select2-container--classic .select2-results__group{cursor:default;display:block;padding:6px}.select2-container--classic.select2-container--open .select2-dropdown{border-color:#5897fb}
 
admin/site-settings/css/style.css DELETED
@@ -1,1426 +0,0 @@
1
- /*-------------------------------------------------------------------------*/
2
- /* HTML Author Name: Tatar Denis */
3
- /* Author Social: https://www.linkedin.com/in/denis-tatar-097588149/ */
4
- /*-------------------------------------------------------------------------*/
5
- /* Include Font */
6
- @font-face {
7
- font-family: pn;
8
- font-weight: 400;
9
- src: url(../fonts/pn.woff2) format("woff2"); }
10
- @font-face {
11
- font-family: pn;
12
- font-style: normal;
13
- font-weight: 600;
14
- src: url(../fonts/pn-medium.woff2) format("woff2"); }
15
- @font-face {
16
- font-family: pn;
17
- font-weight: 800;
18
- src: url(../fonts/pn-bold.woff2) format("woff2"); }
19
- @font-face {
20
- font-family: pn;
21
- font-style: italic;
22
- font-weight: 800;
23
- src: url(../fonts/pn-bold-italic.woff2) format("woff2"); }
24
- /* Global Reset */
25
- html,
26
- body,
27
- div,
28
- span,
29
- applet,
30
- object,
31
- iframe,
32
- h1,
33
- h2,
34
- h3,
35
- h4,
36
- h5,
37
- h6,
38
- p,
39
- blockquote,
40
- pre,
41
- a,
42
- abbr,
43
- acronym,
44
- address,
45
- big,
46
- cite,
47
- code,
48
- del,
49
- dfn,
50
- em,
51
- img,
52
- ins,
53
- kbd,
54
- q,
55
- s,
56
- samp,
57
- small,
58
- strike,
59
- strong,
60
- sub,
61
- sup,
62
- tt,
63
- var,
64
- b,
65
- u,
66
- i,
67
- center,
68
- dl,
69
- dt,
70
- dd,
71
- ol,
72
- ul,
73
- li,
74
- fieldset,
75
- form,
76
- label,
77
- legend,
78
- table,
79
- caption,
80
- tbody,
81
- tfoot,
82
- thead,
83
- tr,
84
- th,
85
- td,
86
- article,
87
- aside,
88
- canvas,
89
- details,
90
- embed,
91
- figure,
92
- figcaption,
93
- footer,
94
- header,
95
- hgroup,
96
- menu,
97
- nav,
98
- output,
99
- ruby,
100
- section,
101
- summary,
102
- time,
103
- mark,
104
- audio,
105
- video {
106
- margin: 0;
107
- padding: 0;
108
- border: 0;
109
- font-size: 100%;
110
- font: inherit;
111
- vertical-align: baseline; }
112
-
113
- article,
114
- aside,
115
- details,
116
- figcaption,
117
- figure,
118
- footer,
119
- header,
120
- hgroup,
121
- menu,
122
- nav,
123
- section {
124
- display: block; }
125
-
126
- body {
127
- line-height: 1; }
128
-
129
- ol,
130
- ul {
131
- list-style: none; }
132
-
133
- blockquote,
134
- q {
135
- quotes: none; }
136
-
137
- blockquote:before,
138
- blockquote:after,
139
- q:before,
140
- q:after {
141
- content: "";
142
- content: none; }
143
-
144
- table {
145
- border-spacing: 0; }
146
-
147
- html {
148
- font-size: 100%;
149
- -webkit-text-size-adjust: 100%;
150
- -ms-text-size-adjust: 100%;
151
- -webkit-font-smoothing: subpixel-antialiased; }
152
-
153
- /* General Style */
154
- html,
155
- body {
156
- overflow-x: hidden; }
157
-
158
- body {
159
- font-family: pn,"Open Sans",Arial,sans-serif;
160
- font-size: 14px;
161
- font-weight: 600;
162
- line-height: 1.4em;
163
- color: #000;
164
- position: relative;
165
- background-color: #eaecf2; }
166
-
167
- a {
168
- color: #59C8EB;
169
- text-decoration: none;
170
- -webkit-transition: all 150ms linear;
171
- transition: all 150ms linear; }
172
- a:hover {
173
- color: #59C8EB;
174
- text-decoration: underline; }
175
-
176
- .item-align-middle {
177
- display: -webkit-box;
178
- display: -ms-flexbox;
179
- display: flex;
180
- -ms-flex-wrap: wrap;
181
- flex-wrap: wrap;
182
- -webkit-box-align: center;
183
- -ms-flex-align: center;
184
- align-items: center; }
185
-
186
- /* Modal */
187
- #modal {
188
- opacity: .01;
189
- -webkit-transition: opacity 200ms ease-in;
190
- transition: opacity 200ms ease-in; }
191
- #modal.show {
192
- opacity: 1; }
193
-
194
- .modal-backdrop.show {
195
- opacity: 1;
196
- background: rgba(3, 8, 15, 0.75); }
197
-
198
- .modal-content {
199
- border-radius: 7px;
200
- overflow: hidden;
201
- height: 89.537037%;
202
- max-height: 967px;
203
- position: absolute;
204
- -webkit-box-shadow: 0 0 45px 10px rgba(3, 8, 15, 0.2);
205
- box-shadow: 0 0 45px 10px rgba(3, 8, 15, 0.2);
206
- background-color: #ececec;
207
- border: 0; }
208
-
209
- @media (min-width: 576px) {
210
- .modal-dialog {
211
- max-width: 1140px; } }
212
- /* Tooltips */
213
- [data-title] {
214
- position: relative; }
215
- [data-title]:before {
216
- content: attr(data-title);
217
- position: absolute;
218
- top: -33px;
219
- left: 50%;
220
- font-family: pn,"Open Sans",Arial,sans-serif;
221
- font-size: 12px;
222
- line-height: 19px;
223
- font-weight: bold;
224
- color: #fff;
225
- display: inline-block;
226
- padding: 3px 17px;
227
- border-radius: 50px;
228
- background-color: rgba(3, 8, 15, 0.92);
229
- -webkit-box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
230
- box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
231
- white-space: nowrap;
232
- opacity: 0;
233
- -webkit-transform: translateX(-50%);
234
- transform: translateX(-50%);
235
- -webkit-transition: all 0.1s ease-in-out;
236
- transition: all 0.1s ease-in-out;
237
- pointer-events: none; }
238
- [data-title]:after {
239
- content: '';
240
- position: absolute;
241
- top: -8px;
242
- left: 50%;
243
- display: inline-block;
244
- color: #fff;
245
- border: 5px solid transparent;
246
- border-top: 5px solid rgba(3, 8, 15, 0.92);
247
- opacity: 0;
248
- -webkit-transform: translateX(-50%);
249
- transform: translateX(-50%);
250
- -webkit-transition: all 0.1s ease-in-out;
251
- transition: all 0.1s ease-in-out;
252
- pointer-events: none; }
253
- [data-title]:hover:before, [data-title]:hover:after {
254
- opacity: 1; }
255
-
256
- /* Head modal */
257
- .brz-ed .brz-ed-popup-two-header {
258
- height: 60px;
259
- display: -webkit-box;
260
- display: -ms-flexbox;
261
- display: flex;
262
- -ms-flex-wrap: wrap;
263
- flex-wrap: wrap;
264
- position: relative; }
265
- .brz-ed .brz-ed-popup-two-header > div {
266
- height: 100%; }
267
- .brz-ed .brz-icon-svg {
268
- display: inline-block;
269
- width: 1em;
270
- height: 1em;
271
- stroke: none;
272
- position: relative;
273
- top: 1px;
274
- fill: currentColor;
275
- color: currentColor;
276
- vertical-align: inherit; }
277
- .brz-ed .brz-span {
278
- float: none;
279
- margin: 0;
280
- padding: 0;
281
- font-family: inherit;
282
- font-size: inherit;
283
- font-weight: inherit;
284
- line-height: inherit;
285
- letter-spacing: inherit;
286
- color: inherit; }
287
- .brz-ed .brz-ed-popup-two-header__search {
288
- position: relative;
289
- width: 256px;
290
- height: 100%; }
291
- .brz-ed .brz-ed-popup-two-header__search .brz-ed-popup-two__input {
292
- width: 100%;
293
- height: 100%;
294
- padding-left: 70px;
295
- background-color: #383e48;
296
- color: #fff;
297
- font-family: pn,"Open Sans",Arial,sans-serif;
298
- font-size: 15px;
299
- position: absolute;
300
- top: 0;
301
- left: 0;
302
- outline: 0;
303
- border: 0; }
304
- .brz-ed .brz-ed-popup-two-header__search .brz-icon-svg {
305
- position: absolute;
306
- top: 0;
307
- bottom: 0;
308
- left: 40px;
309
- margin: auto;
310
- color: #ebeced; }
311
- .brz-ed svg:not(:root) {
312
- overflow: hidden; }
313
- .brz-ed .brz-ed-popup-two-header__tabs {
314
- -webkit-box-flex: 1;
315
- -ms-flex: 1 1 auto;
316
- flex: 1 1 auto;
317
- height: 60px;
318
- display: -webkit-box;
319
- display: -ms-flexbox;
320
- display: flex;
321
- -webkit-box-pack: center;
322
- -ms-flex-pack: center;
323
- justify-content: center;
324
- background: #fff; }
325
- .brz-ed .brz-ed-popup-two-header__tabs .brz-ed-popup-two-tab-item {
326
- display: -webkit-box;
327
- display: -ms-flexbox;
328
- display: flex;
329
- -webkit-box-align: center;
330
- -ms-flex-align: center;
331
- align-items: center;
332
- color: #818a91;
333
- font-size: 14px;
334
- font-weight: 600;
335
- font-family: pn,"Open Sans",Arial,sans-serif;
336
- font-size: 14px;
337
- font-weight: 600;
338
- padding: 0 25px;
339
- cursor: pointer;
340
- -webkit-transition: color .3s ease;
341
- transition: color .3s ease; }
342
- .brz-ed .brz-ed-popup-two-header__tabs .brz-ed-popup-two-tab-item.brz-ed-popup-two-tab-item-active {
343
- background: #ececec;
344
- color: #151920; }
345
- .brz-ed .brz-ed-popup-two-header__tabs .brz-ed-popup-two-tab-item:hover {
346
- color: #151920; }
347
- .brz-ed .brz-ed-popup-two-header__tabs .brz-ed-popup-two-tab-icon {
348
- position: relative;
349
- margin-right: 10px; }
350
- .brz-ed .brz-ed-popup-two-btn-close {
351
- position: absolute;
352
- width: 50px;
353
- height: 60px;
354
- top: 0;
355
- right: 0;
356
- display: -webkit-box;
357
- display: -ms-flexbox;
358
- display: flex;
359
- -webkit-box-align: center;
360
- -ms-flex-align: center;
361
- align-items: center;
362
- -webkit-box-pack: center;
363
- -ms-flex-pack: center;
364
- justify-content: center;
365
- cursor: pointer; }
366
- .brz-ed .brz-ed-popup-two-btn-close::after, .brz-ed .brz-ed-popup-two-btn-close::before {
367
- position: absolute;
368
- content: "";
369
- display: block;
370
- width: 17px;
371
- border-top: 2px solid #94979b;
372
- top: 45%;
373
- left: 50%;
374
- margin-left: -8px;
375
- -webkit-transition: all .2s ease;
376
- transition: all .2s ease; }
377
- .brz-ed .brz-ed-popup-two-btn-close::before {
378
- -webkit-transform: rotateZ(45deg);
379
- transform: rotateZ(45deg); }
380
- .brz-ed .brz-ed-popup-two-btn-close::after {
381
- -webkit-transform: rotateZ(-45deg);
382
- transform: rotateZ(-45deg); }
383
- .brz-ed .brz-ed-popup-two-body {
384
- display: -webkit-box;
385
- display: -ms-flexbox;
386
- display: flex;
387
- -ms-flex-wrap: wrap;
388
- flex-wrap: wrap;
389
- height: calc(100% - 60px); }
390
- .brz-ed .brz-ed-popup-two-body__sidebar {
391
- max-width: 256px;
392
- width: 100%;
393
- background-color: #292E37;
394
- position: relative;
395
- height: calc(100% + 60px);
396
- padding-bottom: 10px;
397
- -webkit-animation-name: fadeIn;
398
- animation-name: fadeIn;
399
- -webkit-animation-fill-mode: both;
400
- animation-fill-mode: both;
401
- -webkit-animation-delay: 4s;
402
- animation-delay: 4s;
403
- -webkit-animation-duration: 200s;
404
- animation-duration: 200s; }
405
- .brz-ed .brz-ed-popup-two-body .brz-ed-scroll-pane > div {
406
- border-color: transparent;
407
- overflow: hidden;
408
- height: 100%;
409
- border-bottom-width: 6px;
410
- border-bottom-style: none;
411
- border-right-width: 6px;
412
- border-right-style: solid; }
413
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-body {
414
- padding: 52px 36px 0 38px; }
415
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar {
416
- margin-bottom: 42px;
417
- position: relative; }
418
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar .modal_dash {
419
- position: absolute;
420
- top: 40px;
421
- display: none; }
422
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar .modal_dash.active {
423
- position: inherit;
424
- top: 0px;
425
- display: block; }
426
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar .modal_dash .menu-btn {
427
- font-size: 14px;
428
- font-weight: 600;
429
- line-height: 1;
430
- color: #fff;
431
- background-color: #3DBFE8;
432
- display: -webkit-box;
433
- display: -ms-flexbox;
434
- display: flex;
435
- -webkit-box-align: center;
436
- -ms-flex-align: center;
437
- align-items: center;
438
- padding: 12px 35px;
439
- border-radius: 3px;
440
- position: fixed;
441
- bottom: 60px; }
442
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar .modal_dash .menu-btn .menu-icon-svg {
443
- font-size: 12px;
444
- margin-left: 22px; }
445
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar .modal_dash .menu-btn:hover {
446
- text-decoration: none;
447
- background-color: #0092cc; }
448
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-title {
449
- color: rgba(255, 255, 255, 0.45);
450
- font-size: 12px;
451
- font-weight: 600;
452
- letter-spacing: 1px;
453
- line-height: 14px;
454
- font-family: pn,"Open Sans",Arial,sans-serif;
455
- text-transform: uppercase;
456
- display: -webkit-box;
457
- display: -ms-flexbox;
458
- display: flex;
459
- -webkit-box-align: center;
460
- -ms-flex-align: center;
461
- align-items: center;
462
- margin-bottom: 36px; }
463
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-title::after {
464
- content: "";
465
- width: 100%;
466
- height: 1px;
467
- background-color: #424951;
468
- margin-left: 20px;
469
- display: block; }
470
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list {
471
- cursor: pointer;
472
- color: #ffffff;
473
- padding-bottom: 30px;
474
- display: -webkit-box;
475
- display: -ms-flexbox;
476
- display: flex;
477
- -webkit-box-align: center;
478
- -ms-flex-align: center;
479
- align-items: center;
480
- font-family: pn,"Open Sans",Arial,sans-serif;
481
- font-size: 14px;
482
- font-weight: 600;
483
- -webkit-transition: color .3s ease;
484
- transition: color .3s ease;
485
- opacity: 0.85; }
486
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list.brz-ed-popup-two-sidebar-list-active {
487
- color: #3dbfe8;
488
- opacity: 1; }
489
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list.brz-ed-popup-two-sidebar-list-active:hover {
490
- color: #3dbfe8; }
491
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list__span-icon {
492
- margin-right: 10px;
493
- font-size: 16px; }
494
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list .brz-span {
495
- display: -webkit-box;
496
- display: -ms-flexbox;
497
- display: flex;
498
- font-size: 15px; }
499
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list__span-text {
500
- max-width: 58%; }
501
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list:last-of-type {
502
- padding-bottom: 0; }
503
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-sidebar-list:hover {
504
- opacity: 1; }
505
- .brz-ed .brz-ed-popup-two-body .menu_dash_check {
506
- display: -webkit-box;
507
- display: -ms-flexbox;
508
- display: flex;
509
- -webkit-box-align: center;
510
- -ms-flex-align: center;
511
- align-items: center;
512
- margin-bottom: 22px;
513
- position: relative; }
514
- .brz-ed .brz-ed-popup-two-body .menu_dash_check input {
515
- opacity: 0;
516
- width: 100%;
517
- height: 100%;
518
- position: absolute; }
519
- .brz-ed .brz-ed-popup-two-body .menu_dash_check input:checked + .mdc_text {
520
- opacity: 1; }
521
- .brz-ed .brz-ed-popup-two-body .menu_dash_check input:checked + .mdc_text:before {
522
- opacity: 1; }
523
- .brz-ed .brz-ed-popup-two-body .menu_dash_check input:checked + .mdc_text:after {
524
- opacity: 1; }
525
- .brz-ed .brz-ed-popup-two-body .menu_dash_check .mdc_text {
526
- color: #FFFFFF;
527
- font-size: 14px;
528
- font-weight: 600;
529
- opacity: 0.85;
530
- margin-left: 30px;
531
- pointer-events: none; }
532
- .brz-ed .brz-ed-popup-two-body .menu_dash_check .mdc_text.brz-ed-popup-two-sidebar-list-active {
533
- opacity: 1; }
534
- .brz-ed .brz-ed-popup-two-body .menu_dash_check .mdc_text:before {
535
- content: '';
536
- width: 14px;
537
- height: 14px;
538
- position: absolute;
539
- left: 0;
540
- top: 50%;
541
- -webkit-transform: translateY(-50%);
542
- transform: translateY(-50%);
543
- border-radius: 2px;
544
- background-color: #FFFFFF;
545
- opacity: 0.85;
546
- pointer-events: none; }
547
- .brz-ed .brz-ed-popup-two-body .menu_dash_check .mdc_text:after {
548
- content: '';
549
- width: 16px;
550
- height: 16px;
551
- background-image: url(../fonts/tick.svg);
552
- position: absolute;
553
- left: -1px;
554
- top: 50%;
555
- -webkit-transform: translateY(-50%);
556
- transform: translateY(-50%);
557
- pointer-events: none;
558
- opacity: 0; }
559
- .brz-ed .brz-ed-popup-two-body .menu_dash_check:last-child {
560
- margin-bottom: 40px; }
561
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-body__content {
562
- -webkit-box-flex: 1;
563
- -ms-flex: 1 1 auto;
564
- flex: 1 1 auto;
565
- background-color: #ececec;
566
- height: 100%;
567
- position: relative;
568
- max-width: 78%; }
569
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-body__content .brz-ed-scroll-pane {
570
- position: relative;
571
- height: 100%;
572
- display: none; }
573
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-body__content .brz-ed-scroll-pane.brz-ed-scroll-pane-active {
574
- display: block; }
575
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-body__content .brz-ed-scroll-pane.scroll-pane-hide {
576
- display: none; }
577
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-body__content .brz-ed-scroll-pane.menu-pane-active {
578
- display: block; }
579
- .brz-ed .brz-ed-popup-two-body .brz-ed-popup-two-body__content .brz-ed-scroll-inner {
580
- overflow-y: auto;
581
- height: 100%;
582
- border-bottom-width: 6px;
583
- border-bottom-style: none;
584
- border-right-width: 6px;
585
- border-right-style: solid;
586
- z-index: 0; }
587
-
588
- /* New CSS */
589
- .brz-ed .brz-ed-popup-two-body__footer {
590
- background-color: #FFFFFF;
591
- padding: 14px 64px;
592
- display: -webkit-box;
593
- display: -ms-flexbox;
594
- display: flex;
595
- -webkit-box-align: center;
596
- -ms-flex-align: center;
597
- align-items: center;
598
- -webkit-box-pack: justify;
599
- -ms-flex-pack: justify;
600
- justify-content: space-between;
601
- position: absolute;
602
- z-index: 10;
603
- right: 0;
604
- bottom: 0;
605
- left: 0; }
606
- .brz-ed .brz-ed-popup-two-body__footer .footer-btn {
607
- font-size: 14px;
608
- font-weight: 600;
609
- line-height: 1;
610
- color: #fff;
611
- background-color: #3DBFE8;
612
- display: -webkit-box;
613
- display: -ms-flexbox;
614
- display: flex;
615
- -webkit-box-align: center;
616
- -ms-flex-align: center;
617
- align-items: center;
618
- padding: 12px 36px;
619
- border-radius: 3px; }
620
- .brz-ed .brz-ed-popup-two-body__footer .footer-btn .brz-icon-svg {
621
- font-size: 14px;
622
- margin-left: 10px; }
623
- .brz-ed .brz-ed-popup-two-body__footer .footer-btn:hover {
624
- text-decoration: none;
625
- background-color: #0092cc; }
626
- .brz-ed .brz-ed-popup-two-body__footer .footer-info {
627
- display: -webkit-box;
628
- display: -ms-flexbox;
629
- display: flex;
630
- -webkit-box-align: center;
631
- -ms-flex-align: center;
632
- align-items: center;
633
- color: #818A91;
634
- font-size: 13px;
635
- font-weight: 500;
636
- line-height: 16px; }
637
- .brz-ed .brz-ed-popup-two-body__footer .footer-info a {
638
- font-weight: 600; }
639
- .brz-ed .brz-ed-popup-two-body__footer .footer-info .brz-icon-svg {
640
- top: auto;
641
- margin-right: 8px; }
642
- .brz-ed .inner-content {
643
- padding: 40px 64px 100px;
644
- position: relative;
645
- z-index: 2; }
646
- .brz-ed .inner-content.menu-inner {
647
- height: 100%; }
648
-
649
- /* Style Pages Blocks */
650
- .pages-list-wrap {
651
- background-color: #fff;
652
- -webkit-box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
653
- box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
654
- border-radius: 4px; }
655
- .pages-list-wrap .pages-list-head,
656
- .pages-list-wrap .pages-list-item {
657
- display: -webkit-box;
658
- display: -ms-flexbox;
659
- display: flex;
660
- -ms-flex-wrap: wrap;
661
- flex-wrap: wrap;
662
- padding: 0 45px; }
663
- .pages-list-wrap .pages-list-col {
664
- -webkit-box-flex: 0;
665
- -ms-flex: 0 0 48%;
666
- flex: 0 0 48%;
667
- max-width: 48%; }
668
- .pages-list-wrap .pages-list-col:first-child {
669
- -webkit-box-flex: 0;
670
- -ms-flex: 0 0 34.7%;
671
- flex: 0 0 34.7%;
672
- max-width: 34.7%; }
673
- .pages-list-wrap .pages-list-col:last-child {
674
- -webkit-box-flex: 1;
675
- -ms-flex: 1;
676
- flex: 1;
677
- max-width: 100%;
678
- text-align: center; }
679
- .pages-list-wrap .pages-list-head {
680
- border-bottom: 1px solid rgba(129, 138, 145, 0.2); }
681
- .pages-list-wrap .pages-list-head .pages-list-text {
682
- font-size: 13px;
683
- color: #818A91;
684
- font-weight: 400;
685
- padding: 15px 0; }
686
- .pages-list-wrap .pages-list-item {
687
- padding-top: 20px;
688
- padding-bottom: 20px;
689
- border-bottom: 1px solid rgba(129, 138, 145, 0.2); }
690
- .pages-list-wrap .pages-list-item:last-child {
691
- border: none; }
692
- .pages-list-wrap .pages-list-item .pages-list-title {
693
- font-size: 16px;
694
- line-height: 1;
695
- font-weight: 600;
696
- color: #21252B;
697
- position: relative; }
698
- .pages-list-wrap .pages-list-item .pages-list-title::before {
699
- content: '';
700
- position: absolute;
701
- top: 50%;
702
- left: -26.5px;
703
- -webkit-transform: translateY(-50%);
704
- transform: translateY(-50%);
705
- width: 8px;
706
- height: 8px;
707
- background-color: #818A91;
708
- border-radius: 50%; }
709
- .pages-list-wrap .pages-list-item .pages-list-slug {
710
- font-size: 14px;
711
- font-weight: 600;
712
- color: #3DBFE8; }
713
- .pages-list-wrap .pages-list-item .pages-list-actions {
714
- display: -webkit-box;
715
- display: -ms-flexbox;
716
- display: flex;
717
- -webkit-box-align: center;
718
- -ms-flex-align: center;
719
- align-items: center;
720
- -webkit-box-pack: justify;
721
- -ms-flex-pack: justify;
722
- justify-content: space-between;
723
- padding: 0 10px; }
724
- .pages-list-wrap .pages-list-item .pages-list-actions__icon {
725
- font-size: 16px;
726
- color: #818A91;
727
- display: -webkit-box;
728
- display: -ms-flexbox;
729
- display: flex;
730
- -webkit-transition: all 0.2s ease;
731
- transition: all 0.2s ease; }
732
- .pages-list-wrap .pages-list-item .pages-list-actions__icon:hover {
733
- color: rgba(3, 8, 15, 0.92); }
734
- .pages-list-wrap .pages-list-item.item-public .pages-list-title:before {
735
- background-color: #47CC24; }
736
- .pages-list-wrap .pages-list-item.item-draft .pages-list-title:before {
737
- background-color: #DFAD3D; }
738
- .pages-list-wrap .settings-details {
739
- border-bottom: 1px solid rgba(129, 138, 145, 0.2); }
740
- .pages-list-wrap .settings-details > div {
741
- padding: 20px 45px 20px; }
742
- .pages-list-wrap .settings-details .settings-form .form-row {
743
- margin: 0;
744
- -webkit-box-pack: justify;
745
- -ms-flex-pack: justify;
746
- justify-content: space-between;
747
- margin-bottom: 18px; }
748
- .pages-list-wrap .settings-details .settings-form .form-row:last-child {
749
- margin-bottom: 0; }
750
- .pages-list-wrap .settings-details .settings-form .form-row .form-col {
751
- -webkit-box-flex: 1;
752
- -ms-flex: 1;
753
- flex: 1;
754
- max-width: 100%;
755
- padding-right: 5px;
756
- padding-left: 5px; }
757
- .pages-list-wrap .settings-details .settings-form .form-row .form-col.col-type1 {
758
- -webkit-box-flex: 0;
759
- -ms-flex: 0 0 34.7%;
760
- flex: 0 0 34.7%;
761
- max-width: 34.7%; }
762
- .pages-list-wrap .settings-details .settings-form .form-row .form-col.col-type2 {
763
- -webkit-box-flex: 0;
764
- -ms-flex: 0 0 69.4%;
765
- flex: 0 0 69.4%;
766
- max-width: 69.4%; }
767
- .pages-list-wrap .settings-details .settings-form .form-row .form-col.item-align-middle .form-field {
768
- display: -webkit-box;
769
- display: -ms-flexbox;
770
- display: flex;
771
- -webkit-box-pack: end;
772
- -ms-flex-pack: end;
773
- justify-content: flex-end;
774
- -webkit-box-align: center;
775
- -ms-flex-align: center;
776
- align-items: center;
777
- width: 100%; }
778
- .pages-list-wrap .settings-details .settings-form .form-row label {
779
- font-size: 13px;
780
- line-height: 16px;
781
- font-weight: 400;
782
- color: #818A91;
783
- display: block;
784
- margin-bottom: 4px; }
785
- .pages-list-wrap .settings-details .settings-form .form-row input,
786
- .pages-list-wrap .settings-details .settings-form .form-row select,
787
- .pages-list-wrap .settings-details .settings-form .form-row textarea {
788
- font-size: 13px;
789
- font-weight: 600;
790
- line-height: 1;
791
- color: #21252B;
792
- padding: 9px 10px;
793
- display: block;
794
- width: 100%;
795
- border: 1px solid rgba(151, 151, 151, 0.1);
796
- border-radius: 3px;
797
- background-color: rgba(236, 236, 236, 0.47); }
798
- .pages-list-wrap .settings-details .settings-form .form-row input:focus,
799
- .pages-list-wrap .settings-details .settings-form .form-row select:focus,
800
- .pages-list-wrap .settings-details .settings-form .form-row textarea:focus {
801
- outline: none; }
802
- .pages-list-wrap .settings-details .settings-form .form-row input,
803
- .pages-list-wrap .settings-details .settings-form .form-row select {
804
- height: 39px; }
805
- .pages-list-wrap .settings-details .settings-form .form-row select {
806
- -webkit-appearance: none;
807
- -moz-appearance: none;
808
- background: url(../fonts/arrow-down.svg) 93%/9% no-repeat rgba(236, 236, 236, 0.47);
809
- background-position-y: 57%; }
810
- .pages-list-wrap .settings-details .settings-form .form-row textarea {
811
- height: 75px;
812
- resize: none;
813
- line-height: 1.4; }
814
- .pages-list-wrap .settings-details .settings-form .form-row .btn-cancel,
815
- .pages-list-wrap .settings-details .settings-form .form-row .btn-save {
816
- position: relative;
817
- top: 5px;
818
- font-size: 14px;
819
- font-weight: 600;
820
- color: #818A91;
821
- text-align: center; }
822
- .pages-list-wrap .settings-details .settings-form .form-row .btn-cancel:hover,
823
- .pages-list-wrap .settings-details .settings-form .form-row .btn-save:hover {
824
- text-decoration: none;
825
- opacity: 0.9; }
826
- .pages-list-wrap .settings-details .settings-form .form-row .btn-save {
827
- color: #fff;
828
- border-radius: 3px;
829
- background-color: #818A91;
830
- padding: 10px 29px;
831
- margin-left: 30px; }
832
-
833
- /* Site Settings Blocks */
834
- .site-settings-wrap {
835
- max-width: 645px;
836
- margin: 0 0;
837
- padding-bottom: 75px; }
838
- .site-settings-wrap.menu-wrap .menu-head {
839
- display: -webkit-box;
840
- display: -ms-flexbox;
841
- display: flex;
842
- -webkit-box-align: center;
843
- -ms-flex-align: center;
844
- align-items: center; }
845
- .site-settings-wrap.menu-wrap .menu-head .select_details {
846
- color: #818A91;
847
- font-size: 14px;
848
- font-weight: 600;
849
- opacity: 0.9; }
850
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap {
851
- width: 263px;
852
- max-width: 100%;
853
- margin: 0 5px;
854
- position: relative;
855
- outline: none;
856
- background-color: #FFFFFF;
857
- border-radius: 4px;
858
- border: 1px solid #e3e3e3; }
859
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .account-dropdown {
860
- font-size: 13px;
861
- font-weight: 500;
862
- color: #818A91;
863
- display: block;
864
- padding-left: 17px;
865
- height: 38px;
866
- line-height: 40px;
867
- border-radius: 4px;
868
- position: relative;
869
- background: url(../fonts/arrow-down.svg) no-repeat right;
870
- background-position-x: 95%;
871
- text-decoration: none;
872
- -webkit-box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
873
- box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1); }
874
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .account-dropdown .selected {
875
- color: #21252B;
876
- font-weight: 600; }
877
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu {
878
- right: 0;
879
- padding: 0;
880
- margin-top: 8px;
881
- border: 1px solid rgba(151, 151, 151, 0.1);
882
- -webkit-box-shadow: 0 1px 10px 1px rgba(0, 0, 0, 0.09);
883
- box-shadow: 0 1px 10px 1px rgba(0, 0, 0, 0.09);
884
- background-color: #fff; }
885
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list {
886
- margin: 5px 0; }
887
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account {
888
- padding-left: 16px;
889
- padding-right: 16px;
890
- height: 32px;
891
- line-height: 32px;
892
- color: #21252B;
893
- font-size: 13px;
894
- font-weight: 600;
895
- display: -webkit-box;
896
- display: -ms-flexbox;
897
- display: flex;
898
- -webkit-box-pack: justify;
899
- -ms-flex-pack: justify;
900
- justify-content: space-between;
901
- -webkit-box-align: center;
902
- -ms-flex-align: center;
903
- align-items: center; }
904
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account a.pages-list-actions__icon {
905
- color: #818A91;
906
- opacity: 0.9; }
907
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account a.pages-list-actions__icon:hover {
908
- color: #21252B; }
909
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account:hover {
910
- background-color: rgba(129, 138, 145, 0.1);
911
- cursor: pointer; }
912
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title {
913
- width: 100%;
914
- max-width: 70%;
915
- border: none;
916
- background: none;
917
- cursor: pointer; }
918
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title::-webkit-input-placeholder {
919
- color: #3DBFE8; }
920
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title:-ms-input-placeholder {
921
- color: #3DBFE8; }
922
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title::-ms-input-placeholder {
923
- color: #3DBFE8; }
924
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title::placeholder {
925
- color: #3DBFE8; }
926
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title:focus::-webkit-input-placeholder {
927
- opacity: 0; }
928
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title:focus:-ms-input-placeholder {
929
- opacity: 0; }
930
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title:focus::-ms-input-placeholder {
931
- opacity: 0; }
932
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-title:focus::placeholder {
933
- opacity: 0; }
934
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-icon {
935
- width: 12px;
936
- height: 12px;
937
- display: block;
938
- background-color: #3DBFE8;
939
- border-radius: 50%;
940
- position: relative; }
941
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-icon:before, .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-icon:after {
942
- content: '';
943
- position: absolute;
944
- background-color: #FFFFFF; }
945
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-icon:before {
946
- top: 3px;
947
- bottom: 3px;
948
- left: 49%;
949
- -webkit-transform: translateX(-48%);
950
- transform: translateX(-48%);
951
- width: 2px; }
952
- .site-settings-wrap.menu-wrap .menu-head .account-dropdown-wrap .dropdown-menu .account-list li.account.add-new-account .add-new-icon:after {
953
- left: 3px;
954
- right: 3px;
955
- top: 50%;
956
- -webkit-transform: translateY(-50%);
957
- transform: translateY(-50%);
958
- height: 2px; }
959
- .site-settings-wrap.menu-wrap .menu-head .menu-head-btn {
960
- font-size: 14px;
961
- font-weight: 600;
962
- line-height: 1;
963
- color: #fff;
964
- background-color: #3DBFE8;
965
- padding: 12.5px 26px;
966
- border-radius: 4px;
967
- pointer-events: none; }
968
- .site-settings-wrap.menu-wrap .menu-head .menu-head-btn.selected {
969
- background-color: #818A91;
970
- pointer-events: auto;
971
- text-decoration: none; }
972
- .site-settings-wrap.menu-wrap .preMenu_text {
973
- opacity: 0.7;
974
- color: #818A91;
975
- font-size: 14px;
976
- font-weight: 600;
977
- text-align: center;
978
- position: absolute;
979
- top: 47%;
980
- -webkit-transform: translateX(-50%);
981
- transform: translateX(-50%);
982
- left: 50%;
983
- display: none; }
984
- .site-settings-wrap.menu-wrap .menu_ddEdit {
985
- margin-top: 45px;
986
- width: 358px; }
987
- .site-settings-wrap.menu-wrap .menu_ddEdit .title {
988
- color: #818A91;
989
- font-size: 14px;
990
- font-weight: 600;
991
- opacity: 0.9;
992
- margin-bottom: 13px; }
993
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row {
994
- height: 49px;
995
- max-width: 334px;
996
- border-radius: 3px;
997
- background-color: #FFFFFF;
998
- -webkit-box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
999
- box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
1000
- padding: 16px 19px 16px 21px;
1001
- display: -webkit-box;
1002
- display: -ms-flexbox;
1003
- display: flex;
1004
- -webkit-box-pack: justify;
1005
- -ms-flex-pack: justify;
1006
- justify-content: space-between;
1007
- -webkit-box-align: center;
1008
- -ms-flex-align: center;
1009
- align-items: center;
1010
- position: relative; }
1011
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions .menuRow_close:after, .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions .menuRow_close:before {
1012
- content: "";
1013
- position: absolute;
1014
- display: block;
1015
- width: 13px;
1016
- border-top: 2px solid #818A91;
1017
- top: 45%;
1018
- left: 10%;
1019
- -webkit-transition: all .2s ease;
1020
- transition: all .2s ease; }
1021
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions .menuRow_close:before {
1022
- -webkit-transform: rotateZ(45deg);
1023
- transform: rotateZ(45deg); }
1024
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions .menuRow_close:after {
1025
- -webkit-transform: rotateZ(-45deg);
1026
- transform: rotateZ(-45deg); }
1027
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions .menuRow_close:hover:after, .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions .menuRow_close:hover:before {
1028
- border-top: 2px solid rgba(3, 8, 15, 0.92); }
1029
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions svg.brz-icon-svg {
1030
- width: 13px;
1031
- height: 13px;
1032
- color: #818A91;
1033
- opacity: 0.9; }
1034
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions svg.brz-icon-svg:hover {
1035
- color: rgba(3, 8, 15, 0.92); }
1036
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions > a {
1037
- display: inline-block; }
1038
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions > a:hover {
1039
- text-decoration: none; }
1040
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menu_actions > a:first-child {
1041
- margin-right: 10px; }
1042
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .arrow {
1043
- position: absolute;
1044
- left: 118%;
1045
- top: 19px;
1046
- border-top: 6px solid transparent;
1047
- border-right: 8px solid #D2D6D8;
1048
- border-bottom: 6px solid transparent;
1049
- display: none; }
1050
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions {
1051
- background-color: #D2D6D8;
1052
- opacity: 0.75;
1053
- border-radius: 4px;
1054
- padding: 35px 40px;
1055
- width: 375px;
1056
- position: absolute;
1057
- left: 120%;
1058
- top: 0;
1059
- display: none; }
1060
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row {
1061
- display: -webkit-box;
1062
- display: -ms-flexbox;
1063
- display: flex;
1064
- -webkit-box-pack: start;
1065
- -ms-flex-pack: start;
1066
- justify-content: flex-start;
1067
- -webkit-box-align: start;
1068
- -ms-flex-align: start;
1069
- align-items: flex-start; }
1070
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row .head_input {
1071
- text-align: left;
1072
- width: 146px; }
1073
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row .head_input:first-child {
1074
- margin-right: 8px; }
1075
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row .menu_dash_check {
1076
- margin: 0; }
1077
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row .menu_dash_check label.mdc_text {
1078
- margin: 0 0 0 22px; }
1079
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row .menu_dash_check label.mdc_text:before {
1080
- opacity: 1;
1081
- width: 15px;
1082
- height: 15px; }
1083
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row .menu_dash_check input {
1084
- -webkit-box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1);
1085
- box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.1); }
1086
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row .menu_dash_check:first-child {
1087
- margin-right: 25px; }
1088
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row label {
1089
- color: #818A91;
1090
- font-size: 14px;
1091
- font-weight: 600;
1092
- margin-bottom: 5px;
1093
- opacity: 1; }
1094
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row input,
1095
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row textarea {
1096
- font-size: 13px;
1097
- font-weight: 600;
1098
- line-height: 1;
1099
- color: #21252B;
1100
- padding: 9px 10px;
1101
- display: block;
1102
- width: 100%;
1103
- border: 1px solid rgba(151, 151, 151, 0.1);
1104
- border-radius: 3px;
1105
- background-color: #FFFFFF;
1106
- outline: none; }
1107
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row textarea {
1108
- resize: none;
1109
- margin-top: 4px;
1110
- height: 82px; }
1111
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row:nth-of-type(2) {
1112
- display: block; }
1113
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row .menuRowOptions .options_row:not(:last-child) {
1114
- margin-bottom: 25px; }
1115
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row.optionAuto .menuRowOptions {
1116
- bottom: -25px; }
1117
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row.active-option {
1118
- background-color: #E0F0F5; }
1119
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row.active-option .menuRowOptions,
1120
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row.active-option .arrow {
1121
- display: block; }
1122
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row.homePage:before {
1123
- content: '';
1124
- position: absolute;
1125
- top: 50%;
1126
- -webkit-transform: translateY(-50%);
1127
- transform: translateY(-50%);
1128
- left: -25px;
1129
- right: 10px;
1130
- background-color: #818A91;
1131
- -webkit-mask-image: url(../fonts/home.svg);
1132
- mask-image: url(../fonts/home.svg);
1133
- height: 12px;
1134
- width: 12px; }
1135
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .content_row:hover {
1136
- background-color: #E0F0F5; }
1137
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .nested-sortable {
1138
- min-height: 10px; }
1139
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .nested-sortable .menu_row {
1140
- margin: 0 0 0 24px; }
1141
- .site-settings-wrap.menu-wrap .menu_ddEdit .menu_row .nested-sortable .menu_row:first-child {
1142
- margin-top: 10px; }
1143
-
1144
- .select2-container--open .select2-dropdown {
1145
- border-radius: 4px;
1146
- border: 1px solid #e3e3e3;
1147
- margin-top: 10px; }
1148
- .select2-container--open .select2-dropdown .select2-results {
1149
- margin: 5px 0; }
1150
- .select2-container--open .select2-dropdown .select2-results .select2-results__options {
1151
- overflow-y: inherit; }
1152
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option {
1153
- color: #21252B;
1154
- font-size: 13px;
1155
- font-weight: 600;
1156
- padding-left: 16px;
1157
- padding-right: 16px;
1158
- height: 32px; }
1159
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option span {
1160
- display: -webkit-box;
1161
- display: -ms-flexbox;
1162
- display: flex;
1163
- -webkit-box-pack: justify;
1164
- -ms-flex-pack: justify;
1165
- justify-content: space-between; }
1166
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option .pages-list-actions__icon {
1167
- color: #818A91;
1168
- opacity: 0.9; }
1169
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option .pages-list-actions__icon:hover {
1170
- color: rgba(3, 8, 15, 0.92); }
1171
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option--highlighted {
1172
- background-color: rgba(129, 138, 145, 0.1); }
1173
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child {
1174
- color: #3DBFE8; }
1175
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child .pages-list-actions__icon:before, .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child .pages-list-actions__icon:after {
1176
- display: none; }
1177
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child .pages-list-actions__icon svg {
1178
- background-color: #3DBFE8;
1179
- border-radius: 50%; }
1180
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child .pages-list-actions__icon svg:before, .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child .pages-list-actions__icon svg:after {
1181
- content: '';
1182
- position: absolute;
1183
- width: 8px;
1184
- height: 2px;
1185
- background-color: #FFFFFF;
1186
- top: 50%;
1187
- left: 50%;
1188
- -webkit-transform: translate(-50%, -50%);
1189
- transform: translate(-50%, -50%); }
1190
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child .pages-list-actions__icon svg:after {
1191
- width: 2px;
1192
- height: 8px; }
1193
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option:first-child .pages-list-actions__icon svg use {
1194
- display: none; }
1195
- .select2-container--open .select2-dropdown .select2-results .select2-results__options .select2-results__option[aria-selected=true] {
1196
- background-color: rgba(129, 138, 145, 0.1); }
1197
-
1198
- .settings-block {
1199
- display: block;
1200
- width: 100%;
1201
- margin-bottom: 50px; }
1202
- .settings-block:last-child {
1203
- margin-bottom: 0; }
1204
- .settings-block .sett-block-title {
1205
- font-size: 16px;
1206
- font-weight: 600;
1207
- color: #818A91;
1208
- margin-bottom: 10px; }
1209
- .settings-block .sett-block-title span {
1210
- color: #21252B; }
1211
- .settings-block .sett-block-desc {
1212
- font-size: 14px;
1213
- color: #818A91;
1214
- font-weight: 400;
1215
- margin-bottom: 5px; }
1216
- .settings-block .sett-block-field {
1217
- width: 100%;
1218
- position: relative; }
1219
- .settings-block .sett-block-field input,
1220
- .settings-block .sett-block-field textarea,
1221
- .settings-block .sett-block-field .CodeMirror {
1222
- font-size: 14px;
1223
- font-weight: 600;
1224
- line-height: 17px;
1225
- background-color: #fff;
1226
- border: 1px solid #E2E2E2;
1227
- color: #21252B;
1228
- border-radius: 3px;
1229
- width: 100%;
1230
- height: 52px;
1231
- padding: 15px 25px; }
1232
- .settings-block .sett-block-field textarea, .settings-block .sett-block-field .CodeMirror {
1233
- height: 112px;
1234
- line-height: 1.8em;
1235
- resize: none; }
1236
- .settings-block .sett-block-field.sett-upload-file {
1237
- display: -webkit-box;
1238
- display: -ms-flexbox;
1239
- display: flex;
1240
- -webkit-box-align: center;
1241
- -ms-flex-align: center;
1242
- align-items: center;
1243
- -webkit-box-pack: justify;
1244
- -ms-flex-pack: justify;
1245
- justify-content: space-between; }
1246
- .settings-block .sett-block-field.sett-upload-file .sett-favicon-path {
1247
- max-width: 78%;
1248
- font-size: 14px;
1249
- font-weight: 600;
1250
- line-height: 17px;
1251
- background-color: #fff;
1252
- border: 1px solid #E2E2E2;
1253
- border-radius: 3px;
1254
- width: 100%;
1255
- height: 52px;
1256
- padding: 0 25px;
1257
- display: -webkit-box;
1258
- display: -ms-flexbox;
1259
- display: flex;
1260
- -webkit-box-align: center;
1261
- -ms-flex-align: center;
1262
- align-items: center; }
1263
- .settings-block .sett-block-field.sett-upload-file .upload-file-btn {
1264
- max-width: 130px;
1265
- width: 100%;
1266
- height: 50px;
1267
- position: relative; }
1268
- .settings-block .sett-block-field.sett-upload-file .upload-file-btn input {
1269
- position: absolute;
1270
- width: 100%;
1271
- top: 0;
1272
- bottom: 0;
1273
- opacity: 0;
1274
- padding: 25px;
1275
- cursor: pointer; }
1276
- .settings-block .sett-block-field.sett-upload-file .upload-file-btn input:hover {
1277
- cursor: pointer; }
1278
- .settings-block .sett-block-field.sett-upload-file .upload-file-btn .btn-select {
1279
- font-size: 14px;
1280
- font-weight: 600;
1281
- color: #FFFFFF;
1282
- display: -webkit-box;
1283
- display: -ms-flexbox;
1284
- display: flex;
1285
- -webkit-box-align: center;
1286
- -ms-flex-align: center;
1287
- align-items: center;
1288
- -webkit-box-pack: center;
1289
- -ms-flex-pack: center;
1290
- justify-content: center;
1291
- width: 100%;
1292
- height: 100%;
1293
- pointer-events: none;
1294
- border-radius: 3px;
1295
- background-color: #818A91; }
1296
- .settings-block .sett-block-field.sett-upload-file .upload-file-btn:hover {
1297
- opacity: 0.8; }
1298
- .settings-block .sett-block-field.sett-upload-file .upload-file-btn .sett-favicon-th {
1299
- position: absolute;
1300
- top: 0;
1301
- right: calc(-50px + -22px);
1302
- width: 50px;
1303
- height: 50px;
1304
- border-radius: 4px;
1305
- background-color: #D9DBDD;
1306
- display: -webkit-box;
1307
- display: -ms-flexbox;
1308
- display: flex;
1309
- -webkit-box-align: center;
1310
- -ms-flex-align: center;
1311
- align-items: center;
1312
- -webkit-box-pack: center;
1313
- -ms-flex-pack: center;
1314
- justify-content: center; }
1315
- .settings-block.thumbnail_wrap {
1316
- display: -webkit-box;
1317
- display: -ms-flexbox;
1318
- display: flex;
1319
- -webkit-box-pack: justify;
1320
- -ms-flex-pack: justify;
1321
- justify-content: space-between;
1322
- -ms-flex-wrap: wrap;
1323
- flex-wrap: wrap; }
1324
- .settings-block.thumbnail_wrap .thumbnail_left {
1325
- max-width: 60%;
1326
- width: 100%; }
1327
- .settings-block.thumbnail_wrap .thumbnail_left .sett-block-desc {
1328
- line-height: 22px; }
1329
- .settings-block.thumbnail_wrap .thumbnail_right {
1330
- max-width: 124px;
1331
- height: 124px;
1332
- width: 100%;
1333
- -webkit-box-sizing: border-box;
1334
- box-sizing: border-box;
1335
- border: 1px solid #e2e2e2;
1336
- border-radius: 3px;
1337
- background-color: #FFFFFF;
1338
- cursor: pointer;
1339
- position: relative; }
1340
- .settings-block.thumbnail_wrap .thumbnail_right input {
1341
- opacity: 0;
1342
- width: 100%;
1343
- height: 100%;
1344
- cursor: pointer;
1345
- position: absolute;
1346
- font-size: 0;
1347
- line-height: 0; }
1348
- .settings-block.thumbnail_wrap .thumbnail_right .thumbnail_absolute {
1349
- position: absolute;
1350
- pointer-events: none;
1351
- top: 50%;
1352
- left: 50%;
1353
- -webkit-transform: translate(-50%, -50%);
1354
- transform: translate(-50%, -50%);
1355
- display: -webkit-box;
1356
- display: -ms-flexbox;
1357
- display: flex;
1358
- -webkit-box-pack: center;
1359
- -ms-flex-pack: center;
1360
- justify-content: center;
1361
- width: 100%;
1362
- opacity: 0.5; }
1363
- .settings-block.thumbnail_wrap .thumbnail_right .thumbnail_absolute .icon {
1364
- width: 18px;
1365
- height: 18px;
1366
- border-radius: 50%;
1367
- background-color: #818A91;
1368
- position: relative; }
1369
- .settings-block.thumbnail_wrap .thumbnail_right .thumbnail_absolute .icon:before {
1370
- content: '';
1371
- position: absolute;
1372
- width: 10px;
1373
- height: 2px;
1374
- background-color: #FFFFFF;
1375
- top: 50%;
1376
- left: 50%;
1377
- -webkit-transform: translate(-50%, -50%);
1378
- transform: translate(-50%, -50%); }
1379
- .settings-block.thumbnail_wrap .thumbnail_right .thumbnail_absolute .icon:after {
1380
- content: '';
1381
- position: absolute;
1382
- width: 2px;
1383
- height: 10px;
1384
- background-color: #FFFFFF;
1385
- top: 50%;
1386
- left: 50%;
1387
- -webkit-transform: translate(-50%, -50%);
1388
- transform: translate(-50%, -50%); }
1389
- .settings-block.thumbnail_wrap .thumbnail_right .thumbnail_absolute .add_image {
1390
- opacity: 0.5;
1391
- color: #818A91;
1392
- font-size: 12px;
1393
- font-weight: 500;
1394
- margin-left: 9px; }
1395
- .settings-block.injector_wrap {
1396
- margin-bottom: 35px; }
1397
- .settings-block .custom_css_aria .CodeMirror {
1398
- height: 466px;
1399
- margin-top: 20px;
1400
- padding: 15px 25px 40px; }
1401
- .settings-block .custom_css_aria.textarea2 .CodeMirror {
1402
- height: 182px;
1403
- margin-top: 10px; }
1404
-
1405
- .CodeMirror-scroll {
1406
- overflow: auto !important; }
1407
-
1408
- .cm-s-default .cm-atom {
1409
- color: #287574; }
1410
-
1411
- .cm-s-default .cm-number {
1412
- color: #FE6608; }
1413
-
1414
- .cm-s-default .cm-variable,
1415
- .cm-s-default .cm-punctuation,
1416
- .cm-s-default .cm-property,
1417
- .cm-s-default .cm-operator {
1418
- color: #ABB6FD; }
1419
-
1420
- .cm-s-default .cm-comment {
1421
- color: #ABACAA; }
1422
-
1423
- .cm-s-default .cm-qualifier {
1424
- color: #05C096; }
1425
-
1426
- /*# sourceMappingURL=style.css.map */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/css/style.css.map DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "mappings": "AAAA,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAC7E,6EAA6E;AAE7E,oBAAoB;AACpB,UAIC;EAHA,WAAW,EAAE,EAAE;EACf,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,sCAAsC;AAE5C,UAKC;EAJA,WAAW,EAAE,EAAE;EACf,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,6CAA6C;AAEnD,UAIC;EAHA,WAAW,EAAE,EAAE;EACf,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,2CAA2C;AAEjD,UAKC;EAJA,WAAW,EAAE,EAAE;EACf,UAAU,EAAE,MAAM;EAClB,WAAW,EAAE,GAAG;EAChB,GAAG,EAAE,kDAAkD;AC1BxD,oBAAoB;AAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFM;EACJ,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CAAC;EACT,SAAS,EAAE,IAAI;EACf,IAAI,EAAE,OAAO;EACb,cAAc,EAAE,QAAQ;;AAE1B;;;;;;;;;;OAUQ;EACN,OAAO,EAAE,KAAK;;AAEhB,IAAK;EACH,WAAW,EAAE,CAAC;;AAEhB;EACG;EACD,UAAU,EAAE,IAAI;;AAElB;CACE;EACA,MAAM,EAAE,IAAI;;AAEd;;;OAGQ;EACN,OAAO,EAAE,EAAE;EACX,OAAO,EAAE,IAAI;;AAEf,KAAM;EACJ,cAAc,EAAE,CAAC;;AAEnB,IAAK;EACH,SAAS,EAAE,IAAI;EACf,wBAAwB,EAAE,IAAI;EAC9B,oBAAoB,EAAE,IAAI;EAC1B,sBAAsB,EAAE,oBAAoB;;AChI9C,qBAAqB;AACrB;IACK;EACH,UAAU,EAAE,MAAM;;AAIpB,IAAK;EACH,WAAW,EAAE,+BAA+B;EAC5C,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,GAAG;EAChB,WAAW,EAAE,KAAK;EAClB,KAAK,EAAE,IAAI;EACX,QAAQ,EAAE,QAAQ;EAClB,gBAAgB,EAAE,OAAO;;AAG3B,CAAE;EACE,KAAK,EAAE,OAAO;EACd,eAAe,EAAE,IAAI;EACrB,UAAU,EAAE,gBAAgB;EAE5B,OAAQ;IACJ,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,SAAS;;AAIlC,kBAAmB;EACf,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,MAAM;;AAGvB,WAAW;AACX,MAAO;EACL,OAAO,EAAC,GAAG;EACX,UAAU,EAAC,qBAAqB;EAEhC,WAAO;IACL,OAAO,EAAC,CAAC;;AAKX,oBAAO;EACL,OAAO,EAAE,CAAC;EACV,UAAU,EAAE,oBAAgB;;AAGhC,cAAe;EACb,aAAa,EAAE,GAAG;EAClB,QAAQ,EAAE,MAAM;EAChB,MAAM,EAAE,UAAU;EAClB,UAAU,EAAE,KAAK;EACjB,QAAQ,EAAE,QAAQ;EAClB,UAAU,EAAE,iCAA8B;EAC1C,gBAAgB,EAAE,OAAO;EACzB,MAAM,EAAE,CAAC;;AAEX,yBAA0B;EACxB,aAAc;IACZ,SAAS,EAAE,MAAM;AAIrB,cAAc;AACd,YAAa;EACX,QAAQ,EAAE,QAAQ;EAElB,mBAAS;IACP,OAAO,EAAE,gBAAgB;IACzB,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,+BAA+B;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,KAAK,EAAE,IAAI;IACX,OAAO,EAAE,YAAY;IACrB,OAAO,EAAE,QAAQ;IACjB,aAAa,EAAE,IAAI;IACnB,gBAAgB,EAAE,oBAAiB;IACnC,UAAU,EAAE,4BAAyB;IACrC,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE,oBAAoB;IAChC,cAAc,EAAE,IAAI;EAEtB,kBAAQ;IACN,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,YAAY;IACrB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,qBAAqB;IAC7B,UAAU,EAAE,8BAA2B;IACvC,OAAO,EAAE,CAAC;IACV,SAAS,EAAE,gBAAgB;IAC3B,UAAU,EAAE,oBAAoB;IAChC,cAAc,EAAE,IAAI;EAIpB,mDACQ;IACN,OAAO,EAAE,CAAC;;AC7GhB,gBAAgB;AAEZ,gCAAyB;EACrB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,IAAI;EACnB,SAAS,EAAE,IAAI;EACf,QAAQ,EAAE,QAAQ;EAElB,sCAAM;IACF,MAAM,EAAE,IAAI;AAGpB,qBAAc;EACV,OAAO,EAAE,YAAY;EACrB,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,GAAG;EACX,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,QAAQ;EAClB,GAAG,EAAE,GAAG;EACR,IAAI,EAAE,YAAY;EAClB,KAAK,EAAE,YAAY;EACnB,cAAc,EAAE,OAAO;AAE3B,iBAAU;EACN,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,CAAC;EACV,WAAW,EAAE,OAAO;EACpB,SAAS,EAAE,OAAO;EAClB,WAAW,EAAE,OAAO;EACpB,WAAW,EAAE,OAAO;EACpB,cAAc,EAAE,OAAO;EACvB,KAAK,EAAE,OAAO;AAElB,wCAAiC;EAC7B,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EAEZ,iEAAyB;IACrB,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,YAAY,EAAE,IAAI;IAClB,gBAAgB,EAAE,OAAO;IACzB,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,+BAA+B;IAC5C,SAAS,EAAE,IAAI;IACf,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,MAAM,EAAE,CAAC;EAEb,sDAAc;IACV,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,OAAO;AAItB,sBAAe;EACX,QAAQ,EAAE,MAAM;AAEpB,sCAA+B;EAC3B,gBAAgB,EAAE,CAAC;EACnB,QAAQ,EAAE,QAAQ;EAClB,IAAI,EAAE,QAAQ;EACd,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,IAAI;EACb,gBAAgB,EAAE,MAAM;EACxB,aAAa,EAAE,MAAM;EACrB,eAAe,EAAE,MAAM;EACvB,UAAU,EAAE,IAAI;EAEhB,iEAA2B;IACvB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,IAAI;IACb,iBAAiB,EAAE,MAAM;IACzB,cAAc,EAAE,MAAM;IACtB,WAAW,EAAE,MAAM;IACnB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,WAAW,EAAE,+BAA+B;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,OAAO,EAAE,MAAM;IACf,MAAM,EAAE,OAAO;IACf,kBAAkB,EAAE,cAAc;IAClC,UAAU,EAAE,cAAc;IAE1B,kGAAmC;MAC/B,UAAU,EAAE,OAAO;MACnB,KAAK,EAAE,OAAO;IAElB,uEAAQ;MACJ,KAAK,EAAE,OAAO;EAGtB,iEAA2B;IACvB,QAAQ,EAAE,QAAQ;IAClB,YAAY,EAAE,IAAI;AAG1B,mCAA4B;EACxB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;EACZ,GAAG,EAAE,CAAC;EACN,KAAK,EAAE,CAAC;EACR,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,IAAI;EACb,iBAAiB,EAAE,MAAM;EACzB,cAAc,EAAE,MAAM;EACtB,WAAW,EAAE,MAAM;EACnB,gBAAgB,EAAE,MAAM;EACxB,aAAa,EAAE,MAAM;EACrB,eAAe,EAAE,MAAM;EACvB,MAAM,EAAE,OAAO;EAEf,uFACU;IACN,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,IAAI;IACX,UAAU,EAAE,iBAAiB;IAC7B,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,WAAW,EAAE,IAAI;IACjB,kBAAkB,EAAE,YAAY;IAChC,UAAU,EAAE,YAAY;EAE5B,2CAAU;IACN,SAAS,EAAE,cAAc;EAE7B,0CAAS;IACL,SAAS,EAAE,eAAe;AAIlC,8BAAuB;EACnB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,WAAW;EACpB,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,IAAI;EACnB,SAAS,EAAE,IAAI;EACf,MAAM,EAAE,iBAAiB;EAEzB,uCAAW;IACP,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,IAAI;IACX,gBAAgB,EAAE,OAAO;IACzB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,iBAAiB;IACzB,cAAc,EAAE,IAAI;IACpB,cAAc,EAAE,MAAM;IAC9B,mBAAmB,EAAE,IAAI;IACzB,eAAe,EAAE,EAAE;IACnB,kBAAkB,EAAE,IAAI;EAEpB,wDAAwB;IACpB,YAAY,EAAE,WAAW;IACzB,QAAQ,EAAE,MAAM;IAChB,MAAM,EAAE,IAAI;IACZ,mBAAmB,EAAE,GAAG;IACxB,mBAAmB,EAAE,IAAI;IACzB,kBAAkB,EAAE,GAAG;IACvB,kBAAkB,EAAE,KAAK;EAE7B,6DAA+B;IAC3B,OAAO,EAAE,gBACb;EACA,wDAA0B;IACtB,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,QAAQ;IAElB,oEAAY;MACR,QAAQ,EAAE,QAAQ;MAClB,GAAG,EAAE,IAAI;MACT,OAAO,EAAE,IAAI;MAEb,2EAAS;QACL,QAAQ,EAAE,OAAO;QACjB,GAAG,EAAE,GAAG;QACR,OAAO,EAAE,KAAK;MAGlB,8EAAU;QACN,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,OAAO;QACzB,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;QACnB,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE,GAAG;QAClB,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;QAEZ,6FAAe;UACX,SAAS,EAAE,IAAI;UACf,WAAW,EAAE,IAAI;QAErB,oFAAQ;UACJ,eAAe,EAAE,IAAI;UACrB,gBAAgB,EAAE,OAAO;EAKzC,8DAAgC;IAC5B,KAAK,EAAE,yBAAqB;IAC5B,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,cAAc,EAAE,GAAG;IACnB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,+BAA+B;IAC5C,cAAc,EAAE,SAAS;IACzB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,IAAI;IACb,iBAAiB,EAAE,MAAM;IACzB,cAAc,EAAE,MAAM;IACtB,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,IAAI;IAEnB,qEAAS;MACL,OAAO,EAAE,EAAE;MACX,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,GAAG;MACX,gBAAgB,EAAE,OAAO;MACzB,WAAW,EAAE,IAAI;MACjB,OAAO,EAAE,KAAK;EAGtB,6DAA+B;IAC3B,MAAM,EAAE,OAAO;IACf,KAAK,EAAE,OAAO;IACd,cAAc,EAAE,IAAI;IACpB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,WAAW;IACpB,OAAO,EAAE,IAAI;IACb,iBAAiB,EAAE,MAAM;IACzB,cAAc,EAAE,MAAM;IACtB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,+BAA+B;IAC5C,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,kBAAkB,EAAE,cAAc;IAClC,UAAU,EAAE,cAAc;IAC1B,OAAO,EAAE,IAAI;IAEb,kGAAuC;MACnC,KAAK,EAAE,OAAO;MACd,OAAO,EAAE,CAAC;MACV,wGAAQ;QACJ,KAAK,EAAE,OAAO;IAGtB,wEAAa;MACT,YAAY,EAAE,IAAI;MAClB,SAAS,EAAE,IAAI;IAEnB,uEAAU;MACN,OAAO,EAAE,WAAW;MACpB,OAAO,EAAE,WAAW;MACpB,OAAO,EAAE,IAAI;MACb,SAAS,EAAE,IAAI;IAEnB,wEAAa;MACT,SAAS,EAAE,GAAG;IAGlB,0EAAe;MACX,cAAc,EAAE,CAAC;IAErB,mEAAQ;MACJ,OAAO,EAAE,CAAC;EAIlB,+CAAiB;IACb,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,aAAa,EAAE,IAAI;IACnB,QAAQ,EAAE,QAAQ;IAElB,qDAAM;MACF,OAAO,EAAE,CAAC;MACV,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,QAAQ,EAAE,QAAQ;MAClB,yEAAsB;QAClB,OAAO,EAAE,CAAC;MAEd,gFAA6B;QACzB,OAAO,EAAE,CAAC;MAEd,+EAA4B;QACxB,OAAO,EAAE,CAAC;IAGlB,yDAAU;MACN,KAAK,EAAE,OAAO;MACd,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,IAAI;MACjB,cAAc,EAAE,IAAI;MAEpB,8FAAuC;QACnC,OAAO,EAAE,CAAC;MAEd,gEAAS;QACL,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,CAAC;QACP,GAAG,EAAC,GAAG;QACP,SAAS,EAAC,gBAAgB;QAC1B,aAAa,EAAE,GAAG;QAClB,gBAAgB,EAAE,OAAO;QACzB,OAAO,EAAE,IAAI;QACb,cAAc,EAAE,IAAI;MAExB,+DAAQ;QACJ,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,gBAAgB,EAAE,sBAAsB;QACxC,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,GAAG;QACR,SAAS,EAAE,gBAAgB;QAC3B,cAAc,EAAE,IAAI;QACpB,OAAO,EAAE,CAAC;IAGlB,0DAAa;MACT,aAAa,EAAE,IAAI;EAKvB,8DAAW;IACP,gBAAgB,EAAE,CAAC;IACnB,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,QAAQ;IACd,gBAAgB,EAAE,OAAO;IACzB,MAAM,EAAE,IAAI;IACZ,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,GAAG;IAEd,kFAAqB;MACjB,QAAQ,EAAE,QAAQ;MAClB,MAAM,EAAE,IAAI;MACZ,OAAO,EAAE,IAAI;MAEb,4GAA4B;QACxB,OAAO,EAAE,KAAK;MAElB,mGAAmB;QACf,OAAO,EAAE,IAAI;MAEjB,mGAAmB;QACf,OAAO,EAAE,KAAK;IAGtB,mFAAqB;MACjB,UAAU,EAAE,IAAI;MAChB,MAAM,EAAE,IAAI;MACZ,mBAAmB,EAAE,GAAG;MACxB,mBAAmB,EAAE,IAAI;MACzB,kBAAkB,EAAE,GAAG;MACvB,kBAAkB,EAAE,KAAK;MACzB,OAAO,EAAE,CAAC;;AAQ9B,aAAa;AAGL,sCAAU;EACN,gBAAgB,EAAE,OAAO;EACzB,OAAO,EAAE,SAAS;EAClB,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,eAAe,EAAE,aAAa;EAC9B,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,EAAE;EACX,KAAK,EAAE,CAAC;EACR,MAAM,EAAE,CAAC;EACT,IAAI,EAAE,CAAC;EAEP,kDAAY;IACR,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,WAAW,EAAE,CAAC;IACd,KAAK,EAAE,IAAI;IACX,gBAAgB,EAAE,OAAO;IACzB,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,SAAS;IAClB,aAAa,EAAE,GAAG;IAElB,gEAAc;MACV,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,IAAI;IAErB,wDAAQ;MACJ,eAAe,EAAE,IAAI;MACrB,gBAAgB,EAAE,OAAO;EAGjC,mDAAa;IACT,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IACnB,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,WAAW,EAAE,IAAI;IAEjB,qDAAE;MACE,WAAW,EAAE,GAAG;IAEpB,iEAAc;MACV,GAAG,EAAE,IAAI;MACT,YAAY,EAAE,GAAG;AAKjC,sBAAe;EACX,OAAO,EAAE,eAAe;EACxB,QAAQ,EAAE,QAAQ;EAClB,OAAO,EAAE,CAAC;EAEV,iCAAa;IACT,MAAM,EAAE,IAAI;;ACvcxB,wBAAwB;AACxB,gBAAiB;EACb,gBAAgB,EAAE,IAAI;EACtB,UAAU,EAAE,8BAA2B;EACvC,aAAa,EAAE,GAAG;EAElB;mCACiB;IACb,OAAO,EAAE,IAAI;IACb,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,MAAM;EAEnB,gCAAgB;IACZ,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,GAAG;IAEd,4CAAc;MACV,IAAI,EAAE,SAAS;MACf,SAAS,EAAE,KAAK;IAEpB,2CAAa;MACT,IAAI,EAAE,CAAC;MACP,SAAS,EAAE,IAAI;MACf,UAAU,EAAE,MAAM;EAG1B,iCAAiB;IACb,aAAa,EAAE,kCAA4B;IAE3C,kDAAiB;MACb,SAAS,EAAE,IAAI;MACf,KAAK,EAAE,OAAO;MACd,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,MAAM;EAGvB,iCAAiB;IACb,WAAW,EAAE,IAAI;IACjB,cAAc,EAAE,IAAI;IACpB,aAAa,EAAE,kCAA4B;IAE3C,4CAAa;MACT,MAAM,EAAE,IAAI;IAEhB,mDAAkB;MACd,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,CAAC;MACd,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,OAAO;MACd,QAAQ,EAAE,QAAQ;MAElB,2DAAU;QACN,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,QAAQ;QAClB,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,gBAAgB;QAC3B,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,gBAAgB,EAAE,OAAO;QACzB,aAAa,EAAE,GAAG;IAG1B,kDAAiB;MACb,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,KAAK,EAAE,OAAO;IAElB,qDAAoB;MAChB,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,MAAM;MACnB,eAAe,EAAE,aAAa;MAC9B,OAAO,EAAE,MAAM;MAEf,2DAAQ;QACJ,SAAS,EAAE,IAAI;QACf,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,aAAa;QAEzB,iEAAQ;UACJ,KAAK,EAAE,oBAAiB;IAKpC,sEAAuC;MACnC,gBAAgB,EAAE,OAAO;IAE7B,qEAAsC;MAClC,gBAAgB,EAAE,OAAO;EAGjC,kCAAkB;IACd,aAAa,EAAE,kCAAkC;IAEjD,wCAAM;MACF,OAAO,EAAE,cAAc;IAGvB,2DAAU;MACN,MAAM,EAAE,CAAC;MACT,eAAe,EAAE,aAAa;MAC9B,aAAa,EAAE,IAAI;MAEnB,sEAAa;QACT,aAAa,EAAE,CAAC;MAEpB,qEAAU;QACN,IAAI,EAAE,CAAC;QACP,SAAS,EAAE,IAAI;QACf,aAAa,EAAE,GAAG;QAClB,YAAY,EAAE,GAAG;QAEjB,+EAAY;UACR,IAAI,EAAE,SAAS;UACf,SAAS,EAAE,KAAK;QAEpB,+EAAY;UACR,IAAI,EAAE,SAAS;UACf,SAAS,EAAE,KAAK;QAGhB,mGAAY;UACR,OAAO,EAAE,IAAI;UACb,eAAe,EAAE,QAAQ;UACzB,WAAW,EAAE,MAAM;UACnB,KAAK,EAAE,IAAI;MAIvB,iEAAM;QACF,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,GAAG;QAChB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,GAAG;MAEtB;;0EAES;QACL,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,WAAW,EAAE,CAAC;QACd,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,QAAQ;QACjB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,kCAA+B;QACvC,aAAa,EAAE,GAAG;QAClB,gBAAgB,EAAE,yBAAsB;QAExC;;kFAAQ;UACJ,OAAO,EAAE,IAAI;MAGrB;wEACO;QACH,MAAM,EAAE,IAAI;MAEhB,kEAAO;QACH,kBAAkB,EAAE,IAAI;QACxB,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,uEAAyE;QACrF,qBAAqB,EAAE,GAAG;MAE9B,oEAAS;QACL,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,GAAG;MAEpB;2EACU;QACN,QAAQ,EAAE,QAAQ;QAClB,GAAG,EAAE,GAAG;QACR,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,KAAK,EAAE,OAAO;QACd,UAAU,EAAE,MAAM;QAElB;mFAAQ;UACJ,eAAe,EAAE,IAAI;UACrB,OAAO,EAAE,GAAG;MAGpB,qEAAU;QACN,KAAK,EAAE,IAAI;QACX,aAAa,EAAE,GAAG;QAClB,gBAAgB,EAAE,OAAO;QACzB,OAAO,EAAE,SAAS;QAClB,WAAW,EAAE,IAAI;;AC/LrC,0BAA0B;AAC1B,mBAAoB;EAChB,SAAS,EAAE,KAAK;EAChB,MAAM,EAAE,GAAG;EACX,cAAc,EAAE,IAAI;EAIhB,wCAAW;IACP,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,MAAM;IAEnB,wDAAgB;MACZ,KAAK,EAAE,OAAO;MACd,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,GAAG;IAEhB,+DAAuB;MACnB,KAAK,EAAE,KAAK;MACZ,SAAS,EAAE,IAAI;MACf,MAAM,EAAE,KAAK;MACb,QAAQ,EAAE,QAAQ;MAClB,OAAO,EAAE,IAAI;MACb,gBAAgB,EAAE,OAAO;MACzB,aAAa,EAAE,GAAG;MAClB,MAAM,EAAE,iBAAiB;MAEzB,iFAAkB;QACd,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,KAAK;QACd,YAAY,EAAE,IAAI;QAClB,MAAM,EAAE,IAAI;QACZ,WAAW,EAAE,IAAI;QACjB,aAAa,EAAE,GAAG;QAClB,QAAQ,EAAE,QAAQ;QAClB,UAAU,EAAE,4CAA4C;QACxD,qBAAqB,EAAE,GAAG;QAC1B,eAAe,EAAE,IAAI;QACrB,UAAU,EAAE,8BAA2B;QAEvC,2FAAU;UACN,KAAK,EAAE,OAAO;UACd,WAAW,EAAE,GAAG;MAGxB,8EAAe;QACX,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,CAAC;QACV,UAAU,EAAE,GAAG;QACf,MAAM,EAAE,kCAA+B;QACvC,UAAU,EAAE,kCAA+B;QAC3C,gBAAgB,EAAE,IAAI;QAEtB,4FAAc;UACV,MAAM,EAAE,KAAK;UAEb,uGAAW;YACP,YAAY,EAAE,IAAI;YAClB,aAAa,EAAE,IAAI;YACnB,MAAM,EAAE,IAAI;YACZ,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,OAAO;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,GAAG;YAChB,OAAO,EAAE,IAAI;YACb,eAAe,EAAE,aAAa;YAC9B,WAAW,EAAE,MAAM;YAEnB,kIAA2B;cACvB,KAAK,EAAE,OAAO;cACd,OAAO,EAAE,GAAG;cAEZ,wIAAQ;gBACJ,KAAK,EAAE,OAAO;YAItB,6GAAQ;cACJ,gBAAgB,EAAE,wBAAqB;cACvC,MAAM,EAAE,OAAO;YAKf,sIAAe;cACX,KAAK,EAAE,IAAI;cACX,SAAS,EAAE,GAAG;cACd,MAAM,EAAE,IAAI;cACZ,UAAU,EAAE,IAAI;cAChB,MAAM,EAAE,OAAO;cAEf,mJAAe;gBACX,KAAK,EAAE,OAAO;cAGd,yJAAe;gBACX,OAAO,EAAE,CAAC;YAItB,qIAAc;cACV,KAAK,EAAE,IAAI;cACX,MAAM,EAAE,IAAI;cACZ,OAAO,EAAE,KAAK;cACd,gBAAgB,EAAE,OAAO;cACzB,aAAa,EAAE,GAAG;cAClB,QAAQ,EAAE,QAAQ;cAElB,yRAAiB;gBACb,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,QAAQ;gBAClB,gBAAgB,EAAE,OAAO;cAE7B,4IAAS;gBACL,GAAG,EAAE,GAAG;gBACR,MAAM,EAAE,GAAG;gBACX,IAAI,EAAE,GAAG;gBACT,iBAAiB,EAAE,gBAAgB;gBACnC,SAAS,EAAE,gBAAgB;gBAC3B,KAAK,EAAE,GAAG;cAEd,2IAAQ;gBACJ,IAAI,EAAE,GAAG;gBACT,KAAK,EAAE,GAAG;gBACV,GAAG,EAAE,GAAG;gBACR,iBAAiB,EAAE,gBAAgB;gBACnC,SAAS,EAAE,gBAAgB;gBAC3B,MAAM,EAAE,GAAG;IAQvC,uDAAe;MACX,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,WAAW,EAAE,CAAC;MACd,KAAK,EAAE,IAAI;MACX,gBAAgB,EAAE,OAAO;MACzB,OAAO,EAAE,WAAW;MACpB,aAAa,EAAE,GAAG;MAClB,cAAc,EAAE,IAAI;MAEpB,gEAAW;QACP,gBAAgB,EAAE,OAAO;QACzB,cAAc,EAAE,IAAI;QACpB,eAAe,EAAE,IAAI;EAIjC,2CAAc;IACV,OAAO,EAAE,GAAG;IACZ,KAAK,EAAE,OAAO;IACd,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,QAAQ;IAClB,GAAG,EAAC,GAAG;IACP,SAAS,EAAC,gBAAgB;IAC1B,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,IAAI;EAEjB,0CAAa;IACT,UAAU,EAAE,IAAI;IAChB,KAAK,EAAE,KAAK;IAEZ,iDAAO;MACH,KAAK,EAAE,OAAO;MACd,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,GAAG;MACZ,aAAa,EAAE,IAAI;IAInB,iEAAa;MACT,MAAM,EAAE,IAAI;MACZ,SAAS,EAAE,KAAK;MAChB,aAAa,EAAE,GAAG;MAClB,gBAAgB,EAAE,OAAO;MACzB,UAAU,EAAE,8BAA2B;MACvC,OAAO,EAAE,mBAAmB;MAC5B,OAAO,EAAE,IAAI;MACb,eAAe,EAAE,aAAa;MAC9B,WAAW,EAAE,MAAM;MACnB,QAAQ,EAAE,QAAQ;MAKV,2MACS;QACL,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,iBAAiB;QAC7B,GAAG,EAAE,GAAG;QACR,IAAI,EAAE,GAAG;QACT,kBAAkB,EAAE,YAAY;QAChC,UAAU,EAAE,YAAY;MAE5B,qGAAS;QACL,SAAS,EAAE,cAAc;MAE7B,oGAAQ;QACJ,SAAS,EAAE,eAAe;MAI1B,uNACS;QACL,UAAU,EAAE,8BAA2B;MAInD,gGAAiB;QACb,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,GAAG;QAER,sGAAQ;UACJ,KAAK,EAAE,oBAAiB;MAGpC,mFAAM;QACF,OAAO,EAAE,YAAY;QAErB,yFAAQ;UACJ,eAAe,EAAE,IAAI;QAEzB,+FAAc;UACV,YAAY,EAAE,IAAI;MAI9B,wEAAO;QACH,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,IAAI;QACT,UAAU,EAAE,qBAAqB;QACjC,YAAY,EAAE,iBAAiB;QAC/B,aAAa,EAAE,qBAAqB;QACpC,OAAO,EAAE,IAAI;MAEjB,iFAAgB;QACZ,gBAAgB,EAAE,OAAO;QACzB,OAAO,EAAE,IAAI;QACb,aAAa,EAAE,GAAG;QAClB,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,QAAQ;QAClB,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,CAAC;QACN,OAAO,EAAE,IAAI;QAEb,8FAAa;UACT,OAAO,EAAE,IAAI;UACb,eAAe,EAAE,UAAU;UAC3B,WAAW,EAAE,UAAU;UAEvB,0GAAY;YACR,UAAU,EAAE,IAAI;YAChB,KAAK,EAAE,KAAK;YAEZ,sHAAc;cACV,YAAY,EAAE,GAAG;UAGzB,+GAAiB;YACb,MAAM,EAAE,CAAC;YAET,8HAAe;cACX,MAAM,EAAE,UAAU;cAElB,qIAAS;gBACL,OAAO,EAAE,CAAC;gBACV,KAAK,EAAE,IAAI;gBACX,MAAM,EAAE,IAAI;YAGpB,qHAAM;cACF,UAAU,EAAE,8BAA2B;YAG3C,2HAAc;cACV,YAAY,EAAE,IAAI;UAG1B,oGAAM;YACF,KAAK,EAAE,OAAO;YACd,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,GAAG;YAChB,aAAa,EAAE,GAAG;YAClB,OAAO,EAAE,CAAC;UAEd;iHACS;YACL,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,GAAG;YAChB,WAAW,EAAE,CAAC;YACd,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,kCAA+B;YACvC,aAAa,EAAE,GAAG;YAClB,gBAAgB,EAAE,OAAO;YACzB,OAAO,EAAE,IAAI;UAEjB,uGAAS;YACL,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,GAAG;YACf,MAAM,EAAE,IAAI;UAGhB,6GAAiB;YACb,OAAO,EAAE,KAAK;UAElB,+GAAmB;YACf,aAAa,EAAE,IAAI;MAK3B,4FAAgB;QACZ,MAAM,EAAE,KAAK;MAGrB,+EAAgB;QACZ,gBAAgB,EAAE,OAAO;QAEzB;8FACO;UACH,OAAO,EAAE,KAAK;MAIlB,iFAAS;QACL,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,QAAQ;QAClB,GAAG,EAAE,GAAG;QACR,SAAS,EAAC,gBAAgB;QAC1B,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,IAAI;QACX,gBAAgB,EAAE,OAAO;QACzB,kBAAkB,EAAE,sBAAsB;QAC1C,UAAU,EAAE,sBAAsB;QAClC,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,IAAI;MAInB,uEAAQ;QACJ,gBAAgB,EAAE,OAAO;IAGjC,qEAAiB;MACb,UAAU,EAAE,IAAI;MAEhB,+EAAU;QACN,MAAM,EAAE,UAAU;QAElB,2FAAc;UACV,UAAU,EAAE,IAAI;;AASxC,0CAAkB;EACd,aAAa,EAAE,GAAG;EAClB,MAAM,EAAE,iBAAiB;EACzB,UAAU,EAAE,IAAI;EAEhB,2DAAiB;IACb,MAAM,EAAE,KAAK;IAEb,qFAA0B;MACtB,UAAU,EAAE,OAAO;MAEnB,8GAAyB;QACrB,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,YAAY,EAAE,IAAI;QAClB,aAAa,EAAE,IAAI;QACnB,MAAM,EAAE,IAAI;QAEZ,mHAAK;UACD,OAAO,EAAE,IAAI;UACb,eAAe,EAAE,aAAa;QAI9B,wIAAQ;UACJ,KAAK,EAAE,OAAO;UACd,OAAO,EAAE,GAAG;UAEZ,8IAAQ;YACJ,KAAK,EAAE,oBAAiB;QAKpC,2HAAe;UACX,gBAAgB,EAAE,wBAAqB;QAG3C,0HAAc;UACV,KAAK,EAAE,OAAO;UAKN,uTAAiB;YACb,OAAO,EAAE,IAAI;UAEjB,wJAAI;YACA,gBAAgB,EAAE,OAAO;YACzB,aAAa,EAAE,GAAG;YAElB,+TAAiB;cACb,OAAO,EAAE,EAAE;cACX,QAAQ,EAAE,QAAQ;cAClB,KAAK,EAAE,GAAG;cACV,MAAM,EAAE,GAAG;cACX,gBAAgB,EAAE,OAAO;cACzB,GAAG,EAAE,GAAG;cACR,IAAI,EAAE,GAAG;cACT,SAAS,EAAE,qBAAoB;YAEnC,8JAAQ;cACJ,KAAK,EAAE,GAAG;cACV,MAAM,EAAE,GAAG;YAGf,4JAAI;cACA,OAAO,EAAE,IAAI;MAOrC,kIAA6C;QACzC,gBAAgB,EAAE,wBAAqB;;AAM3D,eAAgB;EACZ,OAAO,EAAE,KAAK;EACd,KAAK,EAAE,IAAI;EACX,aAAa,EAAE,IAAI;EAEnB,0BAAa;IACT,aAAa,EAAE,CAAC;EAEpB,iCAAkB;IACd,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,KAAK,EAAE,OAAO;IACd,aAAa,EAAE,IAAI;IAEnB,sCAAK;MACD,KAAK,EAAE,OAAO;EAGtB,gCAAiB;IACb,SAAS,EAAE,IAAI;IACf,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,GAAG;IAChB,aAAa,EAAE,GAAG;EAEtB,iCAAkB;IACd,KAAK,EAAE,IAAI;IACX,QAAQ,EAAE,QAAQ;IAElB;;iDAEY;MACR,SAAS,EAAE,IAAI;MACf,WAAW,EAAE,GAAG;MAChB,WAAW,EAAE,IAAI;MACjB,gBAAgB,EAAE,IAAI;MACtB,MAAM,EAAE,iBAAiB;MACzB,KAAK,EAAE,OAAO;MACd,aAAa,EAAE,GAAG;MAClB,KAAK,EAAE,IAAI;MACX,MAAM,EAAE,IAAI;MACZ,OAAO,EAAE,SAAS;IAEtB,yFAAqB;MACjB,MAAM,EAAE,KAAK;MACb,WAAW,EAAE,KAAK;MAClB,MAAM,EAAE,IAAI;IAEhB,kDAAmB;MACf,OAAO,EAAE,IAAI;MACb,WAAW,EAAE,MAAM;MACnB,eAAe,EAAE,aAAa;MAE9B,qEAAmB;QACf,SAAS,EAAE,GAAG;QACd,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,WAAW,EAAE,IAAI;QACjB,gBAAgB,EAAE,IAAI;QACtB,MAAM,EAAE,iBAAiB;QACzB,aAAa,EAAE,GAAG;QAClB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,MAAM;QACf,OAAO,EAAE,IAAI;QACb,WAAW,EAAE,MAAM;MAEvB,mEAAiB;QACb,SAAS,EAAE,KAAK;QAChB,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,QAAQ,EAAE,QAAQ;QAElB,yEAAM;UACF,QAAQ,EAAE,QAAQ;UAClB,KAAK,EAAE,IAAI;UACX,GAAG,EAAE,CAAC;UACN,MAAM,EAAE,CAAC;UACT,OAAO,EAAE,CAAC;UACV,OAAO,EAAE,IAAI;UACb,MAAM,EAAE,OAAO;UAEf,+EAAQ;YACJ,MAAM,EAAE,OAAO;QAGvB,+EAAY;UACR,SAAS,EAAE,IAAI;UACf,WAAW,EAAE,GAAG;UAChB,KAAK,EAAE,OAAO;UACd,OAAO,EAAE,IAAI;UACb,WAAW,EAAE,MAAM;UACnB,eAAe,EAAE,MAAM;UACvB,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,IAAI;UACZ,cAAc,EAAE,IAAI;UACpB,aAAa,EAAE,GAAG;UAClB,gBAAgB,EAAE,OAAO;QAE7B,yEAAQ;UACJ,OAAO,EAAE,GAAG;QAEhB,oFAAiB;UACb,QAAQ,EAAE,QAAQ;UAClB,GAAG,EAAE,CAAC;UACN,KAAK,EAAE,mBAAmB;UAC1B,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,IAAI;UACZ,aAAa,EAAE,GAAG;UAClB,gBAAgB,EAAE,OAAO;UACzB,OAAO,EAAE,IAAI;UACb,WAAW,EAAE,MAAM;UACnB,eAAe,EAAE,MAAM;EAMvC,8BAAiB;IACb,OAAO,EAAE,IAAI;IACb,eAAe,EAAE,aAAa;IAC9B,SAAS,EAAE,IAAI;IAEf,8CAAgB;MACZ,SAAS,EAAE,GAAG;MACd,KAAK,EAAE,IAAI;MAEX,+DAAiB;QACb,WAAW,EAAE,IAAI;IAIzB,+CAAiB;MACb,SAAS,EAAE,KAAK;MAChB,MAAM,EAAE,KAAK;MACb,KAAK,EAAE,IAAI;MACX,UAAU,EAAE,UAAU;MACtB,MAAM,EAAE,iBAAiB;MACzB,aAAa,EAAE,GAAG;MAClB,gBAAgB,EAAE,OAAO;MACzB,MAAM,EAAE,OAAO;MACf,QAAQ,EAAE,QAAQ;MAElB,qDAAM;QACF,OAAO,EAAE,CAAC;QACV,KAAK,EAAE,IAAI;QACX,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,OAAO;QACf,QAAQ,EAAE,QAAQ;QAClB,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,CAAC;MAGlB,mEAAoB;QAChB,QAAQ,EAAE,QAAQ;QAClB,cAAc,EAAE,IAAI;QACpB,GAAG,EAAC,GAAG;QACP,IAAI,EAAC,GAAG;QACR,SAAS,EAAC,qBAAoB;QAC9B,OAAO,EAAE,IAAI;QACb,eAAe,EAAE,MAAM;QACvB,KAAK,EAAE,IAAI;QACX,OAAO,EAAE,GAAG;QAEZ,yEAAM;UACF,KAAK,EAAE,IAAI;UACX,MAAM,EAAE,IAAI;UACZ,aAAa,EAAE,GAAG;UAClB,gBAAgB,EAAE,OAAO;UACzB,QAAQ,EAAE,QAAQ;UAElB,gFAAS;YACL,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,IAAI;YACX,MAAM,EAAE,GAAG;YACX,gBAAgB,EAAE,OAAO;YACzB,GAAG,EAAC,GAAG;YACP,IAAI,EAAC,GAAG;YACR,SAAS,EAAC,qBAAoB;UAGlC,+EAAQ;YACJ,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,QAAQ;YAClB,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;YACZ,gBAAgB,EAAE,OAAO;YACzB,GAAG,EAAC,GAAG;YACP,IAAI,EAAC,GAAG;YACR,SAAS,EAAC,qBAAoB;QAItC,8EAAW;UACP,OAAO,EAAE,GAAG;UACZ,KAAK,EAAE,OAAO;UACd,SAAS,EAAE,IAAI;UACf,WAAW,EAAE,GAAG;UAChB,WAAW,EAAE,GAAG;EAMhC,6BAAgB;IACZ,aAAa,EAAE,IAAI;EAKnB,4CAAY;IACR,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,cAAc;EAIvB,sDAAY;IACR,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;;ACtqBhC,kBAAmB;EACf,QAAQ,EAAE,eAAe;;AAI7B,sBAAuB;EAAC,KAAK,EAAE,OAAO;;AACtC,wBAAyB;EAAC,KAAK,EAAE,OAAO;;AACxC;;;0BAG2B;EAAC,KAAK,EAAE,OAAO;;AAC1C,yBAA0B;EAAC,KAAK,EAAE,OAAO;;AACzC,2BAA4B;EAAC,KAAK,EAAE,OAAO",
4
- "sources": ["../sass/style.scss","../sass/_reset.scss","../sass/_general.scss","../sass/_popup.scss","../sass/_pages.scss","../sass/_siteSettings.scss","../sass/_codemirrorStyles.scss"],
5
- "names": [],
6
- "file": "style.css"
7
- }
 
 
 
 
 
 
 
admin/site-settings/fonts/arrow-down.svg DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 52.4 (67378) - http://www.bohemiancoding.com/sketch -->
4
- <title>Icons / General / arrow-down</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="Icons-/-General-/-arrow-down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92">
7
- <path d="M8,10 C7.88965517,10 7.77978597,9.96195006 7.69036861,9.88537455 L4,6.72247325 L4.61926278,6 L8,8.8979786 L11.3807372,6 L12,6.72247325 L8.30963139,9.88537455 C8.22021403,9.96195006 8.11034483,10 8,10 Z" id="Shape" fill="#03080F" fill-rule="nonzero"></path>
8
- </g>
9
- </svg>
 
 
 
 
 
 
 
 
 
admin/site-settings/fonts/arrow-right.svg DELETED
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="12px" height="11px" viewBox="0 0 12 11" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 52.4 (67378) - http://www.bohemiancoding.com/sketch -->
4
- <title>Icons / Popup Modal / search</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92">
7
- <g id="Button-Blue" transform="translate(-153.000000, -14.000000)" fill="#03080F" fill-rule="nonzero">
8
- <g id="Icons-/-General-/-arrow-left" transform="translate(159.500000, 19.500000) scale(-1, 1) translate(-159.500000, -19.500000) translate(154.000000, 14.000000)">
9
- <polygon id="Shape" transform="translate(5.600000, 5.607000) scale(-1, 1) translate(-5.600000, -5.607000) " points="6.50999989 0.916999944 5.52999991 1.89699993 8.53999985 4.90699988 0 4.90699988 0 6.30699985 8.53999985 6.30699985 5.52999991 9.3169998 6.50999989 10.2969998 11.1999998 5.60699986"></polygon>
10
- </g>
11
- </g>
12
- </g>
13
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/fonts/home.svg DELETED
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 52.4 (67378) - http://www.bohemiancoding.com/sketch -->
4
- <title>Path</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="Project-Settings-&amp;-Menus" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92">
7
- <g id="Menu-&gt;-No-Settings" transform="translate(-446.000000, -281.000000)" fill="#03080F" fill-rule="nonzero">
8
- <g id="Main-Content" transform="translate(446.000000, 151.000000)">
9
- <path d="M0,134 L0,141 C6.76353751e-17,141.552285 0.44771525,142 1,142 L4,142 L4,138 L8,138 L8,142 L11,142 C11.5522847,142 12,141.552285 12,141 L12,134 L6,130 L0,134 Z" id="Path"></path>
10
- </g>
11
- </g>
12
- </g>
13
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/fonts/icons.svg DELETED
@@ -1,9 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" style="display: none;"><symbol id="nc-play" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M13.6 7.2l-10-7A1 1 0 0 0 2 1v14c0 .8.9 1.3 1.6.8l10-7c.5-.4.5-1.2 0-1.6z"/></g></g></symbol><symbol id="nc-bold" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M11.56 7.316a3.483 3.483 0 0 0 1.418-3.207C12.782 2.305 11.143 1 9.33 1H2v1l1.447.724A1 1 0 0 1 4 3.618v8.764a1 1 0 0 1-.553.894L2 14v1h7.823c2.104 0 3.98-1.547 4.162-3.643a4.001 4.001 0 0 0-2.424-4.04zM7 3h1a2 2 0 1 1 0 4H7V3zm2 10H7V9h2a2 2 0 1 1 0 4z"/></g></g></symbol><symbol id="nc-h1" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M.5 2.05h2.686v4.964h5.389V2.05h2.686v11.9H8.575V9.258H3.186v4.692H.5V2.05zm12.18 4.91h2.83v6.99h-1.5V8.29h-1.33V6.96z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-h2" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M.05 2.3h2.577v4.762h5.17V2.3h2.576v11.416H7.796V9.215h-5.17v4.5H.05V2.3zm13.992 7.324c.17-.24.254-.471.254-.695a.77.77 0 0 0-.22-.561.758.758 0 0 0-.567-.226c-.422 0-.822.3-1.199.902l-1.2-.71c.314-.486.658-.854 1.032-1.103.374-.25.85-.374 1.43-.374.578 0 1.087.184 1.525.551.438.368.657.869.657 1.502 0 .345-.088.676-.264.993-.176.316-.5.72-.973 1.213l-1.21 1.257h2.649v1.343h-4.73v-1.113l1.967-2.014c.396-.403.68-.725.849-.965z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-h3" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M.1 2.27h2.589v4.784h5.194V2.27h2.589v11.47h-2.59V9.216H2.69v4.522H.1V2.27zm11.392 6.014V7.002h4.125v1.041L14.24 9.614c.54.09.958.317 1.253.68.296.363.443.782.443 1.258 0 .706-.239 1.26-.718 1.662-.478.402-1.09.603-1.836.603-.745 0-1.5-.264-2.265-.79l.617-1.196c.636.45 1.205.675 1.706.675.302 0 .551-.074.747-.222.196-.148.294-.361.294-.64a.78.78 0 0 0-.337-.666c-.225-.164-.537-.246-.935-.246-.212 0-.51.061-.896.183V9.807l1.291-1.523h-2.11z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-h4" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M.09 2.3h2.57v4.75h5.158V2.3h2.571v11.39H7.82V9.198H2.66v4.49H.09V2.3zm13.629 8.499V9.63h1.435V10.8h.757v1.292h-.757v1.598H13.72v-1.598h-2.69v-1.139l2.384-3.953h1.627l-2.269 3.8h.948z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-italic" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M12 2V0H6v2h1.27a.5.5 0 0 1 .496.57l-1.51 10.571a1 1 0 0 1-.99.859H4v2h6v-2H8.73a.5.5 0 0 1-.496-.57l1.51-10.571a1 1 0 0 1 .99-.859H12z"/></g></g></symbol><symbol id="nc-list-bullet" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><circle data-color="color-2" cx="2" cy="2" r="2"/><circle data-color="color-2" cx="2" cy="8" r="2"/><circle data-color="color-2" cx="2" cy="14" r="2"/><path fill="currentColor" d="M6 1h10v2H6z"/><path fill="currentColor" d="M6 7h10v2H6z"/><path fill="currentColor" d="M6 13h10v2H6z"/></g></g></symbol><symbol id="nc-list-default" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M1 9h7c.6 0 1-.4 1-1s-.4-1-1-1H1c-.6 0-1 .4-1 1s.4 1 1 1z"/><path fill="currentColor" d="M15 1H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z"/><path fill="currentColor" d="M15 13H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></g></symbol><symbol id="nc-list-numbers" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M5 1h11v2H5z"/><path fill="currentColor" d="M5 7h11v2H5z"/><path fill="currentColor" d="M5 13h11v2H5z"/><path data-color="color-2" d="M.368 4v-.549l.598-.048c.097-.007.11-.035.11-.139V.84c0-.083-.02-.125-.09-.145L.382.569.46 0h1.666v3.264c0 .111.007.132.111.139l.57.048V4H.368z"/><path data-color="color-2" d="M.047 10v-.63l.907-.886c.684-.663.975-.934.975-1.32 0-.25-.122-.433-.48-.433-.373 0-.529.122-.529.603L0 7.252C.007 6.176.826 6 1.536 6c1.05 0 1.422.447 1.422 1.083 0 .636-.44 1.056-.934 1.53l-.765.73h.995c.067 0 .095-.013.108-.08l.095-.535h.717V10H.047z"/><path data-color="color-2" d="M2.344 13.682c.567.087.88.427.88 1.026 0 .88-.66 1.292-1.612 1.292C.939 16 .34 15.76 0 15.387l.533-.586c.253.247.533.44.999.44.373 0 .693-.133.693-.6 0-.406-.253-.573-.666-.573a2.73 2.73 0 0 0-.493.047v-.666l.326-.04c.48-.06.74-.293.74-.72 0-.252-.114-.459-.487-.459-.36 0-.532.12-.532.593l-.913-.08c0-1.052.793-1.232 1.492-1.232 1.026 0 1.419.393 1.419 1.106 0 .56-.347.912-.767 1.039v.026z"/></g></g></symbol><symbol id="nc-p" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><text fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd" font-size="20" font-family="Montserrat-SemiBold, Montserrat" font-weight="500"><tspan x=".7" y="15">P</tspan></text></g></g></symbol><symbol id="nc-text-align-justify" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M0 1h16v2H0z"/><path data-color="color-2" d="M0 5h16v2H0z"/><path fill="currentColor" d="M0 9h16v2H0z"/><path data-color="color-2" d="M0 13h16v2H0z"/></g></g></symbol><symbol id="nc-add" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H9v3H7V9H4V7h3V4h2v3h3v2z"/></g></g></symbol><symbol id="nc-align-bottom" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M15 16H1c-.552 0-1-.51-1-1.143V1.143C0 .512.448 0 1 0h14c.552 0 1 .512 1 1.143v13.714C16 15.49 15.552 16 15 16zM3 14h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1z"/><rect transform="rotate(90 8 11)" x="7" y="6" width="2" height="10" rx="1"/></g></g></g></symbol><symbol id="nc-align-middle" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M15 16H1c-.552 0-1-.51-1-1.143V1.143C0 .512.448 0 1 0h14c.552 0 1 .512 1 1.143v13.714C16 15.49 15.552 16 15 16zM3 14h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1z"/><rect transform="rotate(90 8 8)" x="7" y="3" width="2" height="10" rx="1"/></g></g></g></symbol><symbol id="nc-align-top" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M15 16H1c-.552 0-1-.51-1-1.143V1.143C0 .512.448 0 1 0h14c.552 0 1 .512 1 1.143v13.714C16 15.49 15.552 16 15 16zM3 14h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1z"/><rect transform="rotate(90 8 5)" x="7" y="0" width="2" height="10" rx="1"/></g></g></g></symbol><symbol id="nc-duplicate" viewBox="0 0 14 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="matrix(-1 0 0 1 14 0)" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M9 4H1c-.6 0-1 .4-1 1v10c0 .6.4 1 1 1h8c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1z"/><path d="M13 0H3v2h9v11h2V1c0-.6-.4-1-1-1z"/></g></g></g></symbol><symbol id="nc-pin" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M8 0C4.1 0 1 3.1 1 7c0 1.9.7 3.7 2.1 5 .1.1 4.1 3.7 4.2 3.8.4.3 1 .3 1.3 0 .1-.1 4.2-3.7 4.2-3.8 1.4-1.3 2.1-3.1 2.1-5 .1-3.9-3-7-6.9-7zm0 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"/></g></g></symbol><symbol id="nc-dashed" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M0 7h6v2H0z"/><path d="M10 7h6v2h-6z"/></g></g></g></symbol><symbol id="nc-dotted" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M1 7h2v2H1z"/><path d="M5 7h2v2H5z"/><path d="M9 7h2v2H9z"/><path d="M13 7h2v2h-2z"/></g></g></g></symbol><symbol id="nc-solid" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M0 7h16v2H0z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-iframe" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M16 12h-2v-2h-2v2h-2v2h2v2h2v-2h2z"/><path fill="currentColor" d="M8 13H2V5h12v3h2V2a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h7v-2z"/></g></g></symbol><symbol id="nc-align-left" viewBox="0 0 16 17"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="translate(0 1)" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M15 16H1c-.552 0-1-.51-1-1.143V1.143C0 .512.448 0 1 0h14c.552 0 1 .512 1 1.143v13.714C16 15.49 15.552 16 15 16zM3 14h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1z" transform="rotate(90 8 8)"/><rect x="4" y="3" width="2" height="10" rx="1"/></g></g></g></symbol><symbol id="nc-align-right" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M15 16H1c-.552 0-1-.51-1-1.143V1.143C0 .512.448 0 1 0h14c.552 0 1 .512 1 1.143v13.714C16 15.49 15.552 16 15 16zM3 14h10a1 1 0 0 0 1-1V3a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1z"/><rect transform="rotate(180 11 8)" x="10" y="3" width="2" height="10" rx="1"/></g></g></g></symbol><symbol id="nc-arrow-right" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M9.3 1.3L7.9 2.7 12.2 7H0v2h12.2l-4.3 4.3 1.4 1.4L16 8z"/></g></g></symbol><symbol id="nc-brush" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="translate(1)" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M0 9c0 1.7 1.3 3 3 3h2v2c0 1.1.9 2 2 2s2-.9 2-2v-2h2c1.7 0 3-1.3 3-3H0z"/><path d="M0 0h7l2 3 2-3h3v7H0z"/></g></g></g></symbol><symbol id="nc-circle" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><circle cx="8" cy="8" r="5" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-corners-round" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M3 3c3.333 0 5.833 1 7.5 3 1.667 2 2.5 4.333 2.5 7h-3c-.011-2.144-.644-3.844-1.9-5.1C6.844 6.644 5.144 6.011 3 6V3z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-corners-square" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M3 3h10v10h-3V6H3z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-cube" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M15.4 3.1l-7-3c-.3-.1-.5-.1-.8 0l-7 3c-.4.1-.6.5-.6.9v8c0 .4.2.8.6.9l7 3c.1.1.3.1.4.1s.3 0 .4-.1l7-3c.4-.2.6-.5.6-.9V4c0-.4-.2-.8-.6-.9zM8 2.1L12.5 4 8 5.9 3.5 4 8 2.1zM2 5.5l5 2.1v5.8l-5-2.1V5.5zm7 8V7.7l5-2.1v5.8l-5 2.1z"/></g></g></symbol><symbol id="nc-font" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M8 0H1v4h1l.724-1.447A1 1 0 0 1 3.618 2H7v11.28a1 1 0 0 1-.684.948L4 15v1h8v-1l-2.316-.772A1 1 0 0 1 9 13.279V2h3.382a1 1 0 0 1 .894.553L14 4h1V0H8z"/></g></g></symbol><symbol id="nc-link" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M4.5 16c-1.2 0-2.3-.5-3.2-1.3-1.8-1.8-1.8-4.6 0-6.4l.7-.7L3.4 9l-.7.7c-1 1-1 2.6 0 3.6s2.6 1 3.6 0l3-3c1-1 1-2.6 0-3.6L8.6 6 10 4.6l.7.7c1.8 1.8 1.8 4.6 0 6.4l-3 3c-.8.8-2 1.3-3.2 1.3z"/><path fill="currentColor" d="M6 11.4l-.7-.7c-1.8-1.8-1.8-4.6 0-6.4l3-3c.9-.9 2-1.3 3.2-1.3s2.3.5 3.2 1.3c1.8 1.8 1.8 4.6 0 6.4l-.7.7L12.6 7l.7-.7c1-1 1-2.6 0-3.6s-2.6-1-3.6 0l-3 3c-1 1-1 2.6 0 3.6l.7.7L6 11.4z"/></g></g></symbol><symbol id="nc-more" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><circle data-color="color-2" cx="8" cy="8" r="2"/><circle fill="currentColor" cx="2" cy="8" r="2"/><circle fill="currentColor" cx="14" cy="8" r="2"/></g></g></symbol><symbol id="nc-outline" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><circle cx="8" cy="8" r="4" stroke-width="2" stroke="currentColor" fill="none" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-pen" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M8.1 3.5L.3 11.3c-.2.2-.3.4-.3.7v3c0 .6.4 1 1 1h3c.3 0 .5-.1.7-.3l7.8-7.8-4.4-4.4z"/><path data-color="color-2" d="M15.7 3.3l-3-3c-.4-.4-1-.4-1.4 0L9.5 2.1l4.4 4.4 1.8-1.8c.4-.4.4-1 0-1.4z"/></g></g></symbol><symbol id="nc-plus" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M15 7H9V1c0-.6-.4-1-1-1S7 .4 7 1v6H1c-.6 0-1 .4-1 1s.4 1 1 1h6v6c0 .6.4 1 1 1s1-.4 1-1V9h6c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></g></symbol><symbol id="nc-search" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M7 14c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7zM7 2C4.243 2 2 4.243 2 7s2.243 5 5 5 5-2.243 5-5-2.243-5-5-5z"/><path data-color="color-2" d="M15.707 14.293L13.314 11.9a8.019 8.019 0 0 1-1.414 1.414l2.393 2.393a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414z"/></g></g></symbol><symbol id="nc-star" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M15.144 5.438l-4.316-.627L8.897.9C8.559.217 7.441.217 7.103.9l-1.93 3.911-4.317.627a1.002 1.002 0 0 0-.554 1.707l3.124 3.044-.737 4.299a1 1 0 0 0 1.451 1.054L8 13.513l3.861 2.03c.728.381 1.591-.234 1.451-1.054l-.737-4.299 3.124-3.044a1.003 1.003 0 0 0-.555-1.708z"/></g></g></symbol><symbol id="nc-text-align-center" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M0 1h16v2H0z"/><path data-color="color-2" d="M3 5h10v2H3z"/><path fill="currentColor" d="M0 9h16v2H0z"/><path data-color="color-2" d="M3 13h10v2H3z"/></g></g></symbol><symbol id="nc-text-align-left" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M0 1h16v2H0z"/><path data-color="color-2" d="M0 5h10v2H0z"/><path fill="currentColor" d="M0 9h16v2H0z"/><path data-color="color-2" d="M0 13h10v2H0z"/></g></g></symbol><symbol id="nc-text-align-right" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M0 1h16v2H0z"/><path data-color="color-2" d="M6 5h10v2H6z"/><path fill="currentColor" d="M0 9h16v2H0z"/><path data-color="color-2" d="M6 13h10v2H6z"/></g></g></symbol><symbol id="nc-upload" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M13 7.1V7c0-2.8-2.2-5-5-5-2.5 0-4.6 1.8-4.9 4.3C1.3 6.9 0 8.5 0 10.5 0 13 2 15 4.5 15H12c2.2 0 4-1.8 4-4 0-1.9-1.3-3.4-3-3.9zM9 10v3H7v-3H4l4-4 4 4H9z"/></g></g></symbol><symbol id="nc-check" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="check" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M6.7 6.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l2 2c.2.2.4.3.7.3.3 0 .5-.1.7-.3l7-7c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L8 7.6 6.7 6.3z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M8 15c3.9 0 7-3.1 7-7 0-.6-.4-1-1-1s-1 .4-1 1c0 2.8-2.2 5-5 5s-5-2.2-5-5 2.2-5 5-5c.6 0 1.1.1 1.7.3.5.2 1.1-.1 1.3-.6.2-.5-.1-1.1-.6-1.3C9.6 1.1 8.8 1 8 1 4.1 1 1 4.1 1 8s3.1 7 7 7z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-cog" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M13.3 5.2l1.1-2.1L13 1.7l-2.1 1.1c-.3-.2-.7-.3-1.1-.4L9 0H7l-.8 2.3c-.3.1-.7.2-1 .4L3.1 1.6 1.6 3.1l1.1 2.1c-.2.3-.3.7-.4 1L0 7v2l2.3.8c.1.4.3.7.4 1.1L1.6 13 3 14.4l2.1-1.1c.3.2.7.3 1.1.4L7 16h2l.8-2.3c.4-.1.7-.3 1.1-.4l2.1 1.1 1.4-1.4-1.1-2.1c.2-.3.3-.7.4-1.1L16 9V7l-2.3-.8c-.1-.3-.2-.7-.4-1zM8 11c-1.7 0-3-1.3-3-3s1.3-3 3-3 3 1.3 3 3-1.3 3-3 3z"/></g></g></symbol><symbol id="nc-hover" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M3 8.238V4.5C3 3.122 4.121 2 5.5 2S8 3.122 8 4.5v2.605l1.059.118A4.456 4.456 0 0 0 10 4.5C10 2.019 7.981 0 5.5 0S1 2.019 1 4.5c0 1.557.795 2.93 2 3.738z"/><path fill="currentColor" d="M13.9 16l1.066-3.554a3 3 0 0 0-2.542-3.843L7 8V4.5a1.5 1.5 0 1 0-3 0V12H3v-2h-.5A1.5 1.5 0 0 0 1 11.5v1.833c0 .95.285 1.87.79 2.667H13.9z"/></g></g></symbol><symbol id="nc-image" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M15 16H1c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1h14c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1zM2 14h12V2H2v12z"/><path data-color="color-2" d="M6 4c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1z"/><path data-color="color-2" d="M3 12l2-4 2 2 3-4 3 6z"/></g></g></symbol><symbol id="nc-remove" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z" fill="none" fill-rule="nonzero"/><path fill="currentColor" d="M11.5 10.1l-1.4 1.4L8 9.4l-2.1 2.1-1.4-1.4L6.6 8 4.5 5.9l1.4-1.4L8 6.6l2.1-2.1 1.4 1.4L9.4 8z"/></g></g></g></symbol><symbol id="nc-settings" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M5 5V1c0-.6-.4-1-1-1S3 .4 3 1v4c0 .6.4 1 1 1s1-.4 1-1z"/><path fill="currentColor" d="M1 11c0 1.3.9 2.4 2 2.8V15c0 .6.4 1 1 1s1-.4 1-1v-1-.2c1.2-.4 2-1.5 2-2.8 0-1.7-1.3-3-3-3s-3 1.3-3 3z"/><path data-color="color-2" d="M11 11v4c0 .6.4 1 1 1s1-.4 1-1v-4c0-.6-.4-1-1-1s-1 .4-1 1z"/><path data-color="color-2" d="M9 5c0 1.7 1.3 3 3 3s3-1.3 3-3c0-1.3-.9-2.4-2-2.8V1c0-.6-.4-1-1-1s-1 .4-1 1v1.2C9.9 2.6 9 3.7 9 5z"/></g></g></symbol><symbol id="nc-trash" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M2 6v8c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V6H2z"/><path data-color="color-2" d="M12 3V1c0-.6-.4-1-1-1H5c-.6 0-1 .4-1 1v2H0v2h16V3h-4zm-2 0H6V2h4v1z"/></g></g></symbol><symbol id="nc-uncheck" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="uncheck" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><circle id="Oval" stroke="currentColor" stroke-width="2" cx="8" cy="8" r="6"/></g></g></g></symbol><symbol id="nc-button-2" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M12.586 15l-3.793-3.793L7 14 5 6l8 2-2.793 1.793L14 13.586 12.586 15z"/><path fill="currentColor" d="M4 10H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v7h-2V2H2v6h2v2z"/></g></g></symbol><symbol id="nc-button" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M12.424 5.603L7 5V1.5a1.5 1.5 0 1 0-3 0V9H3V7h-.5A1.5 1.5 0 0 0 1 8.5v1.833a5 5 0 0 0 1 3L4 16h9l1.966-6.554a3 3 0 0 0-2.542-3.843z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-desktop" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M15 0H1C.4 0 0 .4 0 1v11c0 .6.4 1 1 1h5v1H3v2h10v-2h-3v-1h5c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1zm-1 11H2V2h12v9z"/></g></g></symbol><symbol id="nc-divider" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M1 1v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1z"/><path fill="currentColor" d="M1 12v3a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1H2a1 1 0 0 0-1 1z"/><path data-color="color-2" d="M15 9H1a1 1 0 0 1 0-2h14a1 1 0 0 1 0 2z"/></g></g></symbol><symbol id="nc-lock" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M13.417 6.4h-1.084V4.267C12.333 1.914 10.39 0 8 0S3.667 1.914 3.667 4.267V6.4H2.583c-.599 0-1.083.478-1.083 1.067v7.466c0 .59.484 1.067 1.083 1.067h10.834c.599 0 1.083-.478 1.083-1.067V7.467c0-.59-.484-1.067-1.083-1.067zM5.833 4.267c0-1.177.972-2.134 2.167-2.134 1.195 0 2.167.957 2.167 2.134V6.4H5.833V4.267z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-menu" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M15 7H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z"/><path fill="currentColor" d="M15 1H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z"/><path fill="currentColor" d="M15 13H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></g></symbol><symbol id="nc-phone" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="translate(2)" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M10 16H2c-1.103 0-2-.897-2-2V2C0 .897.897 0 2 0h8c1.103 0 2 .897 2 2v12c0 1.103-.897 2-2 2zM2 2v12h8.001L10 2H2z"/><path d="M7 12v-2H5v2z"/></g></g></g></symbol><symbol id="nc-reorder" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M3 1h10v1H3z"/><path d="M1 4h14v11H1z"/></g></g></g></symbol><symbol id="nc-spacer" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M2 6H0V1c0-.6.4-1 1-1h5v2H2v4z"/><path fill="currentColor" d="M16 6h-2V2h-4V0h5c.6 0 1 .4 1 1v5z"/><path fill="currentColor" d="M15 16h-5v-2h4v-4h2v5c0 .6-.4 1-1 1z"/><path fill="currentColor" d="M6 16H1c-.6 0-1-.4-1-1v-5h2v4h4v2z"/></g></g></symbol><symbol id="nc-tablet" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M13 0H3a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM7 15v-1h2v1H7zm6-3H3V2h10v10z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-unlock" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M13.417 6.4h-1.084V4.267C12.333 1.914 10.39 0 8 0S3.667 1.914 3.667 4.267V6.4H2.583c-.599 0-1.083.478-1.083 1.067v7.466c0 .59.484 1.067 1.083 1.067h10.834c.599 0 1.083-.478 1.083-1.067V7.467c0-.59-.484-1.067-1.083-1.067zM5.833 4.267c0-1.177.972-2.134 2.167-2.134 1.195 0 2.167.957 2.167 2.134h2.166V6.4h-6.5V4.267z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-upgrade" viewBox="0 0 32 32"><g><g class="nc-icon-wrapper" fill="currentColor"><circle fill="currentColor" cx="16" cy="6" r="1"/><path fill="currentColor" d="M18 24v-1c0-.77.297-1.468.775-2H0v1c0 2.757 2.243 5 5 5h13v-3z"/><path fill="currentColor" d="M27 4v10.09a5.964 5.964 0 0 1 2 .721V4c0-1.654-1.346-3-3-3H6C4.346 1 3 2.346 3 4v15h2V4c0-.551.448-1 1-1h20c.552 0 1 .449 1 1z"/><path data-color="color-2" d="M31 22h-1v-2c0-2.206-1.794-4-4-4s-4 1.794-4 4v2h-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1v-7a1 1 0 0 0-1-1zm-7-2c0-1.103.897-2 2-2s2 .897 2 2v2h-4v-2z"/></g></g></symbol><symbol id="nc-close" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M12.786 3.214a.69.69 0 0 0-1 0L8 7 4.214 3.214a.69.69 0 0 0-1 0 .69.69 0 0 0 0 1L7 8l-3.786 3.786a.69.69 0 0 0 0 1 .648.648 0 0 0 .5.214.648.648 0 0 0 .5-.214L8 9l3.786 3.786a.772.772 0 0 0 .5.214.772.772 0 0 0 .5-.214.69.69 0 0 0 0-1L9 8l3.786-3.786a.69.69 0 0 0 0-1z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-corners-all" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><rect x="1" y="2" width="14" height="12" rx="3" stroke="currentColor" stroke-width="2" fill="none" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-corners-bottom-right" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M0 6V4c0-2 1.5-3 3-3h2v2H3.5C2.5 3 2 3.5 2 4.5V6H0z" fill="currentColor"/><path d="M11 6V4c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V6h-2z" fill="currentColor" transform="matrix(-1 0 0 1 27 0)"/><path d="M0 15v-2c0-2 1.5-3 3-3h2v2H3.5c-1 0-1.5.5-1.5 1.5V15H0z" fill="currentColor" transform="matrix(1 0 0 -1 0 25)"/><path d="M11 15v-2c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V15h-2z" fill="#22AFDA" transform="rotate(180 13.5 12.5)"/></g></g></g></symbol><symbol id="nc-corners-bottom-left" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M0 6V4c0-2 1.5-3 3-3h2v2H3.5C2.5 3 2 3.5 2 4.5V6H0z" fill="currentColor"/><path d="M11 6V4c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V6h-2z" fill="currentColor" transform="matrix(-1 0 0 1 27 0)"/><path d="M0 15v-2c0-2 1.5-3 3-3h2v2H3.5c-1 0-1.5.5-1.5 1.5V15H0z" fill="#22AFDA" transform="matrix(1 0 0 -1 0 25)"/><path d="M11 15v-2c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V15h-2z" fill="currentColor" transform="rotate(180 13.5 12.5)"/></g></g></g></symbol><symbol id="nc-corners-individual" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M0 6V4c0-2 1.5-3 3-3h2v2H3.5C2.5 3 2 3.5 2 4.5V6H0z"/><path d="M11 6V4c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V6h-2z" transform="matrix(-1 0 0 1 27 0)"/><path d="M0 15v-2c0-2 1.5-3 3-3h2v2H3.5c-1 0-1.5.5-1.5 1.5V15H0z" transform="matrix(1 0 0 -1 0 25)"/><path d="M11 15v-2c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V15h-2z" transform="rotate(180 13.5 12.5)"/></g></g></g></symbol><symbol id="nc-corners-top-left" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M0 6V4c0-2 1.5-3 3-3h2v2H3.5C2.5 3 2 3.5 2 4.5V6H0z" fill="#22AFDA"/><path d="M11 6V4c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V6h-2z" fill="currentColor" transform="matrix(-1 0 0 1 27 0)"/><path d="M0 15v-2c0-2 1.5-3 3-3h2v2H3.5c-1 0-1.5.5-1.5 1.5V15H0z" fill="currentColor" transform="matrix(1 0 0 -1 0 25)"/><path d="M11 15v-2c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V15h-2z" fill="currentColor" transform="rotate(180 13.5 12.5)"/></g></g></g></symbol><symbol id="nc-corners-top-right" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M0 6V4c0-2 1.5-3 3-3h2v2H3.5C2.5 3 2 3.5 2 4.5V6H0z" fill="currentColor"/><path d="M11 6V4c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V6h-2z" fill="#22AFDA" transform="matrix(-1 0 0 1 27 0)"/><path d="M0 15v-2c0-2 1.5-3 3-3h2v2H3.5c-1 0-1.5.5-1.5 1.5V15H0z" fill="currentColor" transform="matrix(1 0 0 -1 0 25)"/><path d="M11 15v-2c0-2 1.5-3 3-3h2v2h-1.5c-1 0-1.5.5-1.5 1.5V15h-2z" fill="currentColor" transform="rotate(180 13.5 12.5)"/></g></g></g></symbol><symbol id="nc-horizontal" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path transform="rotate(90 11.833 8)" d="M11.833 10.167h4.5l-4.5-4.334-4.5 4.334h2.834z"/><path transform="matrix(0 1 1 0 -3.833 3.833)" d="M4.167 10.167h4.5l-4.5-4.334-4.5 4.334H2.5z"/></g></g></g></symbol><symbol id="nc-redo" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M10 4.6L8.6 6l3 3H6C4.3 9 3 7.7 3 6s1.3-3 3-3h8V1H6C3.2 1 1 3.2 1 6s2.2 5 5 5h5.6l-3 3 1.4 1.4 5.4-5.4L10 4.6z"/></g></g></symbol><symbol id="nc-size" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M15 8l-3-3v2h-2v2h2v2z"/><path d="M7 6h2V4h2L8 1 5 4h2z"/><path d="M9 10H7v2H5l3 3 3-3H9z"/><path d="M6 9V7H4V5L1 8l3 3V9z"/></g></g></g></symbol><symbol id="nc-styling-all" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M0 1h16v2H0z"/><path d="M0 13h16v2H0z"/><path transform="rotate(-90 1 8)" d="M-4 7H6v2H-4z"/><path transform="rotate(-90 15 8)" d="M10 7h10v2H10z"/></g></g></g></symbol><symbol id="nc-styling-bottom" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path fill="currentColor" d="M3 1h10v2H3z"/><path fill="#22AFDA" d="M3 13h10v2H3z"/><path fill="currentColor" transform="rotate(-90 1 8)" d="M-3 7h8v2h-8z"/><path fill="currentColor" transform="rotate(-90 15 8)" d="M11 7h8v2h-8z"/></g></g></g></symbol><symbol id="nc-styling-individual" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M3 1h10v2H3z"/><path d="M3 13h10v2H3z"/><path transform="rotate(-90 1 8)" d="M-3 7h8v2h-8z"/><path transform="rotate(-90 15 8)" d="M11 7h8v2h-8z"/></g></g></g></symbol><symbol id="nc-styling-left" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path fill="currentColor" d="M3 1h10v2H3z"/><path fill="currentColor" d="M3 13h10v2H3z"/><path fill="#22AFDA" transform="rotate(-90 1 8)" d="M-3 7h8v2h-8z"/><path fill="currentColor" transform="rotate(-90 15 8)" d="M11 7h8v2h-8z"/></g></g></g></symbol><symbol id="nc-styling-right" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path fill="currentColor" d="M3 1h10v2H3z"/><path fill="currentColor" d="M3 13h10v2H3z"/><path fill="currentColor" transform="rotate(-90 1 8)" d="M-3 7h8v2h-8z"/><path fill="#22AFDA" transform="rotate(-90 15 8)" d="M11 7h8v2h-8z"/></g></g></g></symbol><symbol id="nc-styling-top" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path fill="#22AFDA" d="M3 1h10v2H3z"/><path fill="currentColor" d="M3 13h10v2H3z"/><path fill="currentColor" transform="rotate(-90 1 8)" d="M-3 7h8v2h-8z"/><path fill="currentColor" transform="rotate(-90 15 8)" d="M11 7h8v2h-8z"/></g></g></g></symbol><symbol id="nc-styling" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M2.2 5.6l3.4-3.4L3.7.3c-.4-.4-1-.4-1.4 0l-2 2c-.4.4-.4 1 0 1.4l1.9 1.9z"/><path data-color="color-2" d="M13.8 10.4l-3.4 3.4 1.9 1.9c.2.2.4.3.7.3h3v-3c0-.3-.1-.5-.3-.7l-1.9-1.9z"/><path fill="currentColor" d="M15.7 4.3l-4-4c-.4-.4-1-.4-1.4 0L9 1.6l1.7 1.7-1.4 1.4L7.6 3 6 4.6l1.7 1.7-1.4 1.4L4.6 6 3 7.6l1.7 1.7-1.4 1.4L1.6 9 .3 10.3c-.4.4-.4 1 0 1.4l4 4c.4.4 1 .4 1.4 0l10-10c.4-.4.4-1 0-1.4z"/></g></g></symbol><symbol id="nc-time" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M12.7.3c-.4-.4-1-.4-1.4 0s-.4 1 0 1.4l.8.8-.9.9C10 2.5 8.6 2 7 2 3.1 2 0 5.1 0 9s3.1 7 7 7 7-3.1 7-7c0-1.6-.5-3-1.4-4.2l.9-.9.8.8c.2.2.4.3.7.3s.5-.1.7-.3c.4-.4.4-1 0-1.4l-3-3zM7 14c-2.8 0-5-2.2-5-5s2.2-5 5-5 5 2.2 5 5-2.2 5-5 5z"/><path data-color="color-2" d="M8 6H6v4h4V8H8z"/></g></g></symbol><symbol id="nc-undo" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path data-color="color-2" d="M2.502 12.333a6.996 6.996 0 0 1-1.405-3.168l1.973-.331a4.982 4.982 0 0 0 1.003 2.26l-1.571 1.239z"/><path data-color="color-2" d="M6.834 14.903a7.015 7.015 0 0 1-2.976-1.259l1.186-1.611c.624.459 1.358.77 2.122.898l-.332 1.972z"/><path data-color="color-2" d="M9.165 14.903l-.33-1.973a4.99 4.99 0 0 0 2.209-.964l1.219 1.586a6.997 6.997 0 0 1-3.098 1.351z"/><path fill="currentColor" d="M8 1c-1.873 0-3.65.759-4.948 2.052L.9.9.2 7.3l6.4-.7-2.135-2.135A5.023 5.023 0 0 1 8 3c2.757 0 5 2.243 5 5 0 1.06-.327 2.072-.947 2.928l1.621 1.173A6.96 6.96 0 0 0 15 8c0-3.86-3.141-7-7-7z"/></g></g></symbol><symbol id="nc-vertical" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M8 6.333h4.5L8 2 3.5 6.333h2.833z"/><path transform="matrix(1 0 0 -1 0 23.667)" d="M8 14h4.5L8 9.667 3.5 14h2.833z"/></g></g></g></symbol><symbol id="nc-check-small" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><polygon fill="currentColor" points="12.4,6 11,4.6 7,8.6 5,6.6 3.6,8 7,11.4 "/></g></g></symbol><symbol id="nc-circle-remove" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M11.5,10.1l-1.4,1.4L8,9.4l-2.1,2.1l-1.4-1.4L6.6,8 L4.5,5.9l1.4-1.4L8,6.6l2.1-2.1l1.4,1.4L9.4,8L11.5,10.1z"/></g></g></symbol><symbol id="nc-stre-down" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M8,12c-0.232,0-0.463-0.08-0.651-0.241l-7.759-6.65L0.892,3.59L8,9.683l7.108-6.093l1.302,1.519l-7.759,6.65 C8.463,11.92,8.232,12,8,12z"/></g></g></symbol><symbol id="nc-stre-up" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M15.108,12.41L8,6.317L0.892,12.41l-1.302-1.519l7.759-6.65c0.375-0.322,0.927-0.322,1.302,0l7.759,6.65 L15.108,12.41z"/></g></g></symbol><symbol id="nc-alert-circle-que" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M8,0C3.6,0,0,3.6,0,8s3.6,8,8,8s8-3.6,8-8S12.4,0,8,0z M8,13c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1s1,0.4,1,1 C9,12.6,8.6,13,8,13z M9.5,8.4C9,8.7,9,8.8,9,9v1H7V9c0-1.3,0.8-1.9,1.4-2.3C8.9,6.4,9,6.3,9,6c0-0.6-0.4-1-1-1 C7.6,5,7.3,5.2,7.1,5.5L6.6,6.4l-1.7-1l0.5-0.9C5.9,3.6,6.9,3,8,3c1.7,0,3,1.3,3,3C11,7.4,10.1,8,9.5,8.4z"/></g></g></symbol><symbol id="nc-grid-45" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M6,0H1C0.4,0,0,0.4,0,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1V1C7,0.4,6.6,0,6,0z"/> <path fill="currentColor" d="M15,0h-5C9.4,0,9,0.4,9,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1V1C16,0.4,15.6,0,15,0z"/> <path fill="currentColor" d="M6,9H1c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1v-5C7,9.4,6.6,9,6,9z"/> <path fill="currentColor" d="M15,9h-5c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1v-5C16,9.4,15.6,9,15,9z"/></g></g></symbol><symbol id="nc-bars" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><rect x="7" fill="currentColor" width="2" height="4"/> <rect x="10.243" y="2.757" transform="matrix(0.7071 -0.7071 0.7071 0.7071 0.929 9.7574)" opacity="0.9" fill="currentColor" width="4" height="2"/> <rect x="12" y="7" opacity="0.8" fill="currentColor" width="4" height="2"/> <rect x="11.243" y="10.243" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -5.0711 12.2427)" opacity="0.7" fill="currentColor" width="2" height="4"/> <rect x="7" y="12" opacity="0.6" fill="currentColor" width="2" height="4"/> <rect x="1.758" y="11.243" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -7.5564 6.2426)" opacity="0.5" fill="currentColor" width="4" height="2"/> <rect y="7" opacity="0.4" fill="currentColor" width="4" height="2"/> <rect x="2.757" y="1.758" transform="matrix(0.7071 -0.7071 0.7071 0.7071 -1.5563 3.7573)" opacity="0.3" fill="currentColor" width="2" height="4"/> </g></g></symbol><symbol id="nc-square-remove-09" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M15,0H1C0.4,0,0,0.4,0,1v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V1C16,0.4,15.6,0,15,0z M11.5,10.1l-1.4,1.4 L8,9.4l-2.1,2.1l-1.4-1.4L6.6,8L4.5,5.9l1.4-1.4L8,6.6l2.1-2.1l1.4,1.4L9.4,8L11.5,10.1z"/></g></g></symbol><symbol id="nc-paragraph" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M6,0H1C0.4,0,0,0.4,0,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1V1C7,0.4,6.6,0,6,0z"/> <path fill="currentColor" d="M6,9H1c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1v-5C7,9.4,6.6,9,6,9z"/> <rect data-color="color-2" x="9" y="1" width="7" height="2"/> <rect data-color="color-2" x="9" y="4" width="7" height="2"/> <rect data-color="color-2" x="9" y="10" width="7" height="2"/> <rect data-color="color-2" x="9" y="13" width="7" height="2"/></g></g></symbol><symbol id="nc-zoom-e" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M2,6H0V1c0-0.6,0.4-1,1-1h5v2H2V6z"/> <path fill="currentColor" d="M16,6h-2V2h-4V0h5c0.6,0,1,0.4,1,1V6z"/> <path fill="currentColor" d="M15,16h-5v-2h4v-4h2v5C16,15.6,15.6,16,15,16z"/> <path fill="currentColor" d="M6,16H1c-0.6,0-1-0.4-1-1v-5h2v4h4V16z"/></g></g></symbol><symbol id="nc-hourglass" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M15,2c0.6,0,1-0.4,1-1s-0.4-1-1-1H1C0.4,0,0,0.4,0,1s0.4,1,1,1h1c0.1,2.4,0.8,4.5,2,6c-1.2,1.4-2,3.6-2,6H1 c-0.6,0-1,0.4-1,1s0.4,1,1,1h14c0.6,0,1-0.4,1-1s-0.4-1-1-1h-1c-0.1-2.5-0.8-4.6-2-6c1.3-1.5,2-3.6,2-6H15z M9.9,7.3L9,8.1l1,0.7 c1.2,0.9,2,2.9,2.1,5.2H4c0.1-2.3,0.9-4.3,2.1-5.2l1-0.7L6.1,7.3C4.8,6.1,4.1,4.2,4,2h8C11.9,4.2,11.2,6.1,9.9,7.3z"/></g></g></symbol><symbol id="nc-share-2" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M12,6c1.654,0,3-1.346,3-3s-1.346-3-3-3S9,1.346,9,3c0,0.223,0.029,0.439,0.075,0.649l-3.22,2.012 C5.343,5.254,4.704,5,4,5C2.346,5,1,6.346,1,8s1.346,3,3,3c0.704,0,1.343-0.254,1.855-0.661l3.22,2.012C9.029,12.561,9,12.777,9,13 c0,1.654,1.346,3,3,3s3-1.346,3-3s-1.346-3-3-3c-0.704,0-1.343,0.254-1.855,0.661l-3.22-2.012C6.971,8.439,7,8.223,7,8 S6.971,7.561,6.925,7.351l3.22-2.012C10.657,5.746,11.296,6,12,6z"/></g></g></symbol><symbol id="nc-form" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path data-color="color-2" d="M15,16H9c-0.552,0-1-0.448-1-1v-1c0-0.552,0.448-1,1-1h6c0.552,0,1,0.448,1,1v1 C16,15.552,15.552,16,15,16z"/> <path fill="currentColor" d="M15,0H1C0.448,0,0,0.448,0,1v9c0,0.552,0.448,1,1,1h14c0.552,0,1-0.448,1-1V1C16,0.448,15.552,0,15,0z M14,9 H2V4h12V9z"/></g></g></symbol><symbol id="nc-circle-remove-2" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><circle fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="8.5" cy="8.5" r="7"/><line data-color="color-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="11.5" y1="5.5" x2="5.5" y2="11.5"/><line data-color="color-2" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="5.5" y1="5.5" x2="11.5" y2="11.5"/></g></g></symbol><symbol id="nc-eye-ban-18" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M14.6,5.6l-8.2,8.2C6.9,13.9,7.5,14,8,14c3.6,0,6.4-3.1,7.6-4.9c0.5-0.7,0.5-1.6,0-2.3 C15.4,6.5,15,6.1,14.6,5.6z"/> <path fill="currentColor" d="M14.3,0.3L11.6,3C10.5,2.4,9.3,2,8,2C4.4,2,1.6,5.1,0.4,6.9c-0.5,0.7-0.5,1.6,0,2.2c0.5,0.8,1.4,1.8,2.4,2.7 l-2.5,2.5c-0.4,0.4-0.4,1,0,1.4C0.5,15.9,0.7,16,1,16s0.5-0.1,0.7-0.3l14-14c0.4-0.4,0.4-1,0-1.4S14.7-0.1,14.3,0.3z M5.3,9.3 C5.1,8.9,5,8.5,5,8c0-1.7,1.3-3,3-3c0.5,0,0.9,0.1,1.3,0.3L5.3,9.3z"/></g></g></symbol><symbol id="nc-eye-17" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><path fill="currentColor" d="M8,14c3.6,0,6.4-3.1,7.6-4.9c0.5-0.7,0.5-1.6,0-2.3C14.4,5.1,11.6,2,8,2C4.4,2,1.6,5.1,0.4,6.9 c-0.5,0.7-0.5,1.6,0,2.2C1.6,10.9,4.4,14,8,14z M8,5c1.7,0,3,1.3,3,3s-1.3,3-3,3S5,9.7,5,8S6.3,5,8,5z"/></g></g></symbol><symbol id="nc-drag" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" d="M16 8l-3-3v2H9V3h2L8 0 5 3h2v4H3V5L0 8l3 3V9h4v4H5l3 3 3-3H9V9h4v2z"/></g></g></symbol><symbol id="nc-small" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M8.01 13.004c2.598 0 3.876-1.336 3.876-3.107 0-3.616-5.561-2.585-5.561-4.11 0-.58.494-.958 1.365-.958.987 0 2.032.334 2.816 1.06l1.147-1.539C10.695 3.465 9.418 3 7.88 3c-2.28 0-3.674 1.336-3.674 2.947 0 3.645 5.576 2.469 5.576 4.153 0 .566-.538 1.074-1.685 1.074a4.255 4.255 0 0 1-3.078-1.321l-1.132 1.612c.915.914 2.25 1.539 4.123 1.539z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-medium" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1" d="M13.544 13V3h-3.067L7.992 9.288 5.508 3H2.456v10h2.178V5.731L7.517 13h.95l2.884-7.269V13z"/></g></g></symbol><symbol id="nc-large" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1" d="M11.392 13v-2.06H6.94V3H4.683v10z"/></g></g></symbol><symbol id="nc-16" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M1.014 3.1h3.934v9.8H3.072V4.752H1.014z"/><path d="M13.111 4.703a4.159 4.159 0 0 0-1.141-.161c-.877 0-1.538.294-1.981.882-.443.588-.651 1.39-.623 2.408a2.46 2.46 0 0 1 1.029-.973c.434-.22.95-.329 1.547-.329.97 0 1.74.285 2.31.854.57.57.854 1.33.854 2.282 0 .672-.145 1.258-.434 1.757-.29.5-.698.884-1.225 1.155-.527.27-1.141.406-1.841.406-.83 0-1.55-.191-2.156-.574-.607-.383-1.071-.933-1.393-1.652-.322-.719-.483-1.577-.483-2.576 0-1.036.175-1.944.525-2.723.35-.78.847-1.381 1.491-1.806.644-.425 1.4-.637 2.268-.637.504 0 1.024.068 1.561.203a5.43 5.43 0 0 1 1.407.553l-.714 1.4a3.245 3.245 0 0 0-1.001-.469zM10.15 8.476a1.603 1.603 0 0 0-.518 1.246c-.01.28.056.548.196.805s.352.467.637.63c.285.163.637.245 1.057.245.56 0 1.008-.154 1.344-.462.336-.308.504-.737.504-1.288 0-.513-.161-.922-.483-1.225-.322-.303-.758-.455-1.309-.455-.597 0-1.073.168-1.428.504z"/></g></g></g></symbol><symbol id="nc-24" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M7.784 11.262V12.9H.532v-1.358l3.696-3.808c.355-.355.64-.705.854-1.05.215-.345.322-.644.322-.896a.968.968 0 0 0-.42-.833c-.28-.2-.667-.301-1.162-.301-.43 0-.887.107-1.372.322a5.256 5.256 0 0 0-1.372.896L.336 4.43a7.256 7.256 0 0 1 1.827-1.043 5.3 5.3 0 0 1 1.925-.371c.644 0 1.213.103 1.708.308.495.205.88.497 1.155.875s.413.814.413 1.309c0 .476-.163.98-.49 1.512-.327.532-.784 1.106-1.372 1.722l-2.492 2.52h4.774z"/><path d="M15.71 8.98v1.61h-1.414v2.31H12.56v-2.31H7.87V9.204L11.062 3.1h1.806L9.872 8.98h2.688V6.712h1.736V8.98z"/></g></g></g></symbol><symbol id="nc-32" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M6.867 8.014c.537.467.805 1.078.805 1.834 0 .616-.159 1.16-.476 1.631-.317.471-.77.84-1.358 1.106-.588.266-1.274.399-2.058.399-.663 0-1.318-.1-1.967-.301-.649-.2-1.202-.469-1.659-.805l.742-1.456a4.321 4.321 0 0 0 2.758 1.008c.681 0 1.216-.14 1.603-.42.387-.28.581-.658.581-1.134 0-.485-.191-.856-.574-1.113-.383-.257-.929-.385-1.638-.385H2.142V7.244l2.632-2.548H.644L.63 3.1h6.552v1.162l-2.996 2.87.518.056c.905.084 1.626.36 2.163.826z"/><path d="M15.556 11.262V12.9H8.304v-1.358L12 7.734c.355-.355.64-.705.854-1.05.215-.345.322-.644.322-.896a.968.968 0 0 0-.42-.833c-.28-.2-.667-.301-1.162-.301-.43 0-.887.107-1.372.322a5.256 5.256 0 0 0-1.372.896L8.108 4.43a7.256 7.256 0 0 1 1.827-1.043 5.3 5.3 0 0 1 1.925-.371c.644 0 1.213.103 1.708.308.495.205.88.497 1.155.875s.413.814.413 1.309c0 .476-.163.98-.49 1.512-.327.532-.784 1.106-1.372 1.722l-2.492 2.52h4.774z"/></g></g></g></symbol><symbol id="nc-48" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="translate(0 3)" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M7.952 5.98v1.61H6.538V9.9H4.802V7.59H.112V6.204L3.304.1H5.11L2.114 5.98h2.688V3.712h1.736V5.98z"/><path d="M14.597.709c.593.462.889 1.09.889 1.883 0 .448-.121.854-.364 1.218a2.451 2.451 0 0 1-1.008.854c.579.215 1.034.541 1.365.98.331.439.497.943.497 1.512 0 .57-.154 1.069-.462 1.498-.308.43-.749.758-1.323.987-.574.229-1.244.343-2.009.343-.765 0-1.435-.114-2.009-.343-.574-.229-1.015-.553-1.323-.973-.308-.42-.462-.915-.462-1.484 0-.579.173-1.09.518-1.533.345-.443.821-.772 1.428-.987a2.715 2.715 0 0 1-1.071-.896 2.15 2.15 0 0 1-.385-1.246c0-.765.296-1.374.889-1.827.593-.453 1.393-.679 2.401-.679 1.027 0 1.836.231 2.429.693zM10.915 1.71c-.303.233-.455.56-.455.98 0 .42.152.747.455.98.303.233.726.35 1.267.35.541 0 .961-.117 1.26-.35.299-.233.448-.56.448-.98 0-.42-.15-.747-.448-.98-.299-.233-.719-.35-1.26-.35s-.964.117-1.267.35zm-.231 4.158c-.355.261-.532.63-.532 1.106 0 .485.177.863.532 1.134.355.27.854.406 1.498.406.635 0 1.132-.133 1.491-.399.36-.266.539-.642.539-1.127 0-.476-.18-.847-.539-1.113-.36-.266-.861-.399-1.505-.399-.635 0-1.13.13-1.484.392z"/></g></g></g></symbol><symbol id="nc-64" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="translate(.2 3)" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M5.537 1.703a4.159 4.159 0 0 0-1.141-.161c-.877 0-1.538.294-1.981.882-.443.588-.651 1.39-.623 2.408a2.46 2.46 0 0 1 1.029-.973c.434-.22.95-.329 1.547-.329.97 0 1.74.285 2.31.854.57.57.854 1.33.854 2.282 0 .672-.145 1.258-.434 1.757-.29.5-.698.884-1.225 1.155-.527.27-1.141.406-1.841.406-.83 0-1.55-.191-2.156-.574C1.269 9.027.805 8.477.483 7.758.161 7.039 0 6.181 0 5.182c0-1.036.175-1.944.525-2.723.35-.78.847-1.381 1.491-1.806.644-.425 1.4-.637 2.268-.637.504 0 1.024.068 1.561.203a5.43 5.43 0 0 1 1.407.553l-.714 1.4a3.245 3.245 0 0 0-1.001-.469zM2.576 5.476a1.603 1.603 0 0 0-.518 1.246c-.01.28.056.548.196.805s.352.467.637.63c.285.163.637.245 1.057.245.56 0 1.008-.154 1.344-.462.336-.308.504-.737.504-1.288 0-.513-.161-.922-.483-1.225-.322-.303-.758-.455-1.309-.455-.597 0-1.073.168-1.428.504z"/><path d="M15.724 5.98v1.61H14.31V9.9h-1.736V7.59h-4.69V6.204L11.076.1h1.806L9.886 5.98h2.688V3.712h1.736V5.98z"/></g></g></g></symbol><symbol id="nc-row" viewBox="0 0 16 17"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M14.77 0C15.507 0 16 .486 16 1.214v14.572c0 .728-.492 1.214-1.23 1.214H1.23C.493 17 0 16.514 0 15.786V1.214C0 .486.492 0 1.23 0h13.54zm-2 4H3.23C2.493 4 2 4.514 2 5.286v6.428C2 12.486 2.492 13 3.23 13h9.54c.738 0 1.23-.514 1.23-1.286V5.286C14 4.514 13.508 4 12.77 4z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-column" viewBox="0 0 16 17"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M14.77 0C15.507 0 16 .486 16 1.214v14.572c0 .728-.492 1.214-1.23 1.214H1.23C.493 17 0 16.514 0 15.786V1.214C0 .486.492 0 1.23 0h13.54zM12 13.77V3.23C12 2.493 11.486 2 10.714 2H5.286C4.514 2 4 2.492 4 3.23v10.54c0 .738.514 1.23 1.286 1.23h5.428c.772 0 1.286-.492 1.286-1.23z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-sound-cloud" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M2.777 5.974c-.279 0-.557.171-.557.343l-.279 4.628.279 3.086c0 .171.278.171.278.171.279 0 .279-.171.279-.171l.278-3.086V6.317c0-.172-.278-.343-.278-.343z"/><path d="M.945 8.209c-.25.008-.494.142-.49.267l-.132 3.382.328 2.24c.005.125.254.116.254.116.25-.009.245-.134.245-.134l.17-2.257-.117-3.373c-.004-.125-.258-.241-.258-.241z"/><path d="M6.57 14.202c.217 0 .434-.171.434-.343l.217-2.914-.217-7.2c0-.171-.217-.342-.433-.342-.217 0-.434.171-.434.342l-.216 7.2.216 2.914c0 .172.217.343.434.343z"/><path d="M4.53 14.202c.2 0 .4-.171.4-.343l.2-2.914-.2-6.342c0-.172-.2-.343-.4-.343s-.4.171-.4.343l-.2 6.342.2 2.914c0 .172.2.343.4.343z"/><path d="M13.084 7.517C13.87 4.35 12.37 1.86 9.502 1.86c-.497 0-.895.171-1.293.343-.2.171-.2.343-.2.514v11.142c0 .172.1.343.2.343h5.571c1.09 0 2.09-1.352 2.09-3.352 0-2-1-3-2.786-3.333z"/></g></g></g></symbol><symbol id="nc-progress" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" stroke="none" stroke-width="1" fill="none"><path d="M9 1H2c-.6 0-1 .4-1 1v12c0 .6.4 1 1 1h7V1z" fill="currentColor"/><path d="M4 1.61v12.749L14 14V2H4v-.39z" stroke="currentColor" stroke-width="2"/></g></g></g></symbol><symbol id="nc-counter" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm4 9H7V4h2v3h3v2z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-shortcode" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M5 3c.5 0 1-.5 1-1s-.448-1-1-1H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1c0-.552-.5-1-1-1h-.875C3.45 13 3 12.508 3 11.77V4.23C3 3.493 3.45 3 4.125 3H5z"/><path d="M11 3c-.5 0-1-.5-1-1s.448-1 1-1h4a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1h-4a1 1 0 0 1-1-1c0-.552.5-1 1-1h.875C12.55 13 13 12.508 13 11.77V4.23C13 3.493 12.55 3 11.875 3H11z"/></g></g></g></symbol><symbol id="nc-sidebar" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M15 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h14zm-5 10.77V4.23C10 3.493 9.486 3 8.714 3H3.286C2.514 3 2 3.492 2 4.23v7.54c0 .738.514 1.23 1.286 1.23h5.428C9.486 13 10 12.508 10 11.77z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-dark" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M14.2 9.047a6.381 6.381 0 0 1-1.554.194 5.799 5.799 0 0 1-5.823-5.823c0-.517.065-1.035.194-1.553.065-.194 0-.453-.194-.647s-.388-.258-.647-.194C3.136 1.93 1 4.777 1 7.947a7.097 7.097 0 0 0 7.117 7.118c3.17 0 6.018-2.135 6.859-5.241.064-.194 0-.453-.194-.647a.62.62 0 0 0-.583-.13z" fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-light" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill-rule="nonzero" fill="currentColor" stroke="none" stroke-width="1"><path d="M1.87 2.813l.943-.943 1.415 1.415-.943.943z"/><path d="M11.772 3.285l1.414-1.415.943.943-1.414 1.415z"/><path d="M11.772 12.715l.943-.943 1.415 1.415-.943.943z"/><path d="M1.87 13.187l1.415-1.415.943.943-1.415 1.415z"/><circle cx="8" cy="8" r="4.668"/><path d="M-.002 7.333h2v1.334h-2z"/><path d="M7.333-.002h1.334v2H7.333z"/><path d="M14.001 7.333h2v1.334h-2z"/><path d="M7.333 14.001h1.334v2H7.333z"/></g></g></g></symbol><symbol id="nc-wp-shortcode" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"><path d="M0 8c0 3.2 1.8 5.9 4.5 7.2L.7 4.7C.2 5.7 0 6.8 0 8z"/><path d="M13.4 7.6c0-1-.4-1.7-.7-2.2-.4-.7-.7-1.2-.7-1.9s.6-1.4 1.3-1.4h.1C12 .8 10.1 0 8 0 5.2 0 2.7 1.4 1.3 3.6c.2 0 2.7-.1 2.7-.1.4 0 .5.6.1.7 0 0-.4.1-.9.1L6 12.9l1.8-5.3-1.3-3.4c-.4 0-.8-.1-.8-.1-.4 0-.4-.7.1-.7 0 0 1.3.1 2.1.1s2.1-.1 2.1-.1c.4 0 .5.6.1.7 0 0-.4.1-.9.1l2.9 8.6.8-2.7c.2-1 .5-1.8.5-2.5z"/><path d="M8.1 8.7l-2.4 7c.8.2 1.5.3 2.3.3.9 0 1.8-.2 2.7-.5 0 0 0-.1-.1-.1L8.1 8.7z"/><path d="M15 4.2c0 .3.1.5.1.8 0 .8-.2 1.7-.6 2.9l-2.5 7c2.4-1.4 4-4 4-6.9 0-1.4-.4-2.7-1-3.8z"/></g></g></g></symbol><symbol id="nc-sndcloud-style-1" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><rect x="0" y="4" width="8" height="8" rx="1"/><rect x="10" y="7" width="1" height="5" rx=".5"/><rect x="9" y="9" width="1" height="3" rx=".5"/><rect x="13" y="8" width="1" height="4" rx=".5"/><rect x="11" y="8" width="1" height="4" rx=".5"/><rect x="12" y="6" width="1" height="6" rx=".5"/><rect x="14" y="7" width="1" height="5" rx=".5"/><rect x="15" y="9" width="1" height="3" rx=".5"/></g></g></g></symbol><symbol id="nc-sndcloud-style-2" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M3 2h10a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1zm1.5 6a.5.5 0 0 0-.5.5v4a.5.5 0 1 0 1 0v-4a.5.5 0 0 0-.5-.5zm-1 2a.5.5 0 0 0-.5.5v2a.5.5 0 1 0 1 0v-2a.5.5 0 0 0-.5-.5zm5 0a.5.5 0 0 0-.5.5v2a.5.5 0 1 0 1 0v-2a.5.5 0 0 0-.5-.5zm-3-1a.5.5 0 0 0-.5.5v3a.5.5 0 1 0 1 0v-3a.5.5 0 0 0-.5-.5zm1 1a.5.5 0 0 0-.5.5v2a.5.5 0 1 0 1 0v-2a.5.5 0 0 0-.5-.5zm5 0a.5.5 0 0 0-.5.5v2a.5.5 0 1 0 1 0v-2a.5.5 0 0 0-.5-.5zm1-1a.5.5 0 0 0-.5.5v3a.5.5 0 1 0 1 0v-3a.5.5 0 0 0-.5-.5zm-2 4a.5.5 0 0 0 .5-.5v-1a.5.5 0 1 0-1 0v1a.5.5 0 0 0 .5.5zm-1 0a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-1 0v4a.5.5 0 0 0 .5.5zm-2-4a.5.5 0 0 0-.5.5v3a.5.5 0 1 0 1 0v-3a.5.5 0 0 0-.5-.5z" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"/></g></g></symbol><symbol id="nc-circle-outline" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M8 1C4.15 1 1 4.15 1 8s3.15 7 7 7 7-3.15 7-7-3.15-7-7-7zm0 12.25c-2.888 0-5.25-2.363-5.25-5.25 0-2.888 2.362-5.25 5.25-5.25 2.887 0 5.25 2.362 5.25 5.25 0 2.887-2.363 5.25-5.25 5.25z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-diamond-outline" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M7.449 15.337L.497 8.386C.2 8.088.2 7.69.497 7.392L7.45.441c.298-.298.695-.298.993 0l6.951 6.951c.298.298.298.696 0 .994l-6.951 6.951c-.298.298-.695.298-.993 0zM2.8 7.889l5.144 5.144L13.09 7.89 7.945 2.745 2.801 7.889z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-dot" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M8 4C5.8 4 4 5.8 4 8s1.8 4 4 4 4-1.8 4-4-1.8-4-4-4z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-fade" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><g transform="translate(0 1)" fill-rule="nonzero" stroke="none" stroke-width="1" fill="none"><path fill="#FFF" d="M0 0h6v14H0z"/><path fill="#C6C8CC" opacity=".7" d="M9 0h3v14H9z"/><path d="M15.5 0a.5.5 0 0 1 .5.5v13a.5.5 0 1 1-1 0V.5a.5.5 0 0 1 .5-.5z" fill="#979AA1" opacity=".4"/></g></g></g></symbol><symbol id="nc-line" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd" d="M3 7h10v2H3z"/></g></g></symbol><symbol id="nc-none" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 2c1.3 0 2.5.4 3.5 1.1l-8.4 8.4C2.4 10.5 2 9.3 2 8c0-3.3 2.7-6 6-6zm0 12c-1.3 0-2.5-.4-3.5-1.1l8.4-8.4c.7 1 1.1 2.2 1.1 3.5 0 3.3-2.7 6-6 6z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-right-arrow-filled" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zM7 11.4L5.6 10l2-2-2-2L7 4.6 10.4 8 7 11.4z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-right-arrow-heavy" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M5.204 16L3 13.91 9.236 8 3 2.09 5.204 0l7.339 6.955c.61.578.61 1.512 0 2.09L5.204 16z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-right-arrow-outline" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"><path d="M7 11.4L5.6 10l2-2-2-2L7 4.6 10.4 8z"/><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm0 14c-3.3 0-6-2.7-6-6s2.7-6 6-6 6 2.7 6 6-2.7 6-6 6z"/></g></g></g></symbol><symbol id="nc-right-arrow-tail" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M15.787 7.496L10.182 2 9.153 3.008l4.364 4.279H.727A.72.72 0 0 0 0 8a.72.72 0 0 0 .727.713h12.79l-4.364 4.279L10.182 14l5.605-5.496a.703.703 0 0 0 0-1.008z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-right-arrow-thin" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M5.025 16L4 15.009 11.25 8 4 .991 5.025 0l7.762 7.504a.684.684 0 0 1 0 .992L5.025 16z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-slider-horizontal" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M1 1h14a1 1 0 0 1 1 1v1a1 1 0 0 1-2 0H2a1 1 0 1 1-2 0V2a1 1 0 0 1 1-1z"/><path d="M1 15h14a1 1 0 0 0 1-1v-1a1 1 0 0 0-2 0H2a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1z"/><path d="M3.929 7h2.285C6.648 7 7 7.448 7 8s-.352 1-.786 1H3.93v3L0 8l3.929-4v3z" fill-rule="nonzero"/><path d="M12.071 7H9.786C9.352 7 9 7.448 9 8s.352 1 .786 1h2.285v3L16 8l-3.929-4v3z" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-slider-vertical" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="rotate(90 8 8)" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M3 0h10a1 1 0 0 1 1 1v1a1 1 0 0 1-2 0H4a1 1 0 1 1-2 0V1a1 1 0 0 1 1-1z"/><path d="M3 16h10a1 1 0 0 0 1-1v-1a1 1 0 0 0-2 0H4a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1z"/><path d="M3.929 7h2.285C6.648 7 7 7.448 7 8s-.352 1-.786 1H3.93v3L0 8l3.929-4v3z" fill-rule="nonzero"/><path d="M12.071 7H9.786C9.352 7 9 7.448 9 8s.352 1 .786 1h2.285v3L16 8l-3.929-4v3z" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-slider" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><rect x="1" y="6" width="14" height="9" rx="1"/><rect x="3" y="3" width="10" height="2" rx="1"/><rect x="5" y="1" width="6" height="1" rx=".5"/></g></g></g></symbol><symbol id="nc-square-outline" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M14.125 15H1.875C1.35 15 1 14.65 1 14.125V1.875C1 1.35 1.35 1 1.875 1h12.25c.525 0 .875.35.875.875v12.25c0 .525-.35.875-.875.875zM2.75 13.25h10.5V2.75H2.75v10.5z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-align-horizontal" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><rect x="0" y="14" width="16" height="2" rx="1"/><rect x="3" y="6" width="10" height="4" rx="1"/><rect x="0" y="0" width="16" height="2" rx="1"/></g></g></g></symbol><symbol id="nc-align-vertical" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="rotate(90 8 8)" fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><rect x="0" y="14" width="16" height="2" rx="1"/><rect x="3" y="6" width="10" height="4" rx="1"/><rect x="0" y="0" width="16" height="2" rx="1"/></g></g></g></symbol><symbol id="nc-label-inside" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect fill="currentColor" x="3" y="7" width="7" height="2" rx="1"/><rect stroke="currentColor" stroke-width="2" x="1" y="4" width="14" height="8" rx="1"/></g></g></g></symbol><symbol id="nc-label-outside" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect fill="currentColor" x="1" y="2" width="7" height="2" rx="1"/><rect stroke="currentColor" stroke-width="2" x="1" y="6" width="14" height="7" rx="1"/></g></g></g></symbol><symbol id="nc-info" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M8 0C3.584 0 0 3.584 0 8s3.584 8 8 8 8-3.584 8-8-3.584-8-8-8zm.8 12H7.2V7.2h1.6V12zm0-6.4H7.2V4h1.6v1.6z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-back" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="rotate(-90 8 8)" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"><path d="M7 4v4h2V4h3L8 0 4 4z"/><path d="M15 0h-3v2h2v9H2V2h2V0H1C.4 0 0 .4 0 1v14c0 .6.4 1 1 1h14c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z"/></g></g></g></symbol><symbol id="nc-countdown" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M15 2c.6 0 1-.4 1-1s-.4-1-1-1H1C.4 0 0 .4 0 1s.4 1 1 1h1c.1 2.4.8 4.5 2 6-1.2 1.4-2 3.6-2 6H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1h-1c-.1-2.5-.8-4.6-2-6 1.3-1.5 2-3.6 2-6h1zM9.9 7.3l-.9.8 1 .7c1.2.9 2 2.9 2.1 5.2H4c.1-2.3.9-4.3 2.1-5.2l1-.7-1-.8C4.8 6.1 4.1 4.2 4 2h8c-.1 2.2-.8 4.1-2.1 5.3z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-counter-outline" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"><path d="M6.6 6.6c-.8.8-.8 2 0 2.8.8.8 2 .8 2.8 0 .8-.8 5-7.8 5-7.8s-7 4.2-7.8 5z"/><path d="M8 16c4.4 0 8-3.6 8-8 0-.6-.4-1-1-1s-1 .4-1 1c0 3.3-2.7 6-6 6s-6-2.7-6-6 2.7-6 6-6c.6 0 1-.4 1-1s-.4-1-1-1C3.6 0 0 3.6 0 8s3.6 8 8 8z"/></g></g></g></symbol><symbol id="nc-form-left" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M2 9V4h12v5l2 1V1a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V9H2z" fill-rule="nonzero"/><rect x="0" y="13" width="8" height="3" rx="1.5"/></g></g></g></symbol><symbol id="nc-full-cube" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g transform="translate(.5)" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"><path d="M7.5 6l7-3L7.792.057c-.219-.076-.438-.076-.584 0L.5 3l7 3z"/><path d="M8 7v9l6.533-2.775c.311-.15.467-.375.467-.675V4L8 7z"/><path d="M7 7L0 4v8.55c0 .3.156.6.467.675L7 16V7z"/></g></g></g></symbol><symbol id="nc-save-section" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M14.682 2.318a4.5 4.5 0 0 0-6.364 0c-.121.121-.214.259-.318.389-.104-.13-.197-.268-.318-.389a4.5 4.5 0 0 0-6.364 6.364L8 15l6.682-6.318a4.5 4.5 0 0 0 0-6.364z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-extensions" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M15 0c.6 0 1 .4 1 1v11c0 .6-.4 1-1 1h-3.6l-2.7 2.7c-.2.2-.4.3-.7.3-.3 0-.5-.1-.7-.3L4.6 13H1c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1h14zM4 4a1 1 0 1 0 0 2h8a1 1 0 0 0 0-2H4zm2 4a1 1 0 1 0 0 2h4a1 1 0 0 0 0-2H6z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-failure" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M14.7 1.3c-.4-.4-1-.4-1.4 0L8 6.6 2.7 1.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4L6.6 8l-5.3 5.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3L8 9.4l5.3 5.3c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L9.4 8l5.3-5.3c.4-.4.4-1 0-1.4z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-check-color" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8z" fill="#22AFDA" fill-rule="nonzero"/><path fill="#2B3039" d="M7 11.4L3.6 8 5 6.6l2 2 4-4L12.4 6z"/></g></g></g></symbol><symbol id="nc-success" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M14.3 2.3L5 11.6 1.7 8.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4l4 4c.2.2.4.3.7.3.3 0 .5-.1.7-.3l10-10c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-brizy-logo-outline" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M1.767 5.424L8.14 9.76l6.093-4.305L7.86 1.21 1.767 5.424z" stroke="currentColor" stroke-width="2"/><path fill="currentColor" d="M0 10.457L2.113 8.84 8.151 13l5.836-4.045L16 10.457l-7.85 5.431z"/></g></g></g></symbol><symbol id="nc-brizy-logo" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g fill="currentColor" stroke="none" stroke-width="1" fill-rule="evenodd"><path d="M0 5.43L7.85 0 16 5.43l-7.85 5.547z"/><path d="M0 10.457L2.113 8.84 8.151 13l5.836-4.045L16 10.457l-7.85 5.431z"/></g></g></g></symbol><symbol id="nc-circle-02" viewBox="0 0 16 16"><g><g class="nc-loop_circle-02-16" transform="rotate(359.71071426823204 8 8)"><path opacity="0.4" fill="currentColor" d="M8,16c-4.4111328,0-8-3.5888672-8-8s3.5888672-8,8-8s8,3.5888672,8,8S12.4111328,16,8,16z M8,2C4.6914062,2,2,4.6914062,2,8s2.6914062,6,6,6s6-2.6914062,6-6S11.3085938,2,8,2z"/><path data-color="color-2" d="M16,8h-2c0-3.3085938-2.6914062-6-6-6V0C12.4111328,0,16,3.5888672,16,8z"/></g><script>!function(){function t(t){this.element=t,this.animationId,this.start=null,this.init()}if(!window.requestAnimationFrame){var i=null;window.requestAnimationFrame=function(t,n){var e=(new Date).getTime();i||(i=e);var a=Math.max(0,16-(e-i)),o=window.setTimeout(function(){t(e+a)},a);return i=e+a,o}}t.prototype.init=function(){var t=this;this.animationId=window.requestAnimationFrame(t.triggerAnimation.bind(t))},t.prototype.reset=function(){var t=this;window.cancelAnimationFrame(t.animationId)},t.prototype.triggerAnimation=function(t){var i=this;this.start||(this.start=t);var n=t-this.start;504>n||(this.start=this.start+504),this.element.setAttribute("transform","rotate("+Math.min(n/1.4,360)+" 8 8)");if(document.documentElement.contains(this.element))window.requestAnimationFrame(i.triggerAnimation.bind(i))};var n=document.getElementsByClassName("nc-loop_circle-02-16"),e=[];if(n)for(var a=0;n.length>a;a++)!function(i){e.push(new t(n[i]))}(a);document.addEventListener("visibilitychange",function(){"hidden"==document.visibilityState?e.forEach(function(t){t.reset()}):e.forEach(function(t){t.init()})})}();</script></g></symbol><symbol id="nc-tabs" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="tabs" fill="currentColor"><rect id="Rectangle" x="9" y="2" width="6" height="2" rx="1"/><path d="M2 1h5a1 1 0 0 1 1 1v3h6a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H2a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1z" id="Rectangle-6"/></g></g></g></g></symbol><symbol id="nc-update" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Update" fill="currentColor" fill-rule="nonzero"><g id="file-upload-86" transform="translate(0 1)"><path id="Shape" transform="matrix(1 0 0 -1 0 9)" d="M7 4v5h2V4h3L8 0 4 4z"/><path d="M15 0h-3v2h2v10H2V2h2V0H1C.4 0 0 .4 0 1v12c0 .6.4 1 1 1h14c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1z" id="Shape"/></g></g></g></g></g></symbol><symbol id="nc-background" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="background-v4" fill="currentColor" fill-rule="nonzero"><path d="M15 0c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1H1c-.6 0-1-.4-1-1V1c0-.6.4-1 1-1h14zM2 2.013v11.188c0 .48.32.799.8.799h11.187C11 11 4 4 2 2.013z" id="Combined-Shape" transform="rotate(180 8 8)"/></g></g></g></g></symbol><symbol id="nc-woo" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><path d="M2 2h11.997C15 2 16 3 16 4v8c0 1-1 1.954-2.003 1.954H9.838l.641 1.57-2.82-1.57H2C1 13.954 0 13 0 12V4c0-1 1-2 2-2zm11.848 3.626a1.708 1.708 0 0 0-.352-.039c-.624 0-1.131.325-1.528.976a3.446 3.446 0 0 0-.507 1.834c0 .5.104.93.312 1.288.234.41.579.656 1.04.754.124.026.241.04.352.04.63 0 1.138-.326 1.528-.977.338-.559.508-1.17.508-1.84.006-.508-.104-.93-.313-1.282a1.498 1.498 0 0 0-1.04-.754zm-.274 3.519c-.188.169-.364.24-.526.208-.156-.033-.287-.17-.384-.423a1.65 1.65 0 0 1-.117-.592c0-.162.013-.325.045-.475.059-.266.17-.526.345-.774.215-.318.442-.448.677-.403.156.033.286.17.383.423.078.202.117.403.117.592 0 .169-.013.332-.045.481-.091.43-.254.748-.495.963zM9.777 5.626a1.708 1.708 0 0 0-.351-.039c-.624 0-1.132.325-1.529.976a3.446 3.446 0 0 0-.507 1.834c0 .5.104.93.312 1.288.235.41.58.656 1.041.754.124.026.24.04.351.04.631 0 1.138-.326 1.529-.977.338-.559.507-1.17.507-1.84 0-.508-.104-.93-.312-1.282a1.512 1.512 0 0 0-1.04-.754zm-.28 3.519c-.188.169-.364.24-.526.208-.156-.033-.287-.17-.384-.423a1.652 1.652 0 0 1-.117-.592c0-.162.013-.325.045-.475.059-.266.17-.526.345-.774.215-.318.442-.448.677-.403.156.033.286.17.383.423.078.202.117.403.117.592.007.169-.013.332-.045.481-.091.43-.254.748-.495.963zM1.321 5.158c-.182.013-.319.078-.41.201a.554.554 0 0 0-.104.436c.384 2.44.742 4.085 1.073 4.937.13.312.28.462.456.449.273-.02.598-.397.982-1.132.201-.416.513-1.04.936-1.873.351 1.229.833 2.152 1.438 2.77.169.176.344.254.513.241a.42.42 0 0 0 .345-.234.772.772 0 0 0 .078-.43c-.039-.591.02-1.417.182-2.477.17-1.093.378-1.88.631-2.348a.565.565 0 0 0 .065-.313.51.51 0 0 0-.201-.37.565.565 0 0 0-.41-.13.5.5 0 0 0-.43.286c-.403.735-.689 1.925-.858 3.577a12.155 12.155 0 0 1-.618-2.224c-.071-.384-.247-.566-.533-.547-.195.013-.358.143-.488.39L2.544 9.08a37.294 37.294 0 0 1-.657-3.454c-.046-.338-.234-.494-.566-.468z" fill="currentColor" fill-rule="nonzero" stroke="none" stroke-width="1"/></g></g></symbol><symbol id="nc-toggle" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="toggle" fill="currentColor"><path d="M2 14V9h12v5l2 1V6a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1v9a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-1H2z" id="Shape" fill-rule="nonzero"/><rect id="Rectangle" x="0" y="0" width="16" height="3" rx="1"/></g></g></g></g></symbol><symbol id="nc-sticky-menu" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="menu" fill="currentColor"><path d="M16 6H0V1.282C0 .836.046.675.134.512A.909.909 0 0 1 .512.134C.675.046.836 0 1.282 0h13.436c.446 0 .607.046.77.134.163.087.291.215.378.378.088.163.134.324.134.77V6zm0 2v6.718c0 .446-.046.607-.134.77a.909.909 0 0 1-.378.378c-.163.088-.324.134-.77.134H1.282c-.446 0-.607-.046-.77-.134a.909.909 0 0 1-.378-.378c-.088-.163-.134-.324-.134-.77V8h2v4.718c0 .446.046.607.134.77.087.163.215.291.378.378.163.088.324.134.77.134h9.436c.446 0 .607-.046.77-.134a.909.909 0 0 0 .378-.378c.088-.163.134-.324.134-.77V8h2z" id="Combined-Shape"/></g></g></g></g></symbol><symbol id="nc-img" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="background-v3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M15 0H1C.4 0 0 .4 0 1v14c0 .6.4 1 1 1h14c.6 0 1-.4 1-1V1c0-.6-.4-1-1-1zM6 4c.6 0 1 .4 1 1s-.4 1-1 1-1-.4-1-1 .4-1 1-1zm-3 8l2-4 2 2 3-4 3 6H3z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-banner" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="banner" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M13 6l2-5H3c0-.6-.4-1-1-1S1 .4 1 1v14c0 .6.4 1 1 1s1-.4 1-1v-4h12l-2-5z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-down" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="down" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Shape-Copy" fill="currentColor" fill-rule="nonzero" d="M13.05 8.975L12 7.925 8.775 11.15V2h-1.5v9.15L4.05 7.925 3 8.975 8.025 14z"/></g></g></g></symbol><symbol id="nc-up" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="up" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Shape" fill="currentColor" fill-rule="nonzero" transform="matrix(1 0 0 -1 0 16)" d="M13.05 8.975L12 7.925 8.775 11.15V2h-1.5v9.15L4.05 7.925 3 8.975 8.025 14z"/></g></g></g></symbol><symbol id="nc-woo-2" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="woo-element" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M2 0h11.997C15 0 16 1 16 2v10c0 1-1 1.954-2.003 1.954H9.838l.641 1.57-2.82-1.57H2C1 13.954 0 13 0 12V2c0-1 1-2 2-2zm11.848 4.626a1.708 1.708 0 0 0-.352-.039c-.624 0-1.131.325-1.528.976a3.446 3.446 0 0 0-.507 1.834c0 .5.104.93.312 1.288.234.41.579.656 1.04.754.124.026.241.04.352.04.63 0 1.138-.326 1.528-.977.338-.559.508-1.17.508-1.84.006-.508-.104-.93-.313-1.282a1.498 1.498 0 0 0-1.04-.754zm-.274 3.519c-.188.169-.364.24-.526.208-.156-.033-.287-.17-.384-.423a1.65 1.65 0 0 1-.117-.592c0-.162.013-.325.045-.475.059-.266.17-.526.345-.774.215-.318.442-.448.677-.403.156.033.286.17.383.423.078.202.117.403.117.592 0 .169-.013.332-.045.481-.091.43-.254.748-.495.963zM9.777 4.626a1.708 1.708 0 0 0-.351-.039c-.624 0-1.132.325-1.529.976a3.446 3.446 0 0 0-.507 1.834c0 .5.104.93.312 1.288.235.41.58.656 1.041.754.124.026.24.04.351.04.631 0 1.138-.326 1.529-.977.338-.559.507-1.17.507-1.84 0-.508-.104-.93-.312-1.282a1.512 1.512 0 0 0-1.04-.754zm-.28 3.519c-.188.169-.364.24-.526.208-.156-.033-.287-.17-.384-.423a1.652 1.652 0 0 1-.117-.592c0-.162.013-.325.045-.475.059-.266.17-.526.345-.774.215-.318.442-.448.677-.403.156.033.286.17.383.423.078.202.117.403.117.592.007.169-.013.332-.045.481-.091.43-.254.748-.495.963zM1.321 4.158c-.182.013-.319.078-.41.201a.554.554 0 0 0-.104.436c.384 2.44.742 4.085 1.073 4.937.13.312.28.462.456.449.273-.02.598-.397.982-1.132.201-.416.513-1.04.936-1.873.351 1.229.833 2.152 1.438 2.77.169.176.344.254.513.241a.42.42 0 0 0 .345-.234.772.772 0 0 0 .078-.43c-.039-.591.02-1.417.182-2.478.17-1.092.378-1.88.631-2.347a.565.565 0 0 0 .065-.313.51.51 0 0 0-.201-.37.565.565 0 0 0-.41-.13.5.5 0 0 0-.43.286c-.403.735-.689 1.925-.858 3.577a12.155 12.155 0 0 1-.618-2.224c-.071-.384-.247-.566-.533-.547-.195.013-.358.143-.488.39L2.544 8.08a37.294 37.294 0 0 1-.657-3.454c-.046-.338-.234-.494-.566-.468z" id="Combined-Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-block-switch" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="block-switch" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M15.716 7.503l-3.428-6A.996.996 0 0 0 11.42 1H4.58a.999.999 0 0 0-.869.504l-3.429 6a.998.998 0 0 0 0 .992l3.43 6a.999.999 0 0 0 .867.503h6.84c.358 0 .69-.192.867-.504l3.43-6a.998.998 0 0 0 0-.991zM8.002 11a3 3 0 1 1 0-6 3 3 0 0 1 0 6z" id="Shape" fill="currentColor" fill-rule="nonzero" transform="rotate(90 8 8)"/></g></g></g></symbol><symbol id="nc-extensions-2" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="apps" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M10.8 0a1.4 1.4 0 0 0-1.4 1.4v3.69H6.6V1.4a1.4 1.4 0 1 0-2.8 0v3.69H2a1 1 0 0 0-1 1v3.092C1 12.947 4.134 16 8 16s7-3.053 7-6.818V6.09a1 1 0 0 0-1-1h-1.8V1.4A1.4 1.4 0 0 0 10.8 0z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-global" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="global" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M8 0C3.6 0 0 3.6 0 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm5.9 7H12c-.1-1.5-.4-2.9-.8-4.1 1.4.9 2.4 2.4 2.7 4.1zM8 14c-.6 0-1.8-1.9-2-5h4c-.2 3.1-1.4 5-2 5zM6 7c.2-3.1 1.3-5 2-5s1.8 1.9 2 5H6zM4.9 2.9C4.4 4.1 4.1 5.5 4 7H2.1c.3-1.7 1.3-3.2 2.8-4.1zM2.1 9H4c.1 1.5.4 2.9.8 4.1-1.4-.9-2.4-2.4-2.7-4.1zm9 4.1c.5-1.2.7-2.6.8-4.1h1.9c-.2 1.7-1.2 3.2-2.7 4.1z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-arrow-left" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="arrow-left" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Shape" fill="currentColor" fill-rule="nonzero" transform="matrix(-1 0 0 1 16 0)" d="M9.3 1.31l-1.4 1.4 4.3 4.3H0v2h12.2l-4.3 4.3 1.4 1.4 6.7-6.7z"/></g></g></g></symbol><symbol id="nc-blur" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="blur" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M2.947 8.842a.845.845 0 0 0-.842.842c0 .463.38.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm0 3.369a.845.845 0 0 0-.842.842c0 .463.38.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm0-6.737a.845.845 0 0 0-.842.842c0 .463.38.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm-2.526.42A.422.422 0 0 0 0 6.317c0 .231.19.42.421.42.232 0 .421-.189.421-.42a.422.422 0 0 0-.42-.421zm2.526-3.789a.845.845 0 0 0-.842.842c0 .464.38.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zM15.58 6.737c.232 0 .421-.19.421-.421a.422.422 0 0 0-.421-.421.422.422 0 0 0-.421.42c0 .232.19.422.42.422zM9.684 3.789a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842.845.845 0 0 0-.842.842c0 .464.38.842.842.842zm0-2.947c.232 0 .421-.19.421-.42A.422.422 0 0 0 9.685 0a.422.422 0 0 0-.422.421c0 .232.19.421.421.421zM.421 9.263A.422.422 0 0 0 0 9.684c0 .232.19.421.421.421.232 0 .421-.19.421-.42a.422.422 0 0 0-.42-.422zm5.895 5.895a.422.422 0 0 0-.421.42c0 .233.19.422.42.422.232 0 .422-.19.422-.421a.422.422 0 0 0-.421-.421zm0-14.316c.231 0 .42-.19.42-.42A.422.422 0 0 0 6.317 0a.422.422 0 0 0-.421.421c0 .232.19.421.42.421zm0 2.947a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842.845.845 0 0 0-.842.842c0 .464.379.842.842.842zm0 4.632c-.7 0-1.263.564-1.263 1.263 0 .7.564 1.263 1.263 1.263s1.263-.564 1.263-1.263-.564-1.263-1.263-1.263zm6.737.421a.845.845 0 0 0-.842.842c0 .463.378.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm0 3.369a.845.845 0 0 0-.842.842c0 .463.378.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm0-6.737a.845.845 0 0 0-.842.842c0 .463.378.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm0-3.369a.845.845 0 0 0-.842.842c0 .464.378.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm2.526 7.158a.422.422 0 0 0-.421.421c0 .232.19.421.42.421.233 0 .422-.19.422-.42a.422.422 0 0 0-.421-.422zm-5.895 2.948a.845.845 0 0 0-.842.842c0 .463.38.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm0 2.947a.422.422 0 0 0-.42.42c0 .233.189.422.42.422.232 0 .421-.19.421-.421a.422.422 0 0 0-.42-.421zM6.316 5.053c-.7 0-1.263.564-1.263 1.263s.564 1.263 1.263 1.263 1.263-.564 1.263-1.263c0-.7-.564-1.263-1.263-1.263zm0 7.158a.845.845 0 0 0-.842.842c0 .463.379.842.842.842a.845.845 0 0 0 .842-.842.845.845 0 0 0-.842-.842zm3.368-3.79c-.699 0-1.263.564-1.263 1.263 0 .7.564 1.263 1.263 1.263.7 0 1.263-.564 1.263-1.263s-.564-1.263-1.263-1.263zm0-3.368c-.699 0-1.263.564-1.263 1.263s.564 1.263 1.263 1.263c.7 0 1.263-.564 1.263-1.263 0-.7-.564-1.263-1.263-1.263z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-dynamic" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="dynamic" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M8 1c-3.35 0-7 .64-7 2 0 1.36 3.65 2 7 2s7-.64 7-2c0-1.36-3.65-2-7-2z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M8 6.574C5.3 6.574 2.45 6.13 1 5v2.541C1 9.213 4.65 10 8 10s7-.787 7-2.459V5c-1.45 1.131-4.3 1.574-7 1.574z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M8 11.574c-2.7 0-5.55-.443-7-1.574v2.541C1 14.213 4.65 15 8 15s7-.787 7-2.459V10c-1.45 1.131-4.3 1.574-7 1.574z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-bug" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="bug" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M16 4V3h-2v1c0 .6-.4 1-1 1h-1c-.3-.4-.6-.7-1-1V3c0-1.7-1.3-3-3-3S5 1.3 5 3v1c-.4.3-.7.6-1 1H3c-.6 0-1-.4-1-1V3H0v1c0 1.7 1.3 3 3 3h.1c-.1.3-.1.7-.1 1H0v2h3v1c-1.7 0-3 1.3-3 3v1h2v-1c0-.6.4-1 1-1h.4c.8 1.8 2.6 3 4.6 3 2 0 3.8-1.2 4.6-3h.4c.6 0 1 .4 1 1v1h2v-1c0-1.7-1.3-3-3-3v-1h3V8h-3c0-.3 0-.7-.1-1h.1c1.7 0 3-1.3 3-3z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-page" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="page" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Shape" fill="currentColor" fill-rule="nonzero" d="M11 16v-4h4z"/><path d="M9 10h6V1c0-.6-.4-1-1-1H2c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h7v-6z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-blocks" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="slider" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect id="Rectangle-3" fill="currentColor" x="1" y="6" width="14" height="9" rx="1"/><rect id="Rectangle-3" fill="currentColor" x="3" y="3" width="10" height="2" rx="1"/><rect id="Rectangle-3" fill="currentColor" x="5" y="1" width="6" height="1" rx=".5"/></g></g></g></symbol><symbol id="nc-pages" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="pages" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M10 4H2c-.6 0-1 .4-1 1v10c0 .6.4 1 1 1h8c.6 0 1-.4 1-1V5c0-.6-.4-1-1-1z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M14 0H4v2h9v11h2V1c0-.6-.4-1-1-1z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-popup" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="popup" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M8 13H2V5h12v3h2V2a1 1 0 0 0-1-1H1a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h7v-2z" id="Shape" fill="currentColor" fill-rule="nonzero"/><rect id="Rectangle" fill="currentColor" fill-rule="nonzero" x="12" y="11" width="4" height="4" rx="1"/></g></g></g></symbol><symbol id="nc-gallery" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="gallery" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M6 9H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M6 16H1a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M15 6h-5a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v4a1 1 0 0 1-1 1z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M15 16h-5a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h5a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-dynamic-img" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="dynamic-img" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M14 7.707v6.416c0 .509-.491.848-1 .848H.848c-.509 0-.848-.34-.848-.848V2c0-.509.491-1 1-1h7.856A4.486 4.486 0 0 0 14 7.707zM5.142 4.663c-.508 0-.847.339-.847.847 0 .509.339.848.847.848.509 0 .848-.34.848-.848s-.34-.847-.848-.847zm-2.656 6.894h8.363l-2.509-5.2-2.508 3.467L4.159 8.09l-1.673 3.466zM12.625 6.75a3.375 3.375 0 1 1 0-6.75 3.375 3.375 0 0 1 0 6.75zm.08-4.878c-.727 0-1.518.143-1.518.446 0 .304.791.447 1.518.447.726 0 1.518-.143 1.518-.447 0-.303-.792-.446-1.518-.446zm0 1.23c-.586 0-1.204-.095-1.518-.337v.544c0 .359.791.527 1.518.527.726 0 1.518-.168 1.518-.527v-.544c-.314.242-.933.337-1.518.337zm0 1.072c-.586 0-1.204-.095-1.518-.338v.545c0 .358.791.527 1.518.527.726 0 1.518-.169 1.518-.527v-.545c-.314.243-.933.338-1.518.338z" id="Image-dinamic" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-dynamic-text" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="dynamic-text" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M14 7.598V14c0 .5-.5 1-1 1H1c-.5 0-1-.5-1-1V2c0-.5.5-1 1-1h7.956a4.397 4.397 0 0 0-.644 3.062H2.93v2.184h.548l.397-.79a.549.549 0 0 1 .49-.302h1.855v6.16a.546.546 0 0 1-.375.518l-1.27.422v.546H8.963v-.546l-1.27-.422a.546.546 0 0 1-.375-.518v-6.16h1.311A4.418 4.418 0 0 0 14 7.598zm-1.323-.952a3.323 3.323 0 1 1 0-6.646 3.323 3.323 0 0 1 0 6.646zm.079-4.803c-.716 0-1.495.14-1.495.44 0 .299.78.44 1.495.44.715 0 1.494-.141 1.494-.44 0-.3-.779-.44-1.494-.44zm0 1.211c-.577 0-1.185-.093-1.495-.332v.536c0 .353.78.52 1.495.52.715 0 1.494-.167 1.494-.52v-.536c-.31.239-.918.332-1.494.332zm0 1.055c-.577 0-1.185-.093-1.495-.332v.537c0 .352.78.518 1.495.518.715 0 1.494-.166 1.494-.518v-.537c-.31.239-.918.332-1.494.332z" id="Text-dinamic" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-brightness" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="brightness" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M1.87 2.813l.943-.943 1.415 1.415-.943.943z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M11.772 3.285l1.414-1.415.943.943-1.414 1.415z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M11.772 12.715l.943-.943 1.415 1.415-.943.943z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M1.87 13.187l1.415-1.415.943.943-1.415 1.415z"/><circle id="Oval" fill="currentColor" fill-rule="nonzero" cx="8" cy="8" r="4.668"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M-.002 7.333h2v1.334h-2z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M7.333-.002h1.334v2H7.333z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M14.001 7.333h2v1.334h-2z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M7.333 14.001h1.334v2H7.333z"/></g></g></g></symbol><symbol id="nc-carousel" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="carousel" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M1 14h-12a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1H1a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1z" id="Combined-Shape" fill="currentColor" fill-rule="nonzero"/><path d="M27 14H15a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1z" id="Combined-Shape" fill="currentColor" fill-rule="nonzero"/><path d="M11 15H5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1z" id="Combined-Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-contrast" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="contrast" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M13.23 2.654C11.816 1.238 9.97.5 8 .5c-1.97 0-3.815.738-5.23 2.154a7.391 7.391 0 0 0 0 10.461C4.184 14.531 6.03 15.27 8 15.27c1.97 0 3.815-.738 5.23-2.154a7.391 7.391 0 0 0 0-10.461zm-9.6.861C4.8 2.346 6.339 1.731 8 1.731a6.02 6.02 0 0 1 3.877 1.415l-8.615 8.616c-2.031-2.4-1.847-5.97.369-8.247z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-flip-horizontal" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="flip-horizontal" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M7 0h2v16H7z"/><path id="Shape" fill="currentColor" fill-rule="nonzero" d="M5 4v8H0z"/><path id="Shape" fill="currentColor" fill-rule="nonzero" d="M11 4v8h5z"/></g></g></g></symbol><symbol id="nc-flip-vertical" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="flip-vertical" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M0 7h16v2H0z"/><path id="Shape" fill="currentColor" fill-rule="nonzero" d="M12 5H4V0z"/><path id="Shape" fill="currentColor" fill-rule="nonzero" d="M12 11H4v5z"/></g></g></g></symbol><symbol id="nc-hue" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="hue" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><circle id="Oval-2" fill="currentColor" fill-rule="nonzero" opacity=".55" cx="5" cy="11" r="5"/><circle id="Oval-2-Copy" fill="currentColor" fill-rule="nonzero" opacity=".75" cx="11" cy="11" r="5"/><circle id="Oval-2" fill="currentColor" fill-rule="nonzero" opacity=".9" cx="8" cy="5" r="5"/></g></g></g></symbol><symbol id="nc-menu-3" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="menu" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M15 7H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M15 2H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z" id="Shape" fill="currentColor" fill-rule="nonzero"/><path d="M15 12H1c-.6 0-1 .4-1 1s.4 1 1 1h14c.6 0 1-.4 1-1s-.4-1-1-1z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-reset" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="reset" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M12 9c0 2.206-1.794 4-4 4s-4-1.794-4-4 1.794-4 4-4v3l5-4-5-4v3C4.691 3 2 5.691 2 9s2.691 6 6 6 6-2.691 6-6h-2z" id="Shape" fill="currentColor" fill-rule="nonzero" transform="matrix(-1 0 0 1 16 0)"/></g></g></g></symbol><symbol id="nc-saturation" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="saturation" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M12.599 4.744L8 0 3.401 4.744c-2.535 2.496-2.535 6.888 0 9.384A6.536 6.536 0 0 0 8 16a6.536 6.536 0 0 0 4.599-1.872c2.535-2.496 2.535-6.888 0-9.384zM8 14.408c-1.3 0-2.527-.496-3.445-1.408a4.72 4.72 0 0 1-1.43-3.392c0-1.28.504-2.824 1.43-3.728L8 2.48v11.928z" id="Shape" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-close-popup" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="close-popup" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square"><path d="M1.5 1.5l13.038 13.038" id="Line-2" stroke="currentColor" fill-rule="nonzero"/><path d="M1.5 1.5l13.038 13.038" id="Line-2" stroke="currentColor" fill-rule="nonzero" transform="matrix(-1 0 0 1 16 0)"/></g></g></g></symbol><symbol id="nc-width" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="width" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Shape" fill="currentColor" fill-rule="nonzero" transform="rotate(90 11 8)" d="M11 6l4 4H7z"/><path id="Shape" fill="currentColor" fill-rule="nonzero" transform="rotate(90 5 8)" d="M5 10L1 6h8z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" transform="rotate(90 15 8)" d="M8 7h14v2H8z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" transform="rotate(90 1 8)" d="M-6 7H8v2H-6z"/></g></g></g></symbol><symbol id="nc-height" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="height" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path id="Shape" fill="currentColor" fill-rule="nonzero" d="M8 3l4 4H4z"/><path id="Shape" fill="currentColor" fill-rule="nonzero" d="M8 13L4 9h8z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M0 0h16v2H0z"/><path id="Rectangle-path" fill="currentColor" fill-rule="nonzero" d="M0 14h16v2H0z"/></g></g></g></symbol><symbol id="nc-repeat" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="repeat" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group" transform="translate(0 1)" fill="currentColor" fill-rule="nonzero"><path id="Path" transform="rotate(90 6.5 9)" d="M9.5 11.5h-5v-2l-3 3 3 3v-2h7v-11h-3v2h1z"/><path id="Path" transform="rotate(-90 9.5 5)" d="M12.5 7.5h-5v-2l-3 3 3 3v-2h7v-11h-3v2h1z"/></g></g></g></g></symbol><symbol id="nc-send-to-back" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="send-to-back" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M1 0h9a1 1 0 0 1 1 1v3H5a1 1 0 0 0-1 1v6H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1z" id="Rectangle-12" fill="currentColor" fill-rule="nonzero"/><path d="M7.667 6v1.667h6.666v6.666H7.667V6H7a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1H7.667z" id="Path-2" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-bring-to-top" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g id="bring-top" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><rect id="Rectangle-12" fill="currentColor" fill-rule="nonzero" x="0" y="0" width="12" height="12" rx="1"/><path d="M13.5 6v1.667h.833v5.666a1 1 0 0 1-1 1H7.667V13.5H6V15a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V7a1 1 0 0 0-1-1h-1.5z" id="Path-2" fill="currentColor" fill-rule="nonzero"/></g></g></g></symbol><symbol id="nc-check-light" viewBox="0 0 16 16"><g><g class="nc-icon-wrapper" fill="currentColor"><g classname="nc-icon-wrapper" fill="currentColor"><path fill="none" stroke="currentColor" strokelinecap="round" strokelinejoin="round" strokemiterlimit="10" d="M13.423 6.999A6.5 6.5 0 1 1 10 2.232" datacap="butt"/><path fill="none" stroke="currentColor" strokelinecap="round" strokelinejoin="round" strokemiterlimit="10" datacap="butt" datacolor="color-2" d="M4 6.5l3 3 8-8"/></g></g></g></symbol><symbol id="nc-pen" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M8.1,3.5 L12.5,7.9 L4.7,15.7 C4.5,15.9 4.3,16 4,16 L1,16 C0.4,16 0,15.6 0,15 L0,12 C0,11.7 0.1,11.5 0.3,11.3 L8.1,3.5 Z M15.7,3.3 C16.1,3.7 16.1,4.3 15.7,4.7 L13.9,6.5 L9.5,2.1 L11.3,0.3 C11.7,-0.1 12.3,-0.1 12.7,0.3 L15.7,3.3 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-media-image" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M5.2,2 C6.04,2 6.6,2.6 6.6,3.5 C6.6,4.4 6.04,5 5.2,5 C4.36,5 3.8,4.4 3.8,3.5 C3.8,2.6 4.36,2 5.2,2 Z M1,14 L3.8,8 L6.6,11 L10.8,5 L15,14 L1,14 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-media-video" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M11,6.5 C11,6.01538462 10.65,5.69230769 10.125,5.69230769 L8,5.69230769 L8,2.80769231 C8,2.32307692 7.65,2 7.125,2 L3,2 L3,3.84615385 L6,3.84615385 L6,5.69230769 L1.875,5.69230769 C1.35,5.69230769 1,6.01538462 1,6.5 L1,13.1923077 C1,13.6769231 1.35,14 1.875,14 L10.125,14 C10.65,14 11,13.6769231 11,13.1923077 L11,11.5769231 L15,13.1923077 L15,6.5 L11,8.11538462 L11,6.5 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-media-map" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M7,12 C7.55228475,12.5522847 8.44771525,12.5522847 9,12 L9,14 C9,14.5522847 8.55228475,15 8,15 C7.44771525,15 7,14.5522847 7,14 L7,12 Z M8,11 C5.51471863,11 3.5,8.98528137 3.5,6.5 C3.5,4.01471863 5.51471863,2 8,2 C10.4852814,2 12.5,4.01471863 12.5,6.5 C12.5,8.98528137 10.4852814,11 8,11 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-email" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M3.6058448,9.66149939 L3.6058448,14.594495 C3.6058448,15.2992086 4.40786873,15.6012288 4.90913369,15.0978619 L7.2149525,12.3796806 L11.9268431,15.9032489 C12.3278551,16.2052691 12.929373,16.0039223 13.029626,15.5005554 L16.0372158,0.902915364 C16.1374688,0.298875086 15.6362038,-0.103818432 15.0346858,0.0975283271 L0.498002054,5.93658434 C-0.00326290396,6.1379311 -0.103515896,6.84264476 0.297496071,7.24533828 L1.90154394,8.45341883 L6.51318156,6.23860448 C6.91419352,6.03725772 7.2149525,6.54062462 6.91419352,6.74197138 L3.6058448,9.66149939 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-captcha" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M15.094,7.211 L14.555,1 L12.625,2.93 C11.353,1.812 9.71,1.18 8,1.18 C4.14,1.18 1,4.32 1,8.18 C1,12.04 4.14,15.18 8,15.18 C10.491,15.18 12.814,13.839 14.063,11.681 L12.332,10.68 C11.439,12.222 9.779,13.18 8,13.18 C5.243,13.18 3,10.937 3,8.18 C3,5.423 5.243,3.18 8,3.18 C9.179,3.18 10.311,3.603 11.205,4.35 L8.883,6.672 L15.094,7.211 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-uncheck-alt" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M2,1 L14,1 C14.5522847,1 15,1.44771525 15,2 L15,14 C15,14.5522847 14.5522847,15 14,15 L2,15 C1.44771525,15 1,14.5522847 1,14 L1,2 C1,1.44771525 1.44771525,1 2,1 Z M3,3 L3,13 L13,13 L13,3 L3,3 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-check-alt" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M14.3,1.3 C14.7,0.9 15.3,0.9 15.7,1.3 C16.1,1.7 16.1,2.3 15.7,2.7 L8.7,9.7 C8.5,9.9 8.3,10 8,10 C7.7,10 7.5,9.9 7.3,9.7 L5.3,7.7 C4.9,7.3 4.9,6.7 5.3,6.3 C5.7,5.9 6.3,5.9 6.7,6.3 L8,7.6 L14.3,1.3 Z M2,15 C1.4,15 1,14.6 1,14 L1,2 C1,1.4 1.4,1 2,1 L8,1 C8.6,1 9,1.4 9,2 C9,2.6 8.6,3 8,3 L3,3 L3,13 L13,13 L13,9 C13,8.4 13.4,8 14,8 C14.6,8 15,8.4 15,9 L15,14 C15,14.6 14.6,15 14,15 L2,15 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-shift-key" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-opacity="0.92"><path d="M5,15 L11,15 L11,8 L13.7745265,8 L7.99987793,1.50500692 L2.22522934,8 L5,8 L5,15 Z" id="Path" stroke="currentColor" stroke-width="2"></path></g></symbol><symbol id="nc-reverse-columns-bottom" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M6,16 L1,16 C0.448,16 0,15.552 0,15 L0,10 C0,9.448 0.448,9 1,9 L6,9 C6.552,9 7,9.448 7,10 L7,15 C7,15.552 6.552,16 6,16 Z M6,7 L1,7 C0.448,7 0,6.552 0,6 L0,1 C0,0.448 0.448,0 1,0 L6,0 C6.552,0 7,0.448 7,1 L7,6 C7,6.552 6.552,7 6,7 Z M2,5 L5,5 L5,2 L2,2 L2,5 Z M13,11 L16,11 L12,16 L8,11 L11,11 L11,1 C11,0.448 11.448,0 12,0 C12.552,0 13,0.448 13,1 L13,11 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-reverse-columns-left" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M6,16 L1,16 C0.448,16 0,15.552 0,15 L0,10 C0,9.448 0.448,9 1,9 L6,9 C6.552,9 7,9.448 7,10 L7,15 C7,15.552 6.552,16 6,16 Z M6,7 L1,7 C0.448,7 0,6.552 0,6 L0,1 C0,0.448 0.448,0 1,0 L6,0 C6.552,0 7,0.448 7,1 L7,6 C7,6.552 6.552,7 6,7 Z M2,5 L5,5 L5,2 L2,2 L2,5 Z M13,11 L16,11 L12,16 L8,11 L11,11 L11,1 C11,0.448 11.448,0 12,0 C12.552,0 13,0.448 13,1 L13,11 Z" fill="currentColor" fill-rule="nonzero" transform="translate(8.000000, 8.000000) scale(-1, 1) rotate(90.000000) translate(-8.000000, -8.000000) "></path></g></symbol><symbol id="nc-reverse-columns-right" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M6,16 L1,16 C0.448,16 0,15.552 0,15 L0,10 C0,9.448 0.448,9 1,9 L6,9 C6.552,9 7,9.448 7,10 L7,15 C7,15.552 6.552,16 6,16 Z M6,7 L1,7 C0.448,7 0,6.552 0,6 L0,1 C0,0.448 0.448,0 1,0 L6,0 C6.552,0 7,0.448 7,1 L7,6 C7,6.552 6.552,7 6,7 Z M2,5 L5,5 L5,2 L2,2 L2,5 Z M13,11 L16,11 L12,16 L8,11 L11,11 L11,1 C11,0.448 11.448,0 12,0 C12.552,0 13,0.448 13,1 L13,11 Z" fill="currentColor" fill-rule="nonzero" transform="translate(8.000000, 8.000000) rotate(90.000000) translate(-8.000000, -8.000000) "></path></g></symbol><symbol id="nc-reverse-columns-top" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.92"><path d="M6,16 L1,16 C0.448,16 0,15.552 0,15 L0,10 C0,9.448 0.448,9 1,9 L6,9 C6.552,9 7,9.448 7,10 L7,15 C7,15.552 6.552,16 6,16 Z M6,7 L1,7 C0.448,7 0,6.552 0,6 L0,1 C0,0.448 0.448,0 1,0 L6,0 C6.552,0 7,0.448 7,1 L7,6 C7,6.552 6.552,7 6,7 Z M2,5 L5,5 L5,2 L2,2 L2,5 Z M13,11 L16,11 L12,16 L8,11 L11,11 L11,1 C11,0.448 11.448,0 12,0 C12.552,0 13,0.448 13,1 L13,11 Z" fill="currentColor" fill-rule="nonzero" transform="translate(8.000000, 8.000000) scale(1, -1) translate(-8.000000, -8.000000) "></path></g></symbol><symbol id="nc-minus" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-1014.000000, -625.000000)" fill="currentColor" fill-rule="nonzero"><g transform="translate(503.000000, 533.000000)"><path d="M519,92 C514.6,92 511,95.6 511,100 C511,104.4 514.6,108 519,108 C523.4,108 527,104.4 527,100 C527,95.6 523.4,92 519,92 Z M523,101 L515,101 L515,99 L523,99 L523,101 Z"></path></g></g></g></symbol><symbol id="nc-facebook" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M-8.8817842e-16,1 L-1.33226763e-15,15 C-2.24568705e-15,15.5522847 0.44771525,16 1,16 L8,16 L8,11 L6,11 L6,8 L8,8 L8,6 C8,3.9 9.2,3 11,3 C11.9,3 12.8,3 13,3 L13,6 L12,6 C11.4,6 11,6.4 11,7 L11,8 L13.6,8 L13,11 L11,11 L11,16 L15,16 C15.5522847,16 16,15.5522847 16,15 L16,1 C16,0.44771525 15.5522847,-1.01453063e-16 15,0 L1,0 C0.44771525,1.01453063e-16 -9.55813795e-16,0.44771525 -8.8817842e-16,1 Z" fill="currentColor"></path></g></symbol><symbol id="nc-footer" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M16,6 L12.7180574,6 L3.2819426,6 L0,6 L3.45280103e-17,1.2819426 C-2.00617683e-17,0.83618323 0.0464128056,0.674540111 0.133566352,0.511577148 C0.220719898,0.348614185 0.348614185,0.220719898 0.511577148,0.133566352 C0.674540111,0.0464128056 0.83618323,3.00926524e-17 1.2819426,-5.17920154e-17 L14.7180574,5.17920154e-17 C15.1638168,-3.00926524e-17 15.3254599,0.0464128056 15.4884229,0.133566352 C15.6513858,0.220719898 15.7792801,0.348614185 15.8664336,0.511577148 C15.9535872,0.674540111 16,0.83618323 16,1.2819426 L16,6 Z M16,8 L16,14.7180574 C16,15.1638168 15.9535872,15.3254599 15.8664336,15.4884229 C15.7792801,15.6513858 15.6513858,15.7792801 15.4884229,15.8664336 C15.3254599,15.9535872 15.1638168,16 14.7180574,16 L1.2819426,16 C0.83618323,16 0.674540111,15.9535872 0.511577148,15.8664336 C0.348614185,15.7792801 0.220719898,15.6513858 0.133566352,15.4884229 C0.0464128056,15.3254599 2.00617683e-17,15.1638168 -3.45280103e-17,14.7180574 L0,8 L2,8 L2,12.7180574 C2,13.1638168 2.04641281,13.3254599 2.13356635,13.4884229 C2.2207199,13.6513858 2.34861419,13.7792801 2.51157715,13.8664336 C2.67454011,13.9535872 2.83618323,14 3.2819426,14 L12.7180574,14 C13.1638168,14 13.3254599,13.9535872 13.4884229,13.8664336 C13.6513858,13.7792801 13.7792801,13.6513858 13.8664336,13.4884229 C13.9535872,13.3254599 14,13.1638168 14,12.7180574 L14,8 L16,8 Z" fill="currentColor" fill-rule="nonzero" transform="translate(8.000000, 8.000000) scale(1, -1) translate(-8.000000, -8.000000)"></path></g></symbol><symbol id="nc-dividers-bottom" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M2,11.3428571 L14,8.25714286 L14,3 C14,2.44771525 13.5522847,2 13,2 L3,2 C2.44771525,2 2,2.44771525 2,3 L2,11.3428571 Z M15,16 L1,16 C0.448,16 0,15.4891429 0,14.8571429 L0,1.14285714 C0,0.512 0.448,0 1,0 L15,0 C15.552,0 16,0.512 16,1.14285714 L16,14.8571429 C16,15.4891429 15.552,16 15,16 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-dividers-top" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><path d="M2,7.74285714 L2,13 C2,13.5522847 2.44771525,14 3,14 L13,14 C13.5522847,14 14,13.5522847 14,13 L14,4.65714286 L2,7.74285714 Z M15,16 L1,16 C0.448,16 0,15.4891429 0,14.8571429 L0,1.14285714 C0,0.512 0.448,0 1,0 L15,0 C15.552,0 16,0.512 16,1.14285714 L16,14.8571429 C16,15.4891429 15.552,16 15,16 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol><symbol id="nc-plus2" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Keyboard-Shortcuts-PC" transform="translate(-1014.000000, -667.000000)" fill="currentColor" fill-rule="nonzero"><g id="Text-Shortcuts" transform="translate(503.000000, 533.000000)"><path d="M519,134 C514.6,134 511,137.6 511,142 C511,146.4 514.6,150 519,150 C523.4,150 527,146.4 527,142 C527,137.6 523.4,134 519,134 Z M523,143 L520,143 L520,146 L518,146 L518,143 L515,143 L515,141 L518,141 L518,138 L520,138 L520,141 L523,141 L523,143 Z"></path></g></g></g></symbol><symbol id="nc-arrow" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-630.000000, -723.000000)" fill="currentColor" fill-rule="nonzero"><g transform="translate(463.000000, 505.000000)"><g transform="translate(167.000000, 218.000000)"><path d="M8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 Z M8,4 L8,7 L12,7 L12,9 L8,9 L8,12 L4,8 L8,4 Z"></path></g></g></g></g></symbol><symbol id="nc-shadow" viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="currentColor" fill-rule="evenodd"><path d="M8,0 C3.6,0 0,3.6 0,8 C0,12.4 3.6,16 8,16 C12.4,16 16,12.4 16,8 C16,3.6 12.4,0 8,0 Z M2,8 C2,4.7 4.7,2 8,2 L8,14 C4.7,14 2,11.3 2,8 Z" fill="currentColor" fill-rule="nonzero"></path></g></symbol></svg>
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
 
 
 
 
 
 
 
 
 
admin/site-settings/fonts/pn-bold-italic.woff2 DELETED
Binary file
admin/site-settings/fonts/pn-bold.woff2 DELETED
Binary file
admin/site-settings/fonts/pn-medium.woff2 DELETED
Binary file
admin/site-settings/fonts/pn.woff2 DELETED
Binary file
admin/site-settings/fonts/symbol-defs.svg DELETED
@@ -1,56 +0,0 @@
1
- <svg aria-hidden="true" style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
2
- <defs>
3
- <symbol id="icon-add" viewBox="0 0 32 32">
4
- <title>add</title>
5
- <path d="M16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16c8.8 0 16-7.2 16-16s-7.2-16-16-16zM24 18h-6v6h-4v-6h-6v-4h6v-6h4v6h6v4z"></path>
6
- </symbol>
7
- <symbol id="icon-Menus" viewBox="0 0 34 32">
8
- <title>Menus</title>
9
- <path fill="currentColor" d="M0 0h34.133v6.4h-34.133v-6.4zM0 12.8h34.133v6.4h-34.133v-6.4zM0 25.6h34.133v6.4h-34.133v-6.4z"></path>
10
- </symbol>
11
- <symbol id="icon-Check" viewBox="0 0 32 32">
12
- <title>Check</title>
13
- <path d="M12.16 12.373l2.773 2.773 13.44-13.44c0.853-0.853 2.133-0.853 2.987 0s0.853 2.133 0 2.987l-14.933 14.933c-0.427 0.427-0.853 0.64-1.493 0.64s-1.067-0.213-1.493-0.64l-4.267-4.267c-0.853-0.853-0.853-2.133 0-2.987s2.133-0.853 2.987 0zM14.933 30.933c-8.32 0-14.933-6.613-14.933-14.933s6.613-14.933 14.933-14.933c1.707 0 3.413 0.213 5.12 0.853 1.067 0.427 1.707 1.707 1.28 2.773s-1.707 1.707-2.773 1.28c-1.28-0.427-2.347-0.64-3.627-0.64-5.973 0-10.667 4.693-10.667 10.667s4.693 10.667 10.667 10.667c5.973 0 10.667-4.693 10.667-10.667 0-1.28 0.853-2.133 2.133-2.133s2.133 0.853 2.133 2.133c0 8.32-6.613 14.933-14.933 14.933z"></path>
14
- </symbol>
15
- <symbol id="icon-Code-Injection" viewBox="0 0 32 32">
16
- <title>Code-Injection</title>
17
- <path fill="currentColor" d="M25.4 22.525l-2.8-2.8 4.6-4.6-4.6-4.6 2.8-2.8 6 6c0.8 0.8 0.8 2 0 2.8l-6 6zM6.6 22.525l-6-6c-0.8-0.8-0.8-2 0-2.8l6-6 2.8 2.8-4.6 4.6 4.6 4.6-2.8 2.8zM12 29.125c-0.2 0-0.4 0-0.6-0.2-1-0.4-1.6-1.4-1.2-2.6l8-24c0.4-1 1.4-1.6 2.6-1.2 1 0.4 1.6 1.4 1.2 2.6l-8 24c-0.4 0.8-1.2 1.4-2 1.4z"></path>
18
- </symbol>
19
- <symbol id="icon-CSS" viewBox="0 0 28 32">
20
- <title>CSS</title>
21
- <path fill="currentColor" d="M27.473 0.646c-0.38-0.412-0.912-0.646-1.472-0.646h-24c-0.56 0-1.092 0.234-1.472 0.646-0.378 0.412-0.568 0.962-0.522 1.52l2 24c0.062 0.756 0.546 1.41 1.25 1.692l10 4c0.24 0.096 0.492 0.142 0.744 0.142s0.504-0.046 0.744-0.142l10-4c0.704-0.282 1.188-0.936 1.25-1.692l2-24c0.046-0.558-0.144-1.108-0.522-1.52zM22.001 9.442l-7.676 2.558h7.676v11.442l-8 2.666-8-2.666v-5.442h4v2.558l4 1.334 4-1.334v-4.558h-12v-5.442l7.676-2.558h-7.676v-4h16v5.442z"></path>
22
- </symbol>
23
- <symbol id="icon-Edit-Page" viewBox="0 0 32 32">
24
- <title>Edit-Page</title>
25
- <path fill="currentColor" d="M22 32h-4v-4.267l10-10.667 4 4.267-10 10.667zM4 12.8h28v-10.667c0-1.178-0.894-2.133-2-2.133h-28c-1.106 0-2 0.956-2 2.133v21.333c0 1.178 0.894 2.133 2 2.133h12v-4.267h-10v-8.533zM4 4.267h24v4.267h-24v-4.267z"></path>
26
- </symbol>
27
- <symbol id="icon-Gear" viewBox="0 0 32 32">
28
- <title>Gear</title>
29
- <path fill="currentColor" d="M26.6 10.4l2.2-4.2-2.8-2.8-4.2 2.2c-0.6-0.4-1.4-0.6-2.2-0.8l-1.6-4.8h-4l-1.6 4.6c-0.6 0.2-1.4 0.4-2 0.8l-4.2-2.2-3 3 2.2 4.2c-0.4 0.6-0.6 1.4-0.8 2l-4.6 1.6v4l4.6 1.6c0.2 0.8 0.6 1.4 0.8 2.2l-2.2 4.2 2.8 2.8 4.2-2.2c0.6 0.4 1.4 0.6 2.2 0.8l1.6 4.6h4l1.6-4.6c0.8-0.2 1.4-0.6 2.2-0.8l4.2 2.2 2.8-2.8-2.2-4.2c0.4-0.6 0.6-1.4 0.8-2.2l4.6-1.6v-4l-4.6-1.6c-0.2-0.6-0.4-1.4-0.8-2zM16 22c-3.4 0-6-2.6-6-6s2.6-6 6-6c3.4 0 6 2.6 6 6s-2.6 6-6 6z"></path>
30
- </symbol>
31
- <symbol id="icon-General-Settings" viewBox="0 0 32 32">
32
- <title>General-Settings</title>
33
- <path fill="currentColor" d="M22 20v10c0 1.2 0.8 2 2 2s2-0.8 2-2v-10c0-1.2-0.8-2-2-2s-2 0.8-2 2zM32 12v-6c0-1.2-0.8-2-2-2h-4v-2c0-1.2-0.8-2-2-2s-2 0.8-2 2v2h-4c-1.2 0-2 0.8-2 2v6c0 1.2 0.8 2 2 2h12c1.2 0 2-0.8 2-2zM8 0c-1.2 0-2 0.8-2 2v10c0 1.2 0.8 2 2 2s2-0.8 2-2v-10c0-1.2-0.8-2-2-2zM2 28h4v2c0 1.2 0.8 2 2 2s2-0.8 2-2v-2h4c1.2 0 2-0.8 2-2v-6c0-1.2-0.8-2-2-2h-12c-1.2 0-2 0.8-2 2v6c0 1.2 0.8 2 2 2z"></path>
34
- </symbol>
35
- <symbol id="icon-Info" viewBox="0 0 32 32">
36
- <title>Info</title>
37
- <path fill="currentColor" d="M16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16c8.8 0 16-7.2 16-16s-7.2-16-16-16zM16 28c-6.6 0-12-5.4-12-12s5.4-12 12-12c6.6 0 12 5.4 12 12s-5.4 12-12 12zM14 14h4v10h-4v-10zM16 12c1.105 0 2-0.895 2-2s-0.895-2-2-2c-1.105 0-2 0.895-2 2s0.895 2 2 2z"></path>
38
- </symbol>
39
- <symbol id="icon-Pages" viewBox="0 0 32 32">
40
- <title>Pages</title>
41
- <path fill="currentColor" d="M19.067 8c1.2 0 2 0.8 2 2v20c0 1.2-0.8 2-2 2h-16c-1.2 0-2-0.8-2-2v-20c0-1.2 0.8-2 2-2h16zM27.067 0c1.2 0 2 0.8 2 2v24h-4v-22h-18v-4h20z"></path>
42
- </symbol>
43
- <symbol id="icon-search" viewBox="0 0 32 32">
44
- <title>search</title>
45
- <path d="M14 28c-7.72 0-14-6.28-14-14s6.28-14 14-14c7.72 0 14 6.28 14 14s-6.28 14-14 14zM14 4c-5.514 0-10 4.486-10 10s4.486 10 10 10c5.514 0 10-4.486 10-10s-4.486-10-10-10zM31.414 28.586c0.782 0.782 0.782 2.046 0 2.828-0.39 0.39-0.902 0.586-1.414 0.586s-1.024-0.196-1.414-0.586l-4.786-4.786c1.058-0.822 2.006-1.77 2.828-2.828l4.786 4.786z"></path>
46
- </symbol>
47
- <symbol id="icon-Social" viewBox="0 0 28 32">
48
- <title>Social</title>
49
- <path fill="currentColor" d="M22 12c3.308 0 6-2.692 6-6s-2.692-6-6-6c-3.308 0-6 2.692-6 6 0 0.446 0.058 0.878 0.15 1.298l-6.44 4.024c-1.024-0.814-2.302-1.322-3.71-1.322-3.308 0-6 2.692-6 6s2.692 6 6 6c1.408 0 2.686-0.508 3.71-1.322l6.44 4.024c-0.092 0.42-0.15 0.852-0.15 1.298 0 3.308 2.692 6 6 6s6-2.692 6-6c0-3.308-2.692-6-6-6-1.408 0-2.686 0.508-3.71 1.322l-6.44-4.024c0.092-0.42 0.15-0.852 0.15-1.298s-0.058-0.878-0.15-1.298l6.44-4.024c1.024 0.814 2.302 1.322 3.71 1.322z"></path>
50
- </symbol>
51
- <symbol id="icon-Trash" viewBox="0 0 32 32">
52
- <title>Trash</title>
53
- <path fill="currentColor" d="M4 12h24v16c0 2.2-1.8 4-4 4h-16c-2.2 0-4-1.8-4-4v-16zM24 6h8v4h-32v-4h8v-4c0-1.2 0.8-2 2-2h12c1.2 0 2 0.8 2 2v4zM20 6v-2h-8v2h8z"></path>
54
- </symbol>
55
- </defs>
56
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/fonts/tick.svg DELETED
@@ -1,9 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
- <!-- Generator: Sketch 52.4 (67378) - http://www.bohemiancoding.com/sketch -->
4
- <title>Check Tick</title>
5
- <desc>Created with Sketch.</desc>
6
- <g id="Check-Tick" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
- <polygon id="Path" fill="#21252B" fill-rule="nonzero" points="7 11.4 3.6 8 5 6.6 7 8.6 11 4.6 12.4 6"></polygon>
8
- </g>
9
- </svg>
 
 
 
 
 
 
 
 
 
admin/site-settings/images/favicon.png DELETED
Binary file
admin/site-settings/js/Sortable.js DELETED
@@ -1,3644 +0,0 @@
1
- /**!
2
- * Sortable 1.10.0-rc1
3
- * @author RubaXa <trash@rubaxa.org>
4
- * @author owenm <owen23355@gmail.com>
5
- * @license MIT
6
- */
7
- (function (global, factory) {
8
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
9
- typeof define === 'function' && define.amd ? define(factory) :
10
- (global = global || self, global.Sortable = factory());
11
- }(this, function () { 'use strict';
12
-
13
- function _typeof(obj) {
14
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
15
- _typeof = function (obj) {
16
- return typeof obj;
17
- };
18
- } else {
19
- _typeof = function (obj) {
20
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
21
- };
22
- }
23
-
24
- return _typeof(obj);
25
- }
26
-
27
- function _defineProperty(obj, key, value) {
28
- if (key in obj) {
29
- Object.defineProperty(obj, key, {
30
- value: value,
31
- enumerable: true,
32
- configurable: true,
33
- writable: true
34
- });
35
- } else {
36
- obj[key] = value;
37
- }
38
-
39
- return obj;
40
- }
41
-
42
- function _extends() {
43
- _extends = Object.assign || function (target) {
44
- for (var i = 1; i < arguments.length; i++) {
45
- var source = arguments[i];
46
-
47
- for (var key in source) {
48
- if (Object.prototype.hasOwnProperty.call(source, key)) {
49
- target[key] = source[key];
50
- }
51
- }
52
- }
53
-
54
- return target;
55
- };
56
-
57
- return _extends.apply(this, arguments);
58
- }
59
-
60
- function _objectSpread(target) {
61
- for (var i = 1; i < arguments.length; i++) {
62
- var source = arguments[i] != null ? arguments[i] : {};
63
- var ownKeys = Object.keys(source);
64
-
65
- if (typeof Object.getOwnPropertySymbols === 'function') {
66
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
67
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
68
- }));
69
- }
70
-
71
- ownKeys.forEach(function (key) {
72
- _defineProperty(target, key, source[key]);
73
- });
74
- }
75
-
76
- return target;
77
- }
78
-
79
- function _objectWithoutPropertiesLoose(source, excluded) {
80
- if (source == null) return {};
81
- var target = {};
82
- var sourceKeys = Object.keys(source);
83
- var key, i;
84
-
85
- for (i = 0; i < sourceKeys.length; i++) {
86
- key = sourceKeys[i];
87
- if (excluded.indexOf(key) >= 0) continue;
88
- target[key] = source[key];
89
- }
90
-
91
- return target;
92
- }
93
-
94
- function _objectWithoutProperties(source, excluded) {
95
- if (source == null) return {};
96
-
97
- var target = _objectWithoutPropertiesLoose(source, excluded);
98
-
99
- var key, i;
100
-
101
- if (Object.getOwnPropertySymbols) {
102
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
103
-
104
- for (i = 0; i < sourceSymbolKeys.length; i++) {
105
- key = sourceSymbolKeys[i];
106
- if (excluded.indexOf(key) >= 0) continue;
107
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
108
- target[key] = source[key];
109
- }
110
- }
111
-
112
- return target;
113
- }
114
-
115
- function _toConsumableArray(arr) {
116
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
117
- }
118
-
119
- function _arrayWithoutHoles(arr) {
120
- if (Array.isArray(arr)) {
121
- for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
122
-
123
- return arr2;
124
- }
125
- }
126
-
127
- function _iterableToArray(iter) {
128
- if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
129
- }
130
-
131
- function _nonIterableSpread() {
132
- throw new TypeError("Invalid attempt to spread non-iterable instance");
133
- }
134
-
135
- var version = "1.10.0-rc1";
136
-
137
- function userAgent(pattern) {
138
- return !!navigator.userAgent.match(pattern);
139
- }
140
-
141
- var IE11OrLess =
142
- /*@__PURE__*/
143
- userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile)/i);
144
- var Edge =
145
- /*@__PURE__*/
146
- userAgent(/Edge/i);
147
- var FireFox =
148
- /*@__PURE__*/
149
- userAgent(/firefox/i);
150
- var Safari =
151
- /*@__PURE__*/
152
- userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
153
- var IOS =
154
- /*@__PURE__*/
155
- userAgent(/iP(ad|od|hone)/i);
156
-
157
- var captureMode = {
158
- capture: false,
159
- passive: false
160
- };
161
-
162
- function on(el, event, fn) {
163
- el.addEventListener(event, fn, !IE11OrLess && captureMode);
164
- }
165
-
166
- function off(el, event, fn) {
167
- el.removeEventListener(event, fn, !IE11OrLess && captureMode);
168
- }
169
-
170
- function matches(
171
- /**HTMLElement*/
172
- el,
173
- /**String*/
174
- selector) {
175
- if (!selector) return;
176
- selector[0] === '>' && (selector = selector.substring(1));
177
-
178
- if (el) {
179
- try {
180
- if (el.matches) {
181
- return el.matches(selector);
182
- } else if (el.msMatchesSelector) {
183
- return el.msMatchesSelector(selector);
184
- } else if (el.webkitMatchesSelector) {
185
- return el.webkitMatchesSelector(selector);
186
- }
187
- } catch (_) {
188
- return false;
189
- }
190
- }
191
-
192
- return false;
193
- }
194
-
195
- function getParentOrHost(el) {
196
- return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode;
197
- }
198
-
199
- function closest(
200
- /**HTMLElement*/
201
- el,
202
- /**String*/
203
- selector,
204
- /**HTMLElement*/
205
- ctx, includeCTX) {
206
- if (el) {
207
- ctx = ctx || document;
208
-
209
- do {
210
- if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) {
211
- return el;
212
- }
213
-
214
- if (el === ctx) break;
215
- /* jshint boss:true */
216
- } while (el = getParentOrHost(el));
217
- }
218
-
219
- return null;
220
- }
221
-
222
- var R_SPACE = /\s+/g;
223
-
224
- function toggleClass(el, name, state) {
225
- if (el && name) {
226
- if (el.classList) {
227
- el.classList[state ? 'add' : 'remove'](name);
228
- } else {
229
- var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' ');
230
- el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' ');
231
- }
232
- }
233
- }
234
-
235
- function css(el, prop, val) {
236
- var style = el && el.style;
237
-
238
- if (style) {
239
- if (val === void 0) {
240
- if (document.defaultView && document.defaultView.getComputedStyle) {
241
- val = document.defaultView.getComputedStyle(el, '');
242
- } else if (el.currentStyle) {
243
- val = el.currentStyle;
244
- }
245
-
246
- return prop === void 0 ? val : val[prop];
247
- } else {
248
- if (!(prop in style) && prop.indexOf('webkit') === -1) {
249
- prop = '-webkit-' + prop;
250
- }
251
-
252
- style[prop] = val + (typeof val === 'string' ? '' : 'px');
253
- }
254
- }
255
- }
256
-
257
- function matrix(el, selfOnly) {
258
- var appliedTransforms = '';
259
-
260
- do {
261
- var transform = css(el, 'transform');
262
-
263
- if (transform && transform !== 'none') {
264
- appliedTransforms = transform + ' ' + appliedTransforms;
265
- }
266
- /* jshint boss:true */
267
-
268
- } while (!selfOnly && (el = el.parentNode));
269
-
270
- var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix;
271
- /*jshint -W056 */
272
-
273
- return matrixFn && new matrixFn(appliedTransforms);
274
- }
275
-
276
- function find(ctx, tagName, iterator) {
277
- if (ctx) {
278
- var list = ctx.getElementsByTagName(tagName),
279
- i = 0,
280
- n = list.length;
281
-
282
- if (iterator) {
283
- for (; i < n; i++) {
284
- iterator(list[i], i);
285
- }
286
- }
287
-
288
- return list;
289
- }
290
-
291
- return [];
292
- }
293
-
294
- function getWindowScrollingElement() {
295
- if (IE11OrLess) {
296
- return document.documentElement;
297
- } else {
298
- return document.scrollingElement;
299
- }
300
- }
301
- /**
302
- * Returns the "bounding client rect" of given element
303
- * @param {HTMLElement} el The element whose boundingClientRect is wanted
304
- * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container
305
- * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr
306
- * @param {[Boolean]} undoScale Whether the container's scale() should be undone
307
- * @param {[HTMLElement]} container The parent the element will be placed in
308
- * @return {Object} The boundingClientRect of el, with specified adjustments
309
- */
310
-
311
-
312
- function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) {
313
- if (!el.getBoundingClientRect && el !== window) return;
314
- var elRect, top, left, bottom, right, height, width;
315
-
316
- if (el !== window && el !== getWindowScrollingElement()) {
317
- elRect = el.getBoundingClientRect();
318
- top = elRect.top;
319
- left = elRect.left;
320
- bottom = elRect.bottom;
321
- right = elRect.right;
322
- height = elRect.height;
323
- width = elRect.width;
324
- } else {
325
- top = 0;
326
- left = 0;
327
- bottom = window.innerHeight;
328
- right = window.innerWidth;
329
- height = window.innerHeight;
330
- width = window.innerWidth;
331
- }
332
-
333
- if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) {
334
- // Adjust for translate()
335
- container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312)
336
- // Not needed on <= IE11
337
-
338
- if (!IE11OrLess) {
339
- do {
340
- if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) {
341
- var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container
342
-
343
- top -= containerRect.top + parseInt(css(container, 'border-top-width'));
344
- left -= containerRect.left + parseInt(css(container, 'border-left-width'));
345
- bottom = top + elRect.height;
346
- right = left + elRect.width;
347
- break;
348
- }
349
- /* jshint boss:true */
350
-
351
- } while (container = container.parentNode);
352
- }
353
- }
354
-
355
- if (undoScale && el !== window) {
356
- // Adjust for scale()
357
- var elMatrix = matrix(container || el),
358
- scaleX = elMatrix && elMatrix.a,
359
- scaleY = elMatrix && elMatrix.d;
360
-
361
- if (elMatrix) {
362
- top /= scaleY;
363
- left /= scaleX;
364
- width /= scaleX;
365
- height /= scaleY;
366
- bottom = top + height;
367
- right = left + width;
368
- }
369
- }
370
-
371
- return {
372
- top: top,
373
- left: left,
374
- bottom: bottom,
375
- right: right,
376
- width: width,
377
- height: height
378
- };
379
- }
380
- /**
381
- * Checks if a side of an element is scrolled past a side of its parents
382
- * @param {HTMLElement} el The element who's side being scrolled out of view is in question
383
- * @param {[DOMRect]} rect Optional rect of `el` to use
384
- * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom')
385
- * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom')
386
- * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element
387
- */
388
-
389
-
390
- function isScrolledPast(el, rect, elSide, parentSide) {
391
- var parent = getParentAutoScrollElement(el, true),
392
- elSideVal = (rect ? rect : getRect(el))[elSide];
393
- /* jshint boss:true */
394
-
395
- while (parent) {
396
- var parentSideVal = getRect(parent)[parentSide],
397
- visible = void 0;
398
-
399
- if (parentSide === 'top' || parentSide === 'left') {
400
- visible = elSideVal >= parentSideVal;
401
- } else {
402
- visible = elSideVal <= parentSideVal;
403
- }
404
-
405
- if (!visible) return parent;
406
- if (parent === getWindowScrollingElement()) break;
407
- parent = getParentAutoScrollElement(parent, false);
408
- }
409
-
410
- return false;
411
- }
412
- /**
413
- * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible)
414
- * and non-draggable elements
415
- * @param {HTMLElement} el The parent element
416
- * @param {Number} childNum The index of the child
417
- * @param {Object} options Parent Sortable's options
418
- * @return {HTMLElement} The child at index childNum, or null if not found
419
- */
420
-
421
-
422
- function getChild(el, childNum, options) {
423
- var currentChild = 0,
424
- i = 0,
425
- children = el.children;
426
-
427
- while (i < children.length) {
428
- if (children[i].style.display !== 'none' && children[i] !== Sortable$1.ghost && children[i] !== Sortable$1.dragged && closest(children[i], options.draggable, el, false)) {
429
- if (currentChild === childNum) {
430
- return children[i];
431
- }
432
-
433
- currentChild++;
434
- }
435
-
436
- i++;
437
- }
438
-
439
- return null;
440
- }
441
- /**
442
- * Gets the last child in the el, ignoring ghostEl or invisible elements (clones)
443
- * @param {HTMLElement} el Parent element
444
- * @param {selector} selector Any other elements that should be ignored
445
- * @return {HTMLElement} The last child, ignoring ghostEl
446
- */
447
-
448
-
449
- function lastChild(el, selector) {
450
- var last = el.lastElementChild;
451
-
452
- while (last && (last === Sortable$1.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) {
453
- last = last.previousElementSibling;
454
- }
455
-
456
- return last || null;
457
- }
458
- /**
459
- * Returns the index of an element within its parent for a selected set of
460
- * elements
461
- * @param {HTMLElement} el
462
- * @param {selector} selector
463
- * @return {number}
464
- */
465
-
466
-
467
- function index(el, selector) {
468
- var index = 0;
469
-
470
- if (!el || !el.parentNode) {
471
- return -1;
472
- }
473
- /* jshint boss:true */
474
-
475
-
476
- while (el = el.previousElementSibling) {
477
- if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable$1.clone && (!selector || matches(el, selector))) {
478
- index++;
479
- }
480
- }
481
-
482
- return index;
483
- }
484
- /**
485
- * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements.
486
- * The value is returned in real pixels.
487
- * @param {HTMLElement} el
488
- * @return {Array} Offsets in the format of [left, top]
489
- */
490
-
491
-
492
- function getRelativeScrollOffset(el) {
493
- var offsetLeft = 0,
494
- offsetTop = 0,
495
- winScroller = getWindowScrollingElement();
496
-
497
- if (el) {
498
- do {
499
- var elMatrix = matrix(el),
500
- scaleX = elMatrix.a,
501
- scaleY = elMatrix.d;
502
- offsetLeft += el.scrollLeft * scaleX;
503
- offsetTop += el.scrollTop * scaleY;
504
- } while (el !== winScroller && (el = el.parentNode));
505
- }
506
-
507
- return [offsetLeft, offsetTop];
508
- }
509
- /**
510
- * Returns the index of the object within the given array
511
- * @param {Array} arr Array that may or may not hold the object
512
- * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find
513
- * @return {Number} The index of the object in the array, or -1
514
- */
515
-
516
-
517
- function indexOfObject(arr, obj) {
518
- for (var i in arr) {
519
- for (var key in obj) {
520
- if (obj[key] === arr[i][key]) return Number(i);
521
- }
522
- }
523
-
524
- return -1;
525
- }
526
-
527
- function getParentAutoScrollElement(el, includeSelf) {
528
- // skip to window
529
- if (!el || !el.getBoundingClientRect) return getWindowScrollingElement();
530
- var elem = el;
531
- var gotSelf = false;
532
-
533
- do {
534
- // we don't need to get elem css if it isn't even overflowing in the first place (performance)
535
- if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) {
536
- var elemCSS = css(elem);
537
-
538
- if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) {
539
- if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement();
540
- if (gotSelf || includeSelf) return elem;
541
- gotSelf = true;
542
- }
543
- }
544
- /* jshint boss:true */
545
-
546
- } while (elem = elem.parentNode);
547
-
548
- return getWindowScrollingElement();
549
- }
550
-
551
- function extend(dst, src) {
552
- if (dst && src) {
553
- for (var key in src) {
554
- if (src.hasOwnProperty(key)) {
555
- dst[key] = src[key];
556
- }
557
- }
558
- }
559
-
560
- return dst;
561
- }
562
-
563
- function isRectEqual(rect1, rect2) {
564
- return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width);
565
- }
566
-
567
- var _throttleTimeout;
568
-
569
- function throttle(callback, ms) {
570
- return function () {
571
- if (!_throttleTimeout) {
572
- var args = arguments,
573
- _this = this;
574
-
575
- if (args.length === 1) {
576
- callback.call(_this, args[0]);
577
- } else {
578
- callback.apply(_this, args);
579
- }
580
-
581
- _throttleTimeout = setTimeout(function () {
582
- _throttleTimeout = void 0;
583
- }, ms);
584
- }
585
- };
586
- }
587
-
588
- function cancelThrottle() {
589
- clearTimeout(_throttleTimeout);
590
- _throttleTimeout = void 0;
591
- }
592
-
593
- function scrollBy(el, x, y) {
594
- el.scrollLeft += x;
595
- el.scrollTop += y;
596
- }
597
-
598
- function clone(el) {
599
- var Polymer = window.Polymer;
600
- var $ = window.jQuery || window.Zepto;
601
-
602
- if (Polymer && Polymer.dom) {
603
- return Polymer.dom(el).cloneNode(true);
604
- } else if ($) {
605
- return $(el).clone(true)[0];
606
- } else {
607
- return el.cloneNode(true);
608
- }
609
- }
610
-
611
- function setRect(el, rect) {
612
- css(el, 'position', 'absolute');
613
- css(el, 'top', rect.top);
614
- css(el, 'left', rect.left);
615
- css(el, 'width', rect.width);
616
- css(el, 'height', rect.height);
617
- }
618
-
619
- function unsetRect(el) {
620
- css(el, 'position', '');
621
- css(el, 'top', '');
622
- css(el, 'left', '');
623
- css(el, 'width', '');
624
- css(el, 'height', '');
625
- }
626
-
627
- var expando = 'Sortable' + new Date().getTime();
628
-
629
- function AnimationStateManager() {
630
- var animationStates = [],
631
- animationCallbackId;
632
- return {
633
- captureAnimationState: function captureAnimationState() {
634
- animationStates = [];
635
- if (!this.options.animation) return;
636
- var children = [].slice.call(this.el.children);
637
-
638
- for (var i in children) {
639
- if (css(children[i], 'display') === 'none' || children[i] === Sortable$1.ghost) continue;
640
- animationStates.push({
641
- target: children[i],
642
- rect: getRect(children[i])
643
- });
644
- var fromRect = getRect(children[i]); // If animating: compensate for current animation
645
-
646
- if (children[i].thisAnimationDuration) {
647
- var childMatrix = matrix(children[i], true);
648
-
649
- if (childMatrix) {
650
- fromRect.top -= childMatrix.f;
651
- fromRect.left -= childMatrix.e;
652
- }
653
- }
654
-
655
- children[i].fromRect = fromRect;
656
- }
657
- },
658
- addAnimationState: function addAnimationState(state) {
659
- animationStates.push(state);
660
- },
661
- removeAnimationState: function removeAnimationState(target) {
662
- animationStates.splice(indexOfObject(animationStates, {
663
- target: target
664
- }), 1);
665
- },
666
- animateAll: function animateAll(callback) {
667
- if (!this.options.animation) {
668
- clearTimeout(animationCallbackId);
669
- if (typeof callback === 'function') callback();
670
- return;
671
- }
672
-
673
- var animating = false,
674
- animationTime = 0;
675
-
676
- for (var i in animationStates) {
677
- var time = 0,
678
- target = animationStates[i].target,
679
- fromRect = target.fromRect,
680
- toRect = getRect(target),
681
- prevFromRect = target.prevFromRect,
682
- prevToRect = target.prevToRect,
683
- animatingRect = animationStates[i].rect,
684
- targetMatrix = matrix(target, true);
685
-
686
- if (targetMatrix) {
687
- // Compensate for current animation
688
- toRect.top -= targetMatrix.f;
689
- toRect.left -= targetMatrix.e;
690
- }
691
-
692
- target.toRect = toRect; // If element is scrolled out of view: Do not animate
693
-
694
- if ((isScrolledPast(target, toRect, 'bottom', 'top') || isScrolledPast(target, toRect, 'top', 'bottom') || isScrolledPast(target, toRect, 'right', 'left') || isScrolledPast(target, toRect, 'left', 'right')) && (isScrolledPast(target, animatingRect, 'bottom', 'top') || isScrolledPast(target, animatingRect, 'top', 'bottom') || isScrolledPast(target, animatingRect, 'right', 'left') || isScrolledPast(target, animatingRect, 'left', 'right')) && (isScrolledPast(target, fromRect, 'bottom', 'top') || isScrolledPast(target, fromRect, 'top', 'bottom') || isScrolledPast(target, fromRect, 'right', 'left') || isScrolledPast(target, fromRect, 'left', 'right'))) continue;
695
-
696
- if (target.thisAnimationDuration) {
697
- // Could also check if animatingRect is between fromRect and toRect
698
- if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect
699
- (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) {
700
- // If returning to same place as started from animation and on same axis
701
- time = calculateRealTime(animatingRect, prevFromRect, prevToRect, this.options);
702
- }
703
- } // if fromRect != toRect: animate
704
-
705
-
706
- if (!isRectEqual(toRect, fromRect)) {
707
- target.prevFromRect = fromRect;
708
- target.prevToRect = toRect;
709
-
710
- if (!time) {
711
- time = this.options.animation;
712
- }
713
-
714
- this.animate(target, animatingRect, time);
715
- }
716
-
717
- if (time) {
718
- animating = true;
719
- animationTime = Math.max(animationTime, time);
720
- clearTimeout(target.animationResetTimer);
721
- target.animationResetTimer = setTimeout(function () {
722
- this.animationStates[this.i].target.animationTime = 0;
723
- this.animationStates[this.i].target.prevFromRect = null;
724
- this.animationStates[this.i].target.fromRect = null;
725
- this.animationStates[this.i].target.prevToRect = null;
726
- this.animationStates[this.i].target.thisAnimationDuration = null;
727
- }.bind({
728
- animationStates: animationStates,
729
- i: Number(i)
730
- }), time);
731
- target.thisAnimationDuration = time;
732
- }
733
- }
734
-
735
- clearTimeout(animationCallbackId);
736
-
737
- if (!animating) {
738
- if (typeof callback === 'function') callback();
739
- } else {
740
- animationCallbackId = setTimeout(function () {
741
- if (typeof callback === 'function') callback();
742
- }, animationTime);
743
- }
744
-
745
- animationStates = [];
746
- },
747
- animate: function animate(target, prev, duration) {
748
- if (duration) {
749
- css(target, 'transition', '');
750
- css(target, 'transform', '');
751
- var currentRect = getRect(target),
752
- elMatrix = matrix(this.el),
753
- scaleX = elMatrix && elMatrix.a,
754
- scaleY = elMatrix && elMatrix.d,
755
- translateX = (prev.left - currentRect.left) / (scaleX || 1),
756
- translateY = (prev.top - currentRect.top) / (scaleY || 1);
757
- target.animatingX = !!translateX;
758
- target.animatingY = !!translateY;
759
- css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)');
760
- repaint(target); // repaint
761
-
762
- css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : ''));
763
- css(target, 'transform', 'translate3d(0,0,0)');
764
- typeof target.animated === 'number' && clearTimeout(target.animated);
765
- target.animated = setTimeout(function () {
766
- css(target, 'transition', '');
767
- css(target, 'transform', '');
768
- target.animated = false;
769
- target.animatingX = false;
770
- target.animatingY = false;
771
- }, duration);
772
- }
773
- }
774
- };
775
- }
776
-
777
- function repaint(target) {
778
- return target.offsetWidth;
779
- }
780
-
781
- function calculateRealTime(animatingRect, fromRect, toRect, options) {
782
- return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation;
783
- }
784
-
785
- var plugins = [];
786
- var defaults = {
787
- initializeByDefault: true
788
- };
789
- var PluginManager = {
790
- mount: function mount(plugin) {
791
- // Set default static properties
792
- for (var option in defaults) {
793
- !(option in plugin) && (plugin[option] = defaults[option]);
794
- }
795
-
796
- plugins.push(plugin);
797
- },
798
- pluginEvent: function pluginEvent(eventName, sortable, evt) {
799
- this.eventCanceled = false;
800
- var eventNameGlobal = eventName + 'Global';
801
-
802
- for (var i in plugins) {
803
- if (!sortable[plugins[i].pluginName]) continue; // Fire global events if it exists in this sortable
804
-
805
- if (sortable[plugins[i].pluginName][eventNameGlobal]) {
806
- this.eventCanceled = !!sortable[plugins[i].pluginName][eventNameGlobal](_objectSpread({
807
- sortable: sortable
808
- }, evt));
809
- } // Only fire plugin event if plugin is enabled in this sortable,
810
- // and plugin has event defined
811
-
812
-
813
- if (sortable.options[plugins[i].pluginName] && sortable[plugins[i].pluginName][eventName]) {
814
- this.eventCanceled = this.eventCanceled || !!sortable[plugins[i].pluginName][eventName](_objectSpread({
815
- sortable: sortable
816
- }, evt));
817
- }
818
- }
819
- },
820
- initializePlugins: function initializePlugins(sortable, el, defaults) {
821
- for (var i in plugins) {
822
- var pluginName = plugins[i].pluginName;
823
- if (!sortable.options[pluginName] && !plugins[i].initializeByDefault) continue;
824
- var initialized = new plugins[i](sortable, el);
825
- initialized.sortable = sortable;
826
- sortable[pluginName] = initialized; // Add default options from plugin
827
-
828
- _extends(defaults, initialized.options);
829
- }
830
-
831
- for (var option in sortable.options) {
832
- var modified = this.modifyOption(sortable, option, sortable.options[option]);
833
-
834
- if (typeof modified !== 'undefined') {
835
- sortable.options[option] = modified;
836
- }
837
- }
838
- },
839
- getEventOptions: function getEventOptions(name, sortable) {
840
- var eventOptions = {};
841
-
842
- for (var i in plugins) {
843
- if (typeof plugins[i].eventOptions !== 'function') continue;
844
-
845
- _extends(eventOptions, plugins[i].eventOptions.call(sortable, name));
846
- }
847
-
848
- return eventOptions;
849
- },
850
- modifyOption: function modifyOption(sortable, name, value) {
851
- var modifiedValue;
852
-
853
- for (var i in plugins) {
854
- // Plugin must exist on the Sortable
855
- if (!sortable[plugins[i].pluginName]) continue; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin
856
-
857
- if (plugins[i].optionListeners && typeof plugins[i].optionListeners[name] === 'function') {
858
- modifiedValue = plugins[i].optionListeners[name].call(sortable[plugins[i].pluginName], value);
859
- }
860
- }
861
-
862
- return modifiedValue;
863
- }
864
- };
865
-
866
- function dispatchEvent(_ref) {
867
- var sortable = _ref.sortable,
868
- rootEl = _ref.rootEl,
869
- name = _ref.name,
870
- targetEl = _ref.targetEl,
871
- cloneEl = _ref.cloneEl,
872
- toEl = _ref.toEl,
873
- fromEl = _ref.fromEl,
874
- oldIndex = _ref.oldIndex,
875
- newIndex = _ref.newIndex,
876
- oldDraggableIndex = _ref.oldDraggableIndex,
877
- newDraggableIndex = _ref.newDraggableIndex,
878
- originalEvent = _ref.originalEvent,
879
- putSortable = _ref.putSortable,
880
- eventOptions = _ref.eventOptions;
881
- sortable = sortable || rootEl[expando];
882
- var evt,
883
- options = sortable.options,
884
- onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature
885
-
886
- if (window.CustomEvent && !IE11OrLess && !Edge) {
887
- evt = new CustomEvent(name, {
888
- bubbles: true,
889
- cancelable: true
890
- });
891
- } else {
892
- evt = document.createEvent('Event');
893
- evt.initEvent(name, true, true);
894
- }
895
-
896
- evt.to = toEl || rootEl;
897
- evt.from = fromEl || rootEl;
898
- evt.item = targetEl || rootEl;
899
- evt.clone = cloneEl;
900
- evt.oldIndex = oldIndex;
901
- evt.newIndex = newIndex;
902
- evt.oldDraggableIndex = oldDraggableIndex;
903
- evt.newDraggableIndex = newDraggableIndex;
904
- evt.originalEvent = originalEvent;
905
- evt.pullMode = putSortable ? putSortable.lastPutMode : undefined;
906
-
907
- var allEventOptions = _objectSpread({}, eventOptions, PluginManager.getEventOptions(name, sortable));
908
-
909
- for (var option in allEventOptions) {
910
- evt[option] = allEventOptions[option];
911
- }
912
-
913
- if (rootEl) {
914
- rootEl.dispatchEvent(evt);
915
- }
916
-
917
- if (options[onName]) {
918
- options[onName].call(sortable, evt);
919
- }
920
- }
921
-
922
- var pluginEvent = function pluginEvent(eventName, sortable) {
923
- var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
924
- originalEvent = _ref.evt,
925
- data = _objectWithoutProperties(_ref, ["evt"]);
926
-
927
- PluginManager.pluginEvent.bind(Sortable$1)(eventName, sortable, _objectSpread({
928
- dragEl: dragEl,
929
- parentEl: parentEl,
930
- ghostEl: ghostEl,
931
- rootEl: rootEl,
932
- nextEl: nextEl,
933
- lastDownEl: lastDownEl,
934
- cloneEl: cloneEl,
935
- cloneHidden: cloneHidden,
936
- dragStarted: moved,
937
- putSortable: putSortable,
938
- activeSortable: Sortable$1.active,
939
- originalEvent: originalEvent,
940
- oldIndex: oldIndex,
941
- oldDraggableIndex: oldDraggableIndex,
942
- newIndex: newIndex,
943
- newDraggableIndex: newDraggableIndex,
944
- hideGhostForTarget: _hideGhostForTarget,
945
- unhideGhostForTarget: _unhideGhostForTarget,
946
- cloneNowHidden: function cloneNowHidden() {
947
- cloneHidden = true;
948
- },
949
- cloneNowShown: function cloneNowShown() {
950
- cloneHidden = false;
951
- },
952
- dispatchSortableEvent: function dispatchSortableEvent(name) {
953
- _dispatchEvent({
954
- sortable: sortable,
955
- name: name,
956
- originalEvent: originalEvent
957
- });
958
- }
959
- }, data));
960
- };
961
-
962
- function _dispatchEvent(info) {
963
- dispatchEvent(_objectSpread({
964
- putSortable: putSortable,
965
- cloneEl: cloneEl,
966
- targetEl: dragEl,
967
- rootEl: rootEl,
968
- oldIndex: oldIndex,
969
- oldDraggableIndex: oldDraggableIndex,
970
- newIndex: newIndex,
971
- newDraggableIndex: newDraggableIndex
972
- }, info));
973
- }
974
-
975
- if (typeof window === "undefined" || !window.document) {
976
- throw new Error("Sortable.js requires a window with a document");
977
- }
978
-
979
- var dragEl,
980
- parentEl,
981
- ghostEl,
982
- rootEl,
983
- nextEl,
984
- lastDownEl,
985
- cloneEl,
986
- cloneHidden,
987
- oldIndex,
988
- newIndex,
989
- oldDraggableIndex,
990
- newDraggableIndex,
991
- activeGroup,
992
- putSortable,
993
- awaitingDragStarted = false,
994
- ignoreNextClick = false,
995
- sortables = [],
996
- tapEvt,
997
- touchEvt,
998
- moved,
999
- lastTarget,
1000
- lastDirection,
1001
- pastFirstInvertThresh = false,
1002
- isCircumstantialInvert = false,
1003
- targetMoveDistance,
1004
- // For positioning ghost absolutely
1005
- ghostRelativeParent,
1006
- ghostRelativeParentInitialScroll = [],
1007
- // (left, top)
1008
- _silent = false,
1009
- savedInputChecked = [];
1010
- /** @const */
1011
-
1012
- var PositionGhostAbsolutely = IOS,
1013
- CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float',
1014
- // This will not pass for IE9, because IE9 DnD only works on anchors
1015
- supportDraggable = 'draggable' in document.createElement('div'),
1016
- supportCssPointerEvents = function () {
1017
- // false when <= IE11
1018
- if (IE11OrLess) {
1019
- return false;
1020
- }
1021
-
1022
- var el = document.createElement('x');
1023
- el.style.cssText = 'pointer-events:auto';
1024
- return el.style.pointerEvents === 'auto';
1025
- }(),
1026
- _detectDirection = function _detectDirection(el, options) {
1027
- var elCSS = css(el),
1028
- elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth),
1029
- child1 = getChild(el, 0, options),
1030
- child2 = getChild(el, 1, options),
1031
- firstChildCSS = child1 && css(child1),
1032
- secondChildCSS = child2 && css(child2),
1033
- firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width,
1034
- secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width;
1035
-
1036
- if (elCSS.display === 'flex') {
1037
- return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal';
1038
- }
1039
-
1040
- if (elCSS.display === 'grid') {
1041
- return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal';
1042
- }
1043
-
1044
- if (child1 && firstChildCSS["float"] !== 'none') {
1045
- var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right';
1046
- return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal';
1047
- }
1048
-
1049
- return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal';
1050
- },
1051
- _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) {
1052
- var dragElS1Opp = vertical ? dragRect.left : dragRect.top,
1053
- dragElS2Opp = vertical ? dragRect.right : dragRect.bottom,
1054
- dragElOppLength = vertical ? dragRect.width : dragRect.height,
1055
- targetS1Opp = vertical ? targetRect.left : targetRect.top,
1056
- targetS2Opp = vertical ? targetRect.right : targetRect.bottom,
1057
- targetOppLength = vertical ? targetRect.width : targetRect.height;
1058
- return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2;
1059
- },
1060
-
1061
- /**
1062
- * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold.
1063
- * @param {Number} x X position
1064
- * @param {Number} y Y position
1065
- * @return {HTMLElement} Element of the first found nearest Sortable
1066
- */
1067
- _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) {
1068
- for (var i in sortables) {
1069
- if (lastChild(sortables[i])) continue;
1070
- var rect = getRect(sortables[i]),
1071
- threshold = sortables[i][expando].options.emptyInsertThreshold,
1072
- insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold,
1073
- insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold;
1074
-
1075
- if (threshold && insideHorizontally && insideVertically) {
1076
- return sortables[i];
1077
- }
1078
- }
1079
- },
1080
- _prepareGroup = function _prepareGroup(options) {
1081
- function toFn(value, pull) {
1082
- return function (to, from, dragEl, evt) {
1083
- var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name;
1084
-
1085
- if (value == null && (pull || sameGroup)) {
1086
- // Default pull value
1087
- // Default pull and put value if same group
1088
- return true;
1089
- } else if (value == null || value === false) {
1090
- return false;
1091
- } else if (pull && value === 'clone') {
1092
- return value;
1093
- } else if (typeof value === 'function') {
1094
- return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt);
1095
- } else {
1096
- var otherGroup = (pull ? to : from).options.group.name;
1097
- return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1;
1098
- }
1099
- };
1100
- }
1101
-
1102
- var group = {};
1103
- var originalGroup = options.group;
1104
-
1105
- if (!originalGroup || _typeof(originalGroup) != 'object') {
1106
- originalGroup = {
1107
- name: originalGroup
1108
- };
1109
- }
1110
-
1111
- group.name = originalGroup.name;
1112
- group.checkPull = toFn(originalGroup.pull, true);
1113
- group.checkPut = toFn(originalGroup.put);
1114
- group.revertClone = originalGroup.revertClone;
1115
- options.group = group;
1116
- },
1117
- _hideGhostForTarget = function _hideGhostForTarget() {
1118
- if (!supportCssPointerEvents && ghostEl) {
1119
- css(ghostEl, 'display', 'none');
1120
- }
1121
- },
1122
- _unhideGhostForTarget = function _unhideGhostForTarget() {
1123
- if (!supportCssPointerEvents && ghostEl) {
1124
- css(ghostEl, 'display', '');
1125
- }
1126
- }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position
1127
-
1128
-
1129
- document.addEventListener('click', function (evt) {
1130
- if (ignoreNextClick) {
1131
- evt.preventDefault();
1132
- evt.stopPropagation && evt.stopPropagation();
1133
- evt.stopImmediatePropagation && evt.stopImmediatePropagation();
1134
- ignoreNextClick = false;
1135
- return false;
1136
- }
1137
- }, true);
1138
-
1139
- var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) {
1140
- if (dragEl) {
1141
- evt = evt.touches ? evt.touches[0] : evt;
1142
-
1143
- var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY);
1144
-
1145
- if (nearest) {
1146
- // Create imitation event
1147
- var event = {};
1148
-
1149
- for (var i in evt) {
1150
- event[i] = evt[i];
1151
- }
1152
-
1153
- event.target = event.rootEl = nearest;
1154
- event.preventDefault = void 0;
1155
- event.stopPropagation = void 0;
1156
-
1157
- nearest[expando]._onDragOver(event);
1158
- }
1159
- }
1160
- };
1161
-
1162
- var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) {
1163
- if (dragEl) {
1164
- dragEl.parentNode[expando]._isOutsideThisEl(evt.target);
1165
- }
1166
- };
1167
- /**
1168
- * @class Sortable
1169
- * @param {HTMLElement} el
1170
- * @param {Object} [options]
1171
- */
1172
-
1173
-
1174
- function Sortable$1(el, options) {
1175
- if (!(el && el.nodeType && el.nodeType === 1)) {
1176
- throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el));
1177
- }
1178
-
1179
- this.el = el; // root element
1180
-
1181
- this.options = options = _extends({}, options); // Export instance
1182
-
1183
- el[expando] = this;
1184
- var defaults = {
1185
- group: null,
1186
- sort: true,
1187
- disabled: false,
1188
- store: null,
1189
- handle: null,
1190
- draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*',
1191
- swapThreshold: 1,
1192
- // percentage; 0 <= x <= 1
1193
- invertSwap: false,
1194
- // invert always
1195
- invertedSwapThreshold: null,
1196
- // will be set to same as swapThreshold if default
1197
- removeCloneOnHide: true,
1198
- direction: function direction() {
1199
- return _detectDirection(el, this.options);
1200
- },
1201
- ghostClass: 'sortable-ghost',
1202
- chosenClass: 'sortable-chosen',
1203
- dragClass: 'sortable-drag',
1204
- ignore: 'a, img',
1205
- filter: null,
1206
- preventOnFilter: true,
1207
- animation: 0,
1208
- easing: null,
1209
- setData: function setData(dataTransfer, dragEl) {
1210
- dataTransfer.setData('Text', dragEl.textContent);
1211
- },
1212
- dropBubble: false,
1213
- dragoverBubble: false,
1214
- dataIdAttr: 'data-id',
1215
- delay: 0,
1216
- delayOnTouchOnly: false,
1217
- touchStartThreshold: Number.parseInt(window.devicePixelRatio, 10) || 1,
1218
- forceFallback: false,
1219
- fallbackClass: 'sortable-fallback',
1220
- fallbackOnBody: false,
1221
- fallbackTolerance: 0,
1222
- fallbackOffset: {
1223
- x: 0,
1224
- y: 0
1225
- },
1226
- supportPointer: Sortable$1.supportPointer !== false && 'PointerEvent' in window,
1227
- emptyInsertThreshold: 5
1228
- };
1229
- PluginManager.initializePlugins(this, el, defaults); // Set default options
1230
-
1231
- for (var name in defaults) {
1232
- !(name in options) && (options[name] = defaults[name]);
1233
- }
1234
-
1235
- _prepareGroup(options); // Bind all private methods
1236
-
1237
-
1238
- for (var fn in this) {
1239
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
1240
- this[fn] = this[fn].bind(this);
1241
- }
1242
- } // Setup drag mode
1243
-
1244
-
1245
- this.nativeDraggable = options.forceFallback ? false : supportDraggable;
1246
-
1247
- if (this.nativeDraggable) {
1248
- // Touch start threshold cannot be greater than the native dragstart threshold
1249
- this.options.touchStartThreshold = 1;
1250
- } // Bind events
1251
-
1252
-
1253
- if (options.supportPointer) {
1254
- on(el, 'pointerdown', this._onTapStart);
1255
- } else {
1256
- on(el, 'mousedown', this._onTapStart);
1257
- on(el, 'touchstart', this._onTapStart);
1258
- }
1259
-
1260
- if (this.nativeDraggable) {
1261
- on(el, 'dragover', this);
1262
- on(el, 'dragenter', this);
1263
- }
1264
-
1265
- sortables.push(this.el); // Restore sorting
1266
-
1267
- options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager
1268
-
1269
- _extends(this, AnimationStateManager());
1270
- }
1271
-
1272
- Sortable$1.prototype =
1273
- /** @lends Sortable.prototype */
1274
- {
1275
- constructor: Sortable$1,
1276
- _isOutsideThisEl: function _isOutsideThisEl(target) {
1277
- if (!this.el.contains(target) && target !== this.el) {
1278
- lastTarget = null;
1279
- }
1280
- },
1281
- _getDirection: function _getDirection(evt, target) {
1282
- return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction;
1283
- },
1284
- _onTapStart: function _onTapStart(
1285
- /** Event|TouchEvent */
1286
- evt) {
1287
- if (!evt.cancelable) return;
1288
-
1289
- var _this = this,
1290
- el = this.el,
1291
- options = this.options,
1292
- preventOnFilter = options.preventOnFilter,
1293
- type = evt.type,
1294
- touch = evt.touches && evt.touches[0],
1295
- target = (touch || evt).target,
1296
- originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target,
1297
- filter = options.filter;
1298
-
1299
- _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group.
1300
-
1301
-
1302
- if (dragEl) {
1303
- return;
1304
- }
1305
-
1306
- if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) {
1307
- return; // only left button and enabled
1308
- } // cancel dnd if original target is content editable
1309
-
1310
-
1311
- if (originalTarget.isContentEditable) {
1312
- return;
1313
- }
1314
-
1315
- target = closest(target, options.draggable, el, false);
1316
-
1317
- if (target && target.animated) {
1318
- return;
1319
- }
1320
-
1321
- if (lastDownEl === target) {
1322
- // Ignoring duplicate `down`
1323
- return;
1324
- } // Get the index of the dragged element within its parent
1325
-
1326
-
1327
- oldIndex = index(target);
1328
- oldDraggableIndex = index(target, options.draggable); // Check filter
1329
-
1330
- if (typeof filter === 'function') {
1331
- if (filter.call(this, evt, target, this)) {
1332
- _dispatchEvent({
1333
- sortable: _this,
1334
- rootEl: originalTarget,
1335
- name: 'filter',
1336
- targetEl: target,
1337
- toEl: el,
1338
- fromEl: el
1339
- });
1340
-
1341
- pluginEvent('filter', _this, {
1342
- evt: evt
1343
- });
1344
- preventOnFilter && evt.cancelable && evt.preventDefault();
1345
- return; // cancel dnd
1346
- }
1347
- } else if (filter) {
1348
- filter = filter.split(',').some(function (criteria) {
1349
- criteria = closest(originalTarget, criteria.trim(), el, false);
1350
-
1351
- if (criteria) {
1352
- _dispatchEvent({
1353
- sortable: _this,
1354
- rootEl: criteria,
1355
- name: 'filter',
1356
- targetEl: target,
1357
- fromEl: el,
1358
- toEl: el
1359
- });
1360
-
1361
- pluginEvent('filter', _this, {
1362
- evt: evt
1363
- });
1364
- return true;
1365
- }
1366
- });
1367
-
1368
- if (filter) {
1369
- preventOnFilter && evt.cancelable && evt.preventDefault();
1370
- return; // cancel dnd
1371
- }
1372
- }
1373
-
1374
- if (options.handle && !closest(originalTarget, options.handle, el, false)) {
1375
- return;
1376
- } // Prepare `dragstart`
1377
-
1378
-
1379
- this._prepareDragStart(evt, touch, target);
1380
- },
1381
- _prepareDragStart: function _prepareDragStart(
1382
- /** Event */
1383
- evt,
1384
- /** Touch */
1385
- touch,
1386
- /** HTMLElement */
1387
- target) {
1388
- var _this = this,
1389
- el = _this.el,
1390
- options = _this.options,
1391
- ownerDocument = el.ownerDocument,
1392
- dragStartFn;
1393
-
1394
- if (target && !dragEl && target.parentNode === el) {
1395
- rootEl = el;
1396
- dragEl = target;
1397
- parentEl = dragEl.parentNode;
1398
- nextEl = dragEl.nextSibling;
1399
- lastDownEl = target;
1400
- activeGroup = options.group;
1401
- Sortable$1.dragged = dragEl;
1402
- tapEvt = {
1403
- target: dragEl,
1404
- clientX: (touch || evt).clientX,
1405
- clientY: (touch || evt).clientY
1406
- };
1407
- this._lastX = (touch || evt).clientX;
1408
- this._lastY = (touch || evt).clientY;
1409
- dragEl.style['will-change'] = 'all';
1410
-
1411
- dragStartFn = function dragStartFn() {
1412
- pluginEvent('delayEnded', _this, {
1413
- evt: evt
1414
- });
1415
-
1416
- if (Sortable$1.eventCanceled) {
1417
- _this._onDrop();
1418
-
1419
- return;
1420
- } // Delayed drag has been triggered
1421
- // we can re-enable the events: touchmove/mousemove
1422
-
1423
-
1424
- _this._disableDelayedDragEvents();
1425
-
1426
- if (!FireFox && _this.nativeDraggable) {
1427
- dragEl.draggable = true;
1428
- } // Bind the events: dragstart/dragend
1429
-
1430
-
1431
- _this._triggerDragStart(evt, touch); // Drag start event
1432
-
1433
-
1434
- _dispatchEvent({
1435
- sortable: _this,
1436
- name: 'choose',
1437
- originalEvent: evt
1438
- }); // Chosen item
1439
-
1440
-
1441
- toggleClass(dragEl, options.chosenClass, true);
1442
- }; // Disable "draggable"
1443
-
1444
-
1445
- options.ignore.split(',').forEach(function (criteria) {
1446
- find(dragEl, criteria.trim(), _disableDraggable);
1447
- });
1448
- on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent);
1449
- on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent);
1450
- on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent);
1451
- on(ownerDocument, 'mouseup', _this._onDrop);
1452
- on(ownerDocument, 'touchend', _this._onDrop);
1453
- on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox)
1454
-
1455
- if (FireFox && this.nativeDraggable) {
1456
- this.options.touchStartThreshold = 4;
1457
- dragEl.draggable = true;
1458
- }
1459
-
1460
- pluginEvent('delayStart', this, {
1461
- evt: evt
1462
- }); // Delay is impossible for native DnD in Edge or IE
1463
-
1464
- if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) {
1465
- if (Sortable$1.eventCanceled) {
1466
- this._onDrop();
1467
-
1468
- return;
1469
- } // If the user moves the pointer or let go the click or touch
1470
- // before the delay has been reached:
1471
- // disable the delayed drag
1472
-
1473
-
1474
- on(ownerDocument, 'mouseup', _this._disableDelayedDrag);
1475
- on(ownerDocument, 'touchend', _this._disableDelayedDrag);
1476
- on(ownerDocument, 'touchcancel', _this._disableDelayedDrag);
1477
- on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler);
1478
- on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler);
1479
- options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler);
1480
- _this._dragStartTimer = setTimeout(dragStartFn, options.delay);
1481
- } else {
1482
- dragStartFn();
1483
- }
1484
- }
1485
- },
1486
- _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler(
1487
- /** TouchEvent|PointerEvent **/
1488
- e) {
1489
- var touch = e.touches ? e.touches[0] : e;
1490
-
1491
- if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) {
1492
- this._disableDelayedDrag();
1493
- }
1494
- },
1495
- _disableDelayedDrag: function _disableDelayedDrag() {
1496
- dragEl && _disableDraggable(dragEl);
1497
- clearTimeout(this._dragStartTimer);
1498
-
1499
- this._disableDelayedDragEvents();
1500
- },
1501
- _disableDelayedDragEvents: function _disableDelayedDragEvents() {
1502
- var ownerDocument = this.el.ownerDocument;
1503
- off(ownerDocument, 'mouseup', this._disableDelayedDrag);
1504
- off(ownerDocument, 'touchend', this._disableDelayedDrag);
1505
- off(ownerDocument, 'touchcancel', this._disableDelayedDrag);
1506
- off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler);
1507
- off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler);
1508
- off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler);
1509
- },
1510
- _triggerDragStart: function _triggerDragStart(
1511
- /** Event */
1512
- evt,
1513
- /** Touch */
1514
- touch) {
1515
- touch = touch || (evt.pointerType == 'touch' ? evt : null);
1516
-
1517
- if (!this.nativeDraggable || touch) {
1518
- if (this.options.supportPointer) {
1519
- on(document, 'pointermove', this._onTouchMove);
1520
- } else if (touch) {
1521
- on(document, 'touchmove', this._onTouchMove);
1522
- } else {
1523
- on(document, 'mousemove', this._onTouchMove);
1524
- }
1525
- } else {
1526
- on(dragEl, 'dragend', this);
1527
- on(rootEl, 'dragstart', this._onDragStart);
1528
- }
1529
-
1530
- try {
1531
- if (document.selection) {
1532
- // Timeout neccessary for IE9
1533
- _nextTick(function () {
1534
- document.selection.empty();
1535
- });
1536
- } else {
1537
- window.getSelection().removeAllRanges();
1538
- }
1539
- } catch (err) {}
1540
- },
1541
- _dragStarted: function _dragStarted(fallback, evt) {
1542
-
1543
- awaitingDragStarted = false;
1544
-
1545
- if (rootEl && dragEl) {
1546
- pluginEvent('dragStarted', this, {
1547
- evt: evt
1548
- });
1549
-
1550
- if (this.nativeDraggable) {
1551
- on(document, 'dragover', _checkOutsideTargetEl);
1552
- }
1553
-
1554
- var options = this.options; // Apply effect
1555
-
1556
- !fallback && toggleClass(dragEl, options.dragClass, false);
1557
- toggleClass(dragEl, options.ghostClass, true);
1558
- Sortable$1.active = this;
1559
- fallback && this._appendGhost(); // Drag start event
1560
-
1561
- _dispatchEvent({
1562
- sortable: this,
1563
- name: 'start',
1564
- originalEvent: evt
1565
- });
1566
- } else {
1567
- this._nulling();
1568
- }
1569
- },
1570
- _emulateDragOver: function _emulateDragOver() {
1571
- if (touchEvt) {
1572
- this._lastX = touchEvt.clientX;
1573
- this._lastY = touchEvt.clientY;
1574
-
1575
- _hideGhostForTarget();
1576
-
1577
- var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1578
- var parent = target;
1579
-
1580
- while (target && target.shadowRoot) {
1581
- target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY);
1582
- if (target === parent) break;
1583
- parent = target;
1584
- }
1585
-
1586
- dragEl.parentNode[expando]._isOutsideThisEl(target);
1587
-
1588
- if (parent) {
1589
- do {
1590
- if (parent[expando]) {
1591
- var inserted = void 0;
1592
- inserted = parent[expando]._onDragOver({
1593
- clientX: touchEvt.clientX,
1594
- clientY: touchEvt.clientY,
1595
- target: target,
1596
- rootEl: parent
1597
- });
1598
-
1599
- if (inserted && !this.options.dragoverBubble) {
1600
- break;
1601
- }
1602
- }
1603
-
1604
- target = parent; // store last element
1605
- }
1606
- /* jshint boss:true */
1607
- while (parent = parent.parentNode);
1608
- }
1609
-
1610
- _unhideGhostForTarget();
1611
- }
1612
- },
1613
- _onTouchMove: function _onTouchMove(
1614
- /**TouchEvent*/
1615
- evt) {
1616
- if (tapEvt) {
1617
- var options = this.options,
1618
- fallbackTolerance = options.fallbackTolerance,
1619
- fallbackOffset = options.fallbackOffset,
1620
- touch = evt.touches ? evt.touches[0] : evt,
1621
- ghostMatrix = ghostEl && matrix(ghostEl),
1622
- scaleX = ghostEl && ghostMatrix && ghostMatrix.a,
1623
- scaleY = ghostEl && ghostMatrix && ghostMatrix.d,
1624
- relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent),
1625
- dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1),
1626
- dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1),
1627
- translate3d = evt.touches ? 'translate3d(' + dx + 'px,' + dy + 'px,0)' : 'translate(' + dx + 'px,' + dy + 'px)'; // only set the status to dragging, when we are actually dragging
1628
-
1629
- if (!Sortable$1.active && !awaitingDragStarted) {
1630
- if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) {
1631
- return;
1632
- }
1633
-
1634
- this._onDragStart(evt, true);
1635
- }
1636
-
1637
- touchEvt = touch;
1638
- css(ghostEl, 'webkitTransform', translate3d);
1639
- css(ghostEl, 'mozTransform', translate3d);
1640
- css(ghostEl, 'msTransform', translate3d);
1641
- css(ghostEl, 'transform', translate3d);
1642
- evt.cancelable && evt.preventDefault();
1643
- }
1644
- },
1645
- _appendGhost: function _appendGhost() {
1646
- // Bug if using scale(): https://stackoverflow.com/questions/2637058
1647
- // Not being adjusted for
1648
- if (!ghostEl) {
1649
- var container = this.options.fallbackOnBody ? document.body : rootEl,
1650
- rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container),
1651
- options = this.options; // Position absolutely
1652
-
1653
- if (PositionGhostAbsolutely) {
1654
- // Get relatively positioned parent
1655
- ghostRelativeParent = container;
1656
-
1657
- while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) {
1658
- ghostRelativeParent = ghostRelativeParent.parentNode;
1659
- }
1660
-
1661
- if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) {
1662
- if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement();
1663
- rect.top += ghostRelativeParent.scrollTop;
1664
- rect.left += ghostRelativeParent.scrollLeft;
1665
- } else {
1666
- ghostRelativeParent = getWindowScrollingElement();
1667
- }
1668
-
1669
- ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent);
1670
- }
1671
-
1672
- ghostEl = dragEl.cloneNode(true);
1673
- toggleClass(ghostEl, options.ghostClass, false);
1674
- toggleClass(ghostEl, options.fallbackClass, true);
1675
- toggleClass(ghostEl, options.dragClass, true);
1676
- css(ghostEl, 'transition', '');
1677
- css(ghostEl, 'transform', '');
1678
- css(ghostEl, 'box-sizing', 'border-box');
1679
- css(ghostEl, 'margin', 0);
1680
- css(ghostEl, 'top', rect.top);
1681
- css(ghostEl, 'left', rect.left);
1682
- css(ghostEl, 'width', rect.width);
1683
- css(ghostEl, 'height', rect.height);
1684
- css(ghostEl, 'opacity', '0.8');
1685
- css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed');
1686
- css(ghostEl, 'zIndex', '100000');
1687
- css(ghostEl, 'pointerEvents', 'none');
1688
- Sortable$1.ghost = ghostEl;
1689
- container.appendChild(ghostEl);
1690
- }
1691
- },
1692
- _onDragStart: function _onDragStart(
1693
- /**Event*/
1694
- evt,
1695
- /**boolean*/
1696
- fallback) {
1697
- var _this = this;
1698
-
1699
- var dataTransfer = evt.dataTransfer;
1700
- var options = _this.options;
1701
- pluginEvent('dragStart', this, {
1702
- evt: evt
1703
- });
1704
-
1705
- if (Sortable$1.eventCanceled) {
1706
- this._onDrop();
1707
-
1708
- return;
1709
- }
1710
-
1711
- pluginEvent('setupClone', this);
1712
-
1713
- if (!Sortable$1.eventCanceled) {
1714
- cloneEl = clone(dragEl);
1715
- cloneEl.draggable = false;
1716
- cloneEl.style['will-change'] = '';
1717
-
1718
- this._hideClone();
1719
-
1720
- toggleClass(cloneEl, this.options.chosenClass, false);
1721
- Sortable$1.clone = cloneEl;
1722
- } // #1143: IFrame support workaround
1723
-
1724
-
1725
- _this.cloneId = _nextTick(function () {
1726
- pluginEvent('clone', _this);
1727
- if (Sortable$1.eventCanceled) return;
1728
-
1729
- if (!_this.options.removeCloneOnHide) {
1730
- rootEl.insertBefore(cloneEl, dragEl);
1731
- }
1732
-
1733
- _this._hideClone();
1734
-
1735
- _dispatchEvent({
1736
- sortable: _this,
1737
- name: 'clone'
1738
- });
1739
- });
1740
- !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events
1741
-
1742
- if (fallback) {
1743
- ignoreNextClick = true;
1744
- _this._loopId = setInterval(_this._emulateDragOver, 50);
1745
- } else {
1746
- // Undo what was set in _prepareDragStart before drag started
1747
- off(document, 'mouseup', _this._onDrop);
1748
- off(document, 'touchend', _this._onDrop);
1749
- off(document, 'touchcancel', _this._onDrop);
1750
-
1751
- if (dataTransfer) {
1752
- dataTransfer.effectAllowed = 'move';
1753
- options.setData && options.setData.call(_this, dataTransfer, dragEl);
1754
- }
1755
-
1756
- on(document, 'drop', _this); // #1276 fix:
1757
-
1758
- css(dragEl, 'transform', 'translateZ(0)');
1759
- }
1760
-
1761
- awaitingDragStarted = true;
1762
- _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt));
1763
- on(document, 'selectstart', _this);
1764
- moved = true;
1765
-
1766
- if (Safari) {
1767
- css(document.body, 'user-select', 'none');
1768
- }
1769
- },
1770
- // Returns true - if no further action is needed (either inserted or another condition)
1771
- _onDragOver: function _onDragOver(
1772
- /**Event*/
1773
- evt) {
1774
- var el = this.el,
1775
- target = evt.target,
1776
- dragRect,
1777
- targetRect,
1778
- revert,
1779
- options = this.options,
1780
- group = options.group,
1781
- activeSortable = Sortable$1.active,
1782
- isOwner = activeGroup === group,
1783
- canSort = options.sort,
1784
- fromSortable = putSortable || activeSortable,
1785
- vertical,
1786
- _this = this,
1787
- completedFired = false;
1788
-
1789
- if (_silent) return;
1790
-
1791
- function dragOverEvent(name, extra) {
1792
- pluginEvent(name, _this, _objectSpread({
1793
- evt: evt,
1794
- isOwner: isOwner,
1795
- axis: vertical ? 'vertical' : 'horizontal',
1796
- revert: revert,
1797
- dragRect: dragRect,
1798
- targetRect: targetRect,
1799
- canSort: canSort,
1800
- fromSortable: fromSortable,
1801
- target: target,
1802
- completed: completed,
1803
- onMove: function onMove(target, after) {
1804
- return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after);
1805
- },
1806
- changed: changed
1807
- }, extra));
1808
- } // Capture animation state
1809
-
1810
-
1811
- function capture() {
1812
- dragOverEvent('dragOverAnimationCapture');
1813
-
1814
- _this.captureAnimationState();
1815
-
1816
- if (_this !== fromSortable) {
1817
- fromSortable.captureAnimationState();
1818
- }
1819
- } // Return invocation when dragEl is inserted (or completed)
1820
-
1821
-
1822
- function completed(insertion) {
1823
- dragOverEvent('dragOverCompleted', {
1824
- insertion: insertion
1825
- });
1826
-
1827
- if (insertion) {
1828
- // Clones must be hidden before folding animation to capture dragRectAbsolute properly
1829
- if (isOwner) {
1830
- activeSortable._hideClone();
1831
- } else {
1832
- activeSortable._showClone(_this);
1833
- }
1834
-
1835
- if (_this !== fromSortable) {
1836
- // Set ghost class to new sortable's ghost class
1837
- toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false);
1838
- toggleClass(dragEl, options.ghostClass, true);
1839
- }
1840
-
1841
- if (putSortable !== _this && _this !== Sortable$1.active) {
1842
- putSortable = _this;
1843
- } else if (_this === Sortable$1.active && putSortable) {
1844
- putSortable = null;
1845
- } // Animation
1846
-
1847
-
1848
- if (fromSortable === _this) {
1849
- _this._ignoreWhileAnimating = target;
1850
- }
1851
-
1852
- _this.animateAll(function () {
1853
- dragOverEvent('dragOverAnimationComplete');
1854
- _this._ignoreWhileAnimating = null;
1855
- });
1856
-
1857
- if (_this !== fromSortable) {
1858
- fromSortable.animateAll();
1859
- fromSortable._ignoreWhileAnimating = null;
1860
- }
1861
- } // Null lastTarget if it is not inside a previously swapped element
1862
-
1863
-
1864
- if (target === dragEl && !dragEl.animated || target === el && !target.animated) {
1865
- lastTarget = null;
1866
- } // no bubbling and not fallback
1867
-
1868
-
1869
- if (!options.dragoverBubble && !evt.rootEl && target !== document) {
1870
- dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted
1871
-
1872
-
1873
- !insertion && nearestEmptyInsertDetectEvent(evt);
1874
- }
1875
-
1876
- !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation();
1877
- return completedFired = true;
1878
- } // Call when dragEl has been inserted
1879
-
1880
-
1881
- function changed() {
1882
- newIndex = index(dragEl);
1883
- newDraggableIndex = index(dragEl, options.draggable);
1884
-
1885
- _dispatchEvent({
1886
- sortable: _this,
1887
- name: 'change',
1888
- toEl: el,
1889
- newIndex: newIndex,
1890
- newDraggableIndex: newDraggableIndex,
1891
- originalEvent: evt
1892
- });
1893
- }
1894
-
1895
- if (evt.preventDefault !== void 0) {
1896
- evt.cancelable && evt.preventDefault();
1897
- }
1898
-
1899
- target = closest(target, options.draggable, el, true);
1900
- dragOverEvent('dragOver');
1901
- if (Sortable$1.eventCanceled) return completedFired;
1902
-
1903
- if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) {
1904
- return completed(false);
1905
- }
1906
-
1907
- ignoreNextClick = false;
1908
-
1909
- if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = !rootEl.contains(dragEl)) // Reverting item into the original list
1910
- : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) {
1911
- vertical = this._getDirection(evt, target) === 'vertical';
1912
- dragRect = getRect(dragEl);
1913
- dragOverEvent('dragOverValid');
1914
- if (Sortable$1.eventCanceled) return completedFired;
1915
-
1916
- if (revert) {
1917
- parentEl = rootEl; // actualization
1918
-
1919
- capture();
1920
-
1921
- this._hideClone();
1922
-
1923
- dragOverEvent('revert');
1924
-
1925
- if (!Sortable$1.eventCanceled) {
1926
- if (nextEl) {
1927
- rootEl.insertBefore(dragEl, nextEl);
1928
- } else {
1929
- rootEl.appendChild(dragEl);
1930
- }
1931
- }
1932
-
1933
- return completed(true);
1934
- }
1935
-
1936
- var elLastChild = lastChild(el, options.draggable);
1937
-
1938
- if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) {
1939
- // If already at end of list: Do not insert
1940
- if (elLastChild === dragEl) {
1941
- return completed(false);
1942
- } // assign target only if condition is true
1943
-
1944
-
1945
- if (elLastChild && el === evt.target) {
1946
- target = elLastChild;
1947
- }
1948
-
1949
- if (target) {
1950
- targetRect = getRect(target);
1951
- }
1952
-
1953
- if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) {
1954
- capture();
1955
- el.appendChild(dragEl);
1956
- parentEl = el; // actualization
1957
-
1958
- changed();
1959
- return completed(true);
1960
- }
1961
- } else if (target.parentNode === el) {
1962
- targetRect = getRect(target);
1963
- var direction = 0,
1964
- targetBeforeFirstSwap,
1965
- differentLevel = dragEl.parentNode !== el,
1966
- differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical),
1967
- side1 = vertical ? 'top' : 'left',
1968
- scrolledPastTop = isScrolledPast(target, null, 'top', 'top') || isScrolledPast(dragEl, null, 'top', 'top'),
1969
- scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0;
1970
-
1971
- if (lastTarget !== target) {
1972
- targetBeforeFirstSwap = targetRect[side1];
1973
- pastFirstInvertThresh = false;
1974
- isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel;
1975
- }
1976
-
1977
- direction = _getSwapDirection(evt, target, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target);
1978
- var sibling;
1979
-
1980
- if (direction !== 0) {
1981
- // Check if target is beside dragEl in respective direction (ignoring hidden elements)
1982
- var dragIndex = index(dragEl);
1983
-
1984
- do {
1985
- dragIndex -= direction;
1986
- sibling = parentEl.children[dragIndex];
1987
- } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl));
1988
- } // If dragEl is already beside target: Do not insert
1989
-
1990
-
1991
- if (direction === 0 || sibling === target) {
1992
- return completed(false);
1993
- }
1994
-
1995
- lastTarget = target;
1996
- lastDirection = direction;
1997
- var nextSibling = target.nextElementSibling,
1998
- after = false;
1999
- after = direction === 1;
2000
-
2001
- var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after);
2002
-
2003
- if (moveVector !== false) {
2004
- if (moveVector === 1 || moveVector === -1) {
2005
- after = moveVector === 1;
2006
- }
2007
-
2008
- _silent = true;
2009
- setTimeout(_unsilent, 30);
2010
- capture();
2011
-
2012
- if (after && !nextSibling) {
2013
- el.appendChild(dragEl);
2014
- } else {
2015
- target.parentNode.insertBefore(dragEl, after ? nextSibling : target);
2016
- } // Undo chrome's scroll adjustment (has no effect on other browsers)
2017
-
2018
-
2019
- if (scrolledPastTop) {
2020
- scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop);
2021
- }
2022
-
2023
- parentEl = dragEl.parentNode; // actualization
2024
- // must be done before animation
2025
-
2026
- if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) {
2027
- targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]);
2028
- }
2029
-
2030
- changed();
2031
- return completed(true);
2032
- }
2033
- }
2034
-
2035
- if (el.contains(dragEl)) {
2036
- return completed(false);
2037
- }
2038
- }
2039
-
2040
- return false;
2041
- },
2042
- _ignoreWhileAnimating: null,
2043
- _offMoveEvents: function _offMoveEvents() {
2044
- off(document, 'mousemove', this._onTouchMove);
2045
- off(document, 'touchmove', this._onTouchMove);
2046
- off(document, 'pointermove', this._onTouchMove);
2047
- off(document, 'dragover', nearestEmptyInsertDetectEvent);
2048
- off(document, 'mousemove', nearestEmptyInsertDetectEvent);
2049
- off(document, 'touchmove', nearestEmptyInsertDetectEvent);
2050
- },
2051
- _offUpEvents: function _offUpEvents() {
2052
- var ownerDocument = this.el.ownerDocument;
2053
- off(ownerDocument, 'mouseup', this._onDrop);
2054
- off(ownerDocument, 'touchend', this._onDrop);
2055
- off(ownerDocument, 'pointerup', this._onDrop);
2056
- off(ownerDocument, 'touchcancel', this._onDrop);
2057
- off(document, 'selectstart', this);
2058
- },
2059
- _onDrop: function _onDrop(
2060
- /**Event*/
2061
- evt) {
2062
- var el = this.el,
2063
- options = this.options; // Get the index of the dragged element within its parent
2064
-
2065
- newIndex = index(dragEl);
2066
- newDraggableIndex = index(dragEl, options.draggable);
2067
- pluginEvent('drop', this, {
2068
- evt: evt
2069
- }); // Get again after plugin event
2070
-
2071
- newIndex = index(dragEl);
2072
- newDraggableIndex = index(dragEl, options.draggable);
2073
-
2074
- if (Sortable$1.eventCanceled) {
2075
- this._nulling();
2076
-
2077
- return;
2078
- }
2079
-
2080
- awaitingDragStarted = false;
2081
- isCircumstantialInvert = false;
2082
- pastFirstInvertThresh = false;
2083
- clearInterval(this._loopId);
2084
- clearTimeout(this._dragStartTimer);
2085
-
2086
- _cancelNextTick(this.cloneId);
2087
-
2088
- _cancelNextTick(this._dragStartId); // Unbind events
2089
-
2090
-
2091
- if (this.nativeDraggable) {
2092
- off(document, 'drop', this);
2093
- off(el, 'dragstart', this._onDragStart);
2094
- }
2095
-
2096
- this._offMoveEvents();
2097
-
2098
- this._offUpEvents();
2099
-
2100
- if (Safari) {
2101
- css(document.body, 'user-select', '');
2102
- }
2103
-
2104
- if (evt) {
2105
- if (moved) {
2106
- evt.cancelable && evt.preventDefault();
2107
- !options.dropBubble && evt.stopPropagation();
2108
- }
2109
-
2110
- ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl);
2111
-
2112
- if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
2113
- // Remove clone(s)
2114
- cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl);
2115
- }
2116
-
2117
- if (dragEl) {
2118
- if (this.nativeDraggable) {
2119
- off(dragEl, 'dragend', this);
2120
- }
2121
-
2122
- _disableDraggable(dragEl);
2123
-
2124
- dragEl.style['will-change'] = ''; // Remove classes
2125
- // ghostClass is added in dragStarted
2126
-
2127
- if (moved && !awaitingDragStarted) {
2128
- toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false);
2129
- }
2130
-
2131
- toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event
2132
-
2133
- _dispatchEvent({
2134
- sortable: this,
2135
- name: 'unchoose',
2136
- toEl: parentEl,
2137
- newIndex: null,
2138
- newDraggableIndex: null,
2139
- originalEvent: evt
2140
- });
2141
-
2142
- if (rootEl !== parentEl) {
2143
- if (newIndex >= 0) {
2144
- // Add event
2145
- _dispatchEvent({
2146
- rootEl: parentEl,
2147
- name: 'add',
2148
- toEl: parentEl,
2149
- fromEl: rootEl,
2150
- originalEvent: evt
2151
- }); // Remove event
2152
-
2153
-
2154
- _dispatchEvent({
2155
- sortable: this,
2156
- name: 'remove',
2157
- toEl: parentEl,
2158
- originalEvent: evt
2159
- }); // drag from one list and drop into another
2160
-
2161
-
2162
- _dispatchEvent({
2163
- rootEl: parentEl,
2164
- name: 'sort',
2165
- toEl: parentEl,
2166
- fromEl: rootEl,
2167
- originalEvent: evt
2168
- });
2169
-
2170
- _dispatchEvent({
2171
- sortable: this,
2172
- name: 'sort',
2173
- toEl: parentEl,
2174
- originalEvent: evt
2175
- });
2176
- }
2177
-
2178
- putSortable && putSortable.save();
2179
- } else {
2180
- if (newIndex !== oldIndex) {
2181
- if (newIndex >= 0) {
2182
- // drag & drop within the same list
2183
- _dispatchEvent({
2184
- sortable: this,
2185
- name: 'update',
2186
- toEl: parentEl,
2187
- originalEvent: evt
2188
- });
2189
-
2190
- _dispatchEvent({
2191
- sortable: this,
2192
- name: 'sort',
2193
- toEl: parentEl,
2194
- originalEvent: evt
2195
- });
2196
- }
2197
- }
2198
- }
2199
-
2200
- if (Sortable$1.active) {
2201
- /* jshint eqnull:true */
2202
- if (newIndex == null || newIndex === -1) {
2203
- newIndex = oldIndex;
2204
- newDraggableIndex = oldDraggableIndex;
2205
- }
2206
-
2207
- _dispatchEvent({
2208
- sortable: this,
2209
- name: 'end',
2210
- toEl: parentEl,
2211
- originalEvent: evt
2212
- }); // Save sorting
2213
-
2214
-
2215
- this.save();
2216
- }
2217
- }
2218
- }
2219
-
2220
- this._nulling();
2221
- },
2222
- _nulling: function _nulling() {
2223
- pluginEvent('nulling', this);
2224
- rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable$1.dragged = Sortable$1.ghost = Sortable$1.clone = Sortable$1.active = null;
2225
- savedInputChecked.forEach(function (el) {
2226
- el.checked = true;
2227
- });
2228
- savedInputChecked.length = 0;
2229
- },
2230
- handleEvent: function handleEvent(
2231
- /**Event*/
2232
- evt) {
2233
- switch (evt.type) {
2234
- case 'drop':
2235
- case 'dragend':
2236
- this._onDrop(evt);
2237
-
2238
- break;
2239
-
2240
- case 'dragenter':
2241
- case 'dragover':
2242
- if (dragEl) {
2243
- this._onDragOver(evt);
2244
-
2245
- _globalDragOver(evt);
2246
- }
2247
-
2248
- break;
2249
-
2250
- case 'selectstart':
2251
- evt.preventDefault();
2252
- break;
2253
- }
2254
- },
2255
-
2256
- /**
2257
- * Serializes the item into an array of string.
2258
- * @returns {String[]}
2259
- */
2260
- toArray: function toArray() {
2261
- var order = [],
2262
- el,
2263
- children = this.el.children,
2264
- i = 0,
2265
- n = children.length,
2266
- options = this.options;
2267
-
2268
- for (; i < n; i++) {
2269
- el = children[i];
2270
-
2271
- if (closest(el, options.draggable, this.el, false)) {
2272
- order.push(el.getAttribute(options.dataIdAttr) || _generateId(el));
2273
- }
2274
- }
2275
-
2276
- return order;
2277
- },
2278
-
2279
- /**
2280
- * Sorts the elements according to the array.
2281
- * @param {String[]} order order of the items
2282
- */
2283
- sort: function sort(order) {
2284
- var items = {},
2285
- rootEl = this.el;
2286
- this.toArray().forEach(function (id, i) {
2287
- var el = rootEl.children[i];
2288
-
2289
- if (closest(el, this.options.draggable, rootEl, false)) {
2290
- items[id] = el;
2291
- }
2292
- }, this);
2293
- order.forEach(function (id) {
2294
- if (items[id]) {
2295
- rootEl.removeChild(items[id]);
2296
- rootEl.appendChild(items[id]);
2297
- }
2298
- });
2299
- },
2300
-
2301
- /**
2302
- * Save the current sorting
2303
- */
2304
- save: function save() {
2305
- var store = this.options.store;
2306
- store && store.set && store.set(this);
2307
- },
2308
-
2309
- /**
2310
- * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.
2311
- * @param {HTMLElement} el
2312
- * @param {String} [selector] default: `options.draggable`
2313
- * @returns {HTMLElement|null}
2314
- */
2315
- closest: function closest$1(el, selector) {
2316
- return closest(el, selector || this.options.draggable, this.el, false);
2317
- },
2318
-
2319
- /**
2320
- * Set/get option
2321
- * @param {string} name
2322
- * @param {*} [value]
2323
- * @returns {*}
2324
- */
2325
- option: function option(name, value) {
2326
- var options = this.options;
2327
-
2328
- if (value === void 0) {
2329
- return options[name];
2330
- } else {
2331
- var modifiedValue = PluginManager.modifyOption(this, name, value);
2332
-
2333
- if (typeof modifiedValue !== 'undefined') {
2334
- options[name] = modifiedValue;
2335
- } else {
2336
- options[name] = value;
2337
- }
2338
-
2339
- if (name === 'group') {
2340
- _prepareGroup(options);
2341
- }
2342
- }
2343
- },
2344
-
2345
- /**
2346
- * Destroy
2347
- */
2348
- destroy: function destroy() {
2349
- pluginEvent('destroy', this);
2350
- var el = this.el;
2351
- el[expando] = null;
2352
- off(el, 'mousedown', this._onTapStart);
2353
- off(el, 'touchstart', this._onTapStart);
2354
- off(el, 'pointerdown', this._onTapStart);
2355
-
2356
- if (this.nativeDraggable) {
2357
- off(el, 'dragover', this);
2358
- off(el, 'dragenter', this);
2359
- } // Remove draggable attributes
2360
-
2361
-
2362
- Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) {
2363
- el.removeAttribute('draggable');
2364
- });
2365
-
2366
- this._onDrop();
2367
-
2368
- sortables.splice(sortables.indexOf(this.el), 1);
2369
- this.el = el = null;
2370
- },
2371
- _hideClone: function _hideClone() {
2372
- if (!cloneHidden) {
2373
- pluginEvent('hideClone', this);
2374
- if (Sortable$1.eventCanceled) return;
2375
- css(cloneEl, 'display', 'none');
2376
-
2377
- if (this.options.removeCloneOnHide && cloneEl.parentNode) {
2378
- cloneEl.parentNode.removeChild(cloneEl);
2379
- }
2380
-
2381
- cloneHidden = true;
2382
- }
2383
- },
2384
- _showClone: function _showClone(putSortable) {
2385
- if (putSortable.lastPutMode !== 'clone') {
2386
- this._hideClone();
2387
-
2388
- return;
2389
- }
2390
-
2391
- if (cloneHidden) {
2392
- pluginEvent('showClone', this);
2393
- if (Sortable$1.eventCanceled) return; // show clone at dragEl or original position
2394
-
2395
- if (rootEl.contains(dragEl) && !this.options.group.revertClone) {
2396
- rootEl.insertBefore(cloneEl, dragEl);
2397
- } else if (nextEl) {
2398
- rootEl.insertBefore(cloneEl, nextEl);
2399
- } else {
2400
- rootEl.appendChild(cloneEl);
2401
- }
2402
-
2403
- if (this.options.group.revertClone) {
2404
- this._animate(dragEl, cloneEl);
2405
- }
2406
-
2407
- css(cloneEl, 'display', '');
2408
- cloneHidden = false;
2409
- }
2410
- }
2411
- };
2412
-
2413
- function _globalDragOver(
2414
- /**Event*/
2415
- evt) {
2416
- if (evt.dataTransfer) {
2417
- evt.dataTransfer.dropEffect = 'move';
2418
- }
2419
-
2420
- evt.cancelable && evt.preventDefault();
2421
- }
2422
-
2423
- function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) {
2424
- var evt,
2425
- sortable = fromEl[expando],
2426
- onMoveFn = sortable.options.onMove,
2427
- retVal; // Support for new CustomEvent feature
2428
-
2429
- if (window.CustomEvent && !IE11OrLess && !Edge) {
2430
- evt = new CustomEvent('move', {
2431
- bubbles: true,
2432
- cancelable: true
2433
- });
2434
- } else {
2435
- evt = document.createEvent('Event');
2436
- evt.initEvent('move', true, true);
2437
- }
2438
-
2439
- evt.to = toEl;
2440
- evt.from = fromEl;
2441
- evt.dragged = dragEl;
2442
- evt.draggedRect = dragRect;
2443
- evt.related = targetEl || toEl;
2444
- evt.relatedRect = targetRect || getRect(toEl);
2445
- evt.willInsertAfter = willInsertAfter;
2446
- evt.originalEvent = originalEvent;
2447
- fromEl.dispatchEvent(evt);
2448
-
2449
- if (onMoveFn) {
2450
- retVal = onMoveFn.call(sortable, evt, originalEvent);
2451
- }
2452
-
2453
- return retVal;
2454
- }
2455
-
2456
- function _disableDraggable(el) {
2457
- el.draggable = false;
2458
- }
2459
-
2460
- function _unsilent() {
2461
- _silent = false;
2462
- }
2463
-
2464
- function _ghostIsLast(evt, vertical, sortable) {
2465
- var rect = getRect(lastChild(sortable.el, sortable.options.draggable));
2466
- var spacer = 10;
2467
- return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer;
2468
- }
2469
-
2470
- function _getSwapDirection(evt, target, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) {
2471
- var targetRect = getRect(target),
2472
- mouseOnAxis = vertical ? evt.clientY : evt.clientX,
2473
- targetLength = vertical ? targetRect.height : targetRect.width,
2474
- targetS1 = vertical ? targetRect.top : targetRect.left,
2475
- targetS2 = vertical ? targetRect.bottom : targetRect.right,
2476
- invert = false;
2477
-
2478
- if (!invertSwap) {
2479
- // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold
2480
- if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) {
2481
- // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2
2482
- // check if past first invert threshold on side opposite of lastDirection
2483
- if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) {
2484
- // past first invert threshold, do not restrict inverted threshold to dragEl shadow
2485
- pastFirstInvertThresh = true;
2486
- }
2487
-
2488
- if (!pastFirstInvertThresh) {
2489
- // dragEl shadow (target move distance shadow)
2490
- if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow
2491
- : mouseOnAxis > targetS2 - targetMoveDistance) {
2492
- return -lastDirection;
2493
- }
2494
- } else {
2495
- invert = true;
2496
- }
2497
- } else {
2498
- // Regular
2499
- if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) {
2500
- return _getInsertDirection(target);
2501
- }
2502
- }
2503
- }
2504
-
2505
- invert = invert || invertSwap;
2506
-
2507
- if (invert) {
2508
- // Invert of regular
2509
- if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) {
2510
- return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1;
2511
- }
2512
- }
2513
-
2514
- return 0;
2515
- }
2516
- /**
2517
- * Gets the direction dragEl must be swapped relative to target in order to make it
2518
- * seem that dragEl has been "inserted" into that element's position
2519
- * @param {HTMLElement} target The target whose position dragEl is being inserted at
2520
- * @return {Number} Direction dragEl must be swapped
2521
- */
2522
-
2523
-
2524
- function _getInsertDirection(target) {
2525
- if (index(dragEl) < index(target)) {
2526
- return 1;
2527
- } else {
2528
- return -1;
2529
- }
2530
- }
2531
- /**
2532
- * Generate id
2533
- * @param {HTMLElement} el
2534
- * @returns {String}
2535
- * @private
2536
- */
2537
-
2538
-
2539
- function _generateId(el) {
2540
- var str = el.tagName + el.className + el.src + el.href + el.textContent,
2541
- i = str.length,
2542
- sum = 0;
2543
-
2544
- while (i--) {
2545
- sum += str.charCodeAt(i);
2546
- }
2547
-
2548
- return sum.toString(36);
2549
- }
2550
-
2551
- function _saveInputCheckedState(root) {
2552
- savedInputChecked.length = 0;
2553
- var inputs = root.getElementsByTagName('input');
2554
- var idx = inputs.length;
2555
-
2556
- while (idx--) {
2557
- var _el = inputs[idx];
2558
- _el.checked && savedInputChecked.push(_el);
2559
- }
2560
- }
2561
-
2562
- function _nextTick(fn) {
2563
- return setTimeout(fn, 0);
2564
- }
2565
-
2566
- function _cancelNextTick(id) {
2567
- return clearTimeout(id);
2568
- } // Fixed #973:
2569
-
2570
-
2571
- on(document, 'touchmove', function (evt) {
2572
- if ((Sortable$1.active || awaitingDragStarted) && evt.cancelable) {
2573
- evt.preventDefault();
2574
- }
2575
- }); // Export utils
2576
-
2577
- Sortable$1.utils = {
2578
- on: on,
2579
- off: off,
2580
- css: css,
2581
- find: find,
2582
- is: function is(el, selector) {
2583
- return !!closest(el, selector, el, false);
2584
- },
2585
- extend: extend,
2586
- throttle: throttle,
2587
- closest: closest,
2588
- toggleClass: toggleClass,
2589
- clone: clone,
2590
- index: index,
2591
- nextTick: _nextTick,
2592
- cancelNextTick: _cancelNextTick,
2593
- detectDirection: _detectDirection,
2594
- getChild: getChild
2595
- };
2596
- /**
2597
- * Mount a plugin to Sortable
2598
- * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted
2599
- */
2600
-
2601
- Sortable$1.mount = function () {
2602
- for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
2603
- plugins[_key] = arguments[_key];
2604
- }
2605
-
2606
- if (plugins[0].constructor === Array) plugins = plugins[0];
2607
-
2608
- for (var i in plugins) {
2609
- var plugin = plugins[i];
2610
-
2611
- if (!plugin.prototype || !plugin.prototype.constructor) {
2612
- throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(el));
2613
- }
2614
-
2615
- if (plugin.utils) Sortable$1.utils = _objectSpread({}, Sortable$1.utils, plugin.utils);
2616
- PluginManager.mount(plugin);
2617
- }
2618
- };
2619
- /**
2620
- * Create sortable instance
2621
- * @param {HTMLElement} el
2622
- * @param {Object} [options]
2623
- */
2624
-
2625
-
2626
- Sortable$1.create = function (el, options) {
2627
- return new Sortable$1(el, options);
2628
- }; // Export
2629
-
2630
-
2631
- Sortable$1.version = version;
2632
-
2633
- var autoScrolls = [],
2634
- scrollEl,
2635
- scrollRootEl,
2636
- scrolling = false,
2637
- lastAutoScrollX,
2638
- lastAutoScrollY,
2639
- touchEvt$1,
2640
- pointerElemChangedInterval;
2641
-
2642
- function AutoScrollPlugin() {
2643
- function AutoScroll() {
2644
- this.options = {
2645
- scroll: true,
2646
- scrollSensitivity: 30,
2647
- scrollSpeed: 10,
2648
- bubbleScroll: true
2649
- }; // Bind all private methods
2650
-
2651
- for (var fn in this) {
2652
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
2653
- this[fn] = this[fn].bind(this);
2654
- }
2655
- }
2656
- }
2657
-
2658
- AutoScroll.prototype = {
2659
- dragStarted: function dragStarted(_ref) {
2660
- var originalEvent = _ref.originalEvent;
2661
-
2662
- if (this.sortable.nativeDraggable) {
2663
- on(document, 'dragover', this._handleAutoScroll);
2664
- } else {
2665
- if (this.sortable.options.supportPointer) {
2666
- on(document, 'pointermove', this._handleFallbackAutoScroll);
2667
- } else if (originalEvent.touches) {
2668
- on(document, 'touchmove', this._handleFallbackAutoScroll);
2669
- } else {
2670
- on(document, 'mousemove', this._handleFallbackAutoScroll);
2671
- }
2672
- }
2673
- },
2674
- dragOverCompleted: function dragOverCompleted(_ref2) {
2675
- var originalEvent = _ref2.originalEvent;
2676
-
2677
- // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached)
2678
- if (!this.sortable.options.dragOverBubble && !originalEvent.rootEl) {
2679
- this._handleAutoScroll(originalEvent);
2680
- }
2681
- },
2682
- drop: function drop() {
2683
- if (this.sortable.nativeDraggable) {
2684
- off(document, 'dragover', this._handleAutoScroll);
2685
- } else {
2686
- off(document, 'pointermove', this._handleFallbackAutoScroll);
2687
- off(document, 'touchmove', this._handleFallbackAutoScroll);
2688
- off(document, 'mousemove', this._handleFallbackAutoScroll);
2689
- }
2690
-
2691
- clearPointerElemChangedInterval();
2692
- clearAutoScrolls();
2693
- cancelThrottle();
2694
- },
2695
- nulling: function nulling() {
2696
- touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null;
2697
- autoScrolls.length = 0;
2698
- },
2699
- _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) {
2700
- this._handleAutoScroll(evt, true);
2701
- },
2702
- _handleAutoScroll: function _handleAutoScroll(evt, fallback) {
2703
- var _this = this;
2704
-
2705
- var x = evt.clientX,
2706
- y = evt.clientY,
2707
- elem = document.elementFromPoint(x, y);
2708
- touchEvt$1 = evt; // IE does not seem to have native autoscroll,
2709
- // Edge's autoscroll seems too conditional,
2710
- // MACOS Safari does not have autoscroll,
2711
- // Firefox and Chrome are good
2712
-
2713
- if (fallback || Edge || IE11OrLess || Safari) {
2714
- autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change
2715
-
2716
- var ogElemScroller = getParentAutoScrollElement(elem, true);
2717
-
2718
- if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) {
2719
- pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour
2720
-
2721
- pointerElemChangedInterval = setInterval(function () {
2722
- var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true);
2723
-
2724
- if (newElem !== ogElemScroller) {
2725
- ogElemScroller = newElem;
2726
- clearAutoScrolls();
2727
- }
2728
-
2729
- autoScroll(evt, _this.options, newElem, fallback);
2730
- }, 10);
2731
- lastAutoScrollX = x;
2732
- lastAutoScrollY = y;
2733
- }
2734
- } else {
2735
- // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll
2736
- if (!this.sortable.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) {
2737
- clearAutoScrolls();
2738
- return;
2739
- }
2740
-
2741
- autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false);
2742
- }
2743
- }
2744
- };
2745
- return _extends(AutoScroll, {
2746
- pluginName: 'scroll',
2747
- initializeByDefault: true
2748
- });
2749
- }
2750
-
2751
- function clearAutoScrolls() {
2752
- autoScrolls.forEach(function (autoScroll) {
2753
- clearInterval(autoScroll.pid);
2754
- });
2755
- autoScrolls = [];
2756
- }
2757
-
2758
- function clearPointerElemChangedInterval() {
2759
- clearInterval(pointerElemChangedInterval);
2760
- }
2761
-
2762
- var autoScroll = throttle(function (evt, options, rootEl, isFallback) {
2763
- // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521
2764
- if (!options.scroll) return;
2765
- var sens = options.scrollSensitivity,
2766
- speed = options.scrollSpeed,
2767
- winScroller = getWindowScrollingElement();
2768
- var scrollThisInstance = false,
2769
- scrollCustomFn; // New scroll root, set scrollEl
2770
-
2771
- if (scrollRootEl !== rootEl) {
2772
- scrollRootEl = rootEl;
2773
- clearAutoScrolls();
2774
- scrollEl = options.scroll;
2775
- scrollCustomFn = options.scrollFn;
2776
-
2777
- if (scrollEl === true) {
2778
- scrollEl = getParentAutoScrollElement(rootEl, true);
2779
- }
2780
- }
2781
-
2782
- var layersOut = 0;
2783
- var currentParent = scrollEl;
2784
-
2785
- do {
2786
- var el = currentParent,
2787
- rect = getRect(el),
2788
- top = rect.top,
2789
- bottom = rect.bottom,
2790
- left = rect.left,
2791
- right = rect.right,
2792
- width = rect.width,
2793
- height = rect.height,
2794
- canScrollX = void 0,
2795
- canScrollY = void 0,
2796
- scrollWidth = el.scrollWidth,
2797
- scrollHeight = el.scrollHeight,
2798
- elCSS = css(el),
2799
- scrollPosX = el.scrollLeft,
2800
- scrollPosY = el.scrollTop;
2801
-
2802
- if (el === winScroller) {
2803
- canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible');
2804
- canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible');
2805
- } else {
2806
- canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll');
2807
- canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll');
2808
- }
2809
-
2810
- var vx = canScrollX && (Math.abs(right - evt.clientX) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - evt.clientX) <= sens && !!scrollPosX);
2811
- var vy = canScrollY && (Math.abs(bottom - evt.clientY) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - evt.clientY) <= sens && !!scrollPosY);
2812
-
2813
- if (!autoScrolls[layersOut]) {
2814
- for (var i = 0; i <= layersOut; i++) {
2815
- if (!autoScrolls[i]) {
2816
- autoScrolls[i] = {};
2817
- }
2818
- }
2819
- }
2820
-
2821
- if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) {
2822
- autoScrolls[layersOut].el = el;
2823
- autoScrolls[layersOut].vx = vx;
2824
- autoScrolls[layersOut].vy = vy;
2825
- clearInterval(autoScrolls[layersOut].pid);
2826
-
2827
- if (vx != 0 || vy != 0) {
2828
- scrollThisInstance = true;
2829
- /* jshint loopfunc:true */
2830
-
2831
- autoScrolls[layersOut].pid = setInterval(function () {
2832
- // emulate drag over during autoscroll (fallback), emulating native DnD behaviour
2833
- if (isFallback && this.layer === 0) {
2834
- Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely
2835
-
2836
- }
2837
-
2838
- var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0;
2839
- var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0;
2840
-
2841
- if (typeof scrollCustomFn === 'function') {
2842
- if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') {
2843
- return;
2844
- }
2845
- }
2846
-
2847
- scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY);
2848
- }.bind({
2849
- layer: layersOut
2850
- }), 24);
2851
- }
2852
- }
2853
-
2854
- layersOut++;
2855
- } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false)));
2856
-
2857
- scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not
2858
- }, 30);
2859
-
2860
- var drop = function drop(_ref) {
2861
- var originalEvent = _ref.originalEvent,
2862
- putSortable = _ref.putSortable,
2863
- dragEl = _ref.dragEl,
2864
- activeSortable = _ref.activeSortable,
2865
- dispatchSortableEvent = _ref.dispatchSortableEvent,
2866
- hideGhostForTarget = _ref.hideGhostForTarget,
2867
- unhideGhostForTarget = _ref.unhideGhostForTarget;
2868
- var toSortable = putSortable || activeSortable;
2869
- hideGhostForTarget();
2870
- var target = document.elementFromPoint(originalEvent.clientX, originalEvent.clientY);
2871
- unhideGhostForTarget();
2872
-
2873
- if (toSortable && !toSortable.el.contains(target)) {
2874
- dispatchSortableEvent('spill');
2875
- this.onSpill(dragEl);
2876
- }
2877
- };
2878
-
2879
- function Revert() {}
2880
-
2881
- Revert.prototype = {
2882
- startIndex: null,
2883
- dragStart: function dragStart(_ref2) {
2884
- var oldDraggableIndex = _ref2.oldDraggableIndex;
2885
- this.startIndex = oldDraggableIndex;
2886
- },
2887
- onSpill: function onSpill(dragEl) {
2888
- this.sortable.captureAnimationState();
2889
- var nextSibling = getChild(this.sortable.el, this.startIndex, this.sortable.options);
2890
-
2891
- if (nextSibling) {
2892
- this.sortable.el.insertBefore(dragEl, nextSibling);
2893
- } else {
2894
- this.sortable.el.appendChild(dragEl);
2895
- }
2896
-
2897
- this.sortable.animateAll();
2898
- },
2899
- drop: drop
2900
- };
2901
-
2902
- _extends(Revert, {
2903
- pluginName: 'revertOnSpill'
2904
- });
2905
-
2906
- function Remove() {}
2907
-
2908
- Remove.prototype = {
2909
- onSpill: function onSpill(dragEl) {
2910
- this.sortable.captureAnimationState();
2911
- dragEl.parentNode && dragEl.parentNode.removeChild(dragEl);
2912
- this.sortable.animateAll();
2913
- },
2914
- drop: drop
2915
- };
2916
-
2917
- _extends(Remove, {
2918
- pluginName: 'removeOnSpill'
2919
- });
2920
-
2921
- var lastSwapEl;
2922
-
2923
- function SwapPlugin() {
2924
- function Swap() {
2925
- this.options = {
2926
- swapClass: 'sortable-swap-highlight'
2927
- };
2928
- }
2929
-
2930
- Swap.prototype = {
2931
- dragStart: function dragStart(_ref) {
2932
- var dragEl = _ref.dragEl;
2933
- lastSwapEl = dragEl;
2934
- },
2935
- dragOverValid: function dragOverValid(_ref2) {
2936
- var completed = _ref2.completed,
2937
- target = _ref2.target,
2938
- onMove = _ref2.onMove,
2939
- activeSortable = _ref2.activeSortable,
2940
- changed = _ref2.changed;
2941
- if (!activeSortable.options.swap) return;
2942
- var el = this.sortable.el,
2943
- options = this.sortable.options;
2944
-
2945
- if (target && target !== el) {
2946
- var prevSwapEl = lastSwapEl;
2947
-
2948
- if (onMove(target) !== false) {
2949
- toggleClass(target, options.swapClass, true);
2950
- lastSwapEl = target;
2951
- } else {
2952
- lastSwapEl = null;
2953
- }
2954
-
2955
- if (prevSwapEl && prevSwapEl !== lastSwapEl) {
2956
- toggleClass(prevSwapEl, options.swapClass, false);
2957
- }
2958
- }
2959
-
2960
- changed();
2961
- return completed(true);
2962
- },
2963
- drop: function drop(_ref3) {
2964
- var activeSortable = _ref3.activeSortable,
2965
- putSortable = _ref3.putSortable,
2966
- dragEl = _ref3.dragEl;
2967
- var toSortable = putSortable || this.sortable;
2968
- var options = this.sortable.options;
2969
- lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false);
2970
-
2971
- if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) {
2972
- if (dragEl !== lastSwapEl) {
2973
- toSortable.captureAnimationState();
2974
- if (toSortable !== activeSortable) activeSortable.captureAnimationState();
2975
- swapNodes(dragEl, lastSwapEl);
2976
- toSortable.animateAll();
2977
- if (toSortable !== activeSortable) activeSortable.animateAll();
2978
- }
2979
- }
2980
- },
2981
- nulling: function nulling() {
2982
- lastSwapEl = null;
2983
- }
2984
- };
2985
- return _extends(Swap, {
2986
- pluginName: 'swap',
2987
- eventOptions: function eventOptions() {
2988
- return {
2989
- swapItem: lastSwapEl
2990
- };
2991
- }
2992
- });
2993
- }
2994
-
2995
- function swapNodes(n1, n2) {
2996
- var p1 = n1.parentNode,
2997
- p2 = n2.parentNode,
2998
- i1,
2999
- i2;
3000
- if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return;
3001
- i1 = index(n1);
3002
- i2 = index(n2);
3003
-
3004
- if (p1.isEqualNode(p2) && i1 < i2) {
3005
- i2++;
3006
- }
3007
-
3008
- p1.insertBefore(n2, p1.children[i1]);
3009
- p2.insertBefore(n1, p2.children[i2]);
3010
- }
3011
-
3012
- var multiDragElements = [],
3013
- multiDragClones = [],
3014
- lastMultiDragSelect,
3015
- // for selection with modifier key down (SHIFT)
3016
- multiDragSortable,
3017
- initialFolding = false,
3018
- // Initial multi-drag fold when drag started
3019
- folding = false,
3020
- // Folding any other time
3021
- dragStarted = false,
3022
- dragEl$1,
3023
- clonesFromRect,
3024
- clonesHidden;
3025
-
3026
- function MultiDragPlugin() {
3027
- function MultiDrag(sortable) {
3028
- // Bind all private methods
3029
- for (var fn in this) {
3030
- if (fn.charAt(0) === '_' && typeof this[fn] === 'function') {
3031
- this[fn] = this[fn].bind(this);
3032
- }
3033
- }
3034
-
3035
- if (sortable.options.supportPointer) {
3036
- on(document, 'pointerup', this._deselectMultiDrag);
3037
- } else {
3038
- on(document, 'mouseup', this._deselectMultiDrag);
3039
- on(document, 'touchend', this._deselectMultiDrag);
3040
- }
3041
-
3042
- on(document, 'keydown', this._checkKeyDown);
3043
- on(document, 'keyup', this._checkKeyUp);
3044
- this.options = {
3045
- selectedClass: 'sortable-selected',
3046
- multiDragKey: null,
3047
- setData: function setData(dataTransfer, dragEl) {
3048
- var data = '';
3049
-
3050
- if (multiDragElements.length && multiDragSortable === sortable) {
3051
- for (var i in multiDragElements) {
3052
- data += (!i ? '' : ', ') + multiDragElements[i].textContent;
3053
- }
3054
- } else {
3055
- data = dragEl.textContent;
3056
- }
3057
-
3058
- dataTransfer.setData('Text', data);
3059
- }
3060
- };
3061
- }
3062
-
3063
- MultiDrag.prototype = {
3064
- multiDragKeyDown: false,
3065
- isMultiDrag: false,
3066
- delayStartGlobal: function delayStartGlobal(_ref) {
3067
- var dragged = _ref.dragEl;
3068
- dragEl$1 = dragged;
3069
- },
3070
- delayEnded: function delayEnded() {
3071
- this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1);
3072
- },
3073
- setupClone: function setupClone(_ref2) {
3074
- var sortable = _ref2.sortable;
3075
- if (!this.isMultiDrag) return;
3076
-
3077
- for (var i in multiDragElements) {
3078
- multiDragClones.push(clone(multiDragElements[i]));
3079
- multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex;
3080
- multiDragClones[i].draggable = false;
3081
- multiDragClones[i].style['will-change'] = '';
3082
- toggleClass(multiDragClones[i], sortable.options.selectedClass, false);
3083
- multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], sortable.options.chosenClass, false);
3084
- }
3085
-
3086
- sortable._hideClone();
3087
-
3088
- return true;
3089
- },
3090
- clone: function clone(_ref3) {
3091
- var sortable = _ref3.sortable,
3092
- rootEl = _ref3.rootEl,
3093
- dispatchSortableEvent = _ref3.dispatchSortableEvent;
3094
- if (!this.isMultiDrag) return;
3095
-
3096
- if (!sortable.options.removeCloneOnHide) {
3097
- if (multiDragElements.length && multiDragSortable === sortable) {
3098
- insertMultiDragClones(true, rootEl);
3099
- dispatchSortableEvent('clone');
3100
- return true;
3101
- }
3102
- }
3103
- },
3104
- showClone: function showClone(_ref4) {
3105
- var cloneNowShown = _ref4.cloneNowShown,
3106
- rootEl = _ref4.rootEl;
3107
- if (!this.isMultiDrag) return;
3108
- insertMultiDragClones(false, rootEl);
3109
-
3110
- for (var i in multiDragClones) {
3111
- css(multiDragClones[i], 'display', '');
3112
- }
3113
-
3114
- cloneNowShown();
3115
- clonesHidden = false;
3116
- return true;
3117
- },
3118
- hideClone: function hideClone(_ref5) {
3119
- var sortable = _ref5.sortable,
3120
- cloneNowHidden = _ref5.cloneNowHidden;
3121
- if (!this.isMultiDrag) return;
3122
-
3123
- for (var i in multiDragClones) {
3124
- css(multiDragClones[i], 'display', 'none');
3125
-
3126
- if (sortable.options.removeCloneOnHide && multiDragClones[i].parentNode) {
3127
- multiDragClones[i].parentNode.removeChild(multiDragClones[i]);
3128
- }
3129
- }
3130
-
3131
- cloneNowHidden();
3132
- clonesHidden = true;
3133
- return true;
3134
- },
3135
- dragStartGlobal: function dragStartGlobal(_ref6) {
3136
- var sortable = _ref6.sortable;
3137
-
3138
- if (!this.isMultiDrag && multiDragSortable) {
3139
- multiDragSortable.multiDrag._deselectMultiDrag();
3140
- }
3141
-
3142
- for (var i in multiDragElements) {
3143
- multiDragElements[i].sortableIndex = index(multiDragElements[i]);
3144
- } // Sort multi-drag elements
3145
-
3146
-
3147
- multiDragElements = multiDragElements.sort(function (a, b) {
3148
- return a.sortableIndex - b.sortableIndex;
3149
- });
3150
- dragStarted = true;
3151
- },
3152
- dragStarted: function dragStarted(_ref7) {
3153
- var sortable = _ref7.sortable;
3154
- if (!this.isMultiDrag) return;
3155
-
3156
- if (sortable.options.sort) {
3157
- // Capture rects,
3158
- // hide multi drag elements (by positioning them absolute),
3159
- // set multi drag elements rects to dragRect,
3160
- // show multi drag elements,
3161
- // animate to rects,
3162
- // unset rects & remove from DOM
3163
- sortable.captureAnimationState();
3164
-
3165
- if (sortable.options.animation) {
3166
- for (var i in multiDragElements) {
3167
- if (multiDragElements[i] === dragEl$1) continue;
3168
- css(multiDragElements[i], 'position', 'absolute');
3169
- }
3170
-
3171
- var dragRect = getRect(dragEl$1, false, true, true);
3172
-
3173
- for (var _i in multiDragElements) {
3174
- if (multiDragElements[_i] === dragEl$1) continue;
3175
- setRect(multiDragElements[_i], dragRect);
3176
- }
3177
-
3178
- folding = true;
3179
- initialFolding = true;
3180
- }
3181
- }
3182
-
3183
- sortable.animateAll(function () {
3184
- folding = false;
3185
- initialFolding = false;
3186
-
3187
- if (sortable.options.animation) {
3188
- for (var _i2 in multiDragElements) {
3189
- unsetRect(multiDragElements[_i2]);
3190
- }
3191
- } // Remove all auxiliary multidrag items from el, if sorting enabled
3192
-
3193
-
3194
- if (sortable.options.sort) {
3195
- removeMultiDragElements();
3196
- }
3197
- });
3198
- },
3199
- dragOver: function dragOver(_ref8) {
3200
- var target = _ref8.target,
3201
- completed = _ref8.completed;
3202
-
3203
- if (folding && ~multiDragElements.indexOf(target)) {
3204
- return completed(false);
3205
- }
3206
- },
3207
- revert: function revert(_ref9) {
3208
- var fromSortable = _ref9.fromSortable,
3209
- rootEl = _ref9.rootEl,
3210
- sortable = _ref9.sortable,
3211
- dragRect = _ref9.dragRect;
3212
-
3213
- if (multiDragElements.length > 1) {
3214
- // Setup unfold animation
3215
- for (var i in multiDragElements) {
3216
- sortable.addAnimationState({
3217
- target: multiDragElements[i],
3218
- rect: folding ? getRect(multiDragElements[i]) : dragRect
3219
- });
3220
- unsetRect(multiDragElements[i]);
3221
- multiDragElements[i].fromRect = dragRect;
3222
- fromSortable.removeAnimationState(multiDragElements[i]);
3223
- }
3224
-
3225
- folding = false;
3226
- insertMultiDragElements(!sortable.options.removeCloneOnHide, rootEl);
3227
- }
3228
- },
3229
- dragOverCompleted: function dragOverCompleted(_ref10) {
3230
- var sortable = _ref10.sortable,
3231
- isOwner = _ref10.isOwner,
3232
- insertion = _ref10.insertion,
3233
- activeSortable = _ref10.activeSortable,
3234
- parentEl = _ref10.parentEl,
3235
- putSortable = _ref10.putSortable;
3236
- var options = sortable.options;
3237
-
3238
- if (insertion) {
3239
- // Clones must be hidden before folding animation to capture dragRectAbsolute properly
3240
- if (isOwner) {
3241
- activeSortable._hideClone();
3242
- }
3243
-
3244
- initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location
3245
-
3246
- if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) {
3247
- // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible
3248
- var dragRectAbsolute = getRect(dragEl$1, false, true, true);
3249
-
3250
- for (var i in multiDragElements) {
3251
- if (multiDragElements[i] === dragEl$1) continue;
3252
- setRect(multiDragElements[i], dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted
3253
- // while folding, and so that we can capture them again because old sortable will no longer be fromSortable
3254
-
3255
- parentEl.appendChild(multiDragElements[i]);
3256
- }
3257
-
3258
- folding = true;
3259
- } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out
3260
-
3261
-
3262
- if (!isOwner) {
3263
- // Only remove if not folding (folding will remove them anyways)
3264
- if (!folding) {
3265
- removeMultiDragElements();
3266
- }
3267
-
3268
- if (multiDragElements.length > 1) {
3269
- var clonesHiddenBefore = clonesHidden;
3270
-
3271
- activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden
3272
-
3273
-
3274
- if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) {
3275
- for (var _i3 in multiDragClones) {
3276
- activeSortable.addAnimationState({
3277
- target: multiDragClones[_i3],
3278
- rect: clonesFromRect
3279
- });
3280
- multiDragClones[_i3].fromRect = clonesFromRect;
3281
- multiDragClones[_i3].thisAnimationDuration = null;
3282
- }
3283
- }
3284
- } else {
3285
- activeSortable._showClone(sortable);
3286
- }
3287
- }
3288
- }
3289
- },
3290
- dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) {
3291
- var dragRect = _ref11.dragRect,
3292
- isOwner = _ref11.isOwner,
3293
- activeSortable = _ref11.activeSortable;
3294
-
3295
- for (var i in multiDragElements) {
3296
- multiDragElements[i].thisAnimationDuration = null;
3297
- }
3298
-
3299
- if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) {
3300
- clonesFromRect = _extends({}, dragRect);
3301
- var dragMatrix = matrix(dragEl$1, true);
3302
- clonesFromRect.top -= dragMatrix.f;
3303
- clonesFromRect.left -= dragMatrix.e;
3304
- }
3305
- },
3306
- dragOverAnimationComplete: function dragOverAnimationComplete() {
3307
- if (folding) {
3308
- folding = false;
3309
- removeMultiDragElements();
3310
- }
3311
- },
3312
- drop: function drop(_ref12) {
3313
- var evt = _ref12.originalEvent,
3314
- rootEl = _ref12.rootEl,
3315
- parentEl = _ref12.parentEl,
3316
- sortable = _ref12.sortable,
3317
- dispatchSortableEvent = _ref12.dispatchSortableEvent,
3318
- oldIndex = _ref12.oldIndex,
3319
- putSortable = _ref12.putSortable;
3320
- var toSortable = putSortable || this.sortable;
3321
- if (!evt) return;
3322
- var options = sortable.options,
3323
- children = parentEl.children; // Multi-drag selection
3324
-
3325
- if (!dragStarted) {
3326
- if (options.multiDragKey && !this.multiDragKeyDown) {
3327
- this._deselectMultiDrag();
3328
- }
3329
-
3330
- toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1));
3331
-
3332
- if (!~multiDragElements.indexOf(dragEl$1)) {
3333
- multiDragElements.push(dragEl$1);
3334
- dispatchEvent({
3335
- sortable: sortable,
3336
- rootEl: rootEl,
3337
- name: 'select',
3338
- targetEl: dragEl$1,
3339
- originalEvt: evt
3340
- }); // Modifier activated, select from last to dragEl
3341
-
3342
- if ((!options.multiDragKey || this.multiDragKeyDown) && evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) {
3343
- var lastIndex = index(lastMultiDragSelect),
3344
- currentIndex = index(dragEl$1);
3345
-
3346
- if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) {
3347
- // Must include lastMultiDragSelect (select it), in case modified selection from no selection
3348
- // (but previous selection existed)
3349
- var n, i;
3350
-
3351
- if (currentIndex > lastIndex) {
3352
- i = lastIndex;
3353
- n = currentIndex;
3354
- } else {
3355
- i = currentIndex;
3356
- n = lastIndex + 1;
3357
- }
3358
-
3359
- for (; i < n; i++) {
3360
- if (~multiDragElements.indexOf(children[i])) continue;
3361
- toggleClass(children[i], options.selectedClass, true);
3362
- multiDragElements.push(children[i]);
3363
- dispatchEvent({
3364
- sortable: sortable,
3365
- rootEl: rootEl,
3366
- name: 'select',
3367
- targetEl: children[i],
3368
- originalEvt: evt
3369
- });
3370
- }
3371
- }
3372
- } else {
3373
- lastMultiDragSelect = dragEl$1;
3374
- }
3375
-
3376
- multiDragSortable = toSortable;
3377
- } else {
3378
- multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1);
3379
- lastMultiDragSelect = null;
3380
- dispatchEvent({
3381
- sortable: sortable,
3382
- rootEl: rootEl,
3383
- name: 'deselect',
3384
- targetEl: dragEl$1,
3385
- originalEvt: evt
3386
- });
3387
- }
3388
- } // Multi-drag drop
3389
-
3390
-
3391
- if (dragStarted && this.isMultiDrag) {
3392
- // Do not "unfold" after around dragEl if reverted
3393
- if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) {
3394
- var dragRect = getRect(dragEl$1),
3395
- multiDragIndex = index(dragEl$1, ':not(.' + Sortable.active.options.selectedClass + ')');
3396
- if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null;
3397
- toSortable.captureAnimationState();
3398
-
3399
- if (!initialFolding) {
3400
- if (options.animation) {
3401
- dragEl$1.fromRect = dragRect;
3402
-
3403
- for (var _i4 in multiDragElements) {
3404
- multiDragElements[_i4].thisAnimationDuration = null;
3405
-
3406
- if (multiDragElements[_i4] !== dragEl$1) {
3407
- var rect = folding ? getRect(multiDragElements[_i4]) : dragRect;
3408
- multiDragElements[_i4].fromRect = rect; // Prepare unfold animation
3409
-
3410
- toSortable.addAnimationState({
3411
- target: multiDragElements[_i4],
3412
- rect: rect
3413
- });
3414
- }
3415
- }
3416
- } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert
3417
- // properly they must all be removed
3418
-
3419
-
3420
- removeMultiDragElements();
3421
-
3422
- for (var _i5 in multiDragElements) {
3423
- if (children[multiDragIndex]) {
3424
- parentEl.insertBefore(multiDragElements[_i5], children[multiDragIndex]);
3425
- } else {
3426
- parentEl.appendChild(multiDragElements[_i5]);
3427
- }
3428
-
3429
- multiDragIndex++;
3430
- } // If initial folding is done, the elements may have changed position because they are now
3431
- // unfolding around dragEl, even though dragEl may not have his index changed, so update event
3432
- // must be fired here as Sortable will not.
3433
-
3434
-
3435
- if (oldIndex === index(dragEl$1)) {
3436
- var update = false;
3437
-
3438
- for (var _i6 in multiDragElements) {
3439
- if (multiDragElements[_i6].sortableIndex !== index(multiDragElements[_i6])) {
3440
- update = true;
3441
- break;
3442
- }
3443
- }
3444
-
3445
- if (update) {
3446
- dispatchSortableEvent('update');
3447
- }
3448
- }
3449
- } // Must be done after capturing individual rects (scroll bar)
3450
-
3451
-
3452
- for (var _i7 in multiDragElements) {
3453
- unsetRect(multiDragElements[_i7]);
3454
- }
3455
-
3456
- toSortable.animateAll();
3457
- }
3458
-
3459
- multiDragSortable = toSortable;
3460
- } // Remove clones if necessary
3461
-
3462
-
3463
- if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') {
3464
- for (var _i8 in multiDragClones) {
3465
- multiDragClones[_i8].parentNode && multiDragClones[_i8].parentNode.removeChild(multiDragClones[_i8]);
3466
- }
3467
- }
3468
- },
3469
- nullingGlobal: function nullingGlobal() {
3470
- this.isMultiDrag = dragStarted = false;
3471
- multiDragClones.length = 0;
3472
- },
3473
- destroy: function destroy() {
3474
- this._deselectMultiDrag();
3475
-
3476
- off(document, 'pointerup', this._deselectMultiDrag);
3477
- off(document, 'mouseup', this._deselectMultiDrag);
3478
- off(document, 'touchend', this._deselectMultiDrag);
3479
- off(document, 'keydown', this._checkKeyDown);
3480
- off(document, 'keyup', this._checkKeyUp);
3481
- },
3482
- _deselectMultiDrag: function _deselectMultiDrag(evt) {
3483
- if (dragStarted) return; // Only deselect if selection is in this sortable
3484
-
3485
- if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable
3486
-
3487
- if (evt && closest(evt.target, this.sortable.options.draggable, this.sortable.el, false)) return; // Only deselect if left click
3488
-
3489
- if (evt && evt.button !== 0) return;
3490
-
3491
- while (multiDragElements.length) {
3492
- var el = multiDragElements[0];
3493
- toggleClass(el, this.sortable.options.selectedClass, false);
3494
- multiDragElements.shift();
3495
- dispatchEvent({
3496
- sortable: this.sortable,
3497
- rootEl: this.sortable.el,
3498
- name: 'deselect',
3499
- targetEl: el,
3500
- originalEvt: evt
3501
- });
3502
- }
3503
- },
3504
- _checkKeyDown: function _checkKeyDown(evt) {
3505
- if (evt.key === this.sortable.options.multiDragKey) {
3506
- this.multiDragKeyDown = true;
3507
- }
3508
- },
3509
- _checkKeyUp: function _checkKeyUp(evt) {
3510
- if (evt.key === this.sortable.options.multiDragKey) {
3511
- this.multiDragKeyDown = false;
3512
- }
3513
- }
3514
- };
3515
- return _extends(MultiDrag, {
3516
- // Static methods & properties
3517
- pluginName: 'multiDrag',
3518
- utils: {
3519
- /**
3520
- * Selects the provided multi-drag item
3521
- * @param {HTMLElement} el The element to be selected
3522
- */
3523
- select: function select(el) {
3524
- var sortable = el.parentNode[expando];
3525
- if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return;
3526
-
3527
- if (multiDragSortable && multiDragSortable !== sortable) {
3528
- multiDragSortable.multiDrag._deselectMultiDrag();
3529
-
3530
- multiDragSortable = sortable;
3531
- }
3532
-
3533
- toggleClass(el, sortable.options.selectedClass, true);
3534
- multiDragElements.push(el);
3535
- },
3536
-
3537
- /**
3538
- * Deselects the provided multi-drag item
3539
- * @param {HTMLElement} el The element to be deselected
3540
- */
3541
- deselect: function deselect(el) {
3542
- var sortable = el.parentNode[expando],
3543
- index = multiDragElements.indexOf(el);
3544
- if (!sortable || !sortable.options.multiDrag || !~index) return;
3545
- toggleClass(el, sortable.options.selectedClass, false);
3546
- multiDragElements.splice(index, 1);
3547
- }
3548
- },
3549
- eventOptions: function eventOptions() {
3550
- var _this = this;
3551
-
3552
- var oldIndicies = [],
3553
- newIndicies = [];
3554
- multiDragElements.forEach(function (element) {
3555
- oldIndicies.push({
3556
- element: element,
3557
- index: element.sortableIndex
3558
- }); // multiDragElements will already be sorted if folding
3559
-
3560
- var newIndex;
3561
-
3562
- if (folding && element !== dragEl$1) {
3563
- newIndex = -1;
3564
- } else if (folding) {
3565
- newIndex = index(element, ':not(.' + _this.options.selectedClass + ')');
3566
- } else {
3567
- newIndex = index(element);
3568
- }
3569
-
3570
- newIndicies.push({
3571
- element: element,
3572
- index: newIndex
3573
- });
3574
- });
3575
- return {
3576
- items: _toConsumableArray(multiDragElements),
3577
- clones: [].concat(multiDragClones),
3578
- oldIndicies: oldIndicies,
3579
- newIndicies: newIndicies
3580
- };
3581
- },
3582
- optionListeners: {
3583
- multiDragKey: function multiDragKey(key) {
3584
- key = key.toLowerCase();
3585
-
3586
- if (key === 'ctrl') {
3587
- key = 'Control';
3588
- } else if (key.length > 1) {
3589
- key = key.charAt(0).toUpperCase() + key.substr(1);
3590
- }
3591
-
3592
- return key;
3593
- }
3594
- }
3595
- });
3596
- }
3597
-
3598
- function insertMultiDragElements(clonesInserted, rootEl) {
3599
- for (var i in multiDragElements) {
3600
- var target = rootEl.children[multiDragElements[i].sortableIndex + (clonesInserted ? Number(i) : 0)];
3601
-
3602
- if (target) {
3603
- rootEl.insertBefore(multiDragElements[i], target);
3604
- } else {
3605
- rootEl.appendChild(multiDragElements[i]);
3606
- }
3607
- }
3608
- }
3609
- /**
3610
- * Insert multi-drag clones
3611
- * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted
3612
- * @param {HTMLElement} rootEl
3613
- */
3614
-
3615
-
3616
- function insertMultiDragClones(elementsInserted, rootEl) {
3617
- for (var i in multiDragClones) {
3618
- var target = rootEl.children[multiDragClones[i].sortableIndex + (elementsInserted ? Number(i) : 0)];
3619
-
3620
- if (target) {
3621
- rootEl.insertBefore(multiDragClones[i], target);
3622
- } else {
3623
- rootEl.appendChild(multiDragClones[i]);
3624
- }
3625
- }
3626
- }
3627
-
3628
- function removeMultiDragElements() {
3629
- for (var i in multiDragElements) {
3630
- if (multiDragElements[i] === dragEl$1) continue;
3631
- multiDragElements[i].parentNode && multiDragElements[i].parentNode.removeChild(multiDragElements[i]);
3632
- }
3633
- }
3634
-
3635
- Sortable$1.mount(new AutoScrollPlugin());
3636
- Sortable$1.mount(Remove, Revert);
3637
-
3638
- Sortable$1.mount(new SwapPlugin());
3639
- Sortable$1.mount(new MultiDragPlugin());
3640
-
3641
- return Sortable$1;
3642
-
3643
- }));
3644
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/js/app.js DELETED
@@ -1,222 +0,0 @@
1
- var example1 = document.getElementById('example1'),
2
- example2Left = document.getElementById('example2-left'),
3
- example2Right = document.getElementById('example2-right'),
4
- example3Left = document.getElementById('example3-left'),
5
- example3Right = document.getElementById('example3-right'),
6
- example4Left = document.getElementById('example4-left'),
7
- example4Right = document.getElementById('example4-right'),
8
- example5 = document.getElementById('example5'),
9
- example6 = document.getElementById('example6'),
10
- example7 = document.getElementById('example7'),
11
- gridDemo = document.getElementById('gridDemo'),
12
- multiDragDemo = document.getElementById('multiDragDemo'),
13
- swapDemo = document.getElementById('swapDemo');
14
-
15
- // Example 1 - Simple list
16
- new Sortable(example1, {
17
- animation: 150,
18
- ghostClass: 'blue-background-class'
19
- });
20
-
21
-
22
- // Example 2 - Shared lists
23
- new Sortable(example2Left, {
24
- group: 'shared', // set both lists to same group
25
- animation: 150
26
- });
27
-
28
- new Sortable(example2Right, {
29
- group: 'shared',
30
- animation: 150
31
- });
32
-
33
- // Example 3 - Cloning
34
- new Sortable(example3Left, {
35
- group: {
36
- name: 'shared',
37
- pull: 'clone' // To clone: set pull to 'clone'
38
- },
39
- animation: 150
40
- });
41
-
42
- new Sortable(example3Right, {
43
- group: {
44
- name: 'shared',
45
- pull: 'clone'
46
- },
47
- animation: 150
48
- });
49
-
50
-
51
- // Example 4 - No Sorting
52
- new Sortable(example4Left, {
53
- group: {
54
- name: 'shared',
55
- pull: 'clone',
56
- put: false // Do not allow items to be put into this list
57
- },
58
- animation: 150,
59
- sort: false // To disable sorting: set sort to false
60
- });
61
-
62
- new Sortable(example4Right, {
63
- group: 'shared',
64
- animation: 150
65
- });
66
-
67
-
68
- // Example 5 - Handle
69
- new Sortable(example5, {
70
- handle: '.handle', // handle class
71
- animation: 150
72
- });
73
-
74
- // Example 6 - Filter
75
- new Sortable(example6, {
76
- filter: '.filtered',
77
- animation: 150
78
- });
79
-
80
- // Example 7 - Thresholds
81
- var example7Sortable = new Sortable(example7, {
82
- animation: 150
83
- });
84
-
85
-
86
- var example7SwapThreshold = 1;
87
- var example7SwapThresholdInput = document.getElementById('example7SwapThresholdInput');
88
- var example7SwapThresholdCode = document.getElementById('example7SwapThresholdCode');
89
- var example7SwapThresholdIndicators = [].slice.call(document.querySelectorAll('.swap-threshold-indicator'));
90
-
91
- var example7InvertSwapInput = document.getElementById('example7InvertSwapInput');
92
- var example7InvertSwapCode = document.getElementById('example7InvertSwapCode');
93
- var example7InvertedSwapThresholdIndicators = [].slice.call(document.querySelectorAll('.inverted-swap-threshold-indicator'));
94
-
95
- var example7Squares = [].slice.call(document.querySelectorAll('.square'));
96
-
97
- var activeIndicators = example7SwapThresholdIndicators;
98
-
99
- var example7DirectionInput = document.getElementById('example7DirectionInput');
100
- var example7SizeProperty = 'width';
101
-
102
-
103
- function renderThresholdWidth(evt) {
104
- example7SwapThreshold = Number(evt.target.value);
105
- example7SwapThresholdCode.innerHTML = evt.target.value.indexOf('.') > -1 ? evt.target.value.padEnd(4, '0') : evt.target.value;
106
-
107
- for (var i = 0; i < activeIndicators.length; i++) {
108
- activeIndicators[i].style[example7SizeProperty] = (evt.target.value * 100) /
109
- (activeIndicators == example7SwapThresholdIndicators ? 1 : 2) + '%';
110
- }
111
-
112
- example7Sortable.option('swapThreshold', example7SwapThreshold);
113
- }
114
-
115
- example7SwapThresholdInput.addEventListener('input', renderThresholdWidth);
116
-
117
- example7InvertSwapInput.addEventListener('input', function(evt) {
118
- example7Sortable.option('invertSwap', evt.target.checked);
119
-
120
-
121
- for (var i = 0; i < activeIndicators.length; i++) {
122
- activeIndicators[i].style.display = 'none';
123
- }
124
-
125
- if (evt.target.checked) {
126
-
127
- example7InvertSwapCode.style.display = '';
128
-
129
- activeIndicators = example7InvertedSwapThresholdIndicators;
130
- } else {
131
- example7InvertSwapCode.style.display = 'none';
132
- activeIndicators = example7SwapThresholdIndicators;
133
- }
134
-
135
- renderThresholdWidth({
136
- target: example7SwapThresholdInput
137
- });
138
-
139
- for (i = 0; i < activeIndicators.length; i++) {
140
- activeIndicators[i].style.display = '';
141
- }
142
- });
143
-
144
- function renderDirection(evt) {
145
- for (var i = 0; i < example7Squares.length; i++) {
146
- example7Squares[i].style.display = evt.target.value === 'h' ? 'inline-block' : 'block';
147
- }
148
-
149
- for (i = 0; i < example7InvertedSwapThresholdIndicators.length; i++) {
150
- /* jshint expr:true */
151
- evt.target.value === 'h' && (example7InvertedSwapThresholdIndicators[i].style.height = '100%');
152
- evt.target.value === 'v' && (example7InvertedSwapThresholdIndicators[i].style.width = '100%');
153
- }
154
-
155
- for (i = 0; i < example7SwapThresholdIndicators.length; i++) {
156
- if (evt.target.value === 'h') {
157
- example7SwapThresholdIndicators[i].style.height = '100%';
158
- example7SwapThresholdIndicators[i].style.marginLeft = '50%';
159
- example7SwapThresholdIndicators[i].style.transform = 'translateX(-50%)';
160
-
161
- example7SwapThresholdIndicators[i].style.marginTop = '0';
162
- } else {
163
- example7SwapThresholdIndicators[i].style.width = '100%';
164
- example7SwapThresholdIndicators[i].style.marginTop = '50%';
165
- example7SwapThresholdIndicators[i].style.transform = 'translateY(-50%)';
166
-
167
- example7SwapThresholdIndicators[i].style.marginLeft = '0';
168
- }
169
- }
170
-
171
- if (evt.target.value === 'h') {
172
- example7SizeProperty = 'width';
173
- example7Sortable.option('direction', 'horizontal');
174
- } else {
175
- example7SizeProperty = 'height';
176
- example7Sortable.option('direction', 'vertical');
177
- }
178
-
179
- renderThresholdWidth({
180
- target: example7SwapThresholdInput
181
- });
182
- }
183
- example7DirectionInput.addEventListener('input', renderDirection);
184
-
185
- renderDirection({
186
- target: example7DirectionInput
187
- });
188
-
189
-
190
- // Grid demo
191
- new Sortable(gridDemo, {
192
- animation: 150,
193
- ghostClass: 'blue-background-class'
194
- });
195
-
196
- // Nested demo
197
- var nestedSortables = [].slice.call(document.querySelectorAll('.nested-sortable'));
198
-
199
- // Loop through each nested sortable element
200
- for (var i = 0; i < nestedSortables.length; i++) {
201
- new Sortable(nestedSortables[i], {
202
- group: 'nested',
203
- animation: 150,
204
- fallbackOnBody: true,
205
- swapThreshold: 0.65
206
- });
207
- }
208
-
209
- // MultiDrag demo
210
- new Sortable(multiDragDemo, {
211
- multiDrag: true,
212
- selectedClass: 'selected',
213
- animation: 150
214
- });
215
-
216
-
217
- // Swap demo
218
- new Sortable(swapDemo, {
219
- swap: true,
220
- swapClass: 'highlight',
221
- animation: 150
222
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/js/bootstrap.min.js DELETED
@@ -1,7 +0,0 @@
1
- /*!
2
- * Bootstrap v4.1.3 (https://getbootstrap.com/)
3
- * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
- */
6
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,h){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function l(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{},e=Object.keys(o);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(o).filter(function(t){return Object.getOwnPropertyDescriptor(o,t).enumerable}))),e.forEach(function(t){var e,n,i;e=r,i=o[n=t],n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i})}return r}e=e&&e.hasOwnProperty("default")?e.default:e,h=h&&h.hasOwnProperty("default")?h.default:h;var r,n,o,a,c,u,f,d,g,_,m,p,v,y,E,C,T,b,S,I,A,D,w,N,O,k,P,j,H,L,R,x,W,U,q,F,K,M,Q,B,V,Y,z,J,Z,G,$,X,tt,et,nt,it,rt,ot,st,at,lt,ct,ht,ut,ft,dt,gt,_t,mt,pt,vt,yt,Et,Ct,Tt,bt,St,It,At,Dt,wt,Nt,Ot,kt,Pt,jt,Ht,Lt,Rt,xt,Wt,Ut,qt,Ft,Kt,Mt,Qt,Bt,Vt,Yt,zt,Jt,Zt,Gt,$t,Xt,te,ee,ne,ie,re,oe,se,ae,le,ce,he,ue,fe,de,ge,_e,me,pe,ve,ye,Ee,Ce,Te,be,Se,Ie,Ae,De,we,Ne,Oe,ke,Pe,je,He,Le,Re,xe,We,Ue,qe,Fe,Ke,Me,Qe,Be,Ve,Ye,ze,Je,Ze,Ge,$e,Xe,tn,en,nn,rn,on,sn,an,ln,cn,hn,un,fn,dn,gn,_n,mn,pn,vn,yn,En,Cn,Tn,bn,Sn,In,An,Dn,wn,Nn,On,kn,Pn,jn,Hn,Ln,Rn,xn,Wn,Un,qn,Fn=function(i){var e="transitionend";function t(t){var e=this,n=!1;return i(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(e)},t),this}var l={TRANSITION_END:"bsTransitionEnd",getUID:function(t){for(;t+=~~(1e6*Math.random()),document.getElementById(t););return t},getSelectorFromElement:function(t){var e=t.getAttribute("data-target");e&&"#"!==e||(e=t.getAttribute("href")||"");try{return document.querySelector(e)?e:null}catch(t){return null}},getTransitionDurationFromElement:function(t){if(!t)return 0;var e=i(t).css("transition-duration");return parseFloat(e)?(e=e.split(",")[0],1e3*parseFloat(e)):0},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(t){i(t).trigger(e)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i],o=e[i],s=o&&l.isElement(o)?"element":(a=o,{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase());if(!new RegExp(r).test(s))throw new Error(t.toUpperCase()+': Option "'+i+'" provided type "'+s+'" but expected type "'+r+'".')}var a}};return i.fn.emulateTransitionEnd=t,i.event.special[l.TRANSITION_END]={bindType:e,delegateType:e,handle:function(t){if(i(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}},l}(e),Kn=(n="alert",a="."+(o="bs.alert"),c=(r=e).fn[n],u={CLOSE:"close"+a,CLOSED:"closed"+a,CLICK_DATA_API:"click"+a+".data-api"},f="alert",d="fade",g="show",_=function(){function i(t){this._element=t}var t=i.prototype;return t.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},t.dispose=function(){r.removeData(this._element,o),this._element=null},t._getRootElement=function(t){var e=Fn.getSelectorFromElement(t),n=!1;return e&&(n=document.querySelector(e)),n||(n=r(t).closest("."+f)[0]),n},t._triggerCloseEvent=function(t){var e=r.Event(u.CLOSE);return r(t).trigger(e),e},t._removeElement=function(e){var n=this;if(r(e).removeClass(g),r(e).hasClass(d)){var t=Fn.getTransitionDurationFromElement(e);r(e).one(Fn.TRANSITION_END,function(t){return n._destroyElement(e,t)}).emulateTransitionEnd(t)}else this._destroyElement(e)},t._destroyElement=function(t){r(t).detach().trigger(u.CLOSED).remove()},i._jQueryInterface=function(n){return this.each(function(){var t=r(this),e=t.data(o);e||(e=new i(this),t.data(o,e)),"close"===n&&e[n](this)})},i._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),r(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',_._handleDismiss(new _)),r.fn[n]=_._jQueryInterface,r.fn[n].Constructor=_,r.fn[n].noConflict=function(){return r.fn[n]=c,_._jQueryInterface},_),Mn=(p="button",y="."+(v="bs.button"),E=".data-api",C=(m=e).fn[p],T="active",b="btn",I='[data-toggle^="button"]',A='[data-toggle="buttons"]',D="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+y+E,FOCUS_BLUR_DATA_API:(S="focus")+y+E+" blur"+y+E},k=function(){function n(t){this._element=t}var t=n.prototype;return t.toggle=function(){var t=!0,e=!0,n=m(this._element).closest(A)[0];if(n){var i=this._element.querySelector(D);if(i){if("radio"===i.type)if(i.checked&&this._element.classList.contains(T))t=!1;else{var r=n.querySelector(w);r&&m(r).removeClass(T)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!this._element.classList.contains(T),m(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(T)),t&&m(this._element).toggleClass(T)},t.dispose=function(){m.removeData(this._element,v),this._element=null},n._jQueryInterface=function(e){return this.each(function(){var t=m(this).data(v);t||(t=new n(this),m(this).data(v,t)),"toggle"===e&&t[e]()})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),n}(),m(document).on(O.CLICK_DATA_API,I,function(t){t.preventDefault();var e=t.target;m(e).hasClass(b)||(e=m(e).closest(N)),k._jQueryInterface.call(m(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,I,function(t){var e=m(t.target).closest(N)[0];m(e).toggleClass(S,/^focus(in)?$/.test(t.type))}),m.fn[p]=k._jQueryInterface,m.fn[p].Constructor=k,m.fn[p].noConflict=function(){return m.fn[p]=C,k._jQueryInterface},k),Qn=(j="carousel",L="."+(H="bs.carousel"),R=".data-api",x=(P=e).fn[j],W={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},U={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},q="next",F="prev",K="left",M="right",Q={SLIDE:"slide"+L,SLID:"slid"+L,KEYDOWN:"keydown"+L,MOUSEENTER:"mouseenter"+L,MOUSELEAVE:"mouseleave"+L,TOUCHEND:"touchend"+L,LOAD_DATA_API:"load"+L+R,CLICK_DATA_API:"click"+L+R},B="carousel",V="active",Y="slide",z="carousel-item-right",J="carousel-item-left",Z="carousel-item-next",G="carousel-item-prev",$=".active",X=".active.carousel-item",tt=".carousel-item",et=".carousel-item-next, .carousel-item-prev",nt=".carousel-indicators",it="[data-slide], [data-slide-to]",rt='[data-ride="carousel"]',ot=function(){function o(t,e){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(e),this._element=P(t)[0],this._indicatorsElement=this._element.querySelector(nt),this._addEventListeners()}var t=o.prototype;return t.next=function(){this._isSliding||this._slide(q)},t.nextWhenVisible=function(){!document.hidden&&P(this._element).is(":visible")&&"hidden"!==P(this._element).css("visibility")&&this.next()},t.prev=function(){this._isSliding||this._slide(F)},t.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(et)&&(Fn.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},t.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},t.to=function(t){var e=this;this._activeElement=this._element.querySelector(X);var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)P(this._element).one(Q.SLID,function(){return e.to(t)});else{if(n===t)return this.pause(),void this.cycle();var i=n<t?q:F;this._slide(i,this._items[t])}},t.dispose=function(){P(this._element).off(L),P.removeData(this._element,H),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},t._getConfig=function(t){return t=l({},W,t),Fn.typeCheckConfig(j,t,U),t},t._addEventListeners=function(){var e=this;this._config.keyboard&&P(this._element).on(Q.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(P(this._element).on(Q.MOUSEENTER,function(t){return e.pause(t)}).on(Q.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&P(this._element).on(Q.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},t._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},t._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(tt)):[],this._items.indexOf(t)},t._getItemByDirection=function(t,e){var n=t===q,i=t===F,r=this._getItemIndex(e),o=this._items.length-1;if((i&&0===r||n&&r===o)&&!this._config.wrap)return e;var s=(r+(t===F?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},t._triggerSlideEvent=function(t,e){var n=this._getItemIndex(t),i=this._getItemIndex(this._element.querySelector(X)),r=P.Event(Q.SLIDE,{relatedTarget:t,direction:e,from:i,to:n});return P(this._element).trigger(r),r},t._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var e=[].slice.call(this._indicatorsElement.querySelectorAll($));P(e).removeClass(V);var n=this._indicatorsElement.children[this._getItemIndex(t)];n&&P(n).addClass(V)}},t._slide=function(t,e){var n,i,r,o=this,s=this._element.querySelector(X),a=this._getItemIndex(s),l=e||s&&this._getItemByDirection(t,s),c=this._getItemIndex(l),h=Boolean(this._interval);if(t===q?(n=J,i=Z,r=K):(n=z,i=G,r=M),l&&P(l).hasClass(V))this._isSliding=!1;else if(!this._triggerSlideEvent(l,r).isDefaultPrevented()&&s&&l){this._isSliding=!0,h&&this.pause(),this._setActiveIndicatorElement(l);var u=P.Event(Q.SLID,{relatedTarget:l,direction:r,from:a,to:c});if(P(this._element).hasClass(Y)){P(l).addClass(i),Fn.reflow(l),P(s).addClass(n),P(l).addClass(n);var f=Fn.getTransitionDurationFromElement(s);P(s).one(Fn.TRANSITION_END,function(){P(l).removeClass(n+" "+i).addClass(V),P(s).removeClass(V+" "+i+" "+n),o._isSliding=!1,setTimeout(function(){return P(o._element).trigger(u)},0)}).emulateTransitionEnd(f)}else P(s).removeClass(V),P(l).addClass(V),this._isSliding=!1,P(this._element).trigger(u);h&&this.cycle()}},o._jQueryInterface=function(i){return this.each(function(){var t=P(this).data(H),e=l({},W,P(this).data());"object"==typeof i&&(e=l({},e,i));var n="string"==typeof i?i:e.slide;if(t||(t=new o(this,e),P(this).data(H,t)),"number"==typeof i)t.to(i);else if("string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}else e.interval&&(t.pause(),t.cycle())})},o._dataApiClickHandler=function(t){var e=Fn.getSelectorFromElement(this);if(e){var n=P(e)[0];if(n&&P(n).hasClass(B)){var i=l({},P(n).data(),P(this).data()),r=this.getAttribute("data-slide-to");r&&(i.interval=!1),o._jQueryInterface.call(P(n),i),r&&P(n).data(H).to(r),t.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return W}}]),o}(),P(document).on(Q.CLICK_DATA_API,it,ot._dataApiClickHandler),P(window).on(Q.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(rt)),e=0,n=t.length;e<n;e++){var i=P(t[e]);ot._jQueryInterface.call(i,i.data())}}),P.fn[j]=ot._jQueryInterface,P.fn[j].Constructor=ot,P.fn[j].noConflict=function(){return P.fn[j]=x,ot._jQueryInterface},ot),Bn=(at="collapse",ct="."+(lt="bs.collapse"),ht=(st=e).fn[at],ut={toggle:!0,parent:""},ft={toggle:"boolean",parent:"(string|element)"},dt={SHOW:"show"+ct,SHOWN:"shown"+ct,HIDE:"hide"+ct,HIDDEN:"hidden"+ct,CLICK_DATA_API:"click"+ct+".data-api"},gt="show",_t="collapse",mt="collapsing",pt="collapsed",vt="width",yt="height",Et=".show, .collapsing",Ct='[data-toggle="collapse"]',Tt=function(){function a(e,t){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(t),this._triggerArray=st.makeArray(document.querySelectorAll('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var n=[].slice.call(document.querySelectorAll(Ct)),i=0,r=n.length;i<r;i++){var o=n[i],s=Fn.getSelectorFromElement(o),a=[].slice.call(document.querySelectorAll(s)).filter(function(t){return t===e});null!==s&&0<a.length&&(this._selector=s,this._triggerArray.push(o))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var t=a.prototype;return t.toggle=function(){st(this._element).hasClass(gt)?this.hide():this.show()},t.show=function(){var t,e,n=this;if(!this._isTransitioning&&!st(this._element).hasClass(gt)&&(this._parent&&0===(t=[].slice.call(this._parent.querySelectorAll(Et)).filter(function(t){return t.getAttribute("data-parent")===n._config.parent})).length&&(t=null),!(t&&(e=st(t).not(this._selector).data(lt))&&e._isTransitioning))){var i=st.Event(dt.SHOW);if(st(this._element).trigger(i),!i.isDefaultPrevented()){t&&(a._jQueryInterface.call(st(t).not(this._selector),"hide"),e||st(t).data(lt,null));var r=this._getDimension();st(this._element).removeClass(_t).addClass(mt),this._element.style[r]=0,this._triggerArray.length&&st(this._triggerArray).removeClass(pt).attr("aria-expanded",!0),this.setTransitioning(!0);var o="scroll"+(r[0].toUpperCase()+r.slice(1)),s=Fn.getTransitionDurationFromElement(this._element);st(this._element).one(Fn.TRANSITION_END,function(){st(n._element).removeClass(mt).addClass(_t).addClass(gt),n._element.style[r]="",n.setTransitioning(!1),st(n._element).trigger(dt.SHOWN)}).emulateTransitionEnd(s),this._element.style[r]=this._element[o]+"px"}}},t.hide=function(){var t=this;if(!this._isTransitioning&&st(this._element).hasClass(gt)){var e=st.Event(dt.HIDE);if(st(this._element).trigger(e),!e.isDefaultPrevented()){var n=this._getDimension();this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",Fn.reflow(this._element),st(this._element).addClass(mt).removeClass(_t).removeClass(gt);var i=this._triggerArray.length;if(0<i)for(var r=0;r<i;r++){var o=this._triggerArray[r],s=Fn.getSelectorFromElement(o);if(null!==s)st([].slice.call(document.querySelectorAll(s))).hasClass(gt)||st(o).addClass(pt).attr("aria-expanded",!1)}this.setTransitioning(!0);this._element.style[n]="";var a=Fn.getTransitionDurationFromElement(this._element);st(this._element).one(Fn.TRANSITION_END,function(){t.setTransitioning(!1),st(t._element).removeClass(mt).addClass(_t).trigger(dt.HIDDEN)}).emulateTransitionEnd(a)}}},t.setTransitioning=function(t){this._isTransitioning=t},t.dispose=function(){st.removeData(this._element,lt),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},t._getConfig=function(t){return(t=l({},ut,t)).toggle=Boolean(t.toggle),Fn.typeCheckConfig(at,t,ft),t},t._getDimension=function(){return st(this._element).hasClass(vt)?vt:yt},t._getParent=function(){var n=this,t=null;Fn.isElement(this._config.parent)?(t=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(t=this._config.parent[0])):t=document.querySelector(this._config.parent);var e='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]',i=[].slice.call(t.querySelectorAll(e));return st(i).each(function(t,e){n._addAriaAndCollapsedClass(a._getTargetFromElement(e),[e])}),t},t._addAriaAndCollapsedClass=function(t,e){if(t){var n=st(t).hasClass(gt);e.length&&st(e).toggleClass(pt,!n).attr("aria-expanded",n)}},a._getTargetFromElement=function(t){var e=Fn.getSelectorFromElement(t);return e?document.querySelector(e):null},a._jQueryInterface=function(i){return this.each(function(){var t=st(this),e=t.data(lt),n=l({},ut,t.data(),"object"==typeof i&&i?i:{});if(!e&&n.toggle&&/show|hide/.test(i)&&(n.toggle=!1),e||(e=new a(this,n),t.data(lt,e)),"string"==typeof i){if("undefined"==typeof e[i])throw new TypeError('No method named "'+i+'"');e[i]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ut}}]),a}(),st(document).on(dt.CLICK_DATA_API,Ct,function(t){"A"===t.currentTarget.tagName&&t.preventDefault();var n=st(this),e=Fn.getSelectorFromElement(this),i=[].slice.call(document.querySelectorAll(e));st(i).each(function(){var t=st(this),e=t.data(lt)?"toggle":n.data();Tt._jQueryInterface.call(t,e)})}),st.fn[at]=Tt._jQueryInterface,st.fn[at].Constructor=Tt,st.fn[at].noConflict=function(){return st.fn[at]=ht,Tt._jQueryInterface},Tt),Vn=(St="dropdown",At="."+(It="bs.dropdown"),Dt=".data-api",wt=(bt=e).fn[St],Nt=new RegExp("38|40|27"),Ot={HIDE:"hide"+At,HIDDEN:"hidden"+At,SHOW:"show"+At,SHOWN:"shown"+At,CLICK:"click"+At,CLICK_DATA_API:"click"+At+Dt,KEYDOWN_DATA_API:"keydown"+At+Dt,KEYUP_DATA_API:"keyup"+At+Dt},kt="disabled",Pt="show",jt="dropup",Ht="dropright",Lt="dropleft",Rt="dropdown-menu-right",xt="position-static",Wt='[data-toggle="dropdown"]',Ut=".dropdown form",qt=".dropdown-menu",Ft=".navbar-nav",Kt=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Mt="top-start",Qt="top-end",Bt="bottom-start",Vt="bottom-end",Yt="right-start",zt="left-start",Jt={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic"},Zt={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string"},Gt=function(){function c(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var t=c.prototype;return t.toggle=function(){if(!this._element.disabled&&!bt(this._element).hasClass(kt)){var t=c._getParentFromElement(this._element),e=bt(this._menu).hasClass(Pt);if(c._clearMenus(),!e){var n={relatedTarget:this._element},i=bt.Event(Ot.SHOW,n);if(bt(t).trigger(i),!i.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof h)throw new TypeError("Bootstrap dropdown require Popper.js (https://popper.js.org)");var r=this._element;"parent"===this._config.reference?r=t:Fn.isElement(this._config.reference)&&(r=this._config.reference,"undefined"!=typeof this._config.reference.jquery&&(r=this._config.reference[0])),"scrollParent"!==this._config.boundary&&bt(t).addClass(xt),this._popper=new h(r,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===bt(t).closest(Ft).length&&bt(document.body).children().on("mouseover",null,bt.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),bt(this._menu).toggleClass(Pt),bt(t).toggleClass(Pt).trigger(bt.Event(Ot.SHOWN,n))}}}},t.dispose=function(){bt.removeData(this._element,It),bt(this._element).off(At),this._element=null,(this._menu=null)!==this._popper&&(this._popper.destroy(),this._popper=null)},t.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},t._addEventListeners=function(){var e=this;bt(this._element).on(Ot.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},t._getConfig=function(t){return t=l({},this.constructor.Default,bt(this._element).data(),t),Fn.typeCheckConfig(St,t,this.constructor.DefaultType),t},t._getMenuElement=function(){if(!this._menu){var t=c._getParentFromElement(this._element);t&&(this._menu=t.querySelector(qt))}return this._menu},t._getPlacement=function(){var t=bt(this._element.parentNode),e=Bt;return t.hasClass(jt)?(e=Mt,bt(this._menu).hasClass(Rt)&&(e=Qt)):t.hasClass(Ht)?e=Yt:t.hasClass(Lt)?e=zt:bt(this._menu).hasClass(Rt)&&(e=Vt),e},t._detectNavbar=function(){return 0<bt(this._element).closest(".navbar").length},t._getPopperConfig=function(){var e=this,t={};"function"==typeof this._config.offset?t.fn=function(t){return t.offsets=l({},t.offsets,e._config.offset(t.offsets)||{}),t}:t.offset=this._config.offset;var n={placement:this._getPlacement(),modifiers:{offset:t,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return"static"===this._config.display&&(n.modifiers.applyStyle={enabled:!1}),n},c._jQueryInterface=function(e){return this.each(function(){var t=bt(this).data(It);if(t||(t=new c(this,"object"==typeof e?e:null),bt(this).data(It,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},c._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var e=[].slice.call(document.querySelectorAll(Wt)),n=0,i=e.length;n<i;n++){var r=c._getParentFromElement(e[n]),o=bt(e[n]).data(It),s={relatedTarget:e[n]};if(t&&"click"===t.type&&(s.clickEvent=t),o){var a=o._menu;if(bt(r).hasClass(Pt)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&bt.contains(r,t.target))){var l=bt.Event(Ot.HIDE,s);bt(r).trigger(l),l.isDefaultPrevented()||("ontouchstart"in document.documentElement&&bt(document.body).children().off("mouseover",null,bt.noop),e[n].setAttribute("aria-expanded","false"),bt(a).removeClass(Pt),bt(r).removeClass(Pt).trigger(bt.Event(Ot.HIDDEN,s)))}}}},c._getParentFromElement=function(t){var e,n=Fn.getSelectorFromElement(t);return n&&(e=document.querySelector(n)),e||t.parentNode},c._dataApiKeydownHandler=function(t){if((/input|textarea/i.test(t.target.tagName)?!(32===t.which||27!==t.which&&(40!==t.which&&38!==t.which||bt(t.target).closest(qt).length)):Nt.test(t.which))&&(t.preventDefault(),t.stopPropagation(),!this.disabled&&!bt(this).hasClass(kt))){var e=c._getParentFromElement(this),n=bt(e).hasClass(Pt);if((n||27===t.which&&32===t.which)&&(!n||27!==t.which&&32!==t.which)){var i=[].slice.call(e.querySelectorAll(Kt));if(0!==i.length){var r=i.indexOf(t.target);38===t.which&&0<r&&r--,40===t.which&&r<i.length-1&&r++,r<0&&(r=0),i[r].focus()}}else{if(27===t.which){var o=e.querySelector(Wt);bt(o).trigger("focus")}bt(this).trigger("click")}}},s(c,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Jt}},{key:"DefaultType",get:function(){return Zt}}]),c}(),bt(document).on(Ot.KEYDOWN_DATA_API,Wt,Gt._dataApiKeydownHandler).on(Ot.KEYDOWN_DATA_API,qt,Gt._dataApiKeydownHandler).on(Ot.CLICK_DATA_API+" "+Ot.KEYUP_DATA_API,Gt._clearMenus).on(Ot.CLICK_DATA_API,Wt,function(t){t.preventDefault(),t.stopPropagation(),Gt._jQueryInterface.call(bt(this),"toggle")}).on(Ot.CLICK_DATA_API,Ut,function(t){t.stopPropagation()}),bt.fn[St]=Gt._jQueryInterface,bt.fn[St].Constructor=Gt,bt.fn[St].noConflict=function(){return bt.fn[St]=wt,Gt._jQueryInterface},Gt),Yn=(Xt="modal",ee="."+(te="bs.modal"),ne=($t=e).fn[Xt],ie={backdrop:!0,keyboard:!0,focus:!0,show:!0},re={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},oe={HIDE:"hide"+ee,HIDDEN:"hidden"+ee,SHOW:"show"+ee,SHOWN:"shown"+ee,FOCUSIN:"focusin"+ee,RESIZE:"resize"+ee,CLICK_DISMISS:"click.dismiss"+ee,KEYDOWN_DISMISS:"keydown.dismiss"+ee,MOUSEUP_DISMISS:"mouseup.dismiss"+ee,MOUSEDOWN_DISMISS:"mousedown.dismiss"+ee,CLICK_DATA_API:"click"+ee+".data-api"},se="modal-scrollbar-measure",ae="modal-backdrop",le="modal-open",ce="fade",he="show",ue=".modal-dialog",fe='[data-toggle="modal"]',de='[data-dismiss="modal"]',ge=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",_e=".sticky-top",me=function(){function r(t,e){this._config=this._getConfig(e),this._element=t,this._dialog=t.querySelector(ue),this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._scrollbarWidth=0}var t=r.prototype;return t.toggle=function(t){return this._isShown?this.hide():this.show(t)},t.show=function(t){var e=this;if(!this._isTransitioning&&!this._isShown){$t(this._element).hasClass(ce)&&(this._isTransitioning=!0);var n=$t.Event(oe.SHOW,{relatedTarget:t});$t(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),$t(document.body).addClass(le),this._setEscapeEvent(),this._setResizeEvent(),$t(this._element).on(oe.CLICK_DISMISS,de,function(t){return e.hide(t)}),$t(this._dialog).on(oe.MOUSEDOWN_DISMISS,function(){$t(e._element).one(oe.MOUSEUP_DISMISS,function(t){$t(t.target).is(e._element)&&(e._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return e._showElement(t)}))}},t.hide=function(t){var e=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var n=$t.Event(oe.HIDE);if($t(this._element).trigger(n),this._isShown&&!n.isDefaultPrevented()){this._isShown=!1;var i=$t(this._element).hasClass(ce);if(i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),$t(document).off(oe.FOCUSIN),$t(this._element).removeClass(he),$t(this._element).off(oe.CLICK_DISMISS),$t(this._dialog).off(oe.MOUSEDOWN_DISMISS),i){var r=Fn.getTransitionDurationFromElement(this._element);$t(this._element).one(Fn.TRANSITION_END,function(t){return e._hideModal(t)}).emulateTransitionEnd(r)}else this._hideModal()}}},t.dispose=function(){$t.removeData(this._element,te),$t(window,document,this._element,this._backdrop).off(ee),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},t.handleUpdate=function(){this._adjustDialog()},t._getConfig=function(t){return t=l({},ie,t),Fn.typeCheckConfig(Xt,t,re),t},t._showElement=function(t){var e=this,n=$t(this._element).hasClass(ce);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&Fn.reflow(this._element),$t(this._element).addClass(he),this._config.focus&&this._enforceFocus();var i=$t.Event(oe.SHOWN,{relatedTarget:t}),r=function(){e._config.focus&&e._element.focus(),e._isTransitioning=!1,$t(e._element).trigger(i)};if(n){var o=Fn.getTransitionDurationFromElement(this._element);$t(this._dialog).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r()},t._enforceFocus=function(){var e=this;$t(document).off(oe.FOCUSIN).on(oe.FOCUSIN,function(t){document!==t.target&&e._element!==t.target&&0===$t(e._element).has(t.target).length&&e._element.focus()})},t._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?$t(this._element).on(oe.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||$t(this._element).off(oe.KEYDOWN_DISMISS)},t._setResizeEvent=function(){var e=this;this._isShown?$t(window).on(oe.RESIZE,function(t){return e.handleUpdate(t)}):$t(window).off(oe.RESIZE)},t._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){$t(document.body).removeClass(le),t._resetAdjustments(),t._resetScrollbar(),$t(t._element).trigger(oe.HIDDEN)})},t._removeBackdrop=function(){this._backdrop&&($t(this._backdrop).remove(),this._backdrop=null)},t._showBackdrop=function(t){var e=this,n=$t(this._element).hasClass(ce)?ce:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className=ae,n&&this._backdrop.classList.add(n),$t(this._backdrop).appendTo(document.body),$t(this._element).on(oe.CLICK_DISMISS,function(t){e._ignoreBackdropClick?e._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===e._config.backdrop?e._element.focus():e.hide())}),n&&Fn.reflow(this._backdrop),$t(this._backdrop).addClass(he),!t)return;if(!n)return void t();var i=Fn.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(Fn.TRANSITION_END,t).emulateTransitionEnd(i)}else if(!this._isShown&&this._backdrop){$t(this._backdrop).removeClass(he);var r=function(){e._removeBackdrop(),t&&t()};if($t(this._element).hasClass(ce)){var o=Fn.getTransitionDurationFromElement(this._backdrop);$t(this._backdrop).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r()}else t&&t()},t._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},t._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},t._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},t._setScrollbar=function(){var r=this;if(this._isBodyOverflowing){var t=[].slice.call(document.querySelectorAll(ge)),e=[].slice.call(document.querySelectorAll(_e));$t(t).each(function(t,e){var n=e.style.paddingRight,i=$t(e).css("padding-right");$t(e).data("padding-right",n).css("padding-right",parseFloat(i)+r._scrollbarWidth+"px")}),$t(e).each(function(t,e){var n=e.style.marginRight,i=$t(e).css("margin-right");$t(e).data("margin-right",n).css("margin-right",parseFloat(i)-r._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=$t(document.body).css("padding-right");$t(document.body).data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},t._resetScrollbar=function(){var t=[].slice.call(document.querySelectorAll(ge));$t(t).each(function(t,e){var n=$t(e).data("padding-right");$t(e).removeData("padding-right"),e.style.paddingRight=n||""});var e=[].slice.call(document.querySelectorAll(""+_e));$t(e).each(function(t,e){var n=$t(e).data("margin-right");"undefined"!=typeof n&&$t(e).css("margin-right",n).removeData("margin-right")});var n=$t(document.body).data("padding-right");$t(document.body).removeData("padding-right"),document.body.style.paddingRight=n||""},t._getScrollbarWidth=function(){var t=document.createElement("div");t.className=se,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},r._jQueryInterface=function(n,i){return this.each(function(){var t=$t(this).data(te),e=l({},ie,$t(this).data(),"object"==typeof n&&n?n:{});if(t||(t=new r(this,e),$t(this).data(te,t)),"string"==typeof n){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n](i)}else e.show&&t.show(i)})},s(r,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return ie}}]),r}(),$t(document).on(oe.CLICK_DATA_API,fe,function(t){var e,n=this,i=Fn.getSelectorFromElement(this);i&&(e=document.querySelector(i));var r=$t(e).data(te)?"toggle":l({},$t(e).data(),$t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var o=$t(e).one(oe.SHOW,function(t){t.isDefaultPrevented()||o.one(oe.HIDDEN,function(){$t(n).is(":visible")&&n.focus()})});me._jQueryInterface.call($t(e),r,this)}),$t.fn[Xt]=me._jQueryInterface,$t.fn[Xt].Constructor=me,$t.fn[Xt].noConflict=function(){return $t.fn[Xt]=ne,me._jQueryInterface},me),zn=(ve="tooltip",Ee="."+(ye="bs.tooltip"),Ce=(pe=e).fn[ve],Te="bs-tooltip",be=new RegExp("(^|\\s)"+Te+"\\S+","g"),Ae={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!(Ie={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"}),selector:!(Se={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"}),placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},we="out",Ne={HIDE:"hide"+Ee,HIDDEN:"hidden"+Ee,SHOW:(De="show")+Ee,SHOWN:"shown"+Ee,INSERTED:"inserted"+Ee,CLICK:"click"+Ee,FOCUSIN:"focusin"+Ee,FOCUSOUT:"focusout"+Ee,MOUSEENTER:"mouseenter"+Ee,MOUSELEAVE:"mouseleave"+Ee},Oe="fade",ke="show",Pe=".tooltip-inner",je=".arrow",He="hover",Le="focus",Re="click",xe="manual",We=function(){function i(t,e){if("undefined"==typeof h)throw new TypeError("Bootstrap tooltips require Popper.js (https://popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var t=i.prototype;return t.enable=function(){this._isEnabled=!0},t.disable=function(){this._isEnabled=!1},t.toggleEnabled=function(){this._isEnabled=!this._isEnabled},t.toggle=function(t){if(this._isEnabled)if(t){var e=this.constructor.DATA_KEY,n=pe(t.currentTarget).data(e);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(e,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(pe(this.getTipElement()).hasClass(ke))return void this._leave(null,this);this._enter(null,this)}},t.dispose=function(){clearTimeout(this._timeout),pe.removeData(this.element,this.constructor.DATA_KEY),pe(this.element).off(this.constructor.EVENT_KEY),pe(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&pe(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,(this._activeTrigger=null)!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},t.show=function(){var e=this;if("none"===pe(this.element).css("display"))throw new Error("Please use show on visible elements");var t=pe.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){pe(this.element).trigger(t);var n=pe.contains(this.element.ownerDocument.documentElement,this.element);if(t.isDefaultPrevented()||!n)return;var i=this.getTipElement(),r=Fn.getUID(this.constructor.NAME);i.setAttribute("id",r),this.element.setAttribute("aria-describedby",r),this.setContent(),this.config.animation&&pe(i).addClass(Oe);var o="function"==typeof this.config.placement?this.config.placement.call(this,i,this.element):this.config.placement,s=this._getAttachment(o);this.addAttachmentClass(s);var a=!1===this.config.container?document.body:pe(document).find(this.config.container);pe(i).data(this.constructor.DATA_KEY,this),pe.contains(this.element.ownerDocument.documentElement,this.tip)||pe(i).appendTo(a),pe(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new h(this.element,i,{placement:s,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:je},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),pe(i).addClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().on("mouseover",null,pe.noop);var l=function(){e.config.animation&&e._fixTransition();var t=e._hoverState;e._hoverState=null,pe(e.element).trigger(e.constructor.Event.SHOWN),t===we&&e._leave(null,e)};if(pe(this.tip).hasClass(Oe)){var c=Fn.getTransitionDurationFromElement(this.tip);pe(this.tip).one(Fn.TRANSITION_END,l).emulateTransitionEnd(c)}else l()}},t.hide=function(t){var e=this,n=this.getTipElement(),i=pe.Event(this.constructor.Event.HIDE),r=function(){e._hoverState!==De&&n.parentNode&&n.parentNode.removeChild(n),e._cleanTipClass(),e.element.removeAttribute("aria-describedby"),pe(e.element).trigger(e.constructor.Event.HIDDEN),null!==e._popper&&e._popper.destroy(),t&&t()};if(pe(this.element).trigger(i),!i.isDefaultPrevented()){if(pe(n).removeClass(ke),"ontouchstart"in document.documentElement&&pe(document.body).children().off("mouseover",null,pe.noop),this._activeTrigger[Re]=!1,this._activeTrigger[Le]=!1,this._activeTrigger[He]=!1,pe(this.tip).hasClass(Oe)){var o=Fn.getTransitionDurationFromElement(n);pe(n).one(Fn.TRANSITION_END,r).emulateTransitionEnd(o)}else r();this._hoverState=""}},t.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},t.isWithContent=function(){return Boolean(this.getTitle())},t.addAttachmentClass=function(t){pe(this.getTipElement()).addClass(Te+"-"+t)},t.getTipElement=function(){return this.tip=this.tip||pe(this.config.template)[0],this.tip},t.setContent=function(){var t=this.getTipElement();this.setElementContent(pe(t.querySelectorAll(Pe)),this.getTitle()),pe(t).removeClass(Oe+" "+ke)},t.setElementContent=function(t,e){var n=this.config.html;"object"==typeof e&&(e.nodeType||e.jquery)?n?pe(e).parent().is(t)||t.empty().append(e):t.text(pe(e).text()):t[n?"html":"text"](e)},t.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},t._getAttachment=function(t){return Ie[t.toUpperCase()]},t._setListeners=function(){var i=this;this.config.trigger.split(" ").forEach(function(t){if("click"===t)pe(i.element).on(i.constructor.Event.CLICK,i.config.selector,function(t){return i.toggle(t)});else if(t!==xe){var e=t===He?i.constructor.Event.MOUSEENTER:i.constructor.Event.FOCUSIN,n=t===He?i.constructor.Event.MOUSELEAVE:i.constructor.Event.FOCUSOUT;pe(i.element).on(e,i.config.selector,function(t){return i._enter(t)}).on(n,i.config.selector,function(t){return i._leave(t)})}pe(i.element).closest(".modal").on("hide.bs.modal",function(){return i.hide()})}),this.config.selector?this.config=l({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},t._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},t._enter=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusin"===t.type?Le:He]=!0),pe(e.getTipElement()).hasClass(ke)||e._hoverState===De?e._hoverState=De:(clearTimeout(e._timeout),e._hoverState=De,e.config.delay&&e.config.delay.show?e._timeout=setTimeout(function(){e._hoverState===De&&e.show()},e.config.delay.show):e.show())},t._leave=function(t,e){var n=this.constructor.DATA_KEY;(e=e||pe(t.currentTarget).data(n))||(e=new this.constructor(t.currentTarget,this._getDelegateConfig()),pe(t.currentTarget).data(n,e)),t&&(e._activeTrigger["focusout"===t.type?Le:He]=!1),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=we,e.config.delay&&e.config.delay.hide?e._timeout=setTimeout(function(){e._hoverState===we&&e.hide()},e.config.delay.hide):e.hide())},t._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},t._getConfig=function(t){return"number"==typeof(t=l({},this.constructor.Default,pe(this.element).data(),"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),Fn.typeCheckConfig(ve,t,this.constructor.DefaultType),t},t._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},t._cleanTipClass=function(){var t=pe(this.getTipElement()),e=t.attr("class").match(be);null!==e&&e.length&&t.removeClass(e.join(""))},t._handlePopperPlacementChange=function(t){var e=t.instance;this.tip=e.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},t._fixTransition=function(){var t=this.getTipElement(),e=this.config.animation;null===t.getAttribute("x-placement")&&(pe(t).removeClass(Oe),this.config.animation=!1,this.hide(),this.show(),this.config.animation=e)},i._jQueryInterface=function(n){return this.each(function(){var t=pe(this).data(ye),e="object"==typeof n&&n;if((t||!/dispose|hide/.test(n))&&(t||(t=new i(this,e),pe(this).data(ye,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Ae}},{key:"NAME",get:function(){return ve}},{key:"DATA_KEY",get:function(){return ye}},{key:"Event",get:function(){return Ne}},{key:"EVENT_KEY",get:function(){return Ee}},{key:"DefaultType",get:function(){return Se}}]),i}(),pe.fn[ve]=We._jQueryInterface,pe.fn[ve].Constructor=We,pe.fn[ve].noConflict=function(){return pe.fn[ve]=Ce,We._jQueryInterface},We),Jn=(qe="popover",Ke="."+(Fe="bs.popover"),Me=(Ue=e).fn[qe],Qe="bs-popover",Be=new RegExp("(^|\\s)"+Qe+"\\S+","g"),Ve=l({},zn.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),Ye=l({},zn.DefaultType,{content:"(string|element|function)"}),ze="fade",Ze=".popover-header",Ge=".popover-body",$e={HIDE:"hide"+Ke,HIDDEN:"hidden"+Ke,SHOW:(Je="show")+Ke,SHOWN:"shown"+Ke,INSERTED:"inserted"+Ke,CLICK:"click"+Ke,FOCUSIN:"focusin"+Ke,FOCUSOUT:"focusout"+Ke,MOUSEENTER:"mouseenter"+Ke,MOUSELEAVE:"mouseleave"+Ke},Xe=function(t){var e,n;function i(){return t.apply(this,arguments)||this}n=t,(e=i).prototype=Object.create(n.prototype),(e.prototype.constructor=e).__proto__=n;var r=i.prototype;return r.isWithContent=function(){return this.getTitle()||this._getContent()},r.addAttachmentClass=function(t){Ue(this.getTipElement()).addClass(Qe+"-"+t)},r.getTipElement=function(){return this.tip=this.tip||Ue(this.config.template)[0],this.tip},r.setContent=function(){var t=Ue(this.getTipElement());this.setElementContent(t.find(Ze),this.getTitle());var e=this._getContent();"function"==typeof e&&(e=e.call(this.element)),this.setElementContent(t.find(Ge),e),t.removeClass(ze+" "+Je)},r._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},r._cleanTipClass=function(){var t=Ue(this.getTipElement()),e=t.attr("class").match(Be);null!==e&&0<e.length&&t.removeClass(e.join(""))},i._jQueryInterface=function(n){return this.each(function(){var t=Ue(this).data(Fe),e="object"==typeof n?n:null;if((t||!/destroy|hide/.test(n))&&(t||(t=new i(this,e),Ue(this).data(Fe,t)),"string"==typeof n)){if("undefined"==typeof t[n])throw new TypeError('No method named "'+n+'"');t[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return Ve}},{key:"NAME",get:function(){return qe}},{key:"DATA_KEY",get:function(){return Fe}},{key:"Event",get:function(){return $e}},{key:"EVENT_KEY",get:function(){return Ke}},{key:"DefaultType",get:function(){return Ye}}]),i}(zn),Ue.fn[qe]=Xe._jQueryInterface,Ue.fn[qe].Constructor=Xe,Ue.fn[qe].noConflict=function(){return Ue.fn[qe]=Me,Xe._jQueryInterface},Xe),Zn=(en="scrollspy",rn="."+(nn="bs.scrollspy"),on=(tn=e).fn[en],sn={offset:10,method:"auto",target:""},an={offset:"number",method:"string",target:"(string|element)"},ln={ACTIVATE:"activate"+rn,SCROLL:"scroll"+rn,LOAD_DATA_API:"load"+rn+".data-api"},cn="dropdown-item",hn="active",un='[data-spy="scroll"]',fn=".active",dn=".nav, .list-group",gn=".nav-link",_n=".nav-item",mn=".list-group-item",pn=".dropdown",vn=".dropdown-item",yn=".dropdown-toggle",En="offset",Cn="position",Tn=function(){function n(t,e){var n=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(e),this._selector=this._config.target+" "+gn+","+this._config.target+" "+mn+","+this._config.target+" "+vn,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,tn(this._scrollElement).on(ln.SCROLL,function(t){return n._process(t)}),this.refresh(),this._process()}var t=n.prototype;return t.refresh=function(){var e=this,t=this._scrollElement===this._scrollElement.window?En:Cn,r="auto"===this._config.method?t:this._config.method,o=r===Cn?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map(function(t){var e,n=Fn.getSelectorFromElement(t);if(n&&(e=document.querySelector(n)),e){var i=e.getBoundingClientRect();if(i.width||i.height)return[tn(e)[r]().top+o,n]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},t.dispose=function(){tn.removeData(this._element,nn),tn(this._scrollElement).off(rn),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},t._getConfig=function(t){if("string"!=typeof(t=l({},sn,"object"==typeof t&&t?t:{})).target){var e=tn(t.target).attr("id");e||(e=Fn.getUID(en),tn(t.target).attr("id",e)),t.target="#"+e}return Fn.typeCheckConfig(en,t,an),t},t._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},t._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},t._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},t._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),n<=t){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&0<this._offsets[0])return this._activeTarget=null,void this._clear();for(var r=this._offsets.length;r--;){this._activeTarget!==this._targets[r]&&t>=this._offsets[r]&&("undefined"==typeof this._offsets[r+1]||t<this._offsets[r+1])&&this._activate(this._targets[r])}}},t._activate=function(e){this._activeTarget=e,this._clear();var t=this._selector.split(",");t=t.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var n=tn([].slice.call(document.querySelectorAll(t.join(","))));n.hasClass(cn)?(n.closest(pn).find(yn).addClass(hn),n.addClass(hn)):(n.addClass(hn),n.parents(dn).prev(gn+", "+mn).addClass(hn),n.parents(dn).prev(_n).children(gn).addClass(hn)),tn(this._scrollElement).trigger(ln.ACTIVATE,{relatedTarget:e})},t._clear=function(){var t=[].slice.call(document.querySelectorAll(this._selector));tn(t).filter(fn).removeClass(hn)},n._jQueryInterface=function(e){return this.each(function(){var t=tn(this).data(nn);if(t||(t=new n(this,"object"==typeof e&&e),tn(this).data(nn,t)),"string"==typeof e){if("undefined"==typeof t[e])throw new TypeError('No method named "'+e+'"');t[e]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.1.3"}},{key:"Default",get:function(){return sn}}]),n}(),tn(window).on(ln.LOAD_DATA_API,function(){for(var t=[].slice.call(document.querySelectorAll(un)),e=t.length;e--;){var n=tn(t[e]);Tn._jQueryInterface.call(n,n.data())}}),tn.fn[en]=Tn._jQueryInterface,tn.fn[en].Constructor=Tn,tn.fn[en].noConflict=function(){return tn.fn[en]=on,Tn._jQueryInterface},Tn),Gn=(In="."+(Sn="bs.tab"),An=(bn=e).fn.tab,Dn={HIDE:"hide"+In,HIDDEN:"hidden"+In,SHOW:"show"+In,SHOWN:"shown"+In,CLICK_DATA_API:"click"+In+".data-api"},wn="dropdown-menu",Nn="active",On="disabled",kn="fade",Pn="show",jn=".dropdown",Hn=".nav, .list-group",Ln=".active",Rn="> li > .active",xn='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',Wn=".dropdown-toggle",Un="> .dropdown-menu .active",qn=function(){function i(t){this._element=t}var t=i.prototype;return t.show=function(){var n=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&bn(this._element).hasClass(Nn)||bn(this._element).hasClass(On))){var t,i,e=bn(this._element).closest(Hn)[0],r=Fn.getSelectorFromElement(this._element);if(e){var o="UL"===e.nodeName?Rn:Ln;i=(i=bn.makeArray(bn(e).find(o)))[i.length-1]}var s=bn.Event(Dn.HIDE,{relatedTarget:this._element}),a=bn.Event(Dn.SHOW,{relatedTarget:i});if(i&&bn(i).trigger(s),bn(this._element).trigger(a),!a.isDefaultPrevented()&&!s.isDefaultPrevented()){r&&(t=document.querySelector(r)),this._activate(this._element,e);var l=function(){var t=bn.Event(Dn.HIDDEN,{relatedTarget:n._element}),e=bn.Event(Dn.SHOWN,{relatedTarget:i});bn(i).trigger(t),bn(n._element).trigger(e)};t?this._activate(t,t.parentNode,l):l()}}},t.dispose=function(){bn.removeData(this._element,Sn),this._element=null},t._activate=function(t,e,n){var i=this,r=("UL"===e.nodeName?bn(e).find(Rn):bn(e).children(Ln))[0],o=n&&r&&bn(r).hasClass(kn),s=function(){return i._transitionComplete(t,r,n)};if(r&&o){var a=Fn.getTransitionDurationFromElement(r);bn(r).one(Fn.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},t._transitionComplete=function(t,e,n){if(e){bn(e).removeClass(Pn+" "+Nn);var i=bn(e.parentNode).find(Un)[0];i&&bn(i).removeClass(Nn),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}if(bn(t).addClass(Nn),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),Fn.reflow(t),bn(t).addClass(Pn),t.parentNode&&bn(t.parentNode).hasClass(wn)){var r=bn(t).closest(jn)[0];if(r){var o=[].slice.call(r.querySelectorAll(Wn));bn(o).addClass(Nn)}t.setAttribute("aria-expanded",!0)}n&&n()},i._jQueryInterface=function(n){return this.each(function(){var t=bn(this),e=t.data(Sn);if(e||(e=new i(this),t.data(Sn,e)),"string"==typeof n){if("undefined"==typeof e[n])throw new TypeError('No method named "'+n+'"');e[n]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.1.3"}}]),i}(),bn(document).on(Dn.CLICK_DATA_API,xn,function(t){t.preventDefault(),qn._jQueryInterface.call(bn(this),"show")}),bn.fn.tab=qn._jQueryInterface,bn.fn.tab.Constructor=qn,bn.fn.tab.noConflict=function(){return bn.fn.tab=An,qn._jQueryInterface},qn);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||4<=e[0])throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=Fn,t.Alert=Kn,t.Button=Mn,t.Carousel=Qn,t.Collapse=Bn,t.Dropdown=Vn,t.Modal=Yn,t.Popover=Jn,t.Scrollspy=Zn,t.Tab=Gn,t.Tooltip=zn,Object.defineProperty(t,"__esModule",{value:!0})});
7
- //# sourceMappingURL=bootstrap.min.js.map
 
 
 
 
 
 
 
admin/site-settings/js/codemirror.js DELETED
@@ -1,9755 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: https://codemirror.net/LICENSE
3
-
4
- // This is CodeMirror (https://codemirror.net), a code editor
5
- // implemented in JavaScript on top of the browser's DOM.
6
- //
7
- // You can find some technical background for some of the code below
8
- // at http://marijnhaverbeke.nl/blog/#cm-internals .
9
-
10
- (function (global, factory) {
11
- typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
12
- typeof define === 'function' && define.amd ? define(factory) :
13
- (global.CodeMirror = factory());
14
- }(this, (function () { 'use strict';
15
-
16
- // Kludges for bugs and behavior differences that can't be feature
17
- // detected are enabled based on userAgent etc sniffing.
18
- var userAgent = navigator.userAgent;
19
- var platform = navigator.platform;
20
-
21
- var gecko = /gecko\/\d/i.test(userAgent);
22
- var ie_upto10 = /MSIE \d/.test(userAgent);
23
- var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent);
24
- var edge = /Edge\/(\d+)/.exec(userAgent);
25
- var ie = ie_upto10 || ie_11up || edge;
26
- var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]);
27
- var webkit = !edge && /WebKit\//.test(userAgent);
28
- var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent);
29
- var chrome = !edge && /Chrome\//.test(userAgent);
30
- var presto = /Opera\//.test(userAgent);
31
- var safari = /Apple Computer/.test(navigator.vendor);
32
- var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent);
33
- var phantom = /PhantomJS/.test(userAgent);
34
-
35
- var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent);
36
- var android = /Android/.test(userAgent);
37
- // This is woefully incomplete. Suggestions for alternative methods welcome.
38
- var mobile = ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent);
39
- var mac = ios || /Mac/.test(platform);
40
- var chromeOS = /\bCrOS\b/.test(userAgent);
41
- var windows = /win/i.test(platform);
42
-
43
- var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/);
44
- if (presto_version) { presto_version = Number(presto_version[1]); }
45
- if (presto_version && presto_version >= 15) { presto = false; webkit = true; }
46
- // Some browsers use the wrong event properties to signal cmd/ctrl on OS X
47
- var flipCtrlCmd = mac && (qtwebkit || presto && (presto_version == null || presto_version < 12.11));
48
- var captureRightClick = gecko || (ie && ie_version >= 9);
49
-
50
- function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") }
51
-
52
- var rmClass = function(node, cls) {
53
- var current = node.className;
54
- var match = classTest(cls).exec(current);
55
- if (match) {
56
- var after = current.slice(match.index + match[0].length);
57
- node.className = current.slice(0, match.index) + (after ? match[1] + after : "");
58
- }
59
- };
60
-
61
- function removeChildren(e) {
62
- for (var count = e.childNodes.length; count > 0; --count)
63
- { e.removeChild(e.firstChild); }
64
- return e
65
- }
66
-
67
- function removeChildrenAndAdd(parent, e) {
68
- return removeChildren(parent).appendChild(e)
69
- }
70
-
71
- function elt(tag, content, className, style) {
72
- var e = document.createElement(tag);
73
- if (className) { e.className = className; }
74
- if (style) { e.style.cssText = style; }
75
- if (typeof content == "string") { e.appendChild(document.createTextNode(content)); }
76
- else if (content) { for (var i = 0; i < content.length; ++i) { e.appendChild(content[i]); } }
77
- return e
78
- }
79
- // wrapper for elt, which removes the elt from the accessibility tree
80
- function eltP(tag, content, className, style) {
81
- var e = elt(tag, content, className, style);
82
- e.setAttribute("role", "presentation");
83
- return e
84
- }
85
-
86
- var range;
87
- if (document.createRange) { range = function(node, start, end, endNode) {
88
- var r = document.createRange();
89
- r.setEnd(endNode || node, end);
90
- r.setStart(node, start);
91
- return r
92
- }; }
93
- else { range = function(node, start, end) {
94
- var r = document.body.createTextRange();
95
- try { r.moveToElementText(node.parentNode); }
96
- catch(e) { return r }
97
- r.collapse(true);
98
- r.moveEnd("character", end);
99
- r.moveStart("character", start);
100
- return r
101
- }; }
102
-
103
- function contains(parent, child) {
104
- if (child.nodeType == 3) // Android browser always returns false when child is a textnode
105
- { child = child.parentNode; }
106
- if (parent.contains)
107
- { return parent.contains(child) }
108
- do {
109
- if (child.nodeType == 11) { child = child.host; }
110
- if (child == parent) { return true }
111
- } while (child = child.parentNode)
112
- }
113
-
114
- function activeElt() {
115
- // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement.
116
- // IE < 10 will throw when accessed while the page is loading or in an iframe.
117
- // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable.
118
- var activeElement;
119
- try {
120
- activeElement = document.activeElement;
121
- } catch(e) {
122
- activeElement = document.body || null;
123
- }
124
- while (activeElement && activeElement.shadowRoot && activeElement.shadowRoot.activeElement)
125
- { activeElement = activeElement.shadowRoot.activeElement; }
126
- return activeElement
127
- }
128
-
129
- function addClass(node, cls) {
130
- var current = node.className;
131
- if (!classTest(cls).test(current)) { node.className += (current ? " " : "") + cls; }
132
- }
133
- function joinClasses(a, b) {
134
- var as = a.split(" ");
135
- for (var i = 0; i < as.length; i++)
136
- { if (as[i] && !classTest(as[i]).test(b)) { b += " " + as[i]; } }
137
- return b
138
- }
139
-
140
- var selectInput = function(node) { node.select(); };
141
- if (ios) // Mobile Safari apparently has a bug where select() is broken.
142
- { selectInput = function(node) { node.selectionStart = 0; node.selectionEnd = node.value.length; }; }
143
- else if (ie) // Suppress mysterious IE10 errors
144
- { selectInput = function(node) { try { node.select(); } catch(_e) {} }; }
145
-
146
- function bind(f) {
147
- var args = Array.prototype.slice.call(arguments, 1);
148
- return function(){return f.apply(null, args)}
149
- }
150
-
151
- function copyObj(obj, target, overwrite) {
152
- if (!target) { target = {}; }
153
- for (var prop in obj)
154
- { if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop)))
155
- { target[prop] = obj[prop]; } }
156
- return target
157
- }
158
-
159
- // Counts the column offset in a string, taking tabs into account.
160
- // Used mostly to find indentation.
161
- function countColumn(string, end, tabSize, startIndex, startValue) {
162
- if (end == null) {
163
- end = string.search(/[^\s\u00a0]/);
164
- if (end == -1) { end = string.length; }
165
- }
166
- for (var i = startIndex || 0, n = startValue || 0;;) {
167
- var nextTab = string.indexOf("\t", i);
168
- if (nextTab < 0 || nextTab >= end)
169
- { return n + (end - i) }
170
- n += nextTab - i;
171
- n += tabSize - (n % tabSize);
172
- i = nextTab + 1;
173
- }
174
- }
175
-
176
- var Delayed = function() {this.id = null;};
177
- Delayed.prototype.set = function (ms, f) {
178
- clearTimeout(this.id);
179
- this.id = setTimeout(f, ms);
180
- };
181
-
182
- function indexOf(array, elt) {
183
- for (var i = 0; i < array.length; ++i)
184
- { if (array[i] == elt) { return i } }
185
- return -1
186
- }
187
-
188
- // Number of pixels added to scroller and sizer to hide scrollbar
189
- var scrollerGap = 30;
190
-
191
- // Returned or thrown by various protocols to signal 'I'm not
192
- // handling this'.
193
- var Pass = {toString: function(){return "CodeMirror.Pass"}};
194
-
195
- // Reused option objects for setSelection & friends
196
- var sel_dontScroll = {scroll: false}, sel_mouse = {origin: "*mouse"}, sel_move = {origin: "+move"};
197
-
198
- // The inverse of countColumn -- find the offset that corresponds to
199
- // a particular column.
200
- function findColumn(string, goal, tabSize) {
201
- for (var pos = 0, col = 0;;) {
202
- var nextTab = string.indexOf("\t", pos);
203
- if (nextTab == -1) { nextTab = string.length; }
204
- var skipped = nextTab - pos;
205
- if (nextTab == string.length || col + skipped >= goal)
206
- { return pos + Math.min(skipped, goal - col) }
207
- col += nextTab - pos;
208
- col += tabSize - (col % tabSize);
209
- pos = nextTab + 1;
210
- if (col >= goal) { return pos }
211
- }
212
- }
213
-
214
- var spaceStrs = [""];
215
- function spaceStr(n) {
216
- while (spaceStrs.length <= n)
217
- { spaceStrs.push(lst(spaceStrs) + " "); }
218
- return spaceStrs[n]
219
- }
220
-
221
- function lst(arr) { return arr[arr.length-1] }
222
-
223
- function map(array, f) {
224
- var out = [];
225
- for (var i = 0; i < array.length; i++) { out[i] = f(array[i], i); }
226
- return out
227
- }
228
-
229
- function insertSorted(array, value, score) {
230
- var pos = 0, priority = score(value);
231
- while (pos < array.length && score(array[pos]) <= priority) { pos++; }
232
- array.splice(pos, 0, value);
233
- }
234
-
235
- function nothing() {}
236
-
237
- function createObj(base, props) {
238
- var inst;
239
- if (Object.create) {
240
- inst = Object.create(base);
241
- } else {
242
- nothing.prototype = base;
243
- inst = new nothing();
244
- }
245
- if (props) { copyObj(props, inst); }
246
- return inst
247
- }
248
-
249
- var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
250
- function isWordCharBasic(ch) {
251
- return /\w/.test(ch) || ch > "\x80" &&
252
- (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))
253
- }
254
- function isWordChar(ch, helper) {
255
- if (!helper) { return isWordCharBasic(ch) }
256
- if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { return true }
257
- return helper.test(ch)
258
- }
259
-
260
- function isEmpty(obj) {
261
- for (var n in obj) { if (obj.hasOwnProperty(n) && obj[n]) { return false } }
262
- return true
263
- }
264
-
265
- // Extending unicode characters. A series of a non-extending char +
266
- // any number of extending chars is treated as a single unit as far
267
- // as editing and measuring is concerned. This is not fully correct,
268
- // since some scripts/fonts/browsers also treat other configurations
269
- // of code points as a group.
270
- var extendingChars = /[\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]/;
271
- function isExtendingChar(ch) { return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) }
272
-
273
- // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range.
274
- function skipExtendingChars(str, pos, dir) {
275
- while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { pos += dir; }
276
- return pos
277
- }
278
-
279
- // Returns the value from the range [`from`; `to`] that satisfies
280
- // `pred` and is closest to `from`. Assumes that at least `to`
281
- // satisfies `pred`. Supports `from` being greater than `to`.
282
- function findFirst(pred, from, to) {
283
- // At any point we are certain `to` satisfies `pred`, don't know
284
- // whether `from` does.
285
- var dir = from > to ? -1 : 1;
286
- for (;;) {
287
- if (from == to) { return from }
288
- var midF = (from + to) / 2, mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF);
289
- if (mid == from) { return pred(mid) ? from : to }
290
- if (pred(mid)) { to = mid; }
291
- else { from = mid + dir; }
292
- }
293
- }
294
-
295
- // BIDI HELPERS
296
-
297
- function iterateBidiSections(order, from, to, f) {
298
- if (!order) { return f(from, to, "ltr", 0) }
299
- var found = false;
300
- for (var i = 0; i < order.length; ++i) {
301
- var part = order[i];
302
- if (part.from < to && part.to > from || from == to && part.to == from) {
303
- f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr", i);
304
- found = true;
305
- }
306
- }
307
- if (!found) { f(from, to, "ltr"); }
308
- }
309
-
310
- var bidiOther = null;
311
- function getBidiPartAt(order, ch, sticky) {
312
- var found;
313
- bidiOther = null;
314
- for (var i = 0; i < order.length; ++i) {
315
- var cur = order[i];
316
- if (cur.from < ch && cur.to > ch) { return i }
317
- if (cur.to == ch) {
318
- if (cur.from != cur.to && sticky == "before") { found = i; }
319
- else { bidiOther = i; }
320
- }
321
- if (cur.from == ch) {
322
- if (cur.from != cur.to && sticky != "before") { found = i; }
323
- else { bidiOther = i; }
324
- }
325
- }
326
- return found != null ? found : bidiOther
327
- }
328
-
329
- // Bidirectional ordering algorithm
330
- // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm
331
- // that this (partially) implements.
332
-
333
- // One-char codes used for character types:
334
- // L (L): Left-to-Right
335
- // R (R): Right-to-Left
336
- // r (AL): Right-to-Left Arabic
337
- // 1 (EN): European Number
338
- // + (ES): European Number Separator
339
- // % (ET): European Number Terminator
340
- // n (AN): Arabic Number
341
- // , (CS): Common Number Separator
342
- // m (NSM): Non-Spacing Mark
343
- // b (BN): Boundary Neutral
344
- // s (B): Paragraph Separator
345
- // t (S): Segment Separator
346
- // w (WS): Whitespace
347
- // N (ON): Other Neutrals
348
-
349
- // Returns null if characters are ordered as they appear
350
- // (left-to-right), or an array of sections ({from, to, level}
351
- // objects) in the order in which they occur visually.
352
- var bidiOrdering = (function() {
353
- // Character types for codepoints 0 to 0xff
354
- var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";
355
- // Character types for codepoints 0x600 to 0x6f9
356
- var arabicTypes = "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";
357
- function charType(code) {
358
- if (code <= 0xf7) { return lowTypes.charAt(code) }
359
- else if (0x590 <= code && code <= 0x5f4) { return "R" }
360
- else if (0x600 <= code && code <= 0x6f9) { return arabicTypes.charAt(code - 0x600) }
361
- else if (0x6ee <= code && code <= 0x8ac) { return "r" }
362
- else if (0x2000 <= code && code <= 0x200b) { return "w" }
363
- else if (code == 0x200c) { return "b" }
364
- else { return "L" }
365
- }
366
-
367
- var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
368
- var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/;
369
-
370
- function BidiSpan(level, from, to) {
371
- this.level = level;
372
- this.from = from; this.to = to;
373
- }
374
-
375
- return function(str, direction) {
376
- var outerType = direction == "ltr" ? "L" : "R";
377
-
378
- if (str.length == 0 || direction == "ltr" && !bidiRE.test(str)) { return false }
379
- var len = str.length, types = [];
380
- for (var i = 0; i < len; ++i)
381
- { types.push(charType(str.charCodeAt(i))); }
382
-
383
- // W1. Examine each non-spacing mark (NSM) in the level run, and
384
- // change the type of the NSM to the type of the previous
385
- // character. If the NSM is at the start of the level run, it will
386
- // get the type of sor.
387
- for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) {
388
- var type = types[i$1];
389
- if (type == "m") { types[i$1] = prev; }
390
- else { prev = type; }
391
- }
392
-
393
- // W2. Search backwards from each instance of a European number
394
- // until the first strong type (R, L, AL, or sor) is found. If an
395
- // AL is found, change the type of the European number to Arabic
396
- // number.
397
- // W3. Change all ALs to R.
398
- for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) {
399
- var type$1 = types[i$2];
400
- if (type$1 == "1" && cur == "r") { types[i$2] = "n"; }
401
- else if (isStrong.test(type$1)) { cur = type$1; if (type$1 == "r") { types[i$2] = "R"; } }
402
- }
403
-
404
- // W4. A single European separator between two European numbers
405
- // changes to a European number. A single common separator between
406
- // two numbers of the same type changes to that type.
407
- for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) {
408
- var type$2 = types[i$3];
409
- if (type$2 == "+" && prev$1 == "1" && types[i$3+1] == "1") { types[i$3] = "1"; }
410
- else if (type$2 == "," && prev$1 == types[i$3+1] &&
411
- (prev$1 == "1" || prev$1 == "n")) { types[i$3] = prev$1; }
412
- prev$1 = type$2;
413
- }
414
-
415
- // W5. A sequence of European terminators adjacent to European
416
- // numbers changes to all European numbers.
417
- // W6. Otherwise, separators and terminators change to Other
418
- // Neutral.
419
- for (var i$4 = 0; i$4 < len; ++i$4) {
420
- var type$3 = types[i$4];
421
- if (type$3 == ",") { types[i$4] = "N"; }
422
- else if (type$3 == "%") {
423
- var end = (void 0);
424
- for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {}
425
- var replace = (i$4 && types[i$4-1] == "!") || (end < len && types[end] == "1") ? "1" : "N";
426
- for (var j = i$4; j < end; ++j) { types[j] = replace; }
427
- i$4 = end - 1;
428
- }
429
- }
430
-
431
- // W7. Search backwards from each instance of a European number
432
- // until the first strong type (R, L, or sor) is found. If an L is
433
- // found, then change the type of the European number to L.
434
- for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) {
435
- var type$4 = types[i$5];
436
- if (cur$1 == "L" && type$4 == "1") { types[i$5] = "L"; }
437
- else if (isStrong.test(type$4)) { cur$1 = type$4; }
438
- }
439
-
440
- // N1. A sequence of neutrals takes the direction of the
441
- // surrounding strong text if the text on both sides has the same
442
- // direction. European and Arabic numbers act as if they were R in
443
- // terms of their influence on neutrals. Start-of-level-run (sor)
444
- // and end-of-level-run (eor) are used at level run boundaries.
445
- // N2. Any remaining neutrals take the embedding direction.
446
- for (var i$6 = 0; i$6 < len; ++i$6) {
447
- if (isNeutral.test(types[i$6])) {
448
- var end$1 = (void 0);
449
- for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {}
450
- var before = (i$6 ? types[i$6-1] : outerType) == "L";
451
- var after = (end$1 < len ? types[end$1] : outerType) == "L";
452
- var replace$1 = before == after ? (before ? "L" : "R") : outerType;
453
- for (var j$1 = i$6; j$1 < end$1; ++j$1) { types[j$1] = replace$1; }
454
- i$6 = end$1 - 1;
455
- }
456
- }
457
-
458
- // Here we depart from the documented algorithm, in order to avoid
459
- // building up an actual levels array. Since there are only three
460
- // levels (0, 1, 2) in an implementation that doesn't take
461
- // explicit embedding into account, we can build up the order on
462
- // the fly, without following the level-based algorithm.
463
- var order = [], m;
464
- for (var i$7 = 0; i$7 < len;) {
465
- if (countsAsLeft.test(types[i$7])) {
466
- var start = i$7;
467
- for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {}
468
- order.push(new BidiSpan(0, start, i$7));
469
- } else {
470
- var pos = i$7, at = order.length;
471
- for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {}
472
- for (var j$2 = pos; j$2 < i$7;) {
473
- if (countsAsNum.test(types[j$2])) {
474
- if (pos < j$2) { order.splice(at, 0, new BidiSpan(1, pos, j$2)); }
475
- var nstart = j$2;
476
- for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {}
477
- order.splice(at, 0, new BidiSpan(2, nstart, j$2));
478
- pos = j$2;
479
- } else { ++j$2; }
480
- }
481
- if (pos < i$7) { order.splice(at, 0, new BidiSpan(1, pos, i$7)); }
482
- }
483
- }
484
- if (direction == "ltr") {
485
- if (order[0].level == 1 && (m = str.match(/^\s+/))) {
486
- order[0].from = m[0].length;
487
- order.unshift(new BidiSpan(0, 0, m[0].length));
488
- }
489
- if (lst(order).level == 1 && (m = str.match(/\s+$/))) {
490
- lst(order).to -= m[0].length;
491
- order.push(new BidiSpan(0, len - m[0].length, len));
492
- }
493
- }
494
-
495
- return direction == "rtl" ? order.reverse() : order
496
- }
497
- })();
498
-
499
- // Get the bidi ordering for the given line (and cache it). Returns
500
- // false for lines that are fully left-to-right, and an array of
501
- // BidiSpan objects otherwise.
502
- function getOrder(line, direction) {
503
- var order = line.order;
504
- if (order == null) { order = line.order = bidiOrdering(line.text, direction); }
505
- return order
506
- }
507
-
508
- // EVENT HANDLING
509
-
510
- // Lightweight event framework. on/off also work on DOM nodes,
511
- // registering native DOM handlers.
512
-
513
- var noHandlers = [];
514
-
515
- var on = function(emitter, type, f) {
516
- if (emitter.addEventListener) {
517
- emitter.addEventListener(type, f, false);
518
- } else if (emitter.attachEvent) {
519
- emitter.attachEvent("on" + type, f);
520
- } else {
521
- var map$$1 = emitter._handlers || (emitter._handlers = {});
522
- map$$1[type] = (map$$1[type] || noHandlers).concat(f);
523
- }
524
- };
525
-
526
- function getHandlers(emitter, type) {
527
- return emitter._handlers && emitter._handlers[type] || noHandlers
528
- }
529
-
530
- function off(emitter, type, f) {
531
- if (emitter.removeEventListener) {
532
- emitter.removeEventListener(type, f, false);
533
- } else if (emitter.detachEvent) {
534
- emitter.detachEvent("on" + type, f);
535
- } else {
536
- var map$$1 = emitter._handlers, arr = map$$1 && map$$1[type];
537
- if (arr) {
538
- var index = indexOf(arr, f);
539
- if (index > -1)
540
- { map$$1[type] = arr.slice(0, index).concat(arr.slice(index + 1)); }
541
- }
542
- }
543
- }
544
-
545
- function signal(emitter, type /*, values...*/) {
546
- var handlers = getHandlers(emitter, type);
547
- if (!handlers.length) { return }
548
- var args = Array.prototype.slice.call(arguments, 2);
549
- for (var i = 0; i < handlers.length; ++i) { handlers[i].apply(null, args); }
550
- }
551
-
552
- // The DOM events that CodeMirror handles can be overridden by
553
- // registering a (non-DOM) handler on the editor for the event name,
554
- // and preventDefault-ing the event in that handler.
555
- function signalDOMEvent(cm, e, override) {
556
- if (typeof e == "string")
557
- { e = {type: e, preventDefault: function() { this.defaultPrevented = true; }}; }
558
- signal(cm, override || e.type, cm, e);
559
- return e_defaultPrevented(e) || e.codemirrorIgnore
560
- }
561
-
562
- function signalCursorActivity(cm) {
563
- var arr = cm._handlers && cm._handlers.cursorActivity;
564
- if (!arr) { return }
565
- var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []);
566
- for (var i = 0; i < arr.length; ++i) { if (indexOf(set, arr[i]) == -1)
567
- { set.push(arr[i]); } }
568
- }
569
-
570
- function hasHandler(emitter, type) {
571
- return getHandlers(emitter, type).length > 0
572
- }
573
-
574
- // Add on and off methods to a constructor's prototype, to make
575
- // registering events on such objects more convenient.
576
- function eventMixin(ctor) {
577
- ctor.prototype.on = function(type, f) {on(this, type, f);};
578
- ctor.prototype.off = function(type, f) {off(this, type, f);};
579
- }
580
-
581
- // Due to the fact that we still support jurassic IE versions, some
582
- // compatibility wrappers are needed.
583
-
584
- function e_preventDefault(e) {
585
- if (e.preventDefault) { e.preventDefault(); }
586
- else { e.returnValue = false; }
587
- }
588
- function e_stopPropagation(e) {
589
- if (e.stopPropagation) { e.stopPropagation(); }
590
- else { e.cancelBubble = true; }
591
- }
592
- function e_defaultPrevented(e) {
593
- return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false
594
- }
595
- function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);}
596
-
597
- function e_target(e) {return e.target || e.srcElement}
598
- function e_button(e) {
599
- var b = e.which;
600
- if (b == null) {
601
- if (e.button & 1) { b = 1; }
602
- else if (e.button & 2) { b = 3; }
603
- else if (e.button & 4) { b = 2; }
604
- }
605
- if (mac && e.ctrlKey && b == 1) { b = 3; }
606
- return b
607
- }
608
-
609
- // Detect drag-and-drop
610
- var dragAndDrop = function() {
611
- // There is *some* kind of drag-and-drop support in IE6-8, but I
612
- // couldn't get it to work yet.
613
- if (ie && ie_version < 9) { return false }
614
- var div = elt('div');
615
- return "draggable" in div || "dragDrop" in div
616
- }();
617
-
618
- var zwspSupported;
619
- function zeroWidthElement(measure) {
620
- if (zwspSupported == null) {
621
- var test = elt("span", "\u200b");
622
- removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")]));
623
- if (measure.firstChild.offsetHeight != 0)
624
- { zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8); }
625
- }
626
- var node = zwspSupported ? elt("span", "\u200b") :
627
- elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px");
628
- node.setAttribute("cm-text", "");
629
- return node
630
- }
631
-
632
- // Feature-detect IE's crummy client rect reporting for bidi text
633
- var badBidiRects;
634
- function hasBadBidiRects(measure) {
635
- if (badBidiRects != null) { return badBidiRects }
636
- var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA"));
637
- var r0 = range(txt, 0, 1).getBoundingClientRect();
638
- var r1 = range(txt, 1, 2).getBoundingClientRect();
639
- removeChildren(measure);
640
- if (!r0 || r0.left == r0.right) { return false } // Safari returns null in some cases (#2780)
641
- return badBidiRects = (r1.right - r0.right < 3)
642
- }
643
-
644
- // See if "".split is the broken IE version, if so, provide an
645
- // alternative way to split lines.
646
- var splitLinesAuto = "\n\nb".split(/\n/).length != 3 ? function (string) {
647
- var pos = 0, result = [], l = string.length;
648
- while (pos <= l) {
649
- var nl = string.indexOf("\n", pos);
650
- if (nl == -1) { nl = string.length; }
651
- var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl);
652
- var rt = line.indexOf("\r");
653
- if (rt != -1) {
654
- result.push(line.slice(0, rt));
655
- pos += rt + 1;
656
- } else {
657
- result.push(line);
658
- pos = nl + 1;
659
- }
660
- }
661
- return result
662
- } : function (string) { return string.split(/\r\n?|\n/); };
663
-
664
- var hasSelection = window.getSelection ? function (te) {
665
- try { return te.selectionStart != te.selectionEnd }
666
- catch(e) { return false }
667
- } : function (te) {
668
- var range$$1;
669
- try {range$$1 = te.ownerDocument.selection.createRange();}
670
- catch(e) {}
671
- if (!range$$1 || range$$1.parentElement() != te) { return false }
672
- return range$$1.compareEndPoints("StartToEnd", range$$1) != 0
673
- };
674
-
675
- var hasCopyEvent = (function () {
676
- var e = elt("div");
677
- if ("oncopy" in e) { return true }
678
- e.setAttribute("oncopy", "return;");
679
- return typeof e.oncopy == "function"
680
- })();
681
-
682
- var badZoomedRects = null;
683
- function hasBadZoomedRects(measure) {
684
- if (badZoomedRects != null) { return badZoomedRects }
685
- var node = removeChildrenAndAdd(measure, elt("span", "x"));
686
- var normal = node.getBoundingClientRect();
687
- var fromRange = range(node, 0, 1).getBoundingClientRect();
688
- return badZoomedRects = Math.abs(normal.left - fromRange.left) > 1
689
- }
690
-
691
- // Known modes, by name and by MIME
692
- var modes = {}, mimeModes = {};
693
-
694
- // Extra arguments are stored as the mode's dependencies, which is
695
- // used by (legacy) mechanisms like loadmode.js to automatically
696
- // load a mode. (Preferred mechanism is the require/define calls.)
697
- function defineMode(name, mode) {
698
- if (arguments.length > 2)
699
- { mode.dependencies = Array.prototype.slice.call(arguments, 2); }
700
- modes[name] = mode;
701
- }
702
-
703
- function defineMIME(mime, spec) {
704
- mimeModes[mime] = spec;
705
- }
706
-
707
- // Given a MIME type, a {name, ...options} config object, or a name
708
- // string, return a mode config object.
709
- function resolveMode(spec) {
710
- if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) {
711
- spec = mimeModes[spec];
712
- } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) {
713
- var found = mimeModes[spec.name];
714
- if (typeof found == "string") { found = {name: found}; }
715
- spec = createObj(found, spec);
716
- spec.name = found.name;
717
- } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) {
718
- return resolveMode("application/xml")
719
- } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) {
720
- return resolveMode("application/json")
721
- }
722
- if (typeof spec == "string") { return {name: spec} }
723
- else { return spec || {name: "null"} }
724
- }
725
-
726
- // Given a mode spec (anything that resolveMode accepts), find and
727
- // initialize an actual mode object.
728
- function getMode(options, spec) {
729
- spec = resolveMode(spec);
730
- var mfactory = modes[spec.name];
731
- if (!mfactory) { return getMode(options, "text/plain") }
732
- var modeObj = mfactory(options, spec);
733
- if (modeExtensions.hasOwnProperty(spec.name)) {
734
- var exts = modeExtensions[spec.name];
735
- for (var prop in exts) {
736
- if (!exts.hasOwnProperty(prop)) { continue }
737
- if (modeObj.hasOwnProperty(prop)) { modeObj["_" + prop] = modeObj[prop]; }
738
- modeObj[prop] = exts[prop];
739
- }
740
- }
741
- modeObj.name = spec.name;
742
- if (spec.helperType) { modeObj.helperType = spec.helperType; }
743
- if (spec.modeProps) { for (var prop$1 in spec.modeProps)
744
- { modeObj[prop$1] = spec.modeProps[prop$1]; } }
745
-
746
- return modeObj
747
- }
748
-
749
- // This can be used to attach properties to mode objects from
750
- // outside the actual mode definition.
751
- var modeExtensions = {};
752
- function extendMode(mode, properties) {
753
- var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {});
754
- copyObj(properties, exts);
755
- }
756
-
757
- function copyState(mode, state) {
758
- if (state === true) { return state }
759
- if (mode.copyState) { return mode.copyState(state) }
760
- var nstate = {};
761
- for (var n in state) {
762
- var val = state[n];
763
- if (val instanceof Array) { val = val.concat([]); }
764
- nstate[n] = val;
765
- }
766
- return nstate
767
- }
768
-
769
- // Given a mode and a state (for that mode), find the inner mode and
770
- // state at the position that the state refers to.
771
- function innerMode(mode, state) {
772
- var info;
773
- while (mode.innerMode) {
774
- info = mode.innerMode(state);
775
- if (!info || info.mode == mode) { break }
776
- state = info.state;
777
- mode = info.mode;
778
- }
779
- return info || {mode: mode, state: state}
780
- }
781
-
782
- function startState(mode, a1, a2) {
783
- return mode.startState ? mode.startState(a1, a2) : true
784
- }
785
-
786
- // STRING STREAM
787
-
788
- // Fed to the mode parsers, provides helper functions to make
789
- // parsers more succinct.
790
-
791
- var StringStream = function(string, tabSize, lineOracle) {
792
- this.pos = this.start = 0;
793
- this.string = string;
794
- this.tabSize = tabSize || 8;
795
- this.lastColumnPos = this.lastColumnValue = 0;
796
- this.lineStart = 0;
797
- this.lineOracle = lineOracle;
798
- };
799
-
800
- StringStream.prototype.eol = function () {return this.pos >= this.string.length};
801
- StringStream.prototype.sol = function () {return this.pos == this.lineStart};
802
- StringStream.prototype.peek = function () {return this.string.charAt(this.pos) || undefined};
803
- StringStream.prototype.next = function () {
804
- if (this.pos < this.string.length)
805
- { return this.string.charAt(this.pos++) }
806
- };
807
- StringStream.prototype.eat = function (match) {
808
- var ch = this.string.charAt(this.pos);
809
- var ok;
810
- if (typeof match == "string") { ok = ch == match; }
811
- else { ok = ch && (match.test ? match.test(ch) : match(ch)); }
812
- if (ok) {++this.pos; return ch}
813
- };
814
- StringStream.prototype.eatWhile = function (match) {
815
- var start = this.pos;
816
- while (this.eat(match)){}
817
- return this.pos > start
818
- };
819
- StringStream.prototype.eatSpace = function () {
820
- var this$1 = this;
821
-
822
- var start = this.pos;
823
- while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { ++this$1.pos; }
824
- return this.pos > start
825
- };
826
- StringStream.prototype.skipToEnd = function () {this.pos = this.string.length;};
827
- StringStream.prototype.skipTo = function (ch) {
828
- var found = this.string.indexOf(ch, this.pos);
829
- if (found > -1) {this.pos = found; return true}
830
- };
831
- StringStream.prototype.backUp = function (n) {this.pos -= n;};
832
- StringStream.prototype.column = function () {
833
- if (this.lastColumnPos < this.start) {
834
- this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue);
835
- this.lastColumnPos = this.start;
836
- }
837
- return this.lastColumnValue - (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
838
- };
839
- StringStream.prototype.indentation = function () {
840
- return countColumn(this.string, null, this.tabSize) -
841
- (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0)
842
- };
843
- StringStream.prototype.match = function (pattern, consume, caseInsensitive) {
844
- if (typeof pattern == "string") {
845
- var cased = function (str) { return caseInsensitive ? str.toLowerCase() : str; };
846
- var substr = this.string.substr(this.pos, pattern.length);
847
- if (cased(substr) == cased(pattern)) {
848
- if (consume !== false) { this.pos += pattern.length; }
849
- return true
850
- }
851
- } else {
852
- var match = this.string.slice(this.pos).match(pattern);
853
- if (match && match.index > 0) { return null }
854
- if (match && consume !== false) { this.pos += match[0].length; }
855
- return match
856
- }
857
- };
858
- StringStream.prototype.current = function (){return this.string.slice(this.start, this.pos)};
859
- StringStream.prototype.hideFirstChars = function (n, inner) {
860
- this.lineStart += n;
861
- try { return inner() }
862
- finally { this.lineStart -= n; }
863
- };
864
- StringStream.prototype.lookAhead = function (n) {
865
- var oracle = this.lineOracle;
866
- return oracle && oracle.lookAhead(n)
867
- };
868
- StringStream.prototype.baseToken = function () {
869
- var oracle = this.lineOracle;
870
- return oracle && oracle.baseToken(this.pos)
871
- };
872
-
873
- // Find the line object corresponding to the given line number.
874
- function getLine(doc, n) {
875
- n -= doc.first;
876
- if (n < 0 || n >= doc.size) { throw new Error("There is no line " + (n + doc.first) + " in the document.") }
877
- var chunk = doc;
878
- while (!chunk.lines) {
879
- for (var i = 0;; ++i) {
880
- var child = chunk.children[i], sz = child.chunkSize();
881
- if (n < sz) { chunk = child; break }
882
- n -= sz;
883
- }
884
- }
885
- return chunk.lines[n]
886
- }
887
-
888
- // Get the part of a document between two positions, as an array of
889
- // strings.
890
- function getBetween(doc, start, end) {
891
- var out = [], n = start.line;
892
- doc.iter(start.line, end.line + 1, function (line) {
893
- var text = line.text;
894
- if (n == end.line) { text = text.slice(0, end.ch); }
895
- if (n == start.line) { text = text.slice(start.ch); }
896
- out.push(text);
897
- ++n;
898
- });
899
- return out
900
- }
901
- // Get the lines between from and to, as array of strings.
902
- function getLines(doc, from, to) {
903
- var out = [];
904
- doc.iter(from, to, function (line) { out.push(line.text); }); // iter aborts when callback returns truthy value
905
- return out
906
- }
907
-
908
- // Update the height of a line, propagating the height change
909
- // upwards to parent nodes.
910
- function updateLineHeight(line, height) {
911
- var diff = height - line.height;
912
- if (diff) { for (var n = line; n; n = n.parent) { n.height += diff; } }
913
- }
914
-
915
- // Given a line object, find its line number by walking up through
916
- // its parent links.
917
- function lineNo(line) {
918
- if (line.parent == null) { return null }
919
- var cur = line.parent, no = indexOf(cur.lines, line);
920
- for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) {
921
- for (var i = 0;; ++i) {
922
- if (chunk.children[i] == cur) { break }
923
- no += chunk.children[i].chunkSize();
924
- }
925
- }
926
- return no + cur.first
927
- }
928
-
929
- // Find the line at the given vertical position, using the height
930
- // information in the document tree.
931
- function lineAtHeight(chunk, h) {
932
- var n = chunk.first;
933
- outer: do {
934
- for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) {
935
- var child = chunk.children[i$1], ch = child.height;
936
- if (h < ch) { chunk = child; continue outer }
937
- h -= ch;
938
- n += child.chunkSize();
939
- }
940
- return n
941
- } while (!chunk.lines)
942
- var i = 0;
943
- for (; i < chunk.lines.length; ++i) {
944
- var line = chunk.lines[i], lh = line.height;
945
- if (h < lh) { break }
946
- h -= lh;
947
- }
948
- return n + i
949
- }
950
-
951
- function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size}
952
-
953
- function lineNumberFor(options, i) {
954
- return String(options.lineNumberFormatter(i + options.firstLineNumber))
955
- }
956
-
957
- // A Pos instance represents a position within the text.
958
- function Pos(line, ch, sticky) {
959
- if ( sticky === void 0 ) sticky = null;
960
-
961
- if (!(this instanceof Pos)) { return new Pos(line, ch, sticky) }
962
- this.line = line;
963
- this.ch = ch;
964
- this.sticky = sticky;
965
- }
966
-
967
- // Compare two positions, return 0 if they are the same, a negative
968
- // number when a is less, and a positive number otherwise.
969
- function cmp(a, b) { return a.line - b.line || a.ch - b.ch }
970
-
971
- function equalCursorPos(a, b) { return a.sticky == b.sticky && cmp(a, b) == 0 }
972
-
973
- function copyPos(x) {return Pos(x.line, x.ch)}
974
- function maxPos(a, b) { return cmp(a, b) < 0 ? b : a }
975
- function minPos(a, b) { return cmp(a, b) < 0 ? a : b }
976
-
977
- // Most of the external API clips given positions to make sure they
978
- // actually exist within the document.
979
- function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1))}
980
- function clipPos(doc, pos) {
981
- if (pos.line < doc.first) { return Pos(doc.first, 0) }
982
- var last = doc.first + doc.size - 1;
983
- if (pos.line > last) { return Pos(last, getLine(doc, last).text.length) }
984
- return clipToLen(pos, getLine(doc, pos.line).text.length)
985
- }
986
- function clipToLen(pos, linelen) {
987
- var ch = pos.ch;
988
- if (ch == null || ch > linelen) { return Pos(pos.line, linelen) }
989
- else if (ch < 0) { return Pos(pos.line, 0) }
990
- else { return pos }
991
- }
992
- function clipPosArray(doc, array) {
993
- var out = [];
994
- for (var i = 0; i < array.length; i++) { out[i] = clipPos(doc, array[i]); }
995
- return out
996
- }
997
-
998
- var SavedContext = function(state, lookAhead) {
999
- this.state = state;
1000
- this.lookAhead = lookAhead;
1001
- };
1002
-
1003
- var Context = function(doc, state, line, lookAhead) {
1004
- this.state = state;
1005
- this.doc = doc;
1006
- this.line = line;
1007
- this.maxLookAhead = lookAhead || 0;
1008
- this.baseTokens = null;
1009
- this.baseTokenPos = 1;
1010
- };
1011
-
1012
- Context.prototype.lookAhead = function (n) {
1013
- var line = this.doc.getLine(this.line + n);
1014
- if (line != null && n > this.maxLookAhead) { this.maxLookAhead = n; }
1015
- return line
1016
- };
1017
-
1018
- Context.prototype.baseToken = function (n) {
1019
- var this$1 = this;
1020
-
1021
- if (!this.baseTokens) { return null }
1022
- while (this.baseTokens[this.baseTokenPos] <= n)
1023
- { this$1.baseTokenPos += 2; }
1024
- var type = this.baseTokens[this.baseTokenPos + 1];
1025
- return {type: type && type.replace(/( |^)overlay .*/, ""),
1026
- size: this.baseTokens[this.baseTokenPos] - n}
1027
- };
1028
-
1029
- Context.prototype.nextLine = function () {
1030
- this.line++;
1031
- if (this.maxLookAhead > 0) { this.maxLookAhead--; }
1032
- };
1033
-
1034
- Context.fromSaved = function (doc, saved, line) {
1035
- if (saved instanceof SavedContext)
1036
- { return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) }
1037
- else
1038
- { return new Context(doc, copyState(doc.mode, saved), line) }
1039
- };
1040
-
1041
- Context.prototype.save = function (copy) {
1042
- var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state;
1043
- return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state
1044
- };
1045
-
1046
-
1047
- // Compute a style array (an array starting with a mode generation
1048
- // -- for invalidation -- followed by pairs of end positions and
1049
- // style strings), which is used to highlight the tokens on the
1050
- // line.
1051
- function highlightLine(cm, line, context, forceToEnd) {
1052
- // A styles array always starts with a number identifying the
1053
- // mode/overlays that it is based on (for easy invalidation).
1054
- var st = [cm.state.modeGen], lineClasses = {};
1055
- // Compute the base array of styles
1056
- runMode(cm, line.text, cm.doc.mode, context, function (end, style) { return st.push(end, style); },
1057
- lineClasses, forceToEnd);
1058
- var state = context.state;
1059
-
1060
- // Run overlays, adjust style array.
1061
- var loop = function ( o ) {
1062
- context.baseTokens = st;
1063
- var overlay = cm.state.overlays[o], i = 1, at = 0;
1064
- context.state = true;
1065
- runMode(cm, line.text, overlay.mode, context, function (end, style) {
1066
- var start = i;
1067
- // Ensure there's a token end at the current position, and that i points at it
1068
- while (at < end) {
1069
- var i_end = st[i];
1070
- if (i_end > end)
1071
- { st.splice(i, 1, end, st[i+1], i_end); }
1072
- i += 2;
1073
- at = Math.min(end, i_end);
1074
- }
1075
- if (!style) { return }
1076
- if (overlay.opaque) {
1077
- st.splice(start, i - start, end, "overlay " + style);
1078
- i = start + 2;
1079
- } else {
1080
- for (; start < i; start += 2) {
1081
- var cur = st[start+1];
1082
- st[start+1] = (cur ? cur + " " : "") + "overlay " + style;
1083
- }
1084
- }
1085
- }, lineClasses);
1086
- context.state = state;
1087
- context.baseTokens = null;
1088
- context.baseTokenPos = 1;
1089
- };
1090
-
1091
- for (var o = 0; o < cm.state.overlays.length; ++o) loop( o );
1092
-
1093
- return {styles: st, classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null}
1094
- }
1095
-
1096
- function getLineStyles(cm, line, updateFrontier) {
1097
- if (!line.styles || line.styles[0] != cm.state.modeGen) {
1098
- var context = getContextBefore(cm, lineNo(line));
1099
- var resetState = line.text.length > cm.options.maxHighlightLength && copyState(cm.doc.mode, context.state);
1100
- var result = highlightLine(cm, line, context);
1101
- if (resetState) { context.state = resetState; }
1102
- line.stateAfter = context.save(!resetState);
1103
- line.styles = result.styles;
1104
- if (result.classes) { line.styleClasses = result.classes; }
1105
- else if (line.styleClasses) { line.styleClasses = null; }
1106
- if (updateFrontier === cm.doc.highlightFrontier)
1107
- { cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier); }
1108
- }
1109
- return line.styles
1110
- }
1111
-
1112
- function getContextBefore(cm, n, precise) {
1113
- var doc = cm.doc, display = cm.display;
1114
- if (!doc.mode.startState) { return new Context(doc, true, n) }
1115
- var start = findStartLine(cm, n, precise);
1116
- var saved = start > doc.first && getLine(doc, start - 1).stateAfter;
1117
- var context = saved ? Context.fromSaved(doc, saved, start) : new Context(doc, startState(doc.mode), start);
1118
-
1119
- doc.iter(start, n, function (line) {
1120
- processLine(cm, line.text, context);
1121
- var pos = context.line;
1122
- line.stateAfter = pos == n - 1 || pos % 5 == 0 || pos >= display.viewFrom && pos < display.viewTo ? context.save() : null;
1123
- context.nextLine();
1124
- });
1125
- if (precise) { doc.modeFrontier = context.line; }
1126
- return context
1127
- }
1128
-
1129
- // Lightweight form of highlight -- proceed over this line and
1130
- // update state, but don't save a style array. Used for lines that
1131
- // aren't currently visible.
1132
- function processLine(cm, text, context, startAt) {
1133
- var mode = cm.doc.mode;
1134
- var stream = new StringStream(text, cm.options.tabSize, context);
1135
- stream.start = stream.pos = startAt || 0;
1136
- if (text == "") { callBlankLine(mode, context.state); }
1137
- while (!stream.eol()) {
1138
- readToken(mode, stream, context.state);
1139
- stream.start = stream.pos;
1140
- }
1141
- }
1142
-
1143
- function callBlankLine(mode, state) {
1144
- if (mode.blankLine) { return mode.blankLine(state) }
1145
- if (!mode.innerMode) { return }
1146
- var inner = innerMode(mode, state);
1147
- if (inner.mode.blankLine) { return inner.mode.blankLine(inner.state) }
1148
- }
1149
-
1150
- function readToken(mode, stream, state, inner) {
1151
- for (var i = 0; i < 10; i++) {
1152
- if (inner) { inner[0] = innerMode(mode, state).mode; }
1153
- var style = mode.token(stream, state);
1154
- if (stream.pos > stream.start) { return style }
1155
- }
1156
- throw new Error("Mode " + mode.name + " failed to advance stream.")
1157
- }
1158
-
1159
- var Token = function(stream, type, state) {
1160
- this.start = stream.start; this.end = stream.pos;
1161
- this.string = stream.current();
1162
- this.type = type || null;
1163
- this.state = state;
1164
- };
1165
-
1166
- // Utility for getTokenAt and getLineTokens
1167
- function takeToken(cm, pos, precise, asArray) {
1168
- var doc = cm.doc, mode = doc.mode, style;
1169
- pos = clipPos(doc, pos);
1170
- var line = getLine(doc, pos.line), context = getContextBefore(cm, pos.line, precise);
1171
- var stream = new StringStream(line.text, cm.options.tabSize, context), tokens;
1172
- if (asArray) { tokens = []; }
1173
- while ((asArray || stream.pos < pos.ch) && !stream.eol()) {
1174
- stream.start = stream.pos;
1175
- style = readToken(mode, stream, context.state);
1176
- if (asArray) { tokens.push(new Token(stream, style, copyState(doc.mode, context.state))); }
1177
- }
1178
- return asArray ? tokens : new Token(stream, style, context.state)
1179
- }
1180
-
1181
- function extractLineClasses(type, output) {
1182
- if (type) { for (;;) {
1183
- var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/);
1184
- if (!lineClass) { break }
1185
- type = type.slice(0, lineClass.index) + type.slice(lineClass.index + lineClass[0].length);
1186
- var prop = lineClass[1] ? "bgClass" : "textClass";
1187
- if (output[prop] == null)
1188
- { output[prop] = lineClass[2]; }
1189
- else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(output[prop]))
1190
- { output[prop] += " " + lineClass[2]; }
1191
- } }
1192
- return type
1193
- }
1194
-
1195
- // Run the given mode's parser over a line, calling f for each token.
1196
- function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) {
1197
- var flattenSpans = mode.flattenSpans;
1198
- if (flattenSpans == null) { flattenSpans = cm.options.flattenSpans; }
1199
- var curStart = 0, curStyle = null;
1200
- var stream = new StringStream(text, cm.options.tabSize, context), style;
1201
- var inner = cm.options.addModeClass && [null];
1202
- if (text == "") { extractLineClasses(callBlankLine(mode, context.state), lineClasses); }
1203
- while (!stream.eol()) {
1204
- if (stream.pos > cm.options.maxHighlightLength) {
1205
- flattenSpans = false;
1206
- if (forceToEnd) { processLine(cm, text, context, stream.pos); }
1207
- stream.pos = text.length;
1208
- style = null;
1209
- } else {
1210
- style = extractLineClasses(readToken(mode, stream, context.state, inner), lineClasses);
1211
- }
1212
- if (inner) {
1213
- var mName = inner[0].name;
1214
- if (mName) { style = "m-" + (style ? mName + " " + style : mName); }
1215
- }
1216
- if (!flattenSpans || curStyle != style) {
1217
- while (curStart < stream.start) {
1218
- curStart = Math.min(stream.start, curStart + 5000);
1219
- f(curStart, curStyle);
1220
- }
1221
- curStyle = style;
1222
- }
1223
- stream.start = stream.pos;
1224
- }
1225
- while (curStart < stream.pos) {
1226
- // Webkit seems to refuse to render text nodes longer than 57444
1227
- // characters, and returns inaccurate measurements in nodes
1228
- // starting around 5000 chars.
1229
- var pos = Math.min(stream.pos, curStart + 5000);
1230
- f(pos, curStyle);
1231
- curStart = pos;
1232
- }
1233
- }
1234
-
1235
- // Finds the line to start with when starting a parse. Tries to
1236
- // find a line with a stateAfter, so that it can start with a
1237
- // valid state. If that fails, it returns the line with the
1238
- // smallest indentation, which tends to need the least context to
1239
- // parse correctly.
1240
- function findStartLine(cm, n, precise) {
1241
- var minindent, minline, doc = cm.doc;
1242
- var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100);
1243
- for (var search = n; search > lim; --search) {
1244
- if (search <= doc.first) { return doc.first }
1245
- var line = getLine(doc, search - 1), after = line.stateAfter;
1246
- if (after && (!precise || search + (after instanceof SavedContext ? after.lookAhead : 0) <= doc.modeFrontier))
1247
- { return search }
1248
- var indented = countColumn(line.text, null, cm.options.tabSize);
1249
- if (minline == null || minindent > indented) {
1250
- minline = search - 1;
1251
- minindent = indented;
1252
- }
1253
- }
1254
- return minline
1255
- }
1256
-
1257
- function retreatFrontier(doc, n) {
1258
- doc.modeFrontier = Math.min(doc.modeFrontier, n);
1259
- if (doc.highlightFrontier < n - 10) { return }
1260
- var start = doc.first;
1261
- for (var line = n - 1; line > start; line--) {
1262
- var saved = getLine(doc, line).stateAfter;
1263
- // change is on 3
1264
- // state on line 1 looked ahead 2 -- so saw 3
1265
- // test 1 + 2 < 3 should cover this
1266
- if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) {
1267
- start = line + 1;
1268
- break
1269
- }
1270
- }
1271
- doc.highlightFrontier = Math.min(doc.highlightFrontier, start);
1272
- }
1273
-
1274
- // Optimize some code when these features are not used.
1275
- var sawReadOnlySpans = false, sawCollapsedSpans = false;
1276
-
1277
- function seeReadOnlySpans() {
1278
- sawReadOnlySpans = true;
1279
- }
1280
-
1281
- function seeCollapsedSpans() {
1282
- sawCollapsedSpans = true;
1283
- }
1284
-
1285
- // TEXTMARKER SPANS
1286
-
1287
- function MarkedSpan(marker, from, to) {
1288
- this.marker = marker;
1289
- this.from = from; this.to = to;
1290
- }
1291
-
1292
- // Search an array of spans for a span matching the given marker.
1293
- function getMarkedSpanFor(spans, marker) {
1294
- if (spans) { for (var i = 0; i < spans.length; ++i) {
1295
- var span = spans[i];
1296
- if (span.marker == marker) { return span }
1297
- } }
1298
- }
1299
- // Remove a span from an array, returning undefined if no spans are
1300
- // left (we don't store arrays for lines without spans).
1301
- function removeMarkedSpan(spans, span) {
1302
- var r;
1303
- for (var i = 0; i < spans.length; ++i)
1304
- { if (spans[i] != span) { (r || (r = [])).push(spans[i]); } }
1305
- return r
1306
- }
1307
- // Add a span to a line.
1308
- function addMarkedSpan(line, span) {
1309
- line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span];
1310
- span.marker.attachLine(line);
1311
- }
1312
-
1313
- // Used for the algorithm that adjusts markers for a change in the
1314
- // document. These functions cut an array of spans at a given
1315
- // character position, returning an array of remaining chunks (or
1316
- // undefined if nothing remains).
1317
- function markedSpansBefore(old, startCh, isInsert) {
1318
- var nw;
1319
- if (old) { for (var i = 0; i < old.length; ++i) {
1320
- var span = old[i], marker = span.marker;
1321
- var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh);
1322
- if (startsBefore || span.from == startCh && marker.type == "bookmark" && (!isInsert || !span.marker.insertLeft)) {
1323
- var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh)
1324
- ;(nw || (nw = [])).push(new MarkedSpan(marker, span.from, endsAfter ? null : span.to));
1325
- }
1326
- } }
1327
- return nw
1328
- }
1329
- function markedSpansAfter(old, endCh, isInsert) {
1330
- var nw;
1331
- if (old) { for (var i = 0; i < old.length; ++i) {
1332
- var span = old[i], marker = span.marker;
1333
- var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh);
1334
- if (endsAfter || span.from == endCh && marker.type == "bookmark" && (!isInsert || span.marker.insertLeft)) {
1335
- var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh)
1336
- ;(nw || (nw = [])).push(new MarkedSpan(marker, startsBefore ? null : span.from - endCh,
1337
- span.to == null ? null : span.to - endCh));
1338
- }
1339
- } }
1340
- return nw
1341
- }
1342
-
1343
- // Given a change object, compute the new set of marker spans that
1344
- // cover the line in which the change took place. Removes spans
1345
- // entirely within the change, reconnects spans belonging to the
1346
- // same marker that appear on both sides of the change, and cuts off
1347
- // spans partially within the change. Returns an array of span
1348
- // arrays with one element for each line in (after) the change.
1349
- function stretchSpansOverChange(doc, change) {
1350
- if (change.full) { return null }
1351
- var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans;
1352
- var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans;
1353
- if (!oldFirst && !oldLast) { return null }
1354
-
1355
- var startCh = change.from.ch, endCh = change.to.ch, isInsert = cmp(change.from, change.to) == 0;
1356
- // Get the spans that 'stick out' on both sides
1357
- var first = markedSpansBefore(oldFirst, startCh, isInsert);
1358
- var last = markedSpansAfter(oldLast, endCh, isInsert);
1359
-
1360
- // Next, merge those two ends
1361
- var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0);
1362
- if (first) {
1363
- // Fix up .to properties of first
1364
- for (var i = 0; i < first.length; ++i) {
1365
- var span = first[i];
1366
- if (span.to == null) {
1367
- var found = getMarkedSpanFor(last, span.marker);
1368
- if (!found) { span.to = startCh; }
1369
- else if (sameLine) { span.to = found.to == null ? null : found.to + offset; }
1370
- }
1371
- }
1372
- }
1373
- if (last) {
1374
- // Fix up .from in last (or move them into first in case of sameLine)
1375
- for (var i$1 = 0; i$1 < last.length; ++i$1) {
1376
- var span$1 = last[i$1];
1377
- if (span$1.to != null) { span$1.to += offset; }
1378
- if (span$1.from == null) {
1379
- var found$1 = getMarkedSpanFor(first, span$1.marker);
1380
- if (!found$1) {
1381
- span$1.from = offset;
1382
- if (sameLine) { (first || (first = [])).push(span$1); }
1383
- }
1384
- } else {
1385
- span$1.from += offset;
1386
- if (sameLine) { (first || (first = [])).push(span$1); }
1387
- }
1388
- }
1389
- }
1390
- // Make sure we didn't create any zero-length spans
1391
- if (first) { first = clearEmptySpans(first); }
1392
- if (last && last != first) { last = clearEmptySpans(last); }
1393
-
1394
- var newMarkers = [first];
1395
- if (!sameLine) {
1396
- // Fill gap with whole-line-spans
1397
- var gap = change.text.length - 2, gapMarkers;
1398
- if (gap > 0 && first)
1399
- { for (var i$2 = 0; i$2 < first.length; ++i$2)
1400
- { if (first[i$2].to == null)
1401
- { (gapMarkers || (gapMarkers = [])).push(new MarkedSpan(first[i$2].marker, null, null)); } } }
1402
- for (var i$3 = 0; i$3 < gap; ++i$3)
1403
- { newMarkers.push(gapMarkers); }
1404
- newMarkers.push(last);
1405
- }
1406
- return newMarkers
1407
- }
1408
-
1409
- // Remove spans that are empty and don't have a clearWhenEmpty
1410
- // option of false.
1411
- function clearEmptySpans(spans) {
1412
- for (var i = 0; i < spans.length; ++i) {
1413
- var span = spans[i];
1414
- if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false)
1415
- { spans.splice(i--, 1); }
1416
- }
1417
- if (!spans.length) { return null }
1418
- return spans
1419
- }
1420
-
1421
- // Used to 'clip' out readOnly ranges when making a change.
1422
- function removeReadOnlyRanges(doc, from, to) {
1423
- var markers = null;
1424
- doc.iter(from.line, to.line + 1, function (line) {
1425
- if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
1426
- var mark = line.markedSpans[i].marker;
1427
- if (mark.readOnly && (!markers || indexOf(markers, mark) == -1))
1428
- { (markers || (markers = [])).push(mark); }
1429
- } }
1430
- });
1431
- if (!markers) { return null }
1432
- var parts = [{from: from, to: to}];
1433
- for (var i = 0; i < markers.length; ++i) {
1434
- var mk = markers[i], m = mk.find(0);
1435
- for (var j = 0; j < parts.length; ++j) {
1436
- var p = parts[j];
1437
- if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { continue }
1438
- var newParts = [j, 1], dfrom = cmp(p.from, m.from), dto = cmp(p.to, m.to);
1439
- if (dfrom < 0 || !mk.inclusiveLeft && !dfrom)
1440
- { newParts.push({from: p.from, to: m.from}); }
1441
- if (dto > 0 || !mk.inclusiveRight && !dto)
1442
- { newParts.push({from: m.to, to: p.to}); }
1443
- parts.splice.apply(parts, newParts);
1444
- j += newParts.length - 3;
1445
- }
1446
- }
1447
- return parts
1448
- }
1449
-
1450
- // Connect or disconnect spans from a line.
1451
- function detachMarkedSpans(line) {
1452
- var spans = line.markedSpans;
1453
- if (!spans) { return }
1454
- for (var i = 0; i < spans.length; ++i)
1455
- { spans[i].marker.detachLine(line); }
1456
- line.markedSpans = null;
1457
- }
1458
- function attachMarkedSpans(line, spans) {
1459
- if (!spans) { return }
1460
- for (var i = 0; i < spans.length; ++i)
1461
- { spans[i].marker.attachLine(line); }
1462
- line.markedSpans = spans;
1463
- }
1464
-
1465
- // Helpers used when computing which overlapping collapsed span
1466
- // counts as the larger one.
1467
- function extraLeft(marker) { return marker.inclusiveLeft ? -1 : 0 }
1468
- function extraRight(marker) { return marker.inclusiveRight ? 1 : 0 }
1469
-
1470
- // Returns a number indicating which of two overlapping collapsed
1471
- // spans is larger (and thus includes the other). Falls back to
1472
- // comparing ids when the spans cover exactly the same range.
1473
- function compareCollapsedMarkers(a, b) {
1474
- var lenDiff = a.lines.length - b.lines.length;
1475
- if (lenDiff != 0) { return lenDiff }
1476
- var aPos = a.find(), bPos = b.find();
1477
- var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b);
1478
- if (fromCmp) { return -fromCmp }
1479
- var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b);
1480
- if (toCmp) { return toCmp }
1481
- return b.id - a.id
1482
- }
1483
-
1484
- // Find out whether a line ends or starts in a collapsed span. If
1485
- // so, return the marker for that span.
1486
- function collapsedSpanAtSide(line, start) {
1487
- var sps = sawCollapsedSpans && line.markedSpans, found;
1488
- if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
1489
- sp = sps[i];
1490
- if (sp.marker.collapsed && (start ? sp.from : sp.to) == null &&
1491
- (!found || compareCollapsedMarkers(found, sp.marker) < 0))
1492
- { found = sp.marker; }
1493
- } }
1494
- return found
1495
- }
1496
- function collapsedSpanAtStart(line) { return collapsedSpanAtSide(line, true) }
1497
- function collapsedSpanAtEnd(line) { return collapsedSpanAtSide(line, false) }
1498
-
1499
- function collapsedSpanAround(line, ch) {
1500
- var sps = sawCollapsedSpans && line.markedSpans, found;
1501
- if (sps) { for (var i = 0; i < sps.length; ++i) {
1502
- var sp = sps[i];
1503
- if (sp.marker.collapsed && (sp.from == null || sp.from < ch) && (sp.to == null || sp.to > ch) &&
1504
- (!found || compareCollapsedMarkers(found, sp.marker) < 0)) { found = sp.marker; }
1505
- } }
1506
- return found
1507
- }
1508
-
1509
- // Test whether there exists a collapsed span that partially
1510
- // overlaps (covers the start or end, but not both) of a new span.
1511
- // Such overlap is not allowed.
1512
- function conflictingCollapsedRange(doc, lineNo$$1, from, to, marker) {
1513
- var line = getLine(doc, lineNo$$1);
1514
- var sps = sawCollapsedSpans && line.markedSpans;
1515
- if (sps) { for (var i = 0; i < sps.length; ++i) {
1516
- var sp = sps[i];
1517
- if (!sp.marker.collapsed) { continue }
1518
- var found = sp.marker.find(0);
1519
- var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker);
1520
- var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker);
1521
- if (fromCmp >= 0 && toCmp <= 0 || fromCmp <= 0 && toCmp >= 0) { continue }
1522
- if (fromCmp <= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.to, from) >= 0 : cmp(found.to, from) > 0) ||
1523
- fromCmp >= 0 && (sp.marker.inclusiveRight && marker.inclusiveLeft ? cmp(found.from, to) <= 0 : cmp(found.from, to) < 0))
1524
- { return true }
1525
- } }
1526
- }
1527
-
1528
- // A visual line is a line as drawn on the screen. Folding, for
1529
- // example, can cause multiple logical lines to appear on the same
1530
- // visual line. This finds the start of the visual line that the
1531
- // given line is part of (usually that is the line itself).
1532
- function visualLine(line) {
1533
- var merged;
1534
- while (merged = collapsedSpanAtStart(line))
1535
- { line = merged.find(-1, true).line; }
1536
- return line
1537
- }
1538
-
1539
- function visualLineEnd(line) {
1540
- var merged;
1541
- while (merged = collapsedSpanAtEnd(line))
1542
- { line = merged.find(1, true).line; }
1543
- return line
1544
- }
1545
-
1546
- // Returns an array of logical lines that continue the visual line
1547
- // started by the argument, or undefined if there are no such lines.
1548
- function visualLineContinued(line) {
1549
- var merged, lines;
1550
- while (merged = collapsedSpanAtEnd(line)) {
1551
- line = merged.find(1, true).line
1552
- ;(lines || (lines = [])).push(line);
1553
- }
1554
- return lines
1555
- }
1556
-
1557
- // Get the line number of the start of the visual line that the
1558
- // given line number is part of.
1559
- function visualLineNo(doc, lineN) {
1560
- var line = getLine(doc, lineN), vis = visualLine(line);
1561
- if (line == vis) { return lineN }
1562
- return lineNo(vis)
1563
- }
1564
-
1565
- // Get the line number of the start of the next visual line after
1566
- // the given line.
1567
- function visualLineEndNo(doc, lineN) {
1568
- if (lineN > doc.lastLine()) { return lineN }
1569
- var line = getLine(doc, lineN), merged;
1570
- if (!lineIsHidden(doc, line)) { return lineN }
1571
- while (merged = collapsedSpanAtEnd(line))
1572
- { line = merged.find(1, true).line; }
1573
- return lineNo(line) + 1
1574
- }
1575
-
1576
- // Compute whether a line is hidden. Lines count as hidden when they
1577
- // are part of a visual line that starts with another line, or when
1578
- // they are entirely covered by collapsed, non-widget span.
1579
- function lineIsHidden(doc, line) {
1580
- var sps = sawCollapsedSpans && line.markedSpans;
1581
- if (sps) { for (var sp = (void 0), i = 0; i < sps.length; ++i) {
1582
- sp = sps[i];
1583
- if (!sp.marker.collapsed) { continue }
1584
- if (sp.from == null) { return true }
1585
- if (sp.marker.widgetNode) { continue }
1586
- if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp))
1587
- { return true }
1588
- } }
1589
- }
1590
- function lineIsHiddenInner(doc, line, span) {
1591
- if (span.to == null) {
1592
- var end = span.marker.find(1, true);
1593
- return lineIsHiddenInner(doc, end.line, getMarkedSpanFor(end.line.markedSpans, span.marker))
1594
- }
1595
- if (span.marker.inclusiveRight && span.to == line.text.length)
1596
- { return true }
1597
- for (var sp = (void 0), i = 0; i < line.markedSpans.length; ++i) {
1598
- sp = line.markedSpans[i];
1599
- if (sp.marker.collapsed && !sp.marker.widgetNode && sp.from == span.to &&
1600
- (sp.to == null || sp.to != span.from) &&
1601
- (sp.marker.inclusiveLeft || span.marker.inclusiveRight) &&
1602
- lineIsHiddenInner(doc, line, sp)) { return true }
1603
- }
1604
- }
1605
-
1606
- // Find the height above the given line.
1607
- function heightAtLine(lineObj) {
1608
- lineObj = visualLine(lineObj);
1609
-
1610
- var h = 0, chunk = lineObj.parent;
1611
- for (var i = 0; i < chunk.lines.length; ++i) {
1612
- var line = chunk.lines[i];
1613
- if (line == lineObj) { break }
1614
- else { h += line.height; }
1615
- }
1616
- for (var p = chunk.parent; p; chunk = p, p = chunk.parent) {
1617
- for (var i$1 = 0; i$1 < p.children.length; ++i$1) {
1618
- var cur = p.children[i$1];
1619
- if (cur == chunk) { break }
1620
- else { h += cur.height; }
1621
- }
1622
- }
1623
- return h
1624
- }
1625
-
1626
- // Compute the character length of a line, taking into account
1627
- // collapsed ranges (see markText) that might hide parts, and join
1628
- // other lines onto it.
1629
- function lineLength(line) {
1630
- if (line.height == 0) { return 0 }
1631
- var len = line.text.length, merged, cur = line;
1632
- while (merged = collapsedSpanAtStart(cur)) {
1633
- var found = merged.find(0, true);
1634
- cur = found.from.line;
1635
- len += found.from.ch - found.to.ch;
1636
- }
1637
- cur = line;
1638
- while (merged = collapsedSpanAtEnd(cur)) {
1639
- var found$1 = merged.find(0, true);
1640
- len -= cur.text.length - found$1.from.ch;
1641
- cur = found$1.to.line;
1642
- len += cur.text.length - found$1.to.ch;
1643
- }
1644
- return len
1645
- }
1646
-
1647
- // Find the longest line in the document.
1648
- function findMaxLine(cm) {
1649
- var d = cm.display, doc = cm.doc;
1650
- d.maxLine = getLine(doc, doc.first);
1651
- d.maxLineLength = lineLength(d.maxLine);
1652
- d.maxLineChanged = true;
1653
- doc.iter(function (line) {
1654
- var len = lineLength(line);
1655
- if (len > d.maxLineLength) {
1656
- d.maxLineLength = len;
1657
- d.maxLine = line;
1658
- }
1659
- });
1660
- }
1661
-
1662
- // LINE DATA STRUCTURE
1663
-
1664
- // Line objects. These hold state related to a line, including
1665
- // highlighting info (the styles array).
1666
- var Line = function(text, markedSpans, estimateHeight) {
1667
- this.text = text;
1668
- attachMarkedSpans(this, markedSpans);
1669
- this.height = estimateHeight ? estimateHeight(this) : 1;
1670
- };
1671
-
1672
- Line.prototype.lineNo = function () { return lineNo(this) };
1673
- eventMixin(Line);
1674
-
1675
- // Change the content (text, markers) of a line. Automatically
1676
- // invalidates cached information and tries to re-estimate the
1677
- // line's height.
1678
- function updateLine(line, text, markedSpans, estimateHeight) {
1679
- line.text = text;
1680
- if (line.stateAfter) { line.stateAfter = null; }
1681
- if (line.styles) { line.styles = null; }
1682
- if (line.order != null) { line.order = null; }
1683
- detachMarkedSpans(line);
1684
- attachMarkedSpans(line, markedSpans);
1685
- var estHeight = estimateHeight ? estimateHeight(line) : 1;
1686
- if (estHeight != line.height) { updateLineHeight(line, estHeight); }
1687
- }
1688
-
1689
- // Detach a line from the document tree and its markers.
1690
- function cleanUpLine(line) {
1691
- line.parent = null;
1692
- detachMarkedSpans(line);
1693
- }
1694
-
1695
- // Convert a style as returned by a mode (either null, or a string
1696
- // containing one or more styles) to a CSS style. This is cached,
1697
- // and also looks for line-wide styles.
1698
- var styleToClassCache = {}, styleToClassCacheWithMode = {};
1699
- function interpretTokenStyle(style, options) {
1700
- if (!style || /^\s*$/.test(style)) { return null }
1701
- var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache;
1702
- return cache[style] ||
1703
- (cache[style] = style.replace(/\S+/g, "cm-$&"))
1704
- }
1705
-
1706
- // Render the DOM representation of the text of a line. Also builds
1707
- // up a 'line map', which points at the DOM nodes that represent
1708
- // specific stretches of text, and is used by the measuring code.
1709
- // The returned object contains the DOM node, this map, and
1710
- // information about line-wide styles that were set by the mode.
1711
- function buildLineContent(cm, lineView) {
1712
- // The padding-right forces the element to have a 'border', which
1713
- // is needed on Webkit to be able to get line-level bounding
1714
- // rectangles for it (in measureChar).
1715
- var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null);
1716
- var builder = {pre: eltP("pre", [content], "CodeMirror-line"), content: content,
1717
- col: 0, pos: 0, cm: cm,
1718
- trailingSpace: false,
1719
- splitSpaces: cm.getOption("lineWrapping")};
1720
- lineView.measure = {};
1721
-
1722
- // Iterate over the logical lines that make up this visual line.
1723
- for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) {
1724
- var line = i ? lineView.rest[i - 1] : lineView.line, order = (void 0);
1725
- builder.pos = 0;
1726
- builder.addToken = buildToken;
1727
- // Optionally wire in some hacks into the token-rendering
1728
- // algorithm, to deal with browser quirks.
1729
- if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction)))
1730
- { builder.addToken = buildTokenBadBidi(builder.addToken, order); }
1731
- builder.map = [];
1732
- var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line);
1733
- insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate));
1734
- if (line.styleClasses) {
1735
- if (line.styleClasses.bgClass)
1736
- { builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || ""); }
1737
- if (line.styleClasses.textClass)
1738
- { builder.textClass = joinClasses(line.styleClasses.textClass, builder.textClass || ""); }
1739
- }
1740
-
1741
- // Ensure at least a single node is present, for measuring.
1742
- if (builder.map.length == 0)
1743
- { builder.map.push(0, 0, builder.content.appendChild(zeroWidthElement(cm.display.measure))); }
1744
-
1745
- // Store the map and a cache object for the current logical line
1746
- if (i == 0) {
1747
- lineView.measure.map = builder.map;
1748
- lineView.measure.cache = {};
1749
- } else {
1750
- (lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map)
1751
- ;(lineView.measure.caches || (lineView.measure.caches = [])).push({});
1752
- }
1753
- }
1754
-
1755
- // See issue #2901
1756
- if (webkit) {
1757
- var last = builder.content.lastChild;
1758
- if (/\bcm-tab\b/.test(last.className) || (last.querySelector && last.querySelector(".cm-tab")))
1759
- { builder.content.className = "cm-tab-wrap-hack"; }
1760
- }
1761
-
1762
- signal(cm, "renderLine", cm, lineView.line, builder.pre);
1763
- if (builder.pre.className)
1764
- { builder.textClass = joinClasses(builder.pre.className, builder.textClass || ""); }
1765
-
1766
- return builder
1767
- }
1768
-
1769
- function defaultSpecialCharPlaceholder(ch) {
1770
- var token = elt("span", "\u2022", "cm-invalidchar");
1771
- token.title = "\\u" + ch.charCodeAt(0).toString(16);
1772
- token.setAttribute("aria-label", token.title);
1773
- return token
1774
- }
1775
-
1776
- // Build up the DOM representation for a single token, and add it to
1777
- // the line map. Takes care to render special characters separately.
1778
- function buildToken(builder, text, style, startStyle, endStyle, css, attributes) {
1779
- if (!text) { return }
1780
- var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text;
1781
- var special = builder.cm.state.specialChars, mustWrap = false;
1782
- var content;
1783
- if (!special.test(text)) {
1784
- builder.col += text.length;
1785
- content = document.createTextNode(displayText);
1786
- builder.map.push(builder.pos, builder.pos + text.length, content);
1787
- if (ie && ie_version < 9) { mustWrap = true; }
1788
- builder.pos += text.length;
1789
- } else {
1790
- content = document.createDocumentFragment();
1791
- var pos = 0;
1792
- while (true) {
1793
- special.lastIndex = pos;
1794
- var m = special.exec(text);
1795
- var skipped = m ? m.index - pos : text.length - pos;
1796
- if (skipped) {
1797
- var txt = document.createTextNode(displayText.slice(pos, pos + skipped));
1798
- if (ie && ie_version < 9) { content.appendChild(elt("span", [txt])); }
1799
- else { content.appendChild(txt); }
1800
- builder.map.push(builder.pos, builder.pos + skipped, txt);
1801
- builder.col += skipped;
1802
- builder.pos += skipped;
1803
- }
1804
- if (!m) { break }
1805
- pos += skipped + 1;
1806
- var txt$1 = (void 0);
1807
- if (m[0] == "\t") {
1808
- var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize;
1809
- txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab"));
1810
- txt$1.setAttribute("role", "presentation");
1811
- txt$1.setAttribute("cm-text", "\t");
1812
- builder.col += tabWidth;
1813
- } else if (m[0] == "\r" || m[0] == "\n") {
1814
- txt$1 = content.appendChild(elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar"));
1815
- txt$1.setAttribute("cm-text", m[0]);
1816
- builder.col += 1;
1817
- } else {
1818
- txt$1 = builder.cm.options.specialCharPlaceholder(m[0]);
1819
- txt$1.setAttribute("cm-text", m[0]);
1820
- if (ie && ie_version < 9) { content.appendChild(elt("span", [txt$1])); }
1821
- else { content.appendChild(txt$1); }
1822
- builder.col += 1;
1823
- }
1824
- builder.map.push(builder.pos, builder.pos + 1, txt$1);
1825
- builder.pos++;
1826
- }
1827
- }
1828
- builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32;
1829
- if (style || startStyle || endStyle || mustWrap || css) {
1830
- var fullStyle = style || "";
1831
- if (startStyle) { fullStyle += startStyle; }
1832
- if (endStyle) { fullStyle += endStyle; }
1833
- var token = elt("span", [content], fullStyle, css);
1834
- if (attributes) {
1835
- for (var attr in attributes) { if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class")
1836
- { token.setAttribute(attr, attributes[attr]); } }
1837
- }
1838
- return builder.content.appendChild(token)
1839
- }
1840
- builder.content.appendChild(content);
1841
- }
1842
-
1843
- // Change some spaces to NBSP to prevent the browser from collapsing
1844
- // trailing spaces at the end of a line when rendering text (issue #1362).
1845
- function splitSpaces(text, trailingBefore) {
1846
- if (text.length > 1 && !/ /.test(text)) { return text }
1847
- var spaceBefore = trailingBefore, result = "";
1848
- for (var i = 0; i < text.length; i++) {
1849
- var ch = text.charAt(i);
1850
- if (ch == " " && spaceBefore && (i == text.length - 1 || text.charCodeAt(i + 1) == 32))
1851
- { ch = "\u00a0"; }
1852
- result += ch;
1853
- spaceBefore = ch == " ";
1854
- }
1855
- return result
1856
- }
1857
-
1858
- // Work around nonsense dimensions being reported for stretches of
1859
- // right-to-left text.
1860
- function buildTokenBadBidi(inner, order) {
1861
- return function (builder, text, style, startStyle, endStyle, css, attributes) {
1862
- style = style ? style + " cm-force-border" : "cm-force-border";
1863
- var start = builder.pos, end = start + text.length;
1864
- for (;;) {
1865
- // Find the part that overlaps with the start of this text
1866
- var part = (void 0);
1867
- for (var i = 0; i < order.length; i++) {
1868
- part = order[i];
1869
- if (part.to > start && part.from <= start) { break }
1870
- }
1871
- if (part.to >= end) { return inner(builder, text, style, startStyle, endStyle, css, attributes) }
1872
- inner(builder, text.slice(0, part.to - start), style, startStyle, null, css, attributes);
1873
- startStyle = null;
1874
- text = text.slice(part.to - start);
1875
- start = part.to;
1876
- }
1877
- }
1878
- }
1879
-
1880
- function buildCollapsedSpan(builder, size, marker, ignoreWidget) {
1881
- var widget = !ignoreWidget && marker.widgetNode;
1882
- if (widget) { builder.map.push(builder.pos, builder.pos + size, widget); }
1883
- if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) {
1884
- if (!widget)
1885
- { widget = builder.content.appendChild(document.createElement("span")); }
1886
- widget.setAttribute("cm-marker", marker.id);
1887
- }
1888
- if (widget) {
1889
- builder.cm.display.input.setUneditable(widget);
1890
- builder.content.appendChild(widget);
1891
- }
1892
- builder.pos += size;
1893
- builder.trailingSpace = false;
1894
- }
1895
-
1896
- // Outputs a number of spans to make up a line, taking highlighting
1897
- // and marked text into account.
1898
- function insertLineContent(line, builder, styles) {
1899
- var spans = line.markedSpans, allText = line.text, at = 0;
1900
- if (!spans) {
1901
- for (var i$1 = 1; i$1 < styles.length; i$1+=2)
1902
- { builder.addToken(builder, allText.slice(at, at = styles[i$1]), interpretTokenStyle(styles[i$1+1], builder.cm.options)); }
1903
- return
1904
- }
1905
-
1906
- var len = allText.length, pos = 0, i = 1, text = "", style, css;
1907
- var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, collapsed, attributes;
1908
- for (;;) {
1909
- if (nextChange == pos) { // Update current marker set
1910
- spanStyle = spanEndStyle = spanStartStyle = css = "";
1911
- attributes = null;
1912
- collapsed = null; nextChange = Infinity;
1913
- var foundBookmarks = [], endStyles = (void 0);
1914
- for (var j = 0; j < spans.length; ++j) {
1915
- var sp = spans[j], m = sp.marker;
1916
- if (m.type == "bookmark" && sp.from == pos && m.widgetNode) {
1917
- foundBookmarks.push(m);
1918
- } else if (sp.from <= pos && (sp.to == null || sp.to > pos || m.collapsed && sp.to == pos && sp.from == pos)) {
1919
- if (sp.to != null && sp.to != pos && nextChange > sp.to) {
1920
- nextChange = sp.to;
1921
- spanEndStyle = "";
1922
- }
1923
- if (m.className) { spanStyle += " " + m.className; }
1924
- if (m.css) { css = (css ? css + ";" : "") + m.css; }
1925
- if (m.startStyle && sp.from == pos) { spanStartStyle += " " + m.startStyle; }
1926
- if (m.endStyle && sp.to == nextChange) { (endStyles || (endStyles = [])).push(m.endStyle, sp.to); }
1927
- // support for the old title property
1928
- // https://github.com/codemirror/CodeMirror/pull/5673
1929
- if (m.title) { (attributes || (attributes = {})).title = m.title; }
1930
- if (m.attributes) {
1931
- for (var attr in m.attributes)
1932
- { (attributes || (attributes = {}))[attr] = m.attributes[attr]; }
1933
- }
1934
- if (m.collapsed && (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0))
1935
- { collapsed = sp; }
1936
- } else if (sp.from > pos && nextChange > sp.from) {
1937
- nextChange = sp.from;
1938
- }
1939
- }
1940
- if (endStyles) { for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2)
1941
- { if (endStyles[j$1 + 1] == nextChange) { spanEndStyle += " " + endStyles[j$1]; } } }
1942
-
1943
- if (!collapsed || collapsed.from == pos) { for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2)
1944
- { buildCollapsedSpan(builder, 0, foundBookmarks[j$2]); } }
1945
- if (collapsed && (collapsed.from || 0) == pos) {
1946
- buildCollapsedSpan(builder, (collapsed.to == null ? len + 1 : collapsed.to) - pos,
1947
- collapsed.marker, collapsed.from == null);
1948
- if (collapsed.to == null) { return }
1949
- if (collapsed.to == pos) { collapsed = false; }
1950
- }
1951
- }
1952
- if (pos >= len) { break }
1953
-
1954
- var upto = Math.min(len, nextChange);
1955
- while (true) {
1956
- if (text) {
1957
- var end = pos + text.length;
1958
- if (!collapsed) {
1959
- var tokenText = end > upto ? text.slice(0, upto - pos) : text;
1960
- builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle,
1961
- spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", css, attributes);
1962
- }
1963
- if (end >= upto) {text = text.slice(upto - pos); pos = upto; break}
1964
- pos = end;
1965
- spanStartStyle = "";
1966
- }
1967
- text = allText.slice(at, at = styles[i++]);
1968
- style = interpretTokenStyle(styles[i++], builder.cm.options);
1969
- }
1970
- }
1971
- }
1972
-
1973
-
1974
- // These objects are used to represent the visible (currently drawn)
1975
- // part of the document. A LineView may correspond to multiple
1976
- // logical lines, if those are connected by collapsed ranges.
1977
- function LineView(doc, line, lineN) {
1978
- // The starting line
1979
- this.line = line;
1980
- // Continuing lines, if any
1981
- this.rest = visualLineContinued(line);
1982
- // Number of logical lines in this visual line
1983
- this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1;
1984
- this.node = this.text = null;
1985
- this.hidden = lineIsHidden(doc, line);
1986
- }
1987
-
1988
- // Create a range of LineView objects for the given lines.
1989
- function buildViewArray(cm, from, to) {
1990
- var array = [], nextPos;
1991
- for (var pos = from; pos < to; pos = nextPos) {
1992
- var view = new LineView(cm.doc, getLine(cm.doc, pos), pos);
1993
- nextPos = pos + view.size;
1994
- array.push(view);
1995
- }
1996
- return array
1997
- }
1998
-
1999
- var operationGroup = null;
2000
-
2001
- function pushOperation(op) {
2002
- if (operationGroup) {
2003
- operationGroup.ops.push(op);
2004
- } else {
2005
- op.ownsGroup = operationGroup = {
2006
- ops: [op],
2007
- delayedCallbacks: []
2008
- };
2009
- }
2010
- }
2011
-
2012
- function fireCallbacksForOps(group) {
2013
- // Calls delayed callbacks and cursorActivity handlers until no
2014
- // new ones appear
2015
- var callbacks = group.delayedCallbacks, i = 0;
2016
- do {
2017
- for (; i < callbacks.length; i++)
2018
- { callbacks[i].call(null); }
2019
- for (var j = 0; j < group.ops.length; j++) {
2020
- var op = group.ops[j];
2021
- if (op.cursorActivityHandlers)
2022
- { while (op.cursorActivityCalled < op.cursorActivityHandlers.length)
2023
- { op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm); } }
2024
- }
2025
- } while (i < callbacks.length)
2026
- }
2027
-
2028
- function finishOperation(op, endCb) {
2029
- var group = op.ownsGroup;
2030
- if (!group) { return }
2031
-
2032
- try { fireCallbacksForOps(group); }
2033
- finally {
2034
- operationGroup = null;
2035
- endCb(group);
2036
- }
2037
- }
2038
-
2039
- var orphanDelayedCallbacks = null;
2040
-
2041
- // Often, we want to signal events at a point where we are in the
2042
- // middle of some work, but don't want the handler to start calling
2043
- // other methods on the editor, which might be in an inconsistent
2044
- // state or simply not expect any other events to happen.
2045
- // signalLater looks whether there are any handlers, and schedules
2046
- // them to be executed when the last operation ends, or, if no
2047
- // operation is active, when a timeout fires.
2048
- function signalLater(emitter, type /*, values...*/) {
2049
- var arr = getHandlers(emitter, type);
2050
- if (!arr.length) { return }
2051
- var args = Array.prototype.slice.call(arguments, 2), list;
2052
- if (operationGroup) {
2053
- list = operationGroup.delayedCallbacks;
2054
- } else if (orphanDelayedCallbacks) {
2055
- list = orphanDelayedCallbacks;
2056
- } else {
2057
- list = orphanDelayedCallbacks = [];
2058
- setTimeout(fireOrphanDelayed, 0);
2059
- }
2060
- var loop = function ( i ) {
2061
- list.push(function () { return arr[i].apply(null, args); });
2062
- };
2063
-
2064
- for (var i = 0; i < arr.length; ++i)
2065
- loop( i );
2066
- }
2067
-
2068
- function fireOrphanDelayed() {
2069
- var delayed = orphanDelayedCallbacks;
2070
- orphanDelayedCallbacks = null;
2071
- for (var i = 0; i < delayed.length; ++i) { delayed[i](); }
2072
- }
2073
-
2074
- // When an aspect of a line changes, a string is added to
2075
- // lineView.changes. This updates the relevant part of the line's
2076
- // DOM structure.
2077
- function updateLineForChanges(cm, lineView, lineN, dims) {
2078
- for (var j = 0; j < lineView.changes.length; j++) {
2079
- var type = lineView.changes[j];
2080
- if (type == "text") { updateLineText(cm, lineView); }
2081
- else if (type == "gutter") { updateLineGutter(cm, lineView, lineN, dims); }
2082
- else if (type == "class") { updateLineClasses(cm, lineView); }
2083
- else if (type == "widget") { updateLineWidgets(cm, lineView, dims); }
2084
- }
2085
- lineView.changes = null;
2086
- }
2087
-
2088
- // Lines with gutter elements, widgets or a background class need to
2089
- // be wrapped, and have the extra elements added to the wrapper div
2090
- function ensureLineWrapped(lineView) {
2091
- if (lineView.node == lineView.text) {
2092
- lineView.node = elt("div", null, null, "position: relative");
2093
- if (lineView.text.parentNode)
2094
- { lineView.text.parentNode.replaceChild(lineView.node, lineView.text); }
2095
- lineView.node.appendChild(lineView.text);
2096
- if (ie && ie_version < 8) { lineView.node.style.zIndex = 2; }
2097
- }
2098
- return lineView.node
2099
- }
2100
-
2101
- function updateLineBackground(cm, lineView) {
2102
- var cls = lineView.bgClass ? lineView.bgClass + " " + (lineView.line.bgClass || "") : lineView.line.bgClass;
2103
- if (cls) { cls += " CodeMirror-linebackground"; }
2104
- if (lineView.background) {
2105
- if (cls) { lineView.background.className = cls; }
2106
- else { lineView.background.parentNode.removeChild(lineView.background); lineView.background = null; }
2107
- } else if (cls) {
2108
- var wrap = ensureLineWrapped(lineView);
2109
- lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild);
2110
- cm.display.input.setUneditable(lineView.background);
2111
- }
2112
- }
2113
-
2114
- // Wrapper around buildLineContent which will reuse the structure
2115
- // in display.externalMeasured when possible.
2116
- function getLineContent(cm, lineView) {
2117
- var ext = cm.display.externalMeasured;
2118
- if (ext && ext.line == lineView.line) {
2119
- cm.display.externalMeasured = null;
2120
- lineView.measure = ext.measure;
2121
- return ext.built
2122
- }
2123
- return buildLineContent(cm, lineView)
2124
- }
2125
-
2126
- // Redraw the line's text. Interacts with the background and text
2127
- // classes because the mode may output tokens that influence these
2128
- // classes.
2129
- function updateLineText(cm, lineView) {
2130
- var cls = lineView.text.className;
2131
- var built = getLineContent(cm, lineView);
2132
- if (lineView.text == lineView.node) { lineView.node = built.pre; }
2133
- lineView.text.parentNode.replaceChild(built.pre, lineView.text);
2134
- lineView.text = built.pre;
2135
- if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) {
2136
- lineView.bgClass = built.bgClass;
2137
- lineView.textClass = built.textClass;
2138
- updateLineClasses(cm, lineView);
2139
- } else if (cls) {
2140
- lineView.text.className = cls;
2141
- }
2142
- }
2143
-
2144
- function updateLineClasses(cm, lineView) {
2145
- updateLineBackground(cm, lineView);
2146
- if (lineView.line.wrapClass)
2147
- { ensureLineWrapped(lineView).className = lineView.line.wrapClass; }
2148
- else if (lineView.node != lineView.text)
2149
- { lineView.node.className = ""; }
2150
- var textClass = lineView.textClass ? lineView.textClass + " " + (lineView.line.textClass || "") : lineView.line.textClass;
2151
- lineView.text.className = textClass || "";
2152
- }
2153
-
2154
- function updateLineGutter(cm, lineView, lineN, dims) {
2155
- if (lineView.gutter) {
2156
- lineView.node.removeChild(lineView.gutter);
2157
- lineView.gutter = null;
2158
- }
2159
- if (lineView.gutterBackground) {
2160
- lineView.node.removeChild(lineView.gutterBackground);
2161
- lineView.gutterBackground = null;
2162
- }
2163
- if (lineView.line.gutterClass) {
2164
- var wrap = ensureLineWrapped(lineView);
2165
- lineView.gutterBackground = elt("div", null, "CodeMirror-gutter-background " + lineView.line.gutterClass,
2166
- ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px; width: " + (dims.gutterTotalWidth) + "px"));
2167
- cm.display.input.setUneditable(lineView.gutterBackground);
2168
- wrap.insertBefore(lineView.gutterBackground, lineView.text);
2169
- }
2170
- var markers = lineView.line.gutterMarkers;
2171
- if (cm.options.lineNumbers || markers) {
2172
- var wrap$1 = ensureLineWrapped(lineView);
2173
- var gutterWrap = lineView.gutter = elt("div", null, "CodeMirror-gutter-wrapper", ("left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"));
2174
- cm.display.input.setUneditable(gutterWrap);
2175
- wrap$1.insertBefore(gutterWrap, lineView.text);
2176
- if (lineView.line.gutterClass)
2177
- { gutterWrap.className += " " + lineView.line.gutterClass; }
2178
- if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"]))
2179
- { lineView.lineNumber = gutterWrap.appendChild(
2180
- elt("div", lineNumberFor(cm.options, lineN),
2181
- "CodeMirror-linenumber CodeMirror-gutter-elt",
2182
- ("left: " + (dims.gutterLeft["CodeMirror-linenumbers"]) + "px; width: " + (cm.display.lineNumInnerWidth) + "px"))); }
2183
- if (markers) { for (var k = 0; k < cm.display.gutterSpecs.length; ++k) {
2184
- var id = cm.display.gutterSpecs[k].className, found = markers.hasOwnProperty(id) && markers[id];
2185
- if (found)
2186
- { gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt",
2187
- ("left: " + (dims.gutterLeft[id]) + "px; width: " + (dims.gutterWidth[id]) + "px"))); }
2188
- } }
2189
- }
2190
- }
2191
-
2192
- function updateLineWidgets(cm, lineView, dims) {
2193
- if (lineView.alignable) { lineView.alignable = null; }
2194
- for (var node = lineView.node.firstChild, next = (void 0); node; node = next) {
2195
- next = node.nextSibling;
2196
- if (node.className == "CodeMirror-linewidget")
2197
- { lineView.node.removeChild(node); }
2198
- }
2199
- insertLineWidgets(cm, lineView, dims);
2200
- }
2201
-
2202
- // Build a line's DOM representation from scratch
2203
- function buildLineElement(cm, lineView, lineN, dims) {
2204
- var built = getLineContent(cm, lineView);
2205
- lineView.text = lineView.node = built.pre;
2206
- if (built.bgClass) { lineView.bgClass = built.bgClass; }
2207
- if (built.textClass) { lineView.textClass = built.textClass; }
2208
-
2209
- updateLineClasses(cm, lineView);
2210
- updateLineGutter(cm, lineView, lineN, dims);
2211
- insertLineWidgets(cm, lineView, dims);
2212
- return lineView.node
2213
- }
2214
-
2215
- // A lineView may contain multiple logical lines (when merged by
2216
- // collapsed spans). The widgets for all of them need to be drawn.
2217
- function insertLineWidgets(cm, lineView, dims) {
2218
- insertLineWidgetsFor(cm, lineView.line, lineView, dims, true);
2219
- if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
2220
- { insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false); } }
2221
- }
2222
-
2223
- function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) {
2224
- if (!line.widgets) { return }
2225
- var wrap = ensureLineWrapped(lineView);
2226
- for (var i = 0, ws = line.widgets; i < ws.length; ++i) {
2227
- var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget");
2228
- if (!widget.handleMouseEvents) { node.setAttribute("cm-ignore-events", "true"); }
2229
- positionLineWidget(widget, node, lineView, dims);
2230
- cm.display.input.setUneditable(node);
2231
- if (allowAbove && widget.above)
2232
- { wrap.insertBefore(node, lineView.gutter || lineView.text); }
2233
- else
2234
- { wrap.appendChild(node); }
2235
- signalLater(widget, "redraw");
2236
- }
2237
- }
2238
-
2239
- function positionLineWidget(widget, node, lineView, dims) {
2240
- if (widget.noHScroll) {
2241
- (lineView.alignable || (lineView.alignable = [])).push(node);
2242
- var width = dims.wrapperWidth;
2243
- node.style.left = dims.fixedPos + "px";
2244
- if (!widget.coverGutter) {
2245
- width -= dims.gutterTotalWidth;
2246
- node.style.paddingLeft = dims.gutterTotalWidth + "px";
2247
- }
2248
- node.style.width = width + "px";
2249
- }
2250
- if (widget.coverGutter) {
2251
- node.style.zIndex = 5;
2252
- node.style.position = "relative";
2253
- if (!widget.noHScroll) { node.style.marginLeft = -dims.gutterTotalWidth + "px"; }
2254
- }
2255
- }
2256
-
2257
- function widgetHeight(widget) {
2258
- if (widget.height != null) { return widget.height }
2259
- var cm = widget.doc.cm;
2260
- if (!cm) { return 0 }
2261
- if (!contains(document.body, widget.node)) {
2262
- var parentStyle = "position: relative;";
2263
- if (widget.coverGutter)
2264
- { parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;"; }
2265
- if (widget.noHScroll)
2266
- { parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;"; }
2267
- removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle));
2268
- }
2269
- return widget.height = widget.node.parentNode.offsetHeight
2270
- }
2271
-
2272
- // Return true when the given mouse event happened in a widget
2273
- function eventInWidget(display, e) {
2274
- for (var n = e_target(e); n != display.wrapper; n = n.parentNode) {
2275
- if (!n || (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") ||
2276
- (n.parentNode == display.sizer && n != display.mover))
2277
- { return true }
2278
- }
2279
- }
2280
-
2281
- // POSITION MEASUREMENT
2282
-
2283
- function paddingTop(display) {return display.lineSpace.offsetTop}
2284
- function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight}
2285
- function paddingH(display) {
2286
- if (display.cachedPaddingH) { return display.cachedPaddingH }
2287
- var e = removeChildrenAndAdd(display.measure, elt("pre", "x"));
2288
- var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle;
2289
- var data = {left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight)};
2290
- if (!isNaN(data.left) && !isNaN(data.right)) { display.cachedPaddingH = data; }
2291
- return data
2292
- }
2293
-
2294
- function scrollGap(cm) { return scrollerGap - cm.display.nativeBarWidth }
2295
- function displayWidth(cm) {
2296
- return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth
2297
- }
2298
- function displayHeight(cm) {
2299
- return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight
2300
- }
2301
-
2302
- // Ensure the lineView.wrapping.heights array is populated. This is
2303
- // an array of bottom offsets for the lines that make up a drawn
2304
- // line. When lineWrapping is on, there might be more than one
2305
- // height.
2306
- function ensureLineHeights(cm, lineView, rect) {
2307
- var wrapping = cm.options.lineWrapping;
2308
- var curWidth = wrapping && displayWidth(cm);
2309
- if (!lineView.measure.heights || wrapping && lineView.measure.width != curWidth) {
2310
- var heights = lineView.measure.heights = [];
2311
- if (wrapping) {
2312
- lineView.measure.width = curWidth;
2313
- var rects = lineView.text.firstChild.getClientRects();
2314
- for (var i = 0; i < rects.length - 1; i++) {
2315
- var cur = rects[i], next = rects[i + 1];
2316
- if (Math.abs(cur.bottom - next.bottom) > 2)
2317
- { heights.push((cur.bottom + next.top) / 2 - rect.top); }
2318
- }
2319
- }
2320
- heights.push(rect.bottom - rect.top);
2321
- }
2322
- }
2323
-
2324
- // Find a line map (mapping character offsets to text nodes) and a
2325
- // measurement cache for the given line number. (A line view might
2326
- // contain multiple lines when collapsed ranges are present.)
2327
- function mapFromLineView(lineView, line, lineN) {
2328
- if (lineView.line == line)
2329
- { return {map: lineView.measure.map, cache: lineView.measure.cache} }
2330
- for (var i = 0; i < lineView.rest.length; i++)
2331
- { if (lineView.rest[i] == line)
2332
- { return {map: lineView.measure.maps[i], cache: lineView.measure.caches[i]} } }
2333
- for (var i$1 = 0; i$1 < lineView.rest.length; i$1++)
2334
- { if (lineNo(lineView.rest[i$1]) > lineN)
2335
- { return {map: lineView.measure.maps[i$1], cache: lineView.measure.caches[i$1], before: true} } }
2336
- }
2337
-
2338
- // Render a line into the hidden node display.externalMeasured. Used
2339
- // when measurement is needed for a line that's not in the viewport.
2340
- function updateExternalMeasurement(cm, line) {
2341
- line = visualLine(line);
2342
- var lineN = lineNo(line);
2343
- var view = cm.display.externalMeasured = new LineView(cm.doc, line, lineN);
2344
- view.lineN = lineN;
2345
- var built = view.built = buildLineContent(cm, view);
2346
- view.text = built.pre;
2347
- removeChildrenAndAdd(cm.display.lineMeasure, built.pre);
2348
- return view
2349
- }
2350
-
2351
- // Get a {top, bottom, left, right} box (in line-local coordinates)
2352
- // for a given character.
2353
- function measureChar(cm, line, ch, bias) {
2354
- return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias)
2355
- }
2356
-
2357
- // Find a line view that corresponds to the given line number.
2358
- function findViewForLine(cm, lineN) {
2359
- if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo)
2360
- { return cm.display.view[findViewIndex(cm, lineN)] }
2361
- var ext = cm.display.externalMeasured;
2362
- if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size)
2363
- { return ext }
2364
- }
2365
-
2366
- // Measurement can be split in two steps, the set-up work that
2367
- // applies to the whole line, and the measurement of the actual
2368
- // character. Functions like coordsChar, that need to do a lot of
2369
- // measurements in a row, can thus ensure that the set-up work is
2370
- // only done once.
2371
- function prepareMeasureForLine(cm, line) {
2372
- var lineN = lineNo(line);
2373
- var view = findViewForLine(cm, lineN);
2374
- if (view && !view.text) {
2375
- view = null;
2376
- } else if (view && view.changes) {
2377
- updateLineForChanges(cm, view, lineN, getDimensions(cm));
2378
- cm.curOp.forceUpdate = true;
2379
- }
2380
- if (!view)
2381
- { view = updateExternalMeasurement(cm, line); }
2382
-
2383
- var info = mapFromLineView(view, line, lineN);
2384
- return {
2385
- line: line, view: view, rect: null,
2386
- map: info.map, cache: info.cache, before: info.before,
2387
- hasHeights: false
2388
- }
2389
- }
2390
-
2391
- // Given a prepared measurement object, measures the position of an
2392
- // actual character (or fetches it from the cache).
2393
- function measureCharPrepared(cm, prepared, ch, bias, varHeight) {
2394
- if (prepared.before) { ch = -1; }
2395
- var key = ch + (bias || ""), found;
2396
- if (prepared.cache.hasOwnProperty(key)) {
2397
- found = prepared.cache[key];
2398
- } else {
2399
- if (!prepared.rect)
2400
- { prepared.rect = prepared.view.text.getBoundingClientRect(); }
2401
- if (!prepared.hasHeights) {
2402
- ensureLineHeights(cm, prepared.view, prepared.rect);
2403
- prepared.hasHeights = true;
2404
- }
2405
- found = measureCharInner(cm, prepared, ch, bias);
2406
- if (!found.bogus) { prepared.cache[key] = found; }
2407
- }
2408
- return {left: found.left, right: found.right,
2409
- top: varHeight ? found.rtop : found.top,
2410
- bottom: varHeight ? found.rbottom : found.bottom}
2411
- }
2412
-
2413
- var nullRect = {left: 0, right: 0, top: 0, bottom: 0};
2414
-
2415
- function nodeAndOffsetInLineMap(map$$1, ch, bias) {
2416
- var node, start, end, collapse, mStart, mEnd;
2417
- // First, search the line map for the text node corresponding to,
2418
- // or closest to, the target character.
2419
- for (var i = 0; i < map$$1.length; i += 3) {
2420
- mStart = map$$1[i];
2421
- mEnd = map$$1[i + 1];
2422
- if (ch < mStart) {
2423
- start = 0; end = 1;
2424
- collapse = "left";
2425
- } else if (ch < mEnd) {
2426
- start = ch - mStart;
2427
- end = start + 1;
2428
- } else if (i == map$$1.length - 3 || ch == mEnd && map$$1[i + 3] > ch) {
2429
- end = mEnd - mStart;
2430
- start = end - 1;
2431
- if (ch >= mEnd) { collapse = "right"; }
2432
- }
2433
- if (start != null) {
2434
- node = map$$1[i + 2];
2435
- if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right"))
2436
- { collapse = bias; }
2437
- if (bias == "left" && start == 0)
2438
- { while (i && map$$1[i - 2] == map$$1[i - 3] && map$$1[i - 1].insertLeft) {
2439
- node = map$$1[(i -= 3) + 2];
2440
- collapse = "left";
2441
- } }
2442
- if (bias == "right" && start == mEnd - mStart)
2443
- { while (i < map$$1.length - 3 && map$$1[i + 3] == map$$1[i + 4] && !map$$1[i + 5].insertLeft) {
2444
- node = map$$1[(i += 3) + 2];
2445
- collapse = "right";
2446
- } }
2447
- break
2448
- }
2449
- }
2450
- return {node: node, start: start, end: end, collapse: collapse, coverStart: mStart, coverEnd: mEnd}
2451
- }
2452
-
2453
- function getUsefulRect(rects, bias) {
2454
- var rect = nullRect;
2455
- if (bias == "left") { for (var i = 0; i < rects.length; i++) {
2456
- if ((rect = rects[i]).left != rect.right) { break }
2457
- } } else { for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) {
2458
- if ((rect = rects[i$1]).left != rect.right) { break }
2459
- } }
2460
- return rect
2461
- }
2462
-
2463
- function measureCharInner(cm, prepared, ch, bias) {
2464
- var place = nodeAndOffsetInLineMap(prepared.map, ch, bias);
2465
- var node = place.node, start = place.start, end = place.end, collapse = place.collapse;
2466
-
2467
- var rect;
2468
- if (node.nodeType == 3) { // If it is a text node, use a range to retrieve the coordinates.
2469
- for (var i$1 = 0; i$1 < 4; i$1++) { // Retry a maximum of 4 times when nonsense rectangles are returned
2470
- while (start && isExtendingChar(prepared.line.text.charAt(place.coverStart + start))) { --start; }
2471
- while (place.coverStart + end < place.coverEnd && isExtendingChar(prepared.line.text.charAt(place.coverStart + end))) { ++end; }
2472
- if (ie && ie_version < 9 && start == 0 && end == place.coverEnd - place.coverStart)
2473
- { rect = node.parentNode.getBoundingClientRect(); }
2474
- else
2475
- { rect = getUsefulRect(range(node, start, end).getClientRects(), bias); }
2476
- if (rect.left || rect.right || start == 0) { break }
2477
- end = start;
2478
- start = start - 1;
2479
- collapse = "right";
2480
- }
2481
- if (ie && ie_version < 11) { rect = maybeUpdateRectForZooming(cm.display.measure, rect); }
2482
- } else { // If it is a widget, simply get the box for the whole widget.
2483
- if (start > 0) { collapse = bias = "right"; }
2484
- var rects;
2485
- if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1)
2486
- { rect = rects[bias == "right" ? rects.length - 1 : 0]; }
2487
- else
2488
- { rect = node.getBoundingClientRect(); }
2489
- }
2490
- if (ie && ie_version < 9 && !start && (!rect || !rect.left && !rect.right)) {
2491
- var rSpan = node.parentNode.getClientRects()[0];
2492
- if (rSpan)
2493
- { rect = {left: rSpan.left, right: rSpan.left + charWidth(cm.display), top: rSpan.top, bottom: rSpan.bottom}; }
2494
- else
2495
- { rect = nullRect; }
2496
- }
2497
-
2498
- var rtop = rect.top - prepared.rect.top, rbot = rect.bottom - prepared.rect.top;
2499
- var mid = (rtop + rbot) / 2;
2500
- var heights = prepared.view.measure.heights;
2501
- var i = 0;
2502
- for (; i < heights.length - 1; i++)
2503
- { if (mid < heights[i]) { break } }
2504
- var top = i ? heights[i - 1] : 0, bot = heights[i];
2505
- var result = {left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left,
2506
- right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left,
2507
- top: top, bottom: bot};
2508
- if (!rect.left && !rect.right) { result.bogus = true; }
2509
- if (!cm.options.singleCursorHeightPerLine) { result.rtop = rtop; result.rbottom = rbot; }
2510
-
2511
- return result
2512
- }
2513
-
2514
- // Work around problem with bounding client rects on ranges being
2515
- // returned incorrectly when zoomed on IE10 and below.
2516
- function maybeUpdateRectForZooming(measure, rect) {
2517
- if (!window.screen || screen.logicalXDPI == null ||
2518
- screen.logicalXDPI == screen.deviceXDPI || !hasBadZoomedRects(measure))
2519
- { return rect }
2520
- var scaleX = screen.logicalXDPI / screen.deviceXDPI;
2521
- var scaleY = screen.logicalYDPI / screen.deviceYDPI;
2522
- return {left: rect.left * scaleX, right: rect.right * scaleX,
2523
- top: rect.top * scaleY, bottom: rect.bottom * scaleY}
2524
- }
2525
-
2526
- function clearLineMeasurementCacheFor(lineView) {
2527
- if (lineView.measure) {
2528
- lineView.measure.cache = {};
2529
- lineView.measure.heights = null;
2530
- if (lineView.rest) { for (var i = 0; i < lineView.rest.length; i++)
2531
- { lineView.measure.caches[i] = {}; } }
2532
- }
2533
- }
2534
-
2535
- function clearLineMeasurementCache(cm) {
2536
- cm.display.externalMeasure = null;
2537
- removeChildren(cm.display.lineMeasure);
2538
- for (var i = 0; i < cm.display.view.length; i++)
2539
- { clearLineMeasurementCacheFor(cm.display.view[i]); }
2540
- }
2541
-
2542
- function clearCaches(cm) {
2543
- clearLineMeasurementCache(cm);
2544
- cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null;
2545
- if (!cm.options.lineWrapping) { cm.display.maxLineChanged = true; }
2546
- cm.display.lineNumChars = null;
2547
- }
2548
-
2549
- function pageScrollX() {
2550
- // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206
2551
- // which causes page_Offset and bounding client rects to use
2552
- // different reference viewports and invalidate our calculations.
2553
- if (chrome && android) { return -(document.body.getBoundingClientRect().left - parseInt(getComputedStyle(document.body).marginLeft)) }
2554
- return window.pageXOffset || (document.documentElement || document.body).scrollLeft
2555
- }
2556
- function pageScrollY() {
2557
- if (chrome && android) { return -(document.body.getBoundingClientRect().top - parseInt(getComputedStyle(document.body).marginTop)) }
2558
- return window.pageYOffset || (document.documentElement || document.body).scrollTop
2559
- }
2560
-
2561
- function widgetTopHeight(lineObj) {
2562
- var height = 0;
2563
- if (lineObj.widgets) { for (var i = 0; i < lineObj.widgets.length; ++i) { if (lineObj.widgets[i].above)
2564
- { height += widgetHeight(lineObj.widgets[i]); } } }
2565
- return height
2566
- }
2567
-
2568
- // Converts a {top, bottom, left, right} box from line-local
2569
- // coordinates into another coordinate system. Context may be one of
2570
- // "line", "div" (display.lineDiv), "local"./null (editor), "window",
2571
- // or "page".
2572
- function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) {
2573
- if (!includeWidgets) {
2574
- var height = widgetTopHeight(lineObj);
2575
- rect.top += height; rect.bottom += height;
2576
- }
2577
- if (context == "line") { return rect }
2578
- if (!context) { context = "local"; }
2579
- var yOff = heightAtLine(lineObj);
2580
- if (context == "local") { yOff += paddingTop(cm.display); }
2581
- else { yOff -= cm.display.viewOffset; }
2582
- if (context == "page" || context == "window") {
2583
- var lOff = cm.display.lineSpace.getBoundingClientRect();
2584
- yOff += lOff.top + (context == "window" ? 0 : pageScrollY());
2585
- var xOff = lOff.left + (context == "window" ? 0 : pageScrollX());
2586
- rect.left += xOff; rect.right += xOff;
2587
- }
2588
- rect.top += yOff; rect.bottom += yOff;
2589
- return rect
2590
- }
2591
-
2592
- // Coverts a box from "div" coords to another coordinate system.
2593
- // Context may be "window", "page", "div", or "local"./null.
2594
- function fromCoordSystem(cm, coords, context) {
2595
- if (context == "div") { return coords }
2596
- var left = coords.left, top = coords.top;
2597
- // First move into "page" coordinate system
2598
- if (context == "page") {
2599
- left -= pageScrollX();
2600
- top -= pageScrollY();
2601
- } else if (context == "local" || !context) {
2602
- var localBox = cm.display.sizer.getBoundingClientRect();
2603
- left += localBox.left;
2604
- top += localBox.top;
2605
- }
2606
-
2607
- var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect();
2608
- return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}
2609
- }
2610
-
2611
- function charCoords(cm, pos, context, lineObj, bias) {
2612
- if (!lineObj) { lineObj = getLine(cm.doc, pos.line); }
2613
- return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context)
2614
- }
2615
-
2616
- // Returns a box for a given cursor position, which may have an
2617
- // 'other' property containing the position of the secondary cursor
2618
- // on a bidi boundary.
2619
- // A cursor Pos(line, char, "before") is on the same visual line as `char - 1`
2620
- // and after `char - 1` in writing order of `char - 1`
2621
- // A cursor Pos(line, char, "after") is on the same visual line as `char`
2622
- // and before `char` in writing order of `char`
2623
- // Examples (upper-case letters are RTL, lower-case are LTR):
2624
- // Pos(0, 1, ...)
2625
- // before after
2626
- // ab a|b a|b
2627
- // aB a|B aB|
2628
- // Ab |Ab A|b
2629
- // AB B|A B|A
2630
- // Every position after the last character on a line is considered to stick
2631
- // to the last character on the line.
2632
- function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) {
2633
- lineObj = lineObj || getLine(cm.doc, pos.line);
2634
- if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
2635
- function get(ch, right) {
2636
- var m = measureCharPrepared(cm, preparedMeasure, ch, right ? "right" : "left", varHeight);
2637
- if (right) { m.left = m.right; } else { m.right = m.left; }
2638
- return intoCoordSystem(cm, lineObj, m, context)
2639
- }
2640
- var order = getOrder(lineObj, cm.doc.direction), ch = pos.ch, sticky = pos.sticky;
2641
- if (ch >= lineObj.text.length) {
2642
- ch = lineObj.text.length;
2643
- sticky = "before";
2644
- } else if (ch <= 0) {
2645
- ch = 0;
2646
- sticky = "after";
2647
- }
2648
- if (!order) { return get(sticky == "before" ? ch - 1 : ch, sticky == "before") }
2649
-
2650
- function getBidi(ch, partPos, invert) {
2651
- var part = order[partPos], right = part.level == 1;
2652
- return get(invert ? ch - 1 : ch, right != invert)
2653
- }
2654
- var partPos = getBidiPartAt(order, ch, sticky);
2655
- var other = bidiOther;
2656
- var val = getBidi(ch, partPos, sticky == "before");
2657
- if (other != null) { val.other = getBidi(ch, other, sticky != "before"); }
2658
- return val
2659
- }
2660
-
2661
- // Used to cheaply estimate the coordinates for a position. Used for
2662
- // intermediate scroll updates.
2663
- function estimateCoords(cm, pos) {
2664
- var left = 0;
2665
- pos = clipPos(cm.doc, pos);
2666
- if (!cm.options.lineWrapping) { left = charWidth(cm.display) * pos.ch; }
2667
- var lineObj = getLine(cm.doc, pos.line);
2668
- var top = heightAtLine(lineObj) + paddingTop(cm.display);
2669
- return {left: left, right: left, top: top, bottom: top + lineObj.height}
2670
- }
2671
-
2672
- // Positions returned by coordsChar contain some extra information.
2673
- // xRel is the relative x position of the input coordinates compared
2674
- // to the found position (so xRel > 0 means the coordinates are to
2675
- // the right of the character position, for example). When outside
2676
- // is true, that means the coordinates lie outside the line's
2677
- // vertical range.
2678
- function PosWithInfo(line, ch, sticky, outside, xRel) {
2679
- var pos = Pos(line, ch, sticky);
2680
- pos.xRel = xRel;
2681
- if (outside) { pos.outside = true; }
2682
- return pos
2683
- }
2684
-
2685
- // Compute the character position closest to the given coordinates.
2686
- // Input must be lineSpace-local ("div" coordinate system).
2687
- function coordsChar(cm, x, y) {
2688
- var doc = cm.doc;
2689
- y += cm.display.viewOffset;
2690
- if (y < 0) { return PosWithInfo(doc.first, 0, null, true, -1) }
2691
- var lineN = lineAtHeight(doc, y), last = doc.first + doc.size - 1;
2692
- if (lineN > last)
2693
- { return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, true, 1) }
2694
- if (x < 0) { x = 0; }
2695
-
2696
- var lineObj = getLine(doc, lineN);
2697
- for (;;) {
2698
- var found = coordsCharInner(cm, lineObj, lineN, x, y);
2699
- var collapsed = collapsedSpanAround(lineObj, found.ch + (found.xRel > 0 ? 1 : 0));
2700
- if (!collapsed) { return found }
2701
- var rangeEnd = collapsed.find(1);
2702
- if (rangeEnd.line == lineN) { return rangeEnd }
2703
- lineObj = getLine(doc, lineN = rangeEnd.line);
2704
- }
2705
- }
2706
-
2707
- function wrappedLineExtent(cm, lineObj, preparedMeasure, y) {
2708
- y -= widgetTopHeight(lineObj);
2709
- var end = lineObj.text.length;
2710
- var begin = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y; }, end, 0);
2711
- end = findFirst(function (ch) { return measureCharPrepared(cm, preparedMeasure, ch).top > y; }, begin, end);
2712
- return {begin: begin, end: end}
2713
- }
2714
-
2715
- function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) {
2716
- if (!preparedMeasure) { preparedMeasure = prepareMeasureForLine(cm, lineObj); }
2717
- var targetTop = intoCoordSystem(cm, lineObj, measureCharPrepared(cm, preparedMeasure, target), "line").top;
2718
- return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop)
2719
- }
2720
-
2721
- // Returns true if the given side of a box is after the given
2722
- // coordinates, in top-to-bottom, left-to-right order.
2723
- function boxIsAfter(box, x, y, left) {
2724
- return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x
2725
- }
2726
-
2727
- function coordsCharInner(cm, lineObj, lineNo$$1, x, y) {
2728
- // Move y into line-local coordinate space
2729
- y -= heightAtLine(lineObj);
2730
- var preparedMeasure = prepareMeasureForLine(cm, lineObj);
2731
- // When directly calling `measureCharPrepared`, we have to adjust
2732
- // for the widgets at this line.
2733
- var widgetHeight$$1 = widgetTopHeight(lineObj);
2734
- var begin = 0, end = lineObj.text.length, ltr = true;
2735
-
2736
- var order = getOrder(lineObj, cm.doc.direction);
2737
- // If the line isn't plain left-to-right text, first figure out
2738
- // which bidi section the coordinates fall into.
2739
- if (order) {
2740
- var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)
2741
- (cm, lineObj, lineNo$$1, preparedMeasure, order, x, y);
2742
- ltr = part.level != 1;
2743
- // The awkward -1 offsets are needed because findFirst (called
2744
- // on these below) will treat its first bound as inclusive,
2745
- // second as exclusive, but we want to actually address the
2746
- // characters in the part's range
2747
- begin = ltr ? part.from : part.to - 1;
2748
- end = ltr ? part.to : part.from - 1;
2749
- }
2750
-
2751
- // A binary search to find the first character whose bounding box
2752
- // starts after the coordinates. If we run across any whose box wrap
2753
- // the coordinates, store that.
2754
- var chAround = null, boxAround = null;
2755
- var ch = findFirst(function (ch) {
2756
- var box = measureCharPrepared(cm, preparedMeasure, ch);
2757
- box.top += widgetHeight$$1; box.bottom += widgetHeight$$1;
2758
- if (!boxIsAfter(box, x, y, false)) { return false }
2759
- if (box.top <= y && box.left <= x) {
2760
- chAround = ch;
2761
- boxAround = box;
2762
- }
2763
- return true
2764
- }, begin, end);
2765
-
2766
- var baseX, sticky, outside = false;
2767
- // If a box around the coordinates was found, use that
2768
- if (boxAround) {
2769
- // Distinguish coordinates nearer to the left or right side of the box
2770
- var atLeft = x - boxAround.left < boxAround.right - x, atStart = atLeft == ltr;
2771
- ch = chAround + (atStart ? 0 : 1);
2772
- sticky = atStart ? "after" : "before";
2773
- baseX = atLeft ? boxAround.left : boxAround.right;
2774
- } else {
2775
- // (Adjust for extended bound, if necessary.)
2776
- if (!ltr && (ch == end || ch == begin)) { ch++; }
2777
- // To determine which side to associate with, get the box to the
2778
- // left of the character and compare it's vertical position to the
2779
- // coordinates
2780
- sticky = ch == 0 ? "after" : ch == lineObj.text.length ? "before" :
2781
- (measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + widgetHeight$$1 <= y) == ltr ?
2782
- "after" : "before";
2783
- // Now get accurate coordinates for this place, in order to get a
2784
- // base X position
2785
- var coords = cursorCoords(cm, Pos(lineNo$$1, ch, sticky), "line", lineObj, preparedMeasure);
2786
- baseX = coords.left;
2787
- outside = y < coords.top || y >= coords.bottom;
2788
- }
2789
-
2790
- ch = skipExtendingChars(lineObj.text, ch, 1);
2791
- return PosWithInfo(lineNo$$1, ch, sticky, outside, x - baseX)
2792
- }
2793
-
2794
- function coordsBidiPart(cm, lineObj, lineNo$$1, preparedMeasure, order, x, y) {
2795
- // Bidi parts are sorted left-to-right, and in a non-line-wrapping
2796
- // situation, we can take this ordering to correspond to the visual
2797
- // ordering. This finds the first part whose end is after the given
2798
- // coordinates.
2799
- var index = findFirst(function (i) {
2800
- var part = order[i], ltr = part.level != 1;
2801
- return boxIsAfter(cursorCoords(cm, Pos(lineNo$$1, ltr ? part.to : part.from, ltr ? "before" : "after"),
2802
- "line", lineObj, preparedMeasure), x, y, true)
2803
- }, 0, order.length - 1);
2804
- var part = order[index];
2805
- // If this isn't the first part, the part's start is also after
2806
- // the coordinates, and the coordinates aren't on the same line as
2807
- // that start, move one part back.
2808
- if (index > 0) {
2809
- var ltr = part.level != 1;
2810
- var start = cursorCoords(cm, Pos(lineNo$$1, ltr ? part.from : part.to, ltr ? "after" : "before"),
2811
- "line", lineObj, preparedMeasure);
2812
- if (boxIsAfter(start, x, y, true) && start.top > y)
2813
- { part = order[index - 1]; }
2814
- }
2815
- return part
2816
- }
2817
-
2818
- function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) {
2819
- // In a wrapped line, rtl text on wrapping boundaries can do things
2820
- // that don't correspond to the ordering in our `order` array at
2821
- // all, so a binary search doesn't work, and we want to return a
2822
- // part that only spans one line so that the binary search in
2823
- // coordsCharInner is safe. As such, we first find the extent of the
2824
- // wrapped line, and then do a flat search in which we discard any
2825
- // spans that aren't on the line.
2826
- var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y);
2827
- var begin = ref.begin;
2828
- var end = ref.end;
2829
- if (/\s/.test(lineObj.text.charAt(end - 1))) { end--; }
2830
- var part = null, closestDist = null;
2831
- for (var i = 0; i < order.length; i++) {
2832
- var p = order[i];
2833
- if (p.from >= end || p.to <= begin) { continue }
2834
- var ltr = p.level != 1;
2835
- var endX = measureCharPrepared(cm, preparedMeasure, ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from)).right;
2836
- // Weigh against spans ending before this, so that they are only
2837
- // picked if nothing ends after
2838
- var dist = endX < x ? x - endX + 1e9 : endX - x;
2839
- if (!part || closestDist > dist) {
2840
- part = p;
2841
- closestDist = dist;
2842
- }
2843
- }
2844
- if (!part) { part = order[order.length - 1]; }
2845
- // Clip the part to the wrapped line.
2846
- if (part.from < begin) { part = {from: begin, to: part.to, level: part.level}; }
2847
- if (part.to > end) { part = {from: part.from, to: end, level: part.level}; }
2848
- return part
2849
- }
2850
-
2851
- var measureText;
2852
- // Compute the default text height.
2853
- function textHeight(display) {
2854
- if (display.cachedTextHeight != null) { return display.cachedTextHeight }
2855
- if (measureText == null) {
2856
- measureText = elt("pre");
2857
- // Measure a bunch of lines, for browsers that compute
2858
- // fractional heights.
2859
- for (var i = 0; i < 49; ++i) {
2860
- measureText.appendChild(document.createTextNode("x"));
2861
- measureText.appendChild(elt("br"));
2862
- }
2863
- measureText.appendChild(document.createTextNode("x"));
2864
- }
2865
- removeChildrenAndAdd(display.measure, measureText);
2866
- var height = measureText.offsetHeight / 50;
2867
- if (height > 3) { display.cachedTextHeight = height; }
2868
- removeChildren(display.measure);
2869
- return height || 1
2870
- }
2871
-
2872
- // Compute the default character width.
2873
- function charWidth(display) {
2874
- if (display.cachedCharWidth != null) { return display.cachedCharWidth }
2875
- var anchor = elt("span", "xxxxxxxxxx");
2876
- var pre = elt("pre", [anchor]);
2877
- removeChildrenAndAdd(display.measure, pre);
2878
- var rect = anchor.getBoundingClientRect(), width = (rect.right - rect.left) / 10;
2879
- if (width > 2) { display.cachedCharWidth = width; }
2880
- return width || 10
2881
- }
2882
-
2883
- // Do a bulk-read of the DOM positions and sizes needed to draw the
2884
- // view, so that we don't interleave reading and writing to the DOM.
2885
- function getDimensions(cm) {
2886
- var d = cm.display, left = {}, width = {};
2887
- var gutterLeft = d.gutters.clientLeft;
2888
- for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) {
2889
- var id = cm.display.gutterSpecs[i].className;
2890
- left[id] = n.offsetLeft + n.clientLeft + gutterLeft;
2891
- width[id] = n.clientWidth;
2892
- }
2893
- return {fixedPos: compensateForHScroll(d),
2894
- gutterTotalWidth: d.gutters.offsetWidth,
2895
- gutterLeft: left,
2896
- gutterWidth: width,
2897
- wrapperWidth: d.wrapper.clientWidth}
2898
- }
2899
-
2900
- // Computes display.scroller.scrollLeft + display.gutters.offsetWidth,
2901
- // but using getBoundingClientRect to get a sub-pixel-accurate
2902
- // result.
2903
- function compensateForHScroll(display) {
2904
- return display.scroller.getBoundingClientRect().left - display.sizer.getBoundingClientRect().left
2905
- }
2906
-
2907
- // Returns a function that estimates the height of a line, to use as
2908
- // first approximation until the line becomes visible (and is thus
2909
- // properly measurable).
2910
- function estimateHeight(cm) {
2911
- var th = textHeight(cm.display), wrapping = cm.options.lineWrapping;
2912
- var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3);
2913
- return function (line) {
2914
- if (lineIsHidden(cm.doc, line)) { return 0 }
2915
-
2916
- var widgetsHeight = 0;
2917
- if (line.widgets) { for (var i = 0; i < line.widgets.length; i++) {
2918
- if (line.widgets[i].height) { widgetsHeight += line.widgets[i].height; }
2919
- } }
2920
-
2921
- if (wrapping)
2922
- { return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th }
2923
- else
2924
- { return widgetsHeight + th }
2925
- }
2926
- }
2927
-
2928
- function estimateLineHeights(cm) {
2929
- var doc = cm.doc, est = estimateHeight(cm);
2930
- doc.iter(function (line) {
2931
- var estHeight = est(line);
2932
- if (estHeight != line.height) { updateLineHeight(line, estHeight); }
2933
- });
2934
- }
2935
-
2936
- // Given a mouse event, find the corresponding position. If liberal
2937
- // is false, it checks whether a gutter or scrollbar was clicked,
2938
- // and returns null if it was. forRect is used by rectangular
2939
- // selections, and tries to estimate a character position even for
2940
- // coordinates beyond the right of the text.
2941
- function posFromMouse(cm, e, liberal, forRect) {
2942
- var display = cm.display;
2943
- if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { return null }
2944
-
2945
- var x, y, space = display.lineSpace.getBoundingClientRect();
2946
- // Fails unpredictably on IE[67] when mouse is dragged around quickly.
2947
- try { x = e.clientX - space.left; y = e.clientY - space.top; }
2948
- catch (e) { return null }
2949
- var coords = coordsChar(cm, x, y), line;
2950
- if (forRect && coords.xRel == 1 && (line = getLine(cm.doc, coords.line).text).length == coords.ch) {
2951
- var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length;
2952
- coords = Pos(coords.line, Math.max(0, Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff));
2953
- }
2954
- return coords
2955
- }
2956
-
2957
- // Find the view element corresponding to a given line. Return null
2958
- // when the line isn't visible.
2959
- function findViewIndex(cm, n) {
2960
- if (n >= cm.display.viewTo) { return null }
2961
- n -= cm.display.viewFrom;
2962
- if (n < 0) { return null }
2963
- var view = cm.display.view;
2964
- for (var i = 0; i < view.length; i++) {
2965
- n -= view[i].size;
2966
- if (n < 0) { return i }
2967
- }
2968
- }
2969
-
2970
- // Updates the display.view data structure for a given change to the
2971
- // document. From and to are in pre-change coordinates. Lendiff is
2972
- // the amount of lines added or subtracted by the change. This is
2973
- // used for changes that span multiple lines, or change the way
2974
- // lines are divided into visual lines. regLineChange (below)
2975
- // registers single-line changes.
2976
- function regChange(cm, from, to, lendiff) {
2977
- if (from == null) { from = cm.doc.first; }
2978
- if (to == null) { to = cm.doc.first + cm.doc.size; }
2979
- if (!lendiff) { lendiff = 0; }
2980
-
2981
- var display = cm.display;
2982
- if (lendiff && to < display.viewTo &&
2983
- (display.updateLineNumbers == null || display.updateLineNumbers > from))
2984
- { display.updateLineNumbers = from; }
2985
-
2986
- cm.curOp.viewChanged = true;
2987
-
2988
- if (from >= display.viewTo) { // Change after
2989
- if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo)
2990
- { resetView(cm); }
2991
- } else if (to <= display.viewFrom) { // Change before
2992
- if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) {
2993
- resetView(cm);
2994
- } else {
2995
- display.viewFrom += lendiff;
2996
- display.viewTo += lendiff;
2997
- }
2998
- } else if (from <= display.viewFrom && to >= display.viewTo) { // Full overlap
2999
- resetView(cm);
3000
- } else if (from <= display.viewFrom) { // Top overlap
3001
- var cut = viewCuttingPoint(cm, to, to + lendiff, 1);
3002
- if (cut) {
3003
- display.view = display.view.slice(cut.index);
3004
- display.viewFrom = cut.lineN;
3005
- display.viewTo += lendiff;
3006
- } else {
3007
- resetView(cm);
3008
- }
3009
- } else if (to >= display.viewTo) { // Bottom overlap
3010
- var cut$1 = viewCuttingPoint(cm, from, from, -1);
3011
- if (cut$1) {
3012
- display.view = display.view.slice(0, cut$1.index);
3013
- display.viewTo = cut$1.lineN;
3014
- } else {
3015
- resetView(cm);
3016
- }
3017
- } else { // Gap in the middle
3018
- var cutTop = viewCuttingPoint(cm, from, from, -1);
3019
- var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1);
3020
- if (cutTop && cutBot) {
3021
- display.view = display.view.slice(0, cutTop.index)
3022
- .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN))
3023
- .concat(display.view.slice(cutBot.index));
3024
- display.viewTo += lendiff;
3025
- } else {
3026
- resetView(cm);
3027
- }
3028
- }
3029
-
3030
- var ext = display.externalMeasured;
3031
- if (ext) {
3032
- if (to < ext.lineN)
3033
- { ext.lineN += lendiff; }
3034
- else if (from < ext.lineN + ext.size)
3035
- { display.externalMeasured = null; }
3036
- }
3037
- }
3038
-
3039
- // Register a change to a single line. Type must be one of "text",
3040
- // "gutter", "class", "widget"
3041
- function regLineChange(cm, line, type) {
3042
- cm.curOp.viewChanged = true;
3043
- var display = cm.display, ext = cm.display.externalMeasured;
3044
- if (ext && line >= ext.lineN && line < ext.lineN + ext.size)
3045
- { display.externalMeasured = null; }
3046
-
3047
- if (line < display.viewFrom || line >= display.viewTo) { return }
3048
- var lineView = display.view[findViewIndex(cm, line)];
3049
- if (lineView.node == null) { return }
3050
- var arr = lineView.changes || (lineView.changes = []);
3051
- if (indexOf(arr, type) == -1) { arr.push(type); }
3052
- }
3053
-
3054
- // Clear the view.
3055
- function resetView(cm) {
3056
- cm.display.viewFrom = cm.display.viewTo = cm.doc.first;
3057
- cm.display.view = [];
3058
- cm.display.viewOffset = 0;
3059
- }
3060
-
3061
- function viewCuttingPoint(cm, oldN, newN, dir) {
3062
- var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
3063
- if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
3064
- { return {index: index, lineN: newN} }
3065
- var n = cm.display.viewFrom;
3066
- for (var i = 0; i < index; i++)
3067
- { n += view[i].size; }
3068
- if (n != oldN) {
3069
- if (dir > 0) {
3070
- if (index == view.length - 1) { return null }
3071
- diff = (n + view[index].size) - oldN;
3072
- index++;
3073
- } else {
3074
- diff = n - oldN;
3075
- }
3076
- oldN += diff; newN += diff;
3077
- }
3078
- while (visualLineNo(cm.doc, newN) != newN) {
3079
- if (index == (dir < 0 ? 0 : view.length - 1)) { return null }
3080
- newN += dir * view[index - (dir < 0 ? 1 : 0)].size;
3081
- index += dir;
3082
- }
3083
- return {index: index, lineN: newN}
3084
- }
3085
-
3086
- // Force the view to cover a given range, adding empty view element
3087
- // or clipping off existing ones as needed.
3088
- function adjustView(cm, from, to) {
3089
- var display = cm.display, view = display.view;
3090
- if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) {
3091
- display.view = buildViewArray(cm, from, to);
3092
- display.viewFrom = from;
3093
- } else {
3094
- if (display.viewFrom > from)
3095
- { display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view); }
3096
- else if (display.viewFrom < from)
3097
- { display.view = display.view.slice(findViewIndex(cm, from)); }
3098
- display.viewFrom = from;
3099
- if (display.viewTo < to)
3100
- { display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)); }
3101
- else if (display.viewTo > to)
3102
- { display.view = display.view.slice(0, findViewIndex(cm, to)); }
3103
- }
3104
- display.viewTo = to;
3105
- }
3106
-
3107
- // Count the number of lines in the view whose DOM representation is
3108
- // out of date (or nonexistent).
3109
- function countDirtyView(cm) {
3110
- var view = cm.display.view, dirty = 0;
3111
- for (var i = 0; i < view.length; i++) {
3112
- var lineView = view[i];
3113
- if (!lineView.hidden && (!lineView.node || lineView.changes)) { ++dirty; }
3114
- }
3115
- return dirty
3116
- }
3117
-
3118
- function updateSelection(cm) {
3119
- cm.display.input.showSelection(cm.display.input.prepareSelection());
3120
- }
3121
-
3122
- function prepareSelection(cm, primary) {
3123
- if ( primary === void 0 ) primary = true;
3124
-
3125
- var doc = cm.doc, result = {};
3126
- var curFragment = result.cursors = document.createDocumentFragment();
3127
- var selFragment = result.selection = document.createDocumentFragment();
3128
-
3129
- for (var i = 0; i < doc.sel.ranges.length; i++) {
3130
- if (!primary && i == doc.sel.primIndex) { continue }
3131
- var range$$1 = doc.sel.ranges[i];
3132
- if (range$$1.from().line >= cm.display.viewTo || range$$1.to().line < cm.display.viewFrom) { continue }
3133
- var collapsed = range$$1.empty();
3134
- if (collapsed || cm.options.showCursorWhenSelecting)
3135
- { drawSelectionCursor(cm, range$$1.head, curFragment); }
3136
- if (!collapsed)
3137
- { drawSelectionRange(cm, range$$1, selFragment); }
3138
- }
3139
- return result
3140
- }
3141
-
3142
- // Draws a cursor for the given range
3143
- function drawSelectionCursor(cm, head, output) {
3144
- var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine);
3145
-
3146
- var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor"));
3147
- cursor.style.left = pos.left + "px";
3148
- cursor.style.top = pos.top + "px";
3149
- cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px";
3150
-
3151
- if (pos.other) {
3152
- // Secondary cursor, shown when on a 'jump' in bi-directional text
3153
- var otherCursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"));
3154
- otherCursor.style.display = "";
3155
- otherCursor.style.left = pos.other.left + "px";
3156
- otherCursor.style.top = pos.other.top + "px";
3157
- otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px";
3158
- }
3159
- }
3160
-
3161
- function cmpCoords(a, b) { return a.top - b.top || a.left - b.left }
3162
-
3163
- // Draws the given range as a highlighted selection
3164
- function drawSelectionRange(cm, range$$1, output) {
3165
- var display = cm.display, doc = cm.doc;
3166
- var fragment = document.createDocumentFragment();
3167
- var padding = paddingH(cm.display), leftSide = padding.left;
3168
- var rightSide = Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - padding.right;
3169
- var docLTR = doc.direction == "ltr";
3170
-
3171
- function add(left, top, width, bottom) {
3172
- if (top < 0) { top = 0; }
3173
- top = Math.round(top);
3174
- bottom = Math.round(bottom);
3175
- fragment.appendChild(elt("div", null, "CodeMirror-selected", ("position: absolute; left: " + left + "px;\n top: " + top + "px; width: " + (width == null ? rightSide - left : width) + "px;\n height: " + (bottom - top) + "px")));
3176
- }
3177
-
3178
- function drawForLine(line, fromArg, toArg) {
3179
- var lineObj = getLine(doc, line);
3180
- var lineLen = lineObj.text.length;
3181
- var start, end;
3182
- function coords(ch, bias) {
3183
- return charCoords(cm, Pos(line, ch), "div", lineObj, bias)
3184
- }
3185
-
3186
- function wrapX(pos, dir, side) {
3187
- var extent = wrappedLineExtentChar(cm, lineObj, null, pos);
3188
- var prop = (dir == "ltr") == (side == "after") ? "left" : "right";
3189
- var ch = side == "after" ? extent.begin : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1);
3190
- return coords(ch, prop)[prop]
3191
- }
3192
-
3193
- var order = getOrder(lineObj, doc.direction);
3194
- iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function (from, to, dir, i) {
3195
- var ltr = dir == "ltr";
3196
- var fromPos = coords(from, ltr ? "left" : "right");
3197
- var toPos = coords(to - 1, ltr ? "right" : "left");
3198
-
3199
- var openStart = fromArg == null && from == 0, openEnd = toArg == null && to == lineLen;
3200
- var first = i == 0, last = !order || i == order.length - 1;
3201
- if (toPos.top - fromPos.top <= 3) { // Single line
3202
- var openLeft = (docLTR ? openStart : openEnd) && first;
3203
- var openRight = (docLTR ? openEnd : openStart) && last;
3204
- var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left;
3205
- var right = openRight ? rightSide : (ltr ? toPos : fromPos).right;
3206
- add(left, fromPos.top, right - left, fromPos.bottom);
3207
- } else { // Multiple lines
3208
- var topLeft, topRight, botLeft, botRight;
3209
- if (ltr) {
3210
- topLeft = docLTR && openStart && first ? leftSide : fromPos.left;
3211
- topRight = docLTR ? rightSide : wrapX(from, dir, "before");
3212
- botLeft = docLTR ? leftSide : wrapX(to, dir, "after");
3213
- botRight = docLTR && openEnd && last ? rightSide : toPos.right;
3214
- } else {
3215
- topLeft = !docLTR ? leftSide : wrapX(from, dir, "before");
3216
- topRight = !docLTR && openStart && first ? rightSide : fromPos.right;
3217
- botLeft = !docLTR && openEnd && last ? leftSide : toPos.left;
3218
- botRight = !docLTR ? rightSide : wrapX(to, dir, "after");
3219
- }
3220
- add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom);
3221
- if (fromPos.bottom < toPos.top) { add(leftSide, fromPos.bottom, null, toPos.top); }
3222
- add(botLeft, toPos.top, botRight - botLeft, toPos.bottom);
3223
- }
3224
-
3225
- if (!start || cmpCoords(fromPos, start) < 0) { start = fromPos; }
3226
- if (cmpCoords(toPos, start) < 0) { start = toPos; }
3227
- if (!end || cmpCoords(fromPos, end) < 0) { end = fromPos; }
3228
- if (cmpCoords(toPos, end) < 0) { end = toPos; }
3229
- });
3230
- return {start: start, end: end}
3231
- }
3232
-
3233
- var sFrom = range$$1.from(), sTo = range$$1.to();
3234
- if (sFrom.line == sTo.line) {
3235
- drawForLine(sFrom.line, sFrom.ch, sTo.ch);
3236
- } else {
3237
- var fromLine = getLine(doc, sFrom.line), toLine = getLine(doc, sTo.line);
3238
- var singleVLine = visualLine(fromLine) == visualLine(toLine);
3239
- var leftEnd = drawForLine(sFrom.line, sFrom.ch, singleVLine ? fromLine.text.length + 1 : null).end;
3240
- var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start;
3241
- if (singleVLine) {
3242
- if (leftEnd.top < rightStart.top - 2) {
3243
- add(leftEnd.right, leftEnd.top, null, leftEnd.bottom);
3244
- add(leftSide, rightStart.top, rightStart.left, rightStart.bottom);
3245
- } else {
3246
- add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom);
3247
- }
3248
- }
3249
- if (leftEnd.bottom < rightStart.top)
3250
- { add(leftSide, leftEnd.bottom, null, rightStart.top); }
3251
- }
3252
-
3253
- output.appendChild(fragment);
3254
- }
3255
-
3256
- // Cursor-blinking
3257
- function restartBlink(cm) {
3258
- if (!cm.state.focused) { return }
3259
- var display = cm.display;
3260
- clearInterval(display.blinker);
3261
- var on = true;
3262
- display.cursorDiv.style.visibility = "";
3263
- if (cm.options.cursorBlinkRate > 0)
3264
- { display.blinker = setInterval(function () { return display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden"; },
3265
- cm.options.cursorBlinkRate); }
3266
- else if (cm.options.cursorBlinkRate < 0)
3267
- { display.cursorDiv.style.visibility = "hidden"; }
3268
- }
3269
-
3270
- function ensureFocus(cm) {
3271
- if (!cm.state.focused) { cm.display.input.focus(); onFocus(cm); }
3272
- }
3273
-
3274
- function delayBlurEvent(cm) {
3275
- cm.state.delayingBlurEvent = true;
3276
- setTimeout(function () { if (cm.state.delayingBlurEvent) {
3277
- cm.state.delayingBlurEvent = false;
3278
- onBlur(cm);
3279
- } }, 100);
3280
- }
3281
-
3282
- function onFocus(cm, e) {
3283
- if (cm.state.delayingBlurEvent) { cm.state.delayingBlurEvent = false; }
3284
-
3285
- if (cm.options.readOnly == "nocursor") { return }
3286
- if (!cm.state.focused) {
3287
- signal(cm, "focus", cm, e);
3288
- cm.state.focused = true;
3289
- addClass(cm.display.wrapper, "CodeMirror-focused");
3290
- // This test prevents this from firing when a context
3291
- // menu is closed (since the input reset would kill the
3292
- // select-all detection hack)
3293
- if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) {
3294
- cm.display.input.reset();
3295
- if (webkit) { setTimeout(function () { return cm.display.input.reset(true); }, 20); } // Issue #1730
3296
- }
3297
- cm.display.input.receivedFocus();
3298
- }
3299
- restartBlink(cm);
3300
- }
3301
- function onBlur(cm, e) {
3302
- if (cm.state.delayingBlurEvent) { return }
3303
-
3304
- if (cm.state.focused) {
3305
- signal(cm, "blur", cm, e);
3306
- cm.state.focused = false;
3307
- rmClass(cm.display.wrapper, "CodeMirror-focused");
3308
- }
3309
- clearInterval(cm.display.blinker);
3310
- setTimeout(function () { if (!cm.state.focused) { cm.display.shift = false; } }, 150);
3311
- }
3312
-
3313
- // Read the actual heights of the rendered lines, and update their
3314
- // stored heights to match.
3315
- function updateHeightsInViewport(cm) {
3316
- var display = cm.display;
3317
- var prevBottom = display.lineDiv.offsetTop;
3318
- for (var i = 0; i < display.view.length; i++) {
3319
- var cur = display.view[i], wrapping = cm.options.lineWrapping;
3320
- var height = (void 0), width = 0;
3321
- if (cur.hidden) { continue }
3322
- if (ie && ie_version < 8) {
3323
- var bot = cur.node.offsetTop + cur.node.offsetHeight;
3324
- height = bot - prevBottom;
3325
- prevBottom = bot;
3326
- } else {
3327
- var box = cur.node.getBoundingClientRect();
3328
- height = box.bottom - box.top;
3329
- // Check that lines don't extend past the right of the current
3330
- // editor width
3331
- if (!wrapping && cur.text.firstChild)
3332
- { width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1; }
3333
- }
3334
- var diff = cur.line.height - height;
3335
- if (diff > .005 || diff < -.005) {
3336
- updateLineHeight(cur.line, height);
3337
- updateWidgetHeight(cur.line);
3338
- if (cur.rest) { for (var j = 0; j < cur.rest.length; j++)
3339
- { updateWidgetHeight(cur.rest[j]); } }
3340
- }
3341
- if (width > cm.display.sizerWidth) {
3342
- var chWidth = Math.ceil(width / charWidth(cm.display));
3343
- if (chWidth > cm.display.maxLineLength) {
3344
- cm.display.maxLineLength = chWidth;
3345
- cm.display.maxLine = cur.line;
3346
- cm.display.maxLineChanged = true;
3347
- }
3348
- }
3349
- }
3350
- }
3351
-
3352
- // Read and store the height of line widgets associated with the
3353
- // given line.
3354
- function updateWidgetHeight(line) {
3355
- if (line.widgets) { for (var i = 0; i < line.widgets.length; ++i) {
3356
- var w = line.widgets[i], parent = w.node.parentNode;
3357
- if (parent) { w.height = parent.offsetHeight; }
3358
- } }
3359
- }
3360
-
3361
- // Compute the lines that are visible in a given viewport (defaults
3362
- // the the current scroll position). viewport may contain top,
3363
- // height, and ensure (see op.scrollToPos) properties.
3364
- function visibleLines(display, doc, viewport) {
3365
- var top = viewport && viewport.top != null ? Math.max(0, viewport.top) : display.scroller.scrollTop;
3366
- top = Math.floor(top - paddingTop(display));
3367
- var bottom = viewport && viewport.bottom != null ? viewport.bottom : top + display.wrapper.clientHeight;
3368
-
3369
- var from = lineAtHeight(doc, top), to = lineAtHeight(doc, bottom);
3370
- // Ensure is a {from: {line, ch}, to: {line, ch}} object, and
3371
- // forces those lines into the viewport (if possible).
3372
- if (viewport && viewport.ensure) {
3373
- var ensureFrom = viewport.ensure.from.line, ensureTo = viewport.ensure.to.line;
3374
- if (ensureFrom < from) {
3375
- from = ensureFrom;
3376
- to = lineAtHeight(doc, heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight);
3377
- } else if (Math.min(ensureTo, doc.lastLine()) >= to) {
3378
- from = lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight);
3379
- to = ensureTo;
3380
- }
3381
- }
3382
- return {from: from, to: Math.max(to, from + 1)}
3383
- }
3384
-
3385
- // SCROLLING THINGS INTO VIEW
3386
-
3387
- // If an editor sits on the top or bottom of the window, partially
3388
- // scrolled out of view, this ensures that the cursor is visible.
3389
- function maybeScrollWindow(cm, rect) {
3390
- if (signalDOMEvent(cm, "scrollCursorIntoView")) { return }
3391
-
3392
- var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
3393
- if (rect.top + box.top < 0) { doScroll = true; }
3394
- else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { doScroll = false; }
3395
- if (doScroll != null && !phantom) {
3396
- var scrollNode = elt("div", "\u200b", null, ("position: absolute;\n top: " + (rect.top - display.viewOffset - paddingTop(cm.display)) + "px;\n height: " + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + "px;\n left: " + (rect.left) + "px; width: " + (Math.max(2, rect.right - rect.left)) + "px;"));
3397
- cm.display.lineSpace.appendChild(scrollNode);
3398
- scrollNode.scrollIntoView(doScroll);
3399
- cm.display.lineSpace.removeChild(scrollNode);
3400
- }
3401
- }
3402
-
3403
- // Scroll a given position into view (immediately), verifying that
3404
- // it actually became visible (as line heights are accurately
3405
- // measured, the position of something may 'drift' during drawing).
3406
- function scrollPosIntoView(cm, pos, end, margin) {
3407
- if (margin == null) { margin = 0; }
3408
- var rect;
3409
- if (!cm.options.lineWrapping && pos == end) {
3410
- // Set pos and end to the cursor positions around the character pos sticks to
3411
- // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch
3412
- // If pos == Pos(_, 0, "before"), pos and end are unchanged
3413
- pos = pos.ch ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") : pos;
3414
- end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos;
3415
- }
3416
- for (var limit = 0; limit < 5; limit++) {
3417
- var changed = false;
3418
- var coords = cursorCoords(cm, pos);
3419
- var endCoords = !end || end == pos ? coords : cursorCoords(cm, end);
3420
- rect = {left: Math.min(coords.left, endCoords.left),
3421
- top: Math.min(coords.top, endCoords.top) - margin,
3422
- right: Math.max(coords.left, endCoords.left),
3423
- bottom: Math.max(coords.bottom, endCoords.bottom) + margin};
3424
- var scrollPos = calculateScrollPos(cm, rect);
3425
- var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft;
3426
- if (scrollPos.scrollTop != null) {
3427
- updateScrollTop(cm, scrollPos.scrollTop);
3428
- if (Math.abs(cm.doc.scrollTop - startTop) > 1) { changed = true; }
3429
- }
3430
- if (scrollPos.scrollLeft != null) {
3431
- setScrollLeft(cm, scrollPos.scrollLeft);
3432
- if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { changed = true; }
3433
- }
3434
- if (!changed) { break }
3435
- }
3436
- return rect
3437
- }
3438
-
3439
- // Scroll a given set of coordinates into view (immediately).
3440
- function scrollIntoView(cm, rect) {
3441
- var scrollPos = calculateScrollPos(cm, rect);
3442
- if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }
3443
- if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }
3444
- }
3445
-
3446
- // Calculate a new scroll position needed to scroll the given
3447
- // rectangle into view. Returns an object with scrollTop and
3448
- // scrollLeft properties. When these are undefined, the
3449
- // vertical/horizontal position does not need to be adjusted.
3450
- function calculateScrollPos(cm, rect) {
3451
- var display = cm.display, snapMargin = textHeight(cm.display);
3452
- if (rect.top < 0) { rect.top = 0; }
3453
- var screentop = cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop;
3454
- var screen = displayHeight(cm), result = {};
3455
- if (rect.bottom - rect.top > screen) { rect.bottom = rect.top + screen; }
3456
- var docBottom = cm.doc.height + paddingVert(display);
3457
- var atTop = rect.top < snapMargin, atBottom = rect.bottom > docBottom - snapMargin;
3458
- if (rect.top < screentop) {
3459
- result.scrollTop = atTop ? 0 : rect.top;
3460
- } else if (rect.bottom > screentop + screen) {
3461
- var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen);
3462
- if (newTop != screentop) { result.scrollTop = newTop; }
3463
- }
3464
-
3465
- var screenleft = cm.curOp && cm.curOp.scrollLeft != null ? cm.curOp.scrollLeft : display.scroller.scrollLeft;
3466
- var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0);
3467
- var tooWide = rect.right - rect.left > screenw;
3468
- if (tooWide) { rect.right = rect.left + screenw; }
3469
- if (rect.left < 10)
3470
- { result.scrollLeft = 0; }
3471
- else if (rect.left < screenleft)
3472
- { result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)); }
3473
- else if (rect.right > screenw + screenleft - 3)
3474
- { result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw; }
3475
- return result
3476
- }
3477
-
3478
- // Store a relative adjustment to the scroll position in the current
3479
- // operation (to be applied when the operation finishes).
3480
- function addToScrollTop(cm, top) {
3481
- if (top == null) { return }
3482
- resolveScrollToPos(cm);
3483
- cm.curOp.scrollTop = (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top;
3484
- }
3485
-
3486
- // Make sure that at the end of the operation the current cursor is
3487
- // shown.
3488
- function ensureCursorVisible(cm) {
3489
- resolveScrollToPos(cm);
3490
- var cur = cm.getCursor();
3491
- cm.curOp.scrollToPos = {from: cur, to: cur, margin: cm.options.cursorScrollMargin};
3492
- }
3493
-
3494
- function scrollToCoords(cm, x, y) {
3495
- if (x != null || y != null) { resolveScrollToPos(cm); }
3496
- if (x != null) { cm.curOp.scrollLeft = x; }
3497
- if (y != null) { cm.curOp.scrollTop = y; }
3498
- }
3499
-
3500
- function scrollToRange(cm, range$$1) {
3501
- resolveScrollToPos(cm);
3502
- cm.curOp.scrollToPos = range$$1;
3503
- }
3504
-
3505
- // When an operation has its scrollToPos property set, and another
3506
- // scroll action is applied before the end of the operation, this
3507
- // 'simulates' scrolling that position into view in a cheap way, so
3508
- // that the effect of intermediate scroll commands is not ignored.
3509
- function resolveScrollToPos(cm) {
3510
- var range$$1 = cm.curOp.scrollToPos;
3511
- if (range$$1) {
3512
- cm.curOp.scrollToPos = null;
3513
- var from = estimateCoords(cm, range$$1.from), to = estimateCoords(cm, range$$1.to);
3514
- scrollToCoordsRange(cm, from, to, range$$1.margin);
3515
- }
3516
- }
3517
-
3518
- function scrollToCoordsRange(cm, from, to, margin) {
3519
- var sPos = calculateScrollPos(cm, {
3520
- left: Math.min(from.left, to.left),
3521
- top: Math.min(from.top, to.top) - margin,
3522
- right: Math.max(from.right, to.right),
3523
- bottom: Math.max(from.bottom, to.bottom) + margin
3524
- });
3525
- scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);
3526
- }
3527
-
3528
- // Sync the scrollable area and scrollbars, ensure the viewport
3529
- // covers the visible area.
3530
- function updateScrollTop(cm, val) {
3531
- if (Math.abs(cm.doc.scrollTop - val) < 2) { return }
3532
- if (!gecko) { updateDisplaySimple(cm, {top: val}); }
3533
- setScrollTop(cm, val, true);
3534
- if (gecko) { updateDisplaySimple(cm); }
3535
- startWorker(cm, 100);
3536
- }
3537
-
3538
- function setScrollTop(cm, val, forceScroll) {
3539
- val = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val);
3540
- if (cm.display.scroller.scrollTop == val && !forceScroll) { return }
3541
- cm.doc.scrollTop = val;
3542
- cm.display.scrollbars.setScrollTop(val);
3543
- if (cm.display.scroller.scrollTop != val) { cm.display.scroller.scrollTop = val; }
3544
- }
3545
-
3546
- // Sync scroller and scrollbar, ensure the gutter elements are
3547
- // aligned.
3548
- function setScrollLeft(cm, val, isScroller, forceScroll) {
3549
- val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth);
3550
- if ((isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && !forceScroll) { return }
3551
- cm.doc.scrollLeft = val;
3552
- alignHorizontally(cm);
3553
- if (cm.display.scroller.scrollLeft != val) { cm.display.scroller.scrollLeft = val; }
3554
- cm.display.scrollbars.setScrollLeft(val);
3555
- }
3556
-
3557
- // SCROLLBARS
3558
-
3559
- // Prepare DOM reads needed to update the scrollbars. Done in one
3560
- // shot to minimize update/measure roundtrips.
3561
- function measureForScrollbars(cm) {
3562
- var d = cm.display, gutterW = d.gutters.offsetWidth;
3563
- var docH = Math.round(cm.doc.height + paddingVert(cm.display));
3564
- return {
3565
- clientHeight: d.scroller.clientHeight,
3566
- viewHeight: d.wrapper.clientHeight,
3567
- scrollWidth: d.scroller.scrollWidth, clientWidth: d.scroller.clientWidth,
3568
- viewWidth: d.wrapper.clientWidth,
3569
- barLeft: cm.options.fixedGutter ? gutterW : 0,
3570
- docHeight: docH,
3571
- scrollHeight: docH + scrollGap(cm) + d.barHeight,
3572
- nativeBarWidth: d.nativeBarWidth,
3573
- gutterWidth: gutterW
3574
- }
3575
- }
3576
-
3577
- var NativeScrollbars = function(place, scroll, cm) {
3578
- this.cm = cm;
3579
- var vert = this.vert = elt("div", [elt("div", null, null, "min-width: 1px")], "CodeMirror-vscrollbar");
3580
- var horiz = this.horiz = elt("div", [elt("div", null, null, "height: 100%; min-height: 1px")], "CodeMirror-hscrollbar");
3581
- vert.tabIndex = horiz.tabIndex = -1;
3582
- place(vert); place(horiz);
3583
-
3584
- on(vert, "scroll", function () {
3585
- if (vert.clientHeight) { scroll(vert.scrollTop, "vertical"); }
3586
- });
3587
- on(horiz, "scroll", function () {
3588
- if (horiz.clientWidth) { scroll(horiz.scrollLeft, "horizontal"); }
3589
- });
3590
-
3591
- this.checkedZeroWidth = false;
3592
- // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8).
3593
- if (ie && ie_version < 8) { this.horiz.style.minHeight = this.vert.style.minWidth = "18px"; }
3594
- };
3595
-
3596
- NativeScrollbars.prototype.update = function (measure) {
3597
- var needsH = measure.scrollWidth > measure.clientWidth + 1;
3598
- var needsV = measure.scrollHeight > measure.clientHeight + 1;
3599
- var sWidth = measure.nativeBarWidth;
3600
-
3601
- if (needsV) {
3602
- this.vert.style.display = "block";
3603
- this.vert.style.bottom = needsH ? sWidth + "px" : "0";
3604
- var totalHeight = measure.viewHeight - (needsH ? sWidth : 0);
3605
- // A bug in IE8 can cause this value to be negative, so guard it.
3606
- this.vert.firstChild.style.height =
3607
- Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px";
3608
- } else {
3609
- this.vert.style.display = "";
3610
- this.vert.firstChild.style.height = "0";
3611
- }
3612
-
3613
- if (needsH) {
3614
- this.horiz.style.display = "block";
3615
- this.horiz.style.right = needsV ? sWidth + "px" : "0";
3616
- this.horiz.style.left = measure.barLeft + "px";
3617
- var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0);
3618
- this.horiz.firstChild.style.width =
3619
- Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px";
3620
- } else {
3621
- this.horiz.style.display = "";
3622
- this.horiz.firstChild.style.width = "0";
3623
- }
3624
-
3625
- if (!this.checkedZeroWidth && measure.clientHeight > 0) {
3626
- if (sWidth == 0) { this.zeroWidthHack(); }
3627
- this.checkedZeroWidth = true;
3628
- }
3629
-
3630
- return {right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0}
3631
- };
3632
-
3633
- NativeScrollbars.prototype.setScrollLeft = function (pos) {
3634
- if (this.horiz.scrollLeft != pos) { this.horiz.scrollLeft = pos; }
3635
- if (this.disableHoriz) { this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz"); }
3636
- };
3637
-
3638
- NativeScrollbars.prototype.setScrollTop = function (pos) {
3639
- if (this.vert.scrollTop != pos) { this.vert.scrollTop = pos; }
3640
- if (this.disableVert) { this.enableZeroWidthBar(this.vert, this.disableVert, "vert"); }
3641
- };
3642
-
3643
- NativeScrollbars.prototype.zeroWidthHack = function () {
3644
- var w = mac && !mac_geMountainLion ? "12px" : "18px";
3645
- this.horiz.style.height = this.vert.style.width = w;
3646
- this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none";
3647
- this.disableHoriz = new Delayed;
3648
- this.disableVert = new Delayed;
3649
- };
3650
-
3651
- NativeScrollbars.prototype.enableZeroWidthBar = function (bar, delay, type) {
3652
- bar.style.pointerEvents = "auto";
3653
- function maybeDisable() {
3654
- // To find out whether the scrollbar is still visible, we
3655
- // check whether the element under the pixel in the bottom
3656
- // right corner of the scrollbar box is the scrollbar box
3657
- // itself (when the bar is still visible) or its filler child
3658
- // (when the bar is hidden). If it is still visible, we keep
3659
- // it enabled, if it's hidden, we disable pointer events.
3660
- var box = bar.getBoundingClientRect();
3661
- var elt$$1 = type == "vert" ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2)
3662
- : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1);
3663
- if (elt$$1 != bar) { bar.style.pointerEvents = "none"; }
3664
- else { delay.set(1000, maybeDisable); }
3665
- }
3666
- delay.set(1000, maybeDisable);
3667
- };
3668
-
3669
- NativeScrollbars.prototype.clear = function () {
3670
- var parent = this.horiz.parentNode;
3671
- parent.removeChild(this.horiz);
3672
- parent.removeChild(this.vert);
3673
- };
3674
-
3675
- var NullScrollbars = function () {};
3676
-
3677
- NullScrollbars.prototype.update = function () { return {bottom: 0, right: 0} };
3678
- NullScrollbars.prototype.setScrollLeft = function () {};
3679
- NullScrollbars.prototype.setScrollTop = function () {};
3680
- NullScrollbars.prototype.clear = function () {};
3681
-
3682
- function updateScrollbars(cm, measure) {
3683
- if (!measure) { measure = measureForScrollbars(cm); }
3684
- var startWidth = cm.display.barWidth, startHeight = cm.display.barHeight;
3685
- updateScrollbarsInner(cm, measure);
3686
- for (var i = 0; i < 4 && startWidth != cm.display.barWidth || startHeight != cm.display.barHeight; i++) {
3687
- if (startWidth != cm.display.barWidth && cm.options.lineWrapping)
3688
- { updateHeightsInViewport(cm); }
3689
- updateScrollbarsInner(cm, measureForScrollbars(cm));
3690
- startWidth = cm.display.barWidth; startHeight = cm.display.barHeight;
3691
- }
3692
- }
3693
-
3694
- // Re-synchronize the fake scrollbars with the actual size of the
3695
- // content.
3696
- function updateScrollbarsInner(cm, measure) {
3697
- var d = cm.display;
3698
- var sizes = d.scrollbars.update(measure);
3699
-
3700
- d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px";
3701
- d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px";
3702
- d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent";
3703
-
3704
- if (sizes.right && sizes.bottom) {
3705
- d.scrollbarFiller.style.display = "block";
3706
- d.scrollbarFiller.style.height = sizes.bottom + "px";
3707
- d.scrollbarFiller.style.width = sizes.right + "px";
3708
- } else { d.scrollbarFiller.style.display = ""; }
3709
- if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) {
3710
- d.gutterFiller.style.display = "block";
3711
- d.gutterFiller.style.height = sizes.bottom + "px";
3712
- d.gutterFiller.style.width = measure.gutterWidth + "px";
3713
- } else { d.gutterFiller.style.display = ""; }
3714
- }
3715
-
3716
- var scrollbarModel = {"native": NativeScrollbars, "null": NullScrollbars};
3717
-
3718
- function initScrollbars(cm) {
3719
- if (cm.display.scrollbars) {
3720
- cm.display.scrollbars.clear();
3721
- if (cm.display.scrollbars.addClass)
3722
- { rmClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
3723
- }
3724
-
3725
- cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle](function (node) {
3726
- cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller);
3727
- // Prevent clicks in the scrollbars from killing focus
3728
- on(node, "mousedown", function () {
3729
- if (cm.state.focused) { setTimeout(function () { return cm.display.input.focus(); }, 0); }
3730
- });
3731
- node.setAttribute("cm-not-content", "true");
3732
- }, function (pos, axis) {
3733
- if (axis == "horizontal") { setScrollLeft(cm, pos); }
3734
- else { updateScrollTop(cm, pos); }
3735
- }, cm);
3736
- if (cm.display.scrollbars.addClass)
3737
- { addClass(cm.display.wrapper, cm.display.scrollbars.addClass); }
3738
- }
3739
-
3740
- // Operations are used to wrap a series of changes to the editor
3741
- // state in such a way that each change won't have to update the
3742
- // cursor and display (which would be awkward, slow, and
3743
- // error-prone). Instead, display updates are batched and then all
3744
- // combined and executed at once.
3745
-
3746
- var nextOpId = 0;
3747
- // Start a new operation.
3748
- function startOperation(cm) {
3749
- cm.curOp = {
3750
- cm: cm,
3751
- viewChanged: false, // Flag that indicates that lines might need to be redrawn
3752
- startHeight: cm.doc.height, // Used to detect need to update scrollbar
3753
- forceUpdate: false, // Used to force a redraw
3754
- updateInput: 0, // Whether to reset the input textarea
3755
- typing: false, // Whether this reset should be careful to leave existing text (for compositing)
3756
- changeObjs: null, // Accumulated changes, for firing change events
3757
- cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on
3758
- cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already
3759
- selectionChanged: false, // Whether the selection needs to be redrawn
3760
- updateMaxLine: false, // Set when the widest line needs to be determined anew
3761
- scrollLeft: null, scrollTop: null, // Intermediate scroll position, not pushed to DOM yet
3762
- scrollToPos: null, // Used to scroll to a specific position
3763
- focus: false,
3764
- id: ++nextOpId // Unique ID
3765
- };
3766
- pushOperation(cm.curOp);
3767
- }
3768
-
3769
- // Finish an operation, updating the display and signalling delayed events
3770
- function endOperation(cm) {
3771
- var op = cm.curOp;
3772
- if (op) { finishOperation(op, function (group) {
3773
- for (var i = 0; i < group.ops.length; i++)
3774
- { group.ops[i].cm.curOp = null; }
3775
- endOperations(group);
3776
- }); }
3777
- }
3778
-
3779
- // The DOM updates done when an operation finishes are batched so
3780
- // that the minimum number of relayouts are required.
3781
- function endOperations(group) {
3782
- var ops = group.ops;
3783
- for (var i = 0; i < ops.length; i++) // Read DOM
3784
- { endOperation_R1(ops[i]); }
3785
- for (var i$1 = 0; i$1 < ops.length; i$1++) // Write DOM (maybe)
3786
- { endOperation_W1(ops[i$1]); }
3787
- for (var i$2 = 0; i$2 < ops.length; i$2++) // Read DOM
3788
- { endOperation_R2(ops[i$2]); }
3789
- for (var i$3 = 0; i$3 < ops.length; i$3++) // Write DOM (maybe)
3790
- { endOperation_W2(ops[i$3]); }
3791
- for (var i$4 = 0; i$4 < ops.length; i$4++) // Read DOM
3792
- { endOperation_finish(ops[i$4]); }
3793
- }
3794
-
3795
- function endOperation_R1(op) {
3796
- var cm = op.cm, display = cm.display;
3797
- maybeClipScrollbars(cm);
3798
- if (op.updateMaxLine) { findMaxLine(cm); }
3799
-
3800
- op.mustUpdate = op.viewChanged || op.forceUpdate || op.scrollTop != null ||
3801
- op.scrollToPos && (op.scrollToPos.from.line < display.viewFrom ||
3802
- op.scrollToPos.to.line >= display.viewTo) ||
3803
- display.maxLineChanged && cm.options.lineWrapping;
3804
- op.update = op.mustUpdate &&
3805
- new DisplayUpdate(cm, op.mustUpdate && {top: op.scrollTop, ensure: op.scrollToPos}, op.forceUpdate);
3806
- }
3807
-
3808
- function endOperation_W1(op) {
3809
- op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update);
3810
- }
3811
-
3812
- function endOperation_R2(op) {
3813
- var cm = op.cm, display = cm.display;
3814
- if (op.updatedDisplay) { updateHeightsInViewport(cm); }
3815
-
3816
- op.barMeasure = measureForScrollbars(cm);
3817
-
3818
- // If the max line changed since it was last measured, measure it,
3819
- // and ensure the document's width matches it.
3820
- // updateDisplay_W2 will use these properties to do the actual resizing
3821
- if (display.maxLineChanged && !cm.options.lineWrapping) {
3822
- op.adjustWidthTo = measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3;
3823
- cm.display.sizerWidth = op.adjustWidthTo;
3824
- op.barMeasure.scrollWidth =
3825
- Math.max(display.scroller.clientWidth, display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth);
3826
- op.maxScrollLeft = Math.max(0, display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm));
3827
- }
3828
-
3829
- if (op.updatedDisplay || op.selectionChanged)
3830
- { op.preparedSelection = display.input.prepareSelection(); }
3831
- }
3832
-
3833
- function endOperation_W2(op) {
3834
- var cm = op.cm;
3835
-
3836
- if (op.adjustWidthTo != null) {
3837
- cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
3838
- if (op.maxScrollLeft < cm.doc.scrollLeft)
3839
- { setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true); }
3840
- cm.display.maxLineChanged = false;
3841
- }
3842
-
3843
- var takeFocus = op.focus && op.focus == activeElt();
3844
- if (op.preparedSelection)
3845
- { cm.display.input.showSelection(op.preparedSelection, takeFocus); }
3846
- if (op.updatedDisplay || op.startHeight != cm.doc.height)
3847
- { updateScrollbars(cm, op.barMeasure); }
3848
- if (op.updatedDisplay)
3849
- { setDocumentHeight(cm, op.barMeasure); }
3850
-
3851
- if (op.selectionChanged) { restartBlink(cm); }
3852
-
3853
- if (cm.state.focused && op.updateInput)
3854
- { cm.display.input.reset(op.typing); }
3855
- if (takeFocus) { ensureFocus(op.cm); }
3856
- }
3857
-
3858
- function endOperation_finish(op) {
3859
- var cm = op.cm, display = cm.display, doc = cm.doc;
3860
-
3861
- if (op.updatedDisplay) { postUpdateDisplay(cm, op.update); }
3862
-
3863
- // Abort mouse wheel delta measurement, when scrolling explicitly
3864
- if (display.wheelStartX != null && (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
3865
- { display.wheelStartX = display.wheelStartY = null; }
3866
-
3867
- // Propagate the scroll position to the actual DOM scroller
3868
- if (op.scrollTop != null) { setScrollTop(cm, op.scrollTop, op.forceScroll); }
3869
-
3870
- if (op.scrollLeft != null) { setScrollLeft(cm, op.scrollLeft, true, true); }
3871
- // If we need to scroll a specific position into view, do so.
3872
- if (op.scrollToPos) {
3873
- var rect = scrollPosIntoView(cm, clipPos(doc, op.scrollToPos.from),
3874
- clipPos(doc, op.scrollToPos.to), op.scrollToPos.margin);
3875
- maybeScrollWindow(cm, rect);
3876
- }
3877
-
3878
- // Fire events for markers that are hidden/unidden by editing or
3879
- // undoing
3880
- var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers;
3881
- if (hidden) { for (var i = 0; i < hidden.length; ++i)
3882
- { if (!hidden[i].lines.length) { signal(hidden[i], "hide"); } } }
3883
- if (unhidden) { for (var i$1 = 0; i$1 < unhidden.length; ++i$1)
3884
- { if (unhidden[i$1].lines.length) { signal(unhidden[i$1], "unhide"); } } }
3885
-
3886
- if (display.wrapper.offsetHeight)
3887
- { doc.scrollTop = cm.display.scroller.scrollTop; }
3888
-
3889
- // Fire change events, and delayed event handlers
3890
- if (op.changeObjs)
3891
- { signal(cm, "changes", cm, op.changeObjs); }
3892
- if (op.update)
3893
- { op.update.finish(); }
3894
- }
3895
-
3896
- // Run the given function in an operation
3897
- function runInOp(cm, f) {
3898
- if (cm.curOp) { return f() }
3899
- startOperation(cm);
3900
- try { return f() }
3901
- finally { endOperation(cm); }
3902
- }
3903
- // Wraps a function in an operation. Returns the wrapped function.
3904
- function operation(cm, f) {
3905
- return function() {
3906
- if (cm.curOp) { return f.apply(cm, arguments) }
3907
- startOperation(cm);
3908
- try { return f.apply(cm, arguments) }
3909
- finally { endOperation(cm); }
3910
- }
3911
- }
3912
- // Used to add methods to editor and doc instances, wrapping them in
3913
- // operations.
3914
- function methodOp(f) {
3915
- return function() {
3916
- if (this.curOp) { return f.apply(this, arguments) }
3917
- startOperation(this);
3918
- try { return f.apply(this, arguments) }
3919
- finally { endOperation(this); }
3920
- }
3921
- }
3922
- function docMethodOp(f) {
3923
- return function() {
3924
- var cm = this.cm;
3925
- if (!cm || cm.curOp) { return f.apply(this, arguments) }
3926
- startOperation(cm);
3927
- try { return f.apply(this, arguments) }
3928
- finally { endOperation(cm); }
3929
- }
3930
- }
3931
-
3932
- // HIGHLIGHT WORKER
3933
-
3934
- function startWorker(cm, time) {
3935
- if (cm.doc.highlightFrontier < cm.display.viewTo)
3936
- { cm.state.highlight.set(time, bind(highlightWorker, cm)); }
3937
- }
3938
-
3939
- function highlightWorker(cm) {
3940
- var doc = cm.doc;
3941
- if (doc.highlightFrontier >= cm.display.viewTo) { return }
3942
- var end = +new Date + cm.options.workTime;
3943
- var context = getContextBefore(cm, doc.highlightFrontier);
3944
- var changedLines = [];
3945
-
3946
- doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function (line) {
3947
- if (context.line >= cm.display.viewFrom) { // Visible
3948
- var oldStyles = line.styles;
3949
- var resetState = line.text.length > cm.options.maxHighlightLength ? copyState(doc.mode, context.state) : null;
3950
- var highlighted = highlightLine(cm, line, context, true);
3951
- if (resetState) { context.state = resetState; }
3952
- line.styles = highlighted.styles;
3953
- var oldCls = line.styleClasses, newCls = highlighted.classes;
3954
- if (newCls) { line.styleClasses = newCls; }
3955
- else if (oldCls) { line.styleClasses = null; }
3956
- var ischange = !oldStyles || oldStyles.length != line.styles.length ||
3957
- oldCls != newCls && (!oldCls || !newCls || oldCls.bgClass != newCls.bgClass || oldCls.textClass != newCls.textClass);
3958
- for (var i = 0; !ischange && i < oldStyles.length; ++i) { ischange = oldStyles[i] != line.styles[i]; }
3959
- if (ischange) { changedLines.push(context.line); }
3960
- line.stateAfter = context.save();
3961
- context.nextLine();
3962
- } else {
3963
- if (line.text.length <= cm.options.maxHighlightLength)
3964
- { processLine(cm, line.text, context); }
3965
- line.stateAfter = context.line % 5 == 0 ? context.save() : null;
3966
- context.nextLine();
3967
- }
3968
- if (+new Date > end) {
3969
- startWorker(cm, cm.options.workDelay);
3970
- return true
3971
- }
3972
- });
3973
- doc.highlightFrontier = context.line;
3974
- doc.modeFrontier = Math.max(doc.modeFrontier, context.line);
3975
- if (changedLines.length) { runInOp(cm, function () {
3976
- for (var i = 0; i < changedLines.length; i++)
3977
- { regLineChange(cm, changedLines[i], "text"); }
3978
- }); }
3979
- }
3980
-
3981
- // DISPLAY DRAWING
3982
-
3983
- var DisplayUpdate = function(cm, viewport, force) {
3984
- var display = cm.display;
3985
-
3986
- this.viewport = viewport;
3987
- // Store some values that we'll need later (but don't want to force a relayout for)
3988
- this.visible = visibleLines(display, cm.doc, viewport);
3989
- this.editorIsHidden = !display.wrapper.offsetWidth;
3990
- this.wrapperHeight = display.wrapper.clientHeight;
3991
- this.wrapperWidth = display.wrapper.clientWidth;
3992
- this.oldDisplayWidth = displayWidth(cm);
3993
- this.force = force;
3994
- this.dims = getDimensions(cm);
3995
- this.events = [];
3996
- };
3997
-
3998
- DisplayUpdate.prototype.signal = function (emitter, type) {
3999
- if (hasHandler(emitter, type))
4000
- { this.events.push(arguments); }
4001
- };
4002
- DisplayUpdate.prototype.finish = function () {
4003
- var this$1 = this;
4004
-
4005
- for (var i = 0; i < this.events.length; i++)
4006
- { signal.apply(null, this$1.events[i]); }
4007
- };
4008
-
4009
- function maybeClipScrollbars(cm) {
4010
- var display = cm.display;
4011
- if (!display.scrollbarsClipped && display.scroller.offsetWidth) {
4012
- display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth;
4013
- display.heightForcer.style.height = scrollGap(cm) + "px";
4014
- display.sizer.style.marginBottom = -display.nativeBarWidth + "px";
4015
- display.sizer.style.borderRightWidth = scrollGap(cm) + "px";
4016
- display.scrollbarsClipped = true;
4017
- }
4018
- }
4019
-
4020
- function selectionSnapshot(cm) {
4021
- if (cm.hasFocus()) { return null }
4022
- var active = activeElt();
4023
- if (!active || !contains(cm.display.lineDiv, active)) { return null }
4024
- var result = {activeElt: active};
4025
- if (window.getSelection) {
4026
- var sel = window.getSelection();
4027
- if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) {
4028
- result.anchorNode = sel.anchorNode;
4029
- result.anchorOffset = sel.anchorOffset;
4030
- result.focusNode = sel.focusNode;
4031
- result.focusOffset = sel.focusOffset;
4032
- }
4033
- }
4034
- return result
4035
- }
4036
-
4037
- function restoreSelection(snapshot) {
4038
- if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { return }
4039
- snapshot.activeElt.focus();
4040
- if (snapshot.anchorNode && contains(document.body, snapshot.anchorNode) && contains(document.body, snapshot.focusNode)) {
4041
- var sel = window.getSelection(), range$$1 = document.createRange();
4042
- range$$1.setEnd(snapshot.anchorNode, snapshot.anchorOffset);
4043
- range$$1.collapse(false);
4044
- sel.removeAllRanges();
4045
- sel.addRange(range$$1);
4046
- sel.extend(snapshot.focusNode, snapshot.focusOffset);
4047
- }
4048
- }
4049
-
4050
- // Does the actual updating of the line display. Bails out
4051
- // (returning false) when there is nothing to be done and forced is
4052
- // false.
4053
- function updateDisplayIfNeeded(cm, update) {
4054
- var display = cm.display, doc = cm.doc;
4055
-
4056
- if (update.editorIsHidden) {
4057
- resetView(cm);
4058
- return false
4059
- }
4060
-
4061
- // Bail out if the visible area is already rendered and nothing changed.
4062
- if (!update.force &&
4063
- update.visible.from >= display.viewFrom && update.visible.to <= display.viewTo &&
4064
- (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) &&
4065
- display.renderedView == display.view && countDirtyView(cm) == 0)
4066
- { return false }
4067
-
4068
- if (maybeUpdateLineNumberWidth(cm)) {
4069
- resetView(cm);
4070
- update.dims = getDimensions(cm);
4071
- }
4072
-
4073
- // Compute a suitable new viewport (from & to)
4074
- var end = doc.first + doc.size;
4075
- var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first);
4076
- var to = Math.min(end, update.visible.to + cm.options.viewportMargin);
4077
- if (display.viewFrom < from && from - display.viewFrom < 20) { from = Math.max(doc.first, display.viewFrom); }
4078
- if (display.viewTo > to && display.viewTo - to < 20) { to = Math.min(end, display.viewTo); }
4079
- if (sawCollapsedSpans) {
4080
- from = visualLineNo(cm.doc, from);
4081
- to = visualLineEndNo(cm.doc, to);
4082
- }
4083
-
4084
- var different = from != display.viewFrom || to != display.viewTo ||
4085
- display.lastWrapHeight != update.wrapperHeight || display.lastWrapWidth != update.wrapperWidth;
4086
- adjustView(cm, from, to);
4087
-
4088
- display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom));
4089
- // Position the mover div to align with the current scroll position
4090
- cm.display.mover.style.top = display.viewOffset + "px";
4091
-
4092
- var toUpdate = countDirtyView(cm);
4093
- if (!different && toUpdate == 0 && !update.force && display.renderedView == display.view &&
4094
- (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo))
4095
- { return false }
4096
-
4097
- // For big changes, we hide the enclosing element during the
4098
- // update, since that speeds up the operations on most browsers.
4099
- var selSnapshot = selectionSnapshot(cm);
4100
- if (toUpdate > 4) { display.lineDiv.style.display = "none"; }
4101
- patchDisplay(cm, display.updateLineNumbers, update.dims);
4102
- if (toUpdate > 4) { display.lineDiv.style.display = ""; }
4103
- display.renderedView = display.view;
4104
- // There might have been a widget with a focused element that got
4105
- // hidden or updated, if so re-focus it.
4106
- restoreSelection(selSnapshot);
4107
-
4108
- // Prevent selection and cursors from interfering with the scroll
4109
- // width and height.
4110
- removeChildren(display.cursorDiv);
4111
- removeChildren(display.selectionDiv);
4112
- display.gutters.style.height = display.sizer.style.minHeight = 0;
4113
-
4114
- if (different) {
4115
- display.lastWrapHeight = update.wrapperHeight;
4116
- display.lastWrapWidth = update.wrapperWidth;
4117
- startWorker(cm, 400);
4118
- }
4119
-
4120
- display.updateLineNumbers = null;
4121
-
4122
- return true
4123
- }
4124
-
4125
- function postUpdateDisplay(cm, update) {
4126
- var viewport = update.viewport;
4127
-
4128
- for (var first = true;; first = false) {
4129
- if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) {
4130
- // Clip forced viewport to actual scrollable area.
4131
- if (viewport && viewport.top != null)
4132
- { viewport = {top: Math.min(cm.doc.height + paddingVert(cm.display) - displayHeight(cm), viewport.top)}; }
4133
- // Updated line heights might result in the drawn area not
4134
- // actually covering the viewport. Keep looping until it does.
4135
- update.visible = visibleLines(cm.display, cm.doc, viewport);
4136
- if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
4137
- { break }
4138
- }
4139
- if (!updateDisplayIfNeeded(cm, update)) { break }
4140
- updateHeightsInViewport(cm);
4141
- var barMeasure = measureForScrollbars(cm);
4142
- updateSelection(cm);
4143
- updateScrollbars(cm, barMeasure);
4144
- setDocumentHeight(cm, barMeasure);
4145
- update.force = false;
4146
- }
4147
-
4148
- update.signal(cm, "update", cm);
4149
- if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
4150
- update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
4151
- cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
4152
- }
4153
- }
4154
-
4155
- function updateDisplaySimple(cm, viewport) {
4156
- var update = new DisplayUpdate(cm, viewport);
4157
- if (updateDisplayIfNeeded(cm, update)) {
4158
- updateHeightsInViewport(cm);
4159
- postUpdateDisplay(cm, update);
4160
- var barMeasure = measureForScrollbars(cm);
4161
- updateSelection(cm);
4162
- updateScrollbars(cm, barMeasure);
4163
- setDocumentHeight(cm, barMeasure);
4164
- update.finish();
4165
- }
4166
- }
4167
-
4168
- // Sync the actual display DOM structure with display.view, removing
4169
- // nodes for lines that are no longer in view, and creating the ones
4170
- // that are not there yet, and updating the ones that are out of
4171
- // date.
4172
- function patchDisplay(cm, updateNumbersFrom, dims) {
4173
- var display = cm.display, lineNumbers = cm.options.lineNumbers;
4174
- var container = display.lineDiv, cur = container.firstChild;
4175
-
4176
- function rm(node) {
4177
- var next = node.nextSibling;
4178
- // Works around a throw-scroll bug in OS X Webkit
4179
- if (webkit && mac && cm.display.currentWheelTarget == node)
4180
- { node.style.display = "none"; }
4181
- else
4182
- { node.parentNode.removeChild(node); }
4183
- return next
4184
- }
4185
-
4186
- var view = display.view, lineN = display.viewFrom;
4187
- // Loop over the elements in the view, syncing cur (the DOM nodes
4188
- // in display.lineDiv) with the view as we go.
4189
- for (var i = 0; i < view.length; i++) {
4190
- var lineView = view[i];
4191
- if (lineView.hidden) ; else if (!lineView.node || lineView.node.parentNode != container) { // Not drawn yet
4192
- var node = buildLineElement(cm, lineView, lineN, dims);
4193
- container.insertBefore(node, cur);
4194
- } else { // Already drawn
4195
- while (cur != lineView.node) { cur = rm(cur); }
4196
- var updateNumber = lineNumbers && updateNumbersFrom != null &&
4197
- updateNumbersFrom <= lineN && lineView.lineNumber;
4198
- if (lineView.changes) {
4199
- if (indexOf(lineView.changes, "gutter") > -1) { updateNumber = false; }
4200
- updateLineForChanges(cm, lineView, lineN, dims);
4201
- }
4202
- if (updateNumber) {
4203
- removeChildren(lineView.lineNumber);
4204
- lineView.lineNumber.appendChild(document.createTextNode(lineNumberFor(cm.options, lineN)));
4205
- }
4206
- cur = lineView.node.nextSibling;
4207
- }
4208
- lineN += lineView.size;
4209
- }
4210
- while (cur) { cur = rm(cur); }
4211
- }
4212
-
4213
- function updateGutterSpace(display) {
4214
- var width = display.gutters.offsetWidth;
4215
- display.sizer.style.marginLeft = width + "px";
4216
- }
4217
-
4218
- function setDocumentHeight(cm, measure) {
4219
- cm.display.sizer.style.minHeight = measure.docHeight + "px";
4220
- cm.display.heightForcer.style.top = measure.docHeight + "px";
4221
- cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
4222
- }
4223
-
4224
- // Re-align line numbers and gutter marks to compensate for
4225
- // horizontal scrolling.
4226
- function alignHorizontally(cm) {
4227
- var display = cm.display, view = display.view;
4228
- if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { return }
4229
- var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft;
4230
- var gutterW = display.gutters.offsetWidth, left = comp + "px";
4231
- for (var i = 0; i < view.length; i++) { if (!view[i].hidden) {
4232
- if (cm.options.fixedGutter) {
4233
- if (view[i].gutter)
4234
- { view[i].gutter.style.left = left; }
4235
- if (view[i].gutterBackground)
4236
- { view[i].gutterBackground.style.left = left; }
4237
- }
4238
- var align = view[i].alignable;
4239
- if (align) { for (var j = 0; j < align.length; j++)
4240
- { align[j].style.left = left; } }
4241
- } }
4242
- if (cm.options.fixedGutter)
4243
- { display.gutters.style.left = (comp + gutterW) + "px"; }
4244
- }
4245
-
4246
- // Used to ensure that the line number gutter is still the right
4247
- // size for the current document size. Returns true when an update
4248
- // is needed.
4249
- function maybeUpdateLineNumberWidth(cm) {
4250
- if (!cm.options.lineNumbers) { return false }
4251
- var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display;
4252
- if (last.length != display.lineNumChars) {
4253
- var test = display.measure.appendChild(elt("div", [elt("div", last)],
4254
- "CodeMirror-linenumber CodeMirror-gutter-elt"));
4255
- var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW;
4256
- display.lineGutter.style.width = "";
4257
- display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1;
4258
- display.lineNumWidth = display.lineNumInnerWidth + padding;
4259
- display.lineNumChars = display.lineNumInnerWidth ? last.length : -1;
4260
- display.lineGutter.style.width = display.lineNumWidth + "px";
4261
- updateGutterSpace(cm.display);
4262
- return true
4263
- }
4264
- return false
4265
- }
4266
-
4267
- function getGutters(gutters, lineNumbers) {
4268
- var result = [], sawLineNumbers = false;
4269
- for (var i = 0; i < gutters.length; i++) {
4270
- var name = gutters[i], style = null;
4271
- if (typeof name != "string") { style = name.style; name = name.className; }
4272
- if (name == "CodeMirror-linenumbers") {
4273
- if (!lineNumbers) { continue }
4274
- else { sawLineNumbers = true; }
4275
- }
4276
- result.push({className: name, style: style});
4277
- }
4278
- if (lineNumbers && !sawLineNumbers) { result.push({className: "CodeMirror-linenumbers", style: null}); }
4279
- return result
4280
- }
4281
-
4282
- // Rebuild the gutter elements, ensure the margin to the left of the
4283
- // code matches their width.
4284
- function renderGutters(display) {
4285
- var gutters = display.gutters, specs = display.gutterSpecs;
4286
- removeChildren(gutters);
4287
- display.lineGutter = null;
4288
- for (var i = 0; i < specs.length; ++i) {
4289
- var ref = specs[i];
4290
- var className = ref.className;
4291
- var style = ref.style;
4292
- var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className));
4293
- if (style) { gElt.style.cssText = style; }
4294
- if (className == "CodeMirror-linenumbers") {
4295
- display.lineGutter = gElt;
4296
- gElt.style.width = (display.lineNumWidth || 1) + "px";
4297
- }
4298
- }
4299
- gutters.style.display = specs.length ? "" : "none";
4300
- updateGutterSpace(display);
4301
- }
4302
-
4303
- function updateGutters(cm) {
4304
- renderGutters(cm.display);
4305
- regChange(cm);
4306
- alignHorizontally(cm);
4307
- }
4308
-
4309
- // The display handles the DOM integration, both for input reading
4310
- // and content drawing. It holds references to DOM nodes and
4311
- // display-related state.
4312
-
4313
- function Display(place, doc, input, options) {
4314
- var d = this;
4315
- this.input = input;
4316
-
4317
- // Covers bottom-right square when both scrollbars are present.
4318
- d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler");
4319
- d.scrollbarFiller.setAttribute("cm-not-content", "true");
4320
- // Covers bottom of gutter when coverGutterNextToScrollbar is on
4321
- // and h scrollbar is present.
4322
- d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler");
4323
- d.gutterFiller.setAttribute("cm-not-content", "true");
4324
- // Will contain the actual code, positioned to cover the viewport.
4325
- d.lineDiv = eltP("div", null, "CodeMirror-code");
4326
- // Elements are added to these to represent selection and cursors.
4327
- d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1");
4328
- d.cursorDiv = elt("div", null, "CodeMirror-cursors");
4329
- // A visibility: hidden element used to find the size of things.
4330
- d.measure = elt("div", null, "CodeMirror-measure");
4331
- // When lines outside of the viewport are measured, they are drawn in this.
4332
- d.lineMeasure = elt("div", null, "CodeMirror-measure");
4333
- // Wraps everything that needs to exist inside the vertically-padded coordinate system
4334
- d.lineSpace = eltP("div", [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv],
4335
- null, "position: relative; outline: none");
4336
- var lines = eltP("div", [d.lineSpace], "CodeMirror-lines");
4337
- // Moved around its parent to cover visible view.
4338
- d.mover = elt("div", [lines], null, "position: relative");
4339
- // Set to the height of the document, allowing scrolling.
4340
- d.sizer = elt("div", [d.mover], "CodeMirror-sizer");
4341
- d.sizerWidth = null;
4342
- // Behavior of elts with overflow: auto and padding is
4343
- // inconsistent across browsers. This is used to ensure the
4344
- // scrollable area is big enough.
4345
- d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerGap + "px; width: 1px;");
4346
- // Will contain the gutters, if any.
4347
- d.gutters = elt("div", null, "CodeMirror-gutters");
4348
- d.lineGutter = null;
4349
- // Actual scrollable element.
4350
- d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll");
4351
- d.scroller.setAttribute("tabIndex", "-1");
4352
- // The element in which the editor lives.
4353
- d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror");
4354
-
4355
- // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported)
4356
- if (ie && ie_version < 8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; }
4357
- if (!webkit && !(gecko && mobile)) { d.scroller.draggable = true; }
4358
-
4359
- if (place) {
4360
- if (place.appendChild) { place.appendChild(d.wrapper); }
4361
- else { place(d.wrapper); }
4362
- }
4363
-
4364
- // Current rendered range (may be bigger than the view window).
4365
- d.viewFrom = d.viewTo = doc.first;
4366
- d.reportedViewFrom = d.reportedViewTo = doc.first;
4367
- // Information about the rendered lines.
4368
- d.view = [];
4369
- d.renderedView = null;
4370
- // Holds info about a single rendered line when it was rendered
4371
- // for measurement, while not in view.
4372
- d.externalMeasured = null;
4373
- // Empty space (in pixels) above the view
4374
- d.viewOffset = 0;
4375
- d.lastWrapHeight = d.lastWrapWidth = 0;
4376
- d.updateLineNumbers = null;
4377
-
4378
- d.nativeBarWidth = d.barHeight = d.barWidth = 0;
4379
- d.scrollbarsClipped = false;
4380
-
4381
- // Used to only resize the line number gutter when necessary (when
4382
- // the amount of lines crosses a boundary that makes its width change)
4383
- d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null;
4384
- // Set to true when a non-horizontal-scrolling line widget is
4385
- // added. As an optimization, line widget aligning is skipped when
4386
- // this is false.
4387
- d.alignWidgets = false;
4388
-
4389
- d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
4390
-
4391
- // Tracks the maximum line length so that the horizontal scrollbar
4392
- // can be kept static when scrolling.
4393
- d.maxLine = null;
4394
- d.maxLineLength = 0;
4395
- d.maxLineChanged = false;
4396
-
4397
- // Used for measuring wheel scrolling granularity
4398
- d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null;
4399
-
4400
- // True when shift is held down.
4401
- d.shift = false;
4402
-
4403
- // Used to track whether anything happened since the context menu
4404
- // was opened.
4405
- d.selForContextMenu = null;
4406
-
4407
- d.activeTouch = null;
4408
-
4409
- d.gutterSpecs = getGutters(options.gutters, options.lineNumbers);
4410
- renderGutters(d);
4411
-
4412
- input.init(d);
4413
- }
4414
-
4415
- // Since the delta values reported on mouse wheel events are
4416
- // unstandardized between browsers and even browser versions, and
4417
- // generally horribly unpredictable, this code starts by measuring
4418
- // the scroll effect that the first few mouse wheel events have,
4419
- // and, from that, detects the way it can convert deltas to pixel
4420
- // offsets afterwards.
4421
- //
4422
- // The reason we want to know the amount a wheel event will scroll
4423
- // is that it gives us a chance to update the display before the
4424
- // actual scrolling happens, reducing flickering.
4425
-
4426
- var wheelSamples = 0, wheelPixelsPerUnit = null;
4427
- // Fill in a browser-detected starting value on browsers where we
4428
- // know one. These don't have to be accurate -- the result of them
4429
- // being wrong would just be a slight flicker on the first wheel
4430
- // scroll (if it is large enough).
4431
- if (ie) { wheelPixelsPerUnit = -.53; }
4432
- else if (gecko) { wheelPixelsPerUnit = 15; }
4433
- else if (chrome) { wheelPixelsPerUnit = -.7; }
4434
- else if (safari) { wheelPixelsPerUnit = -1/3; }
4435
-
4436
- function wheelEventDelta(e) {
4437
- var dx = e.wheelDeltaX, dy = e.wheelDeltaY;
4438
- if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { dx = e.detail; }
4439
- if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { dy = e.detail; }
4440
- else if (dy == null) { dy = e.wheelDelta; }
4441
- return {x: dx, y: dy}
4442
- }
4443
- function wheelEventPixels(e) {
4444
- var delta = wheelEventDelta(e);
4445
- delta.x *= wheelPixelsPerUnit;
4446
- delta.y *= wheelPixelsPerUnit;
4447
- return delta
4448
- }
4449
-
4450
- function onScrollWheel(cm, e) {
4451
- var delta = wheelEventDelta(e), dx = delta.x, dy = delta.y;
4452
-
4453
- var display = cm.display, scroll = display.scroller;
4454
- // Quit if there's nothing to scroll here
4455
- var canScrollX = scroll.scrollWidth > scroll.clientWidth;
4456
- var canScrollY = scroll.scrollHeight > scroll.clientHeight;
4457
- if (!(dx && canScrollX || dy && canScrollY)) { return }
4458
-
4459
- // Webkit browsers on OS X abort momentum scrolls when the target
4460
- // of the scroll event is removed from the scrollable element.
4461
- // This hack (see related code in patchDisplay) makes sure the
4462
- // element is kept around.
4463
- if (dy && mac && webkit) {
4464
- outer: for (var cur = e.target, view = display.view; cur != scroll; cur = cur.parentNode) {
4465
- for (var i = 0; i < view.length; i++) {
4466
- if (view[i].node == cur) {
4467
- cm.display.currentWheelTarget = cur;
4468
- break outer
4469
- }
4470
- }
4471
- }
4472
- }
4473
-
4474
- // On some browsers, horizontal scrolling will cause redraws to
4475
- // happen before the gutter has been realigned, causing it to
4476
- // wriggle around in a most unseemly way. When we have an
4477
- // estimated pixels/delta value, we just handle horizontal
4478
- // scrolling entirely here. It'll be slightly off from native, but
4479
- // better than glitching out.
4480
- if (dx && !gecko && !presto && wheelPixelsPerUnit != null) {
4481
- if (dy && canScrollY)
4482
- { updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)); }
4483
- setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit));
4484
- // Only prevent default scrolling if vertical scrolling is
4485
- // actually possible. Otherwise, it causes vertical scroll
4486
- // jitter on OSX trackpads when deltaX is small and deltaY
4487
- // is large (issue #3579)
4488
- if (!dy || (dy && canScrollY))
4489
- { e_preventDefault(e); }
4490
- display.wheelStartX = null; // Abort measurement, if in progress
4491
- return
4492
- }
4493
-
4494
- // 'Project' the visible viewport to cover the area that is being
4495
- // scrolled into view (if we know enough to estimate it).
4496
- if (dy && wheelPixelsPerUnit != null) {
4497
- var pixels = dy * wheelPixelsPerUnit;
4498
- var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight;
4499
- if (pixels < 0) { top = Math.max(0, top + pixels - 50); }
4500
- else { bot = Math.min(cm.doc.height, bot + pixels + 50); }
4501
- updateDisplaySimple(cm, {top: top, bottom: bot});
4502
- }
4503
-
4504
- if (wheelSamples < 20) {
4505
- if (display.wheelStartX == null) {
4506
- display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop;
4507
- display.wheelDX = dx; display.wheelDY = dy;
4508
- setTimeout(function () {
4509
- if (display.wheelStartX == null) { return }
4510
- var movedX = scroll.scrollLeft - display.wheelStartX;
4511
- var movedY = scroll.scrollTop - display.wheelStartY;
4512
- var sample = (movedY && display.wheelDY && movedY / display.wheelDY) ||
4513
- (movedX && display.wheelDX && movedX / display.wheelDX);
4514
- display.wheelStartX = display.wheelStartY = null;
4515
- if (!sample) { return }
4516
- wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1);
4517
- ++wheelSamples;
4518
- }, 200);
4519
- } else {
4520
- display.wheelDX += dx; display.wheelDY += dy;
4521
- }
4522
- }
4523
- }
4524
-
4525
- // Selection objects are immutable. A new one is created every time
4526
- // the selection changes. A selection is one or more non-overlapping
4527
- // (and non-touching) ranges, sorted, and an integer that indicates
4528
- // which one is the primary selection (the one that's scrolled into
4529
- // view, that getCursor returns, etc).
4530
- var Selection = function(ranges, primIndex) {
4531
- this.ranges = ranges;
4532
- this.primIndex = primIndex;
4533
- };
4534
-
4535
- Selection.prototype.primary = function () { return this.ranges[this.primIndex] };
4536
-
4537
- Selection.prototype.equals = function (other) {
4538
- var this$1 = this;
4539
-
4540
- if (other == this) { return true }
4541
- if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { return false }
4542
- for (var i = 0; i < this.ranges.length; i++) {
4543
- var here = this$1.ranges[i], there = other.ranges[i];
4544
- if (!equalCursorPos(here.anchor, there.anchor) || !equalCursorPos(here.head, there.head)) { return false }
4545
- }
4546
- return true
4547
- };
4548
-
4549
- Selection.prototype.deepCopy = function () {
4550
- var this$1 = this;
4551
-
4552
- var out = [];
4553
- for (var i = 0; i < this.ranges.length; i++)
4554
- { out[i] = new Range(copyPos(this$1.ranges[i].anchor), copyPos(this$1.ranges[i].head)); }
4555
- return new Selection(out, this.primIndex)
4556
- };
4557
-
4558
- Selection.prototype.somethingSelected = function () {
4559
- var this$1 = this;
4560
-
4561
- for (var i = 0; i < this.ranges.length; i++)
4562
- { if (!this$1.ranges[i].empty()) { return true } }
4563
- return false
4564
- };
4565
-
4566
- Selection.prototype.contains = function (pos, end) {
4567
- var this$1 = this;
4568
-
4569
- if (!end) { end = pos; }
4570
- for (var i = 0; i < this.ranges.length; i++) {
4571
- var range = this$1.ranges[i];
4572
- if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0)
4573
- { return i }
4574
- }
4575
- return -1
4576
- };
4577
-
4578
- var Range = function(anchor, head) {
4579
- this.anchor = anchor; this.head = head;
4580
- };
4581
-
4582
- Range.prototype.from = function () { return minPos(this.anchor, this.head) };
4583
- Range.prototype.to = function () { return maxPos(this.anchor, this.head) };
4584
- Range.prototype.empty = function () { return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch };
4585
-
4586
- // Take an unsorted, potentially overlapping set of ranges, and
4587
- // build a selection out of it. 'Consumes' ranges array (modifying
4588
- // it).
4589
- function normalizeSelection(cm, ranges, primIndex) {
4590
- var mayTouch = cm && cm.options.selectionsMayTouch;
4591
- var prim = ranges[primIndex];
4592
- ranges.sort(function (a, b) { return cmp(a.from(), b.from()); });
4593
- primIndex = indexOf(ranges, prim);
4594
- for (var i = 1; i < ranges.length; i++) {
4595
- var cur = ranges[i], prev = ranges[i - 1];
4596
- var diff = cmp(prev.to(), cur.from());
4597
- if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) {
4598
- var from = minPos(prev.from(), cur.from()), to = maxPos(prev.to(), cur.to());
4599
- var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head;
4600
- if (i <= primIndex) { --primIndex; }
4601
- ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to));
4602
- }
4603
- }
4604
- return new Selection(ranges, primIndex)
4605
- }
4606
-
4607
- function simpleSelection(anchor, head) {
4608
- return new Selection([new Range(anchor, head || anchor)], 0)
4609
- }
4610
-
4611
- // Compute the position of the end of a change (its 'to' property
4612
- // refers to the pre-change end).
4613
- function changeEnd(change) {
4614
- if (!change.text) { return change.to }
4615
- return Pos(change.from.line + change.text.length - 1,
4616
- lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0))
4617
- }
4618
-
4619
- // Adjust a position to refer to the post-change position of the
4620
- // same text, or the end of the change if the change covers it.
4621
- function adjustForChange(pos, change) {
4622
- if (cmp(pos, change.from) < 0) { return pos }
4623
- if (cmp(pos, change.to) <= 0) { return changeEnd(change) }
4624
-
4625
- var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch;
4626
- if (pos.line == change.to.line) { ch += changeEnd(change).ch - change.to.ch; }
4627
- return Pos(line, ch)
4628
- }
4629
-
4630
- function computeSelAfterChange(doc, change) {
4631
- var out = [];
4632
- for (var i = 0; i < doc.sel.ranges.length; i++) {
4633
- var range = doc.sel.ranges[i];
4634
- out.push(new Range(adjustForChange(range.anchor, change),
4635
- adjustForChange(range.head, change)));
4636
- }
4637
- return normalizeSelection(doc.cm, out, doc.sel.primIndex)
4638
- }
4639
-
4640
- function offsetPos(pos, old, nw) {
4641
- if (pos.line == old.line)
4642
- { return Pos(nw.line, pos.ch - old.ch + nw.ch) }
4643
- else
4644
- { return Pos(nw.line + (pos.line - old.line), pos.ch) }
4645
- }
4646
-
4647
- // Used by replaceSelections to allow moving the selection to the
4648
- // start or around the replaced test. Hint may be "start" or "around".
4649
- function computeReplacedSel(doc, changes, hint) {
4650
- var out = [];
4651
- var oldPrev = Pos(doc.first, 0), newPrev = oldPrev;
4652
- for (var i = 0; i < changes.length; i++) {
4653
- var change = changes[i];
4654
- var from = offsetPos(change.from, oldPrev, newPrev);
4655
- var to = offsetPos(changeEnd(change), oldPrev, newPrev);
4656
- oldPrev = change.to;
4657
- newPrev = to;
4658
- if (hint == "around") {
4659
- var range = doc.sel.ranges[i], inv = cmp(range.head, range.anchor) < 0;
4660
- out[i] = new Range(inv ? to : from, inv ? from : to);
4661
- } else {
4662
- out[i] = new Range(from, from);
4663
- }
4664
- }
4665
- return new Selection(out, doc.sel.primIndex)
4666
- }
4667
-
4668
- // Used to get the editor into a consistent state again when options change.
4669
-
4670
- function loadMode(cm) {
4671
- cm.doc.mode = getMode(cm.options, cm.doc.modeOption);
4672
- resetModeState(cm);
4673
- }
4674
-
4675
- function resetModeState(cm) {
4676
- cm.doc.iter(function (line) {
4677
- if (line.stateAfter) { line.stateAfter = null; }
4678
- if (line.styles) { line.styles = null; }
4679
- });
4680
- cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first;
4681
- startWorker(cm, 100);
4682
- cm.state.modeGen++;
4683
- if (cm.curOp) { regChange(cm); }
4684
- }
4685
-
4686
- // DOCUMENT DATA STRUCTURE
4687
-
4688
- // By default, updates that start and end at the beginning of a line
4689
- // are treated specially, in order to make the association of line
4690
- // widgets and marker elements with the text behave more intuitive.
4691
- function isWholeLineUpdate(doc, change) {
4692
- return change.from.ch == 0 && change.to.ch == 0 && lst(change.text) == "" &&
4693
- (!doc.cm || doc.cm.options.wholeLineUpdateBefore)
4694
- }
4695
-
4696
- // Perform a change on the document data structure.
4697
- function updateDoc(doc, change, markedSpans, estimateHeight$$1) {
4698
- function spansFor(n) {return markedSpans ? markedSpans[n] : null}
4699
- function update(line, text, spans) {
4700
- updateLine(line, text, spans, estimateHeight$$1);
4701
- signalLater(line, "change", line, change);
4702
- }
4703
- function linesFor(start, end) {
4704
- var result = [];
4705
- for (var i = start; i < end; ++i)
4706
- { result.push(new Line(text[i], spansFor(i), estimateHeight$$1)); }
4707
- return result
4708
- }
4709
-
4710
- var from = change.from, to = change.to, text = change.text;
4711
- var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line);
4712
- var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line;
4713
-
4714
- // Adjust the line structure
4715
- if (change.full) {
4716
- doc.insert(0, linesFor(0, text.length));
4717
- doc.remove(text.length, doc.size - text.length);
4718
- } else if (isWholeLineUpdate(doc, change)) {
4719
- // This is a whole-line replace. Treated specially to make
4720
- // sure line objects move the way they are supposed to.
4721
- var added = linesFor(0, text.length - 1);
4722
- update(lastLine, lastLine.text, lastSpans);
4723
- if (nlines) { doc.remove(from.line, nlines); }
4724
- if (added.length) { doc.insert(from.line, added); }
4725
- } else if (firstLine == lastLine) {
4726
- if (text.length == 1) {
4727
- update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans);
4728
- } else {
4729
- var added$1 = linesFor(1, text.length - 1);
4730
- added$1.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight$$1));
4731
- update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
4732
- doc.insert(from.line + 1, added$1);
4733
- }
4734
- } else if (text.length == 1) {
4735
- update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0));
4736
- doc.remove(from.line + 1, nlines);
4737
- } else {
4738
- update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0));
4739
- update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans);
4740
- var added$2 = linesFor(1, text.length - 1);
4741
- if (nlines > 1) { doc.remove(from.line + 1, nlines - 1); }
4742
- doc.insert(from.line + 1, added$2);
4743
- }
4744
-
4745
- signalLater(doc, "change", doc, change);
4746
- }
4747
-
4748
- // Call f for all linked documents.
4749
- function linkedDocs(doc, f, sharedHistOnly) {
4750
- function propagate(doc, skip, sharedHist) {
4751
- if (doc.linked) { for (var i = 0; i < doc.linked.length; ++i) {
4752
- var rel = doc.linked[i];
4753
- if (rel.doc == skip) { continue }
4754
- var shared = sharedHist && rel.sharedHist;
4755
- if (sharedHistOnly && !shared) { continue }
4756
- f(rel.doc, shared);
4757
- propagate(rel.doc, doc, shared);
4758
- } }
4759
- }
4760
- propagate(doc, null, true);
4761
- }
4762
-
4763
- // Attach a document to an editor.
4764
- function attachDoc(cm, doc) {
4765
- if (doc.cm) { throw new Error("This document is already in use.") }
4766
- cm.doc = doc;
4767
- doc.cm = cm;
4768
- estimateLineHeights(cm);
4769
- loadMode(cm);
4770
- setDirectionClass(cm);
4771
- if (!cm.options.lineWrapping) { findMaxLine(cm); }
4772
- cm.options.mode = doc.modeOption;
4773
- regChange(cm);
4774
- }
4775
-
4776
- function setDirectionClass(cm) {
4777
- (cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl");
4778
- }
4779
-
4780
- function directionChanged(cm) {
4781
- runInOp(cm, function () {
4782
- setDirectionClass(cm);
4783
- regChange(cm);
4784
- });
4785
- }
4786
-
4787
- function History(startGen) {
4788
- // Arrays of change events and selections. Doing something adds an
4789
- // event to done and clears undo. Undoing moves events from done
4790
- // to undone, redoing moves them in the other direction.
4791
- this.done = []; this.undone = [];
4792
- this.undoDepth = Infinity;
4793
- // Used to track when changes can be merged into a single undo
4794
- // event
4795
- this.lastModTime = this.lastSelTime = 0;
4796
- this.lastOp = this.lastSelOp = null;
4797
- this.lastOrigin = this.lastSelOrigin = null;
4798
- // Used by the isClean() method
4799
- this.generation = this.maxGeneration = startGen || 1;
4800
- }
4801
-
4802
- // Create a history change event from an updateDoc-style change
4803
- // object.
4804
- function historyChangeFromChange(doc, change) {
4805
- var histChange = {from: copyPos(change.from), to: changeEnd(change), text: getBetween(doc, change.from, change.to)};
4806
- attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);
4807
- linkedDocs(doc, function (doc) { return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); }, true);
4808
- return histChange
4809
- }
4810
-
4811
- // Pop all selection events off the end of a history array. Stop at
4812
- // a change event.
4813
- function clearSelectionEvents(array) {
4814
- while (array.length) {
4815
- var last = lst(array);
4816
- if (last.ranges) { array.pop(); }
4817
- else { break }
4818
- }
4819
- }
4820
-
4821
- // Find the top change event in the history. Pop off selection
4822
- // events that are in the way.
4823
- function lastChangeEvent(hist, force) {
4824
- if (force) {
4825
- clearSelectionEvents(hist.done);
4826
- return lst(hist.done)
4827
- } else if (hist.done.length && !lst(hist.done).ranges) {
4828
- return lst(hist.done)
4829
- } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) {
4830
- hist.done.pop();
4831
- return lst(hist.done)
4832
- }
4833
- }
4834
-
4835
- // Register a change in the history. Merges changes that are within
4836
- // a single operation, or are close together with an origin that
4837
- // allows merging (starting with "+") into a single event.
4838
- function addChangeToHistory(doc, change, selAfter, opId) {
4839
- var hist = doc.history;
4840
- hist.undone.length = 0;
4841
- var time = +new Date, cur;
4842
- var last;
4843
-
4844
- if ((hist.lastOp == opId ||
4845
- hist.lastOrigin == change.origin && change.origin &&
4846
- ((change.origin.charAt(0) == "+" && hist.lastModTime > time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) ||
4847
- change.origin.charAt(0) == "*")) &&
4848
- (cur = lastChangeEvent(hist, hist.lastOp == opId))) {
4849
- // Merge this change into the last event
4850
- last = lst(cur.changes);
4851
- if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) {
4852
- // Optimized case for simple insertion -- don't want to add
4853
- // new changesets for every character typed
4854
- last.to = changeEnd(change);
4855
- } else {
4856
- // Add new sub-event
4857
- cur.changes.push(historyChangeFromChange(doc, change));
4858
- }
4859
- } else {
4860
- // Can not be merged, start a new event.
4861
- var before = lst(hist.done);
4862
- if (!before || !before.ranges)
4863
- { pushSelectionToHistory(doc.sel, hist.done); }
4864
- cur = {changes: [historyChangeFromChange(doc, change)],
4865
- generation: hist.generation};
4866
- hist.done.push(cur);
4867
- while (hist.done.length > hist.undoDepth) {
4868
- hist.done.shift();
4869
- if (!hist.done[0].ranges) { hist.done.shift(); }
4870
- }
4871
- }
4872
- hist.done.push(selAfter);
4873
- hist.generation = ++hist.maxGeneration;
4874
- hist.lastModTime = hist.lastSelTime = time;
4875
- hist.lastOp = hist.lastSelOp = opId;
4876
- hist.lastOrigin = hist.lastSelOrigin = change.origin;
4877
-
4878
- if (!last) { signal(doc, "historyAdded"); }
4879
- }
4880
-
4881
- function selectionEventCanBeMerged(doc, origin, prev, sel) {
4882
- var ch = origin.charAt(0);
4883
- return ch == "*" ||
4884
- ch == "+" &&
4885
- prev.ranges.length == sel.ranges.length &&
4886
- prev.somethingSelected() == sel.somethingSelected() &&
4887
- new Date - doc.history.lastSelTime <= (doc.cm ? doc.cm.options.historyEventDelay : 500)
4888
- }
4889
-
4890
- // Called whenever the selection changes, sets the new selection as
4891
- // the pending selection in the history, and pushes the old pending
4892
- // selection into the 'done' array when it was significantly
4893
- // different (in number of selected ranges, emptiness, or time).
4894
- function addSelectionToHistory(doc, sel, opId, options) {
4895
- var hist = doc.history, origin = options && options.origin;
4896
-
4897
- // A new event is started when the previous origin does not match
4898
- // the current, or the origins don't allow matching. Origins
4899
- // starting with * are always merged, those starting with + are
4900
- // merged when similar and close together in time.
4901
- if (opId == hist.lastSelOp ||
4902
- (origin && hist.lastSelOrigin == origin &&
4903
- (hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin ||
4904
- selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))))
4905
- { hist.done[hist.done.length - 1] = sel; }
4906
- else
4907
- { pushSelectionToHistory(sel, hist.done); }
4908
-
4909
- hist.lastSelTime = +new Date;
4910
- hist.lastSelOrigin = origin;
4911
- hist.lastSelOp = opId;
4912
- if (options && options.clearRedo !== false)
4913
- { clearSelectionEvents(hist.undone); }
4914
- }
4915
-
4916
- function pushSelectionToHistory(sel, dest) {
4917
- var top = lst(dest);
4918
- if (!(top && top.ranges && top.equals(sel)))
4919
- { dest.push(sel); }
4920
- }
4921
-
4922
- // Used to store marked span information in the history.
4923
- function attachLocalSpans(doc, change, from, to) {
4924
- var existing = change["spans_" + doc.id], n = 0;
4925
- doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function (line) {
4926
- if (line.markedSpans)
4927
- { (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; }
4928
- ++n;
4929
- });
4930
- }
4931
-
4932
- // When un/re-doing restores text containing marked spans, those
4933
- // that have been explicitly cleared should not be restored.
4934
- function removeClearedSpans(spans) {
4935
- if (!spans) { return null }
4936
- var out;
4937
- for (var i = 0; i < spans.length; ++i) {
4938
- if (spans[i].marker.explicitlyCleared) { if (!out) { out = spans.slice(0, i); } }
4939
- else if (out) { out.push(spans[i]); }
4940
- }
4941
- return !out ? spans : out.length ? out : null
4942
- }
4943
-
4944
- // Retrieve and filter the old marked spans stored in a change event.
4945
- function getOldSpans(doc, change) {
4946
- var found = change["spans_" + doc.id];
4947
- if (!found) { return null }
4948
- var nw = [];
4949
- for (var i = 0; i < change.text.length; ++i)
4950
- { nw.push(removeClearedSpans(found[i])); }
4951
- return nw
4952
- }
4953
-
4954
- // Used for un/re-doing changes from the history. Combines the
4955
- // result of computing the existing spans with the set of spans that
4956
- // existed in the history (so that deleting around a span and then
4957
- // undoing brings back the span).
4958
- function mergeOldSpans(doc, change) {
4959
- var old = getOldSpans(doc, change);
4960
- var stretched = stretchSpansOverChange(doc, change);
4961
- if (!old) { return stretched }
4962
- if (!stretched) { return old }
4963
-
4964
- for (var i = 0; i < old.length; ++i) {
4965
- var oldCur = old[i], stretchCur = stretched[i];
4966
- if (oldCur && stretchCur) {
4967
- spans: for (var j = 0; j < stretchCur.length; ++j) {
4968
- var span = stretchCur[j];
4969
- for (var k = 0; k < oldCur.length; ++k)
4970
- { if (oldCur[k].marker == span.marker) { continue spans } }
4971
- oldCur.push(span);
4972
- }
4973
- } else if (stretchCur) {
4974
- old[i] = stretchCur;
4975
- }
4976
- }
4977
- return old
4978
- }
4979
-
4980
- // Used both to provide a JSON-safe object in .getHistory, and, when
4981
- // detaching a document, to split the history in two
4982
- function copyHistoryArray(events, newGroup, instantiateSel) {
4983
- var copy = [];
4984
- for (var i = 0; i < events.length; ++i) {
4985
- var event = events[i];
4986
- if (event.ranges) {
4987
- copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event);
4988
- continue
4989
- }
4990
- var changes = event.changes, newChanges = [];
4991
- copy.push({changes: newChanges});
4992
- for (var j = 0; j < changes.length; ++j) {
4993
- var change = changes[j], m = (void 0);
4994
- newChanges.push({from: change.from, to: change.to, text: change.text});
4995
- if (newGroup) { for (var prop in change) { if (m = prop.match(/^spans_(\d+)$/)) {
4996
- if (indexOf(newGroup, Number(m[1])) > -1) {
4997
- lst(newChanges)[prop] = change[prop];
4998
- delete change[prop];
4999
- }
5000
- } } }
5001
- }
5002
- }
5003
- return copy
5004
- }
5005
-
5006
- // The 'scroll' parameter given to many of these indicated whether
5007
- // the new cursor position should be scrolled into view after
5008
- // modifying the selection.
5009
-
5010
- // If shift is held or the extend flag is set, extends a range to
5011
- // include a given position (and optionally a second position).
5012
- // Otherwise, simply returns the range between the given positions.
5013
- // Used for cursor motion and such.
5014
- function extendRange(range, head, other, extend) {
5015
- if (extend) {
5016
- var anchor = range.anchor;
5017
- if (other) {
5018
- var posBefore = cmp(head, anchor) < 0;
5019
- if (posBefore != (cmp(other, anchor) < 0)) {
5020
- anchor = head;
5021
- head = other;
5022
- } else if (posBefore != (cmp(head, other) < 0)) {
5023
- head = other;
5024
- }
5025
- }
5026
- return new Range(anchor, head)
5027
- } else {
5028
- return new Range(other || head, head)
5029
- }
5030
- }
5031
-
5032
- // Extend the primary selection range, discard the rest.
5033
- function extendSelection(doc, head, other, options, extend) {
5034
- if (extend == null) { extend = doc.cm && (doc.cm.display.shift || doc.extend); }
5035
- setSelection(doc, new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), options);
5036
- }
5037
-
5038
- // Extend all selections (pos is an array of selections with length
5039
- // equal the number of selections)
5040
- function extendSelections(doc, heads, options) {
5041
- var out = [];
5042
- var extend = doc.cm && (doc.cm.display.shift || doc.extend);
5043
- for (var i = 0; i < doc.sel.ranges.length; i++)
5044
- { out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend); }
5045
- var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex);
5046
- setSelection(doc, newSel, options);
5047
- }
5048
-
5049
- // Updates a single range in the selection.
5050
- function replaceOneSelection(doc, i, range, options) {
5051
- var ranges = doc.sel.ranges.slice(0);
5052
- ranges[i] = range;
5053
- setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options);
5054
- }
5055
-
5056
- // Reset the selection to a single range.
5057
- function setSimpleSelection(doc, anchor, head, options) {
5058
- setSelection(doc, simpleSelection(anchor, head), options);
5059
- }
5060
-
5061
- // Give beforeSelectionChange handlers a change to influence a
5062
- // selection update.
5063
- function filterSelectionChange(doc, sel, options) {
5064
- var obj = {
5065
- ranges: sel.ranges,
5066
- update: function(ranges) {
5067
- var this$1 = this;
5068
-
5069
- this.ranges = [];
5070
- for (var i = 0; i < ranges.length; i++)
5071
- { this$1.ranges[i] = new Range(clipPos(doc, ranges[i].anchor),
5072
- clipPos(doc, ranges[i].head)); }
5073
- },
5074
- origin: options && options.origin
5075
- };
5076
- signal(doc, "beforeSelectionChange", doc, obj);
5077
- if (doc.cm) { signal(doc.cm, "beforeSelectionChange", doc.cm, obj); }
5078
- if (obj.ranges != sel.ranges) { return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) }
5079
- else { return sel }
5080
- }
5081
-
5082
- function setSelectionReplaceHistory(doc, sel, options) {
5083
- var done = doc.history.done, last = lst(done);
5084
- if (last && last.ranges) {
5085
- done[done.length - 1] = sel;
5086
- setSelectionNoUndo(doc, sel, options);
5087
- } else {
5088
- setSelection(doc, sel, options);
5089
- }
5090
- }
5091
-
5092
- // Set a new selection.
5093
- function setSelection(doc, sel, options) {
5094
- setSelectionNoUndo(doc, sel, options);
5095
- addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options);
5096
- }
5097
-
5098
- function setSelectionNoUndo(doc, sel, options) {
5099
- if (hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange"))
5100
- { sel = filterSelectionChange(doc, sel, options); }
5101
-
5102
- var bias = options && options.bias ||
5103
- (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1);
5104
- setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
5105
-
5106
- if (!(options && options.scroll === false) && doc.cm)
5107
- { ensureCursorVisible(doc.cm); }
5108
- }
5109
-
5110
- function setSelectionInner(doc, sel) {
5111
- if (sel.equals(doc.sel)) { return }
5112
-
5113
- doc.sel = sel;
5114
-
5115
- if (doc.cm) {
5116
- doc.cm.curOp.updateInput = 1;
5117
- doc.cm.curOp.selectionChanged = true;
5118
- signalCursorActivity(doc.cm);
5119
- }
5120
- signalLater(doc, "cursorActivity", doc);
5121
- }
5122
-
5123
- // Verify that the selection does not partially select any atomic
5124
- // marked ranges.
5125
- function reCheckSelection(doc) {
5126
- setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false));
5127
- }
5128
-
5129
- // Return a selection that does not partially select any atomic
5130
- // ranges.
5131
- function skipAtomicInSelection(doc, sel, bias, mayClear) {
5132
- var out;
5133
- for (var i = 0; i < sel.ranges.length; i++) {
5134
- var range = sel.ranges[i];
5135
- var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i];
5136
- var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear);
5137
- var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear);
5138
- if (out || newAnchor != range.anchor || newHead != range.head) {
5139
- if (!out) { out = sel.ranges.slice(0, i); }
5140
- out[i] = new Range(newAnchor, newHead);
5141
- }
5142
- }
5143
- return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel
5144
- }
5145
-
5146
- function skipAtomicInner(doc, pos, oldPos, dir, mayClear) {
5147
- var line = getLine(doc, pos.line);
5148
- if (line.markedSpans) { for (var i = 0; i < line.markedSpans.length; ++i) {
5149
- var sp = line.markedSpans[i], m = sp.marker;
5150
- if ((sp.from == null || (m.inclusiveLeft ? sp.from <= pos.ch : sp.from < pos.ch)) &&
5151
- (sp.to == null || (m.inclusiveRight ? sp.to >= pos.ch : sp.to > pos.ch))) {
5152
- if (mayClear) {
5153
- signal(m, "beforeCursorEnter");
5154
- if (m.explicitlyCleared) {
5155
- if (!line.markedSpans) { break }
5156
- else {--i; continue}
5157
- }
5158
- }
5159
- if (!m.atomic) { continue }
5160
-
5161
- if (oldPos) {
5162
- var near = m.find(dir < 0 ? 1 : -1), diff = (void 0);
5163
- if (dir < 0 ? m.inclusiveRight : m.inclusiveLeft)
5164
- { near = movePos(doc, near, -dir, near && near.line == pos.line ? line : null); }
5165
- if (near && near.line == pos.line && (diff = cmp(near, oldPos)) && (dir < 0 ? diff < 0 : diff > 0))
5166
- { return skipAtomicInner(doc, near, pos, dir, mayClear) }
5167
- }
5168
-
5169
- var far = m.find(dir < 0 ? -1 : 1);
5170
- if (dir < 0 ? m.inclusiveLeft : m.inclusiveRight)
5171
- { far = movePos(doc, far, dir, far.line == pos.line ? line : null); }
5172
- return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null
5173
- }
5174
- } }
5175
- return pos
5176
- }
5177
-
5178
- // Ensure a given position is not inside an atomic range.
5179
- function skipAtomic(doc, pos, oldPos, bias, mayClear) {
5180
- var dir = bias || 1;
5181
- var found = skipAtomicInner(doc, pos, oldPos, dir, mayClear) ||
5182
- (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) ||
5183
- skipAtomicInner(doc, pos, oldPos, -dir, mayClear) ||
5184
- (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true));
5185
- if (!found) {
5186
- doc.cantEdit = true;
5187
- return Pos(doc.first, 0)
5188
- }
5189
- return found
5190
- }
5191
-
5192
- function movePos(doc, pos, dir, line) {
5193
- if (dir < 0 && pos.ch == 0) {
5194
- if (pos.line > doc.first) { return clipPos(doc, Pos(pos.line - 1)) }
5195
- else { return null }
5196
- } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) {
5197
- if (pos.line < doc.first + doc.size - 1) { return Pos(pos.line + 1, 0) }
5198
- else { return null }
5199
- } else {
5200
- return new Pos(pos.line, pos.ch + dir)
5201
- }
5202
- }
5203
-
5204
- function selectAll(cm) {
5205
- cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll);
5206
- }
5207
-
5208
- // UPDATING
5209
-
5210
- // Allow "beforeChange" event handlers to influence a change
5211
- function filterChange(doc, change, update) {
5212
- var obj = {
5213
- canceled: false,
5214
- from: change.from,
5215
- to: change.to,
5216
- text: change.text,
5217
- origin: change.origin,
5218
- cancel: function () { return obj.canceled = true; }
5219
- };
5220
- if (update) { obj.update = function (from, to, text, origin) {
5221
- if (from) { obj.from = clipPos(doc, from); }
5222
- if (to) { obj.to = clipPos(doc, to); }
5223
- if (text) { obj.text = text; }
5224
- if (origin !== undefined) { obj.origin = origin; }
5225
- }; }
5226
- signal(doc, "beforeChange", doc, obj);
5227
- if (doc.cm) { signal(doc.cm, "beforeChange", doc.cm, obj); }
5228
-
5229
- if (obj.canceled) {
5230
- if (doc.cm) { doc.cm.curOp.updateInput = 2; }
5231
- return null
5232
- }
5233
- return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}
5234
- }
5235
-
5236
- // Apply a change to a document, and add it to the document's
5237
- // history, and propagating it to all linked documents.
5238
- function makeChange(doc, change, ignoreReadOnly) {
5239
- if (doc.cm) {
5240
- if (!doc.cm.curOp) { return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) }
5241
- if (doc.cm.state.suppressEdits) { return }
5242
- }
5243
-
5244
- if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
5245
- change = filterChange(doc, change, true);
5246
- if (!change) { return }
5247
- }
5248
-
5249
- // Possibly split or suppress the update based on the presence
5250
- // of read-only spans in its range.
5251
- var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
5252
- if (split) {
5253
- for (var i = split.length - 1; i >= 0; --i)
5254
- { makeChangeInner(doc, {from: split[i].from, to: split[i].to, text: i ? [""] : change.text, origin: change.origin}); }
5255
- } else {
5256
- makeChangeInner(doc, change);
5257
- }
5258
- }
5259
-
5260
- function makeChangeInner(doc, change) {
5261
- if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { return }
5262
- var selAfter = computeSelAfterChange(doc, change);
5263
- addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN);
5264
-
5265
- makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change));
5266
- var rebased = [];
5267
-
5268
- linkedDocs(doc, function (doc, sharedHist) {
5269
- if (!sharedHist && indexOf(rebased, doc.history) == -1) {
5270
- rebaseHist(doc.history, change);
5271
- rebased.push(doc.history);
5272
- }
5273
- makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change));
5274
- });
5275
- }
5276
-
5277
- // Revert a change stored in a document's history.
5278
- function makeChangeFromHistory(doc, type, allowSelectionOnly) {
5279
- var suppress = doc.cm && doc.cm.state.suppressEdits;
5280
- if (suppress && !allowSelectionOnly) { return }
5281
-
5282
- var hist = doc.history, event, selAfter = doc.sel;
5283
- var source = type == "undo" ? hist.done : hist.undone, dest = type == "undo" ? hist.undone : hist.done;
5284
-
5285
- // Verify that there is a useable event (so that ctrl-z won't
5286
- // needlessly clear selection events)
5287
- var i = 0;
5288
- for (; i < source.length; i++) {
5289
- event = source[i];
5290
- if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges)
5291
- { break }
5292
- }
5293
- if (i == source.length) { return }
5294
- hist.lastOrigin = hist.lastSelOrigin = null;
5295
-
5296
- for (;;) {
5297
- event = source.pop();
5298
- if (event.ranges) {
5299
- pushSelectionToHistory(event, dest);
5300
- if (allowSelectionOnly && !event.equals(doc.sel)) {
5301
- setSelection(doc, event, {clearRedo: false});
5302
- return
5303
- }
5304
- selAfter = event;
5305
- } else if (suppress) {
5306
- source.push(event);
5307
- return
5308
- } else { break }
5309
- }
5310
-
5311
- // Build up a reverse change object to add to the opposite history
5312
- // stack (redo when undoing, and vice versa).
5313
- var antiChanges = [];
5314
- pushSelectionToHistory(selAfter, dest);
5315
- dest.push({changes: antiChanges, generation: hist.generation});
5316
- hist.generation = event.generation || ++hist.maxGeneration;
5317
-
5318
- var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange");
5319
-
5320
- var loop = function ( i ) {
5321
- var change = event.changes[i];
5322
- change.origin = type;
5323
- if (filter && !filterChange(doc, change, false)) {
5324
- source.length = 0;
5325
- return {}
5326
- }
5327
-
5328
- antiChanges.push(historyChangeFromChange(doc, change));
5329
-
5330
- var after = i ? computeSelAfterChange(doc, change) : lst(source);
5331
- makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change));
5332
- if (!i && doc.cm) { doc.cm.scrollIntoView({from: change.from, to: changeEnd(change)}); }
5333
- var rebased = [];
5334
-
5335
- // Propagate to the linked documents
5336
- linkedDocs(doc, function (doc, sharedHist) {
5337
- if (!sharedHist && indexOf(rebased, doc.history) == -1) {
5338
- rebaseHist(doc.history, change);
5339
- rebased.push(doc.history);
5340
- }
5341
- makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change));
5342
- });
5343
- };
5344
-
5345
- for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) {
5346
- var returned = loop( i$1 );
5347
-
5348
- if ( returned ) return returned.v;
5349
- }
5350
- }
5351
-
5352
- // Sub-views need their line numbers shifted when text is added
5353
- // above or below them in the parent document.
5354
- function shiftDoc(doc, distance) {
5355
- if (distance == 0) { return }
5356
- doc.first += distance;
5357
- doc.sel = new Selection(map(doc.sel.ranges, function (range) { return new Range(
5358
- Pos(range.anchor.line + distance, range.anchor.ch),
5359
- Pos(range.head.line + distance, range.head.ch)
5360
- ); }), doc.sel.primIndex);
5361
- if (doc.cm) {
5362
- regChange(doc.cm, doc.first, doc.first - distance, distance);
5363
- for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++)
5364
- { regLineChange(doc.cm, l, "gutter"); }
5365
- }
5366
- }
5367
-
5368
- // More lower-level change function, handling only a single document
5369
- // (not linked ones).
5370
- function makeChangeSingleDoc(doc, change, selAfter, spans) {
5371
- if (doc.cm && !doc.cm.curOp)
5372
- { return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) }
5373
-
5374
- if (change.to.line < doc.first) {
5375
- shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line));
5376
- return
5377
- }
5378
- if (change.from.line > doc.lastLine()) { return }
5379
-
5380
- // Clip the change to the size of this doc
5381
- if (change.from.line < doc.first) {
5382
- var shift = change.text.length - 1 - (doc.first - change.from.line);
5383
- shiftDoc(doc, shift);
5384
- change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch),
5385
- text: [lst(change.text)], origin: change.origin};
5386
- }
5387
- var last = doc.lastLine();
5388
- if (change.to.line > last) {
5389
- change = {from: change.from, to: Pos(last, getLine(doc, last).text.length),
5390
- text: [change.text[0]], origin: change.origin};
5391
- }
5392
-
5393
- change.removed = getBetween(doc, change.from, change.to);
5394
-
5395
- if (!selAfter) { selAfter = computeSelAfterChange(doc, change); }
5396
- if (doc.cm) { makeChangeSingleDocInEditor(doc.cm, change, spans); }
5397
- else { updateDoc(doc, change, spans); }
5398
- setSelectionNoUndo(doc, selAfter, sel_dontScroll);
5399
- }
5400
-
5401
- // Handle the interaction of a change to a document with the editor
5402
- // that this document is part of.
5403
- function makeChangeSingleDocInEditor(cm, change, spans) {
5404
- var doc = cm.doc, display = cm.display, from = change.from, to = change.to;
5405
-
5406
- var recomputeMaxLength = false, checkWidthStart = from.line;
5407
- if (!cm.options.lineWrapping) {
5408
- checkWidthStart = lineNo(visualLine(getLine(doc, from.line)));
5409
- doc.iter(checkWidthStart, to.line + 1, function (line) {
5410
- if (line == display.maxLine) {
5411
- recomputeMaxLength = true;
5412
- return true
5413
- }
5414
- });
5415
- }
5416
-
5417
- if (doc.sel.contains(change.from, change.to) > -1)
5418
- { signalCursorActivity(cm); }
5419
-
5420
- updateDoc(doc, change, spans, estimateHeight(cm));
5421
-
5422
- if (!cm.options.lineWrapping) {
5423
- doc.iter(checkWidthStart, from.line + change.text.length, function (line) {
5424
- var len = lineLength(line);
5425
- if (len > display.maxLineLength) {
5426
- display.maxLine = line;
5427
- display.maxLineLength = len;
5428
- display.maxLineChanged = true;
5429
- recomputeMaxLength = false;
5430
- }
5431
- });
5432
- if (recomputeMaxLength) { cm.curOp.updateMaxLine = true; }
5433
- }
5434
-
5435
- retreatFrontier(doc, from.line);
5436
- startWorker(cm, 400);
5437
-
5438
- var lendiff = change.text.length - (to.line - from.line) - 1;
5439
- // Remember that these lines changed, for updating the display
5440
- if (change.full)
5441
- { regChange(cm); }
5442
- else if (from.line == to.line && change.text.length == 1 && !isWholeLineUpdate(cm.doc, change))
5443
- { regLineChange(cm, from.line, "text"); }
5444
- else
5445
- { regChange(cm, from.line, to.line + 1, lendiff); }
5446
-
5447
- var changesHandler = hasHandler(cm, "changes"), changeHandler = hasHandler(cm, "change");
5448
- if (changeHandler || changesHandler) {
5449
- var obj = {
5450
- from: from, to: to,
5451
- text: change.text,
5452
- removed: change.removed,
5453
- origin: change.origin
5454
- };
5455
- if (changeHandler) { signalLater(cm, "change", cm, obj); }
5456
- if (changesHandler) { (cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj); }
5457
- }
5458
- cm.display.selForContextMenu = null;
5459
- }
5460
-
5461
- function replaceRange(doc, code, from, to, origin) {
5462
- var assign;
5463
-
5464
- if (!to) { to = from; }
5465
- if (cmp(to, from) < 0) { (assign = [to, from], from = assign[0], to = assign[1]); }
5466
- if (typeof code == "string") { code = doc.splitLines(code); }
5467
- makeChange(doc, {from: from, to: to, text: code, origin: origin});
5468
- }
5469
-
5470
- // Rebasing/resetting history to deal with externally-sourced changes
5471
-
5472
- function rebaseHistSelSingle(pos, from, to, diff) {
5473
- if (to < pos.line) {
5474
- pos.line += diff;
5475
- } else if (from < pos.line) {
5476
- pos.line = from;
5477
- pos.ch = 0;
5478
- }
5479
- }
5480
-
5481
- // Tries to rebase an array of history events given a change in the
5482
- // document. If the change touches the same lines as the event, the
5483
- // event, and everything 'behind' it, is discarded. If the change is
5484
- // before the event, the event's positions are updated. Uses a
5485
- // copy-on-write scheme for the positions, to avoid having to
5486
- // reallocate them all on every rebase, but also avoid problems with
5487
- // shared position objects being unsafely updated.
5488
- function rebaseHistArray(array, from, to, diff) {
5489
- for (var i = 0; i < array.length; ++i) {
5490
- var sub = array[i], ok = true;
5491
- if (sub.ranges) {
5492
- if (!sub.copied) { sub = array[i] = sub.deepCopy(); sub.copied = true; }
5493
- for (var j = 0; j < sub.ranges.length; j++) {
5494
- rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff);
5495
- rebaseHistSelSingle(sub.ranges[j].head, from, to, diff);
5496
- }
5497
- continue
5498
- }
5499
- for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) {
5500
- var cur = sub.changes[j$1];
5501
- if (to < cur.from.line) {
5502
- cur.from = Pos(cur.from.line + diff, cur.from.ch);
5503
- cur.to = Pos(cur.to.line + diff, cur.to.ch);
5504
- } else if (from <= cur.to.line) {
5505
- ok = false;
5506
- break
5507
- }
5508
- }
5509
- if (!ok) {
5510
- array.splice(0, i + 1);
5511
- i = 0;
5512
- }
5513
- }
5514
- }
5515
-
5516
- function rebaseHist(hist, change) {
5517
- var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1;
5518
- rebaseHistArray(hist.done, from, to, diff);
5519
- rebaseHistArray(hist.undone, from, to, diff);
5520
- }
5521
-
5522
- // Utility for applying a change to a line by handle or number,
5523
- // returning the number and optionally registering the line as
5524
- // changed.
5525
- function changeLine(doc, handle, changeType, op) {
5526
- var no = handle, line = handle;
5527
- if (typeof handle == "number") { line = getLine(doc, clipLine(doc, handle)); }
5528
- else { no = lineNo(handle); }
5529
- if (no == null) { return null }
5530
- if (op(line, no) && doc.cm) { regLineChange(doc.cm, no, changeType); }
5531
- return line
5532
- }
5533
-
5534
- // The document is represented as a BTree consisting of leaves, with
5535
- // chunk of lines in them, and branches, with up to ten leaves or
5536
- // other branch nodes below them. The top node is always a branch
5537
- // node, and is the document object itself (meaning it has
5538
- // additional methods and properties).
5539
- //
5540
- // All nodes have parent links. The tree is used both to go from
5541
- // line numbers to line objects, and to go from objects to numbers.
5542
- // It also indexes by height, and is used to convert between height
5543
- // and line object, and to find the total height of the document.
5544
- //
5545
- // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html
5546
-
5547
- function LeafChunk(lines) {
5548
- var this$1 = this;
5549
-
5550
- this.lines = lines;
5551
- this.parent = null;
5552
- var height = 0;
5553
- for (var i = 0; i < lines.length; ++i) {
5554
- lines[i].parent = this$1;
5555
- height += lines[i].height;
5556
- }
5557
- this.height = height;
5558
- }
5559
-
5560
- LeafChunk.prototype = {
5561
- chunkSize: function() { return this.lines.length },
5562
-
5563
- // Remove the n lines at offset 'at'.
5564
- removeInner: function(at, n) {
5565
- var this$1 = this;
5566
-
5567
- for (var i = at, e = at + n; i < e; ++i) {
5568
- var line = this$1.lines[i];
5569
- this$1.height -= line.height;
5570
- cleanUpLine(line);
5571
- signalLater(line, "delete");
5572
- }
5573
- this.lines.splice(at, n);
5574
- },
5575
-
5576
- // Helper used to collapse a small branch into a single leaf.
5577
- collapse: function(lines) {
5578
- lines.push.apply(lines, this.lines);
5579
- },
5580
-
5581
- // Insert the given array of lines at offset 'at', count them as
5582
- // having the given height.
5583
- insertInner: function(at, lines, height) {
5584
- var this$1 = this;
5585
-
5586
- this.height += height;
5587
- this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at));
5588
- for (var i = 0; i < lines.length; ++i) { lines[i].parent = this$1; }
5589
- },
5590
-
5591
- // Used to iterate over a part of the tree.
5592
- iterN: function(at, n, op) {
5593
- var this$1 = this;
5594
-
5595
- for (var e = at + n; at < e; ++at)
5596
- { if (op(this$1.lines[at])) { return true } }
5597
- }
5598
- };
5599
-
5600
- function BranchChunk(children) {
5601
- var this$1 = this;
5602
-
5603
- this.children = children;
5604
- var size = 0, height = 0;
5605
- for (var i = 0; i < children.length; ++i) {
5606
- var ch = children[i];
5607
- size += ch.chunkSize(); height += ch.height;
5608
- ch.parent = this$1;
5609
- }
5610
- this.size = size;
5611
- this.height = height;
5612
- this.parent = null;
5613
- }
5614
-
5615
- BranchChunk.prototype = {
5616
- chunkSize: function() { return this.size },
5617
-
5618
- removeInner: function(at, n) {
5619
- var this$1 = this;
5620
-
5621
- this.size -= n;
5622
- for (var i = 0; i < this.children.length; ++i) {
5623
- var child = this$1.children[i], sz = child.chunkSize();
5624
- if (at < sz) {
5625
- var rm = Math.min(n, sz - at), oldHeight = child.height;
5626
- child.removeInner(at, rm);
5627
- this$1.height -= oldHeight - child.height;
5628
- if (sz == rm) { this$1.children.splice(i--, 1); child.parent = null; }
5629
- if ((n -= rm) == 0) { break }
5630
- at = 0;
5631
- } else { at -= sz; }
5632
- }
5633
- // If the result is smaller than 25 lines, ensure that it is a
5634
- // single leaf node.
5635
- if (this.size - n < 25 &&
5636
- (this.children.length > 1 || !(this.children[0] instanceof LeafChunk))) {
5637
- var lines = [];
5638
- this.collapse(lines);
5639
- this.children = [new LeafChunk(lines)];
5640
- this.children[0].parent = this;
5641
- }
5642
- },
5643
-
5644
- collapse: function(lines) {
5645
- var this$1 = this;
5646
-
5647
- for (var i = 0; i < this.children.length; ++i) { this$1.children[i].collapse(lines); }
5648
- },
5649
-
5650
- insertInner: function(at, lines, height) {
5651
- var this$1 = this;
5652
-
5653
- this.size += lines.length;
5654
- this.height += height;
5655
- for (var i = 0; i < this.children.length; ++i) {
5656
- var child = this$1.children[i], sz = child.chunkSize();
5657
- if (at <= sz) {
5658
- child.insertInner(at, lines, height);
5659
- if (child.lines && child.lines.length > 50) {
5660
- // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced.
5661
- // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest.
5662
- var remaining = child.lines.length % 25 + 25;
5663
- for (var pos = remaining; pos < child.lines.length;) {
5664
- var leaf = new LeafChunk(child.lines.slice(pos, pos += 25));
5665
- child.height -= leaf.height;
5666
- this$1.children.splice(++i, 0, leaf);
5667
- leaf.parent = this$1;
5668
- }
5669
- child.lines = child.lines.slice(0, remaining);
5670
- this$1.maybeSpill();
5671
- }
5672
- break
5673
- }
5674
- at -= sz;
5675
- }
5676
- },
5677
-
5678
- // When a node has grown, check whether it should be split.
5679
- maybeSpill: function() {
5680
- if (this.children.length <= 10) { return }
5681
- var me = this;
5682
- do {
5683
- var spilled = me.children.splice(me.children.length - 5, 5);
5684
- var sibling = new BranchChunk(spilled);
5685
- if (!me.parent) { // Become the parent node
5686
- var copy = new BranchChunk(me.children);
5687
- copy.parent = me;
5688
- me.children = [copy, sibling];
5689
- me = copy;
5690
- } else {
5691
- me.size -= sibling.size;
5692
- me.height -= sibling.height;
5693
- var myIndex = indexOf(me.parent.children, me);
5694
- me.parent.children.splice(myIndex + 1, 0, sibling);
5695
- }
5696
- sibling.parent = me.parent;
5697
- } while (me.children.length > 10)
5698
- me.parent.maybeSpill();
5699
- },
5700
-
5701
- iterN: function(at, n, op) {
5702
- var this$1 = this;
5703
-
5704
- for (var i = 0; i < this.children.length; ++i) {
5705
- var child = this$1.children[i], sz = child.chunkSize();
5706
- if (at < sz) {
5707
- var used = Math.min(n, sz - at);
5708
- if (child.iterN(at, used, op)) { return true }
5709
- if ((n -= used) == 0) { break }
5710
- at = 0;
5711
- } else { at -= sz; }
5712
- }
5713
- }
5714
- };
5715
-
5716
- // Line widgets are block elements displayed above or below a line.
5717
-
5718
- var LineWidget = function(doc, node, options) {
5719
- var this$1 = this;
5720
-
5721
- if (options) { for (var opt in options) { if (options.hasOwnProperty(opt))
5722
- { this$1[opt] = options[opt]; } } }
5723
- this.doc = doc;
5724
- this.node = node;
5725
- };
5726
-
5727
- LineWidget.prototype.clear = function () {
5728
- var this$1 = this;
5729
-
5730
- var cm = this.doc.cm, ws = this.line.widgets, line = this.line, no = lineNo(line);
5731
- if (no == null || !ws) { return }
5732
- for (var i = 0; i < ws.length; ++i) { if (ws[i] == this$1) { ws.splice(i--, 1); } }
5733
- if (!ws.length) { line.widgets = null; }
5734
- var height = widgetHeight(this);
5735
- updateLineHeight(line, Math.max(0, line.height - height));
5736
- if (cm) {
5737
- runInOp(cm, function () {
5738
- adjustScrollWhenAboveVisible(cm, line, -height);
5739
- regLineChange(cm, no, "widget");
5740
- });
5741
- signalLater(cm, "lineWidgetCleared", cm, this, no);
5742
- }
5743
- };
5744
-
5745
- LineWidget.prototype.changed = function () {
5746
- var this$1 = this;
5747
-
5748
- var oldH = this.height, cm = this.doc.cm, line = this.line;
5749
- this.height = null;
5750
- var diff = widgetHeight(this) - oldH;
5751
- if (!diff) { return }
5752
- if (!lineIsHidden(this.doc, line)) { updateLineHeight(line, line.height + diff); }
5753
- if (cm) {
5754
- runInOp(cm, function () {
5755
- cm.curOp.forceUpdate = true;
5756
- adjustScrollWhenAboveVisible(cm, line, diff);
5757
- signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line));
5758
- });
5759
- }
5760
- };
5761
- eventMixin(LineWidget);
5762
-
5763
- function adjustScrollWhenAboveVisible(cm, line, diff) {
5764
- if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop))
5765
- { addToScrollTop(cm, diff); }
5766
- }
5767
-
5768
- function addLineWidget(doc, handle, node, options) {
5769
- var widget = new LineWidget(doc, node, options);
5770
- var cm = doc.cm;
5771
- if (cm && widget.noHScroll) { cm.display.alignWidgets = true; }
5772
- changeLine(doc, handle, "widget", function (line) {
5773
- var widgets = line.widgets || (line.widgets = []);
5774
- if (widget.insertAt == null) { widgets.push(widget); }
5775
- else { widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); }
5776
- widget.line = line;
5777
- if (cm && !lineIsHidden(doc, line)) {
5778
- var aboveVisible = heightAtLine(line) < doc.scrollTop;
5779
- updateLineHeight(line, line.height + widgetHeight(widget));
5780
- if (aboveVisible) { addToScrollTop(cm, widget.height); }
5781
- cm.curOp.forceUpdate = true;
5782
- }
5783
- return true
5784
- });
5785
- if (cm) { signalLater(cm, "lineWidgetAdded", cm, widget, typeof handle == "number" ? handle : lineNo(handle)); }
5786
- return widget
5787
- }
5788
-
5789
- // TEXTMARKERS
5790
-
5791
- // Created with markText and setBookmark methods. A TextMarker is a
5792
- // handle that can be used to clear or find a marked position in the
5793
- // document. Line objects hold arrays (markedSpans) containing
5794
- // {from, to, marker} object pointing to such marker objects, and
5795
- // indicating that such a marker is present on that line. Multiple
5796
- // lines may point to the same marker when it spans across lines.
5797
- // The spans will have null for their from/to properties when the
5798
- // marker continues beyond the start/end of the line. Markers have
5799
- // links back to the lines they currently touch.
5800
-
5801
- // Collapsed markers have unique ids, in order to be able to order
5802
- // them, which is needed for uniquely determining an outer marker
5803
- // when they overlap (they may nest, but not partially overlap).
5804
- var nextMarkerId = 0;
5805
-
5806
- var TextMarker = function(doc, type) {
5807
- this.lines = [];
5808
- this.type = type;
5809
- this.doc = doc;
5810
- this.id = ++nextMarkerId;
5811
- };
5812
-
5813
- // Clear the marker.
5814
- TextMarker.prototype.clear = function () {
5815
- var this$1 = this;
5816
-
5817
- if (this.explicitlyCleared) { return }
5818
- var cm = this.doc.cm, withOp = cm && !cm.curOp;
5819
- if (withOp) { startOperation(cm); }
5820
- if (hasHandler(this, "clear")) {
5821
- var found = this.find();
5822
- if (found) { signalLater(this, "clear", found.from, found.to); }
5823
- }
5824
- var min = null, max = null;
5825
- for (var i = 0; i < this.lines.length; ++i) {
5826
- var line = this$1.lines[i];
5827
- var span = getMarkedSpanFor(line.markedSpans, this$1);
5828
- if (cm && !this$1.collapsed) { regLineChange(cm, lineNo(line), "text"); }
5829
- else if (cm) {
5830
- if (span.to != null) { max = lineNo(line); }
5831
- if (span.from != null) { min = lineNo(line); }
5832
- }
5833
- line.markedSpans = removeMarkedSpan(line.markedSpans, span);
5834
- if (span.from == null && this$1.collapsed && !lineIsHidden(this$1.doc, line) && cm)
5835
- { updateLineHeight(line, textHeight(cm.display)); }
5836
- }
5837
- if (cm && this.collapsed && !cm.options.lineWrapping) { for (var i$1 = 0; i$1 < this.lines.length; ++i$1) {
5838
- var visual = visualLine(this$1.lines[i$1]), len = lineLength(visual);
5839
- if (len > cm.display.maxLineLength) {
5840
- cm.display.maxLine = visual;
5841
- cm.display.maxLineLength = len;
5842
- cm.display.maxLineChanged = true;
5843
- }
5844
- } }
5845
-
5846
- if (min != null && cm && this.collapsed) { regChange(cm, min, max + 1); }
5847
- this.lines.length = 0;
5848
- this.explicitlyCleared = true;
5849
- if (this.atomic && this.doc.cantEdit) {
5850
- this.doc.cantEdit = false;
5851
- if (cm) { reCheckSelection(cm.doc); }
5852
- }
5853
- if (cm) { signalLater(cm, "markerCleared", cm, this, min, max); }
5854
- if (withOp) { endOperation(cm); }
5855
- if (this.parent) { this.parent.clear(); }
5856
- };
5857
-
5858
- // Find the position of the marker in the document. Returns a {from,
5859
- // to} object by default. Side can be passed to get a specific side
5860
- // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the
5861
- // Pos objects returned contain a line object, rather than a line
5862
- // number (used to prevent looking up the same line twice).
5863
- TextMarker.prototype.find = function (side, lineObj) {
5864
- var this$1 = this;
5865
-
5866
- if (side == null && this.type == "bookmark") { side = 1; }
5867
- var from, to;
5868
- for (var i = 0; i < this.lines.length; ++i) {
5869
- var line = this$1.lines[i];
5870
- var span = getMarkedSpanFor(line.markedSpans, this$1);
5871
- if (span.from != null) {
5872
- from = Pos(lineObj ? line : lineNo(line), span.from);
5873
- if (side == -1) { return from }
5874
- }
5875
- if (span.to != null) {
5876
- to = Pos(lineObj ? line : lineNo(line), span.to);
5877
- if (side == 1) { return to }
5878
- }
5879
- }
5880
- return from && {from: from, to: to}
5881
- };
5882
-
5883
- // Signals that the marker's widget changed, and surrounding layout
5884
- // should be recomputed.
5885
- TextMarker.prototype.changed = function () {
5886
- var this$1 = this;
5887
-
5888
- var pos = this.find(-1, true), widget = this, cm = this.doc.cm;
5889
- if (!pos || !cm) { return }
5890
- runInOp(cm, function () {
5891
- var line = pos.line, lineN = lineNo(pos.line);
5892
- var view = findViewForLine(cm, lineN);
5893
- if (view) {
5894
- clearLineMeasurementCacheFor(view);
5895
- cm.curOp.selectionChanged = cm.curOp.forceUpdate = true;
5896
- }
5897
- cm.curOp.updateMaxLine = true;
5898
- if (!lineIsHidden(widget.doc, line) && widget.height != null) {
5899
- var oldHeight = widget.height;
5900
- widget.height = null;
5901
- var dHeight = widgetHeight(widget) - oldHeight;
5902
- if (dHeight)
5903
- { updateLineHeight(line, line.height + dHeight); }
5904
- }
5905
- signalLater(cm, "markerChanged", cm, this$1);
5906
- });
5907
- };
5908
-
5909
- TextMarker.prototype.attachLine = function (line) {
5910
- if (!this.lines.length && this.doc.cm) {
5911
- var op = this.doc.cm.curOp;
5912
- if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1)
5913
- { (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); }
5914
- }
5915
- this.lines.push(line);
5916
- };
5917
-
5918
- TextMarker.prototype.detachLine = function (line) {
5919
- this.lines.splice(indexOf(this.lines, line), 1);
5920
- if (!this.lines.length && this.doc.cm) {
5921
- var op = this.doc.cm.curOp
5922
- ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this);
5923
- }
5924
- };
5925
- eventMixin(TextMarker);
5926
-
5927
- // Create a marker, wire it up to the right lines, and
5928
- function markText(doc, from, to, options, type) {
5929
- // Shared markers (across linked documents) are handled separately
5930
- // (markTextShared will call out to this again, once per
5931
- // document).
5932
- if (options && options.shared) { return markTextShared(doc, from, to, options, type) }
5933
- // Ensure we are in an operation.
5934
- if (doc.cm && !doc.cm.curOp) { return operation(doc.cm, markText)(doc, from, to, options, type) }
5935
-
5936
- var marker = new TextMarker(doc, type), diff = cmp(from, to);
5937
- if (options) { copyObj(options, marker, false); }
5938
- // Don't connect empty markers unless clearWhenEmpty is false
5939
- if (diff > 0 || diff == 0 && marker.clearWhenEmpty !== false)
5940
- { return marker }
5941
- if (marker.replacedWith) {
5942
- // Showing up as a widget implies collapsed (widget replaces text)
5943
- marker.collapsed = true;
5944
- marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget");
5945
- if (!options.handleMouseEvents) { marker.widgetNode.setAttribute("cm-ignore-events", "true"); }
5946
- if (options.insertLeft) { marker.widgetNode.insertLeft = true; }
5947
- }
5948
- if (marker.collapsed) {
5949
- if (conflictingCollapsedRange(doc, from.line, from, to, marker) ||
5950
- from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker))
5951
- { throw new Error("Inserting collapsed marker partially overlapping an existing one") }
5952
- seeCollapsedSpans();
5953
- }
5954
-
5955
- if (marker.addToHistory)
5956
- { addChangeToHistory(doc, {from: from, to: to, origin: "markText"}, doc.sel, NaN); }
5957
-
5958
- var curLine = from.line, cm = doc.cm, updateMaxLine;
5959
- doc.iter(curLine, to.line + 1, function (line) {
5960
- if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(line) == cm.display.maxLine)
5961
- { updateMaxLine = true; }
5962
- if (marker.collapsed && curLine != from.line) { updateLineHeight(line, 0); }
5963
- addMarkedSpan(line, new MarkedSpan(marker,
5964
- curLine == from.line ? from.ch : null,
5965
- curLine == to.line ? to.ch : null));
5966
- ++curLine;
5967
- });
5968
- // lineIsHidden depends on the presence of the spans, so needs a second pass
5969
- if (marker.collapsed) { doc.iter(from.line, to.line + 1, function (line) {
5970
- if (lineIsHidden(doc, line)) { updateLineHeight(line, 0); }
5971
- }); }
5972
-
5973
- if (marker.clearOnEnter) { on(marker, "beforeCursorEnter", function () { return marker.clear(); }); }
5974
-
5975
- if (marker.readOnly) {
5976
- seeReadOnlySpans();
5977
- if (doc.history.done.length || doc.history.undone.length)
5978
- { doc.clearHistory(); }
5979
- }
5980
- if (marker.collapsed) {
5981
- marker.id = ++nextMarkerId;
5982
- marker.atomic = true;
5983
- }
5984
- if (cm) {
5985
- // Sync editor state
5986
- if (updateMaxLine) { cm.curOp.updateMaxLine = true; }
5987
- if (marker.collapsed)
5988
- { regChange(cm, from.line, to.line + 1); }
5989
- else if (marker.className || marker.startStyle || marker.endStyle || marker.css ||
5990
- marker.attributes || marker.title)
5991
- { for (var i = from.line; i <= to.line; i++) { regLineChange(cm, i, "text"); } }
5992
- if (marker.atomic) { reCheckSelection(cm.doc); }
5993
- signalLater(cm, "markerAdded", cm, marker);
5994
- }
5995
- return marker
5996
- }
5997
-
5998
- // SHARED TEXTMARKERS
5999
-
6000
- // A shared marker spans multiple linked documents. It is
6001
- // implemented as a meta-marker-object controlling multiple normal
6002
- // markers.
6003
- var SharedTextMarker = function(markers, primary) {
6004
- var this$1 = this;
6005
-
6006
- this.markers = markers;
6007
- this.primary = primary;
6008
- for (var i = 0; i < markers.length; ++i)
6009
- { markers[i].parent = this$1; }
6010
- };
6011
-
6012
- SharedTextMarker.prototype.clear = function () {
6013
- var this$1 = this;
6014
-
6015
- if (this.explicitlyCleared) { return }
6016
- this.explicitlyCleared = true;
6017
- for (var i = 0; i < this.markers.length; ++i)
6018
- { this$1.markers[i].clear(); }
6019
- signalLater(this, "clear");
6020
- };
6021
-
6022
- SharedTextMarker.prototype.find = function (side, lineObj) {
6023
- return this.primary.find(side, lineObj)
6024
- };
6025
- eventMixin(SharedTextMarker);
6026
-
6027
- function markTextShared(doc, from, to, options, type) {
6028
- options = copyObj(options);
6029
- options.shared = false;
6030
- var markers = [markText(doc, from, to, options, type)], primary = markers[0];
6031
- var widget = options.widgetNode;
6032
- linkedDocs(doc, function (doc) {
6033
- if (widget) { options.widgetNode = widget.cloneNode(true); }
6034
- markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type));
6035
- for (var i = 0; i < doc.linked.length; ++i)
6036
- { if (doc.linked[i].isParent) { return } }
6037
- primary = lst(markers);
6038
- });
6039
- return new SharedTextMarker(markers, primary)
6040
- }
6041
-
6042
- function findSharedMarkers(doc) {
6043
- return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function (m) { return m.parent; })
6044
- }
6045
-
6046
- function copySharedMarkers(doc, markers) {
6047
- for (var i = 0; i < markers.length; i++) {
6048
- var marker = markers[i], pos = marker.find();
6049
- var mFrom = doc.clipPos(pos.from), mTo = doc.clipPos(pos.to);
6050
- if (cmp(mFrom, mTo)) {
6051
- var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type);
6052
- marker.markers.push(subMark);
6053
- subMark.parent = marker;
6054
- }
6055
- }
6056
- }
6057
-
6058
- function detachSharedMarkers(markers) {
6059
- var loop = function ( i ) {
6060
- var marker = markers[i], linked = [marker.primary.doc];
6061
- linkedDocs(marker.primary.doc, function (d) { return linked.push(d); });
6062
- for (var j = 0; j < marker.markers.length; j++) {
6063
- var subMarker = marker.markers[j];
6064
- if (indexOf(linked, subMarker.doc) == -1) {
6065
- subMarker.parent = null;
6066
- marker.markers.splice(j--, 1);
6067
- }
6068
- }
6069
- };
6070
-
6071
- for (var i = 0; i < markers.length; i++) loop( i );
6072
- }
6073
-
6074
- var nextDocId = 0;
6075
- var Doc = function(text, mode, firstLine, lineSep, direction) {
6076
- if (!(this instanceof Doc)) { return new Doc(text, mode, firstLine, lineSep, direction) }
6077
- if (firstLine == null) { firstLine = 0; }
6078
-
6079
- BranchChunk.call(this, [new LeafChunk([new Line("", null)])]);
6080
- this.first = firstLine;
6081
- this.scrollTop = this.scrollLeft = 0;
6082
- this.cantEdit = false;
6083
- this.cleanGeneration = 1;
6084
- this.modeFrontier = this.highlightFrontier = firstLine;
6085
- var start = Pos(firstLine, 0);
6086
- this.sel = simpleSelection(start);
6087
- this.history = new History(null);
6088
- this.id = ++nextDocId;
6089
- this.modeOption = mode;
6090
- this.lineSep = lineSep;
6091
- this.direction = (direction == "rtl") ? "rtl" : "ltr";
6092
- this.extend = false;
6093
-
6094
- if (typeof text == "string") { text = this.splitLines(text); }
6095
- updateDoc(this, {from: start, to: start, text: text});
6096
- setSelection(this, simpleSelection(start), sel_dontScroll);
6097
- };
6098
-
6099
- Doc.prototype = createObj(BranchChunk.prototype, {
6100
- constructor: Doc,
6101
- // Iterate over the document. Supports two forms -- with only one
6102
- // argument, it calls that for each line in the document. With
6103
- // three, it iterates over the range given by the first two (with
6104
- // the second being non-inclusive).
6105
- iter: function(from, to, op) {
6106
- if (op) { this.iterN(from - this.first, to - from, op); }
6107
- else { this.iterN(this.first, this.first + this.size, from); }
6108
- },
6109
-
6110
- // Non-public interface for adding and removing lines.
6111
- insert: function(at, lines) {
6112
- var height = 0;
6113
- for (var i = 0; i < lines.length; ++i) { height += lines[i].height; }
6114
- this.insertInner(at - this.first, lines, height);
6115
- },
6116
- remove: function(at, n) { this.removeInner(at - this.first, n); },
6117
-
6118
- // From here, the methods are part of the public interface. Most
6119
- // are also available from CodeMirror (editor) instances.
6120
-
6121
- getValue: function(lineSep) {
6122
- var lines = getLines(this, this.first, this.first + this.size);
6123
- if (lineSep === false) { return lines }
6124
- return lines.join(lineSep || this.lineSeparator())
6125
- },
6126
- setValue: docMethodOp(function(code) {
6127
- var top = Pos(this.first, 0), last = this.first + this.size - 1;
6128
- makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length),
6129
- text: this.splitLines(code), origin: "setValue", full: true}, true);
6130
- if (this.cm) { scrollToCoords(this.cm, 0, 0); }
6131
- setSelection(this, simpleSelection(top), sel_dontScroll);
6132
- }),
6133
- replaceRange: function(code, from, to, origin) {
6134
- from = clipPos(this, from);
6135
- to = to ? clipPos(this, to) : from;
6136
- replaceRange(this, code, from, to, origin);
6137
- },
6138
- getRange: function(from, to, lineSep) {
6139
- var lines = getBetween(this, clipPos(this, from), clipPos(this, to));
6140
- if (lineSep === false) { return lines }
6141
- return lines.join(lineSep || this.lineSeparator())
6142
- },
6143
-
6144
- getLine: function(line) {var l = this.getLineHandle(line); return l && l.text},
6145
-
6146
- getLineHandle: function(line) {if (isLine(this, line)) { return getLine(this, line) }},
6147
- getLineNumber: function(line) {return lineNo(line)},
6148
-
6149
- getLineHandleVisualStart: function(line) {
6150
- if (typeof line == "number") { line = getLine(this, line); }
6151
- return visualLine(line)
6152
- },
6153
-
6154
- lineCount: function() {return this.size},
6155
- firstLine: function() {return this.first},
6156
- lastLine: function() {return this.first + this.size - 1},
6157
-
6158
- clipPos: function(pos) {return clipPos(this, pos)},
6159
-
6160
- getCursor: function(start) {
6161
- var range$$1 = this.sel.primary(), pos;
6162
- if (start == null || start == "head") { pos = range$$1.head; }
6163
- else if (start == "anchor") { pos = range$$1.anchor; }
6164
- else if (start == "end" || start == "to" || start === false) { pos = range$$1.to(); }
6165
- else { pos = range$$1.from(); }
6166
- return pos
6167
- },
6168
- listSelections: function() { return this.sel.ranges },
6169
- somethingSelected: function() {return this.sel.somethingSelected()},
6170
-
6171
- setCursor: docMethodOp(function(line, ch, options) {
6172
- setSimpleSelection(this, clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), null, options);
6173
- }),
6174
- setSelection: docMethodOp(function(anchor, head, options) {
6175
- setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options);
6176
- }),
6177
- extendSelection: docMethodOp(function(head, other, options) {
6178
- extendSelection(this, clipPos(this, head), other && clipPos(this, other), options);
6179
- }),
6180
- extendSelections: docMethodOp(function(heads, options) {
6181
- extendSelections(this, clipPosArray(this, heads), options);
6182
- }),
6183
- extendSelectionsBy: docMethodOp(function(f, options) {
6184
- var heads = map(this.sel.ranges, f);
6185
- extendSelections(this, clipPosArray(this, heads), options);
6186
- }),
6187
- setSelections: docMethodOp(function(ranges, primary, options) {
6188
- var this$1 = this;
6189
-
6190
- if (!ranges.length) { return }
6191
- var out = [];
6192
- for (var i = 0; i < ranges.length; i++)
6193
- { out[i] = new Range(clipPos(this$1, ranges[i].anchor),
6194
- clipPos(this$1, ranges[i].head)); }
6195
- if (primary == null) { primary = Math.min(ranges.length - 1, this.sel.primIndex); }
6196
- setSelection(this, normalizeSelection(this.cm, out, primary), options);
6197
- }),
6198
- addSelection: docMethodOp(function(anchor, head, options) {
6199
- var ranges = this.sel.ranges.slice(0);
6200
- ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor)));
6201
- setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options);
6202
- }),
6203
-
6204
- getSelection: function(lineSep) {
6205
- var this$1 = this;
6206
-
6207
- var ranges = this.sel.ranges, lines;
6208
- for (var i = 0; i < ranges.length; i++) {
6209
- var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());
6210
- lines = lines ? lines.concat(sel) : sel;
6211
- }
6212
- if (lineSep === false) { return lines }
6213
- else { return lines.join(lineSep || this.lineSeparator()) }
6214
- },
6215
- getSelections: function(lineSep) {
6216
- var this$1 = this;
6217
-
6218
- var parts = [], ranges = this.sel.ranges;
6219
- for (var i = 0; i < ranges.length; i++) {
6220
- var sel = getBetween(this$1, ranges[i].from(), ranges[i].to());
6221
- if (lineSep !== false) { sel = sel.join(lineSep || this$1.lineSeparator()); }
6222
- parts[i] = sel;
6223
- }
6224
- return parts
6225
- },
6226
- replaceSelection: function(code, collapse, origin) {
6227
- var dup = [];
6228
- for (var i = 0; i < this.sel.ranges.length; i++)
6229
- { dup[i] = code; }
6230
- this.replaceSelections(dup, collapse, origin || "+input");
6231
- },
6232
- replaceSelections: docMethodOp(function(code, collapse, origin) {
6233
- var this$1 = this;
6234
-
6235
- var changes = [], sel = this.sel;
6236
- for (var i = 0; i < sel.ranges.length; i++) {
6237
- var range$$1 = sel.ranges[i];
6238
- changes[i] = {from: range$$1.from(), to: range$$1.to(), text: this$1.splitLines(code[i]), origin: origin};
6239
- }
6240
- var newSel = collapse && collapse != "end" && computeReplacedSel(this, changes, collapse);
6241
- for (var i$1 = changes.length - 1; i$1 >= 0; i$1--)
6242
- { makeChange(this$1, changes[i$1]); }
6243
- if (newSel) { setSelectionReplaceHistory(this, newSel); }
6244
- else if (this.cm) { ensureCursorVisible(this.cm); }
6245
- }),
6246
- undo: docMethodOp(function() {makeChangeFromHistory(this, "undo");}),
6247
- redo: docMethodOp(function() {makeChangeFromHistory(this, "redo");}),
6248
- undoSelection: docMethodOp(function() {makeChangeFromHistory(this, "undo", true);}),
6249
- redoSelection: docMethodOp(function() {makeChangeFromHistory(this, "redo", true);}),
6250
-
6251
- setExtending: function(val) {this.extend = val;},
6252
- getExtending: function() {return this.extend},
6253
-
6254
- historySize: function() {
6255
- var hist = this.history, done = 0, undone = 0;
6256
- for (var i = 0; i < hist.done.length; i++) { if (!hist.done[i].ranges) { ++done; } }
6257
- for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { if (!hist.undone[i$1].ranges) { ++undone; } }
6258
- return {undo: done, redo: undone}
6259
- },
6260
- clearHistory: function() {this.history = new History(this.history.maxGeneration);},
6261
-
6262
- markClean: function() {
6263
- this.cleanGeneration = this.changeGeneration(true);
6264
- },
6265
- changeGeneration: function(forceSplit) {
6266
- if (forceSplit)
6267
- { this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null; }
6268
- return this.history.generation
6269
- },
6270
- isClean: function (gen) {
6271
- return this.history.generation == (gen || this.cleanGeneration)
6272
- },
6273
-
6274
- getHistory: function() {
6275
- return {done: copyHistoryArray(this.history.done),
6276
- undone: copyHistoryArray(this.history.undone)}
6277
- },
6278
- setHistory: function(histData) {
6279
- var hist = this.history = new History(this.history.maxGeneration);
6280
- hist.done = copyHistoryArray(histData.done.slice(0), null, true);
6281
- hist.undone = copyHistoryArray(histData.undone.slice(0), null, true);
6282
- },
6283
-
6284
- setGutterMarker: docMethodOp(function(line, gutterID, value) {
6285
- return changeLine(this, line, "gutter", function (line) {
6286
- var markers = line.gutterMarkers || (line.gutterMarkers = {});
6287
- markers[gutterID] = value;
6288
- if (!value && isEmpty(markers)) { line.gutterMarkers = null; }
6289
- return true
6290
- })
6291
- }),
6292
-
6293
- clearGutter: docMethodOp(function(gutterID) {
6294
- var this$1 = this;
6295
-
6296
- this.iter(function (line) {
6297
- if (line.gutterMarkers && line.gutterMarkers[gutterID]) {
6298
- changeLine(this$1, line, "gutter", function () {
6299
- line.gutterMarkers[gutterID] = null;
6300
- if (isEmpty(line.gutterMarkers)) { line.gutterMarkers = null; }
6301
- return true
6302
- });
6303
- }
6304
- });
6305
- }),
6306
-
6307
- lineInfo: function(line) {
6308
- var n;
6309
- if (typeof line == "number") {
6310
- if (!isLine(this, line)) { return null }
6311
- n = line;
6312
- line = getLine(this, line);
6313
- if (!line) { return null }
6314
- } else {
6315
- n = lineNo(line);
6316
- if (n == null) { return null }
6317
- }
6318
- return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers,
6319
- textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass,
6320
- widgets: line.widgets}
6321
- },
6322
-
6323
- addLineClass: docMethodOp(function(handle, where, cls) {
6324
- return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
6325
- var prop = where == "text" ? "textClass"
6326
- : where == "background" ? "bgClass"
6327
- : where == "gutter" ? "gutterClass" : "wrapClass";
6328
- if (!line[prop]) { line[prop] = cls; }
6329
- else if (classTest(cls).test(line[prop])) { return false }
6330
- else { line[prop] += " " + cls; }
6331
- return true
6332
- })
6333
- }),
6334
- removeLineClass: docMethodOp(function(handle, where, cls) {
6335
- return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function (line) {
6336
- var prop = where == "text" ? "textClass"
6337
- : where == "background" ? "bgClass"
6338
- : where == "gutter" ? "gutterClass" : "wrapClass";
6339
- var cur = line[prop];
6340
- if (!cur) { return false }
6341
- else if (cls == null) { line[prop] = null; }
6342
- else {
6343
- var found = cur.match(classTest(cls));
6344
- if (!found) { return false }
6345
- var end = found.index + found[0].length;
6346
- line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null;
6347
- }
6348
- return true
6349
- })
6350
- }),
6351
-
6352
- addLineWidget: docMethodOp(function(handle, node, options) {
6353
- return addLineWidget(this, handle, node, options)
6354
- }),
6355
- removeLineWidget: function(widget) { widget.clear(); },
6356
-
6357
- markText: function(from, to, options) {
6358
- return markText(this, clipPos(this, from), clipPos(this, to), options, options && options.type || "range")
6359
- },
6360
- setBookmark: function(pos, options) {
6361
- var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options),
6362
- insertLeft: options && options.insertLeft,
6363
- clearWhenEmpty: false, shared: options && options.shared,
6364
- handleMouseEvents: options && options.handleMouseEvents};
6365
- pos = clipPos(this, pos);
6366
- return markText(this, pos, pos, realOpts, "bookmark")
6367
- },
6368
- findMarksAt: function(pos) {
6369
- pos = clipPos(this, pos);
6370
- var markers = [], spans = getLine(this, pos.line).markedSpans;
6371
- if (spans) { for (var i = 0; i < spans.length; ++i) {
6372
- var span = spans[i];
6373
- if ((span.from == null || span.from <= pos.ch) &&
6374
- (span.to == null || span.to >= pos.ch))
6375
- { markers.push(span.marker.parent || span.marker); }
6376
- } }
6377
- return markers
6378
- },
6379
- findMarks: function(from, to, filter) {
6380
- from = clipPos(this, from); to = clipPos(this, to);
6381
- var found = [], lineNo$$1 = from.line;
6382
- this.iter(from.line, to.line + 1, function (line) {
6383
- var spans = line.markedSpans;
6384
- if (spans) { for (var i = 0; i < spans.length; i++) {
6385
- var span = spans[i];
6386
- if (!(span.to != null && lineNo$$1 == from.line && from.ch >= span.to ||
6387
- span.from == null && lineNo$$1 != from.line ||
6388
- span.from != null && lineNo$$1 == to.line && span.from >= to.ch) &&
6389
- (!filter || filter(span.marker)))
6390
- { found.push(span.marker.parent || span.marker); }
6391
- } }
6392
- ++lineNo$$1;
6393
- });
6394
- return found
6395
- },
6396
- getAllMarks: function() {
6397
- var markers = [];
6398
- this.iter(function (line) {
6399
- var sps = line.markedSpans;
6400
- if (sps) { for (var i = 0; i < sps.length; ++i)
6401
- { if (sps[i].from != null) { markers.push(sps[i].marker); } } }
6402
- });
6403
- return markers
6404
- },
6405
-
6406
- posFromIndex: function(off) {
6407
- var ch, lineNo$$1 = this.first, sepSize = this.lineSeparator().length;
6408
- this.iter(function (line) {
6409
- var sz = line.text.length + sepSize;
6410
- if (sz > off) { ch = off; return true }
6411
- off -= sz;
6412
- ++lineNo$$1;
6413
- });
6414
- return clipPos(this, Pos(lineNo$$1, ch))
6415
- },
6416
- indexFromPos: function (coords) {
6417
- coords = clipPos(this, coords);
6418
- var index = coords.ch;
6419
- if (coords.line < this.first || coords.ch < 0) { return 0 }
6420
- var sepSize = this.lineSeparator().length;
6421
- this.iter(this.first, coords.line, function (line) { // iter aborts when callback returns a truthy value
6422
- index += line.text.length + sepSize;
6423
- });
6424
- return index
6425
- },
6426
-
6427
- copy: function(copyHistory) {
6428
- var doc = new Doc(getLines(this, this.first, this.first + this.size),
6429
- this.modeOption, this.first, this.lineSep, this.direction);
6430
- doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft;
6431
- doc.sel = this.sel;
6432
- doc.extend = false;
6433
- if (copyHistory) {
6434
- doc.history.undoDepth = this.history.undoDepth;
6435
- doc.setHistory(this.getHistory());
6436
- }
6437
- return doc
6438
- },
6439
-
6440
- linkedDoc: function(options) {
6441
- if (!options) { options = {}; }
6442
- var from = this.first, to = this.first + this.size;
6443
- if (options.from != null && options.from > from) { from = options.from; }
6444
- if (options.to != null && options.to < to) { to = options.to; }
6445
- var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from, this.lineSep, this.direction);
6446
- if (options.sharedHist) { copy.history = this.history
6447
- ; }(this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist});
6448
- copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}];
6449
- copySharedMarkers(copy, findSharedMarkers(this));
6450
- return copy
6451
- },
6452
- unlinkDoc: function(other) {
6453
- var this$1 = this;
6454
-
6455
- if (other instanceof CodeMirror) { other = other.doc; }
6456
- if (this.linked) { for (var i = 0; i < this.linked.length; ++i) {
6457
- var link = this$1.linked[i];
6458
- if (link.doc != other) { continue }
6459
- this$1.linked.splice(i, 1);
6460
- other.unlinkDoc(this$1);
6461
- detachSharedMarkers(findSharedMarkers(this$1));
6462
- break
6463
- } }
6464
- // If the histories were shared, split them again
6465
- if (other.history == this.history) {
6466
- var splitIds = [other.id];
6467
- linkedDocs(other, function (doc) { return splitIds.push(doc.id); }, true);
6468
- other.history = new History(null);
6469
- other.history.done = copyHistoryArray(this.history.done, splitIds);
6470
- other.history.undone = copyHistoryArray(this.history.undone, splitIds);
6471
- }
6472
- },
6473
- iterLinkedDocs: function(f) {linkedDocs(this, f);},
6474
-
6475
- getMode: function() {return this.mode},
6476
- getEditor: function() {return this.cm},
6477
-
6478
- splitLines: function(str) {
6479
- if (this.lineSep) { return str.split(this.lineSep) }
6480
- return splitLinesAuto(str)
6481
- },
6482
- lineSeparator: function() { return this.lineSep || "\n" },
6483
-
6484
- setDirection: docMethodOp(function (dir) {
6485
- if (dir != "rtl") { dir = "ltr"; }
6486
- if (dir == this.direction) { return }
6487
- this.direction = dir;
6488
- this.iter(function (line) { return line.order = null; });
6489
- if (this.cm) { directionChanged(this.cm); }
6490
- })
6491
- });
6492
-
6493
- // Public alias.
6494
- Doc.prototype.eachLine = Doc.prototype.iter;
6495
-
6496
- // Kludge to work around strange IE behavior where it'll sometimes
6497
- // re-fire a series of drag-related events right after the drop (#1551)
6498
- var lastDrop = 0;
6499
-
6500
- function onDrop(e) {
6501
- var cm = this;
6502
- clearDragCursor(cm);
6503
- if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e))
6504
- { return }
6505
- e_preventDefault(e);
6506
- if (ie) { lastDrop = +new Date; }
6507
- var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files;
6508
- if (!pos || cm.isReadOnly()) { return }
6509
- // Might be a file drop, in which case we simply extract the text
6510
- // and insert it.
6511
- if (files && files.length && window.FileReader && window.File) {
6512
- var n = files.length, text = Array(n), read = 0;
6513
- var loadFile = function (file, i) {
6514
- if (cm.options.allowDropFileTypes &&
6515
- indexOf(cm.options.allowDropFileTypes, file.type) == -1)
6516
- { return }
6517
-
6518
- var reader = new FileReader;
6519
- reader.onload = operation(cm, function () {
6520
- var content = reader.result;
6521
- if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { content = ""; }
6522
- text[i] = content;
6523
- if (++read == n) {
6524
- pos = clipPos(cm.doc, pos);
6525
- var change = {from: pos, to: pos,
6526
- text: cm.doc.splitLines(text.join(cm.doc.lineSeparator())),
6527
- origin: "paste"};
6528
- makeChange(cm.doc, change);
6529
- setSelectionReplaceHistory(cm.doc, simpleSelection(pos, changeEnd(change)));
6530
- }
6531
- });
6532
- reader.readAsText(file);
6533
- };
6534
- for (var i = 0; i < n; ++i) { loadFile(files[i], i); }
6535
- } else { // Normal drop
6536
- // Don't do a replace if the drop happened inside of the selected text.
6537
- if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) {
6538
- cm.state.draggingText(e);
6539
- // Ensure the editor is re-focused
6540
- setTimeout(function () { return cm.display.input.focus(); }, 20);
6541
- return
6542
- }
6543
- try {
6544
- var text$1 = e.dataTransfer.getData("Text");
6545
- if (text$1) {
6546
- var selected;
6547
- if (cm.state.draggingText && !cm.state.draggingText.copy)
6548
- { selected = cm.listSelections(); }
6549
- setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
6550
- if (selected) { for (var i$1 = 0; i$1 < selected.length; ++i$1)
6551
- { replaceRange(cm.doc, "", selected[i$1].anchor, selected[i$1].head, "drag"); } }
6552
- cm.replaceSelection(text$1, "around", "paste");
6553
- cm.display.input.focus();
6554
- }
6555
- }
6556
- catch(e){}
6557
- }
6558
- }
6559
-
6560
- function onDragStart(cm, e) {
6561
- if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return }
6562
- if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { return }
6563
-
6564
- e.dataTransfer.setData("Text", cm.getSelection());
6565
- e.dataTransfer.effectAllowed = "copyMove";
6566
-
6567
- // Use dummy image instead of default browsers image.
6568
- // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there.
6569
- if (e.dataTransfer.setDragImage && !safari) {
6570
- var img = elt("img", null, null, "position: fixed; left: 0; top: 0;");
6571
- img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
6572
- if (presto) {
6573
- img.width = img.height = 1;
6574
- cm.display.wrapper.appendChild(img);
6575
- // Force a relayout, or Opera won't use our image for some obscure reason
6576
- img._top = img.offsetTop;
6577
- }
6578
- e.dataTransfer.setDragImage(img, 0, 0);
6579
- if (presto) { img.parentNode.removeChild(img); }
6580
- }
6581
- }
6582
-
6583
- function onDragOver(cm, e) {
6584
- var pos = posFromMouse(cm, e);
6585
- if (!pos) { return }
6586
- var frag = document.createDocumentFragment();
6587
- drawSelectionCursor(cm, pos, frag);
6588
- if (!cm.display.dragCursor) {
6589
- cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors");
6590
- cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv);
6591
- }
6592
- removeChildrenAndAdd(cm.display.dragCursor, frag);
6593
- }
6594
-
6595
- function clearDragCursor(cm) {
6596
- if (cm.display.dragCursor) {
6597
- cm.display.lineSpace.removeChild(cm.display.dragCursor);
6598
- cm.display.dragCursor = null;
6599
- }
6600
- }
6601
-
6602
- // These must be handled carefully, because naively registering a
6603
- // handler for each editor will cause the editors to never be
6604
- // garbage collected.
6605
-
6606
- function forEachCodeMirror(f) {
6607
- if (!document.getElementsByClassName) { return }
6608
- var byClass = document.getElementsByClassName("CodeMirror"), editors = [];
6609
- for (var i = 0; i < byClass.length; i++) {
6610
- var cm = byClass[i].CodeMirror;
6611
- if (cm) { editors.push(cm); }
6612
- }
6613
- if (editors.length) { editors[0].operation(function () {
6614
- for (var i = 0; i < editors.length; i++) { f(editors[i]); }
6615
- }); }
6616
- }
6617
-
6618
- var globalsRegistered = false;
6619
- function ensureGlobalHandlers() {
6620
- if (globalsRegistered) { return }
6621
- registerGlobalHandlers();
6622
- globalsRegistered = true;
6623
- }
6624
- function registerGlobalHandlers() {
6625
- // When the window resizes, we need to refresh active editors.
6626
- var resizeTimer;
6627
- on(window, "resize", function () {
6628
- if (resizeTimer == null) { resizeTimer = setTimeout(function () {
6629
- resizeTimer = null;
6630
- forEachCodeMirror(onResize);
6631
- }, 100); }
6632
- });
6633
- // When the window loses focus, we want to show the editor as blurred
6634
- on(window, "blur", function () { return forEachCodeMirror(onBlur); });
6635
- }
6636
- // Called when the window resizes
6637
- function onResize(cm) {
6638
- var d = cm.display;
6639
- // Might be a text scaling operation, clear size caches.
6640
- d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
6641
- d.scrollbarsClipped = false;
6642
- cm.setSize();
6643
- }
6644
-
6645
- var keyNames = {
6646
- 3: "Pause", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt",
6647
- 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End",
6648
- 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert",
6649
- 46: "Delete", 59: ";", 61: "=", 91: "Mod", 92: "Mod", 93: "Mod",
6650
- 106: "*", 107: "=", 109: "-", 110: ".", 111: "/", 145: "ScrollLock",
6651
- 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\",
6652
- 221: "]", 222: "'", 63232: "Up", 63233: "Down", 63234: "Left", 63235: "Right", 63272: "Delete",
6653
- 63273: "Home", 63275: "End", 63276: "PageUp", 63277: "PageDown", 63302: "Insert"
6654
- };
6655
-
6656
- // Number keys
6657
- for (var i = 0; i < 10; i++) { keyNames[i + 48] = keyNames[i + 96] = String(i); }
6658
- // Alphabetic keys
6659
- for (var i$1 = 65; i$1 <= 90; i$1++) { keyNames[i$1] = String.fromCharCode(i$1); }
6660
- // Function keys
6661
- for (var i$2 = 1; i$2 <= 12; i$2++) { keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2; }
6662
-
6663
- var keyMap = {};
6664
-
6665
- keyMap.basic = {
6666
- "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown",
6667
- "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown",
6668
- "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore",
6669
- "Tab": "defaultTab", "Shift-Tab": "indentAuto",
6670
- "Enter": "newlineAndIndent", "Insert": "toggleOverwrite",
6671
- "Esc": "singleSelection"
6672
- };
6673
- // Note that the save and find-related commands aren't defined by
6674
- // default. User code or addons can define them. Unknown commands
6675
- // are simply ignored.
6676
- keyMap.pcDefault = {
6677
- "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo",
6678
- "Ctrl-Home": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Up": "goLineUp", "Ctrl-Down": "goLineDown",
6679
- "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd",
6680
- "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find",
6681
- "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll",
6682
- "Ctrl-[": "indentLess", "Ctrl-]": "indentMore",
6683
- "Ctrl-U": "undoSelection", "Shift-Ctrl-U": "redoSelection", "Alt-U": "redoSelection",
6684
- "fallthrough": "basic"
6685
- };
6686
- // Very basic readline/emacs-style bindings, which are standard on Mac.
6687
- keyMap.emacsy = {
6688
- "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown",
6689
- "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd",
6690
- "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore",
6691
- "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars",
6692
- "Ctrl-O": "openLine"
6693
- };
6694
- keyMap.macDefault = {
6695
- "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo",
6696
- "Cmd-Home": "goDocStart", "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft",
6697
- "Alt-Right": "goGroupRight", "Cmd-Left": "goLineLeft", "Cmd-Right": "goLineRight", "Alt-Backspace": "delGroupBefore",
6698
- "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find",
6699
- "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll",
6700
- "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delWrappedLineLeft", "Cmd-Delete": "delWrappedLineRight",
6701
- "Cmd-U": "undoSelection", "Shift-Cmd-U": "redoSelection", "Ctrl-Up": "goDocStart", "Ctrl-Down": "goDocEnd",
6702
- "fallthrough": ["basic", "emacsy"]
6703
- };
6704
- keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault;
6705
-
6706
- // KEYMAP DISPATCH
6707
-
6708
- function normalizeKeyName(name) {
6709
- var parts = name.split(/-(?!$)/);
6710
- name = parts[parts.length - 1];
6711
- var alt, ctrl, shift, cmd;
6712
- for (var i = 0; i < parts.length - 1; i++) {
6713
- var mod = parts[i];
6714
- if (/^(cmd|meta|m)$/i.test(mod)) { cmd = true; }
6715
- else if (/^a(lt)?$/i.test(mod)) { alt = true; }
6716
- else if (/^(c|ctrl|control)$/i.test(mod)) { ctrl = true; }
6717
- else if (/^s(hift)?$/i.test(mod)) { shift = true; }
6718
- else { throw new Error("Unrecognized modifier name: " + mod) }
6719
- }
6720
- if (alt) { name = "Alt-" + name; }
6721
- if (ctrl) { name = "Ctrl-" + name; }
6722
- if (cmd) { name = "Cmd-" + name; }
6723
- if (shift) { name = "Shift-" + name; }
6724
- return name
6725
- }
6726
-
6727
- // This is a kludge to keep keymaps mostly working as raw objects
6728
- // (backwards compatibility) while at the same time support features
6729
- // like normalization and multi-stroke key bindings. It compiles a
6730
- // new normalized keymap, and then updates the old object to reflect
6731
- // this.
6732
- function normalizeKeyMap(keymap) {
6733
- var copy = {};
6734
- for (var keyname in keymap) { if (keymap.hasOwnProperty(keyname)) {
6735
- var value = keymap[keyname];
6736
- if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { continue }
6737
- if (value == "...") { delete keymap[keyname]; continue }
6738
-
6739
- var keys = map(keyname.split(" "), normalizeKeyName);
6740
- for (var i = 0; i < keys.length; i++) {
6741
- var val = (void 0), name = (void 0);
6742
- if (i == keys.length - 1) {
6743
- name = keys.join(" ");
6744
- val = value;
6745
- } else {
6746
- name = keys.slice(0, i + 1).join(" ");
6747
- val = "...";
6748
- }
6749
- var prev = copy[name];
6750
- if (!prev) { copy[name] = val; }
6751
- else if (prev != val) { throw new Error("Inconsistent bindings for " + name) }
6752
- }
6753
- delete keymap[keyname];
6754
- } }
6755
- for (var prop in copy) { keymap[prop] = copy[prop]; }
6756
- return keymap
6757
- }
6758
-
6759
- function lookupKey(key, map$$1, handle, context) {
6760
- map$$1 = getKeyMap(map$$1);
6761
- var found = map$$1.call ? map$$1.call(key, context) : map$$1[key];
6762
- if (found === false) { return "nothing" }
6763
- if (found === "...") { return "multi" }
6764
- if (found != null && handle(found)) { return "handled" }
6765
-
6766
- if (map$$1.fallthrough) {
6767
- if (Object.prototype.toString.call(map$$1.fallthrough) != "[object Array]")
6768
- { return lookupKey(key, map$$1.fallthrough, handle, context) }
6769
- for (var i = 0; i < map$$1.fallthrough.length; i++) {
6770
- var result = lookupKey(key, map$$1.fallthrough[i], handle, context);
6771
- if (result) { return result }
6772
- }
6773
- }
6774
- }
6775
-
6776
- // Modifier key presses don't count as 'real' key presses for the
6777
- // purpose of keymap fallthrough.
6778
- function isModifierKey(value) {
6779
- var name = typeof value == "string" ? value : keyNames[value.keyCode];
6780
- return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"
6781
- }
6782
-
6783
- function addModifierNames(name, event, noShift) {
6784
- var base = name;
6785
- if (event.altKey && base != "Alt") { name = "Alt-" + name; }
6786
- if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { name = "Ctrl-" + name; }
6787
- if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") { name = "Cmd-" + name; }
6788
- if (!noShift && event.shiftKey && base != "Shift") { name = "Shift-" + name; }
6789
- return name
6790
- }
6791
-
6792
- // Look up the name of a key as indicated by an event object.
6793
- function keyName(event, noShift) {
6794
- if (presto && event.keyCode == 34 && event["char"]) { return false }
6795
- var name = keyNames[event.keyCode];
6796
- if (name == null || event.altGraphKey) { return false }
6797
- // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause,
6798
- // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+)
6799
- if (event.keyCode == 3 && event.code) { name = event.code; }
6800
- return addModifierNames(name, event, noShift)
6801
- }
6802
-
6803
- function getKeyMap(val) {
6804
- return typeof val == "string" ? keyMap[val] : val
6805
- }
6806
-
6807
- // Helper for deleting text near the selection(s), used to implement
6808
- // backspace, delete, and similar functionality.
6809
- function deleteNearSelection(cm, compute) {
6810
- var ranges = cm.doc.sel.ranges, kill = [];
6811
- // Build up a set of ranges to kill first, merging overlapping
6812
- // ranges.
6813
- for (var i = 0; i < ranges.length; i++) {
6814
- var toKill = compute(ranges[i]);
6815
- while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) {
6816
- var replaced = kill.pop();
6817
- if (cmp(replaced.from, toKill.from) < 0) {
6818
- toKill.from = replaced.from;
6819
- break
6820
- }
6821
- }
6822
- kill.push(toKill);
6823
- }
6824
- // Next, remove those actual ranges.
6825
- runInOp(cm, function () {
6826
- for (var i = kill.length - 1; i >= 0; i--)
6827
- { replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete"); }
6828
- ensureCursorVisible(cm);
6829
- });
6830
- }
6831
-
6832
- function moveCharLogically(line, ch, dir) {
6833
- var target = skipExtendingChars(line.text, ch + dir, dir);
6834
- return target < 0 || target > line.text.length ? null : target
6835
- }
6836
-
6837
- function moveLogically(line, start, dir) {
6838
- var ch = moveCharLogically(line, start.ch, dir);
6839
- return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before")
6840
- }
6841
-
6842
- function endOfLine(visually, cm, lineObj, lineNo, dir) {
6843
- if (visually) {
6844
- var order = getOrder(lineObj, cm.doc.direction);
6845
- if (order) {
6846
- var part = dir < 0 ? lst(order) : order[0];
6847
- var moveInStorageOrder = (dir < 0) == (part.level == 1);
6848
- var sticky = moveInStorageOrder ? "after" : "before";
6849
- var ch;
6850
- // With a wrapped rtl chunk (possibly spanning multiple bidi parts),
6851
- // it could be that the last bidi part is not on the last visual line,
6852
- // since visual lines contain content order-consecutive chunks.
6853
- // Thus, in rtl, we are looking for the first (content-order) character
6854
- // in the rtl chunk that is on the last line (that is, the same line
6855
- // as the last (content-order) character).
6856
- if (part.level > 0 || cm.doc.direction == "rtl") {
6857
- var prep = prepareMeasureForLine(cm, lineObj);
6858
- ch = dir < 0 ? lineObj.text.length - 1 : 0;
6859
- var targetTop = measureCharPrepared(cm, prep, ch).top;
6860
- ch = findFirst(function (ch) { return measureCharPrepared(cm, prep, ch).top == targetTop; }, (dir < 0) == (part.level == 1) ? part.from : part.to - 1, ch);
6861
- if (sticky == "before") { ch = moveCharLogically(lineObj, ch, 1); }
6862
- } else { ch = dir < 0 ? part.to : part.from; }
6863
- return new Pos(lineNo, ch, sticky)
6864
- }
6865
- }
6866
- return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after")
6867
- }
6868
-
6869
- function moveVisually(cm, line, start, dir) {
6870
- var bidi = getOrder(line, cm.doc.direction);
6871
- if (!bidi) { return moveLogically(line, start, dir) }
6872
- if (start.ch >= line.text.length) {
6873
- start.ch = line.text.length;
6874
- start.sticky = "before";
6875
- } else if (start.ch <= 0) {
6876
- start.ch = 0;
6877
- start.sticky = "after";
6878
- }
6879
- var partPos = getBidiPartAt(bidi, start.ch, start.sticky), part = bidi[partPos];
6880
- if (cm.doc.direction == "ltr" && part.level % 2 == 0 && (dir > 0 ? part.to > start.ch : part.from < start.ch)) {
6881
- // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines,
6882
- // nothing interesting happens.
6883
- return moveLogically(line, start, dir)
6884
- }
6885
-
6886
- var mv = function (pos, dir) { return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir); };
6887
- var prep;
6888
- var getWrappedLineExtent = function (ch) {
6889
- if (!cm.options.lineWrapping) { return {begin: 0, end: line.text.length} }
6890
- prep = prep || prepareMeasureForLine(cm, line);
6891
- return wrappedLineExtentChar(cm, line, prep, ch)
6892
- };
6893
- var wrappedLineExtent = getWrappedLineExtent(start.sticky == "before" ? mv(start, -1) : start.ch);
6894
-
6895
- if (cm.doc.direction == "rtl" || part.level == 1) {
6896
- var moveInStorageOrder = (part.level == 1) == (dir < 0);
6897
- var ch = mv(start, moveInStorageOrder ? 1 : -1);
6898
- if (ch != null && (!moveInStorageOrder ? ch >= part.from && ch >= wrappedLineExtent.begin : ch <= part.to && ch <= wrappedLineExtent.end)) {
6899
- // Case 2: We move within an rtl part or in an rtl editor on the same visual line
6900
- var sticky = moveInStorageOrder ? "before" : "after";
6901
- return new Pos(start.line, ch, sticky)
6902
- }
6903
- }
6904
-
6905
- // Case 3: Could not move within this bidi part in this visual line, so leave
6906
- // the current bidi part
6907
-
6908
- var searchInVisualLine = function (partPos, dir, wrappedLineExtent) {
6909
- var getRes = function (ch, moveInStorageOrder) { return moveInStorageOrder
6910
- ? new Pos(start.line, mv(ch, 1), "before")
6911
- : new Pos(start.line, ch, "after"); };
6912
-
6913
- for (; partPos >= 0 && partPos < bidi.length; partPos += dir) {
6914
- var part = bidi[partPos];
6915
- var moveInStorageOrder = (dir > 0) == (part.level != 1);
6916
- var ch = moveInStorageOrder ? wrappedLineExtent.begin : mv(wrappedLineExtent.end, -1);
6917
- if (part.from <= ch && ch < part.to) { return getRes(ch, moveInStorageOrder) }
6918
- ch = moveInStorageOrder ? part.from : mv(part.to, -1);
6919
- if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { return getRes(ch, moveInStorageOrder) }
6920
- }
6921
- };
6922
-
6923
- // Case 3a: Look for other bidi parts on the same visual line
6924
- var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent);
6925
- if (res) { return res }
6926
-
6927
- // Case 3b: Look for other bidi parts on the next visual line
6928
- var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1);
6929
- if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) {
6930
- res = searchInVisualLine(dir > 0 ? 0 : bidi.length - 1, dir, getWrappedLineExtent(nextCh));
6931
- if (res) { return res }
6932
- }
6933
-
6934
- // Case 4: Nowhere to move
6935
- return null
6936
- }
6937
-
6938
- // Commands are parameter-less actions that can be performed on an
6939
- // editor, mostly used for keybindings.
6940
- var commands = {
6941
- selectAll: selectAll,
6942
- singleSelection: function (cm) { return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll); },
6943
- killLine: function (cm) { return deleteNearSelection(cm, function (range) {
6944
- if (range.empty()) {
6945
- var len = getLine(cm.doc, range.head.line).text.length;
6946
- if (range.head.ch == len && range.head.line < cm.lastLine())
6947
- { return {from: range.head, to: Pos(range.head.line + 1, 0)} }
6948
- else
6949
- { return {from: range.head, to: Pos(range.head.line, len)} }
6950
- } else {
6951
- return {from: range.from(), to: range.to()}
6952
- }
6953
- }); },
6954
- deleteLine: function (cm) { return deleteNearSelection(cm, function (range) { return ({
6955
- from: Pos(range.from().line, 0),
6956
- to: clipPos(cm.doc, Pos(range.to().line + 1, 0))
6957
- }); }); },
6958
- delLineLeft: function (cm) { return deleteNearSelection(cm, function (range) { return ({
6959
- from: Pos(range.from().line, 0), to: range.from()
6960
- }); }); },
6961
- delWrappedLineLeft: function (cm) { return deleteNearSelection(cm, function (range) {
6962
- var top = cm.charCoords(range.head, "div").top + 5;
6963
- var leftPos = cm.coordsChar({left: 0, top: top}, "div");
6964
- return {from: leftPos, to: range.from()}
6965
- }); },
6966
- delWrappedLineRight: function (cm) { return deleteNearSelection(cm, function (range) {
6967
- var top = cm.charCoords(range.head, "div").top + 5;
6968
- var rightPos = cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div");
6969
- return {from: range.from(), to: rightPos }
6970
- }); },
6971
- undo: function (cm) { return cm.undo(); },
6972
- redo: function (cm) { return cm.redo(); },
6973
- undoSelection: function (cm) { return cm.undoSelection(); },
6974
- redoSelection: function (cm) { return cm.redoSelection(); },
6975
- goDocStart: function (cm) { return cm.extendSelection(Pos(cm.firstLine(), 0)); },
6976
- goDocEnd: function (cm) { return cm.extendSelection(Pos(cm.lastLine())); },
6977
- goLineStart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStart(cm, range.head.line); },
6978
- {origin: "+move", bias: 1}
6979
- ); },
6980
- goLineStartSmart: function (cm) { return cm.extendSelectionsBy(function (range) { return lineStartSmart(cm, range.head); },
6981
- {origin: "+move", bias: 1}
6982
- ); },
6983
- goLineEnd: function (cm) { return cm.extendSelectionsBy(function (range) { return lineEnd(cm, range.head.line); },
6984
- {origin: "+move", bias: -1}
6985
- ); },
6986
- goLineRight: function (cm) { return cm.extendSelectionsBy(function (range) {
6987
- var top = cm.cursorCoords(range.head, "div").top + 5;
6988
- return cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")
6989
- }, sel_move); },
6990
- goLineLeft: function (cm) { return cm.extendSelectionsBy(function (range) {
6991
- var top = cm.cursorCoords(range.head, "div").top + 5;
6992
- return cm.coordsChar({left: 0, top: top}, "div")
6993
- }, sel_move); },
6994
- goLineLeftSmart: function (cm) { return cm.extendSelectionsBy(function (range) {
6995
- var top = cm.cursorCoords(range.head, "div").top + 5;
6996
- var pos = cm.coordsChar({left: 0, top: top}, "div");
6997
- if (pos.ch < cm.getLine(pos.line).search(/\S/)) { return lineStartSmart(cm, range.head) }
6998
- return pos
6999
- }, sel_move); },
7000
- goLineUp: function (cm) { return cm.moveV(-1, "line"); },
7001
- goLineDown: function (cm) { return cm.moveV(1, "line"); },
7002
- goPageUp: function (cm) { return cm.moveV(-1, "page"); },
7003
- goPageDown: function (cm) { return cm.moveV(1, "page"); },
7004
- goCharLeft: function (cm) { return cm.moveH(-1, "char"); },
7005
- goCharRight: function (cm) { return cm.moveH(1, "char"); },
7006
- goColumnLeft: function (cm) { return cm.moveH(-1, "column"); },
7007
- goColumnRight: function (cm) { return cm.moveH(1, "column"); },
7008
- goWordLeft: function (cm) { return cm.moveH(-1, "word"); },
7009
- goGroupRight: function (cm) { return cm.moveH(1, "group"); },
7010
- goGroupLeft: function (cm) { return cm.moveH(-1, "group"); },
7011
- goWordRight: function (cm) { return cm.moveH(1, "word"); },
7012
- delCharBefore: function (cm) { return cm.deleteH(-1, "char"); },
7013
- delCharAfter: function (cm) { return cm.deleteH(1, "char"); },
7014
- delWordBefore: function (cm) { return cm.deleteH(-1, "word"); },
7015
- delWordAfter: function (cm) { return cm.deleteH(1, "word"); },
7016
- delGroupBefore: function (cm) { return cm.deleteH(-1, "group"); },
7017
- delGroupAfter: function (cm) { return cm.deleteH(1, "group"); },
7018
- indentAuto: function (cm) { return cm.indentSelection("smart"); },
7019
- indentMore: function (cm) { return cm.indentSelection("add"); },
7020
- indentLess: function (cm) { return cm.indentSelection("subtract"); },
7021
- insertTab: function (cm) { return cm.replaceSelection("\t"); },
7022
- insertSoftTab: function (cm) {
7023
- var spaces = [], ranges = cm.listSelections(), tabSize = cm.options.tabSize;
7024
- for (var i = 0; i < ranges.length; i++) {
7025
- var pos = ranges[i].from();
7026
- var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize);
7027
- spaces.push(spaceStr(tabSize - col % tabSize));
7028
- }
7029
- cm.replaceSelections(spaces);
7030
- },
7031
- defaultTab: function (cm) {
7032
- if (cm.somethingSelected()) { cm.indentSelection("add"); }
7033
- else { cm.execCommand("insertTab"); }
7034
- },
7035
- // Swap the two chars left and right of each selection's head.
7036
- // Move cursor behind the two swapped characters afterwards.
7037
- //
7038
- // Doesn't consider line feeds a character.
7039
- // Doesn't scan more than one line above to find a character.
7040
- // Doesn't do anything on an empty line.
7041
- // Doesn't do anything with non-empty selections.
7042
- transposeChars: function (cm) { return runInOp(cm, function () {
7043
- var ranges = cm.listSelections(), newSel = [];
7044
- for (var i = 0; i < ranges.length; i++) {
7045
- if (!ranges[i].empty()) { continue }
7046
- var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
7047
- if (line) {
7048
- if (cur.ch == line.length) { cur = new Pos(cur.line, cur.ch - 1); }
7049
- if (cur.ch > 0) {
7050
- cur = new Pos(cur.line, cur.ch + 1);
7051
- cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
7052
- Pos(cur.line, cur.ch - 2), cur, "+transpose");
7053
- } else if (cur.line > cm.doc.first) {
7054
- var prev = getLine(cm.doc, cur.line - 1).text;
7055
- if (prev) {
7056
- cur = new Pos(cur.line, 1);
7057
- cm.replaceRange(line.charAt(0) + cm.doc.lineSeparator() +
7058
- prev.charAt(prev.length - 1),
7059
- Pos(cur.line - 1, prev.length - 1), cur, "+transpose");
7060
- }
7061
- }
7062
- }
7063
- newSel.push(new Range(cur, cur));
7064
- }
7065
- cm.setSelections(newSel);
7066
- }); },
7067
- newlineAndIndent: function (cm) { return runInOp(cm, function () {
7068
- var sels = cm.listSelections();
7069
- for (var i = sels.length - 1; i >= 0; i--)
7070
- { cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input"); }
7071
- sels = cm.listSelections();
7072
- for (var i$1 = 0; i$1 < sels.length; i$1++)
7073
- { cm.indentLine(sels[i$1].from().line, null, true); }
7074
- ensureCursorVisible(cm);
7075
- }); },
7076
- openLine: function (cm) { return cm.replaceSelection("\n", "start"); },
7077
- toggleOverwrite: function (cm) { return cm.toggleOverwrite(); }
7078
- };
7079
-
7080
-
7081
- function lineStart(cm, lineN) {
7082
- var line = getLine(cm.doc, lineN);
7083
- var visual = visualLine(line);
7084
- if (visual != line) { lineN = lineNo(visual); }
7085
- return endOfLine(true, cm, visual, lineN, 1)
7086
- }
7087
- function lineEnd(cm, lineN) {
7088
- var line = getLine(cm.doc, lineN);
7089
- var visual = visualLineEnd(line);
7090
- if (visual != line) { lineN = lineNo(visual); }
7091
- return endOfLine(true, cm, line, lineN, -1)
7092
- }
7093
- function lineStartSmart(cm, pos) {
7094
- var start = lineStart(cm, pos.line);
7095
- var line = getLine(cm.doc, start.line);
7096
- var order = getOrder(line, cm.doc.direction);
7097
- if (!order || order[0].level == 0) {
7098
- var firstNonWS = Math.max(0, line.text.search(/\S/));
7099
- var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch;
7100
- return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky)
7101
- }
7102
- return start
7103
- }
7104
-
7105
- // Run a handler that was bound to a key.
7106
- function doHandleBinding(cm, bound, dropShift) {
7107
- if (typeof bound == "string") {
7108
- bound = commands[bound];
7109
- if (!bound) { return false }
7110
- }
7111
- // Ensure previous input has been read, so that the handler sees a
7112
- // consistent view of the document
7113
- cm.display.input.ensurePolled();
7114
- var prevShift = cm.display.shift, done = false;
7115
- try {
7116
- if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
7117
- if (dropShift) { cm.display.shift = false; }
7118
- done = bound(cm) != Pass;
7119
- } finally {
7120
- cm.display.shift = prevShift;
7121
- cm.state.suppressEdits = false;
7122
- }
7123
- return done
7124
- }
7125
-
7126
- function lookupKeyForEditor(cm, name, handle) {
7127
- for (var i = 0; i < cm.state.keyMaps.length; i++) {
7128
- var result = lookupKey(name, cm.state.keyMaps[i], handle, cm);
7129
- if (result) { return result }
7130
- }
7131
- return (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm))
7132
- || lookupKey(name, cm.options.keyMap, handle, cm)
7133
- }
7134
-
7135
- // Note that, despite the name, this function is also used to check
7136
- // for bound mouse clicks.
7137
-
7138
- var stopSeq = new Delayed;
7139
-
7140
- function dispatchKey(cm, name, e, handle) {
7141
- var seq = cm.state.keySeq;
7142
- if (seq) {
7143
- if (isModifierKey(name)) { return "handled" }
7144
- if (/\'$/.test(name))
7145
- { cm.state.keySeq = null; }
7146
- else
7147
- { stopSeq.set(50, function () {
7148
- if (cm.state.keySeq == seq) {
7149
- cm.state.keySeq = null;
7150
- cm.display.input.reset();
7151
- }
7152
- }); }
7153
- if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { return true }
7154
- }
7155
- return dispatchKeyInner(cm, name, e, handle)
7156
- }
7157
-
7158
- function dispatchKeyInner(cm, name, e, handle) {
7159
- var result = lookupKeyForEditor(cm, name, handle);
7160
-
7161
- if (result == "multi")
7162
- { cm.state.keySeq = name; }
7163
- if (result == "handled")
7164
- { signalLater(cm, "keyHandled", cm, name, e); }
7165
-
7166
- if (result == "handled" || result == "multi") {
7167
- e_preventDefault(e);
7168
- restartBlink(cm);
7169
- }
7170
-
7171
- return !!result
7172
- }
7173
-
7174
- // Handle a key from the keydown event.
7175
- function handleKeyBinding(cm, e) {
7176
- var name = keyName(e, true);
7177
- if (!name) { return false }
7178
-
7179
- if (e.shiftKey && !cm.state.keySeq) {
7180
- // First try to resolve full name (including 'Shift-'). Failing
7181
- // that, see if there is a cursor-motion command (starting with
7182
- // 'go') bound to the keyname without 'Shift-'.
7183
- return dispatchKey(cm, "Shift-" + name, e, function (b) { return doHandleBinding(cm, b, true); })
7184
- || dispatchKey(cm, name, e, function (b) {
7185
- if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion)
7186
- { return doHandleBinding(cm, b) }
7187
- })
7188
- } else {
7189
- return dispatchKey(cm, name, e, function (b) { return doHandleBinding(cm, b); })
7190
- }
7191
- }
7192
-
7193
- // Handle a key from the keypress event
7194
- function handleCharBinding(cm, e, ch) {
7195
- return dispatchKey(cm, "'" + ch + "'", e, function (b) { return doHandleBinding(cm, b, true); })
7196
- }
7197
-
7198
- var lastStoppedKey = null;
7199
- function onKeyDown(e) {
7200
- var cm = this;
7201
- cm.curOp.focus = activeElt();
7202
- if (signalDOMEvent(cm, e)) { return }
7203
- // IE does strange things with escape.
7204
- if (ie && ie_version < 11 && e.keyCode == 27) { e.returnValue = false; }
7205
- var code = e.keyCode;
7206
- cm.display.shift = code == 16 || e.shiftKey;
7207
- var handled = handleKeyBinding(cm, e);
7208
- if (presto) {
7209
- lastStoppedKey = handled ? code : null;
7210
- // Opera has no cut event... we try to at least catch the key combo
7211
- if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey))
7212
- { cm.replaceSelection("", null, "cut"); }
7213
- }
7214
-
7215
- // Turn mouse into crosshair when Alt is held on Mac.
7216
- if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className))
7217
- { showCrossHair(cm); }
7218
- }
7219
-
7220
- function showCrossHair(cm) {
7221
- var lineDiv = cm.display.lineDiv;
7222
- addClass(lineDiv, "CodeMirror-crosshair");
7223
-
7224
- function up(e) {
7225
- if (e.keyCode == 18 || !e.altKey) {
7226
- rmClass(lineDiv, "CodeMirror-crosshair");
7227
- off(document, "keyup", up);
7228
- off(document, "mouseover", up);
7229
- }
7230
- }
7231
- on(document, "keyup", up);
7232
- on(document, "mouseover", up);
7233
- }
7234
-
7235
- function onKeyUp(e) {
7236
- if (e.keyCode == 16) { this.doc.sel.shift = false; }
7237
- signalDOMEvent(this, e);
7238
- }
7239
-
7240
- function onKeyPress(e) {
7241
- var cm = this;
7242
- if (eventInWidget(cm.display, e) || signalDOMEvent(cm, e) || e.ctrlKey && !e.altKey || mac && e.metaKey) { return }
7243
- var keyCode = e.keyCode, charCode = e.charCode;
7244
- if (presto && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return}
7245
- if ((presto && (!e.which || e.which < 10)) && handleKeyBinding(cm, e)) { return }
7246
- var ch = String.fromCharCode(charCode == null ? keyCode : charCode);
7247
- // Some browsers fire keypress events for backspace
7248
- if (ch == "\x08") { return }
7249
- if (handleCharBinding(cm, e, ch)) { return }
7250
- cm.display.input.onKeyPress(e);
7251
- }
7252
-
7253
- var DOUBLECLICK_DELAY = 400;
7254
-
7255
- var PastClick = function(time, pos, button) {
7256
- this.time = time;
7257
- this.pos = pos;
7258
- this.button = button;
7259
- };
7260
-
7261
- PastClick.prototype.compare = function (time, pos, button) {
7262
- return this.time + DOUBLECLICK_DELAY > time &&
7263
- cmp(pos, this.pos) == 0 && button == this.button
7264
- };
7265
-
7266
- var lastClick, lastDoubleClick;
7267
- function clickRepeat(pos, button) {
7268
- var now = +new Date;
7269
- if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) {
7270
- lastClick = lastDoubleClick = null;
7271
- return "triple"
7272
- } else if (lastClick && lastClick.compare(now, pos, button)) {
7273
- lastDoubleClick = new PastClick(now, pos, button);
7274
- lastClick = null;
7275
- return "double"
7276
- } else {
7277
- lastClick = new PastClick(now, pos, button);
7278
- lastDoubleClick = null;
7279
- return "single"
7280
- }
7281
- }
7282
-
7283
- // A mouse down can be a single click, double click, triple click,
7284
- // start of selection drag, start of text drag, new cursor
7285
- // (ctrl-click), rectangle drag (alt-drag), or xwin
7286
- // middle-click-paste. Or it might be a click on something we should
7287
- // not interfere with, such as a scrollbar or widget.
7288
- function onMouseDown(e) {
7289
- var cm = this, display = cm.display;
7290
- if (signalDOMEvent(cm, e) || display.activeTouch && display.input.supportsTouch()) { return }
7291
- display.input.ensurePolled();
7292
- display.shift = e.shiftKey;
7293
-
7294
- if (eventInWidget(display, e)) {
7295
- if (!webkit) {
7296
- // Briefly turn off draggability, to allow widgets to do
7297
- // normal dragging things.
7298
- display.scroller.draggable = false;
7299
- setTimeout(function () { return display.scroller.draggable = true; }, 100);
7300
- }
7301
- return
7302
- }
7303
- if (clickInGutter(cm, e)) { return }
7304
- var pos = posFromMouse(cm, e), button = e_button(e), repeat = pos ? clickRepeat(pos, button) : "single";
7305
- window.focus();
7306
-
7307
- // #3261: make sure, that we're not starting a second selection
7308
- if (button == 1 && cm.state.selectingText)
7309
- { cm.state.selectingText(e); }
7310
-
7311
- if (pos && handleMappedButton(cm, button, pos, repeat, e)) { return }
7312
-
7313
- if (button == 1) {
7314
- if (pos) { leftButtonDown(cm, pos, repeat, e); }
7315
- else if (e_target(e) == display.scroller) { e_preventDefault(e); }
7316
- } else if (button == 2) {
7317
- if (pos) { extendSelection(cm.doc, pos); }
7318
- setTimeout(function () { return display.input.focus(); }, 20);
7319
- } else if (button == 3) {
7320
- if (captureRightClick) { cm.display.input.onContextMenu(e); }
7321
- else { delayBlurEvent(cm); }
7322
- }
7323
- }
7324
-
7325
- function handleMappedButton(cm, button, pos, repeat, event) {
7326
- var name = "Click";
7327
- if (repeat == "double") { name = "Double" + name; }
7328
- else if (repeat == "triple") { name = "Triple" + name; }
7329
- name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name;
7330
-
7331
- return dispatchKey(cm, addModifierNames(name, event), event, function (bound) {
7332
- if (typeof bound == "string") { bound = commands[bound]; }
7333
- if (!bound) { return false }
7334
- var done = false;
7335
- try {
7336
- if (cm.isReadOnly()) { cm.state.suppressEdits = true; }
7337
- done = bound(cm, pos) != Pass;
7338
- } finally {
7339
- cm.state.suppressEdits = false;
7340
- }
7341
- return done
7342
- })
7343
- }
7344
-
7345
- function configureMouse(cm, repeat, event) {
7346
- var option = cm.getOption("configureMouse");
7347
- var value = option ? option(cm, repeat, event) : {};
7348
- if (value.unit == null) {
7349
- var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey;
7350
- value.unit = rect ? "rectangle" : repeat == "single" ? "char" : repeat == "double" ? "word" : "line";
7351
- }
7352
- if (value.extend == null || cm.doc.extend) { value.extend = cm.doc.extend || event.shiftKey; }
7353
- if (value.addNew == null) { value.addNew = mac ? event.metaKey : event.ctrlKey; }
7354
- if (value.moveOnDrag == null) { value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey); }
7355
- return value
7356
- }
7357
-
7358
- function leftButtonDown(cm, pos, repeat, event) {
7359
- if (ie) { setTimeout(bind(ensureFocus, cm), 0); }
7360
- else { cm.curOp.focus = activeElt(); }
7361
-
7362
- var behavior = configureMouse(cm, repeat, event);
7363
-
7364
- var sel = cm.doc.sel, contained;
7365
- if (cm.options.dragDrop && dragAndDrop && !cm.isReadOnly() &&
7366
- repeat == "single" && (contained = sel.contains(pos)) > -1 &&
7367
- (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) &&
7368
- (cmp(contained.to(), pos) > 0 || pos.xRel < 0))
7369
- { leftButtonStartDrag(cm, event, pos, behavior); }
7370
- else
7371
- { leftButtonSelect(cm, event, pos, behavior); }
7372
- }
7373
-
7374
- // Start a text drag. When it ends, see if any dragging actually
7375
- // happen, and treat as a click if it didn't.
7376
- function leftButtonStartDrag(cm, event, pos, behavior) {
7377
- var display = cm.display, moved = false;
7378
- var dragEnd = operation(cm, function (e) {
7379
- if (webkit) { display.scroller.draggable = false; }
7380
- cm.state.draggingText = false;
7381
- off(display.wrapper.ownerDocument, "mouseup", dragEnd);
7382
- off(display.wrapper.ownerDocument, "mousemove", mouseMove);
7383
- off(display.scroller, "dragstart", dragStart);
7384
- off(display.scroller, "drop", dragEnd);
7385
- if (!moved) {
7386
- e_preventDefault(e);
7387
- if (!behavior.addNew)
7388
- { extendSelection(cm.doc, pos, null, null, behavior.extend); }
7389
- // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081)
7390
- if (webkit || ie && ie_version == 9)
7391
- { setTimeout(function () {display.wrapper.ownerDocument.body.focus(); display.input.focus();}, 20); }
7392
- else
7393
- { display.input.focus(); }
7394
- }
7395
- });
7396
- var mouseMove = function(e2) {
7397
- moved = moved || Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10;
7398
- };
7399
- var dragStart = function () { return moved = true; };
7400
- // Let the drag handler handle this.
7401
- if (webkit) { display.scroller.draggable = true; }
7402
- cm.state.draggingText = dragEnd;
7403
- dragEnd.copy = !behavior.moveOnDrag;
7404
- // IE's approach to draggable
7405
- if (display.scroller.dragDrop) { display.scroller.dragDrop(); }
7406
- on(display.wrapper.ownerDocument, "mouseup", dragEnd);
7407
- on(display.wrapper.ownerDocument, "mousemove", mouseMove);
7408
- on(display.scroller, "dragstart", dragStart);
7409
- on(display.scroller, "drop", dragEnd);
7410
-
7411
- delayBlurEvent(cm);
7412
- setTimeout(function () { return display.input.focus(); }, 20);
7413
- }
7414
-
7415
- function rangeForUnit(cm, pos, unit) {
7416
- if (unit == "char") { return new Range(pos, pos) }
7417
- if (unit == "word") { return cm.findWordAt(pos) }
7418
- if (unit == "line") { return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) }
7419
- var result = unit(cm, pos);
7420
- return new Range(result.from, result.to)
7421
- }
7422
-
7423
- // Normal selection, as opposed to text dragging.
7424
- function leftButtonSelect(cm, event, start, behavior) {
7425
- var display = cm.display, doc = cm.doc;
7426
- e_preventDefault(event);
7427
-
7428
- var ourRange, ourIndex, startSel = doc.sel, ranges = startSel.ranges;
7429
- if (behavior.addNew && !behavior.extend) {
7430
- ourIndex = doc.sel.contains(start);
7431
- if (ourIndex > -1)
7432
- { ourRange = ranges[ourIndex]; }
7433
- else
7434
- { ourRange = new Range(start, start); }
7435
- } else {
7436
- ourRange = doc.sel.primary();
7437
- ourIndex = doc.sel.primIndex;
7438
- }
7439
-
7440
- if (behavior.unit == "rectangle") {
7441
- if (!behavior.addNew) { ourRange = new Range(start, start); }
7442
- start = posFromMouse(cm, event, true, true);
7443
- ourIndex = -1;
7444
- } else {
7445
- var range$$1 = rangeForUnit(cm, start, behavior.unit);
7446
- if (behavior.extend)
7447
- { ourRange = extendRange(ourRange, range$$1.anchor, range$$1.head, behavior.extend); }
7448
- else
7449
- { ourRange = range$$1; }
7450
- }
7451
-
7452
- if (!behavior.addNew) {
7453
- ourIndex = 0;
7454
- setSelection(doc, new Selection([ourRange], 0), sel_mouse);
7455
- startSel = doc.sel;
7456
- } else if (ourIndex == -1) {
7457
- ourIndex = ranges.length;
7458
- setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex),
7459
- {scroll: false, origin: "*mouse"});
7460
- } else if (ranges.length > 1 && ranges[ourIndex].empty() && behavior.unit == "char" && !behavior.extend) {
7461
- setSelection(doc, normalizeSelection(cm, ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), 0),
7462
- {scroll: false, origin: "*mouse"});
7463
- startSel = doc.sel;
7464
- } else {
7465
- replaceOneSelection(doc, ourIndex, ourRange, sel_mouse);
7466
- }
7467
-
7468
- var lastPos = start;
7469
- function extendTo(pos) {
7470
- if (cmp(lastPos, pos) == 0) { return }
7471
- lastPos = pos;
7472
-
7473
- if (behavior.unit == "rectangle") {
7474
- var ranges = [], tabSize = cm.options.tabSize;
7475
- var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize);
7476
- var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize);
7477
- var left = Math.min(startCol, posCol), right = Math.max(startCol, posCol);
7478
- for (var line = Math.min(start.line, pos.line), end = Math.min(cm.lastLine(), Math.max(start.line, pos.line));
7479
- line <= end; line++) {
7480
- var text = getLine(doc, line).text, leftPos = findColumn(text, left, tabSize);
7481
- if (left == right)
7482
- { ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))); }
7483
- else if (text.length > leftPos)
7484
- { ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize)))); }
7485
- }
7486
- if (!ranges.length) { ranges.push(new Range(start, start)); }
7487
- setSelection(doc, normalizeSelection(cm, startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
7488
- {origin: "*mouse", scroll: false});
7489
- cm.scrollIntoView(pos);
7490
- } else {
7491
- var oldRange = ourRange;
7492
- var range$$1 = rangeForUnit(cm, pos, behavior.unit);
7493
- var anchor = oldRange.anchor, head;
7494
- if (cmp(range$$1.anchor, anchor) > 0) {
7495
- head = range$$1.head;
7496
- anchor = minPos(oldRange.from(), range$$1.anchor);
7497
- } else {
7498
- head = range$$1.anchor;
7499
- anchor = maxPos(oldRange.to(), range$$1.head);
7500
- }
7501
- var ranges$1 = startSel.ranges.slice(0);
7502
- ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head));
7503
- setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse);
7504
- }
7505
- }
7506
-
7507
- var editorSize = display.wrapper.getBoundingClientRect();
7508
- // Used to ensure timeout re-tries don't fire when another extend
7509
- // happened in the meantime (clearTimeout isn't reliable -- at
7510
- // least on Chrome, the timeouts still happen even when cleared,
7511
- // if the clear happens after their scheduled firing time).
7512
- var counter = 0;
7513
-
7514
- function extend(e) {
7515
- var curCount = ++counter;
7516
- var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle");
7517
- if (!cur) { return }
7518
- if (cmp(cur, lastPos) != 0) {
7519
- cm.curOp.focus = activeElt();
7520
- extendTo(cur);
7521
- var visible = visibleLines(display, doc);
7522
- if (cur.line >= visible.to || cur.line < visible.from)
7523
- { setTimeout(operation(cm, function () {if (counter == curCount) { extend(e); }}), 150); }
7524
- } else {
7525
- var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0;
7526
- if (outside) { setTimeout(operation(cm, function () {
7527
- if (counter != curCount) { return }
7528
- display.scroller.scrollTop += outside;
7529
- extend(e);
7530
- }), 50); }
7531
- }
7532
- }
7533
-
7534
- function done(e) {
7535
- cm.state.selectingText = false;
7536
- counter = Infinity;
7537
- // If e is null or undefined we interpret this as someone trying
7538
- // to explicitly cancel the selection rather than the user
7539
- // letting go of the mouse button.
7540
- if (e) {
7541
- e_preventDefault(e);
7542
- display.input.focus();
7543
- }
7544
- off(display.wrapper.ownerDocument, "mousemove", move);
7545
- off(display.wrapper.ownerDocument, "mouseup", up);
7546
- doc.history.lastSelOrigin = null;
7547
- }
7548
-
7549
- var move = operation(cm, function (e) {
7550
- if (e.buttons === 0 || !e_button(e)) { done(e); }
7551
- else { extend(e); }
7552
- });
7553
- var up = operation(cm, done);
7554
- cm.state.selectingText = up;
7555
- on(display.wrapper.ownerDocument, "mousemove", move);
7556
- on(display.wrapper.ownerDocument, "mouseup", up);
7557
- }
7558
-
7559
- // Used when mouse-selecting to adjust the anchor to the proper side
7560
- // of a bidi jump depending on the visual position of the head.
7561
- function bidiSimplify(cm, range$$1) {
7562
- var anchor = range$$1.anchor;
7563
- var head = range$$1.head;
7564
- var anchorLine = getLine(cm.doc, anchor.line);
7565
- if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { return range$$1 }
7566
- var order = getOrder(anchorLine);
7567
- if (!order) { return range$$1 }
7568
- var index = getBidiPartAt(order, anchor.ch, anchor.sticky), part = order[index];
7569
- if (part.from != anchor.ch && part.to != anchor.ch) { return range$$1 }
7570
- var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1);
7571
- if (boundary == 0 || boundary == order.length) { return range$$1 }
7572
-
7573
- // Compute the relative visual position of the head compared to the
7574
- // anchor (<0 is to the left, >0 to the right)
7575
- var leftSide;
7576
- if (head.line != anchor.line) {
7577
- leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0;
7578
- } else {
7579
- var headIndex = getBidiPartAt(order, head.ch, head.sticky);
7580
- var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1);
7581
- if (headIndex == boundary - 1 || headIndex == boundary)
7582
- { leftSide = dir < 0; }
7583
- else
7584
- { leftSide = dir > 0; }
7585
- }
7586
-
7587
- var usePart = order[boundary + (leftSide ? -1 : 0)];
7588
- var from = leftSide == (usePart.level == 1);
7589
- var ch = from ? usePart.from : usePart.to, sticky = from ? "after" : "before";
7590
- return anchor.ch == ch && anchor.sticky == sticky ? range$$1 : new Range(new Pos(anchor.line, ch, sticky), head)
7591
- }
7592
-
7593
-
7594
- // Determines whether an event happened in the gutter, and fires the
7595
- // handlers for the corresponding event.
7596
- function gutterEvent(cm, e, type, prevent) {
7597
- var mX, mY;
7598
- if (e.touches) {
7599
- mX = e.touches[0].clientX;
7600
- mY = e.touches[0].clientY;
7601
- } else {
7602
- try { mX = e.clientX; mY = e.clientY; }
7603
- catch(e) { return false }
7604
- }
7605
- if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { return false }
7606
- if (prevent) { e_preventDefault(e); }
7607
-
7608
- var display = cm.display;
7609
- var lineBox = display.lineDiv.getBoundingClientRect();
7610
-
7611
- if (mY > lineBox.bottom || !hasHandler(cm, type)) { return e_defaultPrevented(e) }
7612
- mY -= lineBox.top - display.viewOffset;
7613
-
7614
- for (var i = 0; i < cm.display.gutterSpecs.length; ++i) {
7615
- var g = display.gutters.childNodes[i];
7616
- if (g && g.getBoundingClientRect().right >= mX) {
7617
- var line = lineAtHeight(cm.doc, mY);
7618
- var gutter = cm.display.gutterSpecs[i];
7619
- signal(cm, type, cm, line, gutter.className, e);
7620
- return e_defaultPrevented(e)
7621
- }
7622
- }
7623
- }
7624
-
7625
- function clickInGutter(cm, e) {
7626
- return gutterEvent(cm, e, "gutterClick", true)
7627
- }
7628
-
7629
- // CONTEXT MENU HANDLING
7630
-
7631
- // To make the context menu work, we need to briefly unhide the
7632
- // textarea (making it as unobtrusive as possible) to let the
7633
- // right-click take effect on it.
7634
- function onContextMenu(cm, e) {
7635
- if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { return }
7636
- if (signalDOMEvent(cm, e, "contextmenu")) { return }
7637
- if (!captureRightClick) { cm.display.input.onContextMenu(e); }
7638
- }
7639
-
7640
- function contextMenuInGutter(cm, e) {
7641
- if (!hasHandler(cm, "gutterContextMenu")) { return false }
7642
- return gutterEvent(cm, e, "gutterContextMenu", false)
7643
- }
7644
-
7645
- function themeChanged(cm) {
7646
- cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") +
7647
- cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-");
7648
- clearCaches(cm);
7649
- }
7650
-
7651
- var Init = {toString: function(){return "CodeMirror.Init"}};
7652
-
7653
- var defaults = {};
7654
- var optionHandlers = {};
7655
-
7656
- function defineOptions(CodeMirror) {
7657
- var optionHandlers = CodeMirror.optionHandlers;
7658
-
7659
- function option(name, deflt, handle, notOnInit) {
7660
- CodeMirror.defaults[name] = deflt;
7661
- if (handle) { optionHandlers[name] =
7662
- notOnInit ? function (cm, val, old) {if (old != Init) { handle(cm, val, old); }} : handle; }
7663
- }
7664
-
7665
- CodeMirror.defineOption = option;
7666
-
7667
- // Passed to option handlers when there is no old value.
7668
- CodeMirror.Init = Init;
7669
-
7670
- // These two are, on init, called from the constructor because they
7671
- // have to be initialized before the editor can start at all.
7672
- option("value", "", function (cm, val) { return cm.setValue(val); }, true);
7673
- option("mode", null, function (cm, val) {
7674
- cm.doc.modeOption = val;
7675
- loadMode(cm);
7676
- }, true);
7677
-
7678
- option("indentUnit", 2, loadMode, true);
7679
- option("indentWithTabs", false);
7680
- option("smartIndent", true);
7681
- option("tabSize", 4, function (cm) {
7682
- resetModeState(cm);
7683
- clearCaches(cm);
7684
- regChange(cm);
7685
- }, true);
7686
-
7687
- option("lineSeparator", null, function (cm, val) {
7688
- cm.doc.lineSep = val;
7689
- if (!val) { return }
7690
- var newBreaks = [], lineNo = cm.doc.first;
7691
- cm.doc.iter(function (line) {
7692
- for (var pos = 0;;) {
7693
- var found = line.text.indexOf(val, pos);
7694
- if (found == -1) { break }
7695
- pos = found + val.length;
7696
- newBreaks.push(Pos(lineNo, found));
7697
- }
7698
- lineNo++;
7699
- });
7700
- for (var i = newBreaks.length - 1; i >= 0; i--)
7701
- { replaceRange(cm.doc, val, newBreaks[i], Pos(newBreaks[i].line, newBreaks[i].ch + val.length)); }
7702
- });
7703
- option("specialChars", /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g, function (cm, val, old) {
7704
- cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g");
7705
- if (old != Init) { cm.refresh(); }
7706
- });
7707
- option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function (cm) { return cm.refresh(); }, true);
7708
- option("electricChars", true);
7709
- option("inputStyle", mobile ? "contenteditable" : "textarea", function () {
7710
- throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME
7711
- }, true);
7712
- option("spellcheck", false, function (cm, val) { return cm.getInputField().spellcheck = val; }, true);
7713
- option("autocorrect", false, function (cm, val) { return cm.getInputField().autocorrect = val; }, true);
7714
- option("autocapitalize", false, function (cm, val) { return cm.getInputField().autocapitalize = val; }, true);
7715
- option("rtlMoveVisually", !windows);
7716
- option("wholeLineUpdateBefore", true);
7717
-
7718
- option("theme", "default", function (cm) {
7719
- themeChanged(cm);
7720
- updateGutters(cm);
7721
- }, true);
7722
- option("keyMap", "default", function (cm, val, old) {
7723
- var next = getKeyMap(val);
7724
- var prev = old != Init && getKeyMap(old);
7725
- if (prev && prev.detach) { prev.detach(cm, next); }
7726
- if (next.attach) { next.attach(cm, prev || null); }
7727
- });
7728
- option("extraKeys", null);
7729
- option("configureMouse", null);
7730
-
7731
- option("lineWrapping", false, wrappingChanged, true);
7732
- option("gutters", [], function (cm, val) {
7733
- cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers);
7734
- updateGutters(cm);
7735
- }, true);
7736
- option("fixedGutter", true, function (cm, val) {
7737
- cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0";
7738
- cm.refresh();
7739
- }, true);
7740
- option("coverGutterNextToScrollbar", false, function (cm) { return updateScrollbars(cm); }, true);
7741
- option("scrollbarStyle", "native", function (cm) {
7742
- initScrollbars(cm);
7743
- updateScrollbars(cm);
7744
- cm.display.scrollbars.setScrollTop(cm.doc.scrollTop);
7745
- cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft);
7746
- }, true);
7747
- option("lineNumbers", false, function (cm, val) {
7748
- cm.display.gutterSpecs = getGutters(cm.options.gutters, val);
7749
- updateGutters(cm);
7750
- }, true);
7751
- option("firstLineNumber", 1, updateGutters, true);
7752
- option("lineNumberFormatter", function (integer) { return integer; }, updateGutters, true);
7753
- option("showCursorWhenSelecting", false, updateSelection, true);
7754
-
7755
- option("resetSelectionOnContextMenu", true);
7756
- option("lineWiseCopyCut", true);
7757
- option("pasteLinesPerSelection", true);
7758
- option("selectionsMayTouch", false);
7759
-
7760
- option("readOnly", false, function (cm, val) {
7761
- if (val == "nocursor") {
7762
- onBlur(cm);
7763
- cm.display.input.blur();
7764
- }
7765
- cm.display.input.readOnlyChanged(val);
7766
- });
7767
- option("disableInput", false, function (cm, val) {if (!val) { cm.display.input.reset(); }}, true);
7768
- option("dragDrop", true, dragDropChanged);
7769
- option("allowDropFileTypes", null);
7770
-
7771
- option("cursorBlinkRate", 530);
7772
- option("cursorScrollMargin", 0);
7773
- option("cursorHeight", 1, updateSelection, true);
7774
- option("singleCursorHeightPerLine", true, updateSelection, true);
7775
- option("workTime", 100);
7776
- option("workDelay", 100);
7777
- option("flattenSpans", true, resetModeState, true);
7778
- option("addModeClass", false, resetModeState, true);
7779
- option("pollInterval", 100);
7780
- option("undoDepth", 200, function (cm, val) { return cm.doc.history.undoDepth = val; });
7781
- option("historyEventDelay", 1250);
7782
- option("viewportMargin", 10, function (cm) { return cm.refresh(); }, true);
7783
- option("maxHighlightLength", 10000, resetModeState, true);
7784
- option("moveInputWithCursor", true, function (cm, val) {
7785
- if (!val) { cm.display.input.resetPosition(); }
7786
- });
7787
-
7788
- option("tabindex", null, function (cm, val) { return cm.display.input.getField().tabIndex = val || ""; });
7789
- option("autofocus", null);
7790
- option("direction", "ltr", function (cm, val) { return cm.doc.setDirection(val); }, true);
7791
- option("phrases", null);
7792
- }
7793
-
7794
- function dragDropChanged(cm, value, old) {
7795
- var wasOn = old && old != Init;
7796
- if (!value != !wasOn) {
7797
- var funcs = cm.display.dragFunctions;
7798
- var toggle = value ? on : off;
7799
- toggle(cm.display.scroller, "dragstart", funcs.start);
7800
- toggle(cm.display.scroller, "dragenter", funcs.enter);
7801
- toggle(cm.display.scroller, "dragover", funcs.over);
7802
- toggle(cm.display.scroller, "dragleave", funcs.leave);
7803
- toggle(cm.display.scroller, "drop", funcs.drop);
7804
- }
7805
- }
7806
-
7807
- function wrappingChanged(cm) {
7808
- if (cm.options.lineWrapping) {
7809
- addClass(cm.display.wrapper, "CodeMirror-wrap");
7810
- cm.display.sizer.style.minWidth = "";
7811
- cm.display.sizerWidth = null;
7812
- } else {
7813
- rmClass(cm.display.wrapper, "CodeMirror-wrap");
7814
- findMaxLine(cm);
7815
- }
7816
- estimateLineHeights(cm);
7817
- regChange(cm);
7818
- clearCaches(cm);
7819
- setTimeout(function () { return updateScrollbars(cm); }, 100);
7820
- }
7821
-
7822
- // A CodeMirror instance represents an editor. This is the object
7823
- // that user code is usually dealing with.
7824
-
7825
- function CodeMirror(place, options) {
7826
- var this$1 = this;
7827
-
7828
- if (!(this instanceof CodeMirror)) { return new CodeMirror(place, options) }
7829
-
7830
- this.options = options = options ? copyObj(options) : {};
7831
- // Determine effective options based on given values and defaults.
7832
- copyObj(defaults, options, false);
7833
-
7834
- var doc = options.value;
7835
- if (typeof doc == "string") { doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction); }
7836
- else if (options.mode) { doc.modeOption = options.mode; }
7837
- this.doc = doc;
7838
-
7839
- var input = new CodeMirror.inputStyles[options.inputStyle](this);
7840
- var display = this.display = new Display(place, doc, input, options);
7841
- display.wrapper.CodeMirror = this;
7842
- themeChanged(this);
7843
- if (options.lineWrapping)
7844
- { this.display.wrapper.className += " CodeMirror-wrap"; }
7845
- initScrollbars(this);
7846
-
7847
- this.state = {
7848
- keyMaps: [], // stores maps added by addKeyMap
7849
- overlays: [], // highlighting overlays, as added by addOverlay
7850
- modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info
7851
- overwrite: false,
7852
- delayingBlurEvent: false,
7853
- focused: false,
7854
- suppressEdits: false, // used to disable editing during key handlers when in readOnly mode
7855
- pasteIncoming: -1, cutIncoming: -1, // help recognize paste/cut edits in input.poll
7856
- selectingText: false,
7857
- draggingText: false,
7858
- highlight: new Delayed(), // stores highlight worker timeout
7859
- keySeq: null, // Unfinished key sequence
7860
- specialChars: null
7861
- };
7862
-
7863
- if (options.autofocus && !mobile) { display.input.focus(); }
7864
-
7865
- // Override magic textarea content restore that IE sometimes does
7866
- // on our hidden textarea on reload
7867
- if (ie && ie_version < 11) { setTimeout(function () { return this$1.display.input.reset(true); }, 20); }
7868
-
7869
- registerEventHandlers(this);
7870
- ensureGlobalHandlers();
7871
-
7872
- startOperation(this);
7873
- this.curOp.forceUpdate = true;
7874
- attachDoc(this, doc);
7875
-
7876
- if ((options.autofocus && !mobile) || this.hasFocus())
7877
- { setTimeout(bind(onFocus, this), 20); }
7878
- else
7879
- { onBlur(this); }
7880
-
7881
- for (var opt in optionHandlers) { if (optionHandlers.hasOwnProperty(opt))
7882
- { optionHandlers[opt](this$1, options[opt], Init); } }
7883
- maybeUpdateLineNumberWidth(this);
7884
- if (options.finishInit) { options.finishInit(this); }
7885
- for (var i = 0; i < initHooks.length; ++i) { initHooks[i](this$1); }
7886
- endOperation(this);
7887
- // Suppress optimizelegibility in Webkit, since it breaks text
7888
- // measuring on line wrapping boundaries.
7889
- if (webkit && options.lineWrapping &&
7890
- getComputedStyle(display.lineDiv).textRendering == "optimizelegibility")
7891
- { display.lineDiv.style.textRendering = "auto"; }
7892
- }
7893
-
7894
- // The default configuration options.
7895
- CodeMirror.defaults = defaults;
7896
- // Functions to run when options are changed.
7897
- CodeMirror.optionHandlers = optionHandlers;
7898
-
7899
- // Attach the necessary event handlers when initializing the editor
7900
- function registerEventHandlers(cm) {
7901
- var d = cm.display;
7902
- on(d.scroller, "mousedown", operation(cm, onMouseDown));
7903
- // Older IE's will not fire a second mousedown for a double click
7904
- if (ie && ie_version < 11)
7905
- { on(d.scroller, "dblclick", operation(cm, function (e) {
7906
- if (signalDOMEvent(cm, e)) { return }
7907
- var pos = posFromMouse(cm, e);
7908
- if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { return }
7909
- e_preventDefault(e);
7910
- var word = cm.findWordAt(pos);
7911
- extendSelection(cm.doc, word.anchor, word.head);
7912
- })); }
7913
- else
7914
- { on(d.scroller, "dblclick", function (e) { return signalDOMEvent(cm, e) || e_preventDefault(e); }); }
7915
- // Some browsers fire contextmenu *after* opening the menu, at
7916
- // which point we can't mess with it anymore. Context menu is
7917
- // handled in onMouseDown for these browsers.
7918
- on(d.scroller, "contextmenu", function (e) { return onContextMenu(cm, e); });
7919
-
7920
- // Used to suppress mouse event handling when a touch happens
7921
- var touchFinished, prevTouch = {end: 0};
7922
- function finishTouch() {
7923
- if (d.activeTouch) {
7924
- touchFinished = setTimeout(function () { return d.activeTouch = null; }, 1000);
7925
- prevTouch = d.activeTouch;
7926
- prevTouch.end = +new Date;
7927
- }
7928
- }
7929
- function isMouseLikeTouchEvent(e) {
7930
- if (e.touches.length != 1) { return false }
7931
- var touch = e.touches[0];
7932
- return touch.radiusX <= 1 && touch.radiusY <= 1
7933
- }
7934
- function farAway(touch, other) {
7935
- if (other.left == null) { return true }
7936
- var dx = other.left - touch.left, dy = other.top - touch.top;
7937
- return dx * dx + dy * dy > 20 * 20
7938
- }
7939
- on(d.scroller, "touchstart", function (e) {
7940
- if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) {
7941
- d.input.ensurePolled();
7942
- clearTimeout(touchFinished);
7943
- var now = +new Date;
7944
- d.activeTouch = {start: now, moved: false,
7945
- prev: now - prevTouch.end <= 300 ? prevTouch : null};
7946
- if (e.touches.length == 1) {
7947
- d.activeTouch.left = e.touches[0].pageX;
7948
- d.activeTouch.top = e.touches[0].pageY;
7949
- }
7950
- }
7951
- });
7952
- on(d.scroller, "touchmove", function () {
7953
- if (d.activeTouch) { d.activeTouch.moved = true; }
7954
- });
7955
- on(d.scroller, "touchend", function (e) {
7956
- var touch = d.activeTouch;
7957
- if (touch && !eventInWidget(d, e) && touch.left != null &&
7958
- !touch.moved && new Date - touch.start < 300) {
7959
- var pos = cm.coordsChar(d.activeTouch, "page"), range;
7960
- if (!touch.prev || farAway(touch, touch.prev)) // Single tap
7961
- { range = new Range(pos, pos); }
7962
- else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) // Double tap
7963
- { range = cm.findWordAt(pos); }
7964
- else // Triple tap
7965
- { range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))); }
7966
- cm.setSelection(range.anchor, range.head);
7967
- cm.focus();
7968
- e_preventDefault(e);
7969
- }
7970
- finishTouch();
7971
- });
7972
- on(d.scroller, "touchcancel", finishTouch);
7973
-
7974
- // Sync scrolling between fake scrollbars and real scrollable
7975
- // area, ensure viewport is updated when scrolling.
7976
- on(d.scroller, "scroll", function () {
7977
- if (d.scroller.clientHeight) {
7978
- updateScrollTop(cm, d.scroller.scrollTop);
7979
- setScrollLeft(cm, d.scroller.scrollLeft, true);
7980
- signal(cm, "scroll", cm);
7981
- }
7982
- });
7983
-
7984
- // Listen to wheel events in order to try and update the viewport on time.
7985
- on(d.scroller, "mousewheel", function (e) { return onScrollWheel(cm, e); });
7986
- on(d.scroller, "DOMMouseScroll", function (e) { return onScrollWheel(cm, e); });
7987
-
7988
- // Prevent wrapper from ever scrolling
7989
- on(d.wrapper, "scroll", function () { return d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
7990
-
7991
- d.dragFunctions = {
7992
- enter: function (e) {if (!signalDOMEvent(cm, e)) { e_stop(e); }},
7993
- over: function (e) {if (!signalDOMEvent(cm, e)) { onDragOver(cm, e); e_stop(e); }},
7994
- start: function (e) { return onDragStart(cm, e); },
7995
- drop: operation(cm, onDrop),
7996
- leave: function (e) {if (!signalDOMEvent(cm, e)) { clearDragCursor(cm); }}
7997
- };
7998
-
7999
- var inp = d.input.getField();
8000
- on(inp, "keyup", function (e) { return onKeyUp.call(cm, e); });
8001
- on(inp, "keydown", operation(cm, onKeyDown));
8002
- on(inp, "keypress", operation(cm, onKeyPress));
8003
- on(inp, "focus", function (e) { return onFocus(cm, e); });
8004
- on(inp, "blur", function (e) { return onBlur(cm, e); });
8005
- }
8006
-
8007
- var initHooks = [];
8008
- CodeMirror.defineInitHook = function (f) { return initHooks.push(f); };
8009
-
8010
- // Indent the given line. The how parameter can be "smart",
8011
- // "add"/null, "subtract", or "prev". When aggressive is false
8012
- // (typically set to true for forced single-line indents), empty
8013
- // lines are not indented, and places where the mode returns Pass
8014
- // are left alone.
8015
- function indentLine(cm, n, how, aggressive) {
8016
- var doc = cm.doc, state;
8017
- if (how == null) { how = "add"; }
8018
- if (how == "smart") {
8019
- // Fall back to "prev" when the mode doesn't have an indentation
8020
- // method.
8021
- if (!doc.mode.indent) { how = "prev"; }
8022
- else { state = getContextBefore(cm, n).state; }
8023
- }
8024
-
8025
- var tabSize = cm.options.tabSize;
8026
- var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize);
8027
- if (line.stateAfter) { line.stateAfter = null; }
8028
- var curSpaceString = line.text.match(/^\s*/)[0], indentation;
8029
- if (!aggressive && !/\S/.test(line.text)) {
8030
- indentation = 0;
8031
- how = "not";
8032
- } else if (how == "smart") {
8033
- indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text);
8034
- if (indentation == Pass || indentation > 150) {
8035
- if (!aggressive) { return }
8036
- how = "prev";
8037
- }
8038
- }
8039
- if (how == "prev") {
8040
- if (n > doc.first) { indentation = countColumn(getLine(doc, n-1).text, null, tabSize); }
8041
- else { indentation = 0; }
8042
- } else if (how == "add") {
8043
- indentation = curSpace + cm.options.indentUnit;
8044
- } else if (how == "subtract") {
8045
- indentation = curSpace - cm.options.indentUnit;
8046
- } else if (typeof how == "number") {
8047
- indentation = curSpace + how;
8048
- }
8049
- indentation = Math.max(0, indentation);
8050
-
8051
- var indentString = "", pos = 0;
8052
- if (cm.options.indentWithTabs)
8053
- { for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} }
8054
- if (pos < indentation) { indentString += spaceStr(indentation - pos); }
8055
-
8056
- if (indentString != curSpaceString) {
8057
- replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input");
8058
- line.stateAfter = null;
8059
- return true
8060
- } else {
8061
- // Ensure that, if the cursor was in the whitespace at the start
8062
- // of the line, it is moved to the end of that space.
8063
- for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) {
8064
- var range = doc.sel.ranges[i$1];
8065
- if (range.head.line == n && range.head.ch < curSpaceString.length) {
8066
- var pos$1 = Pos(n, curSpaceString.length);
8067
- replaceOneSelection(doc, i$1, new Range(pos$1, pos$1));
8068
- break
8069
- }
8070
- }
8071
- }
8072
- }
8073
-
8074
- // This will be set to a {lineWise: bool, text: [string]} object, so
8075
- // that, when pasting, we know what kind of selections the copied
8076
- // text was made out of.
8077
- var lastCopied = null;
8078
-
8079
- function setLastCopied(newLastCopied) {
8080
- lastCopied = newLastCopied;
8081
- }
8082
-
8083
- function applyTextInput(cm, inserted, deleted, sel, origin) {
8084
- var doc = cm.doc;
8085
- cm.display.shift = false;
8086
- if (!sel) { sel = doc.sel; }
8087
-
8088
- var recent = +new Date - 200;
8089
- var paste = origin == "paste" || cm.state.pasteIncoming > recent;
8090
- var textLines = splitLinesAuto(inserted), multiPaste = null;
8091
- // When pasting N lines into N selections, insert one line per selection
8092
- if (paste && sel.ranges.length > 1) {
8093
- if (lastCopied && lastCopied.text.join("\n") == inserted) {
8094
- if (sel.ranges.length % lastCopied.text.length == 0) {
8095
- multiPaste = [];
8096
- for (var i = 0; i < lastCopied.text.length; i++)
8097
- { multiPaste.push(doc.splitLines(lastCopied.text[i])); }
8098
- }
8099
- } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) {
8100
- multiPaste = map(textLines, function (l) { return [l]; });
8101
- }
8102
- }
8103
-
8104
- var updateInput = cm.curOp.updateInput;
8105
- // Normal behavior is to insert the new text into every selection
8106
- for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) {
8107
- var range$$1 = sel.ranges[i$1];
8108
- var from = range$$1.from(), to = range$$1.to();
8109
- if (range$$1.empty()) {
8110
- if (deleted && deleted > 0) // Handle deletion
8111
- { from = Pos(from.line, from.ch - deleted); }
8112
- else if (cm.state.overwrite && !paste) // Handle overwrite
8113
- { to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length)); }
8114
- else if (paste && lastCopied && lastCopied.lineWise && lastCopied.text.join("\n") == inserted)
8115
- { from = to = Pos(from.line, 0); }
8116
- }
8117
- var changeEvent = {from: from, to: to, text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines,
8118
- origin: origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input")};
8119
- makeChange(cm.doc, changeEvent);
8120
- signalLater(cm, "inputRead", cm, changeEvent);
8121
- }
8122
- if (inserted && !paste)
8123
- { triggerElectric(cm, inserted); }
8124
-
8125
- ensureCursorVisible(cm);
8126
- if (cm.curOp.updateInput < 2) { cm.curOp.updateInput = updateInput; }
8127
- cm.curOp.typing = true;
8128
- cm.state.pasteIncoming = cm.state.cutIncoming = -1;
8129
- }
8130
-
8131
- function handlePaste(e, cm) {
8132
- var pasted = e.clipboardData && e.clipboardData.getData("Text");
8133
- if (pasted) {
8134
- e.preventDefault();
8135
- if (!cm.isReadOnly() && !cm.options.disableInput)
8136
- { runInOp(cm, function () { return applyTextInput(cm, pasted, 0, null, "paste"); }); }
8137
- return true
8138
- }
8139
- }
8140
-
8141
- function triggerElectric(cm, inserted) {
8142
- // When an 'electric' character is inserted, immediately trigger a reindent
8143
- if (!cm.options.electricChars || !cm.options.smartIndent) { return }
8144
- var sel = cm.doc.sel;
8145
-
8146
- for (var i = sel.ranges.length - 1; i >= 0; i--) {
8147
- var range$$1 = sel.ranges[i];
8148
- if (range$$1.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range$$1.head.line)) { continue }
8149
- var mode = cm.getModeAt(range$$1.head);
8150
- var indented = false;
8151
- if (mode.electricChars) {
8152
- for (var j = 0; j < mode.electricChars.length; j++)
8153
- { if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) {
8154
- indented = indentLine(cm, range$$1.head.line, "smart");
8155
- break
8156
- } }
8157
- } else if (mode.electricInput) {
8158
- if (mode.electricInput.test(getLine(cm.doc, range$$1.head.line).text.slice(0, range$$1.head.ch)))
8159
- { indented = indentLine(cm, range$$1.head.line, "smart"); }
8160
- }
8161
- if (indented) { signalLater(cm, "electricInput", cm, range$$1.head.line); }
8162
- }
8163
- }
8164
-
8165
- function copyableRanges(cm) {
8166
- var text = [], ranges = [];
8167
- for (var i = 0; i < cm.doc.sel.ranges.length; i++) {
8168
- var line = cm.doc.sel.ranges[i].head.line;
8169
- var lineRange = {anchor: Pos(line, 0), head: Pos(line + 1, 0)};
8170
- ranges.push(lineRange);
8171
- text.push(cm.getRange(lineRange.anchor, lineRange.head));
8172
- }
8173
- return {text: text, ranges: ranges}
8174
- }
8175
-
8176
- function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) {
8177
- field.setAttribute("autocorrect", autocorrect ? "" : "off");
8178
- field.setAttribute("autocapitalize", autocapitalize ? "" : "off");
8179
- field.setAttribute("spellcheck", !!spellcheck);
8180
- }
8181
-
8182
- function hiddenTextarea() {
8183
- var te = elt("textarea", null, null, "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");
8184
- var div = elt("div", [te], null, "overflow: hidden; position: relative; width: 3px; height: 0px;");
8185
- // The textarea is kept positioned near the cursor to prevent the
8186
- // fact that it'll be scrolled into view on input from scrolling
8187
- // our fake cursor out of view. On webkit, when wrap=off, paste is
8188
- // very slow. So make the area wide instead.
8189
- if (webkit) { te.style.width = "1000px"; }
8190
- else { te.setAttribute("wrap", "off"); }
8191
- // If border: 0; -- iOS fails to open keyboard (issue #1287)
8192
- if (ios) { te.style.border = "1px solid black"; }
8193
- disableBrowserMagic(te);
8194
- return div
8195
- }
8196
-
8197
- // The publicly visible API. Note that methodOp(f) means
8198
- // 'wrap f in an operation, performed on its `this` parameter'.
8199
-
8200
- // This is not the complete set of editor methods. Most of the
8201
- // methods defined on the Doc type are also injected into
8202
- // CodeMirror.prototype, for backwards compatibility and
8203
- // convenience.
8204
-
8205
- function addEditorMethods(CodeMirror) {
8206
- var optionHandlers = CodeMirror.optionHandlers;
8207
-
8208
- var helpers = CodeMirror.helpers = {};
8209
-
8210
- CodeMirror.prototype = {
8211
- constructor: CodeMirror,
8212
- focus: function(){window.focus(); this.display.input.focus();},
8213
-
8214
- setOption: function(option, value) {
8215
- var options = this.options, old = options[option];
8216
- if (options[option] == value && option != "mode") { return }
8217
- options[option] = value;
8218
- if (optionHandlers.hasOwnProperty(option))
8219
- { operation(this, optionHandlers[option])(this, value, old); }
8220
- signal(this, "optionChange", this, option);
8221
- },
8222
-
8223
- getOption: function(option) {return this.options[option]},
8224
- getDoc: function() {return this.doc},
8225
-
8226
- addKeyMap: function(map$$1, bottom) {
8227
- this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map$$1));
8228
- },
8229
- removeKeyMap: function(map$$1) {
8230
- var maps = this.state.keyMaps;
8231
- for (var i = 0; i < maps.length; ++i)
8232
- { if (maps[i] == map$$1 || maps[i].name == map$$1) {
8233
- maps.splice(i, 1);
8234
- return true
8235
- } }
8236
- },
8237
-
8238
- addOverlay: methodOp(function(spec, options) {
8239
- var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec);
8240
- if (mode.startState) { throw new Error("Overlays may not be stateful.") }
8241
- insertSorted(this.state.overlays,
8242
- {mode: mode, modeSpec: spec, opaque: options && options.opaque,
8243
- priority: (options && options.priority) || 0},
8244
- function (overlay) { return overlay.priority; });
8245
- this.state.modeGen++;
8246
- regChange(this);
8247
- }),
8248
- removeOverlay: methodOp(function(spec) {
8249
- var this$1 = this;
8250
-
8251
- var overlays = this.state.overlays;
8252
- for (var i = 0; i < overlays.length; ++i) {
8253
- var cur = overlays[i].modeSpec;
8254
- if (cur == spec || typeof spec == "string" && cur.name == spec) {
8255
- overlays.splice(i, 1);
8256
- this$1.state.modeGen++;
8257
- regChange(this$1);
8258
- return
8259
- }
8260
- }
8261
- }),
8262
-
8263
- indentLine: methodOp(function(n, dir, aggressive) {
8264
- if (typeof dir != "string" && typeof dir != "number") {
8265
- if (dir == null) { dir = this.options.smartIndent ? "smart" : "prev"; }
8266
- else { dir = dir ? "add" : "subtract"; }
8267
- }
8268
- if (isLine(this.doc, n)) { indentLine(this, n, dir, aggressive); }
8269
- }),
8270
- indentSelection: methodOp(function(how) {
8271
- var this$1 = this;
8272
-
8273
- var ranges = this.doc.sel.ranges, end = -1;
8274
- for (var i = 0; i < ranges.length; i++) {
8275
- var range$$1 = ranges[i];
8276
- if (!range$$1.empty()) {
8277
- var from = range$$1.from(), to = range$$1.to();
8278
- var start = Math.max(end, from.line);
8279
- end = Math.min(this$1.lastLine(), to.line - (to.ch ? 0 : 1)) + 1;
8280
- for (var j = start; j < end; ++j)
8281
- { indentLine(this$1, j, how); }
8282
- var newRanges = this$1.doc.sel.ranges;
8283
- if (from.ch == 0 && ranges.length == newRanges.length && newRanges[i].from().ch > 0)
8284
- { replaceOneSelection(this$1.doc, i, new Range(from, newRanges[i].to()), sel_dontScroll); }
8285
- } else if (range$$1.head.line > end) {
8286
- indentLine(this$1, range$$1.head.line, how, true);
8287
- end = range$$1.head.line;
8288
- if (i == this$1.doc.sel.primIndex) { ensureCursorVisible(this$1); }
8289
- }
8290
- }
8291
- }),
8292
-
8293
- // Fetch the parser token for a given character. Useful for hacks
8294
- // that want to inspect the mode state (say, for completion).
8295
- getTokenAt: function(pos, precise) {
8296
- return takeToken(this, pos, precise)
8297
- },
8298
-
8299
- getLineTokens: function(line, precise) {
8300
- return takeToken(this, Pos(line), precise, true)
8301
- },
8302
-
8303
- getTokenTypeAt: function(pos) {
8304
- pos = clipPos(this.doc, pos);
8305
- var styles = getLineStyles(this, getLine(this.doc, pos.line));
8306
- var before = 0, after = (styles.length - 1) / 2, ch = pos.ch;
8307
- var type;
8308
- if (ch == 0) { type = styles[2]; }
8309
- else { for (;;) {
8310
- var mid = (before + after) >> 1;
8311
- if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { after = mid; }
8312
- else if (styles[mid * 2 + 1] < ch) { before = mid + 1; }
8313
- else { type = styles[mid * 2 + 2]; break }
8314
- } }
8315
- var cut = type ? type.indexOf("overlay ") : -1;
8316
- return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1)
8317
- },
8318
-
8319
- getModeAt: function(pos) {
8320
- var mode = this.doc.mode;
8321
- if (!mode.innerMode) { return mode }
8322
- return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode
8323
- },
8324
-
8325
- getHelper: function(pos, type) {
8326
- return this.getHelpers(pos, type)[0]
8327
- },
8328
-
8329
- getHelpers: function(pos, type) {
8330
- var this$1 = this;
8331
-
8332
- var found = [];
8333
- if (!helpers.hasOwnProperty(type)) { return found }
8334
- var help = helpers[type], mode = this.getModeAt(pos);
8335
- if (typeof mode[type] == "string") {
8336
- if (help[mode[type]]) { found.push(help[mode[type]]); }
8337
- } else if (mode[type]) {
8338
- for (var i = 0; i < mode[type].length; i++) {
8339
- var val = help[mode[type][i]];
8340
- if (val) { found.push(val); }
8341
- }
8342
- } else if (mode.helperType && help[mode.helperType]) {
8343
- found.push(help[mode.helperType]);
8344
- } else if (help[mode.name]) {
8345
- found.push(help[mode.name]);
8346
- }
8347
- for (var i$1 = 0; i$1 < help._global.length; i$1++) {
8348
- var cur = help._global[i$1];
8349
- if (cur.pred(mode, this$1) && indexOf(found, cur.val) == -1)
8350
- { found.push(cur.val); }
8351
- }
8352
- return found
8353
- },
8354
-
8355
- getStateAfter: function(line, precise) {
8356
- var doc = this.doc;
8357
- line = clipLine(doc, line == null ? doc.first + doc.size - 1: line);
8358
- return getContextBefore(this, line + 1, precise).state
8359
- },
8360
-
8361
- cursorCoords: function(start, mode) {
8362
- var pos, range$$1 = this.doc.sel.primary();
8363
- if (start == null) { pos = range$$1.head; }
8364
- else if (typeof start == "object") { pos = clipPos(this.doc, start); }
8365
- else { pos = start ? range$$1.from() : range$$1.to(); }
8366
- return cursorCoords(this, pos, mode || "page")
8367
- },
8368
-
8369
- charCoords: function(pos, mode) {
8370
- return charCoords(this, clipPos(this.doc, pos), mode || "page")
8371
- },
8372
-
8373
- coordsChar: function(coords, mode) {
8374
- coords = fromCoordSystem(this, coords, mode || "page");
8375
- return coordsChar(this, coords.left, coords.top)
8376
- },
8377
-
8378
- lineAtHeight: function(height, mode) {
8379
- height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top;
8380
- return lineAtHeight(this.doc, height + this.display.viewOffset)
8381
- },
8382
- heightAtLine: function(line, mode, includeWidgets) {
8383
- var end = false, lineObj;
8384
- if (typeof line == "number") {
8385
- var last = this.doc.first + this.doc.size - 1;
8386
- if (line < this.doc.first) { line = this.doc.first; }
8387
- else if (line > last) { line = last; end = true; }
8388
- lineObj = getLine(this.doc, line);
8389
- } else {
8390
- lineObj = line;
8391
- }
8392
- return intoCoordSystem(this, lineObj, {top: 0, left: 0}, mode || "page", includeWidgets || end).top +
8393
- (end ? this.doc.height - heightAtLine(lineObj) : 0)
8394
- },
8395
-
8396
- defaultTextHeight: function() { return textHeight(this.display) },
8397
- defaultCharWidth: function() { return charWidth(this.display) },
8398
-
8399
- getViewport: function() { return {from: this.display.viewFrom, to: this.display.viewTo}},
8400
-
8401
- addWidget: function(pos, node, scroll, vert, horiz) {
8402
- var display = this.display;
8403
- pos = cursorCoords(this, clipPos(this.doc, pos));
8404
- var top = pos.bottom, left = pos.left;
8405
- node.style.position = "absolute";
8406
- node.setAttribute("cm-ignore-events", "true");
8407
- this.display.input.setUneditable(node);
8408
- display.sizer.appendChild(node);
8409
- if (vert == "over") {
8410
- top = pos.top;
8411
- } else if (vert == "above" || vert == "near") {
8412
- var vspace = Math.max(display.wrapper.clientHeight, this.doc.height),
8413
- hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth);
8414
- // Default to positioning above (if specified and possible); otherwise default to positioning below
8415
- if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight)
8416
- { top = pos.top - node.offsetHeight; }
8417
- else if (pos.bottom + node.offsetHeight <= vspace)
8418
- { top = pos.bottom; }
8419
- if (left + node.offsetWidth > hspace)
8420
- { left = hspace - node.offsetWidth; }
8421
- }
8422
- node.style.top = top + "px";
8423
- node.style.left = node.style.right = "";
8424
- if (horiz == "right") {
8425
- left = display.sizer.clientWidth - node.offsetWidth;
8426
- node.style.right = "0px";
8427
- } else {
8428
- if (horiz == "left") { left = 0; }
8429
- else if (horiz == "middle") { left = (display.sizer.clientWidth - node.offsetWidth) / 2; }
8430
- node.style.left = left + "px";
8431
- }
8432
- if (scroll)
8433
- { scrollIntoView(this, {left: left, top: top, right: left + node.offsetWidth, bottom: top + node.offsetHeight}); }
8434
- },
8435
-
8436
- triggerOnKeyDown: methodOp(onKeyDown),
8437
- triggerOnKeyPress: methodOp(onKeyPress),
8438
- triggerOnKeyUp: onKeyUp,
8439
- triggerOnMouseDown: methodOp(onMouseDown),
8440
-
8441
- execCommand: function(cmd) {
8442
- if (commands.hasOwnProperty(cmd))
8443
- { return commands[cmd].call(null, this) }
8444
- },
8445
-
8446
- triggerElectric: methodOp(function(text) { triggerElectric(this, text); }),
8447
-
8448
- findPosH: function(from, amount, unit, visually) {
8449
- var this$1 = this;
8450
-
8451
- var dir = 1;
8452
- if (amount < 0) { dir = -1; amount = -amount; }
8453
- var cur = clipPos(this.doc, from);
8454
- for (var i = 0; i < amount; ++i) {
8455
- cur = findPosH(this$1.doc, cur, dir, unit, visually);
8456
- if (cur.hitSide) { break }
8457
- }
8458
- return cur
8459
- },
8460
-
8461
- moveH: methodOp(function(dir, unit) {
8462
- var this$1 = this;
8463
-
8464
- this.extendSelectionsBy(function (range$$1) {
8465
- if (this$1.display.shift || this$1.doc.extend || range$$1.empty())
8466
- { return findPosH(this$1.doc, range$$1.head, dir, unit, this$1.options.rtlMoveVisually) }
8467
- else
8468
- { return dir < 0 ? range$$1.from() : range$$1.to() }
8469
- }, sel_move);
8470
- }),
8471
-
8472
- deleteH: methodOp(function(dir, unit) {
8473
- var sel = this.doc.sel, doc = this.doc;
8474
- if (sel.somethingSelected())
8475
- { doc.replaceSelection("", null, "+delete"); }
8476
- else
8477
- { deleteNearSelection(this, function (range$$1) {
8478
- var other = findPosH(doc, range$$1.head, dir, unit, false);
8479
- return dir < 0 ? {from: other, to: range$$1.head} : {from: range$$1.head, to: other}
8480
- }); }
8481
- }),
8482
-
8483
- findPosV: function(from, amount, unit, goalColumn) {
8484
- var this$1 = this;
8485
-
8486
- var dir = 1, x = goalColumn;
8487
- if (amount < 0) { dir = -1; amount = -amount; }
8488
- var cur = clipPos(this.doc, from);
8489
- for (var i = 0; i < amount; ++i) {
8490
- var coords = cursorCoords(this$1, cur, "div");
8491
- if (x == null) { x = coords.left; }
8492
- else { coords.left = x; }
8493
- cur = findPosV(this$1, coords, dir, unit);
8494
- if (cur.hitSide) { break }
8495
- }
8496
- return cur
8497
- },
8498
-
8499
- moveV: methodOp(function(dir, unit) {
8500
- var this$1 = this;
8501
-
8502
- var doc = this.doc, goals = [];
8503
- var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected();
8504
- doc.extendSelectionsBy(function (range$$1) {
8505
- if (collapse)
8506
- { return dir < 0 ? range$$1.from() : range$$1.to() }
8507
- var headPos = cursorCoords(this$1, range$$1.head, "div");
8508
- if (range$$1.goalColumn != null) { headPos.left = range$$1.goalColumn; }
8509
- goals.push(headPos.left);
8510
- var pos = findPosV(this$1, headPos, dir, unit);
8511
- if (unit == "page" && range$$1 == doc.sel.primary())
8512
- { addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top); }
8513
- return pos
8514
- }, sel_move);
8515
- if (goals.length) { for (var i = 0; i < doc.sel.ranges.length; i++)
8516
- { doc.sel.ranges[i].goalColumn = goals[i]; } }
8517
- }),
8518
-
8519
- // Find the word at the given position (as returned by coordsChar).
8520
- findWordAt: function(pos) {
8521
- var doc = this.doc, line = getLine(doc, pos.line).text;
8522
- var start = pos.ch, end = pos.ch;
8523
- if (line) {
8524
- var helper = this.getHelper(pos, "wordChars");
8525
- if ((pos.sticky == "before" || end == line.length) && start) { --start; } else { ++end; }
8526
- var startChar = line.charAt(start);
8527
- var check = isWordChar(startChar, helper)
8528
- ? function (ch) { return isWordChar(ch, helper); }
8529
- : /\s/.test(startChar) ? function (ch) { return /\s/.test(ch); }
8530
- : function (ch) { return (!/\s/.test(ch) && !isWordChar(ch)); };
8531
- while (start > 0 && check(line.charAt(start - 1))) { --start; }
8532
- while (end < line.length && check(line.charAt(end))) { ++end; }
8533
- }
8534
- return new Range(Pos(pos.line, start), Pos(pos.line, end))
8535
- },
8536
-
8537
- toggleOverwrite: function(value) {
8538
- if (value != null && value == this.state.overwrite) { return }
8539
- if (this.state.overwrite = !this.state.overwrite)
8540
- { addClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
8541
- else
8542
- { rmClass(this.display.cursorDiv, "CodeMirror-overwrite"); }
8543
-
8544
- signal(this, "overwriteToggle", this, this.state.overwrite);
8545
- },
8546
- hasFocus: function() { return this.display.input.getField() == activeElt() },
8547
- isReadOnly: function() { return !!(this.options.readOnly || this.doc.cantEdit) },
8548
-
8549
- scrollTo: methodOp(function (x, y) { scrollToCoords(this, x, y); }),
8550
- getScrollInfo: function() {
8551
- var scroller = this.display.scroller;
8552
- return {left: scroller.scrollLeft, top: scroller.scrollTop,
8553
- height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight,
8554
- width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth,
8555
- clientHeight: displayHeight(this), clientWidth: displayWidth(this)}
8556
- },
8557
-
8558
- scrollIntoView: methodOp(function(range$$1, margin) {
8559
- if (range$$1 == null) {
8560
- range$$1 = {from: this.doc.sel.primary().head, to: null};
8561
- if (margin == null) { margin = this.options.cursorScrollMargin; }
8562
- } else if (typeof range$$1 == "number") {
8563
- range$$1 = {from: Pos(range$$1, 0), to: null};
8564
- } else if (range$$1.from == null) {
8565
- range$$1 = {from: range$$1, to: null};
8566
- }
8567
- if (!range$$1.to) { range$$1.to = range$$1.from; }
8568
- range$$1.margin = margin || 0;
8569
-
8570
- if (range$$1.from.line != null) {
8571
- scrollToRange(this, range$$1);
8572
- } else {
8573
- scrollToCoordsRange(this, range$$1.from, range$$1.to, range$$1.margin);
8574
- }
8575
- }),
8576
-
8577
- setSize: methodOp(function(width, height) {
8578
- var this$1 = this;
8579
-
8580
- var interpret = function (val) { return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; };
8581
- if (width != null) { this.display.wrapper.style.width = interpret(width); }
8582
- if (height != null) { this.display.wrapper.style.height = interpret(height); }
8583
- if (this.options.lineWrapping) { clearLineMeasurementCache(this); }
8584
- var lineNo$$1 = this.display.viewFrom;
8585
- this.doc.iter(lineNo$$1, this.display.viewTo, function (line) {
8586
- if (line.widgets) { for (var i = 0; i < line.widgets.length; i++)
8587
- { if (line.widgets[i].noHScroll) { regLineChange(this$1, lineNo$$1, "widget"); break } } }
8588
- ++lineNo$$1;
8589
- });
8590
- this.curOp.forceUpdate = true;
8591
- signal(this, "refresh", this);
8592
- }),
8593
-
8594
- operation: function(f){return runInOp(this, f)},
8595
- startOperation: function(){return startOperation(this)},
8596
- endOperation: function(){return endOperation(this)},
8597
-
8598
- refresh: methodOp(function() {
8599
- var oldHeight = this.display.cachedTextHeight;
8600
- regChange(this);
8601
- this.curOp.forceUpdate = true;
8602
- clearCaches(this);
8603
- scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop);
8604
- updateGutterSpace(this.display);
8605
- if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > .5)
8606
- { estimateLineHeights(this); }
8607
- signal(this, "refresh", this);
8608
- }),
8609
-
8610
- swapDoc: methodOp(function(doc) {
8611
- var old = this.doc;
8612
- old.cm = null;
8613
- // Cancel the current text selection if any (#5821)
8614
- if (this.state.selectingText) { this.state.selectingText(); }
8615
- attachDoc(this, doc);
8616
- clearCaches(this);
8617
- this.display.input.reset();
8618
- scrollToCoords(this, doc.scrollLeft, doc.scrollTop);
8619
- this.curOp.forceScroll = true;
8620
- signalLater(this, "swapDoc", this, old);
8621
- return old
8622
- }),
8623
-
8624
- phrase: function(phraseText) {
8625
- var phrases = this.options.phrases;
8626
- return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) ? phrases[phraseText] : phraseText
8627
- },
8628
-
8629
- getInputField: function(){return this.display.input.getField()},
8630
- getWrapperElement: function(){return this.display.wrapper},
8631
- getScrollerElement: function(){return this.display.scroller},
8632
- getGutterElement: function(){return this.display.gutters}
8633
- };
8634
- eventMixin(CodeMirror);
8635
-
8636
- CodeMirror.registerHelper = function(type, name, value) {
8637
- if (!helpers.hasOwnProperty(type)) { helpers[type] = CodeMirror[type] = {_global: []}; }
8638
- helpers[type][name] = value;
8639
- };
8640
- CodeMirror.registerGlobalHelper = function(type, name, predicate, value) {
8641
- CodeMirror.registerHelper(type, name, value);
8642
- helpers[type]._global.push({pred: predicate, val: value});
8643
- };
8644
- }
8645
-
8646
- // Used for horizontal relative motion. Dir is -1 or 1 (left or
8647
- // right), unit can be "char", "column" (like char, but doesn't
8648
- // cross line boundaries), "word" (across next word), or "group" (to
8649
- // the start of next group of word or non-word-non-whitespace
8650
- // chars). The visually param controls whether, in right-to-left
8651
- // text, direction 1 means to move towards the next index in the
8652
- // string, or towards the character to the right of the current
8653
- // position. The resulting position will have a hitSide=true
8654
- // property if it reached the end of the document.
8655
- function findPosH(doc, pos, dir, unit, visually) {
8656
- var oldPos = pos;
8657
- var origDir = dir;
8658
- var lineObj = getLine(doc, pos.line);
8659
- function findNextLine() {
8660
- var l = pos.line + dir;
8661
- if (l < doc.first || l >= doc.first + doc.size) { return false }
8662
- pos = new Pos(l, pos.ch, pos.sticky);
8663
- return lineObj = getLine(doc, l)
8664
- }
8665
- function moveOnce(boundToLine) {
8666
- var next;
8667
- if (visually) {
8668
- next = moveVisually(doc.cm, lineObj, pos, dir);
8669
- } else {
8670
- next = moveLogically(lineObj, pos, dir);
8671
- }
8672
- if (next == null) {
8673
- if (!boundToLine && findNextLine())
8674
- { pos = endOfLine(visually, doc.cm, lineObj, pos.line, dir); }
8675
- else
8676
- { return false }
8677
- } else {
8678
- pos = next;
8679
- }
8680
- return true
8681
- }
8682
-
8683
- if (unit == "char") {
8684
- moveOnce();
8685
- } else if (unit == "column") {
8686
- moveOnce(true);
8687
- } else if (unit == "word" || unit == "group") {
8688
- var sawType = null, group = unit == "group";
8689
- var helper = doc.cm && doc.cm.getHelper(pos, "wordChars");
8690
- for (var first = true;; first = false) {
8691
- if (dir < 0 && !moveOnce(!first)) { break }
8692
- var cur = lineObj.text.charAt(pos.ch) || "\n";
8693
- var type = isWordChar(cur, helper) ? "w"
8694
- : group && cur == "\n" ? "n"
8695
- : !group || /\s/.test(cur) ? null
8696
- : "p";
8697
- if (group && !first && !type) { type = "s"; }
8698
- if (sawType && sawType != type) {
8699
- if (dir < 0) {dir = 1; moveOnce(); pos.sticky = "after";}
8700
- break
8701
- }
8702
-
8703
- if (type) { sawType = type; }
8704
- if (dir > 0 && !moveOnce(!first)) { break }
8705
- }
8706
- }
8707
- var result = skipAtomic(doc, pos, oldPos, origDir, true);
8708
- if (equalCursorPos(oldPos, result)) { result.hitSide = true; }
8709
- return result
8710
- }
8711
-
8712
- // For relative vertical movement. Dir may be -1 or 1. Unit can be
8713
- // "page" or "line". The resulting position will have a hitSide=true
8714
- // property if it reached the end of the document.
8715
- function findPosV(cm, pos, dir, unit) {
8716
- var doc = cm.doc, x = pos.left, y;
8717
- if (unit == "page") {
8718
- var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight);
8719
- var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
8720
- y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;
8721
-
8722
- } else if (unit == "line") {
8723
- y = dir > 0 ? pos.bottom + 3 : pos.top - 3;
8724
- }
8725
- var target;
8726
- for (;;) {
8727
- target = coordsChar(cm, x, y);
8728
- if (!target.outside) { break }
8729
- if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break }
8730
- y += dir * 5;
8731
- }
8732
- return target
8733
- }
8734
-
8735
- // CONTENTEDITABLE INPUT STYLE
8736
-
8737
- var ContentEditableInput = function(cm) {
8738
- this.cm = cm;
8739
- this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null;
8740
- this.polling = new Delayed();
8741
- this.composing = null;
8742
- this.gracePeriod = false;
8743
- this.readDOMTimeout = null;
8744
- };
8745
-
8746
- ContentEditableInput.prototype.init = function (display) {
8747
- var this$1 = this;
8748
-
8749
- var input = this, cm = input.cm;
8750
- var div = input.div = display.lineDiv;
8751
- disableBrowserMagic(div, cm.options.spellcheck, cm.options.autocorrect, cm.options.autocapitalize);
8752
-
8753
- on(div, "paste", function (e) {
8754
- if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
8755
- // IE doesn't fire input events, so we schedule a read for the pasted content in this way
8756
- if (ie_version <= 11) { setTimeout(operation(cm, function () { return this$1.updateFromDOM(); }), 20); }
8757
- });
8758
-
8759
- on(div, "compositionstart", function (e) {
8760
- this$1.composing = {data: e.data, done: false};
8761
- });
8762
- on(div, "compositionupdate", function (e) {
8763
- if (!this$1.composing) { this$1.composing = {data: e.data, done: false}; }
8764
- });
8765
- on(div, "compositionend", function (e) {
8766
- if (this$1.composing) {
8767
- if (e.data != this$1.composing.data) { this$1.readFromDOMSoon(); }
8768
- this$1.composing.done = true;
8769
- }
8770
- });
8771
-
8772
- on(div, "touchstart", function () { return input.forceCompositionEnd(); });
8773
-
8774
- on(div, "input", function () {
8775
- if (!this$1.composing) { this$1.readFromDOMSoon(); }
8776
- });
8777
-
8778
- function onCopyCut(e) {
8779
- if (signalDOMEvent(cm, e)) { return }
8780
- if (cm.somethingSelected()) {
8781
- setLastCopied({lineWise: false, text: cm.getSelections()});
8782
- if (e.type == "cut") { cm.replaceSelection("", null, "cut"); }
8783
- } else if (!cm.options.lineWiseCopyCut) {
8784
- return
8785
- } else {
8786
- var ranges = copyableRanges(cm);
8787
- setLastCopied({lineWise: true, text: ranges.text});
8788
- if (e.type == "cut") {
8789
- cm.operation(function () {
8790
- cm.setSelections(ranges.ranges, 0, sel_dontScroll);
8791
- cm.replaceSelection("", null, "cut");
8792
- });
8793
- }
8794
- }
8795
- if (e.clipboardData) {
8796
- e.clipboardData.clearData();
8797
- var content = lastCopied.text.join("\n");
8798
- // iOS exposes the clipboard API, but seems to discard content inserted into it
8799
- e.clipboardData.setData("Text", content);
8800
- if (e.clipboardData.getData("Text") == content) {
8801
- e.preventDefault();
8802
- return
8803
- }
8804
- }
8805
- // Old-fashioned briefly-focus-a-textarea hack
8806
- var kludge = hiddenTextarea(), te = kludge.firstChild;
8807
- cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild);
8808
- te.value = lastCopied.text.join("\n");
8809
- var hadFocus = document.activeElement;
8810
- selectInput(te);
8811
- setTimeout(function () {
8812
- cm.display.lineSpace.removeChild(kludge);
8813
- hadFocus.focus();
8814
- if (hadFocus == div) { input.showPrimarySelection(); }
8815
- }, 50);
8816
- }
8817
- on(div, "copy", onCopyCut);
8818
- on(div, "cut", onCopyCut);
8819
- };
8820
-
8821
- ContentEditableInput.prototype.prepareSelection = function () {
8822
- var result = prepareSelection(this.cm, false);
8823
- result.focus = this.cm.state.focused;
8824
- return result
8825
- };
8826
-
8827
- ContentEditableInput.prototype.showSelection = function (info, takeFocus) {
8828
- if (!info || !this.cm.display.view.length) { return }
8829
- if (info.focus || takeFocus) { this.showPrimarySelection(); }
8830
- this.showMultipleSelections(info);
8831
- };
8832
-
8833
- ContentEditableInput.prototype.getSelection = function () {
8834
- return this.cm.display.wrapper.ownerDocument.getSelection()
8835
- };
8836
-
8837
- ContentEditableInput.prototype.showPrimarySelection = function () {
8838
- var sel = this.getSelection(), cm = this.cm, prim = cm.doc.sel.primary();
8839
- var from = prim.from(), to = prim.to();
8840
-
8841
- if (cm.display.viewTo == cm.display.viewFrom || from.line >= cm.display.viewTo || to.line < cm.display.viewFrom) {
8842
- sel.removeAllRanges();
8843
- return
8844
- }
8845
-
8846
- var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
8847
- var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset);
8848
- if (curAnchor && !curAnchor.bad && curFocus && !curFocus.bad &&
8849
- cmp(minPos(curAnchor, curFocus), from) == 0 &&
8850
- cmp(maxPos(curAnchor, curFocus), to) == 0)
8851
- { return }
8852
-
8853
- var view = cm.display.view;
8854
- var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) ||
8855
- {node: view[0].measure.map[2], offset: 0};
8856
- var end = to.line < cm.display.viewTo && posToDOM(cm, to);
8857
- if (!end) {
8858
- var measure = view[view.length - 1].measure;
8859
- var map$$1 = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map;
8860
- end = {node: map$$1[map$$1.length - 1], offset: map$$1[map$$1.length - 2] - map$$1[map$$1.length - 3]};
8861
- }
8862
-
8863
- if (!start || !end) {
8864
- sel.removeAllRanges();
8865
- return
8866
- }
8867
-
8868
- var old = sel.rangeCount && sel.getRangeAt(0), rng;
8869
- try { rng = range(start.node, start.offset, end.offset, end.node); }
8870
- catch(e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible
8871
- if (rng) {
8872
- if (!gecko && cm.state.focused) {
8873
- sel.collapse(start.node, start.offset);
8874
- if (!rng.collapsed) {
8875
- sel.removeAllRanges();
8876
- sel.addRange(rng);
8877
- }
8878
- } else {
8879
- sel.removeAllRanges();
8880
- sel.addRange(rng);
8881
- }
8882
- if (old && sel.anchorNode == null) { sel.addRange(old); }
8883
- else if (gecko) { this.startGracePeriod(); }
8884
- }
8885
- this.rememberSelection();
8886
- };
8887
-
8888
- ContentEditableInput.prototype.startGracePeriod = function () {
8889
- var this$1 = this;
8890
-
8891
- clearTimeout(this.gracePeriod);
8892
- this.gracePeriod = setTimeout(function () {
8893
- this$1.gracePeriod = false;
8894
- if (this$1.selectionChanged())
8895
- { this$1.cm.operation(function () { return this$1.cm.curOp.selectionChanged = true; }); }
8896
- }, 20);
8897
- };
8898
-
8899
- ContentEditableInput.prototype.showMultipleSelections = function (info) {
8900
- removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors);
8901
- removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection);
8902
- };
8903
-
8904
- ContentEditableInput.prototype.rememberSelection = function () {
8905
- var sel = this.getSelection();
8906
- this.lastAnchorNode = sel.anchorNode; this.lastAnchorOffset = sel.anchorOffset;
8907
- this.lastFocusNode = sel.focusNode; this.lastFocusOffset = sel.focusOffset;
8908
- };
8909
-
8910
- ContentEditableInput.prototype.selectionInEditor = function () {
8911
- var sel = this.getSelection();
8912
- if (!sel.rangeCount) { return false }
8913
- var node = sel.getRangeAt(0).commonAncestorContainer;
8914
- return contains(this.div, node)
8915
- };
8916
-
8917
- ContentEditableInput.prototype.focus = function () {
8918
- if (this.cm.options.readOnly != "nocursor") {
8919
- if (!this.selectionInEditor())
8920
- { this.showSelection(this.prepareSelection(), true); }
8921
- this.div.focus();
8922
- }
8923
- };
8924
- ContentEditableInput.prototype.blur = function () { this.div.blur(); };
8925
- ContentEditableInput.prototype.getField = function () { return this.div };
8926
-
8927
- ContentEditableInput.prototype.supportsTouch = function () { return true };
8928
-
8929
- ContentEditableInput.prototype.receivedFocus = function () {
8930
- var input = this;
8931
- if (this.selectionInEditor())
8932
- { this.pollSelection(); }
8933
- else
8934
- { runInOp(this.cm, function () { return input.cm.curOp.selectionChanged = true; }); }
8935
-
8936
- function poll() {
8937
- if (input.cm.state.focused) {
8938
- input.pollSelection();
8939
- input.polling.set(input.cm.options.pollInterval, poll);
8940
- }
8941
- }
8942
- this.polling.set(this.cm.options.pollInterval, poll);
8943
- };
8944
-
8945
- ContentEditableInput.prototype.selectionChanged = function () {
8946
- var sel = this.getSelection();
8947
- return sel.anchorNode != this.lastAnchorNode || sel.anchorOffset != this.lastAnchorOffset ||
8948
- sel.focusNode != this.lastFocusNode || sel.focusOffset != this.lastFocusOffset
8949
- };
8950
-
8951
- ContentEditableInput.prototype.pollSelection = function () {
8952
- if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { return }
8953
- var sel = this.getSelection(), cm = this.cm;
8954
- // On Android Chrome (version 56, at least), backspacing into an
8955
- // uneditable block element will put the cursor in that element,
8956
- // and then, because it's not editable, hide the virtual keyboard.
8957
- // Because Android doesn't allow us to actually detect backspace
8958
- // presses in a sane way, this code checks for when that happens
8959
- // and simulates a backspace press in this case.
8960
- if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) {
8961
- this.cm.triggerOnKeyDown({type: "keydown", keyCode: 8, preventDefault: Math.abs});
8962
- this.blur();
8963
- this.focus();
8964
- return
8965
- }
8966
- if (this.composing) { return }
8967
- this.rememberSelection();
8968
- var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset);
8969
- var head = domToPos(cm, sel.focusNode, sel.focusOffset);
8970
- if (anchor && head) { runInOp(cm, function () {
8971
- setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll);
8972
- if (anchor.bad || head.bad) { cm.curOp.selectionChanged = true; }
8973
- }); }
8974
- };
8975
-
8976
- ContentEditableInput.prototype.pollContent = function () {
8977
- if (this.readDOMTimeout != null) {
8978
- clearTimeout(this.readDOMTimeout);
8979
- this.readDOMTimeout = null;
8980
- }
8981
-
8982
- var cm = this.cm, display = cm.display, sel = cm.doc.sel.primary();
8983
- var from = sel.from(), to = sel.to();
8984
- if (from.ch == 0 && from.line > cm.firstLine())
8985
- { from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length); }
8986
- if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine())
8987
- { to = Pos(to.line + 1, 0); }
8988
- if (from.line < display.viewFrom || to.line > display.viewTo - 1) { return false }
8989
-
8990
- var fromIndex, fromLine, fromNode;
8991
- if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) {
8992
- fromLine = lineNo(display.view[0].line);
8993
- fromNode = display.view[0].node;
8994
- } else {
8995
- fromLine = lineNo(display.view[fromIndex].line);
8996
- fromNode = display.view[fromIndex - 1].node.nextSibling;
8997
- }
8998
- var toIndex = findViewIndex(cm, to.line);
8999
- var toLine, toNode;
9000
- if (toIndex == display.view.length - 1) {
9001
- toLine = display.viewTo - 1;
9002
- toNode = display.lineDiv.lastChild;
9003
- } else {
9004
- toLine = lineNo(display.view[toIndex + 1].line) - 1;
9005
- toNode = display.view[toIndex + 1].node.previousSibling;
9006
- }
9007
-
9008
- if (!fromNode) { return false }
9009
- var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine));
9010
- var oldText = getBetween(cm.doc, Pos(fromLine, 0), Pos(toLine, getLine(cm.doc, toLine).text.length));
9011
- while (newText.length > 1 && oldText.length > 1) {
9012
- if (lst(newText) == lst(oldText)) { newText.pop(); oldText.pop(); toLine--; }
9013
- else if (newText[0] == oldText[0]) { newText.shift(); oldText.shift(); fromLine++; }
9014
- else { break }
9015
- }
9016
-
9017
- var cutFront = 0, cutEnd = 0;
9018
- var newTop = newText[0], oldTop = oldText[0], maxCutFront = Math.min(newTop.length, oldTop.length);
9019
- while (cutFront < maxCutFront && newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront))
9020
- { ++cutFront; }
9021
- var newBot = lst(newText), oldBot = lst(oldText);
9022
- var maxCutEnd = Math.min(newBot.length - (newText.length == 1 ? cutFront : 0),
9023
- oldBot.length - (oldText.length == 1 ? cutFront : 0));
9024
- while (cutEnd < maxCutEnd &&
9025
- newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1))
9026
- { ++cutEnd; }
9027
- // Try to move start of change to start of selection if ambiguous
9028
- if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) {
9029
- while (cutFront && cutFront > from.ch &&
9030
- newBot.charCodeAt(newBot.length - cutEnd - 1) == oldBot.charCodeAt(oldBot.length - cutEnd - 1)) {
9031
- cutFront--;
9032
- cutEnd++;
9033
- }
9034
- }
9035
-
9036
- newText[newText.length - 1] = newBot.slice(0, newBot.length - cutEnd).replace(/^\u200b+/, "");
9037
- newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "");
9038
-
9039
- var chFrom = Pos(fromLine, cutFront);
9040
- var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0);
9041
- if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) {
9042
- replaceRange(cm.doc, newText, chFrom, chTo, "+input");
9043
- return true
9044
- }
9045
- };
9046
-
9047
- ContentEditableInput.prototype.ensurePolled = function () {
9048
- this.forceCompositionEnd();
9049
- };
9050
- ContentEditableInput.prototype.reset = function () {
9051
- this.forceCompositionEnd();
9052
- };
9053
- ContentEditableInput.prototype.forceCompositionEnd = function () {
9054
- if (!this.composing) { return }
9055
- clearTimeout(this.readDOMTimeout);
9056
- this.composing = null;
9057
- this.updateFromDOM();
9058
- this.div.blur();
9059
- this.div.focus();
9060
- };
9061
- ContentEditableInput.prototype.readFromDOMSoon = function () {
9062
- var this$1 = this;
9063
-
9064
- if (this.readDOMTimeout != null) { return }
9065
- this.readDOMTimeout = setTimeout(function () {
9066
- this$1.readDOMTimeout = null;
9067
- if (this$1.composing) {
9068
- if (this$1.composing.done) { this$1.composing = null; }
9069
- else { return }
9070
- }
9071
- this$1.updateFromDOM();
9072
- }, 80);
9073
- };
9074
-
9075
- ContentEditableInput.prototype.updateFromDOM = function () {
9076
- var this$1 = this;
9077
-
9078
- if (this.cm.isReadOnly() || !this.pollContent())
9079
- { runInOp(this.cm, function () { return regChange(this$1.cm); }); }
9080
- };
9081
-
9082
- ContentEditableInput.prototype.setUneditable = function (node) {
9083
- node.contentEditable = "false";
9084
- };
9085
-
9086
- ContentEditableInput.prototype.onKeyPress = function (e) {
9087
- if (e.charCode == 0 || this.composing) { return }
9088
- e.preventDefault();
9089
- if (!this.cm.isReadOnly())
9090
- { operation(this.cm, applyTextInput)(this.cm, String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), 0); }
9091
- };
9092
-
9093
- ContentEditableInput.prototype.readOnlyChanged = function (val) {
9094
- this.div.contentEditable = String(val != "nocursor");
9095
- };
9096
-
9097
- ContentEditableInput.prototype.onContextMenu = function () {};
9098
- ContentEditableInput.prototype.resetPosition = function () {};
9099
-
9100
- ContentEditableInput.prototype.needsContentAttribute = true;
9101
-
9102
- function posToDOM(cm, pos) {
9103
- var view = findViewForLine(cm, pos.line);
9104
- if (!view || view.hidden) { return null }
9105
- var line = getLine(cm.doc, pos.line);
9106
- var info = mapFromLineView(view, line, pos.line);
9107
-
9108
- var order = getOrder(line, cm.doc.direction), side = "left";
9109
- if (order) {
9110
- var partPos = getBidiPartAt(order, pos.ch);
9111
- side = partPos % 2 ? "right" : "left";
9112
- }
9113
- var result = nodeAndOffsetInLineMap(info.map, pos.ch, side);
9114
- result.offset = result.collapse == "right" ? result.end : result.start;
9115
- return result
9116
- }
9117
-
9118
- function isInGutter(node) {
9119
- for (var scan = node; scan; scan = scan.parentNode)
9120
- { if (/CodeMirror-gutter-wrapper/.test(scan.className)) { return true } }
9121
- return false
9122
- }
9123
-
9124
- function badPos(pos, bad) { if (bad) { pos.bad = true; } return pos }
9125
-
9126
- function domTextBetween(cm, from, to, fromLine, toLine) {
9127
- var text = "", closing = false, lineSep = cm.doc.lineSeparator(), extraLinebreak = false;
9128
- function recognizeMarker(id) { return function (marker) { return marker.id == id; } }
9129
- function close() {
9130
- if (closing) {
9131
- text += lineSep;
9132
- if (extraLinebreak) { text += lineSep; }
9133
- closing = extraLinebreak = false;
9134
- }
9135
- }
9136
- function addText(str) {
9137
- if (str) {
9138
- close();
9139
- text += str;
9140
- }
9141
- }
9142
- function walk(node) {
9143
- if (node.nodeType == 1) {
9144
- var cmText = node.getAttribute("cm-text");
9145
- if (cmText) {
9146
- addText(cmText);
9147
- return
9148
- }
9149
- var markerID = node.getAttribute("cm-marker"), range$$1;
9150
- if (markerID) {
9151
- var found = cm.findMarks(Pos(fromLine, 0), Pos(toLine + 1, 0), recognizeMarker(+markerID));
9152
- if (found.length && (range$$1 = found[0].find(0)))
9153
- { addText(getBetween(cm.doc, range$$1.from, range$$1.to).join(lineSep)); }
9154
- return
9155
- }
9156
- if (node.getAttribute("contenteditable") == "false") { return }
9157
- var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName);
9158
- if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { return }
9159
-
9160
- if (isBlock) { close(); }
9161
- for (var i = 0; i < node.childNodes.length; i++)
9162
- { walk(node.childNodes[i]); }
9163
-
9164
- if (/^(pre|p)$/i.test(node.nodeName)) { extraLinebreak = true; }
9165
- if (isBlock) { closing = true; }
9166
- } else if (node.nodeType == 3) {
9167
- addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " "));
9168
- }
9169
- }
9170
- for (;;) {
9171
- walk(from);
9172
- if (from == to) { break }
9173
- from = from.nextSibling;
9174
- extraLinebreak = false;
9175
- }
9176
- return text
9177
- }
9178
-
9179
- function domToPos(cm, node, offset) {
9180
- var lineNode;
9181
- if (node == cm.display.lineDiv) {
9182
- lineNode = cm.display.lineDiv.childNodes[offset];
9183
- if (!lineNode) { return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) }
9184
- node = null; offset = 0;
9185
- } else {
9186
- for (lineNode = node;; lineNode = lineNode.parentNode) {
9187
- if (!lineNode || lineNode == cm.display.lineDiv) { return null }
9188
- if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { break }
9189
- }
9190
- }
9191
- for (var i = 0; i < cm.display.view.length; i++) {
9192
- var lineView = cm.display.view[i];
9193
- if (lineView.node == lineNode)
9194
- { return locateNodeInLineView(lineView, node, offset) }
9195
- }
9196
- }
9197
-
9198
- function locateNodeInLineView(lineView, node, offset) {
9199
- var wrapper = lineView.text.firstChild, bad = false;
9200
- if (!node || !contains(wrapper, node)) { return badPos(Pos(lineNo(lineView.line), 0), true) }
9201
- if (node == wrapper) {
9202
- bad = true;
9203
- node = wrapper.childNodes[offset];
9204
- offset = 0;
9205
- if (!node) {
9206
- var line = lineView.rest ? lst(lineView.rest) : lineView.line;
9207
- return badPos(Pos(lineNo(line), line.text.length), bad)
9208
- }
9209
- }
9210
-
9211
- var textNode = node.nodeType == 3 ? node : null, topNode = node;
9212
- if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) {
9213
- textNode = node.firstChild;
9214
- if (offset) { offset = textNode.nodeValue.length; }
9215
- }
9216
- while (topNode.parentNode != wrapper) { topNode = topNode.parentNode; }
9217
- var measure = lineView.measure, maps = measure.maps;
9218
-
9219
- function find(textNode, topNode, offset) {
9220
- for (var i = -1; i < (maps ? maps.length : 0); i++) {
9221
- var map$$1 = i < 0 ? measure.map : maps[i];
9222
- for (var j = 0; j < map$$1.length; j += 3) {
9223
- var curNode = map$$1[j + 2];
9224
- if (curNode == textNode || curNode == topNode) {
9225
- var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]);
9226
- var ch = map$$1[j] + offset;
9227
- if (offset < 0 || curNode != textNode) { ch = map$$1[j + (offset ? 1 : 0)]; }
9228
- return Pos(line, ch)
9229
- }
9230
- }
9231
- }
9232
- }
9233
- var found = find(textNode, topNode, offset);
9234
- if (found) { return badPos(found, bad) }
9235
-
9236
- // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems
9237
- for (var after = topNode.nextSibling, dist = textNode ? textNode.nodeValue.length - offset : 0; after; after = after.nextSibling) {
9238
- found = find(after, after.firstChild, 0);
9239
- if (found)
9240
- { return badPos(Pos(found.line, found.ch - dist), bad) }
9241
- else
9242
- { dist += after.textContent.length; }
9243
- }
9244
- for (var before = topNode.previousSibling, dist$1 = offset; before; before = before.previousSibling) {
9245
- found = find(before, before.firstChild, -1);
9246
- if (found)
9247
- { return badPos(Pos(found.line, found.ch + dist$1), bad) }
9248
- else
9249
- { dist$1 += before.textContent.length; }
9250
- }
9251
- }
9252
-
9253
- // TEXTAREA INPUT STYLE
9254
-
9255
- var TextareaInput = function(cm) {
9256
- this.cm = cm;
9257
- // See input.poll and input.reset
9258
- this.prevInput = "";
9259
-
9260
- // Flag that indicates whether we expect input to appear real soon
9261
- // now (after some event like 'keypress' or 'input') and are
9262
- // polling intensively.
9263
- this.pollingFast = false;
9264
- // Self-resetting timeout for the poller
9265
- this.polling = new Delayed();
9266
- // Used to work around IE issue with selection being forgotten when focus moves away from textarea
9267
- this.hasSelection = false;
9268
- this.composing = null;
9269
- };
9270
-
9271
- TextareaInput.prototype.init = function (display) {
9272
- var this$1 = this;
9273
-
9274
- var input = this, cm = this.cm;
9275
- this.createField(display);
9276
- var te = this.textarea;
9277
-
9278
- display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild);
9279
-
9280
- // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore)
9281
- if (ios) { te.style.width = "0px"; }
9282
-
9283
- on(te, "input", function () {
9284
- if (ie && ie_version >= 9 && this$1.hasSelection) { this$1.hasSelection = null; }
9285
- input.poll();
9286
- });
9287
-
9288
- on(te, "paste", function (e) {
9289
- if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { return }
9290
-
9291
- cm.state.pasteIncoming = +new Date;
9292
- input.fastPoll();
9293
- });
9294
-
9295
- function prepareCopyCut(e) {
9296
- if (signalDOMEvent(cm, e)) { return }
9297
- if (cm.somethingSelected()) {
9298
- setLastCopied({lineWise: false, text: cm.getSelections()});
9299
- } else if (!cm.options.lineWiseCopyCut) {
9300
- return
9301
- } else {
9302
- var ranges = copyableRanges(cm);
9303
- setLastCopied({lineWise: true, text: ranges.text});
9304
- if (e.type == "cut") {
9305
- cm.setSelections(ranges.ranges, null, sel_dontScroll);
9306
- } else {
9307
- input.prevInput = "";
9308
- te.value = ranges.text.join("\n");
9309
- selectInput(te);
9310
- }
9311
- }
9312
- if (e.type == "cut") { cm.state.cutIncoming = +new Date; }
9313
- }
9314
- on(te, "cut", prepareCopyCut);
9315
- on(te, "copy", prepareCopyCut);
9316
-
9317
- on(display.scroller, "paste", function (e) {
9318
- if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { return }
9319
- if (!te.dispatchEvent) {
9320
- cm.state.pasteIncoming = +new Date;
9321
- input.focus();
9322
- return
9323
- }
9324
-
9325
- // Pass the `paste` event to the textarea so it's handled by its event listener.
9326
- var event = new Event("paste");
9327
- event.clipboardData = e.clipboardData;
9328
- te.dispatchEvent(event);
9329
- });
9330
-
9331
- // Prevent normal selection in the editor (we handle our own)
9332
- on(display.lineSpace, "selectstart", function (e) {
9333
- if (!eventInWidget(display, e)) { e_preventDefault(e); }
9334
- });
9335
-
9336
- on(te, "compositionstart", function () {
9337
- var start = cm.getCursor("from");
9338
- if (input.composing) { input.composing.range.clear(); }
9339
- input.composing = {
9340
- start: start,
9341
- range: cm.markText(start, cm.getCursor("to"), {className: "CodeMirror-composing"})
9342
- };
9343
- });
9344
- on(te, "compositionend", function () {
9345
- if (input.composing) {
9346
- input.poll();
9347
- input.composing.range.clear();
9348
- input.composing = null;
9349
- }
9350
- });
9351
- };
9352
-
9353
- TextareaInput.prototype.createField = function (_display) {
9354
- // Wraps and hides input textarea
9355
- this.wrapper = hiddenTextarea();
9356
- // The semihidden textarea that is focused when the editor is
9357
- // focused, and receives input.
9358
- this.textarea = this.wrapper.firstChild;
9359
- };
9360
-
9361
- TextareaInput.prototype.prepareSelection = function () {
9362
- // Redraw the selection and/or cursor
9363
- var cm = this.cm, display = cm.display, doc = cm.doc;
9364
- var result = prepareSelection(cm);
9365
-
9366
- // Move the hidden textarea near the cursor to prevent scrolling artifacts
9367
- if (cm.options.moveInputWithCursor) {
9368
- var headPos = cursorCoords(cm, doc.sel.primary().head, "div");
9369
- var wrapOff = display.wrapper.getBoundingClientRect(), lineOff = display.lineDiv.getBoundingClientRect();
9370
- result.teTop = Math.max(0, Math.min(display.wrapper.clientHeight - 10,
9371
- headPos.top + lineOff.top - wrapOff.top));
9372
- result.teLeft = Math.max(0, Math.min(display.wrapper.clientWidth - 10,
9373
- headPos.left + lineOff.left - wrapOff.left));
9374
- }
9375
-
9376
- return result
9377
- };
9378
-
9379
- TextareaInput.prototype.showSelection = function (drawn) {
9380
- var cm = this.cm, display = cm.display;
9381
- removeChildrenAndAdd(display.cursorDiv, drawn.cursors);
9382
- removeChildrenAndAdd(display.selectionDiv, drawn.selection);
9383
- if (drawn.teTop != null) {
9384
- this.wrapper.style.top = drawn.teTop + "px";
9385
- this.wrapper.style.left = drawn.teLeft + "px";
9386
- }
9387
- };
9388
-
9389
- // Reset the input to correspond to the selection (or to be empty,
9390
- // when not typing and nothing is selected)
9391
- TextareaInput.prototype.reset = function (typing) {
9392
- if (this.contextMenuPending || this.composing) { return }
9393
- var cm = this.cm;
9394
- if (cm.somethingSelected()) {
9395
- this.prevInput = "";
9396
- var content = cm.getSelection();
9397
- this.textarea.value = content;
9398
- if (cm.state.focused) { selectInput(this.textarea); }
9399
- if (ie && ie_version >= 9) { this.hasSelection = content; }
9400
- } else if (!typing) {
9401
- this.prevInput = this.textarea.value = "";
9402
- if (ie && ie_version >= 9) { this.hasSelection = null; }
9403
- }
9404
- };
9405
-
9406
- TextareaInput.prototype.getField = function () { return this.textarea };
9407
-
9408
- TextareaInput.prototype.supportsTouch = function () { return false };
9409
-
9410
- TextareaInput.prototype.focus = function () {
9411
- if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) {
9412
- try { this.textarea.focus(); }
9413
- catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM
9414
- }
9415
- };
9416
-
9417
- TextareaInput.prototype.blur = function () { this.textarea.blur(); };
9418
-
9419
- TextareaInput.prototype.resetPosition = function () {
9420
- this.wrapper.style.top = this.wrapper.style.left = 0;
9421
- };
9422
-
9423
- TextareaInput.prototype.receivedFocus = function () { this.slowPoll(); };
9424
-
9425
- // Poll for input changes, using the normal rate of polling. This
9426
- // runs as long as the editor is focused.
9427
- TextareaInput.prototype.slowPoll = function () {
9428
- var this$1 = this;
9429
-
9430
- if (this.pollingFast) { return }
9431
- this.polling.set(this.cm.options.pollInterval, function () {
9432
- this$1.poll();
9433
- if (this$1.cm.state.focused) { this$1.slowPoll(); }
9434
- });
9435
- };
9436
-
9437
- // When an event has just come in that is likely to add or change
9438
- // something in the input textarea, we poll faster, to ensure that
9439
- // the change appears on the screen quickly.
9440
- TextareaInput.prototype.fastPoll = function () {
9441
- var missed = false, input = this;
9442
- input.pollingFast = true;
9443
- function p() {
9444
- var changed = input.poll();
9445
- if (!changed && !missed) {missed = true; input.polling.set(60, p);}
9446
- else {input.pollingFast = false; input.slowPoll();}
9447
- }
9448
- input.polling.set(20, p);
9449
- };
9450
-
9451
- // Read input from the textarea, and update the document to match.
9452
- // When something is selected, it is present in the textarea, and
9453
- // selected (unless it is huge, in which case a placeholder is
9454
- // used). When nothing is selected, the cursor sits after previously
9455
- // seen text (can be empty), which is stored in prevInput (we must
9456
- // not reset the textarea when typing, because that breaks IME).
9457
- TextareaInput.prototype.poll = function () {
9458
- var this$1 = this;
9459
-
9460
- var cm = this.cm, input = this.textarea, prevInput = this.prevInput;
9461
- // Since this is called a *lot*, try to bail out as cheaply as
9462
- // possible when it is clear that nothing happened. hasSelection
9463
- // will be the case when there is a lot of text in the textarea,
9464
- // in which case reading its value would be expensive.
9465
- if (this.contextMenuPending || !cm.state.focused ||
9466
- (hasSelection(input) && !prevInput && !this.composing) ||
9467
- cm.isReadOnly() || cm.options.disableInput || cm.state.keySeq)
9468
- { return false }
9469
-
9470
- var text = input.value;
9471
- // If nothing changed, bail.
9472
- if (text == prevInput && !cm.somethingSelected()) { return false }
9473
- // Work around nonsensical selection resetting in IE9/10, and
9474
- // inexplicable appearance of private area unicode characters on
9475
- // some key combos in Mac (#2689).
9476
- if (ie && ie_version >= 9 && this.hasSelection === text ||
9477
- mac && /[\uf700-\uf7ff]/.test(text)) {
9478
- cm.display.input.reset();
9479
- return false
9480
- }
9481
-
9482
- if (cm.doc.sel == cm.display.selForContextMenu) {
9483
- var first = text.charCodeAt(0);
9484
- if (first == 0x200b && !prevInput) { prevInput = "\u200b"; }
9485
- if (first == 0x21da) { this.reset(); return this.cm.execCommand("undo") }
9486
- }
9487
- // Find the part of the input that is actually new
9488
- var same = 0, l = Math.min(prevInput.length, text.length);
9489
- while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { ++same; }
9490
-
9491
- runInOp(cm, function () {
9492
- applyTextInput(cm, text.slice(same), prevInput.length - same,
9493
- null, this$1.composing ? "*compose" : null);
9494
-
9495
- // Don't leave long text in the textarea, since it makes further polling slow
9496
- if (text.length > 1000 || text.indexOf("\n") > -1) { input.value = this$1.prevInput = ""; }
9497
- else { this$1.prevInput = text; }
9498
-
9499
- if (this$1.composing) {
9500
- this$1.composing.range.clear();
9501
- this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"),
9502
- {className: "CodeMirror-composing"});
9503
- }
9504
- });
9505
- return true
9506
- };
9507
-
9508
- TextareaInput.prototype.ensurePolled = function () {
9509
- if (this.pollingFast && this.poll()) { this.pollingFast = false; }
9510
- };
9511
-
9512
- TextareaInput.prototype.onKeyPress = function () {
9513
- if (ie && ie_version >= 9) { this.hasSelection = null; }
9514
- this.fastPoll();
9515
- };
9516
-
9517
- TextareaInput.prototype.onContextMenu = function (e) {
9518
- var input = this, cm = input.cm, display = cm.display, te = input.textarea;
9519
- if (input.contextMenuPending) { input.contextMenuPending(); }
9520
- var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop;
9521
- if (!pos || presto) { return } // Opera is difficult.
9522
-
9523
- // Reset the current text selection only if the click is done outside of the selection
9524
- // and 'resetSelectionOnContextMenu' option is true.
9525
- var reset = cm.options.resetSelectionOnContextMenu;
9526
- if (reset && cm.doc.sel.contains(pos) == -1)
9527
- { operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll); }
9528
-
9529
- var oldCSS = te.style.cssText, oldWrapperCSS = input.wrapper.style.cssText;
9530
- var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect();
9531
- input.wrapper.style.cssText = "position: static";
9532
- te.style.cssText = "position: absolute; width: 30px; height: 30px;\n top: " + (e.clientY - wrapperBox.top - 5) + "px; left: " + (e.clientX - wrapperBox.left - 5) + "px;\n z-index: 1000; background: " + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";
9533
- var oldScrollY;
9534
- if (webkit) { oldScrollY = window.scrollY; } // Work around Chrome issue (#2712)
9535
- display.input.focus();
9536
- if (webkit) { window.scrollTo(null, oldScrollY); }
9537
- display.input.reset();
9538
- // Adds "Select all" to context menu in FF
9539
- if (!cm.somethingSelected()) { te.value = input.prevInput = " "; }
9540
- input.contextMenuPending = rehide;
9541
- display.selForContextMenu = cm.doc.sel;
9542
- clearTimeout(display.detectingSelectAll);
9543
-
9544
- // Select-all will be greyed out if there's nothing to select, so
9545
- // this adds a zero-width space so that we can later check whether
9546
- // it got selected.
9547
- function prepareSelectAllHack() {
9548
- if (te.selectionStart != null) {
9549
- var selected = cm.somethingSelected();
9550
- var extval = "\u200b" + (selected ? te.value : "");
9551
- te.value = "\u21da"; // Used to catch context-menu undo
9552
- te.value = extval;
9553
- input.prevInput = selected ? "" : "\u200b";
9554
- te.selectionStart = 1; te.selectionEnd = extval.length;
9555
- // Re-set this, in case some other handler touched the
9556
- // selection in the meantime.
9557
- display.selForContextMenu = cm.doc.sel;
9558
- }
9559
- }
9560
- function rehide() {
9561
- if (input.contextMenuPending != rehide) { return }
9562
- input.contextMenuPending = false;
9563
- input.wrapper.style.cssText = oldWrapperCSS;
9564
- te.style.cssText = oldCSS;
9565
- if (ie && ie_version < 9) { display.scrollbars.setScrollTop(display.scroller.scrollTop = scrollPos); }
9566
-
9567
- // Try to detect the user choosing select-all
9568
- if (te.selectionStart != null) {
9569
- if (!ie || (ie && ie_version < 9)) { prepareSelectAllHack(); }
9570
- var i = 0, poll = function () {
9571
- if (display.selForContextMenu == cm.doc.sel && te.selectionStart == 0 &&
9572
- te.selectionEnd > 0 && input.prevInput == "\u200b") {
9573
- operation(cm, selectAll)(cm);
9574
- } else if (i++ < 10) {
9575
- display.detectingSelectAll = setTimeout(poll, 500);
9576
- } else {
9577
- display.selForContextMenu = null;
9578
- display.input.reset();
9579
- }
9580
- };
9581
- display.detectingSelectAll = setTimeout(poll, 200);
9582
- }
9583
- }
9584
-
9585
- if (ie && ie_version >= 9) { prepareSelectAllHack(); }
9586
- if (captureRightClick) {
9587
- e_stop(e);
9588
- var mouseup = function () {
9589
- off(window, "mouseup", mouseup);
9590
- setTimeout(rehide, 20);
9591
- };
9592
- on(window, "mouseup", mouseup);
9593
- } else {
9594
- setTimeout(rehide, 50);
9595
- }
9596
- };
9597
-
9598
- TextareaInput.prototype.readOnlyChanged = function (val) {
9599
- if (!val) { this.reset(); }
9600
- this.textarea.disabled = val == "nocursor";
9601
- };
9602
-
9603
- TextareaInput.prototype.setUneditable = function () {};
9604
-
9605
- TextareaInput.prototype.needsContentAttribute = false;
9606
-
9607
- function fromTextArea(textarea, options) {
9608
- options = options ? copyObj(options) : {};
9609
- options.value = textarea.value;
9610
- if (!options.tabindex && textarea.tabIndex)
9611
- { options.tabindex = textarea.tabIndex; }
9612
- if (!options.placeholder && textarea.placeholder)
9613
- { options.placeholder = textarea.placeholder; }
9614
- // Set autofocus to true if this textarea is focused, or if it has
9615
- // autofocus and no other element is focused.
9616
- if (options.autofocus == null) {
9617
- var hasFocus = activeElt();
9618
- options.autofocus = hasFocus == textarea ||
9619
- textarea.getAttribute("autofocus") != null && hasFocus == document.body;
9620
- }
9621
-
9622
- function save() {textarea.value = cm.getValue();}
9623
-
9624
- var realSubmit;
9625
- if (textarea.form) {
9626
- on(textarea.form, "submit", save);
9627
- // Deplorable hack to make the submit method do the right thing.
9628
- if (!options.leaveSubmitMethodAlone) {
9629
- var form = textarea.form;
9630
- realSubmit = form.submit;
9631
- try {
9632
- var wrappedSubmit = form.submit = function () {
9633
- save();
9634
- form.submit = realSubmit;
9635
- form.submit();
9636
- form.submit = wrappedSubmit;
9637
- };
9638
- } catch(e) {}
9639
- }
9640
- }
9641
-
9642
- options.finishInit = function (cm) {
9643
- cm.save = save;
9644
- cm.getTextArea = function () { return textarea; };
9645
- cm.toTextArea = function () {
9646
- cm.toTextArea = isNaN; // Prevent this from being ran twice
9647
- save();
9648
- textarea.parentNode.removeChild(cm.getWrapperElement());
9649
- textarea.style.display = "";
9650
- if (textarea.form) {
9651
- off(textarea.form, "submit", save);
9652
- if (typeof textarea.form.submit == "function")
9653
- { textarea.form.submit = realSubmit; }
9654
- }
9655
- };
9656
- };
9657
-
9658
- textarea.style.display = "none";
9659
- var cm = CodeMirror(function (node) { return textarea.parentNode.insertBefore(node, textarea.nextSibling); },
9660
- options);
9661
- return cm
9662
- }
9663
-
9664
- function addLegacyProps(CodeMirror) {
9665
- CodeMirror.off = off;
9666
- CodeMirror.on = on;
9667
- CodeMirror.wheelEventPixels = wheelEventPixels;
9668
- CodeMirror.Doc = Doc;
9669
- CodeMirror.splitLines = splitLinesAuto;
9670
- CodeMirror.countColumn = countColumn;
9671
- CodeMirror.findColumn = findColumn;
9672
- CodeMirror.isWordChar = isWordCharBasic;
9673
- CodeMirror.Pass = Pass;
9674
- CodeMirror.signal = signal;
9675
- CodeMirror.Line = Line;
9676
- CodeMirror.changeEnd = changeEnd;
9677
- CodeMirror.scrollbarModel = scrollbarModel;
9678
- CodeMirror.Pos = Pos;
9679
- CodeMirror.cmpPos = cmp;
9680
- CodeMirror.modes = modes;
9681
- CodeMirror.mimeModes = mimeModes;
9682
- CodeMirror.resolveMode = resolveMode;
9683
- CodeMirror.getMode = getMode;
9684
- CodeMirror.modeExtensions = modeExtensions;
9685
- CodeMirror.extendMode = extendMode;
9686
- CodeMirror.copyState = copyState;
9687
- CodeMirror.startState = startState;
9688
- CodeMirror.innerMode = innerMode;
9689
- CodeMirror.commands = commands;
9690
- CodeMirror.keyMap = keyMap;
9691
- CodeMirror.keyName = keyName;
9692
- CodeMirror.isModifierKey = isModifierKey;
9693
- CodeMirror.lookupKey = lookupKey;
9694
- CodeMirror.normalizeKeyMap = normalizeKeyMap;
9695
- CodeMirror.StringStream = StringStream;
9696
- CodeMirror.SharedTextMarker = SharedTextMarker;
9697
- CodeMirror.TextMarker = TextMarker;
9698
- CodeMirror.LineWidget = LineWidget;
9699
- CodeMirror.e_preventDefault = e_preventDefault;
9700
- CodeMirror.e_stopPropagation = e_stopPropagation;
9701
- CodeMirror.e_stop = e_stop;
9702
- CodeMirror.addClass = addClass;
9703
- CodeMirror.contains = contains;
9704
- CodeMirror.rmClass = rmClass;
9705
- CodeMirror.keyNames = keyNames;
9706
- }
9707
-
9708
- // EDITOR CONSTRUCTOR
9709
-
9710
- defineOptions(CodeMirror);
9711
-
9712
- addEditorMethods(CodeMirror);
9713
-
9714
- // Set up methods on CodeMirror's prototype to redirect to the editor's document.
9715
- var dontDelegate = "iter insert remove copy getEditor constructor".split(" ");
9716
- for (var prop in Doc.prototype) { if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0)
9717
- { CodeMirror.prototype[prop] = (function(method) {
9718
- return function() {return method.apply(this.doc, arguments)}
9719
- })(Doc.prototype[prop]); } }
9720
-
9721
- eventMixin(Doc);
9722
- CodeMirror.inputStyles = {"textarea": TextareaInput, "contenteditable": ContentEditableInput};
9723
-
9724
- // Extra arguments are stored as the mode's dependencies, which is
9725
- // used by (legacy) mechanisms like loadmode.js to automatically
9726
- // load a mode. (Preferred mechanism is the require/define calls.)
9727
- CodeMirror.defineMode = function(name/*, mode, …*/) {
9728
- if (!CodeMirror.defaults.mode && name != "null") { CodeMirror.defaults.mode = name; }
9729
- defineMode.apply(this, arguments);
9730
- };
9731
-
9732
- CodeMirror.defineMIME = defineMIME;
9733
-
9734
- // Minimal default mode.
9735
- CodeMirror.defineMode("null", function () { return ({token: function (stream) { return stream.skipToEnd(); }}); });
9736
- CodeMirror.defineMIME("text/plain", "null");
9737
-
9738
- // EXTENSIONS
9739
-
9740
- CodeMirror.defineExtension = function (name, func) {
9741
- CodeMirror.prototype[name] = func;
9742
- };
9743
- CodeMirror.defineDocExtension = function (name, func) {
9744
- Doc.prototype[name] = func;
9745
- };
9746
-
9747
- CodeMirror.fromTextArea = fromTextArea;
9748
-
9749
- addLegacyProps(CodeMirror);
9750
-
9751
- CodeMirror.version = "5.47.0";
9752
-
9753
- return CodeMirror;
9754
-
9755
- })));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/js/comment.js DELETED
@@ -1,209 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: https://codemirror.net/LICENSE
3
-
4
- (function(mod) {
5
- if (typeof exports == "object" && typeof module == "object") // CommonJS
6
- mod(require("../../lib/codemirror"));
7
- else if (typeof define == "function" && define.amd) // AMD
8
- define(["../../lib/codemirror"], mod);
9
- else // Plain browser env
10
- mod(CodeMirror);
11
- })(function(CodeMirror) {
12
- "use strict";
13
-
14
- var noOptions = {};
15
- var nonWS = /[^\s\u00a0]/;
16
- var Pos = CodeMirror.Pos;
17
-
18
- function firstNonWS(str) {
19
- var found = str.search(nonWS);
20
- return found == -1 ? 0 : found;
21
- }
22
-
23
- CodeMirror.commands.toggleComment = function(cm) {
24
- cm.toggleComment();
25
- };
26
-
27
- CodeMirror.defineExtension("toggleComment", function(options) {
28
- if (!options) options = noOptions;
29
- var cm = this;
30
- var minLine = Infinity, ranges = this.listSelections(), mode = null;
31
- for (var i = ranges.length - 1; i >= 0; i--) {
32
- var from = ranges[i].from(), to = ranges[i].to();
33
- if (from.line >= minLine) continue;
34
- if (to.line >= minLine) to = Pos(minLine, 0);
35
- minLine = from.line;
36
- if (mode == null) {
37
- if (cm.uncomment(from, to, options)) mode = "un";
38
- else { cm.lineComment(from, to, options); mode = "line"; }
39
- } else if (mode == "un") {
40
- cm.uncomment(from, to, options);
41
- } else {
42
- cm.lineComment(from, to, options);
43
- }
44
- }
45
- });
46
-
47
- // Rough heuristic to try and detect lines that are part of multi-line string
48
- function probablyInsideString(cm, pos, line) {
49
- return /\bstring\b/.test(cm.getTokenTypeAt(Pos(pos.line, 0))) && !/^[\'\"\`]/.test(line)
50
- }
51
-
52
- function getMode(cm, pos) {
53
- var mode = cm.getMode()
54
- return mode.useInnerComments === false || !mode.innerMode ? mode : cm.getModeAt(pos)
55
- }
56
-
57
- CodeMirror.defineExtension("lineComment", function(from, to, options) {
58
- if (!options) options = noOptions;
59
- var self = this, mode = getMode(self, from);
60
- var firstLine = self.getLine(from.line);
61
- if (firstLine == null || probablyInsideString(self, from, firstLine)) return;
62
-
63
- var commentString = options.lineComment || mode.lineComment;
64
- if (!commentString) {
65
- if (options.blockCommentStart || mode.blockCommentStart) {
66
- options.fullLines = true;
67
- self.blockComment(from, to, options);
68
- }
69
- return;
70
- }
71
-
72
- var end = Math.min(to.ch != 0 || to.line == from.line ? to.line + 1 : to.line, self.lastLine() + 1);
73
- var pad = options.padding == null ? " " : options.padding;
74
- var blankLines = options.commentBlankLines || from.line == to.line;
75
-
76
- self.operation(function() {
77
- if (options.indent) {
78
- var baseString = null;
79
- for (var i = from.line; i < end; ++i) {
80
- var line = self.getLine(i);
81
- var whitespace = line.slice(0, firstNonWS(line));
82
- if (baseString == null || baseString.length > whitespace.length) {
83
- baseString = whitespace;
84
- }
85
- }
86
- for (var i = from.line; i < end; ++i) {
87
- var line = self.getLine(i), cut = baseString.length;
88
- if (!blankLines && !nonWS.test(line)) continue;
89
- if (line.slice(0, cut) != baseString) cut = firstNonWS(line);
90
- self.replaceRange(baseString + commentString + pad, Pos(i, 0), Pos(i, cut));
91
- }
92
- } else {
93
- for (var i = from.line; i < end; ++i) {
94
- if (blankLines || nonWS.test(self.getLine(i)))
95
- self.replaceRange(commentString + pad, Pos(i, 0));
96
- }
97
- }
98
- });
99
- });
100
-
101
- CodeMirror.defineExtension("blockComment", function(from, to, options) {
102
- if (!options) options = noOptions;
103
- var self = this, mode = getMode(self, from);
104
- var startString = options.blockCommentStart || mode.blockCommentStart;
105
- var endString = options.blockCommentEnd || mode.blockCommentEnd;
106
- if (!startString || !endString) {
107
- if ((options.lineComment || mode.lineComment) && options.fullLines != false)
108
- self.lineComment(from, to, options);
109
- return;
110
- }
111
- if (/\bcomment\b/.test(self.getTokenTypeAt(Pos(from.line, 0)))) return
112
-
113
- var end = Math.min(to.line, self.lastLine());
114
- if (end != from.line && to.ch == 0 && nonWS.test(self.getLine(end))) --end;
115
-
116
- var pad = options.padding == null ? " " : options.padding;
117
- if (from.line > end) return;
118
-
119
- self.operation(function() {
120
- if (options.fullLines != false) {
121
- var lastLineHasText = nonWS.test(self.getLine(end));
122
- self.replaceRange(pad + endString, Pos(end));
123
- self.replaceRange(startString + pad, Pos(from.line, 0));
124
- var lead = options.blockCommentLead || mode.blockCommentLead;
125
- if (lead != null) for (var i = from.line + 1; i <= end; ++i)
126
- if (i != end || lastLineHasText)
127
- self.replaceRange(lead + pad, Pos(i, 0));
128
- } else {
129
- self.replaceRange(endString, to);
130
- self.replaceRange(startString, from);
131
- }
132
- });
133
- });
134
-
135
- CodeMirror.defineExtension("uncomment", function(from, to, options) {
136
- if (!options) options = noOptions;
137
- var self = this, mode = getMode(self, from);
138
- var end = Math.min(to.ch != 0 || to.line == from.line ? to.line : to.line - 1, self.lastLine()), start = Math.min(from.line, end);
139
-
140
- // Try finding line comments
141
- var lineString = options.lineComment || mode.lineComment, lines = [];
142
- var pad = options.padding == null ? " " : options.padding, didSomething;
143
- lineComment: {
144
- if (!lineString) break lineComment;
145
- for (var i = start; i <= end; ++i) {
146
- var line = self.getLine(i);
147
- var found = line.indexOf(lineString);
148
- if (found > -1 && !/comment/.test(self.getTokenTypeAt(Pos(i, found + 1)))) found = -1;
149
- if (found == -1 && nonWS.test(line)) break lineComment;
150
- if (found > -1 && nonWS.test(line.slice(0, found))) break lineComment;
151
- lines.push(line);
152
- }
153
- self.operation(function() {
154
- for (var i = start; i <= end; ++i) {
155
- var line = lines[i - start];
156
- var pos = line.indexOf(lineString), endPos = pos + lineString.length;
157
- if (pos < 0) continue;
158
- if (line.slice(endPos, endPos + pad.length) == pad) endPos += pad.length;
159
- didSomething = true;
160
- self.replaceRange("", Pos(i, pos), Pos(i, endPos));
161
- }
162
- });
163
- if (didSomething) return true;
164
- }
165
-
166
- // Try block comments
167
- var startString = options.blockCommentStart || mode.blockCommentStart;
168
- var endString = options.blockCommentEnd || mode.blockCommentEnd;
169
- if (!startString || !endString) return false;
170
- var lead = options.blockCommentLead || mode.blockCommentLead;
171
- var startLine = self.getLine(start), open = startLine.indexOf(startString)
172
- if (open == -1) return false
173
- var endLine = end == start ? startLine : self.getLine(end)
174
- var close = endLine.indexOf(endString, end == start ? open + startString.length : 0);
175
- var insideStart = Pos(start, open + 1), insideEnd = Pos(end, close + 1)
176
- if (close == -1 ||
177
- !/comment/.test(self.getTokenTypeAt(insideStart)) ||
178
- !/comment/.test(self.getTokenTypeAt(insideEnd)) ||
179
- self.getRange(insideStart, insideEnd, "\n").indexOf(endString) > -1)
180
- return false;
181
-
182
- // Avoid killing block comments completely outside the selection.
183
- // Positions of the last startString before the start of the selection, and the first endString after it.
184
- var lastStart = startLine.lastIndexOf(startString, from.ch);
185
- var firstEnd = lastStart == -1 ? -1 : startLine.slice(0, from.ch).indexOf(endString, lastStart + startString.length);
186
- if (lastStart != -1 && firstEnd != -1 && firstEnd + endString.length != from.ch) return false;
187
- // Positions of the first endString after the end of the selection, and the last startString before it.
188
- firstEnd = endLine.indexOf(endString, to.ch);
189
- var almostLastStart = endLine.slice(to.ch).lastIndexOf(startString, firstEnd - to.ch);
190
- lastStart = (firstEnd == -1 || almostLastStart == -1) ? -1 : to.ch + almostLastStart;
191
- if (firstEnd != -1 && lastStart != -1 && lastStart != to.ch) return false;
192
-
193
- self.operation(function() {
194
- self.replaceRange("", Pos(end, close - (pad && endLine.slice(close - pad.length, close) == pad ? pad.length : 0)),
195
- Pos(end, close + endString.length));
196
- var openEnd = open + startString.length;
197
- if (pad && startLine.slice(openEnd, openEnd + pad.length) == pad) openEnd += pad.length;
198
- self.replaceRange("", Pos(start, open), Pos(start, openEnd));
199
- if (lead) for (var i = start + 1; i <= end; ++i) {
200
- var line = self.getLine(i), found = line.indexOf(lead);
201
- if (found == -1 || nonWS.test(line.slice(0, found))) continue;
202
- var foundEnd = found + lead.length;
203
- if (pad && line.slice(foundEnd, foundEnd + pad.length) == pad) foundEnd += pad.length;
204
- self.replaceRange("", Pos(i, found), Pos(i, foundEnd));
205
- }
206
- });
207
- return true;
208
- });
209
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/js/css.js DELETED
@@ -1,831 +0,0 @@
1
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
2
- // Distributed under an MIT license: https://codemirror.net/LICENSE
3
-
4
- (function(mod) {
5
- if (typeof exports == "object" && typeof module == "object") // CommonJS
6
- mod(require("../../lib/codemirror"));
7
- else if (typeof define == "function" && define.amd) // AMD
8
- define(["../../lib/codemirror"], mod);
9
- else // Plain browser env
10
- mod(CodeMirror);
11
- })(function(CodeMirror) {
12
- "use strict";
13
-
14
- CodeMirror.defineMode("css", function(config, parserConfig) {
15
- var inline = parserConfig.inline
16
- if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css");
17
-
18
- var indentUnit = config.indentUnit,
19
- tokenHooks = parserConfig.tokenHooks,
20
- documentTypes = parserConfig.documentTypes || {},
21
- mediaTypes = parserConfig.mediaTypes || {},
22
- mediaFeatures = parserConfig.mediaFeatures || {},
23
- mediaValueKeywords = parserConfig.mediaValueKeywords || {},
24
- propertyKeywords = parserConfig.propertyKeywords || {},
25
- nonStandardPropertyKeywords = parserConfig.nonStandardPropertyKeywords || {},
26
- fontProperties = parserConfig.fontProperties || {},
27
- counterDescriptors = parserConfig.counterDescriptors || {},
28
- colorKeywords = parserConfig.colorKeywords || {},
29
- valueKeywords = parserConfig.valueKeywords || {},
30
- allowNested = parserConfig.allowNested,
31
- lineComment = parserConfig.lineComment,
32
- supportsAtComponent = parserConfig.supportsAtComponent === true;
33
-
34
- var type, override;
35
- function ret(style, tp) { type = tp; return style; }
36
-
37
- // Tokenizers
38
-
39
- function tokenBase(stream, state) {
40
- var ch = stream.next();
41
- if (tokenHooks[ch]) {
42
- var result = tokenHooks[ch](stream, state);
43
- if (result !== false) return result;
44
- }
45
- if (ch == "@") {
46
- stream.eatWhile(/[\w\\\-]/);
47
- return ret("def", stream.current());
48
- } else if (ch == "=" || (ch == "~" || ch == "|") && stream.eat("=")) {
49
- return ret(null, "compare");
50
- } else if (ch == "\"" || ch == "'") {
51
- state.tokenize = tokenString(ch);
52
- return state.tokenize(stream, state);
53
- } else if (ch == "#") {
54
- stream.eatWhile(/[\w\\\-]/);
55
- return ret("atom", "hash");
56
- } else if (ch == "!") {
57
- stream.match(/^\s*\w*/);
58
- return ret("keyword", "important");
59
- } else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) {
60
- stream.eatWhile(/[\w.%]/);
61
- return ret("number", "unit");
62
- } else if (ch === "-") {
63
- if (/[\d.]/.test(stream.peek())) {
64
- stream.eatWhile(/[\w.%]/);
65
- return ret("number", "unit");
66
- } else if (stream.match(/^-[\w\\\-]*/)) {
67
- stream.eatWhile(/[\w\\\-]/);
68
- if (stream.match(/^\s*:/, false))
69
- return ret("variable-2", "variable-definition");
70
- return ret("variable-2", "variable");
71
- } else if (stream.match(/^\w+-/)) {
72
- return ret("meta", "meta");
73
- }
74
- } else if (/[,+>*\/]/.test(ch)) {
75
- return ret(null, "select-op");
76
- } else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) {
77
- return ret("qualifier", "qualifier");
78
- } else if (/[:;{}\[\]\(\)]/.test(ch)) {
79
- return ret(null, ch);
80
- } else if (stream.match(/[\w-.]+(?=\()/)) {
81
- if (/^(url(-prefix)?|domain|regexp)$/.test(stream.current().toLowerCase())) {
82
- state.tokenize = tokenParenthesized;
83
- }
84
- return ret("variable callee", "variable");
85
- } else if (/[\w\\\-]/.test(ch)) {
86
- stream.eatWhile(/[\w\\\-]/);
87
- return ret("property", "word");
88
- } else {
89
- return ret(null, null);
90
- }
91
- }
92
-
93
- function tokenString(quote) {
94
- return function(stream, state) {
95
- var escaped = false, ch;
96
- while ((ch = stream.next()) != null) {
97
- if (ch == quote && !escaped) {
98
- if (quote == ")") stream.backUp(1);
99
- break;
100
- }
101
- escaped = !escaped && ch == "\\";
102
- }
103
- if (ch == quote || !escaped && quote != ")") state.tokenize = null;
104
- return ret("string", "string");
105
- };
106
- }
107
-
108
- function tokenParenthesized(stream, state) {
109
- stream.next(); // Must be '('
110
- if (!stream.match(/\s*[\"\')]/, false))
111
- state.tokenize = tokenString(")");
112
- else
113
- state.tokenize = null;
114
- return ret(null, "(");
115
- }
116
-
117
- // Context management
118
-
119
- function Context(type, indent, prev) {
120
- this.type = type;
121
- this.indent = indent;
122
- this.prev = prev;
123
- }
124
-
125
- function pushContext(state, stream, type, indent) {
126
- state.context = new Context(type, stream.indentation() + (indent === false ? 0 : indentUnit), state.context);
127
- return type;
128
- }
129
-
130
- function popContext(state) {
131
- if (state.context.prev)
132
- state.context = state.context.prev;
133
- return state.context.type;
134
- }
135
-
136
- function pass(type, stream, state) {
137
- return states[state.context.type](type, stream, state);
138
- }
139
- function popAndPass(type, stream, state, n) {
140
- for (var i = n || 1; i > 0; i--)
141
- state.context = state.context.prev;
142
- return pass(type, stream, state);
143
- }
144
-
145
- // Parser
146
-
147
- function wordAsValue(stream) {
148
- var word = stream.current().toLowerCase();
149
- if (valueKeywords.hasOwnProperty(word))
150
- override = "atom";
151
- else if (colorKeywords.hasOwnProperty(word))
152
- override = "keyword";
153
- else
154
- override = "variable";
155
- }
156
-
157
- var states = {};
158
-
159
- states.top = function(type, stream, state) {
160
- if (type == "{") {
161
- return pushContext(state, stream, "block");
162
- } else if (type == "}" && state.context.prev) {
163
- return popContext(state);
164
- } else if (supportsAtComponent && /@component/i.test(type)) {
165
- return pushContext(state, stream, "atComponentBlock");
166
- } else if (/^@(-moz-)?document$/i.test(type)) {
167
- return pushContext(state, stream, "documentTypes");
168
- } else if (/^@(media|supports|(-moz-)?document|import)$/i.test(type)) {
169
- return pushContext(state, stream, "atBlock");
170
- } else if (/^@(font-face|counter-style)/i.test(type)) {
171
- state.stateArg = type;
172
- return "restricted_atBlock_before";
173
- } else if (/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(type)) {
174
- return "keyframes";
175
- } else if (type && type.charAt(0) == "@") {
176
- return pushContext(state, stream, "at");
177
- } else if (type == "hash") {
178
- override = "builtin";
179
- } else if (type == "word") {
180
- override = "tag";
181
- } else if (type == "variable-definition") {
182
- return "maybeprop";
183
- } else if (type == "interpolation") {
184
- return pushContext(state, stream, "interpolation");
185
- } else if (type == ":") {
186
- return "pseudo";
187
- } else if (allowNested && type == "(") {
188
- return pushContext(state, stream, "parens");
189
- }
190
- return state.context.type;
191
- };
192
-
193
- states.block = function(type, stream, state) {
194
- if (type == "word") {
195
- var word = stream.current().toLowerCase();
196
- if (propertyKeywords.hasOwnProperty(word)) {
197
- override = "property";
198
- return "maybeprop";
199
- } else if (nonStandardPropertyKeywords.hasOwnProperty(word)) {
200
- override = "string-2";
201
- return "maybeprop";
202
- } else if (allowNested) {
203
- override = stream.match(/^\s*:(?:\s|$)/, false) ? "property" : "tag";
204
- return "block";
205
- } else {
206
- override += " error";
207
- return "maybeprop";
208
- }
209
- } else if (type == "meta") {
210
- return "block";
211
- } else if (!allowNested && (type == "hash" || type == "qualifier")) {
212
- override = "error";
213
- return "block";
214
- } else {
215
- return states.top(type, stream, state);
216
- }
217
- };
218
-
219
- states.maybeprop = function(type, stream, state) {
220
- if (type == ":") return pushContext(state, stream, "prop");
221
- return pass(type, stream, state);
222
- };
223
-
224
- states.prop = function(type, stream, state) {
225
- if (type == ";") return popContext(state);
226
- if (type == "{" && allowNested) return pushContext(state, stream, "propBlock");
227
- if (type == "}" || type == "{") return popAndPass(type, stream, state);
228
- if (type == "(") return pushContext(state, stream, "parens");
229
-
230
- if (type == "hash" && !/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(stream.current())) {
231
- override += " error";
232
- } else if (type == "word") {
233
- wordAsValue(stream);
234
- } else if (type == "interpolation") {
235
- return pushContext(state, stream, "interpolation");
236
- }
237
- return "prop";
238
- };
239
-
240
- states.propBlock = function(type, _stream, state) {
241
- if (type == "}") return popContext(state);
242
- if (type == "word") { override = "property"; return "maybeprop"; }
243
- return state.context.type;
244
- };
245
-
246
- states.parens = function(type, stream, state) {
247
- if (type == "{" || type == "}") return popAndPass(type, stream, state);
248
- if (type == ")") return popContext(state);
249
- if (type == "(") return pushContext(state, stream, "parens");
250
- if (type == "interpolation") return pushContext(state, stream, "interpolation");
251
- if (type == "word") wordAsValue(stream);
252
- return "parens";
253
- };
254
-
255
- states.pseudo = function(type, stream, state) {
256
- if (type == "meta") return "pseudo";
257
-
258
- if (type == "word") {
259
- override = "variable-3";
260
- return state.context.type;
261
- }
262
- return pass(type, stream, state);
263
- };
264
-
265
- states.documentTypes = function(type, stream, state) {
266
- if (type == "word" && documentTypes.hasOwnProperty(stream.current())) {
267
- override = "tag";
268
- return state.context.type;
269
- } else {
270
- return states.atBlock(type, stream, state);
271
- }
272
- };
273
-
274
- states.atBlock = function(type, stream, state) {
275
- if (type == "(") return pushContext(state, stream, "atBlock_parens");
276
- if (type == "}" || type == ";") return popAndPass(type, stream, state);
277
- if (type == "{") return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top");
278
-
279
- if (type == "interpolation") return pushContext(state, stream, "interpolation");
280
-
281
- if (type == "word") {
282
- var word = stream.current().toLowerCase();
283
- if (word == "only" || word == "not" || word == "and" || word == "or")
284
- override = "keyword";
285
- else if (mediaTypes.hasOwnProperty(word))
286
- override = "attribute";
287
- else if (mediaFeatures.hasOwnProperty(word))
288
- override = "property";
289
- else if (mediaValueKeywords.hasOwnProperty(word))
290
- override = "keyword";
291
- else if (propertyKeywords.hasOwnProperty(word))
292
- override = "property";
293
- else if (nonStandardPropertyKeywords.hasOwnProperty(word))
294
- override = "string-2";
295
- else if (valueKeywords.hasOwnProperty(word))
296
- override = "atom";
297
- else if (colorKeywords.hasOwnProperty(word))
298
- override = "keyword";
299
- else
300
- override = "error";
301
- }
302
- return state.context.type;
303
- };
304
-
305
- states.atComponentBlock = function(type, stream, state) {
306
- if (type == "}")
307
- return popAndPass(type, stream, state);
308
- if (type == "{")
309
- return popContext(state) && pushContext(state, stream, allowNested ? "block" : "top", false);
310
- if (type == "word")
311
- override = "error";
312
- return state.context.type;
313
- };
314
-
315
- states.atBlock_parens = function(type, stream, state) {
316
- if (type == ")") return popContext(state);
317
- if (type == "{" || type == "}") return popAndPass(type, stream, state, 2);
318
- return states.atBlock(type, stream, state);
319
- };
320
-
321
- states.restricted_atBlock_before = function(type, stream, state) {
322
- if (type == "{")
323
- return pushContext(state, stream, "restricted_atBlock");
324
- if (type == "word" && state.stateArg == "@counter-style") {
325
- override = "variable";
326
- return "restricted_atBlock_before";
327
- }
328
- return pass(type, stream, state);
329
- };
330
-
331
- states.restricted_atBlock = function(type, stream, state) {
332
- if (type == "}") {
333
- state.stateArg = null;
334
- return popContext(state);
335
- }
336
- if (type == "word") {
337
- if ((state.stateArg == "@font-face" && !fontProperties.hasOwnProperty(stream.current().toLowerCase())) ||
338
- (state.stateArg == "@counter-style" && !counterDescriptors.hasOwnProperty(stream.current().toLowerCase())))
339
- override = "error";
340
- else
341
- override = "property";
342
- return "maybeprop";
343
- }
344
- return "restricted_atBlock";
345
- };
346
-
347
- states.keyframes = function(type, stream, state) {
348
- if (type == "word") { override = "variable"; return "keyframes"; }
349
- if (type == "{") return pushContext(state, stream, "top");
350
- return pass(type, stream, state);
351
- };
352
-
353
- states.at = function(type, stream, state) {
354
- if (type == ";") return popContext(state);
355
- if (type == "{" || type == "}") return popAndPass(type, stream, state);
356
- if (type == "word") override = "tag";
357
- else if (type == "hash") override = "builtin";
358
- return "at";
359
- };
360
-
361
- states.interpolation = function(type, stream, state) {
362
- if (type == "}") return popContext(state);
363
- if (type == "{" || type == ";") return popAndPass(type, stream, state);
364
- if (type == "word") override = "variable";
365
- else if (type != "variable" && type != "(" && type != ")") override = "error";
366
- return "interpolation";
367
- };
368
-
369
- return {
370
- startState: function(base) {
371
- return {tokenize: null,
372
- state: inline ? "block" : "top",
373
- stateArg: null,
374
- context: new Context(inline ? "block" : "top", base || 0, null)};
375
- },
376
-
377
- token: function(stream, state) {
378
- if (!state.tokenize && stream.eatSpace()) return null;
379
- var style = (state.tokenize || tokenBase)(stream, state);
380
- if (style && typeof style == "object") {
381
- type = style[1];
382
- style = style[0];
383
- }
384
- override = style;
385
- if (type != "comment")
386
- state.state = states[state.state](type, stream, state);
387
- return override;
388
- },
389
-
390
- indent: function(state, textAfter) {
391
- var cx = state.context, ch = textAfter && textAfter.charAt(0);
392
- var indent = cx.indent;
393
- if (cx.type == "prop" && (ch == "}" || ch == ")")) cx = cx.prev;
394
- if (cx.prev) {
395
- if (ch == "}" && (cx.type == "block" || cx.type == "top" ||
396
- cx.type == "interpolation" || cx.type == "restricted_atBlock")) {
397
- // Resume indentation from parent context.
398
- cx = cx.prev;
399
- indent = cx.indent;
400
- } else if (ch == ")" && (cx.type == "parens" || cx.type == "atBlock_parens") ||
401
- ch == "{" && (cx.type == "at" || cx.type == "atBlock")) {
402
- // Dedent relative to current context.
403
- indent = Math.max(0, cx.indent - indentUnit);
404
- }
405
- }
406
- return indent;
407
- },
408
-
409
- electricChars: "}",
410
- blockCommentStart: "/*",
411
- blockCommentEnd: "*/",
412
- blockCommentContinue: " * ",
413
- lineComment: lineComment,
414
- fold: "brace"
415
- };
416
- });
417
-
418
- function keySet(array) {
419
- var keys = {};
420
- for (var i = 0; i < array.length; ++i) {
421
- keys[array[i].toLowerCase()] = true;
422
- }
423
- return keys;
424
- }
425
-
426
- var documentTypes_ = [
427
- "domain", "regexp", "url", "url-prefix"
428
- ], documentTypes = keySet(documentTypes_);
429
-
430
- var mediaTypes_ = [
431
- "all", "aural", "braille", "handheld", "print", "projection", "screen",
432
- "tty", "tv", "embossed"
433
- ], mediaTypes = keySet(mediaTypes_);
434
-
435
- var mediaFeatures_ = [
436
- "width", "min-width", "max-width", "height", "min-height", "max-height",
437
- "device-width", "min-device-width", "max-device-width", "device-height",
438
- "min-device-height", "max-device-height", "aspect-ratio",
439
- "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio",
440
- "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color",
441
- "max-color", "color-index", "min-color-index", "max-color-index",
442
- "monochrome", "min-monochrome", "max-monochrome", "resolution",
443
- "min-resolution", "max-resolution", "scan", "grid", "orientation",
444
- "device-pixel-ratio", "min-device-pixel-ratio", "max-device-pixel-ratio",
445
- "pointer", "any-pointer", "hover", "any-hover"
446
- ], mediaFeatures = keySet(mediaFeatures_);
447
-
448
- var mediaValueKeywords_ = [
449
- "landscape", "portrait", "none", "coarse", "fine", "on-demand", "hover",
450
- "interlace", "progressive"
451
- ], mediaValueKeywords = keySet(mediaValueKeywords_);
452
-
453
- var propertyKeywords_ = [
454
- "align-content", "align-items", "align-self", "alignment-adjust",
455
- "alignment-baseline", "anchor-point", "animation", "animation-delay",
456
- "animation-direction", "animation-duration", "animation-fill-mode",
457
- "animation-iteration-count", "animation-name", "animation-play-state",
458
- "animation-timing-function", "appearance", "azimuth", "backface-visibility",
459
- "background", "background-attachment", "background-blend-mode", "background-clip",
460
- "background-color", "background-image", "background-origin", "background-position",
461
- "background-repeat", "background-size", "baseline-shift", "binding",
462
- "bleed", "bookmark-label", "bookmark-level", "bookmark-state",
463
- "bookmark-target", "border", "border-bottom", "border-bottom-color",
464
- "border-bottom-left-radius", "border-bottom-right-radius",
465
- "border-bottom-style", "border-bottom-width", "border-collapse",
466
- "border-color", "border-image", "border-image-outset",
467
- "border-image-repeat", "border-image-slice", "border-image-source",
468
- "border-image-width", "border-left", "border-left-color",
469
- "border-left-style", "border-left-width", "border-radius", "border-right",
470
- "border-right-color", "border-right-style", "border-right-width",
471
- "border-spacing", "border-style", "border-top", "border-top-color",
472
- "border-top-left-radius", "border-top-right-radius", "border-top-style",
473
- "border-top-width", "border-width", "bottom", "box-decoration-break",
474
- "box-shadow", "box-sizing", "break-after", "break-before", "break-inside",
475
- "caption-side", "caret-color", "clear", "clip", "color", "color-profile", "column-count",
476
- "column-fill", "column-gap", "column-rule", "column-rule-color",
477
- "column-rule-style", "column-rule-width", "column-span", "column-width",
478
- "columns", "content", "counter-increment", "counter-reset", "crop", "cue",
479
- "cue-after", "cue-before", "cursor", "direction", "display",
480
- "dominant-baseline", "drop-initial-after-adjust",
481
- "drop-initial-after-align", "drop-initial-before-adjust",
482
- "drop-initial-before-align", "drop-initial-size", "drop-initial-value",
483
- "elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis",
484
- "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap",
485
- "float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings",
486
- "font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust",
487
- "font-stretch", "font-style", "font-synthesis", "font-variant",
488
- "font-variant-alternates", "font-variant-caps", "font-variant-east-asian",
489
- "font-variant-ligatures", "font-variant-numeric", "font-variant-position",
490
- "font-weight", "grid", "grid-area", "grid-auto-columns", "grid-auto-flow",
491
- "grid-auto-rows", "grid-column", "grid-column-end", "grid-column-gap",
492
- "grid-column-start", "grid-gap", "grid-row", "grid-row-end", "grid-row-gap",
493
- "grid-row-start", "grid-template", "grid-template-areas", "grid-template-columns",
494
- "grid-template-rows", "hanging-punctuation", "height", "hyphens",
495
- "icon", "image-orientation", "image-rendering", "image-resolution",
496
- "inline-box-align", "justify-content", "justify-items", "justify-self", "left", "letter-spacing",
497
- "line-break", "line-height", "line-stacking", "line-stacking-ruby",
498
- "line-stacking-shift", "line-stacking-strategy", "list-style",
499
- "list-style-image", "list-style-position", "list-style-type", "margin",
500
- "margin-bottom", "margin-left", "margin-right", "margin-top",
501
- "marks", "marquee-direction", "marquee-loop",
502
- "marquee-play-count", "marquee-speed", "marquee-style", "max-height",
503
- "max-width", "min-height", "min-width", "mix-blend-mode", "move-to", "nav-down", "nav-index",
504
- "nav-left", "nav-right", "nav-up", "object-fit", "object-position",
505
- "opacity", "order", "orphans", "outline",
506
- "outline-color", "outline-offset", "outline-style", "outline-width",
507
- "overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y",
508
- "padding", "padding-bottom", "padding-left", "padding-right", "padding-top",
509
- "page", "page-break-after", "page-break-before", "page-break-inside",
510
- "page-policy", "pause", "pause-after", "pause-before", "perspective",
511
- "perspective-origin", "pitch", "pitch-range", "place-content", "place-items", "place-self", "play-during", "position",
512
- "presentation-level", "punctuation-trim", "quotes", "region-break-after",
513
- "region-break-before", "region-break-inside", "region-fragment",
514
- "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness",
515
- "right", "rotation", "rotation-point", "ruby-align", "ruby-overhang",
516
- "ruby-position", "ruby-span", "shape-image-threshold", "shape-inside", "shape-margin",
517
- "shape-outside", "size", "speak", "speak-as", "speak-header",
518
- "speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set",
519
- "tab-size", "table-layout", "target", "target-name", "target-new",
520
- "target-position", "text-align", "text-align-last", "text-decoration",
521
- "text-decoration-color", "text-decoration-line", "text-decoration-skip",
522
- "text-decoration-style", "text-emphasis", "text-emphasis-color",
523
- "text-emphasis-position", "text-emphasis-style", "text-height",
524
- "text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow",
525
- "text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position",
526
- "text-wrap", "top", "transform", "transform-origin", "transform-style",
527
- "transition", "transition-delay", "transition-duration",
528
- "transition-property", "transition-timing-function", "unicode-bidi",
529
- "user-select", "vertical-align", "visibility", "voice-balance", "voice-duration",
530
- "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress",
531
- "voice-volume", "volume", "white-space", "widows", "width", "will-change", "word-break",
532
- "word-spacing", "word-wrap", "z-index",
533
- // SVG-specific
534
- "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color",
535
- "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events",
536
- "color-interpolation", "color-interpolation-filters",
537
- "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering",
538
- "marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke",
539
- "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin",
540
- "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering",
541
- "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal",
542
- "glyph-orientation-vertical", "text-anchor", "writing-mode"
543
- ], propertyKeywords = keySet(propertyKeywords_);
544
-
545
- var nonStandardPropertyKeywords_ = [
546
- "scrollbar-arrow-color", "scrollbar-base-color", "scrollbar-dark-shadow-color",
547
- "scrollbar-face-color", "scrollbar-highlight-color", "scrollbar-shadow-color",
548
- "scrollbar-3d-light-color", "scrollbar-track-color", "shape-inside",
549
- "searchfield-cancel-button", "searchfield-decoration", "searchfield-results-button",
550
- "searchfield-results-decoration", "zoom"
551
- ], nonStandardPropertyKeywords = keySet(nonStandardPropertyKeywords_);
552
-
553
- var fontProperties_ = [
554
- "font-family", "src", "unicode-range", "font-variant", "font-feature-settings",
555
- "font-stretch", "font-weight", "font-style"
556
- ], fontProperties = keySet(fontProperties_);
557
-
558
- var counterDescriptors_ = [
559
- "additive-symbols", "fallback", "negative", "pad", "prefix", "range",
560
- "speak-as", "suffix", "symbols", "system"
561
- ], counterDescriptors = keySet(counterDescriptors_);
562
-
563
- var colorKeywords_ = [
564
- "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige",
565
- "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown",
566
- "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue",
567
- "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod",
568
- "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen",
569
- "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen",
570
- "darkslateblue", "darkslategray", "darkturquoise", "darkviolet",
571
- "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick",
572
- "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite",
573
- "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew",
574
- "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender",
575
- "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral",
576
- "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink",
577
- "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray",
578
- "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta",
579
- "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple",
580
- "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise",
581
- "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin",
582
- "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered",
583
- "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred",
584
- "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue",
585
- "purple", "rebeccapurple", "red", "rosybrown", "royalblue", "saddlebrown",
586
- "salmon", "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue",
587
- "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan",
588
- "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white",
589
- "whitesmoke", "yellow", "yellowgreen"
590
- ], colorKeywords = keySet(colorKeywords_);
591
-
592
- var valueKeywords_ = [
593
- "above", "absolute", "activeborder", "additive", "activecaption", "afar",
594
- "after-white-space", "ahead", "alias", "all", "all-scroll", "alphabetic", "alternate",
595
- "always", "amharic", "amharic-abegede", "antialiased", "appworkspace",
596
- "arabic-indic", "armenian", "asterisks", "attr", "auto", "auto-flow", "avoid", "avoid-column", "avoid-page",
597
- "avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary",
598
- "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box",
599
- "both", "bottom", "break", "break-all", "break-word", "bullets", "button", "button-bevel",
600
- "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "calc", "cambodian",
601
- "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret",
602
- "cell", "center", "checkbox", "circle", "cjk-decimal", "cjk-earthly-branch",
603
- "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote",
604
- "col-resize", "collapse", "color", "color-burn", "color-dodge", "column", "column-reverse",
605
- "compact", "condensed", "contain", "content", "contents",
606
- "content-box", "context-menu", "continuous", "copy", "counter", "counters", "cover", "crop",
607
- "cross", "crosshair", "currentcolor", "cursive", "cyclic", "darken", "dashed", "decimal",
608
- "decimal-leading-zero", "default", "default-button", "dense", "destination-atop",
609
- "destination-in", "destination-out", "destination-over", "devanagari", "difference",
610
- "disc", "discard", "disclosure-closed", "disclosure-open", "document",
611
- "dot-dash", "dot-dot-dash",
612
- "dotted", "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out",
613
- "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede",
614
- "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er",
615
- "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er",
616
- "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et",
617
- "ethiopic-halehame-gez", "ethiopic-halehame-om-et",
618
- "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et",
619
- "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", "ethiopic-halehame-tig",
620
- "ethiopic-numeric", "ew-resize", "exclusion", "expanded", "extends", "extra-condensed",
621
- "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "flex", "flex-end", "flex-start", "footnotes",
622
- "forwards", "from", "geometricPrecision", "georgian", "graytext", "grid", "groove",
623
- "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hard-light", "hebrew",
624
- "help", "hidden", "hide", "higher", "highlight", "highlighttext",
625
- "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "hue", "icon", "ignore",
626
- "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite",
627
- "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis",
628
- "inline-block", "inline-flex", "inline-grid", "inline-table", "inset", "inside", "intrinsic", "invert",
629
- "italic", "japanese-formal", "japanese-informal", "justify", "kannada",
630
- "katakana", "katakana-iroha", "keep-all", "khmer",
631
- "korean-hangul-formal", "korean-hanja-formal", "korean-hanja-informal",
632
- "landscape", "lao", "large", "larger", "left", "level", "lighter", "lighten",
633
- "line-through", "linear", "linear-gradient", "lines", "list-item", "listbox", "listitem",
634
- "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian",
635
- "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian",
636
- "lower-roman", "lowercase", "ltr", "luminosity", "malayalam", "match", "matrix", "matrix3d",
637
- "media-controls-background", "media-current-time-display",
638
- "media-fullscreen-button", "media-mute-button", "media-play-button",
639
- "media-return-to-realtime-button", "media-rewind-button",
640
- "media-seek-back-button", "media-seek-forward-button", "media-slider",
641
- "media-sliderthumb", "media-time-remaining-display", "media-volume-slider",
642
- "media-volume-slider-container", "media-volume-sliderthumb", "medium",
643
- "menu", "menulist", "menulist-button", "menulist-text",
644
- "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic",
645
- "mix", "mongolian", "monospace", "move", "multiple", "multiply", "myanmar", "n-resize",
646
- "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop",
647
- "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap",
648
- "ns-resize", "numbers", "numeric", "nw-resize", "nwse-resize", "oblique", "octal", "opacity", "open-quote",
649
- "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset",
650
- "outside", "outside-shape", "overlay", "overline", "padding", "padding-box",
651
- "painted", "page", "paused", "persian", "perspective", "plus-darker", "plus-lighter",
652
- "pointer", "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d",
653
- "progress", "push-button", "radial-gradient", "radio", "read-only",
654
- "read-write", "read-write-plaintext-only", "rectangle", "region",
655
- "relative", "repeat", "repeating-linear-gradient",
656
- "repeating-radial-gradient", "repeat-x", "repeat-y", "reset", "reverse",
657
- "rgb", "rgba", "ridge", "right", "rotate", "rotate3d", "rotateX", "rotateY",
658
- "rotateZ", "round", "row", "row-resize", "row-reverse", "rtl", "run-in", "running",
659
- "s-resize", "sans-serif", "saturation", "scale", "scale3d", "scaleX", "scaleY", "scaleZ", "screen",
660
- "scroll", "scrollbar", "scroll-position", "se-resize", "searchfield",
661
- "searchfield-cancel-button", "searchfield-decoration",
662
- "searchfield-results-button", "searchfield-results-decoration", "self-start", "self-end",
663
- "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama",
664
- "simp-chinese-formal", "simp-chinese-informal", "single",
665
- "skew", "skewX", "skewY", "skip-white-space", "slide", "slider-horizontal",
666
- "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow",
667
- "small", "small-caps", "small-caption", "smaller", "soft-light", "solid", "somali",
668
- "source-atop", "source-in", "source-out", "source-over", "space", "space-around", "space-between", "space-evenly", "spell-out", "square",
669
- "square-button", "start", "static", "status-bar", "stretch", "stroke", "sub",
670
- "subpixel-antialiased", "super", "sw-resize", "symbolic", "symbols", "system-ui", "table",
671
- "table-caption", "table-cell", "table-column", "table-column-group",
672
- "table-footer-group", "table-header-group", "table-row", "table-row-group",
673
- "tamil",
674
- "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai",
675
- "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight",
676
- "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er",
677
- "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top",
678
- "trad-chinese-formal", "trad-chinese-informal", "transform",
679
- "translate", "translate3d", "translateX", "translateY", "translateZ",
680
- "transparent", "ultra-condensed", "ultra-expanded", "underline", "unset", "up",
681
- "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal",
682
- "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url",
683
- "var", "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted",
684
- "visibleStroke", "visual", "w-resize", "wait", "wave", "wider",
685
- "window", "windowframe", "windowtext", "words", "wrap", "wrap-reverse", "x-large", "x-small", "xor",
686
- "xx-large", "xx-small"
687
- ], valueKeywords = keySet(valueKeywords_);
688
-
689
- var allWords = documentTypes_.concat(mediaTypes_).concat(mediaFeatures_).concat(mediaValueKeywords_)
690
- .concat(propertyKeywords_).concat(nonStandardPropertyKeywords_).concat(colorKeywords_)
691
- .concat(valueKeywords_);
692
- CodeMirror.registerHelper("hintWords", "css", allWords);
693
-
694
- function tokenCComment(stream, state) {
695
- var maybeEnd = false, ch;
696
- while ((ch = stream.next()) != null) {
697
- if (maybeEnd && ch == "/") {
698
- state.tokenize = null;
699
- break;
700
- }
701
- maybeEnd = (ch == "*");
702
- }
703
- return ["comment", "comment"];
704
- }
705
-
706
- CodeMirror.defineMIME("text/css", {
707
- documentTypes: documentTypes,
708
- mediaTypes: mediaTypes,
709
- mediaFeatures: mediaFeatures,
710
- mediaValueKeywords: mediaValueKeywords,
711
- propertyKeywords: propertyKeywords,
712
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
713
- fontProperties: fontProperties,
714
- counterDescriptors: counterDescriptors,
715
- colorKeywords: colorKeywords,
716
- valueKeywords: valueKeywords,
717
- tokenHooks: {
718
- "/": function(stream, state) {
719
- if (!stream.eat("*")) return false;
720
- state.tokenize = tokenCComment;
721
- return tokenCComment(stream, state);
722
- }
723
- },
724
- name: "css"
725
- });
726
-
727
- CodeMirror.defineMIME("text/x-scss", {
728
- mediaTypes: mediaTypes,
729
- mediaFeatures: mediaFeatures,
730
- mediaValueKeywords: mediaValueKeywords,
731
- propertyKeywords: propertyKeywords,
732
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
733
- colorKeywords: colorKeywords,
734
- valueKeywords: valueKeywords,
735
- fontProperties: fontProperties,
736
- allowNested: true,
737
- lineComment: "//",
738
- tokenHooks: {
739
- "/": function(stream, state) {
740
- if (stream.eat("/")) {
741
- stream.skipToEnd();
742
- return ["comment", "comment"];
743
- } else if (stream.eat("*")) {
744
- state.tokenize = tokenCComment;
745
- return tokenCComment(stream, state);
746
- } else {
747
- return ["operator", "operator"];
748
- }
749
- },
750
- ":": function(stream) {
751
- if (stream.match(/\s*\{/, false))
752
- return [null, null]
753
- return false;
754
- },
755
- "$": function(stream) {
756
- stream.match(/^[\w-]+/);
757
- if (stream.match(/^\s*:/, false))
758
- return ["variable-2", "variable-definition"];
759
- return ["variable-2", "variable"];
760
- },
761
- "#": function(stream) {
762
- if (!stream.eat("{")) return false;
763
- return [null, "interpolation"];
764
- }
765
- },
766
- name: "css",
767
- helperType: "scss"
768
- });
769
-
770
- CodeMirror.defineMIME("text/x-less", {
771
- mediaTypes: mediaTypes,
772
- mediaFeatures: mediaFeatures,
773
- mediaValueKeywords: mediaValueKeywords,
774
- propertyKeywords: propertyKeywords,
775
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
776
- colorKeywords: colorKeywords,
777
- valueKeywords: valueKeywords,
778
- fontProperties: fontProperties,
779
- allowNested: true,
780
- lineComment: "//",
781
- tokenHooks: {
782
- "/": function(stream, state) {
783
- if (stream.eat("/")) {
784
- stream.skipToEnd();
785
- return ["comment", "comment"];
786
- } else if (stream.eat("*")) {
787
- state.tokenize = tokenCComment;
788
- return tokenCComment(stream, state);
789
- } else {
790
- return ["operator", "operator"];
791
- }
792
- },
793
- "@": function(stream) {
794
- if (stream.eat("{")) return [null, "interpolation"];
795
- if (stream.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i, false)) return false;
796
- stream.eatWhile(/[\w\\\-]/);
797
- if (stream.match(/^\s*:/, false))
798
- return ["variable-2", "variable-definition"];
799
- return ["variable-2", "variable"];
800
- },
801
- "&": function() {
802
- return ["atom", "atom"];
803
- }
804
- },
805
- name: "css",
806
- helperType: "less"
807
- });
808
-
809
- CodeMirror.defineMIME("text/x-gss", {
810
- documentTypes: documentTypes,
811
- mediaTypes: mediaTypes,
812
- mediaFeatures: mediaFeatures,
813
- propertyKeywords: propertyKeywords,
814
- nonStandardPropertyKeywords: nonStandardPropertyKeywords,
815
- fontProperties: fontProperties,
816
- counterDescriptors: counterDescriptors,
817
- colorKeywords: colorKeywords,
818
- valueKeywords: valueKeywords,
819
- supportsAtComponent: true,
820
- tokenHooks: {
821
- "/": function(stream, state) {
822
- if (!stream.eat("*")) return false;
823
- state.tokenize = tokenCComment;
824
- return tokenCComment(stream, state);
825
- }
826
- },
827
- name: "css",
828
- helperType: "gss"
829
- });
830
-
831
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/js/form-submit.js DELETED
@@ -1,45 +0,0 @@
1
- function submitForm(form) {
2
- var $form = $(form);
3
- var parentPanelId = $form.parents('.brz-ed-scroll-pane:first').attr('id');
4
- var formData = new FormData();
5
- var actionUrl = $form.attr('action');
6
-
7
-
8
- $form.find('input,textarea,select').each(function () {
9
-
10
- var $this = $(this);
11
- var type = $this.attr('type');
12
- var name = $this.attr('name');
13
-
14
- if (type === 'file') {
15
- var file = $this[0].files[0];
16
- if (file) {
17
- formData.append(name, file, file.name);
18
- }
19
- } else {
20
- formData.append(name, $this.val())
21
- }
22
-
23
- });
24
-
25
- $.ajax({
26
- type: 'POST',
27
- processData: false,
28
- contentType: false,
29
- url: actionUrl,
30
- data: formData
31
- }).done(function (data) {
32
-
33
- var parents = $form.parents('.brz-ed-scroll-pane:first');
34
- parents.html(
35
- $(data).find('#' + parentPanelId).html()
36
- );
37
-
38
- bindFormInputEvents(parents);
39
-
40
- parents.find('.site-settings-wrap:first').prepend("<div class=\"alert alert-success\" role=\"alert\">Settings saved!</div>");
41
- }).fail(function () {
42
- var parents = $form.parents('.brz-ed-scroll-pane:first');
43
- parents.find('.site-settings-wrap:first').prepend("<div class=\"alert alert-error\" role=\"alert\">Save settings failed!</div>");
44
- })
45
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/js/general.js DELETED
@@ -1,217 +0,0 @@
1
- function bindFormInputEvents(parent) {
2
- // CodeMirror call
3
- $(".codemirror-editor", parent).each(function () {
4
- var editorId = $(this).attr("id");
5
- var mode = $(this).attr("data-mode");
6
- var element = document.getElementById(editorId);
7
-
8
- var editor = CodeMirror.fromTextArea(element, {
9
- mode: mode,
10
- lineNumbers: false,
11
- lineWrapping: true,
12
- scrollbarStyle: "null",
13
- commentBlankLines: true,
14
- autoRefresh: 400
15
- }).on('change', function (cm) {
16
- element.value = cm.getValue();
17
- });
18
-
19
- });
20
-
21
- $('.submit', parent).on('click', function () {
22
- var form = $(this).parents('form:first');
23
- submitForm(form);
24
- });
25
-
26
- // File Upload
27
- $(".upload-file-btn > input", parent).change(function () {
28
- var inputFileVal = $(this).val();
29
- $('.sett-favicon-path').text(inputFileVal);
30
- });
31
- }
32
-
33
- // CodeMirror, copyright (c) by Marijn Haverbeke and others
34
- // Distributed under an MIT license: https://codemirror.net/LICENSE
35
- (function(mod) {
36
- if (typeof exports == "object" && typeof module == "object") // CommonJS
37
- mod(require("../../lib/codemirror"))
38
- else if (typeof define == "function" && define.amd) // AMD
39
- define(["../../lib/codemirror"], mod)
40
- else // Plain browser env
41
- mod(CodeMirror)
42
- })(function(CodeMirror) {
43
- "use strict"
44
-
45
- CodeMirror.defineOption("autoRefresh", false, function(cm, val) {
46
- if (cm.state.autoRefresh) {
47
- stopListening(cm, cm.state.autoRefresh)
48
- cm.state.autoRefresh = null
49
- }
50
- if (val && cm.display.wrapper.offsetHeight == 0)
51
- startListening(cm, cm.state.autoRefresh = {delay: val.delay || 250})
52
- })
53
-
54
- function startListening(cm, state) {
55
- function check() {
56
- if (cm.display.wrapper.offsetHeight) {
57
- stopListening(cm, state)
58
- if (cm.display.lastWrapHeight != cm.display.wrapper.clientHeight)
59
- cm.refresh()
60
- } else {
61
- state.timeout = setTimeout(check, state.delay)
62
- }
63
- }
64
- state.timeout = setTimeout(check, state.delay)
65
- state.hurry = function() {
66
- clearTimeout(state.timeout)
67
- state.timeout = setTimeout(check, 50)
68
- }
69
- CodeMirror.on(window, "mouseup", state.hurry)
70
- CodeMirror.on(window, "keyup", state.hurry)
71
- }
72
-
73
- function stopListening(_cm, state) {
74
- clearTimeout(state.timeout)
75
- CodeMirror.off(window, "mouseup", state.hurry)
76
- CodeMirror.off(window, "keyup", state.hurry)
77
- }
78
- });
79
-
80
- jQuery(document).ready(function ($) {
81
- "use strict";
82
-
83
- var screenRes = $(window).width();
84
-
85
- // Sortable call
86
- var nestedSortables = [].slice.call(document.querySelectorAll('.nested-sortable'));
87
-
88
- for (var i = 0; i < nestedSortables.length; i++) {
89
- new Sortable(nestedSortables[i], {
90
- group: 'nested',
91
- animation: 150,
92
- fallbackOnBody: true,
93
- swapThreshold: 0.65
94
- });
95
- }
96
-
97
- // Click settings icon in menu & open settings form
98
- $('.pages-list-actions__icon__settings').on('click', function () {
99
- var $this = $(this),
100
- $thisParent = $this.parents('.content_row'),
101
- firstItemOffsetTop = $('#nestedDD .content_row:first').offset().top,
102
- menuOption = $thisParent.find('.menuRowOptions'),
103
- formOptionHeight = menuOption.height(),
104
- $thisParentOffsetTop = $thisParent.offset().top;
105
-
106
- //$('#nestedDD .content_row').removeClass('active-option');
107
- $thisParent.toggleClass('active-option');
108
-
109
- // Calculate offset & set position
110
- menuOption.css({"top": '-' + ($thisParentOffsetTop - firstItemOffsetTop) + 'px'});
111
- if ($thisParentOffsetTop > firstItemOffsetTop + formOptionHeight) {
112
- $thisParent.addClass('optionAuto');
113
- menuOption.css({"top": 'auto'});
114
- }
115
- ;
116
-
117
- // Close IF click outside dropdown
118
- $(document).mouseup(function (e) {
119
- if (!$this.is(e.target) && $this.has(e.target).length === 0 && menuOption.has(e.target).length === 0) {
120
- $thisParent.removeClass("active-option");
121
- }
122
- });
123
- });
124
-
125
- // Delete Sortable row if click on remove
126
- $(".content_row .menu_actions .pages-list-actions__icon").on("click", function () {
127
- $(this).closest('.menu_row').remove();
128
- });
129
-
130
- // Open & Close Account Settings
131
- $(".account-dropdown").on("click", function () {
132
- var $this = $(this),
133
- $thisParents = $this.parents(".account-dropdown-wrap"),
134
- dropdown = $thisParents.find(".dropdown-menu"),
135
- $thisChild = dropdown.find(".account");
136
-
137
- $thisParents.toggleClass("opened");
138
- dropdown.toggleClass("show");
139
-
140
- // Close IF click outside dropdown
141
- $(document).mouseup(function (e) {
142
- if (
143
- !$thisParents.is(e.target) &&
144
- $thisParents.has(e.target).length === 0
145
- ) {
146
- $thisParents.removeClass("opened")
147
- dropdown.removeClass("show");
148
- $('.add-new-account').removeClass('add-item');
149
- }
150
- });
151
-
152
- $thisChild.not('.add-new-account').on("click", function () {
153
- $thisParents.removeClass("opened")
154
- dropdown.removeClass("show");
155
- $('.add-new-account').removeClass('add-item');
156
- });
157
- });
158
- // Delete if click on trash
159
- $(".dropdown-menu .pages-list-actions__icon").on("click", function () {
160
- $(this).parents('.account').remove();
161
- });
162
- // Change placeholder when click on opion
163
- $(".dropdown-menu .account").not('.add-new-account').on("click", function () {
164
- var text = $(this).find(".account-name").text();
165
- var placeholder = $('.account-dropdown-wrap .account-dropdown span')
166
-
167
-
168
- $(placeholder).empty();
169
- $(placeholder).html(text);
170
- $(placeholder).addClass('selected');
171
- $('.menu-head .menu-head-btn').addClass('selected');
172
- });
173
-
174
- // Disable Empty Links
175
- $('a[href="#"]').click(function (event) {
176
- event.preventDefault();
177
- });
178
-
179
- $('#modal').modal('show');
180
-
181
- // Tabs
182
- $('.brz-ed-tab-item').on('click', function () {
183
- var tabNameAttr = $(this).attr('data-tab-name');
184
-
185
- if (!$(this).hasClass('brz-ed-popup-two-sidebar-list-active')) {
186
- $('.brz-ed-tab-item').removeClass('brz-ed-popup-two-sidebar-list-active');
187
- $(this).addClass('brz-ed-popup-two-sidebar-list-active');
188
-
189
- $('.brz-ed-popup-two-body__content > .brz-ed-scroll-pane').fadeOut(0).removeClass('brz-ed-scroll-pane-active');
190
- $('.brz-ed-popup-two-body__content').find('#' + tabNameAttr).fadeIn(0).addClass('brz-ed-scroll-pane-active');
191
- }
192
- });
193
-
194
-
195
- // Menu Load
196
- $('.brz-ed-popup-two-tab-item').on('click', function () {
197
- var pageNameAttr = $(this).attr('data-page-name');
198
- var dashNameAttr = $(this).attr('data-dash-name');
199
-
200
- if (!$(this).hasClass('brz-ed-popup-two-tab-item-active')) {
201
- $('.brz-ed-popup-two-tab-item').removeClass('brz-ed-popup-two-tab-item-active');
202
- $(this).addClass('brz-ed-popup-two-tab-item-active');
203
-
204
- $('.brz-ed-popup-two-body__content > .brz-ed-scroll-pane').fadeOut(0).removeClass('brz-ed-scroll-pane-active');
205
- $('.brz-ed-popup-two-body__content').find('#' + pageNameAttr).fadeIn(0).addClass('brz-ed-scroll-pane-active');
206
-
207
- $('.brz-ed-popup-two-sidebar > .modal_dash').fadeOut(0).removeClass('active');
208
- $('.brz-ed-popup-two-sidebar').find('#' + dashNameAttr).fadeIn(0).addClass('active');
209
-
210
- $('#settingsDash > .brz-ed-tab-item').removeClass('brz-ed-popup-two-sidebar-list-active');
211
- $('#settingsDash > li:first-child').addClass('brz-ed-popup-two-sidebar-list-active');
212
- }
213
- });
214
-
215
- bindFormInputEvents();
216
-
217
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/site-settings/js/jquery-3.3.1.min.js DELETED
@@ -1,2 +0,0 @@
1
- /*! jQuery v3.3.1 | (c) JS Foundation and other contributors | jquery.org/license */
2
- !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){"use strict";var n=[],r=e.document,i=Object.getPrototypeOf,o=n.slice,a=n.concat,s=n.push,u=n.indexOf,l={},c=l.toString,f=l.hasOwnProperty,p=f.toString,d=p.call(Object),h={},g=function e(t){return"function"==typeof t&&"number"!=typeof t.nodeType},y=function e(t){return null!=t&&t===t.window},v={type:!0,src:!0,noModule:!0};function m(e,t,n){var i,o=(t=t||r).createElement("script");if(o.text=e,n)for(i in v)n[i]&&(o[i]=n[i]);t.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[c.call(e)]||"object":typeof e}var b="3.3.1",w=function(e,t){return new w.fn.init(e,t)},T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;w.fn=w.prototype={jquery:"3.3.1",constructor:w,length:0,toArray:function(){return o.call(this)},get:function(e){return null==e?o.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=w.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return w.each(this,e)},map:function(e){return this.pushStack(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:n.sort,splice:n.splice},w.extend=w.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||g(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=a[t],a!==(r=e[t])&&(l&&r&&(w.isPlainObject(r)||(i=Array.isArray(r)))?(i?(i=!1,o=n&&Array.isArray(n)?n:[]):o=n&&w.isPlainObject(n)?n:{},a[t]=w.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},w.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==c.call(e))&&(!(t=i(e))||"function"==typeof(n=f.call(t,"constructor")&&t.constructor)&&p.call(n)===d)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){m(e)},each:function(e,t){var n,r=0;if(C(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(C(Object(e))?w.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:u.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r,i=[],o=0,a=e.length,s=!n;o<a;o++)(r=!t(e[o],o))!==s&&i.push(e[o]);return i},map:function(e,t,n){var r,i,o=0,s=[];if(C(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return a.apply([],s)},guid:1,support:h}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){l["[object "+t+"]"]=t.toLowerCase()});function C(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!g(e)&&!y(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var E=function(e){var t,n,r,i,o,a,s,u,l,c,f,p,d,h,g,y,v,m,x,b="sizzle"+1*new Date,w=e.document,T=0,C=0,E=ae(),k=ae(),S=ae(),D=function(e,t){return e===t&&(f=!0),0},N={}.hasOwnProperty,A=[],j=A.pop,q=A.push,L=A.push,H=A.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",I="\\["+M+"*("+R+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+M+"*\\]",W=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+I+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),F=new RegExp("^"+M+"*,"+M+"*"),_=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),z=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),X=new RegExp(W),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+I),PSEUDO:new RegExp("^"+W),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},G=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ee=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},te=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ne=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},re=function(){p()},ie=me(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{L.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(e){L={apply:A.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function oe(e,t,r,i){var o,s,l,c,f,h,v,m=t&&t.ownerDocument,T=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==T&&9!==T&&11!==T)return r;if(!i&&((t?t.ownerDocument||t:w)!==d&&p(t),t=t||d,g)){if(11!==T&&(f=J.exec(e)))if(o=f[1]){if(9===T){if(!(l=t.getElementById(o)))return r;if(l.id===o)return r.push(l),r}else if(m&&(l=m.getElementById(o))&&x(t,l)&&l.id===o)return r.push(l),r}else{if(f[2])return L.apply(r,t.getElementsByTagName(e)),r;if((o=f[3])&&n.getElementsByClassName&&t.getElementsByClassName)return L.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!S[e+" "]&&(!y||!y.test(e))){if(1!==T)m=t,v=e;else if("object"!==t.nodeName.toLowerCase()){(c=t.getAttribute("id"))?c=c.replace(te,ne):t.setAttribute("id",c=b),s=(h=a(e)).length;while(s--)h[s]="#"+c+" "+ve(h[s]);v=h.join(","),m=K.test(e)&&ge(t.parentNode)||t}if(v)try{return L.apply(r,m.querySelectorAll(v)),r}catch(e){}finally{c===b&&t.removeAttribute("id")}}}return u(e.replace(B,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function se(e){return e[b]=!0,e}function ue(e){var t=d.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function le(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function fe(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function pe(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ie(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return se(function(t){return t=+t,se(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ge(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}n=oe.support={},o=oe.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},p=oe.setDocument=function(e){var t,i,a=e?e.ownerDocument||e:w;return a!==d&&9===a.nodeType&&a.documentElement?(d=a,h=d.documentElement,g=!o(d),w!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",re,!1):i.attachEvent&&i.attachEvent("onunload",re)),n.attributes=ue(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=ue(function(e){return e.appendChild(d.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Q.test(d.getElementsByClassName),n.getById=ue(function(e){return h.appendChild(e).id=b,!d.getElementsByName||!d.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(Z,ee);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),r.find.TAG=n.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&g)return t.getElementsByClassName(e)},v=[],y=[],(n.qsa=Q.test(d.querySelectorAll))&&(ue(function(e){h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+P+")"),e.querySelectorAll("[id~="+b+"-]").length||y.push("~="),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||y.push(".#.+[+~]")}),ue(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=d.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(n.matchesSelector=Q.test(m=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&ue(function(e){n.disconnectedMatch=m.call(e,"*"),m.call(e,"[s!='']:x"),v.push("!=",W)}),y=y.length&&new RegExp(y.join("|")),v=v.length&&new RegExp(v.join("|")),t=Q.test(h.compareDocumentPosition),x=t||Q.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return f=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e===d||e.ownerDocument===w&&x(w,e)?-1:t===d||t.ownerDocument===w&&x(w,t)?1:c?O(c,e)-O(c,t):0:4&r?-1:1)}:function(e,t){if(e===t)return f=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===d?-1:t===d?1:i?-1:o?1:c?O(c,e)-O(c,t):0;if(i===o)return ce(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?ce(a[r],s[r]):a[r]===w?-1:s[r]===w?1:0},d):d},oe.matches=function(e,t){return oe(e,null,null,t)},oe.matchesSelector=function(e,t){if((e.ownerDocument||e)!==d&&p(e),t=t.replace(z,"='$1']"),n.matchesSelector&&g&&!S[t+" "]&&(!v||!v.test(t))&&(!y||!y.test(t)))try{var r=m.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){}return oe(t,d,null,[e]).length>0},oe.contains=function(e,t){return(e.ownerDocument||e)!==d&&p(e),x(e,t)},oe.attr=function(e,t){(e.ownerDocument||e)!==d&&p(e);var i=r.attrHandle[t.toLowerCase()],o=i&&N.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},oe.escape=function(e){return(e+"").replace(te,ne)},oe.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},oe.uniqueSort=function(e){var t,r=[],i=0,o=0;if(f=!n.detectDuplicates,c=!n.sortStable&&e.slice(0),e.sort(D),f){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1)}return c=null,e},i=oe.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e)}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=oe.selectors={cacheLength:50,createPseudo:se,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Z,ee),e[3]=(e[3]||e[4]||e[5]||"").replace(Z,ee),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||oe.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&oe.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=a(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Z,ee).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=oe.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace($," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",y=t.parentNode,v=s&&t.nodeName.toLowerCase(),m=!u&&!s,x=!1;if(y){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?y.firstChild:y.lastChild],a&&m){x=(d=(l=(c=(f=(p=y)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1])&&l[2],p=d&&y.childNodes[d];while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if(1===p.nodeType&&++x&&p===t){c[e]=[T,d,x];break}}else if(m&&(x=d=(l=(c=(f=(p=t)[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]||[])[0]===T&&l[1]),!1===x)while(p=++d&&p&&p[g]||(x=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===v:1===p.nodeType)&&++x&&(m&&((c=(f=p[b]||(p[b]={}))[p.uniqueID]||(f[p.uniqueID]={}))[e]=[T,x]),p===t))break;return(x-=i)===r||x%r==0&&x/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||oe.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?se(function(e,n){var r,o=i(e,t),a=o.length;while(a--)e[r=O(e,o[a])]=!(n[r]=o[a])}):function(e){return i(e,0,n)}):i}},pseudos:{not:se(function(e){var t=[],n=[],r=s(e.replace(B,"$1"));return r[b]?se(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:se(function(e){return function(t){return oe(e,t).length>0}}),contains:se(function(e){return e=e.replace(Z,ee),function(t){return(t.textContent||t.innerText||i(t)).indexOf(e)>-1}}),lang:se(function(e){return U.test(e||"")||oe.error("unsupported lang: "+e),e=e.replace(Z,ee).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return[0]}),last:he(function(e,t){return[t-1]}),eq:he(function(e,t,n){return[n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=fe(t);for(t in{submit:!0,reset:!0})r.pseudos[t]=pe(t);function ye(){}ye.prototype=r.filters=r.pseudos,r.setFilters=new ye,a=oe.tokenize=function(e,t){var n,i,o,a,s,u,l,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,u=[],l=r.preFilter;while(s){n&&!(i=F.exec(s))||(i&&(s=s.slice(i[0].length)||s),u.push(o=[])),n=!1,(i=_.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(B," ")}),s=s.slice(n.length));for(a in r.filter)!(i=V[a].exec(s))||l[a]&&!(i=l[a](i))||(n=i.shift(),o.push({value:n,type:a,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?oe.error(e):k(e,u).slice(0)};function ve(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var l,c,f,p=[T,s];if(u){while(t=t[r])if((1===t.nodeType||a)&&e(t,n,u))return!0}else while(t=t[r])if(1===t.nodeType||a)if(f=t[b]||(t[b]={}),c=f[t.uniqueID]||(f[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=c[o])&&l[0]===T&&l[1]===s)return p[2]=l[2];if(c[o]=p,p[2]=e(t,n,u))return!0}return!1}}function xe(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)oe(e,t[r],n);return n}function we(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Te(e,t,n,r,i,o){return r&&!r[b]&&(r=Te(r)),i&&!i[b]&&(i=Te(i,o)),se(function(o,a,s,u){var l,c,f,p=[],d=[],h=a.length,g=o||be(t||"*",s.nodeType?[s]:s,[]),y=!e||!o&&t?g:we(g,p,e,s,u),v=n?i||(o?e:h||r)?[]:a:y;if(n&&n(y,v,s,u),r){l=we(v,d),r(l,[],s,u),c=l.length;while(c--)(f=l[c])&&(v[d[c]]=!(y[d[c]]=f))}if(o){if(i||e){if(i){l=[],c=v.length;while(c--)(f=v[c])&&l.push(y[c]=f);i(null,v=[],l,u)}c=v.length;while(c--)(f=v[c])&&(l=i?O(o,f):p[c])>-1&&(o[l]=!(a[l]=f))}}else v=we(v===a?v.splice(h,v.length):v),i?i(null,a,v,u):L.apply(a,v)})}function Ce(e){for(var t,n,i,o=e.length,a=r.relative[e[0].type],s=a||r.relative[" "],u=a?1:0,c=me(function(e){return e===t},s,!0),f=me(function(e){return O(t,e)>-1},s,!0),p=[function(e,n,r){var i=!a&&(r||n!==l)||((t=n).nodeType?c(e,n,r):f(e,n,r));return t=null,i}];u<o;u++)if(n=r.relative[e[u].type])p=[me(xe(p),n)];else{if((n=r.filter[e[u].type].apply(null,e[u].matches))[b]){for(i=++u;i<o;i++)if(r.relative[e[i].type])break;return Te(u>1&&xe(p),u>1&&ve(e.slice(0,u-1).concat({value:" "===e[u-2].type?"*":""})).replace(B,"$1"),n,u<i&&Ce(e.slice(u,i)),i<o&&Ce(e=e.slice(i)),i<o&&ve(e))}p.push(n)}return xe(p)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,a,s,u,c){var f,h,y,v=0,m="0",x=o&&[],b=[],w=l,C=o||i&&r.find.TAG("*",c),E=T+=null==w?1:Math.random()||.1,k=C.length;for(c&&(l=a===d||a||c);m!==k&&null!=(f=C[m]);m++){if(i&&f){h=0,a||f.ownerDocument===d||(p(f),s=!g);while(y=e[h++])if(y(f,a||d,s)){u.push(f);break}c&&(T=E)}n&&((f=!y&&f)&&v--,o&&x.push(f))}if(v+=m,n&&m!==v){h=0;while(y=t[h++])y(x,b,a,s);if(o){if(v>0)while(m--)x[m]||b[m]||(b[m]=j.call(u));b=we(b)}L.apply(u,b),c&&!o&&b.length>0&&v+t.length>1&&oe.uniqueSort(u)}return c&&(T=E,l=w),x};return n?se(o):o}return s=oe.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=a(e)),n=t.length;while(n--)(o=Ce(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e}return o},u=oe.select=function(e,t,n,i){var o,u,l,c,f,p="function"==typeof e&&e,d=!i&&a(e=p.selector||e);if(n=n||[],1===d.length){if((u=d[0]=d[0].slice(0)).length>2&&"ID"===(l=u[0]).type&&9===t.nodeType&&g&&r.relative[u[1].type]){if(!(t=(r.find.ID(l.matches[0].replace(Z,ee),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(u.shift().value.length)}o=V.needsContext.test(e)?0:u.length;while(o--){if(l=u[o],r.relative[c=l.type])break;if((f=r.find[c])&&(i=f(l.matches[0].replace(Z,ee),K.test(u[0].type)&&ge(t.parentNode)||t))){if(u.splice(o,1),!(e=i.length&&ve(u)))return L.apply(n,i),n;break}}}return(p||s(e,d))(i,t,!g,n,!t||K.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(D).join("")===b,n.detectDuplicates=!!f,p(),n.sortDetached=ue(function(e){return 1&e.compareDocumentPosition(d.createElement("fieldset"))}),ue(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||le("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&ue(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||le("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ue(function(e){return null==e.getAttribute("disabled")})||le(P,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),oe}(e);w.find=E,w.expr=E.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=E.uniqueSort,w.text=E.getText,w.isXMLDoc=E.isXML,w.contains=E.contains,w.escapeSelector=E.escape;var k=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&w(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},D=w.expr.match.needsContext;function N(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var A=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,t,n){return g(t)?w.grep(e,function(e,r){return!!t.call(e,r,e)!==n}):t.nodeType?w.grep(e,function(e){return e===t!==n}):"string"!=typeof t?w.grep(e,function(e){return u.call(t,e)>-1!==n}):w.filter(t,e,n)}w.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?w.find.matchesSelector(r,e)?[r]:[]:w.find.matches(e,w.grep(t,function(e){return 1===e.nodeType}))},w.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(w(e).filter(function(){for(t=0;t<r;t++)if(w.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)w.find(e,i[t],n);return r>1?w.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&D.test(e)?w(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:L.exec(e))||!i[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof w?t[0]:t,w.merge(this,w.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:r,!0)),A.test(i[1])&&w.isPlainObject(t))for(i in t)g(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return(o=r.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):g(e)?void 0!==n.ready?n.ready(e):e(w):w.makeArray(e,this)}).prototype=w.fn,q=w(r);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};w.fn.extend({has:function(e){var t=w(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(w.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&w(e);if(!D.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?a.index(n)>-1:1===n.nodeType&&w.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?w.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?u.call(w(e),this[0]):u.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}w.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return k(e,"parentNode")},parentsUntil:function(e,t,n){return k(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return k(e,"nextSibling")},prevAll:function(e){return k(e,"previousSibling")},nextUntil:function(e,t,n){return k(e,"nextSibling",n)},prevUntil:function(e,t,n){return k(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return N(e,"iframe")?e.contentDocument:(N(e,"template")&&(e=e.content||e),w.merge([],e.childNodes))}},function(e,t){w.fn[e]=function(n,r){var i=w.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=w.filter(r,i)),this.length>1&&(O[e]||w.uniqueSort(i),H.test(e)&&i.reverse()),this.pushStack(i)}});var M=/[^\x20\t\r\n\f]+/g;function R(e){var t={};return w.each(e.match(M)||[],function(e,n){t[n]=!0}),t}w.Callbacks=function(e){e="string"==typeof e?R(e):w.extend({},e);var t,n,r,i,o=[],a=[],s=-1,u=function(){for(i=i||e.once,r=t=!0;a.length;s=-1){n=a.shift();while(++s<o.length)!1===o[s].apply(n[0],n[1])&&e.stopOnFalse&&(s=o.length,n=!1)}e.memory||(n=!1),t=!1,i&&(o=n?[]:"")},l={add:function(){return o&&(n&&!t&&(s=o.length-1,a.push(n)),function t(n){w.each(n,function(n,r){g(r)?e.unique&&l.has(r)||o.push(r):r&&r.length&&"string"!==x(r)&&t(r)})}(arguments),n&&!t&&u()),this},remove:function(){return w.each(arguments,function(e,t){var n;while((n=w.inArray(t,o,n))>-1)o.splice(n,1),n<=s&&s--}),this},has:function(e){return e?w.inArray(e,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=a=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=a=[],n||t||(o=n=""),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=[e,(n=n||[]).slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!r}};return l};function I(e){return e}function W(e){throw e}function $(e,t,n,r){var i;try{e&&g(i=e.promise)?i.call(e).done(t).fail(n):e&&g(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}w.extend({Deferred:function(t){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},"catch":function(e){return i.then(null,e)},pipe:function(){var e=arguments;return w.Deferred(function(t){w.each(n,function(n,r){var i=g(e[r[4]])&&e[r[4]];o[r[1]](function(){var e=i&&i.apply(this,arguments);e&&g(e.promise)?e.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[r[0]+"With"](this,i?[e]:arguments)})}),e=null}).promise()},then:function(t,r,i){var o=0;function a(t,n,r,i){return function(){var s=this,u=arguments,l=function(){var e,l;if(!(t<o)){if((e=r.apply(s,u))===n.promise())throw new TypeError("Thenable self-resolution");l=e&&("object"==typeof e||"function"==typeof e)&&e.then,g(l)?i?l.call(e,a(o,n,I,i),a(o,n,W,i)):(o++,l.call(e,a(o,n,I,i),a(o,n,W,i),a(o,n,I,n.notifyWith))):(r!==I&&(s=void 0,u=[e]),(i||n.resolveWith)(s,u))}},c=i?l:function(){try{l()}catch(e){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(e,c.stackTrace),t+1>=o&&(r!==W&&(s=void 0,u=[e]),n.rejectWith(s,u))}};t?c():(w.Deferred.getStackHook&&(c.stackTrace=w.Deferred.getStackHook()),e.setTimeout(c))}}return w.Deferred(function(e){n[0][3].add(a(0,e,g(i)?i:I,e.notifyWith)),n[1][3].add(a(0,e,g(t)?t:I)),n[2][3].add(a(0,e,g(r)?r:W))}).promise()},promise:function(e){return null!=e?w.extend(e,i):i}},o={};return w.each(n,function(e,t){var a=t[2],s=t[5];i[t[1]]=a.add,s&&a.add(function(){r=s},n[3-e][2].disable,n[3-e][3].disable,n[0][2].lock,n[0][3].lock),a.add(t[3].fire),o[t[0]]=function(){return o[t[0]+"With"](this===o?void 0:this,arguments),this},o[t[0]+"With"]=a.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(e){var t=arguments.length,n=t,r=Array(n),i=o.call(arguments),a=w.Deferred(),s=function(e){return function(n){r[e]=this,i[e]=arguments.length>1?o.call(arguments):n,--t||a.resolveWith(r,i)}};if(t<=1&&($(e,a.done(s(n)).resolve,a.reject,!t),"pending"===a.state()||g(i[n]&&i[n].then)))return a.then();while(n--)$(i[n],s(n),a.reject);return a.promise()}});var B=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&B.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},w.readyException=function(t){e.setTimeout(function(){throw t})};var F=w.Deferred();w.fn.ready=function(e){return F.then(e)["catch"](function(e){w.readyException(e)}),this},w.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==e&&--w.readyWait>0||F.resolveWith(r,[w]))}}),w.ready.then=F.then;function _(){r.removeEventListener("DOMContentLoaded",_),e.removeEventListener("load",_),w.ready()}"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?e.setTimeout(w.ready):(r.addEventListener("DOMContentLoaded",_),e.addEventListener("load",_));var z=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===x(n)){i=!0;for(s in n)z(e,t,s,n[s],!0,o,a)}else if(void 0!==r&&(i=!0,g(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(w(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},X=/^-ms-/,U=/-([a-z])/g;function V(e,t){return t.toUpperCase()}function G(e){return e.replace(X,"ms-").replace(U,V)}var Y=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Q(){this.expando=w.expando+Q.uid++}Q.uid=1,Q.prototype={cache:function(e){var t=e[this.expando];return t||(t={},Y(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[G(t)]=n;else for(r in t)i[G(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][G(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(G):(t=G(t))in r?[t]:t.match(M)||[]).length;while(n--)delete r[t[n]]}(void 0===t||w.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!w.isEmptyObject(t)}};var J=new Q,K=new Q,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Z.test(e)?JSON.parse(e):e)}function ne(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n=te(n)}catch(e){}K.set(e,t,n)}else n=void 0;return n}w.extend({hasData:function(e){return K.hasData(e)||J.hasData(e)},data:function(e,t,n){return K.access(e,t,n)},removeData:function(e,t){K.remove(e,t)},_data:function(e,t,n){return J.access(e,t,n)},_removeData:function(e,t){J.remove(e,t)}}),w.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=K.get(o),1===o.nodeType&&!J.get(o,"hasDataAttrs"))){n=a.length;while(n--)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=G(r.slice(5)),ne(o,r,i[r]));J.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof e?this.each(function(){K.set(this,e)}):z(this,function(t){var n;if(o&&void 0===t){if(void 0!==(n=K.get(o,e)))return n;if(void 0!==(n=ne(o,e)))return n}else this.each(function(){K.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){K.remove(this,e)})}}),w.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=J.get(e,t),n&&(!r||Array.isArray(n)?r=J.access(e,t,w.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=w.queue(e,t),r=n.length,i=n.shift(),o=w._queueHooks(e,t),a=function(){w.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return J.get(e,n)||J.access(e,n,{empty:w.Callbacks("once memory").add(function(){J.remove(e,[t+"queue",n])})})}}),w.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?w.queue(this[0],e):void 0===t?this:this.each(function(){var n=w.queue(this,e,t);w._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&w.dequeue(this,e)})},dequeue:function(e){return this.each(function(){w.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=w.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=J.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var re=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ie=new RegExp("^(?:([+-])=|)("+re+")([a-z%]*)$","i"),oe=["Top","Right","Bottom","Left"],ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&w.contains(e.ownerDocument,e)&&"none"===w.css(e,"display")},se=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return w.css(e,t,"")},u=s(),l=n&&n[3]||(w.cssNumber[t]?"":"px"),c=(w.cssNumber[t]||"px"!==l&&+u)&&ie.exec(w.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)w.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,w.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var le={};function ce(e){var t,n=e.ownerDocument,r=e.nodeName,i=le[r];return i||(t=n.body.appendChild(n.createElement(r)),i=w.css(t,"display"),t.parentNode.removeChild(t),"none"===i&&(i="block"),le[r]=i,i)}function fe(e,t){for(var n,r,i=[],o=0,a=e.length;o<a;o++)(r=e[o]).style&&(n=r.style.display,t?("none"===n&&(i[o]=J.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&ae(r)&&(i[o]=ce(r))):"none"!==n&&(i[o]="none",J.set(r,"display",n)));for(o=0;o<a;o++)null!=i[o]&&(e[o].style.display=i[o]);return e}w.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?w(this).show():w(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)J.set(e[n],"globalEval",!t||J.get(t[n],"globalEval"))}var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===x(o))w.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+w.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;w.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&w.inArray(o,r)>-1)i&&i.push(o);else if(l=w.contains(o.ownerDocument,o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}!function(){var e=r.createDocumentFragment().appendChild(r.createElement("div")),t=r.createElement("input");t.setAttribute("type","radio"),t.setAttribute("checked","checked"),t.setAttribute("name","t"),e.appendChild(t),h.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",h.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var be=r.documentElement,we=/^key/,Te=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ce=/^([^.]*)(?:\.(.+)|)/;function Ee(){return!0}function ke(){return!1}function Se(){try{return r.activeElement}catch(e){}}function De(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)De(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ke;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return w().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=w.guid++)),e.each(function(){w.event.add(this,t,i,r,n)})}w.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.get(e);if(y){n.handler&&(n=(o=n).handler,i=o.selector),i&&w.find.matchesSelector(be,i),n.guid||(n.guid=w.guid++),(u=y.events)||(u=y.events={}),(a=y.handle)||(a=y.handle=function(t){return"undefined"!=typeof w&&w.event.triggered!==t.type?w.event.dispatch.apply(e,arguments):void 0}),l=(t=(t||"").match(M)||[""]).length;while(l--)d=g=(s=Ce.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=w.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=w.event.special[d]||{},c=w.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&w.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(e,r,h,a)||e.addEventListener&&e.addEventListener(d,a)),f.add&&(f.add.call(e,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),w.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=J.hasData(e)&&J.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(M)||[""]).length;while(l--)if(s=Ce.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){f=w.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||w.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)w.event.remove(e,d+t[l],n,r,!0);w.isEmptyObject(u)&&J.remove(e,"handle events")}},dispatch:function(e){var t=w.event.fix(e),n,r,i,o,a,s,u=new Array(arguments.length),l=(J.get(this,"events")||{})[t.type]||[],c=w.event.special[t.type]||{};for(u[0]=t,n=1;n<arguments.length;n++)u[n]=arguments[n];if(t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){s=w.event.handlers.call(this,t,l),n=0;while((o=s[n++])&&!t.isPropagationStopped()){t.currentTarget=o.elem,r=0;while((a=o.handlers[r++])&&!t.isImmediatePropagationStopped())t.rnamespace&&!t.rnamespace.test(a.namespace)||(t.handleObj=a,t.data=a.data,void 0!==(i=((w.event.special[a.origType]||{}).handle||a.handler).apply(o.elem,u))&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&e.button>=1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?w(i,this).index(l)>-1:w.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(w.Event.prototype,e,{enumerable:!0,configurable:!0,get:g(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[w.expando]?e:new w.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==Se()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===Se()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&N(this,"input"))return this.click(),!1},_default:function(e){return N(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},w.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},w.Event=function(e,t){if(!(this instanceof w.Event))return new w.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Ee:ke,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&w.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:ke,isPropagationStopped:ke,isImmediatePropagationStopped:ke,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Ee,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Ee,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Ee,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},w.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&we.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Te.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},w.event.addProp),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){w.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return i&&(i===r||w.contains(r,i))||(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),w.fn.extend({on:function(e,t,n,r){return De(this,e,t,n,r)},one:function(e,t,n,r){return De(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,w(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ke),this.each(function(){w.event.remove(this,e,n,t)})}});var Ne=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ae=/<script|<style|<link/i,je=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Le(e,t){return N(e,"table")&&N(11!==t.nodeType?t:t.firstChild,"tr")?w(e).children("tbody")[0]||e:e}function He(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Oe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pe(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(J.hasData(e)&&(o=J.access(e),a=J.set(t,o),l=o.events)){delete a.handle,a.events={};for(i in l)for(n=0,r=l[i].length;n<r;n++)w.event.add(t,i,l[i][n])}K.hasData(e)&&(s=K.access(e),u=w.extend({},s),K.set(t,u))}}function Me(e,t){var n=t.nodeName.toLowerCase();"input"===n&&pe.test(e.type)?t.checked=e.checked:"input"!==n&&"textarea"!==n||(t.defaultValue=e.defaultValue)}function Re(e,t,n,r){t=a.apply([],t);var i,o,s,u,l,c,f=0,p=e.length,d=p-1,y=t[0],v=g(y);if(v||p>1&&"string"==typeof y&&!h.checkClone&&je.test(y))return e.each(function(i){var o=e.eq(i);v&&(t[0]=y.call(this,i,o.html())),Re(o,t,n,r)});if(p&&(i=xe(t,e[0].ownerDocument,!1,e,r),o=i.firstChild,1===i.childNodes.length&&(i=o),o||r)){for(u=(s=w.map(ye(i,"script"),He)).length;f<p;f++)l=i,f!==d&&(l=w.clone(l,!0,!0),u&&w.merge(s,ye(l,"script"))),n.call(e[f],l,f);if(u)for(c=s[s.length-1].ownerDocument,w.map(s,Oe),f=0;f<u;f++)l=s[f],he.test(l.type||"")&&!J.access(l,"globalEval")&&w.contains(c,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?w._evalUrl&&w._evalUrl(l.src):m(l.textContent.replace(qe,""),c,l))}return e}function Ie(e,t,n){for(var r,i=t?w.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||w.cleanData(ye(r)),r.parentNode&&(n&&w.contains(r.ownerDocument,r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}w.extend({htmlPrefilter:function(e){return e.replace(Ne,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s=e.cloneNode(!0),u=w.contains(e.ownerDocument,e);if(!(h.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||w.isXMLDoc(e)))for(a=ye(s),r=0,i=(o=ye(e)).length;r<i;r++)Me(o[r],a[r]);if(t)if(n)for(o=o||ye(e),a=a||ye(s),r=0,i=o.length;r<i;r++)Pe(o[r],a[r]);else Pe(e,s);return(a=ye(s,"script")).length>0&&ve(a,!u&&ye(e,"script")),s},cleanData:function(e){for(var t,n,r,i=w.event.special,o=0;void 0!==(n=e[o]);o++)if(Y(n)){if(t=n[J.expando]){if(t.events)for(r in t.events)i[r]?w.event.remove(n,r):w.removeEvent(n,r,t.handle);n[J.expando]=void 0}n[K.expando]&&(n[K.expando]=void 0)}}}),w.fn.extend({detach:function(e){return Ie(this,e,!0)},remove:function(e){return Ie(this,e)},text:function(e){return z(this,function(e){return void 0===e?w.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Re(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Le(this,e).appendChild(e)})},prepend:function(){return Re(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Le(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Re(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(w.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return w.clone(this,e,t)})},html:function(e){return z(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ae.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=w.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(w.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return Re(this,arguments,function(t){var n=this.parentNode;w.inArray(this,e)<0&&(w.cleanData(ye(this)),n&&n.replaceChild(t,this))},e)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){w.fn[e]=function(e){for(var n,r=[],i=w(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),w(i[a])[t](n),s.apply(r,n.get());return this.pushStack(r)}});var We=new RegExp("^("+re+")(?!px)[a-z%]+$","i"),$e=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Be=new RegExp(oe.join("|"),"i");!function(){function t(){if(c){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",be.appendChild(l).appendChild(c);var t=e.getComputedStyle(c);i="1%"!==t.top,u=12===n(t.marginLeft),c.style.right="60%",s=36===n(t.right),o=36===n(t.width),c.style.position="absolute",a=36===c.offsetWidth||"absolute",be.removeChild(l),c=null}}function n(e){return Math.round(parseFloat(e))}var i,o,a,s,u,l=r.createElement("div"),c=r.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",h.clearCloneStyle="content-box"===c.style.backgroundClip,w.extend(h,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),a}}))}();function Fe(e,t,n){var r,i,o,a,s=e.style;return(n=n||$e(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||w.contains(e.ownerDocument,e)||(a=w.style(e,t)),!h.pixelBoxStyles()&&We.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}var ze=/^(none|table(?!-c[ea]).+)/,Xe=/^--/,Ue={position:"absolute",visibility:"hidden",display:"block"},Ve={letterSpacing:"0",fontWeight:"400"},Ge=["Webkit","Moz","ms"],Ye=r.createElement("div").style;function Qe(e){if(e in Ye)return e;var t=e[0].toUpperCase()+e.slice(1),n=Ge.length;while(n--)if((e=Ge[n]+t)in Ye)return e}function Je(e){var t=w.cssProps[e];return t||(t=w.cssProps[e]=Qe(e)||e),t}function Ke(e,t,n){var r=ie.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ze(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=w.css(e,n+oe[a],!0,i)),r?("content"===n&&(u-=w.css(e,"padding"+oe[a],!0,i)),"margin"!==n&&(u-=w.css(e,"border"+oe[a]+"Width",!0,i))):(u+=w.css(e,"padding"+oe[a],!0,i),"padding"!==n?u+=w.css(e,"border"+oe[a]+"Width",!0,i):s+=w.css(e,"border"+oe[a]+"Width",!0,i));return!r&&o>=0&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))),u}function et(e,t,n){var r=$e(e),i=Fe(e,t,r),o="border-box"===w.css(e,"boxSizing",!1,r),a=o;if(We.test(i)){if(!n)return i;i="auto"}return a=a&&(h.boxSizingReliable()||i===e.style[t]),("auto"===i||!parseFloat(i)&&"inline"===w.css(e,"display",!1,r))&&(i=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(i=parseFloat(i)||0)+Ze(e,t,n||(o?"border":"content"),a,r,i)+"px"}w.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Fe(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=G(t),u=Xe.test(t),l=e.style;if(u||(t=Je(s)),a=w.cssHooks[t]||w.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"==(o=typeof n)&&(i=ie.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(w.cssNumber[s]?"":"px")),h.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=G(t);return Xe.test(t)||(t=Je(s)),(a=w.cssHooks[t]||w.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Fe(e,t,r)),"normal"===i&&t in Ve&&(i=Ve[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),w.each(["height","width"],function(e,t){w.cssHooks[t]={get:function(e,n,r){if(n)return!ze.test(w.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?et(e,t,r):se(e,Ue,function(){return et(e,t,r)})},set:function(e,n,r){var i,o=$e(e),a="border-box"===w.css(e,"boxSizing",!1,o),s=r&&Ze(e,t,r,a,o);return a&&h.scrollboxSize()===o.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(o[t])-Ze(e,t,"border",!1,o)-.5)),s&&(i=ie.exec(n))&&"px"!==(i[3]||"px")&&(e.style[t]=n,n=w.css(e,t)),Ke(e,n,s)}}}),w.cssHooks.marginLeft=_e(h.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Fe(e,"marginLeft"))||e.getBoundingClientRect().left-se(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),w.each({margin:"",padding:"",border:"Width"},function(e,t){w.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+oe[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(w.cssHooks[e+t].set=Ke)}),w.fn.extend({css:function(e,t){return z(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$e(e),i=t.length;a<i;a++)o[t[a]]=w.css(e,t[a],!1,r);return o}return void 0!==n?w.style(e,t,n):w.css(e,t)},e,t,arguments.length>1)}});function tt(e,t,n,r,i){return new tt.prototype.init(e,t,n,r,i)}w.Tween=tt,tt.prototype={constructor:tt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||w.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(w.cssNumber[n]?"":"px")},cur:function(){var e=tt.propHooks[this.prop];return e&&e.get?e.get(this):tt.propHooks._default.get(this)},run:function(e){var t,n=tt.propHooks[this.prop];return this.options.duration?this.pos=t=w.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):tt.propHooks._default.set(this),this}},tt.prototype.init.prototype=tt.prototype,tt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=w.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){w.fx.step[e.prop]?w.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[w.cssProps[e.prop]]&&!w.cssHooks[e.prop]?e.elem[e.prop]=e.now:w.style(e.elem,e.prop,e.now+e.unit)}}},tt.propHooks.scrollTop=tt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},w.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},w.fx=tt.prototype.init,w.fx.step={};var nt,rt,it=/^(?:toggle|show|hide)$/,ot=/queueHooks$/;function at(){rt&&(!1===r.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(at):e.setTimeout(at,w.fx.interval),w.fx.tick())}function st(){return e.setTimeout(function(){nt=void 0}),nt=Date.now()}function ut(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=oe[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function lt(e,t,n){for(var r,i=(pt.tweeners[t]||[]).concat(pt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ct(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=J.get(e,"fxshow");n.queue||(null==(a=w._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,w.queue(e,"fx").length||a.empty.fire()})}));for(r in t)if(i=t[r],it.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||w.style(e,r)}if((u=!w.isEmptyObject(t))||!w.isEmptyObject(d)){f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=J.get(e,"display")),"none"===(c=w.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=w.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===w.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1;for(r in d)u||(y?"hidden"in y&&(g=y.hidden):y=J.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&fe([e],!0),p.done(function(){g||fe([e]),J.remove(e,"fxshow");for(r in d)w.style(e,r,d[r])})),u=lt(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}}function ft(e,t){var n,r,i,o,a;for(n in e)if(r=G(n),i=t[r],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=w.cssHooks[r])&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}function pt(e,t,n){var r,i,o=0,a=pt.prefilters.length,s=w.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=nt||st(),n=Math.max(0,l.startTime+l.duration-t),r=1-(n/l.duration||0),o=0,a=l.tweens.length;o<a;o++)l.tweens[o].run(r);return s.notifyWith(e,[l,r,n]),r<1&&a?n:(a||s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:w.extend({},t),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:t,originalOptions:n,startTime:nt||st(),duration:n.duration,tweens:[],createTween:function(t,n){var r=w.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)l.tweens[n].run(1);return t?(s.notifyWith(e,[l,1,0]),s.resolveWith(e,[l,t])):s.rejectWith(e,[l,t]),this}}),c=l.props;for(ft(c,l.opts.specialEasing);o<a;o++)if(r=pt.prefilters[o].call(l,e,c,l.opts))return g(r.stop)&&(w._queueHooks(l.elem,l.opts.queue).stop=r.stop.bind(r)),r;return w.map(c,lt,l),g(l.opts.start)&&l.opts.start.call(e,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),w.fx.timer(w.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l}w.Animation=w.extend(pt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,ie.exec(t),n),n}]},tweener:function(e,t){g(e)?(t=e,e=["*"]):e=e.match(M);for(var n,r=0,i=e.length;r<i;r++)n=e[r],pt.tweeners[n]=pt.tweeners[n]||[],pt.tweeners[n].unshift(t)},prefilters:[ct],prefilter:function(e,t){t?pt.prefilters.unshift(e):pt.prefilters.push(e)}}),w.speed=function(e,t,n){var r=e&&"object"==typeof e?w.extend({},e):{complete:n||!n&&t||g(e)&&e,duration:e,easing:n&&t||t&&!g(t)&&t};return w.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in w.fx.speeds?r.duration=w.fx.speeds[r.duration]:r.duration=w.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){g(r.old)&&r.old.call(this),r.queue&&w.dequeue(this,r.queue)},r},w.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=w.isEmptyObject(e),o=w.speed(t,n,r),a=function(){var t=pt(this,w.extend({},e),o);(i||J.get(this,"finish"))&&t.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(e,t,n){var r=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,i=null!=e&&e+"queueHooks",o=w.timers,a=J.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&ot.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||w.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,n=J.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=w.timers,a=r?r.length:0;for(n.finish=!0,w.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),w.each(["toggle","show","hide"],function(e,t){var n=w.fn[t];w.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ut(t,!0),e,r,i)}}),w.each({slideDown:ut("show"),slideUp:ut("hide"),slideToggle:ut("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){w.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),w.timers=[],w.fx.tick=function(){var e,t=0,n=w.timers;for(nt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||w.fx.stop(),nt=void 0},w.fx.timer=function(e){w.timers.push(e),w.fx.start()},w.fx.interval=13,w.fx.start=function(){rt||(rt=!0,at())},w.fx.stop=function(){rt=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(t,n){return t=w.fx?w.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var i=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(i)}})},function(){var e=r.createElement("input"),t=r.createElement("select").appendChild(r.createElement("option"));e.type="checkbox",h.checkOn=""!==e.value,h.optSelected=t.selected,(e=r.createElement("input")).value="t",e.type="radio",h.radioValue="t"===e.value}();var dt,ht=w.expr.attrHandle;w.fn.extend({attr:function(e,t){return z(this,w.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){w.removeAttr(this,e)})}}),w.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?w.prop(e,t,n):(1===o&&w.isXMLDoc(e)||(i=w.attrHooks[t.toLowerCase()]||(w.expr.match.bool.test(t)?dt:void 0)),void 0!==n?null===n?void w.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=w.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!h.radioValue&&"radio"===t&&N(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(M);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),dt={set:function(e,t,n){return!1===t?w.removeAttr(e,n):e.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ht[t]||w.find.attr;ht[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=ht[a],ht[a]=i,i=null!=n(e,t,r)?a:null,ht[a]=o),i}});var gt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;w.fn.extend({prop:function(e,t){return z(this,w.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[w.propFix[e]||e]})}}),w.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&w.isXMLDoc(e)||(t=w.propFix[t]||t,i=w.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=w.find.attr(e,"tabindex");return t?parseInt(t,10):gt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),h.optSelected||(w.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){w.propFix[this.toLowerCase()]=this});function vt(e){return(e.match(M)||[]).join(" ")}function mt(e){return e.getAttribute&&e.getAttribute("class")||""}function xt(e){return Array.isArray(e)?e:"string"==typeof e?e.match(M)||[]:[]}w.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).addClass(e.call(this,t,mt(this)))});if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(g(e))return this.each(function(t){w(this).removeClass(e.call(this,t,mt(this)))});if(!arguments.length)return this.attr("class","");if((t=xt(e)).length)while(n=this[u++])if(i=mt(n),r=1===n.nodeType&&" "+vt(i)+" "){a=0;while(o=t[a++])while(r.indexOf(" "+o+" ")>-1)r=r.replace(" "+o+" "," ");i!==(s=vt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(e,t){var n=typeof e,r="string"===n||Array.isArray(e);return"boolean"==typeof t&&r?t?this.addClass(e):this.removeClass(e):g(e)?this.each(function(n){w(this).toggleClass(e.call(this,n,mt(this),t),t)}):this.each(function(){var t,i,o,a;if(r){i=0,o=w(this),a=xt(e);while(t=a[i++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else void 0!==e&&"boolean"!==n||((t=mt(this))&&J.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":J.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&(" "+vt(mt(n))+" ").indexOf(t)>-1)return!0;return!1}});var bt=/\r/g;w.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=g(e),this.each(function(n){var i;1===this.nodeType&&(null==(i=r?e.call(this,n,w(this).val()):e)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=w.map(i,function(e){return null==e?"":e+""})),(t=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return(t=w.valHooks[i.type]||w.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(bt,""):null==n?"":n}}}),w.extend({valHooks:{option:{get:function(e){var t=w.find.attr(e,"value");return null!=t?t:vt(w.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!N(n.parentNode,"optgroup"))){if(t=w(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=w.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=w.inArray(w.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),w.each(["radio","checkbox"],function(){w.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=w.inArray(w(e).val(),t)>-1}},h.checkOn||(w.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),h.focusin="onfocusin"in e;var wt=/^(?:focusinfocus|focusoutblur)$/,Tt=function(e){e.stopPropagation()};w.extend(w.event,{trigger:function(t,n,i,o){var a,s,u,l,c,p,d,h,v=[i||r],m=f.call(t,"type")?t.type:t,x=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=u=i=i||r,3!==i.nodeType&&8!==i.nodeType&&!wt.test(m+w.event.triggered)&&(m.indexOf(".")>-1&&(m=(x=m.split(".")).shift(),x.sort()),c=m.indexOf(":")<0&&"on"+m,t=t[w.expando]?t:new w.Event(m,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=x.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+x.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:w.makeArray(n,[t]),d=w.event.special[m]||{},o||!d.trigger||!1!==d.trigger.apply(i,n))){if(!o&&!d.noBubble&&!y(i)){for(l=d.delegateType||m,wt.test(l+m)||(s=s.parentNode);s;s=s.parentNode)v.push(s),u=s;u===(i.ownerDocument||r)&&v.push(u.defaultView||u.parentWindow||e)}a=0;while((s=v[a++])&&!t.isPropagationStopped())h=s,t.type=a>1?l:d.bindType||m,(p=(J.get(s,"events")||{})[t.type]&&J.get(s,"handle"))&&p.apply(s,n),(p=c&&s[c])&&p.apply&&Y(s)&&(t.result=p.apply(s,n),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||d._default&&!1!==d._default.apply(v.pop(),n)||!Y(i)||c&&g(i[m])&&!y(i)&&((u=i[c])&&(i[c]=null),w.event.triggered=m,t.isPropagationStopped()&&h.addEventListener(m,Tt),i[m](),t.isPropagationStopped()&&h.removeEventListener(m,Tt),w.event.triggered=void 0,u&&(i[c]=u)),t.result}},simulate:function(e,t,n){var r=w.extend(new w.Event,n,{type:e,isSimulated:!0});w.event.trigger(r,null,t)}}),w.fn.extend({trigger:function(e,t){return this.each(function(){w.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return w.event.trigger(e,t,n,!0)}}),h.focusin||w.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){w.event.simulate(t,e.target,w.event.fix(e))};w.event.special[t]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,t);i||r.addEventListener(e,n,!0),J.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,t)-1;i?J.access(r,t,i):(r.removeEventListener(e,n,!0),J.remove(r,t))}}});var Ct=e.location,Et=Date.now(),kt=/\?/;w.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(e){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||w.error("Invalid XML: "+t),n};var St=/\[\]$/,Dt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,At=/^(?:input|select|textarea|keygen)/i;function jt(e,t,n,r){var i;if(Array.isArray(t))w.each(t,function(t,i){n||St.test(e)?r(e,i):jt(e+"["+("object"==typeof i&&null!=i?t:"")+"]",i,n,r)});else if(n||"object"!==x(t))r(e,t);else for(i in t)jt(e+"["+i+"]",t[i],n,r)}w.param=function(e,t){var n,r=[],i=function(e,t){var n=g(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(Array.isArray(e)||e.jquery&&!w.isPlainObject(e))w.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=w.prop(this,"elements");return e?w.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!w(this).is(":disabled")&&At.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,function(e){return{name:t.name,value:e.replace(Dt,"\r\n")}}):{name:t.name,value:n.replace(Dt,"\r\n")}}).get()}});var qt=/%20/g,Lt=/#.*$/,Ht=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Mt=/^(?:GET|HEAD)$/,Rt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Bt=r.createElement("a");Bt.href=Ct.href;function Ft(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(M)||[];if(g(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function _t(e,t,n,r){var i={},o=e===Wt;function a(s){var u;return i[s]=!0,w.each(e[s]||[],function(e,s){var l=s(t,n,r);return"string"!=typeof l||o||i[l]?o?!(u=l):void 0:(t.dataTypes.unshift(l),a(l),!1)}),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function zt(e,t){var n,r,i=w.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&w.extend(!0,e,r),e}function Xt(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}function Ut(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ct.href,type:"GET",isLocal:Pt.test(Ct.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,w.ajaxSettings),t):zt(w.ajaxSettings,e)},ajaxPrefilter:Ft(It),ajaxTransport:Ft(Wt),ajax:function(t,n){"object"==typeo