From 64ccaed854868e55d889f5e5e7d9eb4f89c597d9 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 21 May 2015 17:19:52 +0000 Subject: [PATCH 01/16] repo update --- README.md | 2 +- archive.php | 4 +- comments.php | 46 ++ content-embed.php | 3 +- content-share.php | 16 +- css/dashicons.css | 10 + css/main.css | 73 +- css/main.less | 156 ++++ error_log | 4 + fonts/dashicons.eot | Bin 0 -> 2780 bytes fonts/dashicons.ttf | Bin 0 -> 2612 bytes fonts/dashicons.woff | Bin 0 -> 2688 bytes fonts/jeoicons.svg | 13 + footer.php | 32 +- functions.php | 76 +- header.php | 4 +- inc/admin/admin-page-framework.php | 15 +- inc/admin/settings.php | 8 +- inc/core.php | 44 +- inc/js/jeo.js | 2 +- inc/js/markers.js | 8 +- inc/js/share-widget.js | 10 +- inc/marker-icons.php | 23 +- inc/markers.php | 10 +- inc/share-widget.php | 2 +- inc/ui.php | 4 +- languages/es_ES.mo | Bin 1337 -> 1318 bytes languages/es_ES.po | 1128 +++++++++++++++++++++++----- languages/pt_BR.mo | Bin 19321 -> 19519 bytes languages/pt_BR.po | 104 +-- loop.php | 5 + metaboxes/mapbox/mapbox.php | 29 +- metaboxes/metaboxes.php | 8 +- page.php | 8 + screenshot.png | Bin 93987 -> 240666 bytes searchform.php | 2 +- single.php | 10 + style.css | 4 +- 38 files changed, 1455 insertions(+), 408 deletions(-) create mode 100644 comments.php create mode 100644 css/dashicons.css create mode 100644 error_log create mode 100644 fonts/dashicons.eot create mode 100644 fonts/dashicons.ttf create mode 100644 fonts/dashicons.woff create mode 100644 fonts/jeoicons.svg diff --git a/README.md b/README.md index 4f64886..3fd5444 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ #JEO -v0.8.9beta +v0.8.12beta JEO WordPress Theme acts as a geojournalism platform which allows news organizations, bloggers and NGOs to publish news stories as layers of information on digital maps. With JEO, creating the interaction between data layers and contextual information is much more intuitive and interactive. The theme is ready for multilingual content and facilitates the publishing tasks. diff --git a/archive.php b/archive.php index 667ec69..6023a22 100644 --- a/archive.php +++ b/archive.php @@ -6,7 +6,9 @@

+ +
+ + +

+ +

+ +
    + 'ol', + 'short_ping' => true, + 'avatar_size' => 60, + 'callback' => 'jeo_comment' + ) ); + ?> +
+ + 1 && get_option( 'page_comments' ) ) : + ?> + + + + +

+ + + + + + +
\ No newline at end of file diff --git a/content-embed.php b/content-embed.php index 80a0831..4762182 100644 --- a/content-embed.php +++ b/content-embed.php @@ -19,7 +19,7 @@ - + > @@ -28,6 +28,7 @@

 

+
diff --git a/content-share.php b/content-share.php index 19798e0..3706192 100644 --- a/content-share.php +++ b/content-share.php @@ -35,6 +35,18 @@ } } } + +// post +$post_id = false; +if(isset($_GET['p'])) + $post_id = $_GET['p']; + +// share url +if($post_id) { + $share_url = jeo_get_share_url(array('p' => $post_id)); +} else { + $share_url = jeo_get_share_url(); +} ?>

 

-

+

diff --git a/css/dashicons.css b/css/dashicons.css new file mode 100644 index 0000000..36e2972 --- /dev/null +++ b/css/dashicons.css @@ -0,0 +1,10 @@ +@font-face { + font-family: 'jeo-dashicons'; + src:url('../fonts/jeoicons.eot'); + src:url('../fonts/jeoicons.eot?#iefix') format('embedded-opentype'), + url('../fonts/jeoicons.ttf') format('truetype'), + url('../fonts/jeoicons.woff') format('woff'), + url('../fonts/jeoicons.svg#jeoicons') format('svg'); + font-weight: normal; + font-style: normal; +} \ No newline at end of file diff --git a/css/main.css b/css/main.css index f81b5e1..33edd63 100644 --- a/css/main.css +++ b/css/main.css @@ -1,72 +1 @@ -html,body{width:100%;height:100%;font:14px/18px "Open Sans","Helvetica","Arial",sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;background:#eeeee7;} -a{-webkit-transition:all 0.2s ease-in-out;-khtml-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;} -h1,h2,h3,h4,h5,h6{font-family:"Open Sans","Helvetica","Arial",sans-serif;} -h1,h2{font-weight:800;} -h3,h4,h5,h6{font-weight:600;} -.alignleft{float:left;margin:0 20px 20px 0;} -.alignright{float:right;margin:0 0 20px 20px;} -.displaying-map #masthead{position:absolute;width:100%;z-index:10;background:rgba(0, 0, 0, 0.7);background:-webkit-gradient(linear, left bottom, left top, color-stop(0, transparent), color-stop(1, rgba(0, 0, 0, 0.7)));background:-ms-linear-gradient(bottom, transparent, rgba(0, 0, 0, 0.7));background:-moz-linear-gradient(center bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);background:-o-linear-gradient(rgba(0, 0, 0, 0.7), transparent);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='rgba(0, 0, 0, 0.7)', endColorstr='transparent', GradientType=0);height:125px;}.displaying-map #masthead .site-meta{margin:20px 0;} -.displaying-map #masthead h1 a{color:#fff;text-shadow:0 0 7px rgba(0, 0, 0, 0.4);} -.displaying-map #masthead #masthead-nav{position:relative;-webkit-border-radius:0 0 3px 3px;-khtml-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;-o-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.6);-khtml-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.6);-moz-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.6);-o-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.6);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.6);}.displaying-map #masthead #masthead-nav nav ul>li:hover>a{-webkit-border-radius:0;-khtml-border-radius:0;-moz-border-radius:0;-o-border-radius:0;border-radius:0;} -.displaying-map #masthead #masthead-nav nav ul>li>a{background:transparent;-webkit-border-radius:0 0 3px 3px;-khtml-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;-o-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;} -.displaying-map #masthead #masthead-nav #searchform input#s{background:transparent;} -.loading-map #masthead{opacity:0;display:none;} -#first-map-message{padding:10% 0;text-align:center;background:#111;color:#f0f0f0;-webkit-box-shadow:inset 0 20px 40px #0f0f0f;-khtml-box-shadow:inset 0 20px 40px #0f0f0f;-moz-box-shadow:inset 0 20px 40px #0f0f0f;-o-box-shadow:inset 0 20px 40px #0f0f0f;box-shadow:inset 0 20px 40px #0f0f0f;}#first-map-message h2,#first-map-message h3{color:#f0f0f0;} -#first-map-message a{color:#77a832;text-decoration:none;} -#masthead{position:relative;background:#1f1f1f;opacity:1;-webkit-transition:opacity 0.2s ease-in-out;-khtml-transition:opacity 0.2s ease-in-out;-moz-transition:opacity 0.2s ease-in-out;-o-transition:opacity 0.2s ease-in-out;transition:opacity 0.2s ease-in-out;}#masthead .site-meta{margin:40px 0;} -#masthead h1{margin:0 0 5px;font-weight:800;font-family:"Open Sans";font-size:28px;line-height:28px;}#masthead h1 a{color:#77a832;text-decoration:none;text-shadow:0px 0px 7px rgba(0, 0, 0, 0.4);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}#masthead h1 a:hover{color:#fff;} -#masthead h2{font-size:14px;line-height:20px;margin:0;color:#fff;text-shadow:0px 0px 4px rgba(0, 0, 0, 0.6);text-transform:lowercase;font-weight:200;} -#masthead #masthead-nav{float:right;position:absolute;z-index:100;bottom:0;right:0;background:#333;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}#masthead #masthead-nav nav{float:left;}#masthead #masthead-nav nav ul{margin:0;padding:0;}#masthead #masthead-nav nav ul>li{margin:0 1px 0 0;padding:0;float:left;position:relative;}#masthead #masthead-nav nav ul>li:hover>a{color:#fff;text-shadow:0 0 0;background:#77a832;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} -#masthead #masthead-nav nav ul>li:hover>ul{display:block;opacity:1;-webkit-transition:opacity 0.2s ease-in-out;-khtml-transition:opacity 0.2s ease-in-out;-moz-transition:opacity 0.2s ease-in-out;-o-transition:opacity 0.2s ease-in-out;transition:opacity 0.2s ease-in-out;} -#masthead #masthead-nav nav ul>li>a{display:block;color:#f0f0f0;text-decoration:none;padding:10px 10px;text-transform:lowercase;font-weight:800;font-size:12px;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} -#masthead #masthead-nav nav ul>li>ul{position:absolute;top:38px;width:200px;display:none;opacity:0;margin:0;border-bottom:1px solid #e0e0e0;background:#f0f0f0;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}#masthead #masthead-nav nav ul>li>ul>li{margin:0;padding:0;position:relative;float:none;}#masthead #masthead-nav nav ul>li>ul>li:hover>a{color:#fff;padding-left:14px;background:#77a832;} -#masthead #masthead-nav nav ul>li>ul>li:hover ul{display:block;opacity:1;} -#masthead #masthead-nav nav ul>li>ul>li a{border-top:1px solid #e0e0e0;display:block;padding:8px 10px;color:#555;text-decoration:none;font-weight:600;} -#masthead #masthead-nav nav ul>li>ul>li ul{position:absolute;display:none;opacity:0;top:0;left:200px;width:150px;margin:0;padding:0;border-right:1px solid #e0e0e0;border-left:1px solid #e0e0e0;background:#f0f0f0;-webkit-transition:opacity 0.2s ease-in-out;-khtml-transition:opacity 0.2s ease-in-out;-moz-transition:opacity 0.2s ease-in-out;-o-transition:opacity 0.2s ease-in-out;transition:opacity 0.2s ease-in-out;}#masthead #masthead-nav nav ul>li>ul>li ul li{margin:0;padding:0;float:none;}#masthead #masthead-nav nav ul>li>ul>li ul li:hover a{background:#77a832;color:#fff;} -#masthead #masthead-nav #searchform{margin:0;float:right;}#masthead #masthead-nav #searchform input#s{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:10px;display:block;margin:0;border:0;background:rgba(0, 0, 0, 0.3);-webkit-box-shadow:0;-khtml-box-shadow:0;-moz-box-shadow:0;-o-box-shadow:0;box-shadow:0;-webkit-transition:all 0.2s ease-in-out;-khtml-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;-webkit-border-radius:0;-khtml-border-radius:0;-moz-border-radius:0;-o-border-radius:0;border-radius:0;text-shadow:1px 1px 1px rgba(0, 0, 0, 0.5);color:#fff;font-size:12px;line-height:18px;font-weight:600;font-family:"Open Sans";width:66px;}#masthead #masthead-nav #searchform input#s:hover,#masthead #masthead-nav #searchform input#s:focus{background:rgba(0, 0, 0, 0.4);width:200px;} -#masthead #masthead-nav #searchform ::-webkit-input-placeholder{color:#f0f0f0;} -#masthead #masthead-nav #searchform :-moz-placeholder{color:#f0f0f0;} -#masthead #masthead-nav #searchform ::-moz-placeholder{color:#f0f0f0;} -#masthead #masthead-nav #searchform ::-ms-input-placeholder{color:#f0f0f0;} -.home .mapgroup-container,.single-map .mapgroup-container,.single-map-group .mapgroup-container,.home .map-container,.single-map .map-container,.single-map-group .map-container{min-height:500px;height:80%;}.home .mapgroup-container .streetview,.single-map .mapgroup-container .streetview,.single-map-group .mapgroup-container .streetview,.home .map-container .streetview,.single-map .map-container .streetview,.single-map-group .map-container .streetview,.home .mapgroup-container .map,.single-map .mapgroup-container .map,.single-map-group .mapgroup-container .map,.home .map-container .map,.single-map .map-container .map,.single-map-group .map-container .map{width:100%;height:100%;} -.map-container{position:relative;z-index:5;min-height:500px;height:55%;}.map-container .map{width:100%;height:100%;position:relative;z-index:2;}.map-container .map .leaflet-control-container .leaflet-top{top:125px;} -.map-container .map .map-legend .map-details-link{display:block;background:#333;margin:10px -11px -11px;color:#f0f0f0;cursor:pointer;padding:5px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:800;}.map-container .map .map-legend .map-details-link:hover{background:#000;} -.map-container .map-details-page{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#333;padding:150px 10% 40px;min-width:400px;z-index:100;}.map-container .map-details-page .inner{height:95%;color:#f0f0f0;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:30px;overflow:auto;overflow-x:hidden;overflow-y:auto;}.map-container .map-details-page .inner::-webkit-scrollbar{background:#333;width:5px;} -.map-container .map-details-page .inner::-webkit-scrollbar-thumb{background:#666;-webkit-border-radius:5px;-khtml-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;} -.map-container .map-details-page .inner h1,.map-container .map-details-page .inner h2,.map-container .map-details-page .inner h3,.map-container .map-details-page .inner h4,.map-container .map-details-page .inner h5,.map-container .map-details-page .inner h6{color:#fff;} -.map-container .map-details-page .inner h2{font-size:32px;line-height:42px;margin:0 0 30px;} -.map-container .map-details-page .inner .close{position:absolute;top:0px;right:30px;padding:7px;background:#666;text-decoration:none;font-size:14px;line-height:14px;-webkit-border-radius:2px;-khtml-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px;} -.map-container .highlight-point{position:absolute;top:50%;left:50%;width:200px;height:200px;margin-top:-2020px;margin-left:-2000px;-webkit-border-radius:2000px;-khtml-border-radius:2000px;-moz-border-radius:2000px;-o-border-radius:2000px;border-radius:2000px;border:1900px solid rgba(0, 0, 0, 0.6);pointer-events:all;z-index:3;}.map-container .highlight-point.animate{-webkit-animation-duration:1s;-webkit-animation-timing-function:ease;-webkit-animation-iteration-count:1;-webkit-animation-name:map-point-highlight;-webkit-animation-delay:.5s;-webkit-animation-fill-mode:forwards;} -.map-container .disable-point{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.8);text-align:center;padding-top:100px;}.map-container .disable-point span{font-size:20px;line-height:20px;color:#111;font-weight:800;background:#f6f6f6;padding:3px 6px;} -.map-container .streetview{position:absolute;top:0;left:0;z-index:3;} -html#map-embed .map-container .leaflet-control-container .leaflet-top{top:0;} -.mapgroup-container{height:55%;}.mapgroup-container .map-container{min-height:0;height:100%;} -.mapgroup{position:relative;width:100%;height:100%;}.mapgroup .map-nav-container{position:absolute;bottom:0;z-index:6;left:20%;right:20%;}.mapgroup .map-nav-container .map-nav{display:table;padding:0;margin:0 auto;position:relative;}.mapgroup .map-nav-container .map-nav li{margin:0;padding:0;display:table-cell;text-align:center;}.mapgroup .map-nav-container .map-nav li a{margin:0 1px 0 0;display:block;text-decoration:none;background:#fefefe;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #fefefe), color-stop(1, #e5e5e5));background:-ms-linear-gradient(bottom, #fefefe, #e5e5e5);background:-moz-linear-gradient(center bottom, #fefefe 0%, #e5e5e5 100%);background:-o-linear-gradient(#e5e5e5, #fefefe);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5', endColorstr='#fefefe', GradientType=0);border:1px solid #fefefe;padding:10px;position:relative;font-weight:600;}.mapgroup .map-nav-container .map-nav li a.active{background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #77a832), color-stop(1, #5b8126));background:-ms-linear-gradient(bottom, #77a832, #5b8126);background:-moz-linear-gradient(center bottom, #77a832 0%, #5b8126 100%);background:-o-linear-gradient(#5b8126, #77a832);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5b8126', endColorstr='#77a832', GradientType=0);border-color:#77a832;color:#fff;}.mapgroup .map-nav-container .map-nav li a.active:after{content:'';width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #5b8126;position:absolute;top:-10px;left:15px;z-index:1000;} -@-webkit-keyframes map-point-highlight{0%{margin-top:-2020px;margin-left:-2000px;-webkit-border-radius:2000px;-khtml-border-radius:2000px;-moz-border-radius:2000px;-o-border-radius:2000px;border-radius:2000px;border:1900px solid rgba(0, 0, 0, 0.6);} 100%{width:1900px;height:1900px;border:850px solid rgba(0, 0, 0, 0);}}.section-title,.single-post-header,.page-header{background:#fefefe;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.1);-khtml-box-shadow:0 0 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.1);-o-box-shadow:0 0 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 3px rgba(0, 0, 0, 0.1);padding:40px 0 20px;margin:0 0 20px;position:relative;}.section-title h1,.single-post-header h1,.page-header h1{color:#333;} -.section-title h2,.single-post-header h2,.page-header h2{color:#333;} -.section-title .post-meta,.single-post-header .post-meta,.page-header .post-meta{margin:30px 0 0;}.section-title .post-meta p,.single-post-header .post-meta p,.page-header .post-meta p{margin:0 0 10px;color:#666;}.section-title .post-meta p .lsf,.single-post-header .post-meta p .lsf,.page-header .post-meta p .lsf{margin-right:10px;} -.section-title .post-categories,.single-post-header .post-categories,.page-header .post-categories{margin:0;padding:0;height:30px;}.section-title .post-categories li,.single-post-header .post-categories li,.page-header .post-categories li{margin:0;padding:0;float:left;}.section-title .post-categories li a,.single-post-header .post-categories li a,.page-header .post-categories li a{display:block;font-weight:800;padding:5px;background:#eee;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;margin:0 5px 0 0;font-size:11px;line-height:11px;text-decoration:none;color:#333;text-transform:uppercase;} -#sidebar .widgets{margin:0;padding:0;}#sidebar .widgets .widget{margin:0 0 40px;padding:0;}#sidebar .widgets .widget .widget-title{font-size:16px;line-height:20px;margin:0 0 10px;font-weight:800;color:#333;} -#sidebar .widgets .widget ul{margin:0;padding:0;}#sidebar .widgets .widget ul li{margin:0;padding:5px 0;border-bottom:1px dotted #ccc;} -.posts-section .posts-list li{margin-bottom:20px;} -.posts-section .posts-list article{background:rgba(255, 255, 255, 0.9);-webkit-box-shadow:0 2px 3px rgba(0, 0, 0, 0.2);-khtml-box-shadow:0 2px 3px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 2px 3px rgba(0, 0, 0, 0.2);-o-box-shadow:0 2px 3px rgba(0, 0, 0, 0.2);box-shadow:0 2px 3px rgba(0, 0, 0, 0.2);-webkit-border-radius:5px;-khtml-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;position:relative;}.posts-section .posts-list article .post-header{padding:20px 20px 0;}.posts-section .posts-list article .post-header h3{font-size:18px;line-height:22px;font-weight:800;}.posts-section .posts-list article .post-header h3 a{text-decoration:none;} -.posts-section .posts-list article .post-header p.meta{font-size:10px;line-height:14px;margin:0 0 10px;color:#999;}.posts-section .posts-list article .post-header p.meta span{display:block;} -.posts-section .posts-list article .post-content{padding:0 20px 20px;}.posts-section .posts-list article .post-content h3{font-size:18px;line-height:22px;font-weight:800;}.posts-section .posts-list article .post-content h3 a{text-decoration:none;} -.posts-section .posts-list article .post-content .post-excerpt{max-height:108px;overflow:hidden;}.posts-section .posts-list article .post-content .post-excerpt p{font-size:12px;line-height:18px;} -.posts-section .posts-list article .actions{padding:0 20px 15px;background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #69942c), color-stop(1, #77a832));background:-ms-linear-gradient(bottom, #69942c, #77a832);background:-moz-linear-gradient(center bottom, #69942c 0%, #77a832 100%);background:-o-linear-gradient(#77a832, #69942c);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#77a832', endColorstr='#69942c', GradientType=0);-webkit-border-radius:0 0 5px 5px;-khtml-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;-o-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;}.posts-section .posts-list article .actions form{display:inline;margin:0;} -.posts-section .posts-list article .actions a,.posts-section .posts-list article .actions button,.posts-section .posts-list article .actions .button,.posts-section .posts-list article .actions input[type=submit]{text-transform:uppercase;font-weight:800;color:rgba(255, 255, 255, 0.5);text-decoration:none;font-size:10px;line-height:20px;display:block;float:left;padding:0;margin:10px 10px -5px 0;text-shadow:-1px -1px 0px rgba(0, 0, 0, 0.1);-webkit-transition:color 0.2s ease-in-out;-khtml-transition:color 0.2s ease-in-out;-moz-transition:color 0.2s ease-in-out;-o-transition:color 0.2s ease-in-out;transition:color 0.2s ease-in-out;font-family:"Open Sans",sans-serif;background:transparent;border:0;overflow:visible;} -.posts-section .posts-list article .actions:hover a,.posts-section .posts-list article .actions:hover button,.posts-section .posts-list article .actions:hover .button,.posts-section .posts-list article .actions:hover input[type=submit]{color:rgba(255, 255, 255, 0.7);}.posts-section .posts-list article .actions:hover a:hover,.posts-section .posts-list article .actions:hover button:hover,.posts-section .posts-list article .actions:hover .button:hover,.posts-section .posts-list article .actions:hover input[type=submit]:hover{color:rgba(255, 255, 255, 0.9);} -.posts-section.featured{position:relative;width:100%;height:500px;border-bottom:20px solid #333;}.posts-section.featured .map-container{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2;}.posts-section.featured .map-container .map{position:absolute;top:0;bottom:0;width:125%;height:auto;} -.posts-section.featured h2{text-transform:uppercase;margin:20px 0;font-size:14px;line-height:14px;position:relative;z-index:3;background:rgba(0, 0, 0, 0.7);padding:10px 20px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;float:left;color:#fff;} -.posts-section.featured .container{padding-top:20px;}.posts-section.featured .container .featured-content{position:relative;z-index:3;background:rgba(255, 255, 255, 0.9);-webkit-box-shadow:0 0 30px 0 rgba(0, 0, 0, 0.3);-khtml-box-shadow:0 0 30px 0 rgba(0, 0, 0, 0.3);-moz-box-shadow:0 0 30px 0 rgba(0, 0, 0, 0.3);-o-box-shadow:0 0 30px 0 rgba(0, 0, 0, 0.3);box-shadow:0 0 30px 0 rgba(0, 0, 0, 0.3);-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:20px;overflow:hidden;}.posts-section.featured .container .featured-content li{position:relative;top:0;left:-800px;-webkit-transition:left 0.2s ease-in-out;-khtml-transition:left 0.2s ease-in-out;-moz-transition:left 0.2s ease-in-out;-o-transition:left 0.2s ease-in-out;transition:left 0.2s ease-in-out;height:0;margin:0;}.posts-section.featured .container .featured-content li.active{left:0;height:auto;} -.posts-section.featured .container .featured-content li .post-header h3{font-size:38px;line-height:38px;font-weight:800;margin:0 0 20px;}.posts-section.featured .container .featured-content li .post-header h3 a{text-decoration:none;}.posts-section.featured .container .featured-content li .post-header h3 a:hover{color:#3f591b;} -.posts-section.featured .container .featured-content li .post-header .meta{font-size:11px;line-height:11px;font-weight:800;color:#666;display:inline;background:#fff;padding:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;} -.posts-section.featured .container .featured-content li .post-content{margin:10px 0 20px;}.posts-section.featured .container .featured-content li .post-content p{font-size:14px;line-height:22px;max-height:66px;overflow:hidden;margin:0;} -.posts-section.featured .container .featured-content li .actions a{background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #77a832), color-stop(1, #69942c));background:-ms-linear-gradient(bottom, #77a832, #69942c);background:-moz-linear-gradient(center bottom, #77a832 0%, #69942c 100%);background:-o-linear-gradient(#69942c, #77a832);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#69942c', endColorstr='#77a832', GradientType=0);-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;border:1px solid #69942c;padding:5px 8px;text-decoration:none;font-size:11px;line-height:11px;text-transform:uppercase;font-weight:800;color:rgba(255, 255, 255, 0.8);text-shadow:-1px -1px 0px rgba(0, 0, 0, 0.15);}.posts-section.featured .container .featured-content li .actions a:hover{color:#ffffff;background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #69942c), color-stop(1, #5b8126));background:-ms-linear-gradient(bottom, #69942c, #5b8126);background:-moz-linear-gradient(center bottom, #69942c 0%, #5b8126 100%);background:-o-linear-gradient(#5b8126, #69942c);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5b8126', endColorstr='#69942c', GradientType=0);} -.posts-section.featured .container .slider-controllers{position:relative;z-index:3;margin:20px 0;float:right;}.posts-section.featured .container .slider-controllers ul{margin:0;padding:0;}.posts-section.featured .container .slider-controllers ul li{width:10px;height:10px;-webkit-border-radius:5px;-khtml-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;float:left;margin:0 0 0 10px;text-indent:-9999px;overflow:hidden;background:rgba(255, 255, 255, 0.8);-webkit-box-shadow:0 0 10px 0 rgba(0, 0, 0, 0.5);-khtml-box-shadow:0 0 10px 0 rgba(0, 0, 0, 0.5);-moz-box-shadow:0 0 10px 0 rgba(0, 0, 0, 0.5);-o-box-shadow:0 0 10px 0 rgba(0, 0, 0, 0.5);box-shadow:0 0 10px 0 rgba(0, 0, 0, 0.5);cursor:pointer;-webkit-transition:all 0.2s ease-in-out;-khtml-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;}.posts-section.featured .container .slider-controllers ul li.active{background:#77a832;-webkit-transform:scale(1.5);-khtml-transform:scale(1.5);-moz-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5);} -.posts-section.featured .container .slider-controllers ul li:hover{-webkit-transform:scale(1.25);-khtml-transform:scale(1.25);-moz-transform:scale(1.25);-o-transform:scale(1.25);transform:scale(1.25);background:#eef7e2;} -#colophon{background:rgba(0, 0, 0, 0.7);width:100%;color:#f0f0f0;padding:20px 0 15px 0;margin-top:40px;}#colophon a{color:#fff;text-decoration:none;font-weight:600;}#colophon a:hover{color:#eee;} -#colophon #footer-nav .menu{margin:0;padding:0;font-size:12px;}#colophon #footer-nav .menu>li{float:left;margin:0 40px 0 0;}#colophon #footer-nav .menu>li>a{font-weight:800;text-transform:uppercase;margin-bottom:5px;display:block;} -#colophon #footer-nav .menu>li ul{margin:0;padding:0;}#colophon #footer-nav .menu>li ul li{margin:0;padding:0;font-size:11px;} -#colophon .credits{font-size:11px;text-align:right;}#colophon .credits p{margin:0;} -#jeo-share-widget{margin:0 0 -40px 0;}#jeo-share-widget #configuration{margin:-20px 0 0;} +html,body{width:100%;height:100%;font:14px/18px "Open Sans","Helvetica","Arial",sans-serif;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;background:#eeeee7}a{-webkit-transition:all .2s ease-in-out;-khtml-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}h1,h2,h3,h4,h5,h6{font-family:"Open Sans","Helvetica","Arial",sans-serif}h1,h2{font-weight:800}h3,h4,h5,h6{font-weight:600}.alignleft{float:left;margin:0 20px 20px 0}.alignright{float:right;margin:0 0 20px 20px}.aligncenter{display:block;margin:0 auto 20px}.size-auto,.size-full,.size-large,.size-medium,.size-thumbnail{max-width:100%;height:auto}.wp-caption{margin-bottom:24px;padding:10px 0 10px 10px;background:rgba(255,255,255,0.8)}.wp-caption img[class*="wp-image-"]{display:block;margin:0 0 10px}.wp-caption{color:#767676}.wp-caption-text{margin:0;font-size:20%;text-align:center;font-size:12px;}.displaying-map #masthead{position:absolute;width:100%;z-index:10;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear, left bottom, left top, color-stop(0, transparent), color-stop(1, rgba(0,0,0,0.7)));background:-ms-linear-gradient(bottom, transparent, rgba(0,0,0,0.7));background:-moz-linear-gradient(center bottom, transparent 0, rgba(0,0,0,0.7) 100%);background:-o-linear-gradient(rgba(0,0,0,0.7), transparent);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='rgba(0, 0, 0, 0.7)', endColorstr='transparent', GradientType=0);height:125px}.displaying-map #masthead .site-meta{margin:20px 0}.displaying-map #masthead h1 a{color:#fff;text-shadow:0 0 7px rgba(0,0,0,0.4)}.displaying-map #masthead #masthead-nav{position:relative;-webkit-border-radius:0 0 3px 3px;-khtml-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;-o-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-box-shadow:0 0 15px 0 rgba(0,0,0,0.6);-khtml-box-shadow:0 0 15px 0 rgba(0,0,0,0.6);-moz-box-shadow:0 0 15px 0 rgba(0,0,0,0.6);-o-box-shadow:0 0 15px 0 rgba(0,0,0,0.6);box-shadow:0 0 15px 0 rgba(0,0,0,0.6)}.displaying-map #masthead #masthead-nav nav ul>li:hover>a{-webkit-border-radius:0;-khtml-border-radius:0;-moz-border-radius:0;-o-border-radius:0;border-radius:0}.displaying-map #masthead #masthead-nav nav ul>li>a{background:transparent;-webkit-border-radius:0 0 3px 3px;-khtml-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;-o-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px}.displaying-map #masthead #masthead-nav #searchform input#s{background:transparent}.loading-map #masthead{opacity:0;display:none}#first-map-message{padding:10% 0;text-align:center;background:#111;color:#f0f0f0;-webkit-box-shadow:inset 0 20px 40px #0f0f0f;-khtml-box-shadow:inset 0 20px 40px #0f0f0f;-moz-box-shadow:inset 0 20px 40px #0f0f0f;-o-box-shadow:inset 0 20px 40px #0f0f0f;box-shadow:inset 0 20px 40px #0f0f0f}#first-map-message h2,#first-map-message h3{color:#f0f0f0}#first-map-message a{color:#77a832;text-decoration:none}#masthead{position:relative;background:#1f1f1f;opacity:1;-webkit-transition:opacity .2s ease-in-out;-khtml-transition:opacity .2s ease-in-out;-moz-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}#masthead .site-meta{margin:40px 0}#masthead h1{margin:0 0 5px;font-weight:800;font-family:"Open Sans";font-size:28px;line-height:28px}#masthead h1 a{color:#77a832;text-decoration:none;text-shadow:0 0 7px rgba(0,0,0,0.4);-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}#masthead h1 a:hover{color:#fff}#masthead h2{font-size:14px;line-height:20px;margin:0;color:#fff;text-shadow:0 0 4px rgba(0,0,0,0.6);text-transform:lowercase;font-weight:200}#masthead #masthead-nav{float:right;position:absolute;z-index:100;bottom:0;right:0;background:#333;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}#masthead #masthead-nav nav{float:left}#masthead #masthead-nav nav ul{margin:0;padding:0}#masthead #masthead-nav nav ul>li{margin:0 1px 0 0;padding:0;float:left;position:relative}#masthead #masthead-nav nav ul>li:hover>a{color:#fff;text-shadow:0 0 0;background:#77a832;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}#masthead #masthead-nav nav ul>li:hover>ul{display:block;opacity:1;-webkit-transition:opacity .2s ease-in-out;-khtml-transition:opacity .2s ease-in-out;-moz-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}#masthead #masthead-nav nav ul>li>a{display:block;color:#f0f0f0;text-decoration:none;padding:10px 10px;text-transform:lowercase;font-weight:800;font-size:12px;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}#masthead #masthead-nav nav ul>li>ul{position:absolute;top:38px;width:200px;display:none;opacity:0;margin:0;border-bottom:1px solid #e0e0e0;background:#f0f0f0;-webkit-border-radius:3px 3px 0 0;-khtml-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;-o-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0}#masthead #masthead-nav nav ul>li>ul>li{margin:0;padding:0;position:relative;float:none}#masthead #masthead-nav nav ul>li>ul>li:hover>a{color:#fff;padding-left:14px;background:#77a832}#masthead #masthead-nav nav ul>li>ul>li:hover ul{display:block;opacity:1}#masthead #masthead-nav nav ul>li>ul>li a{border-top:1px solid #e0e0e0;display:block;padding:8px 10px;color:#555;text-decoration:none;font-weight:600}#masthead #masthead-nav nav ul>li>ul>li ul{position:absolute;display:none;opacity:0;top:0;left:200px;width:150px;margin:0;padding:0;border-right:1px solid #e0e0e0;border-left:1px solid #e0e0e0;background:#f0f0f0;-webkit-transition:opacity .2s ease-in-out;-khtml-transition:opacity .2s ease-in-out;-moz-transition:opacity .2s ease-in-out;-o-transition:opacity .2s ease-in-out;transition:opacity .2s ease-in-out}#masthead #masthead-nav nav ul>li>ul>li ul li{margin:0;padding:0;float:none}#masthead #masthead-nav nav ul>li>ul>li ul li:hover a{background:#77a832;color:#fff}#masthead #masthead-nav #searchform{margin:0;float:right}#masthead #masthead-nav #searchform input#s{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:10px;display:block;margin:0;border:0;background:rgba(0,0,0,0.3);-webkit-box-shadow:0;-khtml-box-shadow:0;-moz-box-shadow:0;-o-box-shadow:0;box-shadow:0;-webkit-transition:all .2s ease-in-out;-khtml-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;-webkit-border-radius:0;-khtml-border-radius:0;-moz-border-radius:0;-o-border-radius:0;border-radius:0;text-shadow:1px 1px 1px rgba(0,0,0,0.5);color:#fff;font-size:12px;line-height:18px;font-weight:600;font-family:"Open Sans";width:66px}#masthead #masthead-nav #searchform input#s:hover,#masthead #masthead-nav #searchform input#s:focus{background:rgba(0,0,0,0.4);width:200px}#masthead #masthead-nav #searchform ::-webkit-input-placeholder{color:#f0f0f0}#masthead #masthead-nav #searchform :-moz-placeholder{color:#f0f0f0}#masthead #masthead-nav #searchform ::-moz-placeholder{color:#f0f0f0}#masthead #masthead-nav #searchform ::-ms-input-placeholder{color:#f0f0f0}.home .mapgroup-container,.single-map .mapgroup-container,.single-map-group .mapgroup-container,.home .map-container,.single-map .map-container,.single-map-group .map-container{min-height:500px;height:80%}.home .mapgroup-container .streetview,.single-map .mapgroup-container .streetview,.single-map-group .mapgroup-container .streetview,.home .map-container .streetview,.single-map .map-container .streetview,.single-map-group .map-container .streetview,.home .mapgroup-container .map,.single-map .mapgroup-container .map,.single-map-group .mapgroup-container .map,.home .map-container .map,.single-map .map-container .map,.single-map-group .map-container .map{width:100%;height:100%}.map-container{position:relative;z-index:5;min-height:500px;height:55%}.map-container .map{width:100%;height:100%;position:relative;z-index:2}.map-container .map .leaflet-control-container .leaflet-top{top:125px}.map-container .map .map-legend .map-details-link{display:block;background:#333;margin:10px -11px -11px;color:#f0f0f0;cursor:pointer;padding:5px;text-align:center;text-transform:uppercase;font-size:10px;font-weight:800}.map-container .map .map-legend .map-details-link:hover{background:#000}.map-container .map-details-page{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;background:#333;padding:150px 10% 40px;min-width:400px;z-index:100}.map-container .map-details-page .inner{height:95%;color:#f0f0f0;position:relative;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:30px;overflow:auto;overflow-x:hidden;overflow-y:auto}.map-container .map-details-page .inner::-webkit-scrollbar{background:#333;width:5px}.map-container .map-details-page .inner::-webkit-scrollbar-thumb{background:#666;-webkit-border-radius:5px;-khtml-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px}.map-container .map-details-page .inner h1,.map-container .map-details-page .inner h2,.map-container .map-details-page .inner h3,.map-container .map-details-page .inner h4,.map-container .map-details-page .inner h5,.map-container .map-details-page .inner h6{color:#fff}.map-container .map-details-page .inner h2{font-size:32px;line-height:42px;margin:0 0 30px}.map-container .map-details-page .inner .close{position:absolute;top:0;right:30px;padding:7px;background:#666;text-decoration:none;font-size:14px;line-height:14px;-webkit-border-radius:2px;-khtml-border-radius:2px;-moz-border-radius:2px;-o-border-radius:2px;border-radius:2px}.map-container .highlight-point{position:absolute;top:50%;left:50%;width:200px;height:200px;margin-top:-2020px;margin-left:-2000px;-webkit-border-radius:2000px;-khtml-border-radius:2000px;-moz-border-radius:2000px;-o-border-radius:2000px;border-radius:2000px;border:1900px solid rgba(0,0,0,0.6);pointer-events:all;z-index:3}.map-container .highlight-point.animate{-webkit-animation-duration:1s;-webkit-animation-timing-function:ease;-webkit-animation-iteration-count:1;-webkit-animation-name:map-point-highlight;-webkit-animation-delay:.5s;-webkit-animation-fill-mode:forwards}.map-container .disable-point{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.8);text-align:center;padding-top:100px}.map-container .disable-point span{font-size:20px;line-height:20px;color:#111;font-weight:800;background:#f6f6f6;padding:3px 6px}.map-container .streetview{position:absolute;top:0;left:0;z-index:3}html#map-embed .map-container .leaflet-control-container .leaflet-top{top:0}.mapgroup-container{height:55%}.mapgroup-container .map-container{min-height:0;height:100%}.mapgroup{position:relative;width:100%;height:100%}.mapgroup .map-nav-container{position:absolute;bottom:0;z-index:6;left:20%;right:20%}.mapgroup .map-nav-container .map-nav{display:table;padding:0;margin:0 auto;position:relative}.mapgroup .map-nav-container .map-nav li{margin:0;padding:0;display:table-cell;text-align:center}.mapgroup .map-nav-container .map-nav li a{margin:0 1px 0 0;display:block;text-decoration:none;background:#fefefe;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #fefefe), color-stop(1, #e5e5e5));background:-ms-linear-gradient(bottom, #fefefe, #e5e5e5);background:-moz-linear-gradient(center bottom, #fefefe 0, #e5e5e5 100%);background:-o-linear-gradient(#e5e5e5, #fefefe);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5e5e5', endColorstr='#fefefe', GradientType=0);border:1px solid #fefefe;padding:10px;position:relative;font-weight:600}.mapgroup .map-nav-container .map-nav li a.active{background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #77a832), color-stop(1, #5b8126));background:-ms-linear-gradient(bottom, #77a832, #5b8126);background:-moz-linear-gradient(center bottom, #77a832 0, #5b8126 100%);background:-o-linear-gradient(#5b8126, #77a832);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5b8126', endColorstr='#77a832', GradientType=0);border-color:#77a832;color:#fff}.mapgroup .map-nav-container .map-nav li a.active:after{content:'';width:0;height:0;border-left:10px solid transparent;border-right:10px solid transparent;border-bottom:10px solid #5b8126;position:absolute;top:-10px;left:15px;z-index:1000}@-webkit-keyframes map-point-highlight{0%{margin-top:-2020px;margin-left:-2000px;-webkit-border-radius:2000px;-khtml-border-radius:2000px;-moz-border-radius:2000px;-o-border-radius:2000px;border-radius:2000px;border:1900px solid rgba(0,0,0,0.6)}100%{width:1900px;height:1900px;border:850px solid rgba(0,0,0,0)}}.section-title,.single-post-header,.page-header{background:#fefefe;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.1);-khtml-box-shadow:0 0 3px rgba(0,0,0,0.1);-moz-box-shadow:0 0 3px rgba(0,0,0,0.1);-o-box-shadow:0 0 3px rgba(0,0,0,0.1);box-shadow:0 0 3px rgba(0,0,0,0.1);padding:40px 0 20px;margin:0 0 20px;position:relative}.section-title h1,.single-post-header h1,.page-header h1{color:#333}.section-title h2,.single-post-header h2,.page-header h2{color:#333}.section-title .post-meta,.single-post-header .post-meta,.page-header .post-meta{margin:30px 0 0}.section-title .post-meta p,.single-post-header .post-meta p,.page-header .post-meta p{margin:0 0 10px;color:#666}.section-title .post-meta p .lsf,.single-post-header .post-meta p .lsf,.page-header .post-meta p .lsf{margin-right:10px}.section-title .post-categories,.single-post-header .post-categories,.page-header .post-categories{margin:0;padding:0;height:30px}.section-title .post-categories li,.single-post-header .post-categories li,.page-header .post-categories li{margin:0;padding:0;float:left}.section-title .post-categories li a,.single-post-header .post-categories li a,.page-header .post-categories li a{display:block;font-weight:800;padding:5px;background:#eee;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;margin:0 5px 0 0;font-size:11px;line-height:11px;text-decoration:none;color:#333;text-transform:uppercase}.gallery-caption{background-color:rgba(0,0,0,0.7);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;color:#fff;font-size:12px;line-height:1.5;margin:0;max-height:50%;opacity:0;padding:6px 8px;position:absolute;bottom:0;left:0;text-align:left;width:100%}#comments{border-top:1px solid #ccc;padding-top:40px}#comments h2{font-size:30px;margin:0 0 20px}#comments .comment-list{margin:0;list-style:none}#comments .comment-list .comment{border-bottom:1px solid #ccc}#comments .comment-list .comment.bypostauthor .comment-author{font-size:110%}#comments .comment-list .comment.bypostauthor .comment-author:after{content:'*'}#comments .comment-list .comment a{text-decoration:none}#comments .comment-list .comment .avatar{margin-bottom:20px}#comments .comment-list .comment .comment-header{float:left;margin:0 20px 20px 0}#comments .comment-list .comment .comment-meta{margin-bottom:10px}#comments .comment-list .comment .comment-author cite{font-weight:600}#comments .comment-list .comment .comment-date{font-size:11px;margin:0 0 20px;display:inline;color:#999}#comments .comment-list .comment .comment-date a{color:#999}#comments .comment-list .comment .comment-edit-link{font-size:11px}#comments .comment-list .comment .comment-edit-link a{color:#999}#comments .comment-list .comment .comment-content{margin:0 0 40px;font-size:14px;line-height:24px}#comments .comment-list .comment .reply{margin-top:-30px;float:right;line-height:35px}#comments .comment-list .comment .reply a{padding:10px;background:#333;color:#f0f0f0;font-size:12px;text-transform:uppercase;font-weight:200}#comments .comment-list .comment .children{margin:0;padding:0}#comments .comment-list .comment .children .comment{border:0}#comments #respond textarea{width:100%}#sidebar .widgets{margin:0;padding:0}#sidebar .widgets .widget{margin:0 0 40px;padding:0}#sidebar .widgets .widget .widget-title{font-size:16px;line-height:20px;margin:0 0 10px;font-weight:800;color:#333}#sidebar .widgets .widget ul{margin:0;padding:0}#sidebar .widgets .widget ul li{margin:0;padding:5px 0;border-bottom:1px dotted #ccc}.posts-section .posts-list li{margin-bottom:20px}.posts-section .posts-list .sticky article{border-top:2px solid #77a832}.posts-section .posts-list article{background:rgba(255,255,255,0.9);-webkit-box-shadow:0 2px 3px rgba(0,0,0,0.2);-khtml-box-shadow:0 2px 3px rgba(0,0,0,0.2);-moz-box-shadow:0 2px 3px rgba(0,0,0,0.2);-o-box-shadow:0 2px 3px rgba(0,0,0,0.2);box-shadow:0 2px 3px rgba(0,0,0,0.2);-webkit-border-radius:5px;-khtml-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;position:relative}.posts-section .posts-list article .post-header{padding:20px 20px 0}.posts-section .posts-list article .post-header h3{font-size:18px;line-height:22px;font-weight:800}.posts-section .posts-list article .post-header h3 a{text-decoration:none}.posts-section .posts-list article .post-header p.meta{font-size:10px;line-height:14px;margin:0 0 10px;color:#999}.posts-section .posts-list article .post-header p.meta span{display:block}.posts-section .posts-list article .post-content{padding:0 20px 20px}.posts-section .posts-list article .post-content h3{font-size:18px;line-height:22px;font-weight:800}.posts-section .posts-list article .post-content h3 a{text-decoration:none}.posts-section .posts-list article .post-content .post-excerpt{max-height:108px;overflow:hidden}.posts-section .posts-list article .post-content .post-excerpt p{font-size:12px;line-height:18px}.posts-section .posts-list article .actions{padding:0 20px 15px;background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #69942c), color-stop(1, #77a832));background:-ms-linear-gradient(bottom, #69942c, #77a832);background:-moz-linear-gradient(center bottom, #69942c 0, #77a832 100%);background:-o-linear-gradient(#77a832, #69942c);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#77a832', endColorstr='#69942c', GradientType=0);-webkit-border-radius:0 0 5px 5px;-khtml-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;-o-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px}.posts-section .posts-list article .actions form{display:inline;margin:0}.posts-section .posts-list article .actions a,.posts-section .posts-list article .actions button,.posts-section .posts-list article .actions .button,.posts-section .posts-list article .actions input[type=submit]{text-transform:uppercase;font-weight:800;color:rgba(255,255,255,0.5);text-decoration:none;font-size:10px;line-height:20px;display:block;float:left;padding:0;margin:10px 10px -5px 0;text-shadow:-1px -1px 0 rgba(0,0,0,0.1);-webkit-transition:color .2s ease-in-out;-khtml-transition:color .2s ease-in-out;-moz-transition:color .2s ease-in-out;-o-transition:color .2s ease-in-out;transition:color .2s ease-in-out;font-family:"Open Sans",sans-serif;background:transparent;border:0;overflow:visible}.posts-section .posts-list article .actions:hover a,.posts-section .posts-list article .actions:hover button,.posts-section .posts-list article .actions:hover .button,.posts-section .posts-list article .actions:hover input[type=submit]{color:rgba(255,255,255,0.7)}.posts-section .posts-list article .actions:hover a:hover,.posts-section .posts-list article .actions:hover button:hover,.posts-section .posts-list article .actions:hover .button:hover,.posts-section .posts-list article .actions:hover input[type=submit]:hover{color:rgba(255,255,255,0.9)}.posts-section .navigation{text-align:center}.posts-section .navigation a{padding:10px;text-decoration:none;color:#666}.posts-section .navigation a:hover{color:#333}.posts-section.featured{position:relative;width:100%;height:500px;border-bottom:20px solid #333}.posts-section.featured .map-container{position:absolute;top:0;right:0;bottom:0;left:0;z-index:2}.posts-section.featured .map-container .map{position:absolute;top:0;bottom:0;width:125%;height:auto}.posts-section.featured h2{text-transform:uppercase;margin:20px 0;font-size:14px;line-height:14px;position:relative;z-index:3;background:rgba(0,0,0,0.7);padding:10px 20px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;float:left;color:#fff}.posts-section.featured .container{padding-top:20px}.posts-section.featured .container .featured-content{position:relative;z-index:3;background:rgba(255,255,255,0.9);-webkit-box-shadow:0 0 30px 0 rgba(0,0,0,0.3);-khtml-box-shadow:0 0 30px 0 rgba(0,0,0,0.3);-moz-box-shadow:0 0 30px 0 rgba(0,0,0,0.3);-o-box-shadow:0 0 30px 0 rgba(0,0,0,0.3);box-shadow:0 0 30px 0 rgba(0,0,0,0.3);-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;padding:20px;overflow:hidden}.posts-section.featured .container .featured-content li{position:relative;top:0;left:-800px;-webkit-transition:left .2s ease-in-out;-khtml-transition:left .2s ease-in-out;-moz-transition:left .2s ease-in-out;-o-transition:left .2s ease-in-out;transition:left .2s ease-in-out;height:0;margin:0}.posts-section.featured .container .featured-content li.active{left:0;height:auto}.posts-section.featured .container .featured-content li .post-header h3{font-size:38px;line-height:38px;font-weight:800;margin:0 0 20px}.posts-section.featured .container .featured-content li .post-header h3 a{text-decoration:none}.posts-section.featured .container .featured-content li .post-header h3 a:hover{color:#3f591b}.posts-section.featured .container .featured-content li .post-header .meta{font-size:11px;line-height:11px;font-weight:800;color:#666;display:inline;background:#fff;padding:3px;-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px}.posts-section.featured .container .featured-content li .post-content{margin:10px 0 20px}.posts-section.featured .container .featured-content li .post-content p{font-size:14px;line-height:22px;max-height:66px;overflow:hidden;margin:0}.posts-section.featured .container .featured-content li .actions a{background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #77a832), color-stop(1, #69942c));background:-ms-linear-gradient(bottom, #77a832, #69942c);background:-moz-linear-gradient(center bottom, #77a832 0, #69942c 100%);background:-o-linear-gradient(#69942c, #77a832);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#69942c', endColorstr='#77a832', GradientType=0);-webkit-border-radius:3px;-khtml-border-radius:3px;-moz-border-radius:3px;-o-border-radius:3px;border-radius:3px;border:1px solid #69942c;padding:5px 8px;text-decoration:none;font-size:11px;line-height:11px;text-transform:uppercase;font-weight:800;color:rgba(255,255,255,0.8);text-shadow:-1px -1px 0 rgba(0,0,0,0.15)}.posts-section.featured .container .featured-content li .actions a:hover{color:#fff;background:#77a832;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #69942c), color-stop(1, #5b8126));background:-ms-linear-gradient(bottom, #69942c, #5b8126);background:-moz-linear-gradient(center bottom, #69942c 0, #5b8126 100%);background:-o-linear-gradient(#5b8126, #69942c);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#5b8126', endColorstr='#69942c', GradientType=0)}.posts-section.featured .container .slider-controllers{position:relative;z-index:3;margin:20px 0;float:right}.posts-section.featured .container .slider-controllers ul{margin:0;padding:0}.posts-section.featured .container .slider-controllers ul li{width:10px;height:10px;-webkit-border-radius:5px;-khtml-border-radius:5px;-moz-border-radius:5px;-o-border-radius:5px;border-radius:5px;float:left;margin:0 0 0 10px;text-indent:-9999px;overflow:hidden;background:rgba(255,255,255,0.8);-webkit-box-shadow:0 0 10px 0 rgba(0,0,0,0.5);-khtml-box-shadow:0 0 10px 0 rgba(0,0,0,0.5);-moz-box-shadow:0 0 10px 0 rgba(0,0,0,0.5);-o-box-shadow:0 0 10px 0 rgba(0,0,0,0.5);box-shadow:0 0 10px 0 rgba(0,0,0,0.5);cursor:pointer;-webkit-transition:all .2s ease-in-out;-khtml-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.posts-section.featured .container .slider-controllers ul li.active{background:#77a832;-webkit-transform:scale(1.5);-khtml-transform:scale(1.5);-moz-transform:scale(1.5);-o-transform:scale(1.5);transform:scale(1.5)}.posts-section.featured .container .slider-controllers ul li:hover{-webkit-transform:scale(1.25);-khtml-transform:scale(1.25);-moz-transform:scale(1.25);-o-transform:scale(1.25);transform:scale(1.25);background:#eef7e2}#colophon{background:rgba(0,0,0,0.7);width:100%;color:#f0f0f0;padding:20px 0 15px 0;margin-top:40px}#colophon a{color:#fff;text-decoration:none;font-weight:600}#colophon a:hover{color:#eee}#colophon #footer-nav .menu{margin:0;padding:0;font-size:12px}#colophon #footer-nav .menu>li{float:left;margin:0 40px 0 0}#colophon #footer-nav .menu>li>a{font-weight:800;text-transform:uppercase;margin-bottom:5px;display:block}#colophon #footer-nav .menu>li ul{margin:0;padding:0}#colophon #footer-nav .menu>li ul li{margin:0;padding:0;font-size:11px}#colophon .credits{font-size:11px;text-align:right}#colophon .credits p{margin:0}#jeo-share-widget{margin:0 0 -40px 0}#jeo-share-widget #configuration{margin:-20px 0 0} \ No newline at end of file diff --git a/css/main.less b/css/main.less index 0480f41..cee5737 100644 --- a/css/main.less +++ b/css/main.less @@ -112,6 +112,40 @@ h3,h4,h5,h6 { margin: 0 0 20px 20px; } +.aligncenter { + display: block; + margin: 0 auto 20px; +} + +.size-auto, +.size-full, +.size-large, +.size-medium, +.size-thumbnail { + max-width: 100%; + height: auto; +} + +.wp-caption { + margin-bottom: 24px; + padding: 10px 0 10px 10px; + background: rgba(255,255,255,0.8); +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 0 0 10px; +} + +.wp-caption { + color: #767676; +} + +.wp-caption-text { + margin: 0; + font-size: 80%; +} + @maincolor: #77a832; .displaying-map { @@ -633,6 +667,112 @@ html#map-embed { } } +.gallery-caption { + background-color: rgba(0, 0, 0, 0.7); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + color: #fff; + font-size: 12px; + line-height: 1.5; + margin: 0; + max-height: 50%; + opacity: 0; + padding: 6px 8px; + position: absolute; + bottom: 0; + left: 0; + text-align: left; + width: 100%; +} + +#comments { + border-top: 1px solid #ccc; + padding-top: 40px; + h2 { + font-size: 30px; + margin: 0 0 20px; + } + .comment-list { + margin: 0; + list-style: none; + .comment { + border-bottom: 1px solid #ccc; + &.bypostauthor { + .comment-author { + font-size: 110%; + &:after { + content: '*'; + } + } + } + a { + text-decoration: none; + } + .avatar { + margin-bottom: 20px; + } + .comment-header { + float:left; + margin: 0 20px 20px 0; + } + .comment-meta { + margin-bottom: 10px; + } + .comment-author { + cite { + font-weight: 600; + } + } + .comment-date { + font-size: 11px; + margin: 0 0 20px; + display: inline; + color: #999; + a { + color: #999; + } + } + .comment-edit-link { + font-size: 11px; + a { + color: #999; + } + } + .comment-content { + margin: 0 0 40px; + font-size: 16px; + line-height: 24px; + } + .reply { + margin-top: -30px; + float: right; + line-height: 35px; + a { + padding: 10px; + background: #333; + color: #f0f0f0; + font-size: 12px; + text-transform: uppercase; + font-weight: 200; + } + } + .children { + margin: 0; + padding: 0; + .comment { + border: 0; + } + } + } + } + #respond { + textarea { + width: 100%; + } + } +} + #sidebar { .widgets { margin: 0; @@ -665,6 +805,11 @@ html#map-embed { li { margin-bottom: 20px; } + .sticky { + article { + border-top: 2px solid @maincolor; + } + } article { background: rgba(255,255,255,.9); .box-shadow(0 2px 3px rgba(0,0,0,0.2)); @@ -752,6 +897,17 @@ html#map-embed { } } } + .navigation { + text-align: center; + a { + padding: 10px; + text-decoration: none; + color: #666; + &:hover { + color: #333; + } + } + } } .posts-section.featured { diff --git a/error_log b/error_log new file mode 100644 index 0000000..04366b6 --- /dev/null +++ b/error_log @@ -0,0 +1,4 @@ +[16-Sep-2014 00:26:00 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1 +[16-Sep-2014 01:33:37 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1 +[16-Sep-2014 02:29:50 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1 +[16-Sep-2014 04:02:42 America/New_York] PHP Fatal error: Call to undefined function get_header() in /home/k0007911/public_html/wp-content/themes/jeo/index.php on line 1 diff --git a/fonts/dashicons.eot b/fonts/dashicons.eot new file mode 100644 index 0000000000000000000000000000000000000000..8e5d370c808667d26b29739e8fd839377b0757dd GIT binary patch literal 2780 zcmaJ@du&@*8UMa>?#p&??Cd&Tn$&ge<2Wmwo7j$TUvtN_v2{RcS5cT6);L+;d6cw> zO=uIUShf<4c49*;nZ`6)C{-0I)Pf*r3Un$0st7g-{@^iHlllit6AX<%=;H7@_c|jD z7015keD8Da@1FC0=TBjxG9D&DH#eqJtR-5n9U=;4gqrkJN_uzBT5& z4gR;724?&KY+GN>(2jpdPW!XYOPC#52izouS0}|`Go~&(${TGEnI86(XfROjftUe_PqlM zHiWmqpQ@8+Vb&nb?$RB!me$cGs?vk>S$xhf(Q$f~zD3`mX?l%*MQ_j_=^c8X{>_qO zoZuC_io5tuF7n5D8}H;kuJJw|<7Y5sCMptcN|cIK(OWKvY&=r{QH3A{MO0+DH<91K z$)5F6|9Jy@KDB|Rc1?QPDY4w?wqk3swUp`1bY}A#g{IbU)-G0xl~TsaSXsL&y{NRk zVr3(j)(9)hn6eksCAc8-t;H0VQnJJ;nFPy8Sm$k-hey)myvG=lHaDbLh8ElGangoq zZ{GBhUS2zU`D7lJ_+!x279HO9S=-ZsT$PKh$rQVmjW|6C%ws38mL8bGOxtG{?X?@H zM8(TT*=aruzkhD!HOLyZEWg_-ZOf9< zvTVt}7cB6vpSQx1h$&1Hz818+i$84hFJ5+Hv6%ChT%^wog+fN3;x8z-epx-=qFOlY z%WCc~lTNHTX7?zrDd_kvr98$;I_9sc_%o{h4;<+gW*SFNT8b7y^8OvR- zUQ@1eCl%WK8Y2u-X&6#3;+*=P9_1XY)m&MxC6rWi+VY(4>Jx_Jgban(mpR`P)=GQo z2y%8QvKrwJN=vcT7>iEk+u!6@zFNP}iZnabs?!{?Jm70A#hGvDm}o+GjsS3)5hBby zKO@ZmR8xwLTBvnsqJBXGDuhP0{*%j4N%3dJ)4Ksj$n4A2_bC@xX(;Re@?|ww+}n!p z$HiRzWsM`yR23WGIvqb(@e_d3hkPI&kE^(PTSGY$KnZM`ouyFr8oGtTAww_bocgYh zD6o7=jpv@~1@fHC&8b{Y{WGUjuD&0;M#!w;gdC}~t9Hxc@nh)xBIpeA*>2>NF1o9c z3p!*12PY+au%|tou+8$;X+h8fPd~sbw6_%Uoa(65SuV+W8;3htL2lEB8%YBP-0t)< zh#lk?sq+egc{)=d(}2s{Ii#k%6=X(Cn0Pg_{o(#nJhM6-tG{tkK4{|Ag=rZl#^?Jl zvBnykMqIkEx}0;}d?mvJ-~TAix)X{eIZsIkhSsYf;%u{P_3_CpyaA zce+2AI?k1jO0kfrzxr){@44IV`P|Uvle}~4qMKcLd-&v3{gvgL`4j1K*3~BjNnqWj zzs9neT)bsx%a1M6g?aG@aS;@Ia||uy03}2hYB4$HKtC4#(^*Ti$%B zetwc4;w=&>1>3}MjN?y#b0U&VWfIeq^Y7Jv9Zs&wB>3|$&wOLk;awkV`Fj2Qk1r+G z_LNpWJNcY+^bUiQG;l`n_LgPf`|09^=iN=C*Y-4TexD**NHq6{iEaNK8k+pm;b z0Uup&2}M*l^nMxinV>^04~nj~z;hII} zw19kDgO-qYHfRHMUxPMreTp?`3+t{l=rGRGkgn=R2ofDLpo5qJ9mEXiAZ9=ZF$3Cy zZ?)kY#9V%*yY=O5nbo1aqX!2^M~?o_h4ALf;4&||9~Z+B|8iKPV;CQ$G!4+>=(qY; Q%1`0Ks4tfK?f!5356GXlxBvhE literal 0 HcmV?d00001 diff --git a/fonts/dashicons.ttf b/fonts/dashicons.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f02ee2a15c98488d006399a799ff6f17fa7e0176 GIT binary patch literal 2612 zcmZuzeQaA-6+h?R_hmaccJ`dNG^v}~*Kt<5G_f7Oe$5@z#?~Q9yNbfpu*S*yosZHM zu?cNL70Xtl(N4g$CDWKj3#F<;g<22ySqvt3#tFA4?LQhkO>Y zJ2F087iY~W$mbw8jn*GKM(cSJ@@2@KWA)MfZyk5uhWtCManG^w6DLt8M%>kQk_Pcv zGKs{C;s!KlBFcZGGRL&vvcV|(|Hs|b`A$sEE#f2R=x!J_7E7ZuWCUitqKjEuT{5T_ z)WJvFkYRCQaWUj<%`M(+yVdZ85`&3hZ(f!gasH-osV<_$IfJmeOLx$E+CW>VMi0{G zXoS8@r|4OFfxb&K^cww|-k?9xyYxQ&hb5;t!>f1=ck`WG;!pAp-pvDC=L3A4pTUy3 zq{z5gQ7+X)f2Bv{)43inH7K$$Bt@S4GsR8p^=*{;%bVB_xlJr}sORgT%*vqKO0A{V za;_`al`n1 z@J}NaiyK48q|$|Hh0wRugqpaxni=J8RIe#lxl;;bVVx0&t27L$i@2!1uc@4ex0*Pa*k6igb96EhTEUlzhhcq<*LGswB+$ZCW?C@;rWV=TIuZ-0|t`C4$Fm1uTq zHK#dY`M}p$jx*oVIWdHu90B08AVi#bVOE+EsHPN~wNl$KL~vOHDuhNg_~|v6r1-Pq znZ1A`W)2jB1Ih(f8p`0`p|0+Vdt34Qaj6iztZ@XIs%isVr{fnYeHu`PkPoHPX_Z!Q zYba+UD1lA0vmDBPLyuTIX6Rxrs_%t}0?Vh=MB%A^AkSW5UKI-JUj?NK!9naAA@hb4 zbEMLtIxLST%%S^@p!4Wwd(l(6>8?gE=#Uv4oUH7_p7wFVw#tug3xXba@)2wb0NXJ- zx@*_yXoudw>_7741NmA{dwWkUzeMGn*5W6WoNQm!)--Va+|i@wuJ8R=+p6|tsMfg_ zZY__|vAV{@hkdV!+Gr!)7xuhCI!wpuD|8n9F)RI6)XF%^VXZjdY$rumzK1JS->tY6 zoa&_1UC!g8jl=C#(cARlM$^Cnx4Xg)Vn_W&>b`&&aLfC1#euD51M#&VOqxNiG{(dtg*(X5mzs-trT3hSk3X!4?d2w?!=M_>yGZt z)4cnoV20N=XV-M5T2wxlJ~i>}(;b!GJKY~npW8Qwj8 z#m%q2J$`07cxB~g{#0ir@9GnRCa~e^UsL&9A>FbzwA&*XMJ zJXG!<9@v%V;R~pO<0*UFwl`l2E=}=6yiKB|V4E0@aq8*kClg*amzkMbcrW-( z+*^~&@E2a5{pOaVdp^Xzi%18 zxvzQa`;^d1qWM2g?)V>V+-&-;)HkIbh|%{g;S$vYb9fDgLNwtn*IPL9fc<>r2}N8~ z#DqK$Mwon>aCc%XWe$bLl*El0$&2Ka#nZ&E9yDAq#V)dnBO zSsKx|x)Fm$=ZyF$XT(Q2BRTdI-@6=}V}!jw~yp=zdto!u)kQ3Hm5?(hxn4d3(72r?IB4 NBKpVE0P~~Be*t?xrHcRn literal 0 HcmV?d00001 diff --git a/fonts/dashicons.woff b/fonts/dashicons.woff new file mode 100644 index 0000000000000000000000000000000000000000..b5c9e92d9f86d953a34cca2c8dd01ab6ed54a0cb GIT binary patch literal 2688 zcmZuzeQaCR6+h?R_hmbC?C>0uCUsN$ISyS(8{6^g7w$k%C=;cnS~t{;#tHq-2WvY4 znn0);ffBJ6u}vdE3^6*os>;yR?kf_?R@7-5iZqb6KlXttB>vdY#F*G0Yvb&9-g8(K z_4?g=KJGc^p7(qAp6f^N-?ojI(4tRKETCl>Z`AJJy{<^a4(0}=$A6+rLnF0EpgRQl zPU#=E(=!Ka$3=Gmve-&b92|c90CX3LtaqgUa`g9qIJCd^Fs7fvd?n~}d)p2{3Ej^j zd(!P+>nn#wPCN$PUm&~E<3wkN$A-l2W5`X?)fsbgr1lurb*@A14EkE07_E)$CyI1n z?K`Buf6V#dk+I_^@V*0|*=cavAU;DTk$OoXLpmK&{s)yf0(oiU#8OH4FHq-)5k0$r zpPq$;r9|CmodH!CWhED*%(`UIdQb;HnL~ty`GtjmvxQr@+IFpB3ndy8W4?JwZ20*b zgQdEN7G@2?>Mq?vYiS*ArYhY_U#4Mtlupv~^ga3kP19TSTY8uNOdrvw^k3GT;1sXm zRouO~uw?Ybo26?aCE4DdE;|&MsDpl~UHqS~?9Hi=WqE~zZr={jDC;5=DGFD-nU!47LEqGn){oy zlW0!Zy&l&*%<*lW=QA?tn19DhKI_&0Wke!TV-S(NWPZwn>-*lgH-3I4Gt%AQz2&){ zJL#d#uQ8%9)rO%ZiSynYLiHT1y}7dF5=nb=VtHPM`h?*)5yQjl>wMq|Yfn5Sf}UN9 ztRQ^7v=m#xSamVq{2ssh&H7zdtl6nno#vS317Bk)&U{T`qA3|11>i(bD#|=Rqs#s)lsPn2e^UTeN>Hu;;xeYR`m4v&djUtp?9bN^crLIKDC_?TbTwDq*^2MS#eDr0 z!4YVB6&v6>9l!FDrvPOD`Cu}c^pf5O0_98yC9r9BmO|NQNQ*=xh9q;|`(c16uzcDZ z&p+J<9$5K=+G$~ zoQ&?pp7wFVw&)v|1x5Ef`4Bb*fbAF=*|lqAq(e3^`wu;NPp;b2-riHqEmA!zT6{vy z@%9yMP5oD1KYH}_D|>rMYSg_ZYNHKwS5Wf?=rA3lZ_pXk z$Bgz{kt^dY2f5;WvmIAmxgIW8e7EeDajN55s$7~2HV${Xg4!mB8$|;L-0li0h#l4! zEp-LKe5n+uG>{5*9;K;Zg_RKtre4eLd~l$Y%&zWC)Ze|R?=|u2%CwAA2!A2gM+2Mq5fSt9y<57ornShJDRY!Zhi0N`h`h; zfVXOt6l@d2F-|`7-HBK_lTA%e&VN$>T{OKao8qs&GV|i*qkC>|`BweH&n~6b_Lf#Y zKly@oWQV~?8#p6)d&@HL{p9jO|L5khtNWU_d`dA<63zW-V#oh!;|t4ODL17w_{e=r zxJ0F446eaI2nXEdvV}tn%%2S{p@^!o8rKH`50g(3?oPDD$brxp;hp j-IyH>;@9W|=)=@WgY-DY?ZNu@VNJ;*{KwM(^G4)<%6O`? literal 0 HcmV?d00001 diff --git a/fonts/jeoicons.svg b/fonts/jeoicons.svg new file mode 100644 index 0000000..76f82ac --- /dev/null +++ b/fonts/jeoicons.svg @@ -0,0 +1,13 @@ + + + +Generated by IcoMoon + + + + + + + + + \ No newline at end of file diff --git a/footer.php b/footer.php index 0006c1a..582cb3b 100644 --- a/footer.php +++ b/footer.php @@ -1,17 +1,17 @@ -
-
-
- -
-
-
-

WordPress using the JEO Beta theme', 'jeo'), 'http://wordpress.org', 'http://jeo.cardume.art.br/'); ?>

-
-
-
-
- - +
+
+
+ +
+
+
+

WordPress using the JEO Beta theme', 'jeo'), 'http://wordpress.org', 'http://jeo.cardume.art.br/'); ?>

+
+
+
+
+ + \ No newline at end of file diff --git a/functions.php b/functions.php index 3703771..3567c3d 100644 --- a/functions.php +++ b/functions.php @@ -1,14 +1,20 @@ comment_type ) : + case 'pingback' : + case 'trackback' : + // Display trackbacks differently than normal comments. + ?> +
  • id="comment-"> +

    ', '' ); ?>

    +
  • + +
  • id="li-comment-"> +
    +
    + +
    +
    + + %1$s', + get_comment_author_link() + ); + ?> + | + + ', + esc_url( get_comment_link( $comment->comment_ID ) ), + get_comment_time( 'c' ), + /* translators: 1: date, 2: time */ + sprintf( __( '%1$s at %2$s', 'humus' ), get_comment_date(), get_comment_time() ) + ); + ?> + + ', ''); ?> +
    +
    + comment_approved ) : ?> +

    + + +
    + +
    + +
    + __( 'Reply', 'humus' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?> +
    +
    +
    + \ No newline at end of file diff --git a/header.php b/header.php index c98675e..6fdef40 100644 --- a/header.php +++ b/header.php @@ -14,13 +14,13 @@ echo " | $site_description"; if ( $paged >= 2 || $page >= 2 ) - echo ' | Página ' . max($paged, $page); + echo ' | ' . __('Page', 'jeo') . max($paged, $page); ?> - + > diff --git a/inc/admin/admin-page-framework.php b/inc/admin/admin-page-framework.php index 439676c..ad71664 100644 --- a/inc/admin/admin-page-framework.php +++ b/inc/admin/admin-page-framework.php @@ -309,6 +309,8 @@ protected function AddInPageTabs( $strSubPageSlug, $arrTabs ) { } protected function CreateRootMenu( $strTitle, $strPathIcon16x16=null ) { + + /* $strPathIcon16x16 = ( $strPathIcon16x16 ) ? $strPathIcon16x16 : $this->strPathIcon16x16; add_menu_page( @@ -329,6 +331,8 @@ protected function CreateRootMenu( $strTitle, $strPathIcon16x16=null ) { // Add a setting link in the plugin listing if ( $this->oLink->arrCallerInfo['type'] == 'plugin' ) add_filter( 'plugin_action_links_' . $this->oLink->GetCallerPluginBaseName() , array( $this->oLink, 'AddSettingsLinkInPluginListingPage' ) ); + + */ } protected function AddSubMenu( $strSubTitle, $strPageSlug, $strPathIcon32x32=null, $strCapability=null ) { @@ -339,9 +343,8 @@ protected function AddSubMenu( $strSubTitle, $strPageSlug, $strPathIcon32x32=nul // add the sub-menu and sub-page $strPageSlug = $this->oUtil->SanitizeSlug( $strPageSlug ); // - => _, . => _ - add_submenu_page( - trim( $this->strPageSlug ) // $parent_slug - , $strSubTitle // $page_title + add_theme_page( + $strSubTitle // $page_title , $strSubTitle // $menu_title , $strCapability // $strCapability , $strPageSlug // $menu_slug @@ -1448,7 +1451,8 @@ public function GetMemoryUsage() { public function DumpArray( $arr, $strFilePath=null ) { if ( $strFilePath ) { - file_put_contents( + global $wp_filesystem; + $wp_filesystem->put_contents( $strFilePath , date( "Y/m/d H:i:s" ) . PHP_EOL . print_r( $arr, true ) . PHP_EOL . PHP_EOL @@ -1911,7 +1915,8 @@ public function UnserializeFromFile( $strFilePath ) { // moved from the main cla // Used for the Import functionality. // Returns an array from the contents of a given file - $arr = unserialize( file_get_contents( $strFilePath, true ) ); + global $wp_filesystem; + $arr = unserialize( $wp_filesystem->get_contents( $strFilePath, true ) ); return ( $arr ) ? $arr : null; } diff --git a/inc/admin/settings.php b/inc/admin/settings.php index 13531e9..67d090c 100644 --- a/inc/admin/settings.php +++ b/inc/admin/settings.php @@ -1,15 +1,13 @@ SetRootMenu(__('JEO', 'jeo')); $this->AddSubMenu( __('JEO Settings', 'jeo'), @@ -79,7 +77,7 @@ function SetUp() { 'description' => __('Select if the front page map should be the featured map with latest content or a selection of featured posts.', 'jeo'), 'type' => 'radio', 'default' => 'latest', - 'label' => array('latest' => __('Featured map with latest posts', 'jeo'), 'featured' => __('Selection of featured posts') . ' (' . __('featured map cannot be a map-group', 'jeo') . ')') + 'label' => array('latest' => __('Featured map with latest posts', 'jeo'), 'featured' => __('Selection of featured posts', 'jeo') . ' (' . __('featured map cannot be a map-group', 'jeo') . ')') ), array( 'id' => 'featured_map', @@ -113,7 +111,7 @@ function SetUp() { 'description' => __('Choose the geocoding service to be used', 'jeo'), 'type' => 'radio', 'default' => 'osm', - 'label' => array('osm' => __('OpenStreetMaps with Nominatim', 'jeo'), 'gmaps' => __('Google Maps')) + 'label' => array('osm' => __('OpenStreetMaps with Nominatim', 'jeo'), 'gmaps' => 'Google Maps') ), array( 'id' => 'gmaps_api_key', diff --git a/inc/core.php b/inc/core.php index df41b6d..827b1bf 100644 --- a/inc/core.php +++ b/inc/core.php @@ -41,7 +41,7 @@ function init() { } function setup_directories() { - $this->directory = apply_filters('jeo_directory', TEMPLATEPATH . '/inc'); + $this->directory = apply_filters('jeo_directory', get_template_directory() . '/inc'); $this->directory_uri = apply_filters('jeo_directory_uri', get_template_directory_uri()); } @@ -61,6 +61,23 @@ function setup_scripts() { } function scripts() { + + if(is_admin()) { + wp_enqueue_style('jeo-dashicons', get_template_directory_uri() . '/css/dashicons.css'); + ?> + + __('Add new map', 'jeo'), 'edit_item' => __('Edit map', 'jeo'), 'new_item' => __('New map', 'jeo'), - 'view_item' => __('View map'), + 'view_item' => __('View map', 'jeo'), 'search_items' => __('Search maps', 'jeo'), 'not_found' => __('No map found', 'jeo'), 'not_found_in_trash' => __('No map found in the trash', 'jeo'), @@ -202,7 +219,8 @@ function register_post_types() { 'supports' => array( 'title'), 'public' => true, 'show_ui' => true, - 'show_in_menu' => false, + 'show_in_menu' => true, + 'menu_position' => 4, 'exclude_from_search' => true, 'rewrite' => array('slug' => 'mapgroup', 'with_front' => false), 'capability_type' => 'page' @@ -212,8 +230,8 @@ function register_post_types() { } function admin_menu() { - add_submenu_page('edit.php?post_type=map', __('Map groups', 'jeo'), __('Map groups', 'jeo'), 'edit_posts', 'edit.php?post_type=map-group'); - add_submenu_page('edit.php?post_type=map', __('Add new group', 'jeo'), __('Add new map group', 'jeo'), 'edit_posts', 'post-new.php?post_type=map-group'); + //add_theme_page(__('Map groups', 'jeo'), __('Map groups', 'jeo'), 'edit_posts', 'edit.php?post_type=map-group'); + //add_theme_page(__('Add new group', 'jeo'), __('Add new map group', 'jeo'), 'edit_posts', 'post-new.php?post_type=map-group'); } function mapped_post_types() { @@ -726,16 +744,16 @@ function qtranslate_admin_url($url, $path) { $jeo = new JEO(); -require_once(TEMPLATEPATH . '/inc/markers.php'); -require_once(TEMPLATEPATH . '/inc/ui.php'); +require_once(get_template_directory() . '/inc/markers.php'); +require_once(get_template_directory() . '/inc/ui.php'); // GeoJSON API -require_once(TEMPLATEPATH . '/inc/api.php'); +require_once(get_template_directory() . '/inc/api.php'); // Embed functionality -require_once(TEMPLATEPATH . '/inc/embed.php'); +require_once(get_template_directory() . '/inc/embed.php'); // Metaboxes -require_once(TEMPLATEPATH . '/metaboxes/metaboxes.php'); -require_once(TEMPLATEPATH . '/inc/featured.php'); -include_once(TEMPLATEPATH . '/inc/range-slider.php'); +require_once(get_template_directory() . '/metaboxes/metaboxes.php'); +require_once(get_template_directory() . '/inc/featured.php'); +include_once(get_template_directory() . '/inc/range-slider.php'); /* * JEO functions api diff --git a/inc/js/jeo.js b/inc/js/jeo.js index 26aa9f4..2c98364 100644 --- a/inc/js/jeo.js +++ b/inc/js/jeo.js @@ -327,7 +327,7 @@ var jeo = {}; if(!$detailsContainer.hasClass('clearfix')) $detailsContainer.addClass('clearfix'); - map.$.find('.map-details-link').unbind().click(function() { + map.$.on('click', '.map-details-link', function() { $detailsContainer.append($('
    ×' + full + '
    ')); $detailsContainer.find('.map-details-page .close, .map-nav a').click(function() { $detailsContainer.find('.map-details-page').remove(); diff --git a/inc/js/markers.js b/inc/js/markers.js index 24ebc9a..091e00e 100644 --- a/inc/js/markers.js +++ b/inc/js/markers.js @@ -47,12 +47,14 @@ }, onEachFeature: function(f, l) { + + var markerId = f.properties.marker.markerId ? f.properties.marker.markerId : f.properties.marker.iconUrl; - if(icons[f.properties.marker.markerId]) { - var fIcon = icons[f.properties.marker.markerId]; + if(icons[markerId]) { + var fIcon = icons[markerId]; } else { var fIcon = new icon(f.properties.marker); - icons[f.properties.marker.markerId] = fIcon; + icons[markerId] = fIcon; } l.setIcon(fIcon); diff --git a/inc/js/share-widget.js b/inc/js/share-widget.js index 81ab0ab..834b36f 100644 --- a/inc/js/share-widget.js +++ b/inc/js/share-widget.js @@ -247,6 +247,7 @@ if (!Array.prototype.indexOf) { embed.lat = parseFloat($('iframe').contents().find('#latitude').val()) embed.lon = parseFloat($('iframe').contents().find('#longitude').val()); embed.zoom = parseInt($('iframe').contents().find('#zoom').val()); + embed.embedTitle = $('iframe').contents().find('#embed-title').text(); $('.zoom .val').text(embed.zoom); $('.latitude .val').text(embed.lat); @@ -259,6 +260,12 @@ if (!Array.prototype.indexOf) { }); + function getEmbedTitle() { + + return $('#iframe').contents().find('#embed-title').text(); + + } + $('.default-centerzoom').click(function() { embed.lat = embed.lon = embed.zoom = undefined; @@ -303,6 +310,7 @@ if (!Array.prototype.indexOf) { updateOutput(); var share_embed = $.extend({}, embed); + var title = getEmbedTitle(); share_embed.width = undefined; share_embed.height = undefined; @@ -319,7 +327,7 @@ if (!Array.prototype.indexOf) { } else if($(this).hasClass('twitter')) { - window.open('http://twitter.com/share?url=' + share_url + '&', + window.open('http://twitter.com/share?url=' + share_url + '&text=' + title, 'twitterwindow', 'height=450, width=550, top='+($(window).height()/2 - 225) +', left='+$(window).width()/2 +', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0'); diff --git a/inc/marker-icons.php b/inc/marker-icons.php index c60e3e9..cd2bbe8 100644 --- a/inc/marker-icons.php +++ b/inc/marker-icons.php @@ -196,7 +196,8 @@ function register_post_type() { 'supports' => array('title'), 'public' => false, 'show_ui' => true, - 'show_in_menu' => false + 'show_in_menu' => true, + 'menu_position' => 4 ); register_post_type($this->post_type, $args); @@ -248,6 +249,10 @@ function marker_custom_column_styles() { .wp-list-table #marker { width: 150px; } #the-list .marker { text-align: center; font-weight: bold; padding-bottom: 10px; } #the-list .marker img { display: block; margin: 10px auto; } + #adminmenu #menu-posts-post_type; ?>.menu-icon-post div.wp-menu-image:before { + font-family: 'jeo-dashicons' !important; + content: '\e608'; + } parent_base == 'edit' && $screen->post_type == 'marker-icon') { + if($screen->post_type == 'marker-icon') { ?> - \ No newline at end of file + diff --git a/functions.php b/functions.php index bef038c..9beedf7 100644 --- a/functions.php +++ b/functions.php @@ -41,8 +41,7 @@ function jeo_setup() { 'id' => 'front_page', 'before_title' => '

    ', 'after_title' => '

    ' - )); - + )); } add_action('after_setup_theme', 'jeo_setup'); @@ -57,6 +56,10 @@ function jeo_theme_scripts() { wp_register_script('jquery-isotope', get_template_directory_uri() . '/lib/jquery.isotope.min.js', array('jquery'), '1.5.25'); wp_register_script('jeo-site', get_template_directory_uri() . '/js/site.js', array('jquery', 'jquery-isotope')); + + // by mohjak + wp_register_script('d3.v4.min.js', 'https://ajax.googleapis.com/ajax/libs/d3js/4.13.0/d3.min.js', array(), '4.13.0', true); + } add_action('wp_enqueue_scripts', 'jeo_theme_scripts', 5); @@ -68,14 +71,17 @@ function jeo_enqueue_theme_scripts() { wp_enqueue_script('jeo-site'); if (is_singular()) - wp_enqueue_script( "comment-reply" ); + wp_enqueue_script( "comment-reply" ); + // by mohjak + wp_enqueue_script('d3.v4.min.js'); } add_action('wp_enqueue_scripts', 'jeo_enqueue_theme_scripts', 12); function jeo_flush_rewrite() { - global $pagenow; - if(is_admin() && array_key_exists('activated', $_REQUEST) && $_REQUEST['activated'] && $pagenow == 'themes.php') { + global $pagenow; + # by mohjak: 2019-11-21 issue#115 + if(is_admin() && isset($_REQUEST['activated']) && $_REQUEST['activated'] && $pagenow == 'themes.php') { global $wp_rewrite; $wp_rewrite->init(); $wp_rewrite->flush_rules(); diff --git a/inc/admin/admin-page-framework.php b/inc/admin/admin-page-framework.php index 7120e90..14b9400 100644 --- a/inc/admin/admin-page-framework.php +++ b/inc/admin/admin-page-framework.php @@ -883,7 +883,7 @@ protected function RenderPage( $strPageSlug, $strTabSlug=null ) {
    arrIcons[$strPageSlug] ? '

    ' : get_screen_icon(); + $strHeader .= $this->arrIcons[$strPageSlug] ? '

    ' : ''; // Page heading tabs $strHeader .= ( $this->bShowPageHeadingTabs ) ? $this->AddPageHeadingTabs( $strPageSlug ) : '

    ' . $this->arrPageTitles[$strPageSlug] . '

    '; @@ -2341,7 +2341,7 @@ protected function GetHiddenField() { protected function GetSelectField() { // The label key must be an array for the select type. - if ( ! is_array( $this->arrField['label'] ) ) exit; + if ( ! is_array( $this->arrField['label'] ) ) exit; $strOutput = ""; $strOutput .= $this->oUtil->GetCorrespondingArrayValue( $strKey, $this->arrField['pre_field'] ) diff --git a/inc/core.php b/inc/core.php index 642c1b9..f77f43f 100644 --- a/inc/core.php +++ b/inc/core.php @@ -157,7 +157,7 @@ function scripts() { if(!is_admin()) { do_action('jeo_enqueue_scripts'); - } + } } function setup_post_types() { @@ -635,8 +635,9 @@ function get_mapgroup_data($group_id = false) { $data['maps'][$map_id] = $map; $data['maps'][$map_id] += $this->get_map_data($map['id']); } - } - return apply_filters('jeo_mapgroup_data', $data, $post); + } + // by mohjak 2019-10-10 + return apply_filters('jeo_mapgroup_data', $data, isset($post) ? $post : null); } function get_map_legend($map_id = false) { diff --git a/inc/featured.php b/inc/featured.php index d9e3159..837f50b 100644 --- a/inc/featured.php +++ b/inc/featured.php @@ -60,7 +60,7 @@ function query($query) { $query_vars = $query->query_vars; - if(!$query_vars['meta_query']) + if(isset($query_vars['meta_query']) && !$query_vars['meta_query']) $query_vars['meta_query'] = array(); $query_vars['meta_query'][] = array( @@ -142,4 +142,4 @@ function jeo_is_featured($post_id = false) { function jeo_get_featured($query = false) { global $featured; return $featured->get_featured($query); -} \ No newline at end of file +} diff --git a/inc/layers.php b/inc/layers.php index 54efd26..10b0f4d 100644 --- a/inc/layers.php +++ b/inc/layers.php @@ -119,7 +119,7 @@ function meta_box_scripts() { wp_enqueue_script('underscore'); wp_enqueue_script('jquery-ui-sortable'); wp_enqueue_script('json2'); - wp_enqueue_script('knockoutjs', get_template_directory_uri() . '/lib/knockout-3.2.0.js'); + wp_enqueue_script('knockoutjs', get_template_directory_uri() . '/lib/knockout-3.5.0.js'); } function settings_box($post = false) { diff --git a/inc/marker-icons.php b/inc/marker-icons.php index cd2bbe8..a6d5142 100644 --- a/inc/marker-icons.php +++ b/inc/marker-icons.php @@ -1,6 +1,6 @@ ID; + global $post; + + // by mohjak 2019-11-21 + if ($post_id) { + $post_id = $post_id; + } else { + if ($post !== null) { + $post_id = $post->ID; + } + } + // $post_id = $post_id ? $post_id : $post->ID; $marker = array( 'iconUrl' => get_template_directory_uri() . '/img/marker.png', @@ -175,7 +184,7 @@ function setup_post_type() { function register_post_type() { - $labels = array( + $labels = array( 'name' => __('Marker icons', 'jeo'), 'singular_name' => __('Marker icon', 'jeo'), 'add_new' => __('Add marker icon', 'jeo'), @@ -189,7 +198,7 @@ function register_post_type() { 'menu_name' => __('Marker icons', 'jeo') ); - $args = array( + $args = array( 'labels' => $labels, 'hierarchical' => false, 'description' => __('JEO marker icons', 'jeo'), @@ -477,7 +486,10 @@ function setup_taxonomy_relationship() { } function taxonomy_form_custom_field($term) { - $term_marker_id = $this->get_term_marker_id($term->term_id); + // by mohjak 2019-11-21 + if (!is_string($term)) { + $term_marker_id = $this->get_term_marker_id($term->term_id); + } ?> @@ -674,4 +686,4 @@ function jeo_get_default_marker() { function jeo_formatted_default_marker() { global $jeo_marker_icons; return $jeo_marker_icons->get_marker_formatted(); -} \ No newline at end of file +} diff --git a/inc/markers.php b/inc/markers.php index d212f0f..e9c6275 100644 --- a/inc/markers.php +++ b/inc/markers.php @@ -170,8 +170,9 @@ function query_vars($vars) { function query() { global $wp_query; - $marker_query = apply_filters('jeo_marker_base_query', $wp_query); - $query = $marker_query->query_vars; + $marker_query = apply_filters('jeo_marker_base_query', $wp_query); + // by mohjak 2019-11-24 Fix Trying to get property 'query_vars' of non-object + $query = isset($marker_query) && $marker_query ? $marker_query->query_vars : null; if(isset($query['suppress_filters'])) unset($query['suppress_filters']); @@ -188,7 +189,9 @@ function query() { $query['map_id'] = $wp_query->get('map_id'); } - if(!$query['post_type']) + // by mohjak 2019-10-01 - tag issue 2019-10-10 + // by mohjak 2019-11-24 Fix Undefined index: post_type + if(isset($query) && $query && isset($query['post_type']) && !$query['post_type']) $query['post_type'] = jeo_get_mapped_post_types(); $query['post_status'] = 'publish'; @@ -196,7 +199,8 @@ function query() { $markers_limit = $this->get_limit(); $query['posts_per_page'] = $markers_limit; if($markers_limit != -1) { - $amount = $marker_query->found_posts; + // Fix Trying to get property 'found_posts' of non-object + $amount = isset($marker_query) && $marker_query ? $marker_query->found_posts : 0; if($markers_limit > $amount) { $markers_limit = $amount; } else { @@ -685,7 +689,7 @@ function clean_geojson($post_id = false) { } else { global $wpdb; foreach($keys as $key) { - $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_key = '{$key}'", null)); + $wpdb->query($wpdb->prepare("DELETE FROM $wpdb->postmeta WHERE meta_key = '%s'", $key)); } } } diff --git a/lib/knockout-3.5.0.js b/lib/knockout-3.5.0.js new file mode 100644 index 0000000..fccfc18 --- /dev/null +++ b/lib/knockout-3.5.0.js @@ -0,0 +1,138 @@ +/*! + * Knockout JavaScript library v3.5.0 + * (c) The Knockout.js team - http://knockoutjs.com/ + * License: MIT (http://www.opensource.org/licenses/mit-license.php) + */ + +(function() {(function(p){var z=this||(0,eval)("this"),w=z.document,R=z.navigator,v=z.jQuery,H=z.JSON;v||"undefined"===typeof jQuery||(v=jQuery);(function(p){"function"===typeof define&&define.amd?define(["exports","require"],p):"object"===typeof exports&&"object"===typeof module?p(module.exports||exports):p(z.ko={})})(function(S,T){function K(a,c){return null===a||typeof a in W?a===c:!1}function X(b,c){var d;return function(){d||(d=a.a.setTimeout(function(){d=p;b()},c))}}function Y(b,c){var d;return function(){clearTimeout(d); +d=a.a.setTimeout(b,c)}}function Z(a,c){c&&"change"!==c?"beforeChange"===c?this.oc(a):this.bb(a,c):this.pc(a)}function aa(a,c){null!==c&&c.s&&c.s()}function ba(a,c){var d=this.pd,e=d[t];e.qa||(this.Pb&&this.kb[c]?(d.tc(c,a,this.kb[c]),this.kb[c]=null,--this.Pb):e.F[c]||d.tc(c,a,e.G?{da:a}:d.Zc(a)),a.Ka&&a.fd())}var a="undefined"!==typeof S?S:{};a.b=function(b,c){for(var d=b.split("."),e=a,f=0;fa.a.A(c,b)&&c.push(b)});return c},Mb:function(a, +b,c){var d=[];if(a)for(var e=0,k=a.length;ee?d&&b.push(c):d||b.splice(e,1)},Ba:g,extend:c,setPrototypeOf:d,zb:g?d:c,O:b,Ha:function(a,b,c){if(!a)return a;var d={},e;for(e in a)f.call(a,e)&&(d[e]= +b.call(c,a[e],e,a));return d},Sb:function(b){for(;b.firstChild;)a.removeNode(b.firstChild)},Xb:function(b){b=a.a.la(b);for(var c=(b[0]&&b[0].ownerDocument||w).createElement("div"),d=0,e=b.length;dq?a.setAttribute("selected",b):a.selected=b},Cb:function(a){return null===a||a===p?"":a.trim? +a.trim():a.toString().replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")},Td:function(a,b){a=a||"";return b.length>a.length?!1:a.substring(0,b.length)===b},ud:function(a,b){if(a===b)return!0;if(11===a.nodeType)return!1;if(b.contains)return b.contains(1!==a.nodeType?a.parentNode:a);if(b.compareDocumentPosition)return 16==(b.compareDocumentPosition(a)&16);for(;a&&a!=b;)a=a.parentNode;return!!a},Rb:function(b){return a.a.ud(b,b.ownerDocument.documentElement)},jd:function(b){return!!a.a.Lb(b,a.a.Rb)},P:function(a){return a&& +a.tagName&&a.tagName.toLowerCase()},zc:function(b){return a.onError?function(){try{return b.apply(this,arguments)}catch(c){throw a.onError&&a.onError(c),c;}}:b},setTimeout:function(b,c){return setTimeout(a.a.zc(b),c)},Fc:function(b){setTimeout(function(){a.onError&&a.onError(b);throw b;},0)},H:function(b,c,d){var e=a.a.zc(d);d=k[c];if(a.options.useOnlyNativeEvents||d||!v)if(d||"function"!=typeof b.addEventListener)if("undefined"!=typeof b.attachEvent){var f=function(a){e.call(b,a)},l="on"+c;b.attachEvent(l, +f);a.a.I.za(b,function(){b.detachEvent(l,f)})}else throw Error("Browser doesn't support addEventListener or attachEvent");else b.addEventListener(c,e,!1);else r||(r="function"==typeof v(b).on?"on":"bind"),v(b)[r](c,e)},Fb:function(b,c){if(!b||!b.nodeType)throw Error("element must be a DOM node when calling triggerEvent");var d;"input"===a.a.P(b)&&b.type&&"click"==c.toLowerCase()?(d=b.type,d="checkbox"==d||"radio"==d):d=!1;if(a.options.useOnlyNativeEvents||!v||d)if("function"==typeof w.createEvent)if("function"== +typeof b.dispatchEvent)d=w.createEvent(l[c]||"HTMLEvents"),d.initEvent(c,!0,!0,z,0,0,0,0,0,!1,!1,!1,!1,0,b),b.dispatchEvent(d);else throw Error("The supplied element doesn't support dispatchEvent");else if(d&&b.click)b.click();else if("undefined"!=typeof b.fireEvent)b.fireEvent("on"+c);else throw Error("Browser doesn't support triggering events");else v(b).trigger(c)},c:function(b){return a.N(b)?b():b},$b:function(b){return a.N(b)?b.w():b},Eb:function(b,c,d){var k;c&&("object"===typeof b.classList? +(k=b.classList[d?"add":"remove"],a.a.C(c.match(n),function(a){k.call(b.classList,a)})):"string"===typeof b.className.baseVal?e(b.className,"baseVal",c,d):e(b,"className",c,d))},Ab:function(b,c){var d=a.a.c(c);if(null===d||d===p)d="";var e=a.h.firstChild(b);!e||3!=e.nodeType||a.h.nextSibling(e)?a.h.ua(b,[b.ownerDocument.createTextNode(d)]):e.data=d;a.a.zd(b)},Xc:function(a,b){a.name=b;if(7>=q)try{var c=a.name.replace(/[&<>'"]/g,function(a){return"&#"+a.charCodeAt(0)+";"});a.mergeAttributes(w.createElement(""),!1)}catch(d){}},zd:function(a){9<=q&&(a=1==a.nodeType?a:a.parentNode,a.style&&(a.style.zoom=a.style.zoom))},vd:function(a){if(q){var b=a.style.width;a.style.width=0;a.style.width=b}},Od:function(b,c){b=a.a.c(b);c=a.a.c(c);for(var d=[],e=b;e<=c;e++)d.push(e);return d},la:function(a){for(var b=[],c=0,d=a.length;c",""],d=[3,"","
    "],e=[1,""],f={thead:c,tbody:c,tfoot:c,tr:[2,"","
    "],td:d,th:d,option:e,optgroup:e},g=8>=a.a.W;a.a.ta=function(c,d){var e;if(v)if(v.parseHTML)e=v.parseHTML(c,d)||[];else{if((e=v.clean([c],d))&&e[0]){for(var k=e[0];k.parentNode&&11!==k.parentNode.nodeType;)k=k.parentNode; +k.parentNode&&k.parentNode.removeChild(k)}}else{(e=d)||(e=w);var k=e.parentWindow||e.defaultView||z,q=a.a.Cb(c).toLowerCase(),n=e.createElement("div"),r;r=(q=q.match(/^(?:\x3c!--.*?--\x3e\s*?)*?<([a-z]+)[\s>]/))&&f[q[1]]||b;q=r[0];r="ignored
    "+r[1]+c+r[2]+"
    ";"function"==typeof k.innerShiv?n.appendChild(k.innerShiv(r)):(g&&e.body.appendChild(n),n.innerHTML=r,g&&n.parentNode.removeChild(n));for(;q--;)n=n.lastChild;e=a.a.la(n.lastChild.childNodes)}return e};a.a.Ld=function(b,c){var d=a.a.ta(b, +c);return d.length&&d[0].parentElement||a.a.Xb(d)};a.a.dc=function(b,c){a.a.Sb(b);c=a.a.c(c);if(null!==c&&c!==p)if("string"!=typeof c&&(c=c.toString()),v)v(b).html(c);else for(var d=a.a.ta(c,b.ownerDocument),e=0;eb){if(5E3<= +++c){h=f;a.a.Fc(Error("'Too much recursion' after processing "+c+" task groups."));break}b=f}try{d()}catch(g){a.a.Fc(g)}}}function c(){b();h=f=e.length=0}var d,e=[],f=0,g=1,h=0;z.MutationObserver?d=function(a){var b=w.createElement("div");(new MutationObserver(a)).observe(b,{attributes:!0});return function(){b.classList.toggle("foo")}}(c):d=w&&"onreadystatechange"in w.createElement("script")?function(a){var b=w.createElement("script");b.onreadystatechange=function(){b.onreadystatechange=null;w.documentElement.removeChild(b); +b=null;a()};w.documentElement.appendChild(b)}:function(a){setTimeout(a,0)};return{scheduler:d,yb:function(b){f||a.ma.scheduler(c);e[f++]=b;return g++},cancel:function(a){a=a-(g-f);a>=h&&ad[0]?g+d[0]:d[0]),g);for(var g=1===q?g:Math.min(c+(d[1]||0),g),q=c+q-2,m=Math.max(g,q),U=[],L=[],p=2;cc;c++)b=b();return b})};a.toJSON=function(b,c,d){b=a.$c(b);return a.a.fc(b,c,d)};d.prototype={constructor:d,save:function(b, +c){var d=a.a.A(this.keys,b);0<=d?this.values[d]=c:(this.keys.push(b),this.values.push(c))},get:function(b){b=a.a.A(this.keys,b);return 0<=b?this.values[b]:p}}})();a.b("toJS",a.$c);a.b("toJSON",a.toJSON);a.Vd=function(b,c,d){function e(c){var e=a.wb(b,d).extend({Ga:"always"}),h=e.subscribe(function(a){a&&(h.s(),c(a))});e.notifySubscribers(e.w());return h}return"function"!==typeof Promise||c?e(c.bind(d)):new Promise(e)};a.b("when",a.Vd);(function(){a.u={L:function(b){switch(a.a.P(b)){case "option":return!0=== +b.__ko__hasDomDataOptionValue__?a.a.g.get(b,a.f.options.Yb):7>=a.a.W?b.getAttributeNode("value")&&b.getAttributeNode("value").specified?b.value:b.text:b.value;case "select":return 0<=b.selectedIndex?a.u.L(b.options[b.selectedIndex]):p;default:return b.value}},ya:function(b,c,d){switch(a.a.P(b)){case "option":"string"===typeof c?(a.a.g.set(b,a.f.options.Yb,p),"__ko__hasDomDataOptionValue__"in b&&delete b.__ko__hasDomDataOptionValue__,b.value=c):(a.a.g.set(b,a.f.options.Yb,c),b.__ko__hasDomDataOptionValue__= +!0,b.value="number"===typeof c?c:"");break;case "select":if(""===c||null===c)c=p;for(var e=-1,f=0,g=b.options.length,h;f=h){c.push(q&&n.length?{key:q,value:n.join("")}:{unknown:q||n.join("")});q=h=0;n=[];continue}}else if(58===u){if(!h&&!q&&1===n.length){q=n.pop();continue}}else if(47===u&&1arguments.length){if(b=w.body,!b)throw Error("ko.applyBindings: could not find document.body; has the document been loaded?");}else if(!b||1!==b.nodeType&&8!==b.nodeType)throw Error("ko.applyBindings: first parameter should be your view model; second parameter should be a DOM node"); +l(n(a,c),b)};a.Cc=function(b){return!b||1!==b.nodeType&&8!==b.nodeType?p:a.Sd(b)};a.Dc=function(b){return(b=a.Cc(b))?b.$data:p};a.b("bindingHandlers",a.f);a.b("bindingEvent",a.j);a.b("bindingEvent.subscribe",a.j.subscribe);a.b("bindingEvent.startPossiblyAsyncContentBinding",a.j.Bb);a.b("applyBindings",a.uc);a.b("applyBindingsToDescendants",a.Pa);a.b("applyBindingAccessorsToNode",a.eb);a.b("applyBindingsToNode",a.kd);a.b("contextFor",a.Cc);a.b("dataFor",a.Dc)})();(function(b){function c(c,e){var l= +Object.prototype.hasOwnProperty.call(f,c)?f[c]:b,k;l?l.subscribe(e):(l=f[c]=new a.R,l.subscribe(e),d(c,function(b,d){var e=!(!d||!d.synchronous);g[c]={definition:b,Fd:e};delete f[c];k||e?l.notifySubscribers(b):a.ma.yb(function(){l.notifySubscribers(b)})}),k=!0)}function d(a,b){e("getConfig",[a],function(c){c?e("loadComponent",[a,c],function(a){b(a,c)}):b(null,null)})}function e(c,d,f,k){k||(k=a.i.loaders.slice(0));var g=k.shift();if(g){var n=g[c];if(n){var r=!1;if(n.apply(g,d.concat(function(a){r? +f(null):null!==a?f(a):e(c,d,f,k)}))!==b&&(r=!0,!g.suppressLoaderExceptions))throw Error("Component loaders must supply values by invoking the callback, not by returning values synchronously.");}else e(c,d,f,k)}else f(null)}var f={},g={};a.i={get:function(d,e){var f=Object.prototype.hasOwnProperty.call(g,d)?g[d]:b;f?f.Fd?a.v.K(function(){e(f.definition)}):a.ma.yb(function(){e(f.definition)}):c(d,e)},Ac:function(a){delete g[a]},nc:e};a.i.loaders=[];a.b("components",a.i);a.b("components.get",a.i.get); +a.b("components.clearCachedDefinition",a.i.Ac)})();(function(){function b(b,c,d,e){function g(){0===--A&&e(h)}var h={},A=2,u=d.template;d=d.viewModel;u?f(c,u,function(c){a.i.nc("loadTemplate",[b,c],function(a){h.template=a;g()})}):g();d?f(c,d,function(c){a.i.nc("loadViewModel",[b,c],function(a){h[m]=a;g()})}):g()}function c(a,b,d){if("function"===typeof b)d(function(a){return new b(a)});else if("function"===typeof b[m])d(b[m]);else if("instance"in b){var e=b.instance;d(function(){return e})}else"viewModel"in +b?c(a,b.viewModel,d):a("Unknown viewModel value: "+b)}function d(b){switch(a.a.P(b)){case "script":return a.a.ta(b.text);case "textarea":return a.a.ta(b.value);case "template":if(e(b.content))return a.a.Ca(b.content.childNodes)}return a.a.Ca(b.childNodes)}function e(a){return z.DocumentFragment?a instanceof DocumentFragment:a&&11===a.nodeType}function f(a,b,c){"string"===typeof b.require?T||z.require?(T||z.require)([b.require],c):a("Uses require, but no AMD loader is present"):c(b)}function g(a){return function(b){throw Error("Component '"+ +a+"': "+b);}}var h={};a.i.register=function(b,c){if(!c)throw Error("Invalid configuration for "+b);if(a.i.sb(b))throw Error("Component "+b+" is already registered");h[b]=c};a.i.sb=function(a){return Object.prototype.hasOwnProperty.call(h,a)};a.i.unregister=function(b){delete h[b];a.i.Ac(b)};a.i.Ec={getConfig:function(b,c){c(a.i.sb(b)?h[b]:null)},loadComponent:function(a,c,d){var e=g(a);f(e,c,function(c){b(a,e,c,d)})},loadTemplate:function(b,c,f){b=g(b);if("string"===typeof c)f(a.a.ta(c));else if(c instanceof +Array)f(c);else if(e(c))f(a.a.la(c.childNodes));else if(c.element)if(c=c.element,z.HTMLElement?c instanceof HTMLElement:c&&c.tagName&&1===c.nodeType)f(d(c));else if("string"===typeof c){var h=w.getElementById(c);h?f(d(h)):b("Cannot find element with ID "+c)}else b("Unknown element type: "+c);else b("Unknown template value: "+c)},loadViewModel:function(a,b,d){c(g(a),b,d)}};var m="createViewModel";a.b("components.register",a.i.register);a.b("components.isRegistered",a.i.sb);a.b("components.unregister", +a.i.unregister);a.b("components.defaultLoader",a.i.Ec);a.i.loaders.push(a.i.Ec);a.i.cd=h})();(function(){function b(b,e){var f=b.getAttribute("params");if(f){var f=c.parseBindingsString(f,e,b,{valueAccessors:!0,bindingParams:!0}),f=a.a.Ha(f,function(c){return a.o(c,null,{l:b})}),g=a.a.Ha(f,function(c){var e=c.w();return c.ja()?a.o({read:function(){return a.a.c(c())},write:a.Ya(e)&&function(a){c()(a)},l:b}):e});Object.prototype.hasOwnProperty.call(g,"$raw")||(g.$raw=f);return g}return{$raw:{}}}a.i.getComponentNameForNode= +function(b){var c=a.a.P(b);if(a.i.sb(c)&&(-1!=c.indexOf("-")||"[object HTMLUnknownElement]"==""+b||8>=a.a.W&&b.tagName===c))return c};a.i.sc=function(c,e,f,g){if(1===e.nodeType){var h=a.i.getComponentNameForNode(e);if(h){c=c||{};if(c.component)throw Error('Cannot use the "component" binding on a custom element matching a component');var m={name:h,params:b(e,f)};c.component=g?function(){return m}:m}}return c};var c=new a.ga;9>a.a.W&&(a.i.register=function(a){return function(b){return a.apply(this, +arguments)}}(a.i.register),w.createDocumentFragment=function(b){return function(){var c=b(),f=a.i.cd,g;for(g in f);return c}}(w.createDocumentFragment))})();(function(){function b(b,c,d){c=c.template;if(!c)throw Error("Component '"+b+"' has no template");b=a.a.Ca(c);a.h.ua(d,b)}function c(a,b,c){var d=a.createViewModel;return d?d.call(a,b,c):b}var d=0;a.f.component={init:function(e,f,g,h,m){function l(){var a=k&&k.dispose;"function"===typeof a&&a.call(k);n&&n.s();q=k=n=null}var k,q,n,r=a.a.la(a.h.childNodes(e)); +a.h.Ea(e);a.a.I.za(e,l);a.o(function(){var g=a.a.c(f()),h,u;"string"===typeof g?h=g:(h=a.a.c(g.name),u=a.a.c(g.params));if(!h)throw Error("No component name specified");var p=a.j.Bb(e,m),B=q=++d;a.i.get(h,function(d){if(q===B){l();if(!d)throw Error("Unknown component '"+h+"'");b(h,d,e);var f=c(d,u,{element:e,templateNodes:r});d=p.createChildContext(f,{extend:function(a){a.$component=f;a.$componentTemplateNodes=r}});f&&f.koDescendantsComplete&&(n=a.j.subscribe(e,a.j.oa,f.koDescendantsComplete,f)); +k=f;a.Pa(d,e)}})},null,{l:e});return{controlsDescendantBindings:!0}}};a.h.ea.component=!0})();var V={"class":"className","for":"htmlFor"};a.f.attr={update:function(b,c){var d=a.a.c(c())||{};a.a.O(d,function(c,d){d=a.a.c(d);var g=c.indexOf(":"),g="lookupNamespaceURI"in b&&0=a.a.W&&c in V?(c=V[c],h?b.removeAttribute(c):b[c]=d):h||(g?b.setAttributeNS(g,c,d):b.setAttribute(c, +d));"name"===c&&a.a.Xc(b,h?"":d)})}};(function(){a.f.checked={after:["value","attr"],init:function(b,c,d){function e(){var e=b.checked,f=g();if(!a.U.rb()&&(e||!m&&!a.U.pa())){var l=a.v.K(c);if(k){var n=q?l.w():l,B=r;r=f;B!==f?e&&(a.a.Oa(n,f,!0),a.a.Oa(n,B,!1)):a.a.Oa(n,f,e);q&&a.Ya(l)&&l(n)}else h&&(f===p?f=e:e||(f=p)),a.m.$a(l,d,"checked",f,!0)}}function f(){var d=a.a.c(c()),e=g();k?(b.checked=0<=a.a.A(d,e),r=e):b.checked=h&&e===p?!!d:g()===d}var g=a.wb(function(){if(d.has("checkedValue"))return a.a.c(d.get("checkedValue")); +if(n)return d.has("value")?a.a.c(d.get("value")):b.value}),h="checkbox"==b.type,m="radio"==b.type;if(h||m){var l=c(),k=h&&a.a.c(l)instanceof Array,q=!(k&&l.push&&l.splice),n=m||k,r=k?g():p;m&&!b.name&&a.f.uniqueName.init(b,function(){return!0});a.o(e,null,{l:b});a.a.H(b,"click",e);a.o(f,null,{l:b});l=p}}};a.m.va.checked=!0;a.f.checkedValue={update:function(b,c){b.value=a.a.c(c())}}})();a.f["class"]={update:function(b,c){var d=a.a.Cb(a.a.c(c()));a.a.Eb(b,b.__ko__cssValue,!1);b.__ko__cssValue=d;a.a.Eb(b, +d,!0)}};a.f.css={update:function(b,c){var d=a.a.c(c());null!==d&&"object"==typeof d?a.a.O(d,function(c,d){d=a.a.c(d);a.a.Eb(b,c,d)}):a.f["class"].update(b,c)}};a.f.enable={update:function(b,c){var d=a.a.c(c());d&&b.disabled?b.removeAttribute("disabled"):d||b.disabled||(b.disabled=!0)}};a.f.disable={update:function(b,c){a.f.enable.update(b,function(){return!a.a.c(c())})}};a.f.event={init:function(b,c,d,e,f){var g=c()||{};a.a.O(g,function(g){"string"==typeof g&&a.a.H(b,g,function(b){var l,k=c()[g]; +if(k){try{var q=a.a.la(arguments);e=f.$data;q.unshift(e);l=k.apply(e,q)}finally{!0!==l&&(b.preventDefault?b.preventDefault():b.returnValue=!1)}!1===d.get(g+"Bubble")&&(b.cancelBubble=!0,b.stopPropagation&&b.stopPropagation())}})})}};a.f.foreach={Qc:function(b){return function(){var c=b(),d=a.a.$b(c);if(!d||"number"==typeof d.length)return{foreach:c,templateEngine:a.ba.Na};a.a.c(c);return{foreach:d.data,as:d.as,noChildContext:d.noChildContext,includeDestroyed:d.includeDestroyed,afterAdd:d.afterAdd, +beforeRemove:d.beforeRemove,afterRender:d.afterRender,beforeMove:d.beforeMove,afterMove:d.afterMove,templateEngine:a.ba.Na}}},init:function(b,c){return a.f.template.init(b,a.f.foreach.Qc(c))},update:function(b,c,d,e,f){return a.f.template.update(b,a.f.foreach.Qc(c),d,e,f)}};a.m.Ra.foreach=!1;a.h.ea.foreach=!0;a.f.hasfocus={init:function(b,c,d){function e(e){b.__ko_hasfocusUpdating=!0;var f=b.ownerDocument;if("activeElement"in f){var g;try{g=f.activeElement}catch(k){g=f.body}e=g===b}f=c();a.m.$a(f, +d,"hasfocus",e,!0);b.__ko_hasfocusLastValue=e;b.__ko_hasfocusUpdating=!1}var f=e.bind(null,!0),g=e.bind(null,!1);a.a.H(b,"focus",f);a.a.H(b,"focusin",f);a.a.H(b,"blur",g);a.a.H(b,"focusout",g);b.__ko_hasfocusLastValue=!1},update:function(b,c){var d=!!a.a.c(c());b.__ko_hasfocusUpdating||b.__ko_hasfocusLastValue===d||(d?b.focus():b.blur(),!d&&b.__ko_hasfocusLastValue&&b.ownerDocument.body.focus(),a.v.K(a.a.Fb,null,[b,d?"focusin":"focusout"]))}};a.m.va.hasfocus=!0;a.f.hasFocus=a.f.hasfocus;a.m.va.hasFocus= +"hasfocus";a.f.html={init:function(){return{controlsDescendantBindings:!0}},update:function(b,c){a.a.dc(b,c())}};(function(){function b(b,d,e){a.f[b]={init:function(b,c,h,m,l){var k,q,n={},r,p,A;if(d){m=h.get("as");var u=h.get("noChildContext");A=!(m&&u);n={as:m,noChildContext:u,exportDependencies:A}}p=(r="render"==h.get("completeOn"))||h.has(a.j.oa);a.o(function(){var h=a.a.c(c()),m=!e!==!h,u=!q,t;if(A||m!==k){p&&(l=a.j.Bb(b,l));if(m){if(!d||A)n.dataDependency=a.U.o();t=d?l.createChildContext("function"== +typeof h?h:c,n):a.U.pa()?l.extend(null,n):l}u&&a.U.pa()&&(q=a.a.Ca(a.h.childNodes(b),!0));m?(u||a.h.ua(b,a.a.Ca(q)),a.Pa(t,b)):(a.h.Ea(b),r||a.j.Ga(b,a.j.T));k=m}},null,{l:b});return{controlsDescendantBindings:!0}}};a.m.Ra[b]=!1;a.h.ea[b]=!0}b("if");b("ifnot",!1,!0);b("with",!0)})();a.f.let={init:function(b,c,d,e,f){c=f.extend(c);a.Pa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.let=!0;var Q={};a.f.options={init:function(b){if("select"!==a.a.P(b))throw Error("options binding applies only to SELECT elements"); +for(;0g)var m=a.a.g.Z(),l=a.a.g.Z(),k=function(b){var c=this.activeElement;(c=c&&a.a.g.get(c,l))&&c(b)},q=function(b,c){var d=b.ownerDocument;a.a.g.get(d,m)||(a.a.g.set(d,m,!0),a.a.H(d,"selectionchange",k));a.a.g.set(b, +l,c)};a.f.textInput={init:function(b,c,l){function k(c,d){a.a.H(b,c,d)}function m(){var d=a.a.c(c());if(null===d||d===p)d="";L!==p&&d===L?a.a.setTimeout(m,4):b.value!==d&&(x=!0,b.value=d,x=!1,v=b.value)}function t(){w||(L=b.value,w=a.a.setTimeout(B,4))}function B(){clearTimeout(w);L=w=p;var d=b.value;v!==d&&(v=d,a.m.$a(c(),l,"textInput",d))}var v=b.value,w,L,z=9==a.a.W?t:B,x=!1;g&&k("keypress",B);11>g&&k("propertychange",function(a){x||"value"!==a.propertyName||z(a)});8==g&&(k("keyup",B),k("keydown", +B));q&&(q(b,z),k("dragend",t));(!g||9<=g)&&k("input",z);5>e&&"textarea"===a.a.P(b)?(k("keydown",t),k("paste",t),k("cut",t)):11>d?k("keydown",t):4>f?(k("DOMAutoComplete",B),k("dragdrop",B),k("drop",B)):h&&"number"===b.type&&k("keydown",t);k("change",B);k("blur",B);a.o(m,null,{l:b})}};a.m.va.textInput=!0;a.f.textinput={preprocess:function(a,b,c){c("textInput",a)}}})();a.f.uniqueName={init:function(b,c){if(c()){var d="ko_unique_"+ ++a.f.uniqueName.qd;a.a.Xc(b,d)}}};a.f.uniqueName.qd=0;a.f.using={init:function(b, +c,d,e,f){var g;d.has("as")&&(g={as:d.get("as"),noChildContext:d.get("noChildContext")});c=f.createChildContext(c,g);a.Pa(c,b);return{controlsDescendantBindings:!0}}};a.h.ea.using=!0;a.f.value={after:["options","foreach"],init:function(b,c,d){var e=a.a.P(b),f="input"==e;if(!f||"checkbox"!=b.type&&"radio"!=b.type){var g=["change"],h=d.get("valueUpdate"),m=!1,l=null;h&&("string"==typeof h&&(h=[h]),a.a.gb(g,h),g=a.a.vc(g));var k=function(){l=null;m=!1;var e=c(),f=a.u.L(b);a.m.$a(e,d,"value",f)};!a.a.W|| +!f||"text"!=b.type||"off"==b.autocomplete||b.form&&"off"==b.form.autocomplete||-1!=a.a.A(g,"propertychange")||(a.a.H(b,"propertychange",function(){m=!0}),a.a.H(b,"focus",function(){m=!1}),a.a.H(b,"blur",function(){m&&k()}));a.a.C(g,function(c){var d=k;a.a.Td(c,"after")&&(d=function(){l=a.u.L(b);a.a.setTimeout(k,0)},c=c.substring(5));a.a.H(b,c,d)});var q;q=f&&"file"==b.type?function(){var d=a.a.c(c());null===d||d===p||""===d?b.value="":a.v.K(k)}:function(){var f=a.a.c(c()),g=a.u.L(b);if(null!==l&& +f===l)a.a.setTimeout(q,0);else if(f!==g||g===p)"select"===e?(g=d.get("valueAllowUnset"),a.u.ya(b,f,g),g||f===a.u.L(b)||a.v.K(k)):a.u.ya(b,f)};a.o(q,null,{l:b})}else a.eb(b,{checkedValue:c})},update:function(){}};a.m.va.value=!0;a.f.visible={update:function(b,c){var d=a.a.c(c()),e="none"!=b.style.display;d&&!e?b.style.display="":!d&&e&&(b.style.display="none")}};a.f.hidden={update:function(b,c){a.f.visible.update(b,function(){return!a.a.c(c())})}};(function(b){a.f[b]={init:function(c,d,e,f,g){return a.f.event.init.call(this, +c,function(){var a={};a[b]=d();return a},e,f,g)}}})("click");a.ca=function(){};a.ca.prototype.renderTemplateSource=function(){throw Error("Override renderTemplateSource");};a.ca.prototype.createJavaScriptEvaluatorBlock=function(){throw Error("Override createJavaScriptEvaluatorBlock");};a.ca.prototype.makeTemplateSource=function(b,c){if("string"==typeof b){c=c||w;var d=c.getElementById(b);if(!d)throw Error("Cannot find template with ID "+b);return new a.B.D(d)}if(1==b.nodeType||8==b.nodeType)return new a.B.ia(b); +throw Error("Unknown template type: "+b);};a.ca.prototype.renderTemplate=function(a,c,d,e){a=this.makeTemplateSource(a,e);return this.renderTemplateSource(a,c,d,e)};a.ca.prototype.isTemplateRewritten=function(a,c){return!1===this.allowTemplateRewriting?!0:this.makeTemplateSource(a,c).data("isRewritten")};a.ca.prototype.rewriteTemplate=function(a,c,d){a=this.makeTemplateSource(a,d);c=c(a.text());a.text(c);a.data("isRewritten",!0)};a.b("templateEngine",a.ca);a.ic=function(){function b(b,c,d,h){b=a.m.Zb(b); +for(var m=a.m.Ra,l=0;l]*))?)*\s+)data-bind\s*=\s*(["'])([\s\S]*?)\3/gi, +d=/\x3c!--\s*ko\b\s*([\s\S]*?)\s*--\x3e/g;return{wd:function(b,c,d){c.isTemplateRewritten(b,d)||c.rewriteTemplate(b,function(b){return a.ic.Kd(b,c)},d)},Kd:function(a,f){return a.replace(c,function(a,c,d,e,k){return b(k,c,d,f)}).replace(d,function(a,c){return b(c,"\x3c!-- ko --\x3e","#comment",f)})},ld:function(b,c){return a.aa.Wb(function(d,h){var m=d.nextSibling;m&&m.nodeName.toLowerCase()===c&&a.eb(m,b,h)})}}}();a.b("__tr_ambtns",a.ic.ld);(function(){a.B={};a.B.D=function(b){if(this.D=b){var c= +a.a.P(b);this.Db="script"===c?1:"textarea"===c?2:"template"==c&&b.content&&11===b.content.nodeType?3:4}};a.B.D.prototype.text=function(){var b=1===this.Db?"text":2===this.Db?"value":"innerHTML";if(0==arguments.length)return this.D[b];var c=arguments[0];"innerHTML"===b?a.a.dc(this.D,c):this.D[b]=c};var b=a.a.g.Z()+"_";a.B.D.prototype.data=function(c){if(1===arguments.length)return a.a.g.get(this.D,b+c);a.a.g.set(this.D,b+c,arguments[1])};var c=a.a.g.Z();a.B.D.prototype.nodes=function(){var b=this.D; +if(0==arguments.length){var e=a.a.g.get(b,c)||{},f=e.jb||(3===this.Db?b.content:4===this.Db?b:p);if(!f||e.hd)if(e=this.text())f=a.a.Ld(e,b.ownerDocument),this.text(""),a.a.g.set(b,c,{jb:f,hd:!0});return f}a.a.g.set(b,c,{jb:arguments[0]})};a.B.ia=function(a){this.D=a};a.B.ia.prototype=new a.B.D;a.B.ia.prototype.constructor=a.B.ia;a.B.ia.prototype.text=function(){if(0==arguments.length){var b=a.a.g.get(this.D,c)||{};b.jc===p&&b.jb&&(b.jc=b.jb.innerHTML);return b.jc}a.a.g.set(this.D,c,{jc:arguments[0]})}; +a.b("templateSources",a.B);a.b("templateSources.domElement",a.B.D);a.b("templateSources.anonymousTemplate",a.B.ia)})();(function(){function b(b,c,d){var e;for(c=a.h.nextSibling(c);b&&(e=b)!==c;)b=a.h.nextSibling(e),d(e,b)}function c(c,d){if(c.length){var e=c[0],f=c[c.length-1],g=e.parentNode,h=a.ga.instance,m=h.preprocessNode;if(m){b(e,f,function(a,b){var c=a.previousSibling,d=m.call(h,a);d&&(a===e&&(e=d[0]||b),a===f&&(f=d[d.length-1]||c))});c.length=0;if(!e)return;e===f?c.push(e):(c.push(e,f),a.a.Ua(c, +g))}b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.uc(d,b)});b(e,f,function(b){1!==b.nodeType&&8!==b.nodeType||a.aa.bd(b,[d])});a.a.Ua(c,g)}}function d(a){return a.nodeType?a:0a.a.W?0:b.nodes)?b.nodes():null)return a.a.la(c.cloneNode(!0).childNodes);b=b.text();return a.a.ta(b,e)};a.ba.Na=new a.ba;a.ec(a.ba.Na);a.b("nativeTemplateEngine",a.ba);(function(){a.Za=function(){var a=this.Gd=function(){if(!v|| +!v.tmpl)return 0;try{if(0<=v.tmpl.tag.tmpl.open.toString().indexOf("__"))return 2}catch(a){}return 1}();this.renderTemplateSource=function(b,e,f,g){g=g||w;f=f||{};if(2>a)throw Error("Your version of jQuery.tmpl is too old. Please upgrade to jQuery.tmpl 1.0.0pre or later.");var h=b.data("precompiled");h||(h=b.text()||"",h=v.template(null,"{{ko_with $item.koBindingContext}}"+h+"{{/ko_with}}"),b.data("precompiled",h));b=[e.$data];e=v.extend({koBindingContext:e},f.templateOptions);e=v.tmpl(h,b,e);e.appendTo(g.createElement("div")); +v.fragments={};return e};this.createJavaScriptEvaluatorBlock=function(a){return"{{ko_code ((function() { return "+a+" })()) }}"};this.addTemplate=function(a,b){w.write(" +
    +
    +
    +
    + +

    + +

    +
    + + +
    + */ ?> +
    +
    + +
    +
    +
    +
    + +
    +
    +
    + +
    +
    + ID, 'publisher', '', ', ', ': '); ?> +
    +
    + + + +
    +
    +
    +
    + +
    + + + +
    add_data('leaflet-ie', 'conditional', 'lte IE 8'); wp_enqueue_style('leaflet-ie'); - // MAPBOX - wp_register_script('mapbox-js', get_template_directory_uri() . '/lib/mapbox/mapbox.standalone.js', array('leaflet'), '2.2.1'); - wp_enqueue_style('mapbox-js', get_template_directory_uri() . '/lib/mapbox/mapbox.standalone.css'); + // MAPBOX by mohjak + + // 3.3.1 + /* + wp_register_script('mapbox-js', 'https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.standalone.js', array('leaflet'), '3.3.1'); + wp_enqueue_style('mapbox-css', 'https://api.mapbox.com/mapbox.js/v3.3.1/mapbox.css', array(), '3.3.1'); + */ + // 3.3.0 + /* + wp_register_script('mapbox-js', 'https://api.mapbox.com/mapbox.js/v3.3.0/mapbox.standalone.js', array('leaflet'), '3.3.0'); + wp_enqueue_style('mapbox-css', 'https://api.mapbox.com/mapbox.js/v3.3.0/mapbox.css', array(), '3.3.0'); + */ + + // 3.2.1 + /* + wp_register_script('mapbox-js', get_template_directory_uri() . '/lib/mapbox/mapbox.js', array('leaflet'), '3.2.1'); + wp_enqueue_style('mapbox-css', get_template_directory_uri() . '/lib/mapbox/mapbox.css', array(), '3.2.1'); + */ + + /* + wp_register_script('mapbox-js', 'https://api.mapbox.com/mapbox.js/v3.2.1/mapbox.js', array('leaflet'), '3.2.1'); + wp_enqueue_style('mapbox-css', 'https://api.mapbox.com/mapbox.js/v3.2.1/mapbox.css', array(), '3.2.1')); + */ + + /* + wp_register_script('mapbox-js', 'https://api.mapbox.com/mapbox.js/v2.4.0/mapbox.js', array('cartodb-js'), '2.4.0'); + wp_enqueue_style('mapbox-css', 'https://api.mapbox.com/mapbox.js/v2.4.0/mapbox.css', array(), '2.4.0'); + */ + + // 2.4.0 + wp_register_script('mapbox-js', get_template_directory_uri() . '/lib/mapbox.js-bower-2.4.0/mapbox.standalone.js', array('leaflet'), '2.4.0'); + wp_enqueue_style('mapbox-css', get_template_directory_uri() . '/lib/mapbox.js-bower-2.4.0/mapbox.css', array(), '2.4.0'); + + // 2.2.1 + /* + wp_register_script('mapbox-js', 'https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.standalone.js', array('leaflet'), '2.2.1'); + wp_enqueue_style('mapbox-css', 'https://api.mapbox.com/mapbox.js/v2.2.1/mapbox.css', array(), '2.2.1'); + */ wp_register_script('imagesloaded', get_template_directory_uri() . '/lib/jquery.imagesloaded.min.js', array('jquery')); wp_register_script('underscore', get_template_directory_uri() . '/lib/underscore-min.js', array(), '1.4.3'); @@ -119,7 +152,7 @@ function scripts() { /* * Local */ - wp_enqueue_script('jeo', get_template_directory_uri() . '/inc/js/jeo.js', array('mapbox-js', 'underscore', 'jquery'), '0.4.3'); + wp_enqueue_script('jeo', get_template_directory_uri() . '/inc/js/jeo.js', array('mapbox-js', 'underscore', 'jquery'), '0.4.4'); wp_enqueue_script('jeo.groups', get_template_directory_uri() . '/inc/js/groups.js', array('jeo'), '0.2.7'); diff --git a/inc/js/jeo.js b/inc/js/jeo.js index 558239d..3edf0c7 100644 --- a/inc/js/jeo.js +++ b/inc/js/jeo.js @@ -1,22 +1,22 @@ -if(jeo_settings.mapbox_access_token) { +if (jeo_settings.mapbox_access_token) { L.mapbox.accessToken = jeo_settings.mapbox_access_token; } var jeo = {}; -(function($) { +(function ($) { - jeo = function(conf, callback) { + jeo = function (conf, callback) { - var _init = function() { - if(conf.mainMap) + var _init = function () { + if (conf.mainMap) $('body').addClass('loading-map'); - if(conf.admin) { // is admin panel + if (conf.admin) { // is admin panel return jeo.build(conf, callback); } - if(conf.dataReady || !conf.postID) { // data ready + if (conf.dataReady || !conf.postID) { // data ready return jeo.build(conf, callback); } @@ -25,14 +25,14 @@ var jeo = {}; action: 'map_data', map_id: conf.postID }, - function(map_data) { + function (map_data) { mapConf = jeo.parseConf(map_data); mapConf = _.extend(mapConf, conf); return jeo.build(mapConf, callback); }); } - if($.isReady) { + if ($.isReady) { return _init(); } else { return $(document).ready(_init); @@ -42,7 +42,7 @@ var jeo = {}; jeo.maps = {}; - jeo.build = function(conf, callback) { + jeo.build = function (conf, callback) { /* * Map settings @@ -52,28 +52,28 @@ var jeo = {}; maxZoom: 17, minZoom: 0, zoom: 2, - center: [0,0], + center: [0, 0], attributionControl: false }; - if(conf.center && !isNaN(conf.center[0])) + if (conf.center && !isNaN(conf.center[0])) options.center = conf.center; - if(conf.zoom && !isNaN(conf.zoom)) + if (conf.zoom && !isNaN(conf.zoom)) options.zoom = conf.zoom; - if(conf.bounds) + if (conf.bounds) options.maxBounds = conf.bounds; - if(conf.maxZoom && !isNaN(conf.maxZoom) && !conf.preview) + if (conf.maxZoom && !isNaN(conf.maxZoom) && !conf.preview) options.maxZoom = conf.maxZoom; - if(conf.minZoom && !isNaN(conf.minZoom) && !conf.preview) + if (conf.minZoom && !isNaN(conf.minZoom) && !conf.preview) options.minZoom = conf.minZoom; var map; - if(!conf.containerID) + if (!conf.containerID) conf.containerID = 'map_' + conf.postID + '_' + conf.count; var map_id = conf.containerID; @@ -81,7 +81,7 @@ var jeo = {}; // use mapbox map for more map resources map = L.mapbox.map(map_id, null, options); - if(conf.mainMap) + if (conf.mainMap) jeo.map = map; /* @@ -90,9 +90,9 @@ var jeo = {}; // store jquery node map.$ = $('#' + map_id); - if(conf.mainMap) { + if (conf.mainMap) { $('body').removeClass('loading-map'); - if(!$('body').hasClass('displaying-map')) + if (!$('body').hasClass('displaying-map')) $('body').addClass('displaying-map'); } @@ -101,30 +101,30 @@ var jeo = {}; // store map id map.map_id = map_id; - if(conf.postID) + if (conf.postID) map.postID = conf.postID; // layers jeo.loadLayers(map, jeo.parseLayers(map, conf.layers)); // set bounds - if(conf.fitBounds instanceof L.LatLngBounds) + if (conf.fitBounds instanceof L.LatLngBounds) map.fitBounds(conf.fitBounds); // Handlers - if(conf.disableHandlers) { + if (conf.disableHandlers) { // mousewheel - if(conf.disableHandlers.mousewheel) + if (conf.disableHandlers.mousewheel) map.scrollWheelZoom.disable(); } /* * Legends */ - if(conf.legend) { + if (conf.legend) { map.legendControl.addLegend(conf.legend); } - if(conf.legend_full) + if (conf.legend_full) jeo.enableDetails(map, conf.legend, conf.legend_full); /* @@ -135,13 +135,13 @@ var jeo = {}; /* * Geocode */ - if(map.conf.geocode) + if (map.conf.geocode) map.addControl(new jeo.geocode()); /* * Filter layers */ - if(map.conf.filteringLayers) + if (map.conf.filteringLayers) map.addControl(new jeo.filterLayers()); /* @@ -149,13 +149,13 @@ var jeo = {}; */ // conf passed callbacks - if(typeof conf.callbacks === 'function') + if (typeof conf.callbacks === 'function') conf.callbacks(map); // map is ready, do callbacks jeo.runCallbacks('mapReady', [map]); - if(typeof callback === 'function') + if (typeof callback === 'function') callback(map); return map; @@ -165,34 +165,33 @@ var jeo = {}; * Utils */ - jeo.parseLayers = function(map, layers) { + jeo.parseLayers = function (map, layers) { var parsedLayers = []; - $.each(layers, function(i, layer) { + $.each(layers, function (i, layer) { - if(layer.type == 'cartodb' && layer.cartodb_type == 'viz') { + if (layer.type == 'cartodb' && layer.cartodb_type == 'viz') { var cdbOpts = { legends: false }; - if(jeo_localization.ssl) + if (jeo_localization.ssl) cdbOpts.https = true; var pLayer = cartodb.createLayer(map, layer.cartodb_viz_url, cdbOpts); - if(layer.legend) { + if (layer.legend) { pLayer._legend = layer.legend; } parsedLayers.push(pLayer); - } else if(layer.type == 'mapbox') { - + } else if (layer.type == 'mapbox') { var pLayer = L.mapbox.tileLayer(layer.mapbox_id); - if(layer.legend) { + if (layer.legend) { pLayer._legend = layer.legend; } @@ -203,18 +202,18 @@ var jeo = {}; var options = {}; - if(layer.tms) + if (layer.tms) options.tms = true; var pLayer = L.tileLayer(layer.tile_url, options); - if(layer.legend) { + if (layer.legend) { pLayer._legend = layer.legend; } parsedLayers.push(pLayer); - if(layer.utfgrid_url && layer.utfgrid_template) { + if (layer.utfgrid_url && layer.utfgrid_template) { parsedLayers.push(L.mapbox.gridLayer({ "name": layer.title, @@ -233,16 +232,16 @@ var jeo = {}; return parsedLayers; }; - jeo.loadLayers = function(map, parsedLayers) { + jeo.loadLayers = function (map, parsedLayers) { - for(var key in map.legendControl._legends) { + for (var key in map.legendControl._legends) { console.log(key); - if(key.indexOf('map-details-link') == -1) + if (key.indexOf('map-details-link') == -1) map.legendControl.removeLegend(key); } - if(map.coreLayers) { - for(var key in map.coreLayers._layers) { + if (map.coreLayers) { + for (var key in map.coreLayers._layers) { map.coreLayers.removeLayer(key); } } else { @@ -250,12 +249,12 @@ var jeo = {}; map.addLayer(map.coreLayers); } - $.each(parsedLayers, function(i, layer) { - if(layer._legend) { + $.each(parsedLayers, function (i, layer) { + if (layer._legend) { map.legendControl.addLegend(layer._legend); } layer.addTo(map.coreLayers); - if(layer._tilejson) { + if (layer._tilejson) { map.addControl(L.mapbox.gridControl(layer)); } }); @@ -263,13 +262,13 @@ var jeo = {}; return map.coreLayers; } - jeo.parseConf = function(conf) { + jeo.parseConf = function (conf) { var newConf = $.extend({}, conf); newConf.server = conf.server; - if(conf.conf) + if (conf.conf) newConf = _.extend(newConf, conf.conf); newConf.layers = []; @@ -277,23 +276,23 @@ var jeo = {}; newConf.filteringLayers.switchLayers = []; newConf.filteringLayers.swapLayers = []; - $.each(conf.layers, function(i, layer) { + $.each(conf.layers, function (i, layer) { newConf.layers.push(_.clone(layer)); - if(layer.filtering == 'switch') { + if (layer.filtering == 'switch') { var switchLayer = { ID: layer.ID, title: layer.title }; - if(layer.hidden) + if (layer.hidden) switchLayer.hidden = true; newConf.filteringLayers.switchLayers.push(switchLayer); } - if(layer.filtering == 'swap') { + if (layer.filtering == 'swap') { var swapLayer = { ID: layer.ID, title: layer.title }; - if(layer.first_swap) + if (layer.first_swap) swapLayer.first = true; newConf.filteringLayers.swapLayers.push(swapLayer); } @@ -301,7 +300,7 @@ var jeo = {}; newConf.center = [parseFloat(conf.center.lat), parseFloat(conf.center.lon)]; - if(conf.pan_limits.south && conf.pan_limits.north) { + if (conf.pan_limits.south && conf.pan_limits.north) { newConf.bounds = [ [conf.pan_limits.south, conf.pan_limits.west], [conf.pan_limits.north, conf.pan_limits.east] @@ -312,17 +311,21 @@ var jeo = {}; newConf.minZoom = parseInt(conf.min_zoom); newConf.maxZoom = parseInt(conf.max_zoom); - if(conf.geocode) + // by mohjak: added based on changes suggested here https://docs.mapbox.com/help/troubleshooting/migrate-legacy-static-tiles-api/#leaflet-implementations + newConf.tileSize = 512; + newConf.zoomOffset = -1; + + if (conf.geocode) newConf.geocode = true; newConf.disableHandlers = {}; - if(conf.disable_mousewheel) + if (conf.disable_mousewheel) newConf.disableHandlers.mousewheel = true; - if(conf.legend) + if (conf.legend) newConf.legend = conf.legend; - if(conf.legend_full) + if (conf.legend_full) newConf.legend_full = conf.legend_full; return newConf; @@ -331,8 +334,8 @@ var jeo = {}; /* * Legend page (map details) */ - jeo.enableDetails = function(map, legend, full) { - if(typeof legend === 'undefined') + jeo.enableDetails = function (map, legend, full) { + if (typeof legend === 'undefined') legend = ''; map.legendControl.removeLegend(legend); @@ -341,15 +344,15 @@ var jeo = {}; var isContentMap = map.$.parents('.content-map').length; var $detailsContainer = map.$.parents('.map-container'); - if(isContentMap) + if (isContentMap) $detailsContainer = map.$.parents('.content-map'); - if(!$detailsContainer.hasClass('clearfix')) + if (!$detailsContainer.hasClass('clearfix')) $detailsContainer.addClass('clearfix'); - map.$.on('click', '.map-details-link', function() { + map.$.on('click', '.map-details-link', function () { $detailsContainer.append($('
    ×' + full + '
    ')); - $detailsContainer.find('.map-details-page .close, .map-nav a').click(function() { + $detailsContainer.find('.map-details-page .close, .map-nav a').click(function () { $detailsContainer.find('.map-details-page').remove(); return false; }); @@ -363,24 +366,24 @@ var jeo = {}; jeo.callbacks = {}; - jeo.createCallback = function(name) { + jeo.createCallback = function (name) { jeo.callbacks[name] = []; - jeo[name] = function(callback) { + jeo[name] = function (callback) { jeo.callbacks[name].push(callback); } } - jeo.runCallbacks = function(name, args) { - if(!jeo.callbacks[name]) { + jeo.runCallbacks = function (name, args) { + if (!jeo.callbacks[name]) { return false; } - if(!jeo.callbacks[name].length) + if (!jeo.callbacks[name].length) return false; - var _run = function(callbacks) { - if(callbacks) { - _.each(callbacks, function(c, i) { - if(c instanceof Function) + var _run = function (callbacks) { + if (callbacks) { + _.each(callbacks, function (c, i) { + if (c instanceof Function) c.apply(this, args); }); } diff --git a/inc/layers.php b/inc/layers.php index 10b0f4d..f8c6411 100644 --- a/inc/layers.php +++ b/inc/layers.php @@ -235,7 +235,7 @@ function settings_box($post = false) { -

    E.g.: http://infoamazonia.cartodb.com/api/v2/viz/621d23a0-5eaa-11e4-ab03-0e853d047bba/viz.json', 'jeo'); ?>

    +

    E.g.: https://infoamazonia.cartodb.com/api/v2/viz/621d23a0-5eaa-11e4-ab03-0e853d047bba/viz.json', 'jeo'); ?>

    diff --git a/inc/markers.php b/inc/markers.php index e9c6275..9f0c12d 100644 --- a/inc/markers.php +++ b/inc/markers.php @@ -170,8 +170,8 @@ function query_vars($vars) { function query() { global $wp_query; - $marker_query = apply_filters('jeo_marker_base_query', $wp_query); - // by mohjak 2019-11-24 Fix Trying to get property 'query_vars' of non-object + $marker_query = apply_filters('jeo_marker_base_query', $wp_query); + // by mohjak 2019-11-24 Fix Trying to get property 'query_vars' of non-object $query = isset($marker_query) && $marker_query ? $marker_query->query_vars : null; if(isset($query['suppress_filters'])) unset($query['suppress_filters']); @@ -189,8 +189,8 @@ function query() { $query['map_id'] = $wp_query->get('map_id'); } - // by mohjak 2019-10-01 - tag issue 2019-10-10 - // by mohjak 2019-11-24 Fix Undefined index: post_type + // by mohjak 2019-10-01 - tag issue 2019-10-10 + // by mohjak 2019-11-24 Fix Undefined index: post_type if(isset($query) && $query && isset($query['post_type']) && !$query['post_type']) $query['post_type'] = jeo_get_mapped_post_types(); @@ -355,7 +355,7 @@ function geocode_register_scripts() { $dependencies = array('jquery'); if($this->geocode_service == 'gmaps' && $this->gmaps_api_key) { - wp_register_script('google-maps-api', 'http://maps.googleapis.com/maps/api/js?v=3&key=' . $this->gmaps_api_key . '&sensor=true'); + wp_register_script('google-maps-api', 'https://maps.googleapis.com/maps/api/js?v=3&key=' . $this->gmaps_api_key . '&sensor=true'); $dependencies[] = 'google-maps-api'; } diff --git a/inc/share-widget.php b/inc/share-widget.php index 228c579..442febf 100644 --- a/inc/share-widget.php +++ b/inc/share-widget.php @@ -156,7 +156,9 @@ function template() { } function nav($items, $args) { - $share = '
  • ' . __('Share a map', 'jeo') . '
  • '; + // $share = '
  • ' . __('Share a map', 'jeo') . '
  • '; + // by mohjak: Fix issue #267 Remove 'Share a map' from the top menu + $share = ''; return $items . $share; } @@ -179,4 +181,4 @@ function jeo_get_share_url($vars = array()) { function jeo_get_share_widget_taxonomies() { global $jeo_share_widget; return $jeo_share_widget->get_taxonomies(); -} \ No newline at end of file +} diff --git a/languages/es_ES.mo b/languages/es_ES.mo index 1b2f09a0393d2d2f9069c0fddae4cdf7c7d0663c..b0d601a5245894b46cfc58ac465364af8eae1067 100644 GIT binary patch delta 411 zcmXxgJxIeq6u|MMri!VxHWq79B)T|AB!;3;TtpW)(YeA60WR6`+F~*o?bQoEgn!g|gZR>a{)VH}ADF;zTs4fAVa5IqUc($Oc2PEN;u9aWah$ry zDO0$Qa^Nv3jVJy30;Pd2X7C!Nfd{nl5gmL+S@($<+3|;o{EHRQT*Ylw}X4@2v@)if4ZTqI@{I delta 408 zcmZ|Kze~eF6u|LIxG2QhVziV{ha!m6m0XGhiiKX7<>xAAGWb-LT4egZ?s{5\n" "Language-Team: Cardume \n" "Language: en_US\n" @@ -13,7 +13,7 @@ msgstr "" "X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c\n" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Poedit 1.5.7\n" +"X-Generator: Poedit 2.4\n" "X-Poedit-SearchPath-0: ..\n" #: ../404.php:7 @@ -89,7 +89,7 @@ msgstr "d/m/Y" #: ../content-share.php:4 ../inc/share-widget.php:150 msgid "Share a map" -msgstr "" +msgstr "Compartir un mapa" #: ../content-share.php:9 ../content-share.php:225 msgid "Share" diff --git a/lib/cartodb.js b/lib/cartodb.js index b942d87..3e1751a 100644 --- a/lib/cartodb.js +++ b/lib/cartodb.js @@ -1,6 +1,6 @@ -// CartoDB.js version: 3.15.10 -// sha: b0f743801efcdf67255637c955b8fcfc9e811f64 -!function(){var define,root=this,__prev={jQuery:root.jQuery,$:root.$,L:root.L,Mustache:root.Mustache,Backbone:root.Backbone,_:root._};!function(a,b){function c(a){return J.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}function d(a){if(!sb[a]){var b=G.body,c=J("<"+a+">").appendTo(b),d=c.css("display");c.remove(),("none"===d||""===d)&&(ob||(ob=G.createElement("iframe"),ob.frameBorder=ob.width=ob.height=0),b.appendChild(ob),pb&&ob.createElement||(pb=(ob.contentWindow||ob.contentDocument).document,pb.write((J.support.boxModel?"":"")+""),pb.close()),c=pb.createElement(a),pb.body.appendChild(c),d=J.css(c,"display"),b.removeChild(ob)),sb[a]=d}return sb[a]}function e(a,b){var c={};return J.each(vb.concat.apply([],vb.slice(0,b)),function(){c[this]=a}),c}function f(){rb=b}function g(){return setTimeout(f,0),rb=J.now()}function h(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function i(){try{return new a.XMLHttpRequest}catch(b){}}function j(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d,e,f,g,h,i,j,k,l=a.dataTypes,m={},n=l.length,o=l[0];for(d=1;n>d;d++){if(1===d)for(e in a.converters)"string"==typeof e&&(m[e.toLowerCase()]=a.converters[e]);if(g=o,o=l[d],"*"===o)o=g;else if("*"!==g&&g!==o){if(h=g+" "+o,i=m[h]||m["* "+o],!i){k=b;for(j in m)if(f=j.split(" "),(f[0]===g||"*"===f[0])&&(k=m[f[1]+" "+o])){j=m[j],j===!0?i=k:k===!0&&(i=j);break}}!i&&!k&&J.error("No conversion from "+h.replace(" "," to ")),i!==!0&&(c=i?i(c):k(j(c)))}}return c}function k(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);for(;"*"===j[0];)j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function l(a,b,c,d){if(J.isArray(b))J.each(b,function(b,e){c||Sa.test(a)?d(a,e):l(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==J.type(b))d(a,b);else for(var e in b)l(a+"["+e+"]",b[e],c,d)}function m(a,c){var d,e,f=J.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&J.extend(!0,a,e)}function n(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;for(var h,i=a[f],j=0,k=i?i.length:0,l=a===fb;k>j&&(l||!h);j++)h=i[j](c,d,e),"string"==typeof h&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=n(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=n(a,c,d,e,"*",g)),h}function o(a){return function(b,c){if("string"!=typeof b&&(c=b,b="*"),J.isFunction(c))for(var d,e,f,g=b.toLowerCase().split(bb),h=0,i=g.length;i>h;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function p(a,b,c){var d="width"===b?a.offsetWidth:a.offsetHeight,e="width"===b?1:0,f=4;if(d>0){if("border"!==c)for(;f>e;e+=2)c||(d-=parseFloat(J.css(a,"padding"+Oa[e]))||0),"margin"===c?d+=parseFloat(J.css(a,c+Oa[e]))||0:d-=parseFloat(J.css(a,"border"+Oa[e]+"Width"))||0;return d+"px"}if(d=Da(a,b),(0>d||null==d)&&(d=a.style[b]),Ka.test(d))return d;if(d=parseFloat(d)||0,c)for(;f>e;e+=2)d+=parseFloat(J.css(a,"padding"+Oa[e]))||0,"padding"!==c&&(d+=parseFloat(J.css(a,"border"+Oa[e]+"Width"))||0),"margin"===c&&(d+=parseFloat(J.css(a,c+Oa[e]))||0);return d+"px"}function q(a){var b=G.createElement("div");return Ca.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function r(a){var b=(a.nodeName||"").toLowerCase();"input"===b?s(a):"script"!==b&&"undefined"!=typeof a.getElementsByTagName&&J.grep(a.getElementsByTagName("input"),s)}function s(a){("checkbox"===a.type||"radio"===a.type)&&(a.defaultChecked=a.checked)}function t(a){return"undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll("*"):[]}function u(a,b){var c;1===b.nodeType&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),"object"===c?b.outerHTML=a.outerHTML:"input"!==c||"checkbox"!==a.type&&"radio"!==a.type?"option"===c?b.selected=a.defaultSelected:"input"===c||"textarea"===c?b.defaultValue=a.defaultValue:"script"===c&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(J.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function v(a,b){if(1===b.nodeType&&J.hasData(a)){var c,d,e,f=J._data(a),g=J._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)J.event.add(b,c,h[c][d])}g.data&&(g.data=J.extend({},g.data))}}function w(a,b){return J.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function x(a){var b=oa.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function y(a,b,c){if(b=b||0,J.isFunction(b))return J.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return J.grep(a,function(a,d){return a===b===c});if("string"==typeof b){var d=J.grep(a,function(a){return 1===a.nodeType});if(ka.test(b))return J.filter(b,d,!c);b=J.filter(b,d)}return J.grep(a,function(a,d){return J.inArray(a,b)>=0===c})}function z(a){return!a||!a.parentNode||11===a.parentNode.nodeType}function A(){return!0}function B(){return!1}function C(a,b,c){var d=b+"defer",e=b+"queue",f=b+"mark",g=J._data(a,d);g&&("queue"===c||!J._data(a,e))&&("mark"===c||!J._data(a,f))&&setTimeout(function(){!J._data(a,e)&&!J._data(a,f)&&(J.removeData(a,d,!0),g.fire())},0)}function D(a){for(var b in a)if(("data"!==b||!J.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function E(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(N,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:J.isNumeric(d)?+d:M.test(d)?J.parseJSON(d):d}catch(f){}J.data(a,c,d)}else d=b}return d}function F(a){var b,c,d=K[a]={};for(a=a.split(/\s+/),b=0,c=a.length;c>b;b++)d[a[b]]=!0;return d}var G=a.document,H=a.navigator,I=a.location,J=function(){function c(){if(!h.isReady){try{G.documentElement.doScroll("left")}catch(a){return void setTimeout(c,1)}h.ready()}}var d,e,f,g,h=function(a,b){return new h.fn.init(a,b,d)},i=a.jQuery,j=a.$,k=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,l=/\S/,m=/^\s+/,n=/\s+$/,o=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p=/^[\],:{}\s]*$/,q=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,r=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,s=/(?:^|:|,)(?:\s*\[)+/g,t=/(webkit)[ \/]([\w.]+)/,u=/(opera)(?:.*version)?[ \/]([\w.]+)/,v=/(msie) ([\w.]+)/,w=/(mozilla)(?:.*? rv:([\w.]+))?/,x=/-([a-z]|[0-9])/gi,y=/^-ms-/,z=function(a,b){return(b+"").toUpperCase()},A=H.userAgent,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,I=Array.prototype.indexOf,J={};return h.fn=h.prototype={constructor:h,init:function(a,c,d){var e,f,g,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("body"===a&&!c&&G.body)return this.context=G,this[0]=G.body,this.selector=a,this.length=1,this;if("string"==typeof a){if(e="<"!==a.charAt(0)||">"!==a.charAt(a.length-1)||a.length<3?k.exec(a):[null,a,null],e&&(e[1]||!c)){if(e[1])return c=c instanceof h?c[0]:c,i=c?c.ownerDocument||c:G,g=o.exec(a),g?h.isPlainObject(c)?(a=[G.createElement(g[1])],h.fn.attr.call(a,c,!0)):a=[i.createElement(g[1])]:(g=h.buildFragment([e[1]],[i]),a=(g.cacheable?h.clone(g.fragment):g.fragment).childNodes),h.merge(this,a);if(f=G.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=G,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return h.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),h.makeArray(a,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();return h.isArray(a)?D.apply(d,a):h.merge(d,a),d.prevObject=this,d.context=this.context,"find"===b?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return h.each(this,a,b)},ready:function(a){return h.bindReady(),f.add(a),this},eq:function(a){return a=+a,-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(h.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},h.fn.init.prototype=h.fn,h.extend=h.fn.extend=function(){var a,c,d,e,f,g,i=arguments[0]||{},j=1,k=arguments.length,l=!1;for("boolean"==typeof i&&(l=i,i=arguments[1]||{},j=2),"object"!=typeof i&&!h.isFunction(i)&&(i={}),k===j&&(i=this,--j);k>j;j++)if(null!=(a=arguments[j]))for(c in a)d=i[c],e=a[c],i!==e&&(l&&e&&(h.isPlainObject(e)||(f=h.isArray(e)))?(f?(f=!1,g=d&&h.isArray(d)?d:[]):g=d&&h.isPlainObject(d)?d:{},i[c]=h.extend(l,g,e)):e!==b&&(i[c]=e));return i},h.extend({noConflict:function(b){return a.$===h&&(a.$=j),b&&a.jQuery===h&&(a.jQuery=i),h},isReady:!1,readyWait:1,holdReady:function(a){a?h.readyWait++:h.ready(!0)},ready:function(a){if(a===!0&&!--h.readyWait||a!==!0&&!h.isReady){if(!G.body)return setTimeout(h.ready,1);if(h.isReady=!0,a!==!0&&--h.readyWait>0)return;f.fireWith(G,[h]),h.fn.trigger&&h(G).trigger("ready").off("ready")}},bindReady:function(){if(!f){if(f=h.Callbacks("once memory"),"complete"===G.readyState)return setTimeout(h.ready,1);if(G.addEventListener)G.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",h.ready,!1);else if(G.attachEvent){G.attachEvent("onreadystatechange",g),a.attachEvent("onload",h.ready);var b=!1;try{b=null==a.frameElement}catch(d){}G.documentElement.doScroll&&b&&c()}}},isFunction:function(a){return"function"===h.type(a)},isArray:Array.isArray||function(a){return"array"===h.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):J[B.call(a)]||"object"},isPlainObject:function(a){if(!a||"object"!==h.type(a)||a.nodeType||h.isWindow(a))return!1;try{if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||C.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){return"string"==typeof b&&b?(b=h.trim(b),a.JSON&&a.JSON.parse?a.JSON.parse(b):p.test(b.replace(q,"@").replace(r,"]").replace(s,""))?new Function("return "+b)():void h.error("Invalid JSON: "+b)):null},parseXML:function(c){if("string"!=typeof c||!c)return null;var d,e;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&h.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&l.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(y,"ms-").replace(x,z)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,i=g===b||h.isFunction(a);if(d)if(i){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;g>f&&c.apply(a[f++],d)!==!1;);else if(i){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;g>f&&c.call(a[f],f,a[f++])!==!1;);return a},trim:F?function(a){return null==a?"":F.call(a)}:function(a){return null==a?"":(a+"").replace(m,"").replace(n,"")},makeArray:function(a,b){var c=b||[];if(null!=a){var d=h.type(a);null==a.length||"string"===d||"function"===d||"regexp"===d||h.isWindow(a)?D.call(c,a):h.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(I)return I.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if("number"==typeof c.length)for(var f=c.length;f>e;e++)a[d++]=c[e];else for(;c[e]!==b;)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d,e=[];c=!!c;for(var f=0,g=a.length;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],i=0,j=a.length,k=a instanceof h||j!==b&&"number"==typeof j&&(j>0&&a[0]&&a[j-1]||0===j||h.isArray(a));if(k)for(;j>i;i++)e=c(a[i],i,d),null!=e&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),null!=e&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){if("string"==typeof c){var d=a[c];c=a,a=d}if(!h.isFunction(a))return b;var e=E.call(arguments,2),f=function(){return a.apply(c,e.concat(E.call(arguments)))};return f.guid=a.guid=a.guid||f.guid||h.guid++,f},access:function(a,c,d,e,f,g,i){var j,k=null==d,l=0,m=a.length;if(d&&"object"==typeof d){for(l in d)h.access(a,c,l,d[l],1,g,e);f=1}else if(e!==b){if(j=i===b&&h.isFunction(e),k&&(j?(j=c,c=function(a,b,c){return j.call(h(a),c)}):(c.call(a,e),c=null)),c)for(;m>l;l++)c(a[l],d,j?e.call(a[l],l,c(a[l],d)):e,i);f=1}return f?a:k?c.call(a):m?c(a[0],d):g},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=t.exec(a)||u.exec(a)||v.exec(a)||a.indexOf("compatible")<0&&w.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}h.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(c,d){return d&&d instanceof h&&!(d instanceof a)&&(d=a(d)),h.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(G);return a},browser:{}}),h.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),e=h.uaMatch(A),e.browser&&(h.browser[e.browser]=!0,h.browser.version=e.version),h.browser.webkit&&(h.browser.safari=!0),l.test(" ")&&(m=/^[\s\xA0]+/,n=/[\s\xA0]+$/),d=h(G),G.addEventListener?g=function(){G.removeEventListener("DOMContentLoaded",g,!1),h.ready()}:G.attachEvent&&(g=function(){"complete"===G.readyState&&(G.detachEvent("onreadystatechange",g),h.ready())}),h}(),K={};J.Callbacks=function(a){a=a?K[a]||F(a):{};var c,d,e,f,g,h,i=[],j=[],k=function(b){var c,d,e,f;for(c=0,d=b.length;d>c;c++)e=b[c],f=J.type(e),"array"===f?k(e):"function"===f&&(!a.unique||!m.has(e))&&i.push(e)},l=function(b,k){for(k=k||[],c=!a.memory||[b,k],d=!0,e=!0,h=f||0,f=0,g=i.length;i&&g>h;h++)if(i[h].apply(b,k)===!1&&a.stopOnFalse){c=!0;break}e=!1,i&&(a.once?c===!0?m.disable():i=[]:j&&j.length&&(c=j.shift(),m.fireWith(c[0],c[1])))},m={add:function(){if(i){var a=i.length;k(arguments),e?g=i.length:c&&c!==!0&&(f=a,l(c[0],c[1]))}return this},remove:function(){if(i)for(var b=arguments,c=0,d=b.length;d>c;c++)for(var f=0;f=f&&(g--,h>=f&&h--),i.splice(f--,1),!a.unique));f++);return this},has:function(a){if(i)for(var b=0,c=i.length;c>b;b++)if(a===i[b])return!0;return!1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,(!c||c===!0)&&m.disable(),this},locked:function(){return!j},fireWith:function(b,d){return j&&(e?a.once||j.push([b,d]):(!a.once||!c)&&l(b,d)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!d}};return m};var L=[].slice;J.extend({Deferred:function(a){var b,c=J.Callbacks("once memory"),d=J.Callbacks("once memory"),e=J.Callbacks("memory"),f="pending",g={resolve:c,reject:d,notify:e},h={done:c.add,fail:d.add,progress:e.add,state:function(){return f},isResolved:c.fired,isRejected:d.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return J.Deferred(function(d){J.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c,e=b[0],f=b[1];J.isFunction(e)?i[a](function(){c=e.apply(this,arguments),c&&J.isFunction(c.promise)?c.promise().then(d.resolve,d.reject,d.notify):d[f+"With"](this===i?d:this,[c])}):i[a](d[f])})}).promise()},promise:function(a){if(null==a)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({});for(b in g)i[b]=g[b].fire,i[b+"With"]=g[b].fireWith;return i.done(function(){f="resolved"},d.disable,e.lock).fail(function(){f="rejected"},c.disable,e.lock),a&&a.call(i,i),i},when:function(a){function b(a){return function(b){g[a]=arguments.length>1?L.call(arguments,0):b,i.notifyWith(j,g)}}function c(a){return function(b){d[a]=arguments.length>1?L.call(arguments,0):b,--h||i.resolveWith(i,d)}}var d=L.call(arguments,0),e=0,f=d.length,g=Array(f),h=f,i=1>=f&&a&&J.isFunction(a.promise)?a:J.Deferred(),j=i.promise();if(f>1){for(;f>e;e++)d[e]&&d[e].promise&&J.isFunction(d[e].promise)?d[e].promise().then(c(e),i.reject,b(e)):--h;h||i.resolveWith(i,d)}else i!==a&&i.resolveWith(i,f?[a]:[]);return j}}),J.support=function(){var b,c,d,e,f,g,h,i,j,k,l,m=G.createElement("div");G.documentElement;if(m.setAttribute("className","t"),m.innerHTML="
    a",c=m.getElementsByTagName("*"),d=m.getElementsByTagName("a")[0],!c||!c.length||!d)return{};e=G.createElement("select"),f=e.appendChild(G.createElement("option")),g=m.getElementsByTagName("input")[0],b={leadingWhitespace:3===m.firstChild.nodeType,tbody:!m.getElementsByTagName("tbody").length,htmlSerialize:!!m.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.55/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:"on"===g.value,optSelected:f.selected,getSetAttribute:"t"!==m.className,enctype:!!G.createElement("form").enctype,html5Clone:"<:nav>"!==G.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},J.boxModel=b.boxModel="CSS1Compat"===G.compatMode,g.checked=!0,b.noCloneChecked=g.cloneNode(!0).checked,e.disabled=!0,b.optDisabled=!f.disabled;try{delete m.test}catch(n){b.deleteExpando=!1}if(!m.addEventListener&&m.attachEvent&&m.fireEvent&&(m.attachEvent("onclick",function(){b.noCloneEvent=!1}),m.cloneNode(!0).fireEvent("onclick")),g=G.createElement("input"),g.value="t",g.setAttribute("type","radio"),b.radioValue="t"===g.value,g.setAttribute("checked","checked"),g.setAttribute("name","t"),m.appendChild(g),h=G.createDocumentFragment(),h.appendChild(m.lastChild),b.checkClone=h.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=g.checked,h.removeChild(g),h.appendChild(m),m.attachEvent)for(k in{submit:1,change:1,focusin:1})j="on"+k,l=j in m,l||(m.setAttribute(j,"return;"),l="function"==typeof m[j]),b[k+"Bubbles"]=l;return h.removeChild(m),h=e=f=m=g=null,J(function(){var c,d,e,f,g,h,j,k,n,o,p,q,r=G.getElementsByTagName("body")[0];!r||(j=1,q="padding:0;margin:0;border:",o="position:absolute;top:0;left:0;width:1px;height:1px;",p=q+"0;visibility:hidden;",k="style='"+o+q+"5px solid #000;",n="
    ",c=G.createElement("div"),c.style.cssText=p+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(c,r.firstChild),m=G.createElement("div"),c.appendChild(m),m.innerHTML="
    t
    ",i=m.getElementsByTagName("td"),l=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",b.reliableHiddenOffsets=l&&0===i[0].offsetHeight,a.getComputedStyle&&(m.innerHTML="",h=G.createElement("div"),h.style.width="0",h.style.marginRight="0",m.style.width="2px",m.appendChild(h),b.reliableMarginRight=0===(parseInt((a.getComputedStyle(h,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof m.style.zoom&&(m.innerHTML="",m.style.width=m.style.padding="1px",m.style.border=0,m.style.overflow="hidden",m.style.display="inline",m.style.zoom=1,b.inlineBlockNeedsLayout=3===m.offsetWidth,m.style.display="block",m.style.overflow="visible",m.innerHTML="
    ",b.shrinkWrapBlocks=3!==m.offsetWidth),m.style.cssText=o+p,m.innerHTML=n,d=m.firstChild,e=d.firstChild,f=d.nextSibling.firstChild.firstChild,g={doesNotAddBorder:5!==e.offsetTop,doesAddBorderForTableAndCells:5===f.offsetTop},e.style.position="fixed",e.style.top="20px",g.fixedPosition=20===e.offsetTop||15===e.offsetTop,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",g.subtractsBorderForOverflowNotVisible=-5===e.offsetTop,g.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,a.getComputedStyle&&(m.style.marginTop="1%",b.pixelMargin="1%"!==(a.getComputedStyle(m,null)||{marginTop:0}).marginTop),"undefined"!=typeof c.style.zoom&&(c.style.zoom=1),r.removeChild(c),h=m=c=null,J.extend(b,g))}),b}();var M=/^(?:\{.*\}|\[.*\])$/,N=/([A-Z])/g;J.extend({cache:{},uuid:0,expando:"jQuery"+(J.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?J.cache[a[J.expando]]:a[J.expando],!!a&&!D(a)},data:function(a,c,d,e){if(J.acceptData(a)){var f,g,h,i=J.expando,j="string"==typeof c,k=a.nodeType,l=k?J.cache:a,m=k?a[i]:a[i]&&i,n="events"===c;if((!m||!l[m]||!n&&!e&&!l[m].data)&&j&&d===b)return;return m||(k?a[i]=m=++J.uuid:m=i),l[m]||(l[m]={},k||(l[m].toJSON=J.noop)),("object"==typeof c||"function"==typeof c)&&(e?l[m]=J.extend(l[m],c):l[m].data=J.extend(l[m].data,c)),f=g=l[m],e||(g.data||(g.data={}),g=g.data),d!==b&&(g[J.camelCase(c)]=d),n&&!g[c]?f.events:(j?(h=g[c],null==h&&(h=g[J.camelCase(c)])):h=g,h)}},removeData:function(a,b,c){if(J.acceptData(a)){var d,e,f,g=J.expando,h=a.nodeType,i=h?J.cache:a,j=h?a[g]:g;if(!i[j])return;if(b&&(d=c?i[j]:i[j].data)){J.isArray(b)||(b in d?b=[b]:(b=J.camelCase(b),b=b in d?[b]:b.split(" ")));for(e=0,f=b.length;f>e;e++)delete d[b[e]];if(!(c?D:J.isEmptyObject)(d))return}if(!c&&(delete i[j].data,!D(i[j])))return;J.support.deleteExpando||!i.setInterval?delete i[j]:i[j]=null,h&&(J.support.deleteExpando?delete a[g]:a.removeAttribute?a.removeAttribute(g):a[g]=null)}},_data:function(a,b,c){return J.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=J.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),J.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length&&(k=J.data(i),1===i.nodeType&&!J._data(i,"parsedAttrs"))){for(f=i.attributes,h=f.length;h>j;j++)g=f[j].name,0===g.indexOf("data-")&&(g=J.camelCase(g.substring(5)),E(i,g,k[g]));J._data(i,"parsedAttrs",!0)}return k}return"object"==typeof a?this.each(function(){J.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",J.access(this,function(c){return c===b?(k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=J.data(i,a),k=E(i,a,k)),k===b&&d[1]?this.data(d[0]):k):(d[1]=c,void this.each(function(){var b=J(this);b.triggerHandler("setData"+e,d),J.data(this,a,c),b.triggerHandler("changeData"+e,d)}))},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){J.removeData(this,a)})}}),J.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",J._data(a,b,(J._data(a,b)||0)+1))},_unmark:function(a,b,c){if(a!==!0&&(c=b,b=a,a=!1),b){c=c||"fx";var d=c+"mark",e=a?0:(J._data(b,d)||1)-1;e?J._data(b,d,e):(J.removeData(b,d,!0),C(b,c,"mark"))}},queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=J._data(a,b),c&&(!d||J.isArray(c)?d=J._data(a,b,J.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=J.queue(a,b),d=c.shift(),e={};"inprogress"===d&&(d=c.shift()),d&&("fx"===b&&c.unshift("inprogress"),J._data(a,b+".run",e),d.call(a,function(){J.dequeue(a,b)},e)),c.length||(J.removeData(a,b+"queue "+b+".run",!0),C(a,b,"queue"))}}),J.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){J.removeAttr(this,a)})},prop:function(a,b){return J.access(this,J.prop,a,b,arguments.length>1)},removeProp:function(a){return a=J.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(J.isFunction(a))return this.each(function(b){J(this).addClass(a.call(this,b,this.className))});if(a&&"string"==typeof a)for(b=a.split(S),c=0,d=this.length;d>c;c++)if(e=this[c],1===e.nodeType)if(e.className||1!==b.length){for(f=" "+e.className+" ",g=0,h=b.length;h>g;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=J.trim(f)}else e.className=a;return this},removeClass:function(a){var c,d,e,f,g,h,i;if(J.isFunction(a))return this.each(function(b){J(this).removeClass(a.call(this,b,this.className))});if(a&&"string"==typeof a||a===b)for(c=(a||"").split(S),d=0,e=this.length;e>d;d++)if(f=this[d],1===f.nodeType&&f.className)if(a){for(g=(" "+f.className+" ").replace(R," "),h=0,i=c.length;i>h;h++)g=g.replace(" "+c[h]+" "," ");f.className=J.trim(g)}else f.className="";return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return J.isFunction(a)?this.each(function(c){J(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=J(this),h=b,i=a.split(S);e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else("undefined"===c||"boolean"===c)&&(this.className&&J._data(this,"__className__",this.className),this.className=this.className||a===!1?"":J._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(R," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];return arguments.length?(e=J.isFunction(a),this.each(function(d){var f,g=J(this);1===this.nodeType&&(f=e?a.call(this,d,g.val()):a,null==f?f="":"number"==typeof f?f+="":J.isArray(f)&&(f=J.map(f,function(a){return null==a?"":a+""})),c=J.valHooks[this.type]||J.valHooks[this.nodeName.toLowerCase()],c&&"set"in c&&c.set(this,f,"value")!==b||(this.value=f))})):f?(c=J.valHooks[f.type]||J.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,"string"==typeof d?d.replace(T,""):null==d?"":d)):void 0}}),J.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i="select-one"===a.type;if(0>f)return null;for(c=i?f:0,d=i?f+1:h.length;d>c;c++)if(e=h[c],e.selected&&(J.support.optDisabled?!e.disabled:null===e.getAttribute("disabled"))&&(!e.parentNode.disabled||!J.nodeName(e.parentNode,"optgroup"))){if(b=J(e).val(),i)return b;g.push(b)}return i&&!g.length&&h.length?J(h[f]).val():g},set:function(a,b){var c=J.makeArray(b);return J(a).find("option").each(function(){this.selected=J.inArray(J(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;return a&&3!==i&&8!==i&&2!==i?e&&c in J.attrFn?J(a)[c](d):"undefined"==typeof a.getAttribute?J.prop(a,c,d):(h=1!==i||!J.isXMLDoc(a),h&&(c=c.toLowerCase(),g=J.attrHooks[c]||(X.test(c)?P:O)),d!==b?null===d?void J.removeAttr(a,c):g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d):g&&"get"in g&&h&&null!==(f=g.get(a,c))?f:(f=a.getAttribute(c),null===f?b:f)):void 0},removeAttr:function(a,b){var c,d,e,f,g,h=0;if(b&&1===a.nodeType)for(d=b.toLowerCase().split(S),f=d.length;f>h;h++)e=d[h],e&&(c=J.propFix[e]||e,g=X.test(e),g||J.attr(a,e,""),a.removeAttribute(Y?e:c),g&&c in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(U.test(a.nodeName)&&a.parentNode)J.error("type property can't be changed");else if(!J.support.radioValue&&"radio"===b&&J.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return O&&J.nodeName(a,"button")?O.get(a,b):b in a?a.value:null},set:function(a,b,c){return O&&J.nodeName(a,"button")?O.set(a,b,c):void(a.value=b)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;return a&&3!==h&&8!==h&&2!==h?(g=1!==h||!J.isXMLDoc(a),g&&(c=J.propFix[c]||c,f=J.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]):void 0},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):V.test(a.nodeName)||W.test(a.nodeName)&&a.href?0:b}}}}),J.attrHooks.tabindex=J.propHooks.tabIndex,P={get:function(a,c){var d,e=J.prop(a,c);return e===!0||"boolean"!=typeof e&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?J.removeAttr(a,c):(d=J.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},Y||(Q={name:!0,id:!0,coords:!0},O=J.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(Q[c]?""!==d.nodeValue:d.specified)?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=G.createAttribute(c),a.setAttributeNode(d)),d.nodeValue=b+""}},J.attrHooks.tabindex.set=O.set,J.each(["width","height"],function(a,b){J.attrHooks[b]=J.extend(J.attrHooks[b],{set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}})}),J.attrHooks.contenteditable={get:O.get,set:function(a,b,c){""===b&&(b="false"),O.set(a,b,c)}}),J.support.hrefNormalized||J.each(["href","src","width","height"],function(a,c){J.attrHooks[c]=J.extend(J.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null===d?b:d}})}),J.support.style||(J.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),J.support.optSelected||(J.propHooks.selected=J.extend(J.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),J.support.enctype||(J.propFix.enctype="encoding"),J.support.checkOn||J.each(["radio","checkbox"],function(){J.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),J.each(["radio","checkbox"],function(){J.valHooks[this]=J.extend(J.valHooks[this],{set:function(a,b){return J.isArray(b)?a.checked=J.inArray(J(a).val(),b)>=0:void 0; +// CartoDB.js version: 3.15.19 +// sha: 0843288cca8571f0b00a37ebfe442360c312b011 +!function(){var define,root=this,__prev={jQuery:root.jQuery,$:root.$,L:root.L,Mustache:root.Mustache,Backbone:root.Backbone,_:root._};!function(a,b){function c(a){return J.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}function d(a){if(!sb[a]){var b=G.body,c=J("<"+a+">").appendTo(b),d=c.css("display");c.remove(),("none"===d||""===d)&&(ob||(ob=G.createElement("iframe"),ob.frameBorder=ob.width=ob.height=0),b.appendChild(ob),pb&&ob.createElement||(pb=(ob.contentWindow||ob.contentDocument).document,pb.write((J.support.boxModel?"":"")+""),pb.close()),c=pb.createElement(a),pb.body.appendChild(c),d=J.css(c,"display"),b.removeChild(ob)),sb[a]=d}return sb[a]}function e(a,b){var c={};return J.each(vb.concat.apply([],vb.slice(0,b)),function(){c[this]=a}),c}function f(){rb=b}function g(){return setTimeout(f,0),rb=J.now()}function h(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function i(){try{return new a.XMLHttpRequest}catch(b){}}function j(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d,e,f,g,h,i,j,k,l=a.dataTypes,m={},n=l.length,o=l[0];for(d=1;n>d;d++){if(1===d)for(e in a.converters)"string"==typeof e&&(m[e.toLowerCase()]=a.converters[e]);if(g=o,o=l[d],"*"===o)o=g;else if("*"!==g&&g!==o){if(h=g+" "+o,i=m[h]||m["* "+o],!i){k=b;for(j in m)if(f=j.split(" "),(f[0]===g||"*"===f[0])&&(k=m[f[1]+" "+o])){j=m[j],j===!0?i=k:k===!0&&(i=j);break}}!i&&!k&&J.error("No conversion from "+h.replace(" "," to ")),i!==!0&&(c=i?i(c):k(j(c)))}}return c}function k(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);for(;"*"===j[0];)j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}return g?(g!==j[0]&&j.unshift(g),d[g]):void 0}function l(a,b,c,d){if(J.isArray(b))J.each(b,function(b,e){c||Sa.test(a)?d(a,e):l(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==J.type(b))d(a,b);else for(var e in b)l(a+"["+e+"]",b[e],c,d)}function m(a,c){var d,e,f=J.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&J.extend(!0,a,e)}function n(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;for(var h,i=a[f],j=0,k=i?i.length:0,l=a===fb;k>j&&(l||!h);j++)h=i[j](c,d,e),"string"==typeof h&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=n(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=n(a,c,d,e,"*",g)),h}function o(a){return function(b,c){if("string"!=typeof b&&(c=b,b="*"),J.isFunction(c))for(var d,e,f,g=b.toLowerCase().split(bb),h=0,i=g.length;i>h;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function p(a,b,c){var d="width"===b?a.offsetWidth:a.offsetHeight,e="width"===b?1:0,f=4;if(d>0){if("border"!==c)for(;f>e;e+=2)c||(d-=parseFloat(J.css(a,"padding"+Oa[e]))||0),"margin"===c?d+=parseFloat(J.css(a,c+Oa[e]))||0:d-=parseFloat(J.css(a,"border"+Oa[e]+"Width"))||0;return d+"px"}if(d=Da(a,b),(0>d||null==d)&&(d=a.style[b]),Ka.test(d))return d;if(d=parseFloat(d)||0,c)for(;f>e;e+=2)d+=parseFloat(J.css(a,"padding"+Oa[e]))||0,"padding"!==c&&(d+=parseFloat(J.css(a,"border"+Oa[e]+"Width"))||0),"margin"===c&&(d+=parseFloat(J.css(a,c+Oa[e]))||0);return d+"px"}function q(a){var b=G.createElement("div");return Ca.appendChild(b),b.innerHTML=a.outerHTML,b.firstChild}function r(a){var b=(a.nodeName||"").toLowerCase();"input"===b?s(a):"script"!==b&&"undefined"!=typeof a.getElementsByTagName&&J.grep(a.getElementsByTagName("input"),s)}function s(a){("checkbox"===a.type||"radio"===a.type)&&(a.defaultChecked=a.checked)}function t(a){return"undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName("*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll("*"):[]}function u(a,b){var c;1===b.nodeType&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),"object"===c?b.outerHTML=a.outerHTML:"input"!==c||"checkbox"!==a.type&&"radio"!==a.type?"option"===c?b.selected=a.defaultSelected:"input"===c||"textarea"===c?b.defaultValue=a.defaultValue:"script"===c&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(J.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function v(a,b){if(1===b.nodeType&&J.hasData(a)){var c,d,e,f=J._data(a),g=J._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)J.event.add(b,c,h[c][d])}g.data&&(g.data=J.extend({},g.data))}}function w(a,b){return J.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function x(a){var b=oa.split("|"),c=a.createDocumentFragment();if(c.createElement)for(;b.length;)c.createElement(b.pop());return c}function y(a,b,c){if(b=b||0,J.isFunction(b))return J.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return J.grep(a,function(a,d){return a===b===c});if("string"==typeof b){var d=J.grep(a,function(a){return 1===a.nodeType});if(ka.test(b))return J.filter(b,d,!c);b=J.filter(b,d)}return J.grep(a,function(a,d){return J.inArray(a,b)>=0===c})}function z(a){return!a||!a.parentNode||11===a.parentNode.nodeType}function A(){return!0}function B(){return!1}function C(a,b,c){var d=b+"defer",e=b+"queue",f=b+"mark",g=J._data(a,d);g&&("queue"===c||!J._data(a,e))&&("mark"===c||!J._data(a,f))&&setTimeout(function(){!J._data(a,e)&&!J._data(a,f)&&(J.removeData(a,d,!0),g.fire())},0)}function D(a){for(var b in a)if(("data"!==b||!J.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;return!0}function E(a,c,d){if(d===b&&1===a.nodeType){var e="data-"+c.replace(N,"-$1").toLowerCase();if(d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:J.isNumeric(d)?+d:M.test(d)?J.parseJSON(d):d}catch(f){}J.data(a,c,d)}else d=b}return d}function F(a){var b,c,d=K[a]={};for(a=a.split(/\s+/),b=0,c=a.length;c>b;b++)d[a[b]]=!0;return d}var G=a.document,H=a.navigator,I=a.location,J=function(){function c(){if(!h.isReady){try{G.documentElement.doScroll("left")}catch(a){return void setTimeout(c,1)}h.ready()}}var d,e,f,g,h=function(a,b){return new h.fn.init(a,b,d)},i=a.jQuery,j=a.$,k=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,l=/\S/,m=/^\s+/,n=/\s+$/,o=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p=/^[\],:{}\s]*$/,q=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,r=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,s=/(?:^|:|,)(?:\s*\[)+/g,t=/(webkit)[ \/]([\w.]+)/,u=/(opera)(?:.*version)?[ \/]([\w.]+)/,v=/(msie) ([\w.]+)/,w=/(mozilla)(?:.*? rv:([\w.]+))?/,x=/-([a-z]|[0-9])/gi,y=/^-ms-/,z=function(a,b){return(b+"").toUpperCase()},A=H.userAgent,B=Object.prototype.toString,C=Object.prototype.hasOwnProperty,D=Array.prototype.push,E=Array.prototype.slice,F=String.prototype.trim,I=Array.prototype.indexOf,J={};return h.fn=h.prototype={constructor:h,init:function(a,c,d){var e,f,g,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if("body"===a&&!c&&G.body)return this.context=G,this[0]=G.body,this.selector=a,this.length=1,this;if("string"==typeof a){if(e="<"!==a.charAt(0)||">"!==a.charAt(a.length-1)||a.length<3?k.exec(a):[null,a,null],e&&(e[1]||!c)){if(e[1])return c=c instanceof h?c[0]:c,i=c?c.ownerDocument||c:G,g=o.exec(a),g?h.isPlainObject(c)?(a=[G.createElement(g[1])],h.fn.attr.call(a,c,!0)):a=[i.createElement(g[1])]:(g=h.buildFragment([e[1]],[i]),a=(g.cacheable?h.clone(g.fragment):g.fragment).childNodes),h.merge(this,a);if(f=G.getElementById(e[2]),f&&f.parentNode){if(f.id!==e[2])return d.find(a);this.length=1,this[0]=f}return this.context=G,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return h.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),h.makeArray(a,this))},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return E.call(this,0)},get:function(a){return null==a?this.toArray():0>a?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();return h.isArray(a)?D.apply(d,a):h.merge(d,a),d.prevObject=this,d.context=this.context,"find"===b?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return h.each(this,a,b)},ready:function(a){return h.bindReady(),f.add(a),this},eq:function(a){return a=+a,-1===a?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(E.apply(this,arguments),"slice",E.call(arguments).join(","))},map:function(a){return this.pushStack(h.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:D,sort:[].sort,splice:[].splice},h.fn.init.prototype=h.fn,h.extend=h.fn.extend=function(){var a,c,d,e,f,g,i=arguments[0]||{},j=1,k=arguments.length,l=!1;for("boolean"==typeof i&&(l=i,i=arguments[1]||{},j=2),"object"!=typeof i&&!h.isFunction(i)&&(i={}),k===j&&(i=this,--j);k>j;j++)if(null!=(a=arguments[j]))for(c in a)d=i[c],e=a[c],i!==e&&(l&&e&&(h.isPlainObject(e)||(f=h.isArray(e)))?(f?(f=!1,g=d&&h.isArray(d)?d:[]):g=d&&h.isPlainObject(d)?d:{},i[c]=h.extend(l,g,e)):e!==b&&(i[c]=e));return i},h.extend({noConflict:function(b){return a.$===h&&(a.$=j),b&&a.jQuery===h&&(a.jQuery=i),h},isReady:!1,readyWait:1,holdReady:function(a){a?h.readyWait++:h.ready(!0)},ready:function(a){if(a===!0&&!--h.readyWait||a!==!0&&!h.isReady){if(!G.body)return setTimeout(h.ready,1);if(h.isReady=!0,a!==!0&&--h.readyWait>0)return;f.fireWith(G,[h]),h.fn.trigger&&h(G).trigger("ready").off("ready")}},bindReady:function(){if(!f){if(f=h.Callbacks("once memory"),"complete"===G.readyState)return setTimeout(h.ready,1);if(G.addEventListener)G.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",h.ready,!1);else if(G.attachEvent){G.attachEvent("onreadystatechange",g),a.attachEvent("onload",h.ready);var b=!1;try{b=null==a.frameElement}catch(d){}G.documentElement.doScroll&&b&&c()}}},isFunction:function(a){return"function"===h.type(a)},isArray:Array.isArray||function(a){return"array"===h.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return null==a?String(a):J[B.call(a)]||"object"},isPlainObject:function(a){if(!a||"object"!==h.type(a)||a.nodeType||h.isWindow(a))return!1;try{if(a.constructor&&!C.call(a,"constructor")&&!C.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||C.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){return"string"==typeof b&&b?(b=h.trim(b),a.JSON&&a.JSON.parse?a.JSON.parse(b):p.test(b.replace(q,"@").replace(r,"]").replace(s,""))?new Function("return "+b)():void h.error("Invalid JSON: "+b)):null},parseXML:function(c){if("string"!=typeof c||!c)return null;var d,e;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&h.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&l.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(y,"ms-").replace(x,z)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,i=g===b||h.isFunction(a);if(d)if(i){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;g>f&&c.apply(a[f++],d)!==!1;);else if(i){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;g>f&&c.call(a[f],f,a[f++])!==!1;);return a},trim:F?function(a){return null==a?"":F.call(a)}:function(a){return null==a?"":(a+"").replace(m,"").replace(n,"")},makeArray:function(a,b){var c=b||[];if(null!=a){var d=h.type(a);null==a.length||"string"===d||"function"===d||"regexp"===d||h.isWindow(a)?D.call(c,a):h.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(I)return I.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if("number"==typeof c.length)for(var f=c.length;f>e;e++)a[d++]=c[e];else for(;c[e]!==b;)a[d++]=c[e++];return a.length=d,a},grep:function(a,b,c){var d,e=[];c=!!c;for(var f=0,g=a.length;g>f;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],i=0,j=a.length,k=a instanceof h||j!==b&&"number"==typeof j&&(j>0&&a[0]&&a[j-1]||0===j||h.isArray(a));if(k)for(;j>i;i++)e=c(a[i],i,d),null!=e&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),null!=e&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){if("string"==typeof c){var d=a[c];c=a,a=d}if(!h.isFunction(a))return b;var e=E.call(arguments,2),f=function(){return a.apply(c,e.concat(E.call(arguments)))};return f.guid=a.guid=a.guid||f.guid||h.guid++,f},access:function(a,c,d,e,f,g,i){var j,k=null==d,l=0,m=a.length;if(d&&"object"==typeof d){for(l in d)h.access(a,c,l,d[l],1,g,e);f=1}else if(e!==b){if(j=i===b&&h.isFunction(e),k&&(j?(j=c,c=function(a,b,c){return j.call(h(a),c)}):(c.call(a,e),c=null)),c)for(;m>l;l++)c(a[l],d,j?e.call(a[l],l,c(a[l],d)):e,i);f=1}return f?a:k?c.call(a):m?c(a[0],d):g},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=t.exec(a)||u.exec(a)||v.exec(a)||a.indexOf("compatible")<0&&w.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}h.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(c,d){return d&&d instanceof h&&!(d instanceof a)&&(d=a(d)),h.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(G);return a},browser:{}}),h.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),e=h.uaMatch(A),e.browser&&(h.browser[e.browser]=!0,h.browser.version=e.version),h.browser.webkit&&(h.browser.safari=!0),l.test(" ")&&(m=/^[\s\xA0]+/,n=/[\s\xA0]+$/),d=h(G),G.addEventListener?g=function(){G.removeEventListener("DOMContentLoaded",g,!1),h.ready()}:G.attachEvent&&(g=function(){"complete"===G.readyState&&(G.detachEvent("onreadystatechange",g),h.ready())}),h}(),K={};J.Callbacks=function(a){a=a?K[a]||F(a):{};var c,d,e,f,g,h,i=[],j=[],k=function(b){var c,d,e,f;for(c=0,d=b.length;d>c;c++)e=b[c],f=J.type(e),"array"===f?k(e):"function"===f&&(!a.unique||!m.has(e))&&i.push(e)},l=function(b,k){for(k=k||[],c=!a.memory||[b,k],d=!0,e=!0,h=f||0,f=0,g=i.length;i&&g>h;h++)if(i[h].apply(b,k)===!1&&a.stopOnFalse){c=!0;break}e=!1,i&&(a.once?c===!0?m.disable():i=[]:j&&j.length&&(c=j.shift(),m.fireWith(c[0],c[1])))},m={add:function(){if(i){var a=i.length;k(arguments),e?g=i.length:c&&c!==!0&&(f=a,l(c[0],c[1]))}return this},remove:function(){if(i)for(var b=arguments,c=0,d=b.length;d>c;c++)for(var f=0;f=f&&(g--,h>=f&&h--),i.splice(f--,1),!a.unique));f++);return this},has:function(a){if(i)for(var b=0,c=i.length;c>b;b++)if(a===i[b])return!0;return!1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,(!c||c===!0)&&m.disable(),this},locked:function(){return!j},fireWith:function(b,d){return j&&(e?a.once||j.push([b,d]):(!a.once||!c)&&l(b,d)),this},fire:function(){return m.fireWith(this,arguments),this},fired:function(){return!!d}};return m};var L=[].slice;J.extend({Deferred:function(a){var b,c=J.Callbacks("once memory"),d=J.Callbacks("once memory"),e=J.Callbacks("memory"),f="pending",g={resolve:c,reject:d,notify:e},h={done:c.add,fail:d.add,progress:e.add,state:function(){return f},isResolved:c.fired,isRejected:d.fired,then:function(a,b,c){return i.done(a).fail(b).progress(c),this},always:function(){return i.done.apply(i,arguments).fail.apply(i,arguments),this},pipe:function(a,b,c){return J.Deferred(function(d){J.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c,e=b[0],f=b[1];J.isFunction(e)?i[a](function(){c=e.apply(this,arguments),c&&J.isFunction(c.promise)?c.promise().then(d.resolve,d.reject,d.notify):d[f+"With"](this===i?d:this,[c])}):i[a](d[f])})}).promise()},promise:function(a){if(null==a)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({});for(b in g)i[b]=g[b].fire,i[b+"With"]=g[b].fireWith;return i.done(function(){f="resolved"},d.disable,e.lock).fail(function(){f="rejected"},c.disable,e.lock),a&&a.call(i,i),i},when:function(a){function b(a){return function(b){g[a]=arguments.length>1?L.call(arguments,0):b,i.notifyWith(j,g)}}function c(a){return function(b){d[a]=arguments.length>1?L.call(arguments,0):b,--h||i.resolveWith(i,d)}}var d=L.call(arguments,0),e=0,f=d.length,g=Array(f),h=f,i=1>=f&&a&&J.isFunction(a.promise)?a:J.Deferred(),j=i.promise();if(f>1){for(;f>e;e++)d[e]&&d[e].promise&&J.isFunction(d[e].promise)?d[e].promise().then(c(e),i.reject,b(e)):--h;h||i.resolveWith(i,d)}else i!==a&&i.resolveWith(i,f?[a]:[]);return j}}),J.support=function(){var b,c,d,e,f,g,h,i,j,k,l,m=G.createElement("div");G.documentElement;if(m.setAttribute("className","t"),m.innerHTML="
    a",c=m.getElementsByTagName("*"),d=m.getElementsByTagName("a")[0],!c||!c.length||!d)return{};e=G.createElement("select"),f=e.appendChild(G.createElement("option")),g=m.getElementsByTagName("input")[0],b={leadingWhitespace:3===m.firstChild.nodeType,tbody:!m.getElementsByTagName("tbody").length,htmlSerialize:!!m.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:"/a"===d.getAttribute("href"),opacity:/^0.55/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:"on"===g.value,optSelected:f.selected,getSetAttribute:"t"!==m.className,enctype:!!G.createElement("form").enctype,html5Clone:"<:nav>"!==G.createElement("nav").cloneNode(!0).outerHTML,submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},J.boxModel=b.boxModel="CSS1Compat"===G.compatMode,g.checked=!0,b.noCloneChecked=g.cloneNode(!0).checked,e.disabled=!0,b.optDisabled=!f.disabled;try{delete m.test}catch(n){b.deleteExpando=!1}if(!m.addEventListener&&m.attachEvent&&m.fireEvent&&(m.attachEvent("onclick",function(){b.noCloneEvent=!1}),m.cloneNode(!0).fireEvent("onclick")),g=G.createElement("input"),g.value="t",g.setAttribute("type","radio"),b.radioValue="t"===g.value,g.setAttribute("checked","checked"),g.setAttribute("name","t"),m.appendChild(g),h=G.createDocumentFragment(),h.appendChild(m.lastChild),b.checkClone=h.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=g.checked,h.removeChild(g),h.appendChild(m),m.attachEvent)for(k in{submit:1,change:1,focusin:1})j="on"+k,l=j in m,l||(m.setAttribute(j,"return;"),l="function"==typeof m[j]),b[k+"Bubbles"]=l;return h.removeChild(m),h=e=f=m=g=null,J(function(){var c,d,e,f,g,h,j,k,n,o,p,q,r=G.getElementsByTagName("body")[0];!r||(j=1,q="padding:0;margin:0;border:",o="position:absolute;top:0;left:0;width:1px;height:1px;",p=q+"0;visibility:hidden;",k="style='"+o+q+"5px solid #000;",n="
    ",c=G.createElement("div"),c.style.cssText=p+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(c,r.firstChild),m=G.createElement("div"),c.appendChild(m),m.innerHTML="
    t
    ",i=m.getElementsByTagName("td"),l=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",b.reliableHiddenOffsets=l&&0===i[0].offsetHeight,a.getComputedStyle&&(m.innerHTML="",h=G.createElement("div"),h.style.width="0",h.style.marginRight="0",m.style.width="2px",m.appendChild(h),b.reliableMarginRight=0===(parseInt((a.getComputedStyle(h,null)||{marginRight:0}).marginRight,10)||0)),"undefined"!=typeof m.style.zoom&&(m.innerHTML="",m.style.width=m.style.padding="1px",m.style.border=0,m.style.overflow="hidden",m.style.display="inline",m.style.zoom=1,b.inlineBlockNeedsLayout=3===m.offsetWidth,m.style.display="block",m.style.overflow="visible",m.innerHTML="
    ",b.shrinkWrapBlocks=3!==m.offsetWidth),m.style.cssText=o+p,m.innerHTML=n,d=m.firstChild,e=d.firstChild,f=d.nextSibling.firstChild.firstChild,g={doesNotAddBorder:5!==e.offsetTop,doesAddBorderForTableAndCells:5===f.offsetTop},e.style.position="fixed",e.style.top="20px",g.fixedPosition=20===e.offsetTop||15===e.offsetTop,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",g.subtractsBorderForOverflowNotVisible=-5===e.offsetTop,g.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,a.getComputedStyle&&(m.style.marginTop="1%",b.pixelMargin="1%"!==(a.getComputedStyle(m,null)||{marginTop:0}).marginTop),"undefined"!=typeof c.style.zoom&&(c.style.zoom=1),r.removeChild(c),h=m=c=null,J.extend(b,g))}),b}();var M=/^(?:\{.*\}|\[.*\])$/,N=/([A-Z])/g;J.extend({cache:{},uuid:0,expando:"jQuery"+(J.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?J.cache[a[J.expando]]:a[J.expando],!!a&&!D(a)},data:function(a,c,d,e){if(J.acceptData(a)){var f,g,h,i=J.expando,j="string"==typeof c,k=a.nodeType,l=k?J.cache:a,m=k?a[i]:a[i]&&i,n="events"===c;if((!m||!l[m]||!n&&!e&&!l[m].data)&&j&&d===b)return;return m||(k?a[i]=m=++J.uuid:m=i),l[m]||(l[m]={},k||(l[m].toJSON=J.noop)),("object"==typeof c||"function"==typeof c)&&(e?l[m]=J.extend(l[m],c):l[m].data=J.extend(l[m].data,c)),f=g=l[m],e||(g.data||(g.data={}),g=g.data),d!==b&&(g[J.camelCase(c)]=d),n&&!g[c]?f.events:(j?(h=g[c],null==h&&(h=g[J.camelCase(c)])):h=g,h)}},removeData:function(a,b,c){if(J.acceptData(a)){var d,e,f,g=J.expando,h=a.nodeType,i=h?J.cache:a,j=h?a[g]:g;if(!i[j])return;if(b&&(d=c?i[j]:i[j].data)){J.isArray(b)||(b in d?b=[b]:(b=J.camelCase(b),b=b in d?[b]:b.split(" ")));for(e=0,f=b.length;f>e;e++)delete d[b[e]];if(!(c?D:J.isEmptyObject)(d))return}if(!c&&(delete i[j].data,!D(i[j])))return;J.support.deleteExpando||!i.setInterval?delete i[j]:i[j]=null,h&&(J.support.deleteExpando?delete a[g]:a.removeAttribute?a.removeAttribute(g):a[g]=null)}},_data:function(a,b,c){return J.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=J.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),J.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length&&(k=J.data(i),1===i.nodeType&&!J._data(i,"parsedAttrs"))){for(f=i.attributes,h=f.length;h>j;j++)g=f[j].name,0===g.indexOf("data-")&&(g=J.camelCase(g.substring(5)),E(i,g,k[g]));J._data(i,"parsedAttrs",!0)}return k}return"object"==typeof a?this.each(function(){J.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",J.access(this,function(c){return c===b?(k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=J.data(i,a),k=E(i,a,k)),k===b&&d[1]?this.data(d[0]):k):(d[1]=c,void this.each(function(){var b=J(this);b.triggerHandler("setData"+e,d),J.data(this,a,c),b.triggerHandler("changeData"+e,d)}))},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){J.removeData(this,a)})}}),J.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",J._data(a,b,(J._data(a,b)||0)+1))},_unmark:function(a,b,c){if(a!==!0&&(c=b,b=a,a=!1),b){c=c||"fx";var d=c+"mark",e=a?0:(J._data(b,d)||1)-1;e?J._data(b,d,e):(J.removeData(b,d,!0),C(b,c,"mark"))}},queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=J._data(a,b),c&&(!d||J.isArray(c)?d=J._data(a,b,J.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=J.queue(a,b),d=c.shift(),e={};"inprogress"===d&&(d=c.shift()),d&&("fx"===b&&c.unshift("inprogress"),J._data(a,b+".run",e),d.call(a,function(){J.dequeue(a,b)},e)),c.length||(J.removeData(a,b+"queue "+b+".run",!0),C(a,b,"queue"))}}),J.fn.extend({queue:function(a,c){var d=2;return"string"!=typeof a&&(c=a,a="fx",d--),arguments.length1)},removeAttr:function(a){return this.each(function(){J.removeAttr(this,a)})},prop:function(a,b){return J.access(this,J.prop,a,b,arguments.length>1)},removeProp:function(a){return a=J.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(J.isFunction(a))return this.each(function(b){J(this).addClass(a.call(this,b,this.className))});if(a&&"string"==typeof a)for(b=a.split(S),c=0,d=this.length;d>c;c++)if(e=this[c],1===e.nodeType)if(e.className||1!==b.length){for(f=" "+e.className+" ",g=0,h=b.length;h>g;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=J.trim(f)}else e.className=a;return this},removeClass:function(a){var c,d,e,f,g,h,i;if(J.isFunction(a))return this.each(function(b){J(this).removeClass(a.call(this,b,this.className))});if(a&&"string"==typeof a||a===b)for(c=(a||"").split(S),d=0,e=this.length;e>d;d++)if(f=this[d],1===f.nodeType&&f.className)if(a){for(g=(" "+f.className+" ").replace(R," "),h=0,i=c.length;i>h;h++)g=g.replace(" "+c[h]+" "," ");f.className=J.trim(g)}else f.className="";return this},toggleClass:function(a,b){var c=typeof a,d="boolean"==typeof b;return J.isFunction(a)?this.each(function(c){J(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if("string"===c)for(var e,f=0,g=J(this),h=b,i=a.split(S);e=i[f++];)h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e);else("undefined"===c||"boolean"===c)&&(this.className&&J._data(this,"__className__",this.className),this.className=this.className||a===!1?"":J._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(R," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];return arguments.length?(e=J.isFunction(a),this.each(function(d){var f,g=J(this);1===this.nodeType&&(f=e?a.call(this,d,g.val()):a,null==f?f="":"number"==typeof f?f+="":J.isArray(f)&&(f=J.map(f,function(a){return null==a?"":a+""})),c=J.valHooks[this.type]||J.valHooks[this.nodeName.toLowerCase()],c&&"set"in c&&c.set(this,f,"value")!==b||(this.value=f))})):f?(c=J.valHooks[f.type]||J.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,"string"==typeof d?d.replace(T,""):null==d?"":d)):void 0}}),J.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i="select-one"===a.type;if(0>f)return null;for(c=i?f:0,d=i?f+1:h.length;d>c;c++)if(e=h[c],e.selected&&(J.support.optDisabled?!e.disabled:null===e.getAttribute("disabled"))&&(!e.parentNode.disabled||!J.nodeName(e.parentNode,"optgroup"))){if(b=J(e).val(),i)return b;g.push(b)}return i&&!g.length&&h.length?J(h[f]).val():g},set:function(a,b){var c=J.makeArray(b);return J(a).find("option").each(function(){this.selected=J.inArray(J(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;return a&&3!==i&&8!==i&&2!==i?e&&c in J.attrFn?J(a)[c](d):"undefined"==typeof a.getAttribute?J.prop(a,c,d):(h=1!==i||!J.isXMLDoc(a),h&&(c=c.toLowerCase(),g=J.attrHooks[c]||(X.test(c)?P:O)),d!==b?null===d?void J.removeAttr(a,c):g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d):g&&"get"in g&&h&&null!==(f=g.get(a,c))?f:(f=a.getAttribute(c),null===f?b:f)):void 0},removeAttr:function(a,b){var c,d,e,f,g,h=0;if(b&&1===a.nodeType)for(d=b.toLowerCase().split(S),f=d.length;f>h;h++)e=d[h],e&&(c=J.propFix[e]||e,g=X.test(e),g||J.attr(a,e,""),a.removeAttribute(Y?e:c),g&&c in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(U.test(a.nodeName)&&a.parentNode)J.error("type property can't be changed");else if(!J.support.radioValue&&"radio"===b&&J.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return O&&J.nodeName(a,"button")?O.get(a,b):b in a?a.value:null},set:function(a,b,c){return O&&J.nodeName(a,"button")?O.set(a,b,c):void(a.value=b)}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;return a&&3!==h&&8!==h&&2!==h?(g=1!==h||!J.isXMLDoc(a),g&&(c=J.propFix[c]||c,f=J.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&null!==(e=f.get(a,c))?e:a[c]):void 0},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):V.test(a.nodeName)||W.test(a.nodeName)&&a.href?0:b}}}}),J.attrHooks.tabindex=J.propHooks.tabIndex,P={get:function(a,c){var d,e=J.prop(a,c);return e===!0||"boolean"!=typeof e&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?J.removeAttr(a,c):(d=J.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},Y||(Q={name:!0,id:!0,coords:!0},O=J.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(Q[c]?""!==d.nodeValue:d.specified)?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=G.createAttribute(c),a.setAttributeNode(d)),d.nodeValue=b+""}},J.attrHooks.tabindex.set=O.set,J.each(["width","height"],function(a,b){J.attrHooks[b]=J.extend(J.attrHooks[b],{set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}})}),J.attrHooks.contenteditable={get:O.get,set:function(a,b,c){""===b&&(b="false"),O.set(a,b,c)}}),J.support.hrefNormalized||J.each(["href","src","width","height"],function(a,c){J.attrHooks[c]=J.extend(J.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return null===d?b:d}})}),J.support.style||(J.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),J.support.optSelected||(J.propHooks.selected=J.extend(J.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),J.support.enctype||(J.propFix.enctype="encoding"),J.support.checkOn||J.each(["radio","checkbox"],function(){J.valHooks[this]={get:function(a){return null===a.getAttribute("value")?"on":a.value}}}),J.each(["radio","checkbox"],function(){J.valHooks[this]=J.extend(J.valHooks[this],{set:function(a,b){return J.isArray(b)?a.checked=J.inArray(J(a).val(),b)>=0:void 0; }})});var Z=/^(?:textarea|input|select)$/i,$=/^([^\.]*)?(?:\.(.+))?$/,_=/(?:^|\s)hover(\.\S+)?\b/,aa=/^key/,ba=/^(?:mouse|contextmenu)|click/,ca=/^(?:focusinfocus|focusoutblur)$/,da=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,ea=function(a){var b=da.exec(a);return b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)")),b},fa=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},ga=function(a){return J.event.special.hover?a:a.replace(_,"mouseenter$1 mouseleave$1")};J.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,p,q;if(3!==a.nodeType&&8!==a.nodeType&&c&&d&&(g=J._data(a))){for(d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=J.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return"undefined"==typeof J||a&&J.event.triggered===a.type?b:J.event.dispatch.apply(h.elem,arguments)},h.elem=a),c=J.trim(ga(c)).split(" "),j=0;j=0&&(q=q.slice(0,-1),h=!0),q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),(!e||J.event.customEvent[q])&&!J.event.global[q])return;if(c="object"==typeof c?c[J.expando]?c:new J.Event(q,c):new J.Event(q),c.type=q,c.isTrigger=!0,c.exclusive=h,c.namespace=r.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,l=q.indexOf(":")<0?"on"+q:"",!e){g=J.cache;for(i in g)g[i].events&&g[i].events[q]&&J.event.trigger(c,d,g[i].handle.elem,!0);return}if(c.result=b,c.target||(c.target=e),d=null!=d?J.makeArray(d):[],d.unshift(c),m=J.event.special[q]||{},m.trigger&&m.trigger.apply(e,d)===!1)return;if(o=[[e,m.bindType||q]],!f&&!m.noBubble&&!J.isWindow(e)){for(p=m.delegateType||q,j=ca.test(p+q)?e:e.parentNode,k=null;j;j=j.parentNode)o.push([j,p]),k=j;k&&k===e.ownerDocument&&o.push([k.defaultView||k.parentWindow||a,p])}for(i=0;id;d++)l=n[d],m=l.selector,i[m]===b&&(i[m]=l.quick?fa(f,l.quick):g.is(m)),i[m]&&k.push(l);k.length&&s.push({elem:f,matches:k})}for(n.length>o&&s.push({elem:this,matches:n.slice(o)}),d=0;d0?this.on(b,null,a,c):this.trigger(b)},J.attrFn&&(J.attrFn[b]=!0),aa.test(b)&&(J.event.fixHooks[b]=J.event.keyHooks),ba.test(b)&&(J.event.fixHooks[b]=J.event.mouseHooks)}),function(){function a(a,b,c,d,f,g){for(var h=0,i=d.length;i>h;h++){var j=d[h];if(j){var k=!1;for(j=j[a];j;){if(j[e]===c){k=d[j.sizset];break}if(1===j.nodeType)if(g||(j[e]=c,j.sizset=h),"string"!=typeof b){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}j=j[a]}d[h]=k}}}function c(a,b,c,d,f,g){for(var h=0,i=d.length;i>h;h++){var j=d[h];if(j){var k=!1;for(j=j[a];j;){if(j[e]===c){k=d[j.sizset];break}if(1===j.nodeType&&!g&&(j[e]=c,j.sizset=h),j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}d[h]=k}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e="sizcache"+(Math.random()+"").replace(".",""),f=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){return i=!1,0});var m=function(a,b,c,e){c=c||[],b=b||G;var f=b;if(1!==b.nodeType&&9!==b.nodeType)return[];if(!a||"string"!=typeof a)return c;var h,i,j,k,l,n,q,r,t=!0,u=m.isXML(b),v=[],x=a;do if(d.exec(""),h=d.exec(x),h&&(x=h[3],v.push(h[1]),h[2])){k=h[3];break}while(h);if(v.length>1&&p.exec(a))if(2===v.length&&o.relative[v[0]])i=w(v[0]+v[1],b,e);else for(i=o.relative[v[0]]?[b]:m(v.shift(),b);v.length;)a=v.shift(),o.relative[a]&&(a+=v.shift()),i=w(a,i,e);else if(!e&&v.length>1&&9===b.nodeType&&!u&&o.match.ID.test(v[0])&&!o.match.ID.test(v[v.length-1])&&(l=m.find(v.shift(),b,u),b=l.expr?m.filter(l.expr,l.set)[0]:l.set[0]),b)for(l=e?{expr:v.pop(),set:s(e)}:m.find(v.pop(),1!==v.length||"~"!==v[0]&&"+"!==v[0]||!b.parentNode?b:b.parentNode,u),i=l.expr?m.filter(l.expr,l.set):l.set,v.length>0?j=s(i):t=!1;v.length;)n=v.pop(),q=n,o.relative[n]?q=v.pop():n="",null==q&&(q=b),o.relative[n](j,q,u);else j=v=[];if(j||(j=i),j||m.error(n||a),"[object Array]"===g.call(j))if(t)if(b&&1===b.nodeType)for(r=0;null!=j[r];r++)j[r]&&(j[r]===!0||1===j[r].nodeType&&m.contains(b,j[r]))&&c.push(i[r]);else for(r=0;null!=j[r];r++)j[r]&&1===j[r].nodeType&&c.push(i[r]);else c.push.apply(c,j);else s(j,c);return k&&(m(k,f,c,e),m.uniqueSort(c)),c};m.uniqueSort=function(a){if(u&&(h=i,a.sort(u),h))for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;f>e;e++)if(h=o.order[e],(g=o.leftMatch[h].exec(a))&&(i=g[1],g.splice(1,1),"\\"!==i.substr(i.length-1)&&(g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c),null!=d))){a=a.replace(o.match[h],"");break}return d||(d="undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName("*"):[]),{set:d,expr:a}},m.filter=function(a,c,d,e){for(var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);a&&c.length;){for(h in o.filter)if(null!=(f=o.leftMatch[h].exec(a))&&f[2]){if(k=o.filter[h],l=f[1],g=!1,f.splice(1,1),"\\"===l.substr(l.length-1))continue;if(s===r&&(r=[]),o.preFilter[h])if(f=o.preFilter[h](f,s,d,r,e,t)){if(f===!0)continue}else g=i=!0;if(f)for(n=0;null!=(j=s[n]);n++)j&&(i=k(j,f,n,s),p=e^i,d&&null!=i?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){if(d||(s=r),a=a.replace(o.match[h],""),!g)return[];break}}if(a===q){if(null!=g)break;m.error(a)}q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(1===d||9===d||11===d){if("string"==typeof a.textContent)return a.textContent;if("string"==typeof a.innerText)return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(3===d||4===d)return a.nodeValue}else for(b=0;c=a[b];b++)8!==c.nodeType&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c="string"==typeof b,d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f,g=0,h=a.length;h>g;g++)if(f=a[g]){for(;(f=f.previousSibling)&&1!==f.nodeType;);a[g]=e||f&&f.nodeName.toLowerCase()===b?f||!1:f===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d="string"==typeof b,e=0,f=a.length;if(d&&!l.test(b)){for(b=b.toLowerCase();f>e;e++)if(c=a[e]){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}else{for(;f>e;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(b,d,e){var g,h=f++,i=a;"string"==typeof d&&!l.test(d)&&(d=d.toLowerCase(),g=d,i=c),i("parentNode",d,h,b,g,e)},"~":function(b,d,e){var g,h=f++,i=a;"string"==typeof d&&!l.test(d)&&(d=d.toLowerCase(),g=d,i=c),i("previousSibling",d,h,b,g,e)}},find:{ID:function(a,b,c){if("undefined"!=typeof b.getElementById&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if("undefined"!=typeof b.getElementsByName){for(var c=[],d=b.getElementsByName(a[1]),e=0,f=d.length;f>e;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return 0===c.length?null:c}},TAG:function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a[1]):void 0}},preFilter:{CLASS:function(a,b,c,d,e,f){if(a=" "+a[1].replace(j,"")+" ",f)return a;for(var g,h=0;null!=(g=b[h]);h++)g&&(e^(g.className&&(" "+g.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(g):c&&(b[h]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if("nth"===a[1]){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec("even"===a[2]&&"2n"||"odd"===a[2]&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);return a[0]=f++,a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");return!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),"~="===a[2]&&(a[4]=" "+a[4]+" "),a},PSEUDO:function(a,b,c,e,f){if("not"===a[1]){if(!((d.exec(a[3])||"").length>1||/^\w/.test(a[3]))){var g=m.filter(a[3],b,c,!0^f);return c||e.push.apply(e,g),!1}a[3]=m(a[3],null,null,b)}else if(o.match.POS.test(a[0])||o.match.CHILD.test(a[0]))return!0;return a},POS:function(a){return a.unshift(!0),a}},filters:{enabled:function(a){return a.disabled===!1&&"hidden"!==a.type},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return"input"===a.nodeName.toLowerCase()&&"text"===c&&(b===c||null===b)},radio:function(a){return"input"===a.nodeName.toLowerCase()&&"radio"===a.type},checkbox:function(a){return"input"===a.nodeName.toLowerCase()&&"checkbox"===a.type},file:function(a){return"input"===a.nodeName.toLowerCase()&&"file"===a.type},password:function(a){return"input"===a.nodeName.toLowerCase()&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"submit"===a.type},image:function(a){return"input"===a.nodeName.toLowerCase()&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return("input"===b||"button"===b)&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return 0===b},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if("contains"===e)return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if("not"===e){for(var g=b[3],h=0,i=g.length;i>h;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,d,f,g,h,i,j=b[1],k=a;switch(j){case"only":case"first":for(;k=k.previousSibling;)if(1===k.nodeType)return!1;if("first"===j)return!0;k=a;case"last":for(;k=k.nextSibling;)if(1===k.nodeType)return!1;return!0;case"nth":if(c=b[2],d=b[3],1===c&&0===d)return!0;if(f=b[0],g=a.parentNode,g&&(g[e]!==f||!a.nodeIndex)){for(h=0,k=g.firstChild;k;k=k.nextSibling)1===k.nodeType&&(k.nodeIndex=++h);g[e]=f}return i=a.nodeIndex-d,0===c?0===i:i%c===0&&i/c>=0}},ID:function(a,b){return 1===a.nodeType&&a.getAttribute("id")===b},TAG:function(a,b){return"*"===b&&1===a.nodeType||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):null!=a[c]?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return null==d?"!="===f:!f&&m.attr?null!=d:"="===f?e===g:"*="===f?e.indexOf(g)>=0:"~="===f?(" "+e+" ").indexOf(g)>=0:g?"!="===f?e!==g:"^="===f?0===e.indexOf(g):"$="===f?e.substr(e.length-g.length)===g:"|="===f?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];return f?f(a,c,b,d):void 0}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){return a=Array.prototype.slice.call(a,0),b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(G.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if("[object Array]"===g.call(a))Array.prototype.push.apply(d,a);else if("number"==typeof a.length)for(var e=a.length;e>c;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;G.documentElement.compareDocumentPosition?u=function(a,b){return a===b?(h=!0,0):a.compareDocumentPosition&&b.compareDocumentPosition?4&a.compareDocumentPosition(b)?-1:1:a.compareDocumentPosition?-1:1}:(u=function(a,b){if(a===b)return h=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;for(;j;)e.unshift(j),j=j.parentNode;for(j=i;j;)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;c>k&&d>k;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;for(var d=a.nextSibling;d;){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=G.createElement("div"),c="script"+(new Date).getTime(),d=G.documentElement;a.innerHTML="",d.insertBefore(a,d.firstChild),G.getElementById(c)&&(o.find.ID=function(a,c,d){if("undefined"!=typeof c.getElementById&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||"undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return 1===a.nodeType&&c&&c.nodeValue===b}),d.removeChild(a),d=a=null}(),function(){var a=G.createElement("div");a.appendChild(G.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if("*"===a[1]){for(var d=[],e=0;c[e];e++)1===c[e].nodeType&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&"undefined"!=typeof a.firstChild.getAttribute&&"#"!==a.firstChild.getAttribute("href")&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),G.querySelectorAll&&function(){var a=m,b=G.createElement("div"),c="__sizzle__";if(b.innerHTML="

    ",!b.querySelectorAll||0!==b.querySelectorAll(".TEST").length){m=function(b,d,e,f){if(d=d||G,!f&&!m.isXML(d)){var g=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(g&&(1===d.nodeType||9===d.nodeType)){if(g[1])return s(d.getElementsByTagName(b),e);if(g[2]&&o.find.CLASS&&d.getElementsByClassName)return s(d.getElementsByClassName(g[2]),e)}if(9===d.nodeType){if("body"===b&&d.body)return s([d.body],e);if(g&&g[3]){var h=d.getElementById(g[3]);if(!h||!h.parentNode)return s([],e);if(h.id===g[3])return s([h],e)}try{return s(d.querySelectorAll(b),e)}catch(i){}}else if(1===d.nodeType&&"object"!==d.nodeName.toLowerCase()){var j=d,k=d.getAttribute("id"),l=k||c,n=d.parentNode,p=/^\s*[+~]/.test(b);k?l=l.replace(/'/g,"\\$&"):d.setAttribute("id",l),p&&n&&(d=d.parentNode);try{if(!p||n)return s(d.querySelectorAll("[id='"+l+"'] "+b),e)}catch(q){}finally{k||j.removeAttribute("id")}}}return a(b,d,e,f)};for(var d in a)m[d]=a[d];b=null}}(),function(){var a=G.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var c=!b.call(G.createElement("div"),"div"),d=!1;try{b.call(G.documentElement,"[test!='']:sizzle")}catch(e){d=!0}m.matchesSelector=function(a,e){if(e=e.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']"),!m.isXML(a))try{if(d||!o.match.PSEUDO.test(e)&&!/!=/.test(e)){var f=b.call(a,e);if(f||!c||a.document&&11!==a.document.nodeType)return f}}catch(g){}return m(e,null,null,[a]).length>0}}}(),function(){var a=G.createElement("div");if(a.innerHTML="
    ",a.getElementsByClassName&&0!==a.getElementsByClassName("e").length){if(a.lastChild.className="e",1===a.getElementsByClassName("e").length)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){return"undefined"==typeof b.getElementsByClassName||c?void 0:b.getElementsByClassName(a[1])},a=null}}(),G.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:G.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(16&a.compareDocumentPosition(b))}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?"HTML"!==b.nodeName:!1};var w=function(a,b,c){for(var d,e=[],f="",g=b.nodeType?[b]:b;d=o.match.PSEUDO.exec(a);)f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;i>h;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=J.attr,m.selectors.attrMap={},J.find=m,J.expr=m.selectors,J.expr[":"]=J.expr.filters,J.unique=m.uniqueSort,J.text=m.getText,J.isXMLDoc=m.isXML,J.contains=m.contains}();var ha=/Until$/,ia=/^(?:parents|prevUntil|prevAll)/,ja=/,/,ka=/^.[^:#\[\.,]*$/,la=Array.prototype.slice,ma=J.expr.match.globalPOS,na={children:!0,contents:!0,next:!0,prev:!0};J.fn.extend({find:function(a){var b,c,d=this;if("string"!=typeof a)return J(a).filter(function(){for(b=0,c=d.length;c>b;b++)if(J.contains(d[b],this))return!0});var e,f,g,h=this.pushStack("","find",a);for(b=0,c=this.length;c>b;b++)if(e=h.length,J.find(a,this[b],h),b>0)for(f=e;fg;g++)if(h[g]===h[f]){h.splice(f--,1);break}return h},has:function(a){var b=J(a);return this.filter(function(){for(var a=0,c=b.length;c>a;a++)if(J.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(y(this,a,!1),"not",a)},filter:function(a){return this.pushStack(y(this,a,!0),"filter",a)},is:function(a){return!!a&&("string"==typeof a?ma.test(a)?J(a,this.context).index(this[0])>=0:J.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d,e=[],f=this[0];if(J.isArray(a)){for(var g=1;f&&f.ownerDocument&&f!==b;){for(c=0;cc;c++)for(f=this[c];f;){if(h?h.index(f)>-1:J.find.matchesSelector(f,a)){e.push(f);break}if(f=f.parentNode,!f||!f.ownerDocument||f===b||11===f.nodeType)break}return e=e.length>1?J.unique(e):e,this.pushStack(e,"closest",a)},index:function(a){return a?"string"==typeof a?J.inArray(this[0],J(a)):J.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c="string"==typeof a?J(a,b):J.makeArray(a&&a.nodeType?[a]:a),d=J.merge(this.get(),c);return this.pushStack(z(c[0])||z(d[0])?d:J.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),J.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return J.dir(a,"parentNode")},parentsUntil:function(a,b,c){return J.dir(a,"parentNode",c)},next:function(a){return J.nth(a,2,"nextSibling")},prev:function(a){return J.nth(a,2,"previousSibling")},nextAll:function(a){return J.dir(a,"nextSibling")},prevAll:function(a){return J.dir(a,"previousSibling")},nextUntil:function(a,b,c){return J.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return J.dir(a,"previousSibling",c)},siblings:function(a){return J.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return J.sibling(a.firstChild)},contents:function(a){return J.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:J.makeArray(a.childNodes)}},function(a,b){J.fn[a]=function(c,d){var e=J.map(this,b,c);return ha.test(a)||(d=c),d&&"string"==typeof d&&(e=J.filter(d,e)),e=this.length>1&&!na[a]?J.unique(e):e,(this.length>1||ja.test(d))&&ia.test(a)&&(e=e.reverse()),this.pushStack(e,a,la.call(arguments).join(","))}}),J.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),1===b.length?J.find.matchesSelector(b[0],a)?[b[0]]:[]:J.find.matches(a,b)},dir:function(a,c,d){for(var e=[],f=a[c];f&&9!==f.nodeType&&(d===b||1!==f.nodeType||!J(f).is(d));)1===f.nodeType&&e.push(f),f=f[c];return e},nth:function(a,b,c,d){b=b||1;for(var e=0;a&&(1!==a.nodeType||++e!==b);a=a[c]);return a},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var oa="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",pa=/ jQuery\d+="(?:\d+|null)"/g,qa=/^\s+/,ra=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,sa=/<([\w:]+)/,ta=/]","i"),ya=/checked\s*(?:[^=]|=\s*.checked.)/i,za=/\/(java|ecma)script/i,Aa=/^\s*",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]},Ca=x(G);Ba.optgroup=Ba.option,Ba.tbody=Ba.tfoot=Ba.colgroup=Ba.caption=Ba.thead,Ba.th=Ba.td,J.support.htmlSerialize||(Ba._default=[1,"div
    ","
    "]),J.fn.extend({text:function(a){return J.access(this,function(a){return a===b?J.text(this):this.empty().append((this[0]&&this[0].ownerDocument||G).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(J.isFunction(a))return this.each(function(b){J(this).wrapAll(a.call(this,b))});if(this[0]){var b=J(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstChild&&1===a.firstChild.nodeType;)a=a.firstChild; return a}).append(this)}return this},wrapInner:function(a){return J.isFunction(a)?this.each(function(b){J(this).wrapInner(a.call(this,b))}):this.each(function(){var b=J(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=J.isFunction(a);return this.each(function(c){J(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){J.nodeName(this,"body")||J(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){1===this.nodeType&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=J.clean(arguments);return a.push.apply(a,this.toArray()),this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);return a.push.apply(a,J.clean(arguments)),a}},remove:function(a,b){for(var c,d=0;null!=(c=this[d]);d++)(!a||J.filter(a,[c]).length)&&(!b&&1===c.nodeType&&(J.cleanData(c.getElementsByTagName("*")),J.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)for(1===a.nodeType&&J.cleanData(a.getElementsByTagName("*"));a.firstChild;)a.removeChild(a.firstChild);return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return J.clone(this,a,b)})},html:function(a){return J.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return 1===c.nodeType?c.innerHTML.replace(pa,""):null;if("string"==typeof a&&!va.test(a)&&(J.support.leadingWhitespace||!qa.test(a))&&!Ba[(sa.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ra,"<$1>");try{for(;e>d;d++)c=this[d]||{},1===c.nodeType&&(J.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return this[0]&&this[0].parentNode?J.isFunction(a)?this.each(function(b){var c=J(this),d=c.html();c.replaceWith(a.call(this,b,d))}):("string"!=typeof a&&(a=J(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;J(this).remove(),b?J(b).before(a):J(c).append(a)})):this.length?this.pushStack(J(J.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,f,g,h,i=a[0],j=[];if(!J.support.checkClone&&3===arguments.length&&"string"==typeof i&&ya.test(i))return this.each(function(){J(this).domManip(a,c,d,!0)});if(J.isFunction(i))return this.each(function(e){var f=J(this);a[0]=i.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){if(h=i&&i.parentNode,e=J.support.parentNode&&h&&11===h.nodeType&&h.childNodes.length===this.length?{fragment:h}:J.buildFragment(a,this,j),g=e.fragment,f=1===g.childNodes.length?g=g.firstChild:g.firstChild,f){c=c&&J.nodeName(f,"tr");for(var k=0,l=this.length,m=l-1;l>k;k++)d.call(c?w(this[k],f):this[k],e.cacheable||l>1&&m>k?J.clone(g,!0,!0):g)}j.length&&J.each(j,function(a,b){b.src?J.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):J.globalEval((b.text||b.textContent||b.innerHTML||"").replace(Aa,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),J.buildFragment=function(a,b,c){var d,e,f,g,h=a[0];return b&&b[0]&&(g=b[0].ownerDocument||b[0]),g.createDocumentFragment||(g=G),1===a.length&&"string"==typeof h&&h.length<512&&g===G&&"<"===h.charAt(0)&&!wa.test(h)&&(J.support.checkClone||!ya.test(h))&&(J.support.html5Clone||!xa.test(h))&&(e=!0,f=J.fragments[h],f&&1!==f&&(d=f)),d||(d=g.createDocumentFragment(),J.clean(a,g,d,c)),e&&(J.fragments[h]=f?d:1),{fragment:d,cacheable:e}},J.fragments={},J.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){J.fn[a]=function(c){var d=[],e=J(c),f=1===this.length&&this[0].parentNode;if(f&&11===f.nodeType&&1===f.childNodes.length&&1===e.length)return e[b](this[0]),this;for(var g=0,h=e.length;h>g;g++){var i=(g>0?this.clone(!0):this).get();J(e[g])[b](i),d=d.concat(i)}return this.pushStack(d,a,e.selector)}}),J.extend({clone:function(a,b,c){var d,e,f,g=J.support.html5Clone||J.isXMLDoc(a)||!xa.test("<"+a.nodeName+">")?a.cloneNode(!0):q(a);if(!(J.support.noCloneEvent&&J.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||J.isXMLDoc(a)))for(u(a,g),d=t(a),e=t(g),f=0;d[f];++f)e[f]&&u(d[f],e[f]);if(b&&(v(a,g),c))for(d=t(a),e=t(g),f=0;d[f];++f)v(d[f],e[f]);return d=e=null,g},clean:function(a,b,c,d){var e,f,g,h=[];b=b||G,"undefined"==typeof b.createElement&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||G);for(var i,j=0;null!=(i=a[j]);j++)if("number"==typeof i&&(i+=""),i){if("string"==typeof i)if(ua.test(i)){i=i.replace(ra,"<$1>");var k,l=(sa.exec(i)||["",""])[1].toLowerCase(),m=Ba[l]||Ba._default,n=m[0],o=b.createElement("div"),p=Ca.childNodes;for(b===G?Ca.appendChild(o):x(b).appendChild(o),o.innerHTML=m[1]+i+m[2];n--;)o=o.lastChild;if(!J.support.tbody){var q=ta.test(i),s="table"!==l||q?""!==m[1]||q?[]:o.childNodes:o.firstChild&&o.firstChild.childNodes;for(g=s.length-1;g>=0;--g)J.nodeName(s[g],"tbody")&&!s[g].childNodes.length&&s[g].parentNode.removeChild(s[g])}!J.support.leadingWhitespace&&qa.test(i)&&o.insertBefore(b.createTextNode(qa.exec(i)[0]),o.firstChild),i=o.childNodes,o&&(o.parentNode.removeChild(o),p.length>0&&(k=p[p.length-1],k&&k.parentNode&&k.parentNode.removeChild(k)))}else i=b.createTextNode(i);var t;if(!J.support.appendChecked)if(i[0]&&"number"==typeof(t=i.length))for(g=0;t>g;g++)r(i[g]);else r(i);i.nodeType?h.push(i):h=J.merge(h,i)}if(c)for(e=function(a){return!a.type||za.test(a.type)},j=0;h[j];j++)if(f=h[j],d&&J.nodeName(f,"script")&&(!f.type||za.test(f.type)))d.push(f.parentNode?f.parentNode.removeChild(f):f);else{if(1===f.nodeType){var u=J.grep(f.getElementsByTagName("script"),e);h.splice.apply(h,[j+1,0].concat(u))}c.appendChild(f)}return h},cleanData:function(a){for(var b,c,d,e=J.cache,f=J.event.special,g=J.support.deleteExpando,h=0;null!=(d=a[h]);h++)if((!d.nodeName||!J.noData[d.nodeName.toLowerCase()])&&(c=d[J.expando])){if(b=e[c],b&&b.events){for(var i in b.events)f[i]?J.event.remove(d,i):J.removeEvent(d,i,b.handle);b.handle&&(b.handle.elem=null)}g?delete d[J.expando]:d.removeAttribute&&d.removeAttribute(J.expando),delete e[c]}}});var Da,Ea,Fa,Ga=/alpha\([^)]*\)/i,Ha=/opacity=([^)]*)/,Ia=/([A-Z]|^ms)/g,Ja=/^[\-+]?(?:\d*\.)?\d+$/i,Ka=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,La=/^([\-+])=([\-+.\de]+)/,Ma=/^margin/,Na={position:"absolute",visibility:"hidden",display:"block"},Oa=["Top","Right","Bottom","Left"];J.fn.css=function(a,c){return J.access(this,function(a,c,d){return d!==b?J.style(a,c,d):J.css(a,c)},a,c,arguments.length>1)},J.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Da(a,"opacity");return""===c?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":J.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var f,g,h=J.camelCase(c),i=a.style,j=J.cssHooks[h];if(c=J.cssProps[h]||h,d===b)return j&&"get"in j&&(f=j.get(a,!1,e))!==b?f:i[c];if(g=typeof d,"string"===g&&(f=La.exec(d))&&(d=+(f[1]+1)*+f[2]+parseFloat(J.css(a,c)),g="number"),null==d||"number"===g&&isNaN(d))return;if("number"===g&&!J.cssNumber[h]&&(d+="px"),!(j&&"set"in j&&(d=j.set(a,d))===b))try{i[c]=d}catch(k){}}},css:function(a,c,d){var e,f;return c=J.camelCase(c),f=J.cssHooks[c],c=J.cssProps[c]||c,"cssFloat"===c&&(c="float"),f&&"get"in f&&(e=f.get(a,!0,d))!==b?e:Da?Da(a,c):void 0},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),J.curCSS=J.css,G.defaultView&&G.defaultView.getComputedStyle&&(Ea=function(a,b){var c,d,e,f,g=a.style;return b=b.replace(Ia,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),""===c&&!J.contains(a.ownerDocument.documentElement,a)&&(c=J.style(a,b))),!J.support.pixelMargin&&e&&Ma.test(b)&&Ka.test(c)&&(f=g.width,g.width=c,c=e.width,g.width=f),c}),G.documentElement.currentStyle&&(Fa=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;return null==f&&g&&(e=g[b])&&(f=e),Ka.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left="fontSize"===b?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d)),""===f?"auto":f}),Da=Ea||Fa,J.each(["height","width"],function(a,b){J.cssHooks[b]={get:function(a,c,d){return c?0!==a.offsetWidth?p(a,b,d):J.swap(a,Na,function(){return p(a,b,d)}):void 0},set:function(a,b){return Ja.test(b)?b+"px":b}}}),J.support.opacity||(J.cssHooks.opacity={get:function(a,b){return Ha.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=J.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,b>=1&&""===J.trim(f.replace(Ga,""))&&(c.removeAttribute("filter"),d&&!d.filter)||(c.filter=Ga.test(f)?f.replace(Ga,e):f+" "+e)}}),J(function(){J.support.reliableMarginRight||(J.cssHooks.marginRight={get:function(a,b){return J.swap(a,{display:"inline-block"},function(){return b?Da(a,"margin-right"):a.style.marginRight})}})}),J.expr&&J.expr.filters&&(J.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return 0===b&&0===c||!J.support.reliableHiddenOffsets&&"none"===(a.style&&a.style.display||J.css(a,"display"))},J.expr.filters.visible=function(a){return!J.expr.filters.hidden(a)}),J.each({margin:"",padding:"",border:"Width"},function(a,b){J.cssHooks[a+b]={expand:function(c){var d,e="string"==typeof c?c.split(" "):[c],f={};for(d=0;4>d;d++)f[a+Oa[d]+b]=e[d]||e[d-2]||e[0];return f}}});var Pa,Qa,Ra=/%20/g,Sa=/\[\]$/,Ta=/\r?\n/g,Ua=/#.*$/,Va=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Wa=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,Xa=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,Ya=/^(?:GET|HEAD)$/,Za=/^\/\//,$a=/\?/,_a=/)<[^<]*)*<\/script>/gi,ab=/^(?:select|textarea)/i,bb=/\s+/,cb=/([?&])_=[^&]*/,db=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,eb=J.fn.load,fb={},gb={},hb=["*/"]+["*"];try{Pa=I.href}catch(ib){Pa=G.createElement("a"),Pa.href="",Pa=Pa.href}Qa=db.exec(Pa.toLowerCase())||[],J.fn.extend({load:function(a,c,d){if("string"!=typeof a&&eb)return eb.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}var g="GET";c&&(J.isFunction(c)?(d=c,c=b):"object"==typeof c&&(c=J.param(c,J.ajaxSettings.traditional),g="POST"));var h=this;return J.ajax({url:a,type:g,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),h.html(f?J("
    ").append(c.replace(_a,"")).find(f):c)),d&&h.each(d,[c,b,a])}}),this},serialize:function(){return J.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?J.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ab.test(this.nodeName)||Wa.test(this.type))}).map(function(a,b){var c=J(this).val();return null==c?null:J.isArray(c)?J.map(c,function(a,c){return{name:b.name,value:a.replace(Ta,"\r\n")}}):{name:b.name,value:c.replace(Ta,"\r\n")}}).get()}}),J.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){J.fn[b]=function(a){return this.on(b,a)}}),J.each(["get","post"],function(a,c){J[c]=function(a,d,e,f){return J.isFunction(d)&&(f=f||e,e=d,d=b),J.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),J.extend({getScript:function(a,c){return J.get(a,b,c,"script")},getJSON:function(a,b,c){return J.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?m(a,J.ajaxSettings):(b=a,a=J.ajaxSettings),m(a,b),a},ajaxSettings:{url:Pa,isLocal:Xa.test(Qa[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":hb},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":J.parseJSON,"text xml":J.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:o(fb),ajaxTransport:o(gb),ajax:function(a,c){function d(a,c,d,g){if(2!==x){x=2,i&&clearTimeout(i),h=b,f=g||"",y.readyState=a>0?4:0;var l,n,o,v,w,z=c,A=d?k(p,y,d):b;if(a>=200&&300>a||304===a)if(p.ifModified&&((v=y.getResponseHeader("Last-Modified"))&&(J.lastModified[e]=v),(w=y.getResponseHeader("Etag"))&&(J.etag[e]=w)),304===a)z="notmodified",l=!0;else try{n=j(p,A),z="success",l=!0}catch(B){z="parsererror",o=B}else o=z,(!z||a)&&(z="error",0>a&&(a=0));y.status=a,y.statusText=""+(c||z),l?s.resolveWith(q,[n,z,y]):s.rejectWith(q,[y,z,o]),y.statusCode(u),u=b,m&&r.trigger("ajax"+(l?"Success":"Error"),[y,p,l?n:o]),t.fireWith(q,[y,z]),m&&(r.trigger("ajaxComplete",[y,p]),--J.active||J.event.trigger("ajaxStop"))}}"object"==typeof a&&(c=a,a=b),c=c||{};var e,f,g,h,i,l,m,o,p=J.ajaxSetup({},c),q=p.context||p,r=q!==p&&(q.nodeType||q instanceof J)?J(q):J.event,s=J.Deferred(),t=J.Callbacks("once memory"),u=p.statusCode||{},v={},w={},x=0,y={readyState:0,setRequestHeader:function(a,b){if(!x){var c=a.toLowerCase();a=w[c]=w[c]||a,v[a]=b}return this},getAllResponseHeaders:function(){return 2===x?f:null},getResponseHeader:function(a){var c;if(2===x){if(!g)for(g={};c=Va.exec(f);)g[c[1].toLowerCase()]=c[2];c=g[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return x||(p.mimeType=a),this},abort:function(a){return a=a||"abort",h&&h.abort(a),d(0,a),this}};if(s.promise(y),y.success=y.done,y.error=y.fail,y.complete=t.add,y.statusCode=function(a){if(a){var b;if(2>x)for(b in a)u[b]=[u[b],a[b]];else b=a[y.status],y.then(b,b)}return this},p.url=((a||p.url)+"").replace(Ua,"").replace(Za,Qa[1]+"//"),p.dataTypes=J.trim(p.dataType||"*").toLowerCase().split(bb),null==p.crossDomain&&(l=db.exec(p.url.toLowerCase()),p.crossDomain=!(!l||l[1]==Qa[1]&&l[2]==Qa[2]&&(l[3]||("http:"===l[1]?80:443))==(Qa[3]||("http:"===Qa[1]?80:443)))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=J.param(p.data,p.traditional)),n(fb,p,c,y),2===x)return!1;if(m=p.global,p.type=p.type.toUpperCase(),p.hasContent=!Ya.test(p.type),m&&0===J.active++&&J.event.trigger("ajaxStart"),!p.hasContent&&(p.data&&(p.url+=($a.test(p.url)?"&":"?")+p.data,delete p.data),e=p.url,p.cache===!1)){var z=J.now(),A=p.url.replace(cb,"$1_="+z);p.url=A+(A===p.url?($a.test(p.url)?"&":"?")+"_="+z:"")}(p.data&&p.hasContent&&p.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",p.contentType),p.ifModified&&(e=e||p.url,J.lastModified[e]&&y.setRequestHeader("If-Modified-Since",J.lastModified[e]),J.etag[e]&&y.setRequestHeader("If-None-Match",J.etag[e])),y.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+hb+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)y.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(p.beforeSend.call(q,y,p)===!1||2===x))return y.abort(),!1;for(o in{success:1,error:1,complete:1})y[o](p[o]);if(h=n(gb,p,c,y)){y.readyState=1,m&&r.trigger("ajaxSend",[y,p]),p.async&&p.timeout>0&&(i=setTimeout(function(){y.abort("timeout")},p.timeout));try{x=1,h.send(v,d)}catch(B){if(!(2>x))throw B;d(-1,B)}}else d(-1,"No Transport");return y},param:function(a,c){var d=[],e=function(a,b){b=J.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(c===b&&(c=J.ajaxSettings.traditional),J.isArray(a)||a.jquery&&!J.isPlainObject(a))J.each(a,function(){e(this.name,this.value)});else for(var f in a)l(f,a[f],c,e);return d.join("&").replace(Ra,"+")}}),J.extend({active:0,lastModified:{},etag:{}});var jb=J.now(),kb=/(\=)\?(&|$)|\?\?/i;J.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return J.expando+"_"+jb++}}),J.ajaxPrefilter("json jsonp",function(b,c,d){var e="string"==typeof b.data&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if("jsonp"===b.dataTypes[0]||b.jsonp!==!1&&(kb.test(b.url)||e&&kb.test(b.data))){var f,g=b.jsonpCallback=J.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h=a[g],i=b.url,j=b.data,k="$1"+g+"$2";return b.jsonp!==!1&&(i=i.replace(kb,k),b.url===i&&(e&&(j=j.replace(kb,k)),b.data===j&&(i+=(/\?/.test(i)?"&":"?")+b.jsonp+"="+g))),b.url=i,b.data=j,a[g]=function(a){f=[a]},d.always(function(){a[g]=h,f&&J.isFunction(h)&&a[g](f[0])}),b.converters["script json"]=function(){return f||J.error(g+" was not called"),f[0]},b.dataTypes[0]="json","script"}}),J.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return J.globalEval(a),a}}}),J.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),J.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=G.head||G.getElementsByTagName("head")[0]||G.documentElement;return{send:function(e,f){c=G.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){(e||!c.readyState||/loaded|complete/.test(c.readyState))&&(c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||f(200,"success"))},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var lb,mb=a.ActiveXObject?function(){for(var a in lb)lb[a](0,1)}:!1,nb=0;J.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&i()||h()}:i,function(a){J.extend(J.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(J.ajaxSettings.xhr()),J.support.ajax&&J.ajaxTransport(function(c){if(!c.crossDomain||J.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();if(c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async),c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||4===i.readyState))if(d=b,g&&(i.onreadystatechange=J.noop,mb&&delete lb[g]),e)4!==i.readyState&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}h||!c.isLocal||c.crossDomain?1223===h&&(h=204):h=l.text?200:404}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async&&4!==i.readyState?(g=++nb,mb&&(lb||(lb={},J(a).unload(mb)),lb[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var ob,pb,qb,rb,sb={},tb=/^(?:toggle|show|hide)$/,ub=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,vb=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];J.fn.extend({show:function(a,b,c){var f,g;if(a||0===a)return this.animate(e("show",3),a,b,c);for(var h=0,i=this.length;i>h;h++)f=this[h],f.style&&(g=f.style.display,!J._data(f,"olddisplay")&&"none"===g&&(g=f.style.display=""),(""===g&&"none"===J.css(f,"display")||!J.contains(f.ownerDocument.documentElement,f))&&J._data(f,"olddisplay",d(f.nodeName)));for(h=0;i>h;h++)f=this[h],f.style&&(g=f.style.display,(""===g||"none"===g)&&(f.style.display=J._data(f,"olddisplay")||""));return this},hide:function(a,b,c){if(a||0===a)return this.animate(e("hide",3),a,b,c);for(var d,f,g=0,h=this.length;h>g;g++)d=this[g],d.style&&(f=J.css(d,"display"),"none"!==f&&!J._data(d,"olddisplay")&&J._data(d,"olddisplay",f));for(g=0;h>g;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:J.fn.toggle,toggle:function(a,b,c){var d="boolean"==typeof a;return J.isFunction(a)&&J.isFunction(b)?this._toggle.apply(this,arguments):null==a||d?this.each(function(){var b=d?a:J(this).is(":hidden");J(this)[b?"show":"hide"]()}):this.animate(e("toggle",3),a,b,c),this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,e){function f(){g.queue===!1&&J._mark(this);var b,c,e,f,h,i,j,k,l,m,n,o=J.extend({},g),p=1===this.nodeType,q=p&&J(this).is(":hidden");o.animatedProperties={};for(e in a)if(b=J.camelCase(e),e!==b&&(a[b]=a[e],delete a[e]),(h=J.cssHooks[b])&&"expand"in h){i=h.expand(a[b]),delete a[b];for(e in i)e in a||(a[e]=i[e])}for(b in a){if(c=a[b],J.isArray(c)?(o.animatedProperties[b]=c[1],c=a[b]=c[0]):o.animatedProperties[b]=o.specialEasing&&o.specialEasing[b]||o.easing||"swing","hide"===c&&q||"show"===c&&!q)return o.complete.call(this);p&&("height"===b||"width"===b)&&(o.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],"inline"===J.css(this,"display")&&"none"===J.css(this,"float")&&(J.support.inlineBlockNeedsLayout&&"inline"!==d(this.nodeName)?this.style.zoom=1:this.style.display="inline-block"))}null!=o.overflow&&(this.style.overflow="hidden");for(e in a)f=new J.fx(this,o,e),c=a[e],tb.test(c)?(n=J._data(this,"toggle"+e)||("toggle"===c?q?"show":"hide":0),n?(J._data(this,"toggle"+e,"show"===n?"hide":"show"),f[n]()):f[c]()):(j=ub.exec(c),k=f.cur(),j?(l=parseFloat(j[2]),m=j[3]||(J.cssNumber[e]?"":"px"),"px"!==m&&(J.style(this,e,(l||1)+m),k=(l||1)/f.cur()*k,J.style(this,e,k+m)),j[1]&&(l=("-="===j[1]?-1:1)*l+k),f.custom(k,l,m)):f.custom(k,c,""));return!0}var g=J.speed(b,c,e);return J.isEmptyObject(a)?this.each(g.complete,[!1]):(a=J.extend({},a),g.queue===!1?this.each(f):this.queue(g.queue,f))},stop:function(a,c,d){return"string"!=typeof a&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){function b(a,b,c){var e=b[c];J.removeData(a,c,!0),e.stop(d)}var c,e=!1,f=J.timers,g=J._data(this);if(d||J._unmark(!0,this),null==a)for(c in g)g[c]&&g[c].stop&&c.indexOf(".run")===c.length-4&&b(this,g,c);else g[c=a+".run"]&&g[c].stop&&b(this,g,c);for(c=f.length;c--;)f[c].elem===this&&(null==a||f[c].queue===a)&&(d?f[c](!0):f[c].saveState(),e=!0,f.splice(c,1));(!d||!e)&&J.dequeue(this,a)})}}),J.each({slideDown:e("show",1),slideUp:e("hide",1),slideToggle:e("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){J.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),J.extend({speed:function(a,b,c){var d=a&&"object"==typeof a?J.extend({},a):{complete:c||!c&&b||J.isFunction(a)&&a,duration:a,easing:c&&b||b&&!J.isFunction(b)&&b};return d.duration=J.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in J.fx.speeds?J.fx.speeds[d.duration]:J.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(a){J.isFunction(d.old)&&d.old.call(this),d.queue?J.dequeue(this,d.queue):a!==!1&&J._unmark(this)},d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),J.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(J.fx.step[this.prop]||J.fx.step._default)(this)},cur:function(){if(null!=this.elem[this.prop]&&(!this.elem.style||null==this.elem.style[this.prop]))return this.elem[this.prop];var a,b=J.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?b&&"auto"!==b?b:0:a},custom:function(a,c,d){function e(a){return f.step(a)}var f=this,h=J.fx;this.startTime=rb||g(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(J.cssNumber[this.prop]?"":"px"),e.queue=this.options.queue,e.elem=this.elem,e.saveState=function(){J._data(f.elem,"fxshow"+f.prop)===b&&(f.options.hide?J._data(f.elem,"fxshow"+f.prop,f.start):f.options.show&&J._data(f.elem,"fxshow"+f.prop,f.end))},e()&&J.timers.push(e)&&!qb&&(qb=setInterval(h.tick,h.interval))},show:function(){var a=J._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||J.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom("width"===this.prop||"height"===this.prop?1:0,this.cur()),J(this.elem).show()},hide:function(){this.options.orig[this.prop]=J._data(this.elem,"fxshow"+this.prop)||J.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=rb||g(),f=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(f=!1);if(f){if(null!=i.overflow&&!J.support.shrinkWrapBlocks&&J.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&J(h).hide(),i.hide||i.show)for(b in i.animatedProperties)J.style(h,b,i.orig[b]),J.removeData(h,"fxshow"+b,!0),J.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}return i.duration==1/0?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=J.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update(),!0}},J.extend(J.fx,{tick:function(){for(var a,b=J.timers,c=0;c-1,l={},m={};k?(m=g.position(),e=m.top,f=m.left):(e=parseFloat(i)||0,f=parseFloat(j)||0),J.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(l.top=b.top-h.top+e),null!=b.left&&(l.left=b.left-h.left+f),"using"in b?b.using.call(a,l):g.css(l)}},J.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=yb.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(J.css(a,"marginTop"))||0,c.left-=parseFloat(J.css(a,"marginLeft"))||0,d.top+=parseFloat(J.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(J.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||G.body;a&&!yb.test(a.nodeName)&&"static"===J.css(a,"position");)a=a.offsetParent;return a})}}),J.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,d){var e=/Y/.test(d);J.fn[a]=function(f){return J.access(this,function(a,f,g){var h=c(a);return g===b?h?d in h?h[d]:J.support.boxModel&&h.document.documentElement[f]||h.document.body[f]:a[f]:void(h?h.scrollTo(e?J(h).scrollLeft():g,e?g:J(h).scrollTop()):a[f]=g)},a,f,arguments.length,null)}}),J.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,f="offset"+a;J.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(J.css(a,c,"padding")):this[c]():null},J.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(J.css(b,c,a?"margin":"border")):this[c]():null},J.fn[c]=function(a){return J.access(this,function(a,c,g){var h,i,j,k;return J.isWindow(a)?(h=a.document,i=h.documentElement[d],J.support.boxModel&&i||h.body&&h.body[d]||i):9===a.nodeType?(h=a.documentElement,h[d]>=h[e]?h[d]:Math.max(a.body[e],h[e],a.body[f],h[f])):g===b?(j=J.css(a,c),k=parseFloat(j),J.isNumeric(k)?k:j):void J(a).css(c,g)},c,a,arguments.length,null)}}),a.jQuery=a.$=J,"function"==typeof define&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return J})}(window),function(){var a=this,b=a._,c={},d=Array.prototype,e=Object.prototype,f=Function.prototype,g=d.push,h=d.slice,i=d.concat,j=e.toString,k=e.hasOwnProperty,l=d.forEach,m=d.map,n=d.reduce,o=d.reduceRight,p=d.filter,q=d.every,r=d.some,s=d.indexOf,t=d.lastIndexOf,u=Array.isArray,v=Object.keys,w=f.bind,x=function(a){return a instanceof x?a:this instanceof x?void(this._wrapped=a):new x(a)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=x),exports._=x):a._=x,x.VERSION="1.4.4";var y=x.each=x.forEach=function(a,b,d){if(null!=a)if(l&&a.forEach===l)a.forEach(b,d);else if(a.length===+a.length){for(var e=0,f=a.length;f>e;e++)if(b.call(d,a[e],e,a)===c)return}else for(var g in a)if(x.has(a,g)&&b.call(d,a[g],g,a)===c)return};x.map=x.collect=function(a,b,c){var d=[];return null==a?d:m&&a.map===m?a.map(b,c):(y(a,function(a,e,f){d[d.length]=b.call(c,a,e,f)}),d)};var z="Reduce of empty array with no initial value";x.reduce=x.foldl=x.inject=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),n&&a.reduce===n)return d&&(b=x.bind(b,d)),e?a.reduce(b,c):a.reduce(b);if(y(a,function(a,f,g){e?c=b.call(d,c,a,f,g):(c=a,e=!0)}),!e)throw new TypeError(z);return c},x.reduceRight=x.foldr=function(a,b,c,d){var e=arguments.length>2;if(null==a&&(a=[]),o&&a.reduceRight===o)return d&&(b=x.bind(b,d)),e?a.reduceRight(b,c):a.reduceRight(b);var f=a.length;if(f!==+f){var g=x.keys(a);f=g.length}if(y(a,function(h,i,j){i=g?g[--f]:--f,e?c=b.call(d,c,a[i],i,j):(c=a[i],e=!0)}),!e)throw new TypeError(z);return c},x.find=x.detect=function(a,b,c){var d;return A(a,function(a,e,f){return b.call(c,a,e,f)?(d=a,!0):void 0}),d},x.filter=x.select=function(a,b,c){var d=[];return null==a?d:p&&a.filter===p?a.filter(b,c):(y(a,function(a,e,f){ b.call(c,a,e,f)&&(d[d.length]=a)}),d)},x.reject=function(a,b,c){return x.filter(a,function(a,d,e){return!b.call(c,a,d,e)},c)},x.every=x.all=function(a,b,d){b||(b=x.identity);var e=!0;return null==a?e:q&&a.every===q?a.every(b,d):(y(a,function(a,f,g){return(e=e&&b.call(d,a,f,g))?void 0:c}),!!e)};var A=x.some=x.any=function(a,b,d){b||(b=x.identity);var e=!1;return null==a?e:r&&a.some===r?a.some(b,d):(y(a,function(a,f,g){return e||(e=b.call(d,a,f,g))?c:void 0}),!!e)};x.contains=x.include=function(a,b){return null==a?!1:s&&a.indexOf===s?-1!=a.indexOf(b):A(a,function(a){return a===b})},x.invoke=function(a,b){var c=h.call(arguments,2),d=x.isFunction(b);return x.map(a,function(a){return(d?b:a[b]).apply(a,c)})},x.pluck=function(a,b){return x.map(a,function(a){return a[b]})},x.where=function(a,b,c){return x.isEmpty(b)?c?null:[]:x[c?"find":"filter"](a,function(a){for(var c in b)if(b[c]!==a[c])return!1;return!0})},x.findWhere=function(a,b){return x.where(a,b,!0)},x.max=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&65535>a.length)return Math.max.apply(Math,a);if(!b&&x.isEmpty(a))return-1/0;var d={computed:-1/0,value:-1/0};return y(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;g>=d.computed&&(d={value:a,computed:g})}),d.value},x.min=function(a,b,c){if(!b&&x.isArray(a)&&a[0]===+a[0]&&65535>a.length)return Math.min.apply(Math,a);if(!b&&x.isEmpty(a))return 1/0;var d={computed:1/0,value:1/0};return y(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;d.computed>g&&(d={value:a,computed:g})}),d.value},x.shuffle=function(a){var b,c=0,d=[];return y(a,function(a){b=x.random(c++),d[c-1]=d[b],d[b]=a}),d};var B=function(a){return x.isFunction(a)?a:function(b){return b[a]}};x.sortBy=function(a,b,c){var d=B(b);return x.pluck(x.map(a,function(a,b,e){return{value:a,index:b,criteria:d.call(c,a,b,e)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;if(c!==d){if(c>d||void 0===c)return 1;if(d>c||void 0===d)return-1}return a.indexf;){var h=f+g>>>1;e>c.call(d,a[h])?f=h+1:g=h}return f},x.toArray=function(a){return a?x.isArray(a)?h.call(a):a.length===+a.length?x.map(a,x.identity):x.values(a):[]},x.size=function(a){return null==a?0:a.length===+a.length?a.length:x.keys(a).length},x.first=x.head=x.take=function(a,b,c){return null==a?void 0:null==b||c?a[0]:h.call(a,0,b)},x.initial=function(a,b,c){return h.call(a,0,a.length-(null==b||c?1:b))},x.last=function(a,b,c){return null==a?void 0:null==b||c?a[a.length-1]:h.call(a,Math.max(a.length-b,0))},x.rest=x.tail=x.drop=function(a,b,c){return h.call(a,null==b||c?1:b)},x.compact=function(a){return x.filter(a,x.identity)};var D=function(a,b,c){return y(a,function(a){x.isArray(a)?b?g.apply(c,a):D(a,b,c):c.push(a)}),c};x.flatten=function(a,b){return D(a,b,[])},x.without=function(a){return x.difference(a,h.call(arguments,1))},x.uniq=x.unique=function(a,b,c,d){x.isFunction(b)&&(d=c,c=b,b=!1);var e=c?x.map(a,c,d):a,f=[],g=[];return y(e,function(c,d){(b?d&&g[g.length-1]===c:x.contains(g,c))||(g.push(c),f.push(a[d]))}),f},x.union=function(){return x.uniq(i.apply(d,arguments))},x.intersection=function(a){var b=h.call(arguments,1);return x.filter(x.uniq(a),function(a){return x.every(b,function(b){return x.indexOf(b,a)>=0})})},x.difference=function(a){var b=i.apply(d,h.call(arguments,1));return x.filter(a,function(a){return!x.contains(b,a)})},x.zip=function(){for(var a=h.call(arguments),b=x.max(x.pluck(a,"length")),c=Array(b),d=0;b>d;d++)c[d]=x.pluck(a,""+d);return c},x.object=function(a,b){if(null==a)return{};for(var c={},d=0,e=a.length;e>d;d++)b?c[a[d]]=b[d]:c[a[d][0]]=a[d][1];return c},x.indexOf=function(a,b,c){if(null==a)return-1;var d=0,e=a.length;if(c){if("number"!=typeof c)return d=x.sortedIndex(a,b),a[d]===b?d:-1;d=0>c?Math.max(0,e+c):c}if(s&&a.indexOf===s)return a.indexOf(b,c);for(;e>d;d++)if(a[d]===b)return d;return-1},x.lastIndexOf=function(a,b,c){if(null==a)return-1;var d=null!=c;if(t&&a.lastIndexOf===t)return d?a.lastIndexOf(b,c):a.lastIndexOf(b);for(var e=d?c:a.length;e--;)if(a[e]===b)return e;return-1},x.range=function(a,b,c){1>=arguments.length&&(b=a||0,a=0),c=arguments[2]||1;for(var d=Math.max(Math.ceil((b-a)/c),0),e=0,f=Array(d);d>e;)f[e++]=a,a+=c;return f},x.bind=function(a,b){if(a.bind===w&&w)return w.apply(a,h.call(arguments,1));var c=h.call(arguments,2);return function(){return a.apply(b,c.concat(h.call(arguments)))}},x.partial=function(a){var b=h.call(arguments,1);return function(){return a.apply(this,b.concat(h.call(arguments)))}},x.bindAll=function(a){var b=h.call(arguments,1);return 0===b.length&&(b=x.functions(a)),y(b,function(b){a[b]=x.bind(a[b],a)}),a},x.memoize=function(a,b){var c={};return b||(b=x.identity),function(){var d=b.apply(this,arguments);return x.has(c,d)?c[d]:c[d]=a.apply(this,arguments)}},x.delay=function(a,b){var c=h.call(arguments,2);return setTimeout(function(){return a.apply(null,c)},b)},x.defer=function(a){return x.delay.apply(x,[a,1].concat(h.call(arguments,1)))},x.throttle=function(a,b){var c,d,e,f,g=0,h=function(){g=new Date,e=null,f=a.apply(c,d)};return function(){var i=new Date,j=b-(i-g);return c=this,d=arguments,0>=j?(clearTimeout(e),e=null,g=i,f=a.apply(c,d)):e||(e=setTimeout(h,j)),f}},x.debounce=function(a,b,c){var d,e;return function(){var f=this,g=arguments,h=function(){d=null,c||(e=a.apply(f,g))},i=c&&!d;return clearTimeout(d),d=setTimeout(h,b),i&&(e=a.apply(f,g)),e}},x.once=function(a){var b,c=!1;return function(){return c?b:(c=!0,b=a.apply(this,arguments),a=null,b)}},x.wrap=function(a,b){return function(){var c=[a];return g.apply(c,arguments),b.apply(this,c)}},x.compose=function(){var a=arguments;return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}},x.after=function(a,b){return 0>=a?b():function(){return 1>--a?b.apply(this,arguments):void 0}},x.keys=v||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[];for(var c in a)x.has(a,c)&&(b[b.length]=c);return b},x.values=function(a){var b=[];for(var c in a)x.has(a,c)&&b.push(a[c]);return b},x.pairs=function(a){var b=[];for(var c in a)x.has(a,c)&&b.push([c,a[c]]);return b},x.invert=function(a){var b={};for(var c in a)x.has(a,c)&&(b[a[c]]=c);return b},x.functions=x.methods=function(a){var b=[];for(var c in a)x.isFunction(a[c])&&b.push(c);return b.sort()},x.extend=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)a[c]=b[c]}),a},x.pick=function(a){var b={},c=i.apply(d,h.call(arguments,1));return y(c,function(c){c in a&&(b[c]=a[c])}),b},x.omit=function(a){var b={},c=i.apply(d,h.call(arguments,1));for(var e in a)x.contains(c,e)||(b[e]=a[e]);return b},x.defaults=function(a){return y(h.call(arguments,1),function(b){if(b)for(var c in b)null==a[c]&&(a[c]=b[c])}),a},x.clone=function(a){return x.isObject(a)?x.isArray(a)?a.slice():x.extend({},a):a},x.tap=function(a,b){return b(a),a};var E=function(a,b,c,d){if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return a===b;a instanceof x&&(a=a._wrapped),b instanceof x&&(b=b._wrapped);var e=j.call(a);if(e!=j.call(b))return!1;switch(e){case"[object String]":return a==b+"";case"[object Number]":return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case"[object Date]":case"[object Boolean]":return+a==+b;case"[object RegExp]":return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if("object"!=typeof a||"object"!=typeof b)return!1;for(var f=c.length;f--;)if(c[f]==a)return d[f]==b;c.push(a),d.push(b);var g=0,h=!0;if("[object Array]"==e){if(g=a.length,h=g==b.length)for(;g--&&(h=E(a[g],b[g],c,d)););}else{var i=a.constructor,k=b.constructor;if(i!==k&&!(x.isFunction(i)&&i instanceof i&&x.isFunction(k)&&k instanceof k))return!1;for(var l in a)if(x.has(a,l)&&(g++,!(h=x.has(b,l)&&E(a[l],b[l],c,d))))break;if(h){for(l in b)if(x.has(b,l)&&!g--)break;h=!g}}return c.pop(),d.pop(),h};x.isEqual=function(a,b){return E(a,b,[],[])},x.isEmpty=function(a){if(null==a)return!0;if(x.isArray(a)||x.isString(a))return 0===a.length;for(var b in a)if(x.has(a,b))return!1;return!0},x.isElement=function(a){return!(!a||1!==a.nodeType)},x.isArray=u||function(a){return"[object Array]"==j.call(a)},x.isObject=function(a){return a===Object(a)},y(["Arguments","Function","String","Number","Date","RegExp"],function(a){x["is"+a]=function(b){return j.call(b)=="[object "+a+"]"}}),x.isArguments(arguments)||(x.isArguments=function(a){return!(!a||!x.has(a,"callee"))}),"function"!=typeof/./&&(x.isFunction=function(a){return"function"==typeof a}),x.isFinite=function(a){return isFinite(a)&&!isNaN(parseFloat(a))},x.isNaN=function(a){return x.isNumber(a)&&a!=+a},x.isBoolean=function(a){return a===!0||a===!1||"[object Boolean]"==j.call(a)},x.isNull=function(a){return null===a},x.isUndefined=function(a){return void 0===a},x.has=function(a,b){return k.call(a,b)},x.noConflict=function(){return a._=b,this},x.identity=function(a){return a},x.times=function(a,b,c){for(var d=Array(a),e=0;a>e;e++)d[e]=b.call(c,e);return d},x.random=function(a,b){return null==b&&(b=a,a=0),a+Math.floor(Math.random()*(b-a+1))};var F={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};F.unescape=x.invert(F.escape);var G={escape:RegExp("["+x.keys(F.escape).join("")+"]","g"),unescape:RegExp("("+x.keys(F.unescape).join("|")+")","g")};x.each(["escape","unescape"],function(a){x[a]=function(b){return null==b?"":(""+b).replace(G[a],function(b){return F[a][b]})}}),x.result=function(a,b){if(null==a)return null;var c=a[b];return x.isFunction(c)?c.call(a):c},x.mixin=function(a){y(x.functions(a),function(b){var c=x[b]=a[b];x.prototype[b]=function(){var a=[this._wrapped];return g.apply(a,arguments),L.call(this,c.apply(x,a))}})};var H=0;x.uniqueId=function(a){var b=++H+"";return a?a+b:b},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var I=/(.)^/,J={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},K=/\\|'|\r|\n|\t|\u2028|\u2029/g;x.template=function(a,b,c){var d;c=x.defaults({},c,x.templateSettings);var e=RegExp([(c.escape||I).source,(c.interpolate||I).source,(c.evaluate||I).source].join("|")+"|$","g"),f=0,g="__p+='";a.replace(e,function(b,c,d,e,h){return g+=a.slice(f,h).replace(K,function(a){return"\\"+J[a]}),c&&(g+="'+\n((__t=("+c+"))==null?'':_.escape(__t))+\n'"),d&&(g+="'+\n((__t=("+d+"))==null?'':__t)+\n'"),e&&(g+="';\n"+e+"\n__p+='"),f=h+b.length,b}),g+="';\n",c.variable||(g="with(obj||{}){\n"+g+"}\n"),g="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+g+"return __p;\n";try{d=Function(c.variable||"obj","_",g)}catch(h){throw h.source=g,h}if(b)return d(b,x);var i=function(a){return d.call(this,a,x)};return i.source="function("+(c.variable||"obj")+"){\n"+g+"}",i},x.chain=function(a){return x(a).chain()};var L=function(a){return this._chain?x(a).chain():a};x.mixin(x),y(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var b=d[a];x.prototype[a]=function(){var c=this._wrapped;return b.apply(c,arguments),"shift"!=a&&"splice"!=a||0!==c.length||delete c[0],L.call(this,c)}}),y(["concat","join","slice"],function(a){var b=d[a];x.prototype[a]=function(){return L.call(this,b.apply(this._wrapped,arguments))}}),x.extend(x.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),"object"!=typeof JSON&&(JSON={}),function(){"use strict";function f(a){return 10>a?"0"+a:a}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i)return"null";if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1)g[c]=str(c,i)||"null";return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e}if(rep&&"object"==typeof rep)for(f=rep.length,c=0;f>c;c+=1)"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));else for(d in i)Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c)for(d=0;c>d;d+=1)indent+=" ";else"string"==typeof c&&(indent=c);if(rep=b,b&&"function"!=typeof b&&("object"!=typeof b||"number"!=typeof b.length))throw new Error("JSON.stringify");return str("",{"":a})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e)for(c in e)Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);return reviver.call(a,b,e)}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),function(){var a,b=this,c=b.Backbone,d=Array.prototype.slice,e=Array.prototype.splice;a="undefined"!=typeof exports?exports:b.Backbone={},a.VERSION="0.9.2";var f=b._;f||"undefined"==typeof require||(f=require("underscore"));var g=b.jQuery||b.Zepto||b.ender;a.setDomLibrary=function(a){g=a},a.noConflict=function(){return b.Backbone=c,this},a.emulateHTTP=!1,a.emulateJSON=!1;var h=/\s+/,i=a.Events={on:function(a,b,c){var d,e,f,g,i;if(!b)return this;for(a=a.split(h),d=this._callbacks||(this._callbacks={});e=a.shift();)i=d[e],f=i?i.tail:{},f.next=g={},f.context=c,f.callback=b,d[e]={tail:g,next:i?i.next:f};return this},off:function(a,b,c){var d,e,g,i,j,k;if(e=this._callbacks){if(!(a||b||c))return delete this._callbacks,this;for(a=a?a.split(h):f.keys(e);d=a.shift();)if(g=e[d],delete e[d],g&&(b||c))for(i=g.tail;(g=g.next)!==i;)j=g.callback,k=g.context,(b&&j!==b||c&&k!==c)&&this.on(d,j,k);return this}},trigger:function(a){var b,c,e,f,g,i,j;if(!(e=this._callbacks))return this;for(i=e.all,a=a.split(h),j=d.call(arguments,1);b=a.shift();){if(c=e[b])for(f=c.tail;(c=c.next)!==f;)c.callback.apply(c.context||this,j);if(c=i)for(f=c.tail,g=[b].concat(j);(c=c.next)!==f;)c.callback.apply(c.context||this,g)}return this}};i.bind=i.on,i.unbind=i.off;var j=a.Model=function(a,b){var c;a||(a={}),b&&b.parse&&(a=this.parse(a)),(c=A(this,"defaults"))&&(a=f.extend({},c,a)),b&&b.collection&&(this.collection=b.collection),this.attributes={},this._escapedAttributes={},this.cid=f.uniqueId("c"),this.changed={},this._silent={},this._pending={},this.set(a,{silent:!0}),this.changed={},this._silent={},this._pending={},this._previousAttributes=f.clone(this.attributes),this.initialize.apply(this,arguments)};f.extend(j.prototype,i,{changed:null,_silent:null,_pending:null,idAttribute:"id",initialize:function(){},toJSON:function(a){return f.clone(this.attributes)},get:function(a){return this.attributes[a]},escape:function(a){var b;if(b=this._escapedAttributes[a])return b;var c=this.get(a);return this._escapedAttributes[a]=f.escape(null==c?"":""+c)},has:function(a){return null!=this.get(a)},set:function(a,b,c){var d,e,g;if(f.isObject(a)||null==a?(d=a,c=b):(d={},d[a]=b),c||(c={}),!d)return this;if(d instanceof j&&(d=d.attributes),c.unset)for(e in d)d[e]=void 0;if(!this._validate(d,c))return!1;this.idAttribute in d&&(this.id=d[this.idAttribute]);var h=c.changes={},i=this.attributes,k=this._escapedAttributes,l=this._previousAttributes||{};for(e in d)g=d[e],(!f.isEqual(i[e],g)||c.unset&&f.has(i,e))&&(delete k[e],(c.silent?this._silent:h)[e]=!0),c.unset?delete i[e]:i[e]=g,f.isEqual(l[e],g)&&f.has(i,e)==f.has(l,e)?(delete this.changed[e],delete this._pending[e]):(this.changed[e]=g,c.silent||(this._pending[e]=!0));return c.silent||this.change(c),this},unset:function(a,b){return(b||(b={})).unset=!0,this.set(a,null,b)},clear:function(a){return(a||(a={})).unset=!0,this.set(f.clone(this.attributes),a)},fetch:function(b){b=b?f.clone(b):{};var c=this,d=b.success;return b.success=function(a,e,f){return c.set(c.parse(a,f),b)?void(d&&d(c,a)):!1},b.error=a.wrapError(b.error,c,b),(this.sync||a.sync).call(this,"read",this,b)},save:function(b,c,d){var e,g;if(f.isObject(b)||null==b?(e=b,d=c):(e={},e[b]=c),d=d?f.clone(d):{},d.wait){if(!this._validate(e,d))return!1;g=f.clone(this.attributes)}var h=f.extend({},d,{silent:!0});if(e&&!this.set(e,d.wait?h:d))return!1;var i=this,j=d.success;d.success=function(a,b,c){var g=i.parse(a,c);return d.wait&&(delete d.wait,g=f.extend(e||{},g)),i.set(g,d)?void(j?j(i,a):i.trigger("sync",i,a,d)):!1},d.error=a.wrapError(d.error,i,d);var k=this.isNew()?"create":"update",l=(this.sync||a.sync).call(this,k,this,d);return d.wait&&this.set(g,h),l},destroy:function(b){b=b?f.clone(b):{};var c=this,d=b.success,e=function(){c.trigger("destroy",c,c.collection,b)};if(this.isNew())return e(),!1;b.success=function(a){b.wait&&e(),d?d(c,a):c.trigger("sync",c,a,b)},b.error=a.wrapError(b.error,c,b);var g=(this.sync||a.sync).call(this,"delete",this,b);return b.wait||e(),g},url:function(){var a=A(this,"urlRoot")||A(this.collection,"url")||B();return this.isNew()?a:a+("/"==a.charAt(a.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(a,b){return a},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},change:function(a){a||(a={});var b=this._changing;this._changing=!0;for(var c in this._silent)this._pending[c]=!0;var d=f.extend({},a.changes,this._silent);this._silent={};for(var c in d)this.trigger("change:"+c,this,this.get(c),a);if(b)return this;for(;!f.isEmpty(this._pending);){this._pending={},this.trigger("change",this,a);for(var c in this.changed)this._pending[c]||this._silent[c]||delete this.changed[c];this._previousAttributes=f.clone(this.attributes)}return this._changing=!1,this},hasChanged:function(a){return arguments.length?f.has(this.changed,a):!f.isEmpty(this.changed)},changedAttributes:function(a){if(!a)return this.hasChanged()?f.clone(this.changed):!1;var b,c=!1,d=this._previousAttributes;for(var e in a)f.isEqual(d[e],b=a[e])||((c||(c={}))[e]=b);return c},previous:function(a){return arguments.length&&this._previousAttributes?this._previousAttributes[a]:null},previousAttributes:function(){return f.clone(this._previousAttributes)},isValid:function(){return!this.validate(this.attributes)},_validate:function(a,b){if(b.silent||!this.validate)return!0;a=f.extend({},this.attributes,a);var c=this.validate(a,b);return c?(b&&b.error?b.error(this,c,b):this.trigger("error",this,c,b),!1):!0}});var k=a.Collection=function(a,b){b||(b={}),b.model&&(this.model=b.model),b.comparator&&(this.comparator=b.comparator),this._reset(),this.initialize.apply(this,arguments),a&&this.reset(a,{silent:!0,parse:b.parse})};f.extend(k.prototype,i,{model:j,initialize:function(){},toJSON:function(a){return this.map(function(b){return b.toJSON(a)})},add:function(a,b){var c,d,g,h,i,j,k={},l={},m=[];for(b||(b={}),a=f.isArray(a)?a.slice():[a],c=0,g=a.length;g>c;c++){if(!(h=a[c]=this._prepareModel(a[c],b)))throw new Error("Can't add an invalid model to a collection");i=h.cid,j=h.id,k[i]||this._byCid[i]||null!=j&&(l[j]||this._byId[j])?m.push(c):k[i]=l[j]=h}for(c=m.length;c--;)a.splice(m[c],1);for(c=0,g=a.length;g>c;c++)(h=a[c]).on("all",this._onModelEvent,this),this._byCid[h.cid]=h,null!=h.id&&(this._byId[h.id]=h);if(this.length+=g,d=null!=b.at?b.at:this.models.length,e.apply(this.models,[d,0].concat(a)),this.comparator&&this.sort({silent:!0}),b.silent)return this;for(c=0,g=this.models.length;g>c;c++)k[(h=this.models[c]).cid]&&(b.index=c,h.trigger("add",h,this,b));return this},remove:function(a,b){var c,d,e,g;for(b||(b={}),a=f.isArray(a)?a.slice():[a],c=0,d=a.length;d>c;c++)g=this.getByCid(a[c])||this.get(a[c]),g&&(delete this._byId[g.id],delete this._byCid[g.cid],e=this.indexOf(g),this.models.splice(e,1),this.length--,b.silent||(b.index=e,g.trigger("remove",g,this,b)),this._removeReference(g));return this},push:function(a,b){return a=this._prepareModel(a,b),this.add(a,b),a},pop:function(a){var b=this.at(this.length-1);return this.remove(b,a),b},unshift:function(a,b){return a=this._prepareModel(a,b),this.add(a,f.extend({at:0},b)),a},shift:function(a){var b=this.at(0);return this.remove(b,a),b},get:function(a){return null==a?void 0:this._byId[null!=a.id?a.id:a]},getByCid:function(a){return a&&this._byCid[a.cid||a]},at:function(a){return this.models[a]},where:function(a){return f.isEmpty(a)?[]:this.filter(function(b){for(var c in a)if(a[c]!==b.get(c))return!1;return!0})},sort:function(a){if(a||(a={}),!this.comparator)throw new Error("Cannot sort a set without a comparator");var b=f.bind(this.comparator,this);return 1==this.comparator.length?this.models=this.sortBy(b):this.models.sort(b),a.silent||this.trigger("reset",this,a),this},pluck:function(a){return f.map(this.models,function(b){return b.get(a)})},reset:function(a,b){a||(a=[]),b||(b={});for(var c=0,d=this.models.length;d>c;c++)this._removeReference(this.models[c]);return this._reset(),this.add(a,f.extend({silent:!0},b)),b.silent||this.trigger("reset",this,b),this},fetch:function(b){b=b?f.clone(b):{},void 0===b.parse&&(b.parse=!0);var c=this,d=b.success;return b.success=function(a,e,f){c[b.add?"add":"reset"](c.parse(a,f),b),d&&d(c,a)},b.error=a.wrapError(b.error,c,b),(this.sync||a.sync).call(this,"read",this,b)},create:function(a,b){var c=this;if(b=b?f.clone(b):{},a=this._prepareModel(a,b),!a)return!1;b.wait||c.add(a,b);var d=b.success;return b.success=function(e,f,g){b.wait&&c.add(e,b),d?d(e,f):e.trigger("sync",a,f,b)},a.save(null,b),a},parse:function(a,b){return a},chain:function(){return f(this.models).chain()},_reset:function(a){this.length=0,this.models=[],this._byId={},this._byCid={}},_prepareModel:function(a,b){if(b||(b={}),a instanceof j)a.collection||(a.collection=this);else{var c=a;b.collection=this,a=new this.model(c,b),a._validate(a.attributes,b)||(a=!1)}return a},_removeReference:function(a){this==a.collection&&delete a.collection,a.off("all",this._onModelEvent,this)},_onModelEvent:function(a,b,c,d){("add"!=a&&"remove"!=a||c==this)&&("destroy"==a&&this.remove(b,d),b&&a==="change:"+b.idAttribute&&(delete this._byId[b.previous(b.idAttribute)],this._byId[b.id]=b),this.trigger.apply(this,arguments))}});var l=["forEach","each","map","reduce","reduceRight","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","sortBy","sortedIndex","toArray","size","first","initial","rest","last","without","indexOf","shuffle","lastIndexOf","isEmpty","groupBy"];f.each(l,function(a){k.prototype[a]=function(){return f[a].apply(f,[this.models].concat(f.toArray(arguments)))}});var m=a.Router=function(a){a||(a={}),a.routes&&(this.routes=a.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},n=/:\w+/g,o=/\*\w+/g,p=/[-[\]{}()+?.,\\^$|#\s]/g;f.extend(m.prototype,i,{initialize:function(){},route:function(b,c,d){return a.history||(a.history=new q),f.isRegExp(b)||(b=this._routeToRegExp(b)),d||(d=this[c]),a.history.route(b,f.bind(function(e){var f=this._extractParameters(b,e);d&&d.apply(this,f),this.trigger.apply(this,["route:"+c].concat(f)),a.history.trigger("route",this,c,f)},this)),this},navigate:function(b,c){a.history.navigate(b,c)},_bindRoutes:function(){if(this.routes){var a=[];for(var b in this.routes)a.unshift([b,this.routes[b]]);for(var c=0,d=a.length;d>c;c++)this.route(a[c][0],a[c][1],this[a[c][1]])}},_routeToRegExp:function(a){return a=a.replace(p,"\\$&").replace(n,"([^/]+)").replace(o,"(.*?)"),new RegExp("^"+a+"$")},_extractParameters:function(a,b){return a.exec(b).slice(1)}});var q=a.History=function(){this.handlers=[],f.bindAll(this,"checkUrl")},r=/^[#\/]/,s=/msie [\w.]+/;q.started=!1,f.extend(q.prototype,i,{interval:50,getHash:function(a){var b=a?a.location:window.location,c=b.href.match(/#(.*)$/);return c?c[1]:""},getFragment:function(a,b){if(null==a)if(this._hasPushState||b){a=window.location.pathname;var c=window.location.search;c&&(a+=c)}else a=this.getHash();return a.indexOf(this.options.root)||(a=a.substr(this.options.root.length)),a.replace(r,"")},start:function(a){if(q.started)throw new Error("Backbone.history has already been started");q.started=!0,this.options=f.extend({},{root:"/"},this.options,a),this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&window.history&&window.history.pushState);var b=this.getFragment(),c=document.documentMode,d=s.exec(navigator.userAgent.toLowerCase())&&(!c||7>=c);d&&(this.iframe=g('";this.dialog=new cdb.ui.common.ShareDialog({title:a.map.get("title"),description:a.map.get("description"),model:this.options.vis.map,code:e,url:a.url,public_map_url:d,share_url:a.share_url,template:b,target:$(".cartodb-share a"),size:$(document).width()>400?"":"small",width:$(document).width()>400?430:216}),$(".cartodb-map-wrapper").append(this.dialog.render().$el),this.addView(this.dialog)},render:function(){return this.$el.html(this.template(_.extend(this.model.attributes))),this}}),cdb.geo.ui.Zoom=cdb.core.View.extend({className:"cartodb-zoom",events:{"click .zoom_in":"zoom_in","click .zoom_out":"zoom_out"},default_options:{timeout:0,msg:""},initialize:function(){this.map=this.model,_.defaults(this.options,this.default_options),this.template=this.options.template?this.options.template:cdb.templates.getTemplate("geo/zoom"),this.map.bind("change:zoom change:minZoom change:maxZoom",this._checkZoom,this)},render:function(){return this.$el.html(this.template(this.options)),this._checkZoom(),this},_checkZoom:function(){var a=this.map.get("zoom");this.$(".zoom_in")[athis.map.get("minZoom")?"removeClass":"addClass"]("disabled")},zoom_in:function(a){this.map.get("maxZoom")>this.map.getZoom()&&this.map.setZoom(this.map.getZoom()+1),a.preventDefault(),a.stopPropagation()},zoom_out:function(a){this.map.get("minZoom")\n
    <%- title %>
    <% } %>
    • <%- leftLabel %>
    • <%- rightLabel %>
    • <%= colors %>\n
    '),initialize:function(){this.items=this.model.items},_generateColorList:function(){var a="";if(this.model.get("colors"))return _.map(this.model.get("colors"),function(a){return'\n
    '}).join("");for(var b=2;b
    '}return a},setLeftLabel:function(a){this.model.set("leftLabel",a)},setRightLabel:function(a){this.model.set("rightLabel",a)},setColors:function(a){this.model.set("colors",a)},render:function(){if(this.model.get("template")){var a=_.template(cdb.core.sanitize.html(this.model.get("template"),this.model.get("sanitizeTemplate")));this.$el.html(a(this.model.toJSON()))}else if(this.items.length>=2){this.leftLabel=this.items.at(0),this.rightLabel=this.items.at(1);var b=this.model.get("leftLabel")||this.leftLabel.get("value"),c=this.model.get("rightLabel")||this.rightLabel.get("value"),d=this._generateColorList(),e=_.extend(this.model.toJSON(),{leftLabel:b,rightLabel:c,colors:d,buckets_count:d.length});this.$el.html(this.template(e))}return this}}),cdb.geo.ui.DensityLegend=cdb.geo.ui.BaseLegend.extend({className:"density-legend",template:_.template('<% if (title && show_title) { %>\n
    <%- title %>
    <% } %>
    • <%- leftLabel %>
    • <%- rightLabel %>
    • <%= colors %>\n
    '),initialize:function(){this.items=this.model.items},setLeftLabel:function(a){this.model.set("leftLabel",a)},setRightLabel:function(a){this.model.set("rightLabel",a)},setColors:function(a){this.model.set("colors",a)},_generateColorList:function(){var a="";if(this.model.get("colors"))return _.map(this.model.get("colors"),function(a){return'\n
    '}).join("");for(var b=2;b'}return a},render:function(){if(this.model.get("template")){var a=_.template(cdb.core.sanitize.html(this.model.get("template"),this.model.get("sanitizeTemplate")));this.$el.html(a(this.model.toJSON()))}else if(this.items.length>=2){this.leftLabel=this.items.at(0),this.rightLabel=this.items.at(1);var b=this.model.get("leftLabel")||this.leftLabel.get("value"),c=this.model.get("rightLabel")||this.rightLabel.get("value"),d=this._generateColorList(),e=_.extend(this.model.toJSON(),{leftLabel:b,rightLabel:c,colors:d,buckets_count:d.length});this.$el.html(this.template(e))}return this}}),cdb.geo.ui.Legend.Density=cdb.geo.ui.DensityLegend.extend({type:"density",className:"cartodb-legend density",initialize:function(){this.items=this.options.items,this.model=new cdb.geo.ui.LegendModel({type:this.type,title:this.options.title,show_title:this.options.title?!0:!1,leftLabel:this.options.left||this.options.leftLabel,rightLabel:this.options.right||this.options.rightLabel,colors:this.options.colors,buckets_count:this.options.colors?this.options.colors.length:0,items:this.options.items}),this._bindModel()},_bindModel:function(){this.model.bind("change:colors change:template change:title change:show_title change:colors change:leftLabel change:rightLabel",this.render,this)},_generateColorList:function(){return _.map(this.model.get("colors"),function(a){return'
    '}).join("")},render:function(){var a=_.extend(this.model.toJSON(),{colors:this._generateColorList()});return this.$el.html(this.template(a)),this}}),cdb.geo.ui.IntensityLegend=cdb.geo.ui.BaseLegend.extend({className:"intensity-legend",template:_.template('<% if (title && show_title) { %>\n
    <%- title %>
    <% } %>
    • <%- leftLabel %>
    • <%- rightLabel %>
    '),initialize:function(){this.items=this.model.items},_bindModel:function(){this.model.bind("change:template",this.render,this)},setColor:function(a){this.model.set("color",a)},setLeftLabel:function(a){this.model.set("leftLabel",a)},setRightLabel:function(a){this.model.set("rightLabel",a)},_hexToRGB:function(a){var b=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return b?{r:parseInt(b[1],16),g:parseInt(b[2],16),b:parseInt(b[3],16)}:null},_rgbToHex:function(a,b,c){function d(a){var b=a.toString(16);return 1==b.length?"0"+b:b}return"#"+d(a)+d(b)+d(c)},_calculateMultiply:function(a,b){var c=this._hexToRGB(a);if(c){for(var d=c.r,e=c.g,f=c.b,g=0;b>=g;g++)d=Math.round(d*c.r/255),e=Math.round(e*c.g/255),f=Math.round(f*c.b/255);return this._rgbToHex(d,e,f)}return"#ffffff"},_renderGraph:function(a){var b="";b+="background: <%= color %>;",b+="background: -moz-linear-gradient(left, <%= color %> 0%, <%= right %> 100%);",b+="background: -webkit-gradient(linear, left top, right top, color-stop(0%,<%= color %>), color-stop(100%,<%= right %>));",b+="background: -webkit-linear-gradient(left, <%= color %> 0%,<%= right %> 100%);",b+="background: -o-linear-gradient(left, <%= color %> 0%,<%= right %> 100%);", -b+="background: -ms-linear-gradient(left, <%= color %> 0%,<%= right %> 100%)",b+="background: linear-gradient(to right, <%= color %> 0%,<%= right %> 100%);",b+="filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='<%= color %>', endColorstr='<%= right %>',GradientType=1 );",b+="background-image: -ms-linear-gradient(left, <%= color %> 0%,<%= right %> 100%)";var c=_.template(b),d=this._calculateMultiply(a,4);this.$el.find(".graph").attr("style",c({color:a,right:d}))},render:function(){if(this.model.get("template")){var a=_.template(cdb.core.sanitize.html(this.model.get("template"),this.model.get("sanitizeTemplate")));this.$el.html(a(this.model.toJSON()))}else if(this.items.length>=3){this.leftLabel=this.items.at(0),this.rightLabel=this.items.at(1);var b=this.model.get("color")||this.items.at(2).get("value"),c=this.model.get("leftLabel")||this.leftLabel.get("value"),d=this.model.get("rightLabel")||this.rightLabel.get("value"),e=_.extend(this.model.toJSON(),{color:b,leftLabel:c,rightLabel:d});this.$el.html(this.template(e)),this._renderGraph(b)}return this}}),cdb.geo.ui.CategoryLegend=cdb.geo.ui.BaseLegend.extend({className:"category-legend",template:_.template('<% if (title && show_title) { %>\n
    <%- title %>
    <% } %>
      '),initialize:function(){this.items=this.model.items},_bindModel:function(){this.model.bind("change:title change:show_title change:template",this.render,this)},_renderItems:function(){this.items.each(this._renderItem,this)},_renderItem:function(a){view=new cdb.geo.ui.LegendItem({model:a,className:a.get("value")&&a.get("value").indexOf("http")>=0||a.get("type")&&"image"==a.get("type")?"bkg":"",template:'
      <%- name || ((name === false) ? "false": "null") %>'}),this.$el.find("ul").append(view.render())},render:function(){if(this.model.get("template")){var a=_.template(cdb.core.sanitize.html(this.model.get("template"),this.model.get("sanitizeTemplate")));this.$el.html(a(this.model.toJSON()))}else this.$el.html(this.template(this.model.toJSON())),this.items.length>0?this._renderItems():this.$el.html('
      The category legend is empty
      ');return this}}),cdb.geo.ui.Legend.Category=cdb.geo.ui.CategoryLegend.extend({className:"cartodb-legend category",type:"category",initialize:function(){this.items=new cdb.geo.ui.LegendItems(this.options.data),this.model=new cdb.geo.ui.LegendModel({type:this.type,title:this.options.title,show_title:this.options.title?!0:!1}),this._bindModel()},render:function(){return this.$el.html(this.template(this.model.toJSON())),this._renderItems(),this}}),cdb.geo.ui.ColorLegend=cdb.geo.ui.BaseLegend.extend({className:"color-legend",type:"color",template:_.template('<% if (title && show_title) { %>\n
      <%- title %>
      <% } %>
        '),initialize:function(){this.items=this.model.items},_renderItems:function(){this.items.each(this._renderItem,this)},_renderItem:function(a){view=new cdb.geo.ui.LegendItem({model:a,className:a.get("value")&&a.get("value").indexOf("http")>=0?"bkg":"",template:'
        <%- name || ((name === false) ? "false": "null") %>'}),this.$el.find("ul").append(view.render())},render:function(){return this.$el.html(this.template(this.model.toJSON())),this.items.length>0?this._renderItems():this.$el.html('
        The color legend is empty
        '),this}}),cdb.geo.ui.Legend.Color=cdb.geo.ui.Legend.Category.extend({}),cdb.geo.ui.StackedLegend=cdb.core.View.extend({events:{dragstart:"_stopPropagation",mousedown:"_stopPropagation",touchstart:"_stopPropagation",MSPointerDown:"_stopPropagation",dblclick:"_stopPropagation",mousewheel:"_stopPropagation",DOMMouseScroll:"_stopPropagation",dbclick:"_stopPropagation",click:"_stopPropagation"},className:"cartodb-legend-stack",initialize:function(){_.each(this.options.legends,this._setupBinding,this)},_stopPropagation:function(a){a.stopPropagation()},getLegendByIndex:function(a){if(!this._layerByIndex){this._layerByIndex={};for(var b=this.options.legends,c=0;c0&&this.legendItems.each(this._renderLegend,this),this},_renderLegend:function(a){var b=a.get("type");b||(b="custom"),b=this._capitalize(b);var c=new cdb.geo.ui.Legend[b](a.attributes);this.legends.push(c),a.get("visible")!==!1&&this.$el.append(c.render().$el)},getLegendAt:function(a){return this.legends[a]},addLegend:function(a){var b=new cdb.geo.ui.LegendModel(a);this.legendItems.push(b)},removeLegendAt:function(a){var b=this.legendItems.at(a);this.legendItems.remove(b)}}),cdb.geo.ui.CustomLegend=cdb.geo.ui.BaseLegend.extend({className:"custom-legend",type:"custom",template:_.template('<% if (title && show_title) { %>\n
        <%- title %>
        <% } %>
          '),initialize:function(){this.items=this.model.items},setData:function(a){this.items=new cdb.geo.ui.LegendItems(a),this.model.items=this.items,this.model.set("items",a)},_renderItems:function(){this.items.each(this._renderItem,this)},_renderItem:function(a){var b=this.options.itemTemplate||'
          \n <%- name || "null" %>';view=new cdb.geo.ui.LegendItem({model:a,className:a.get("value")&&a.get("value").indexOf("http")>=0?"bkg":"",template:b}),this.$el.find("ul").append(view.render())},render:function(){if(this.model.get("template")){var a=_.template(cdb.core.sanitize.html(this.model.get("template"),this.model.get("sanitizeTemplate")));this.$el.html(a(this.model.toJSON()))}else this.$el.html(this.template(this.model.toJSON())),this.items.length>0?this._renderItems():this.$el.html('
          The legend is empty
          ');return this}}),cdb.geo.ui.Legend.Custom=cdb.geo.ui.CustomLegend.extend({className:"cartodb-legend custom",type:"custom",initialize:function(){this.items=new cdb.geo.ui.LegendItems(this.options.data||this.options.items),this.model=new cdb.geo.ui.LegendModel({type:this.type,title:this.options.title,show_title:this.options.title?!0:!1,items:this.items.models,template:this.options.template}),this._bindModel()},_bindModel:function(){this.model.bind("change:items change:template change:title change:show_title",this.render,this)}}),cdb.geo.ui.BubbleLegend=cdb.geo.ui.BaseLegend.extend({className:"bubble-legend",template:_.template('<% if (title && show_title) { %>\n
          <%- title %>
          <% } %>
          • <%- min %>
          • <%- max %>
          '),initialize:function(){this.items=this.model.items},_bindModel:function(){this.model.bind("change:template change:title change:show_title change:color change:min change:max",this.render,this)},setColor:function(a){this.model.set("color",a)},setMinValue:function(a){this.model.set("min",a)},setMaxValue:function(a){this.model.set("max",a)},_renderGraph:function(a){this.$el.find(".graph").css("background",a)},render:function(){if(this.model.get("template")){var a=_.template(cdb.core.sanitize.html(this.model.get("template"),this.model.get("sanitizeTemplate")));this.$el.html(a(this.model.toJSON())),this.$el.removeClass("bubble-legend")}else{var b=this.model.get("color")||(this.items.length>=3?this.items.at(2).get("value"):"");if(this.items.length>=3){var c=this.model.get("min")||this.items.at(0).get("value"),d=this.model.get("max")||this.items.at(1).get("value"),e=_.extend(this.model.toJSON(),{min:c,max:d});this.$el.html(this.template(e))}this._renderGraph(b)}return this}}),cdb.geo.ui.Legend.Bubble=cdb.geo.ui.BubbleLegend.extend({className:"cartodb-legend bubble",type:"bubble",initialize:function(){this.model=new cdb.geo.ui.LegendModel({type:this.type,title:this.options.title,min:this.options.min,max:this.options.max,color:this.options.color,show_title:this.options.title?!0:!1}),this.add_related_model(this.model),this._bindModel()},render:function(){return this.$el.html(this.template(this.model.toJSON())),this._renderGraph(this.model.get("color")),this}}),cdb.geo.ui.Legend.Choropleth=cdb.geo.ui.ChoroplethLegend.extend({type:"choropleth",className:"cartodb-legend choropleth",initialize:function(){this.items=this.options.items,this.model=new cdb.geo.ui.LegendModel({type:this.type,title:this.options.title,show_title:this.options.title?!0:!1,leftLabel:this.options.left||this.options.leftLabel,rightLabel:this.options.right||this.options.rightLabel,colors:this.options.colors,buckets_count:this.options.colors?this.options.colors.length:0}),this.add_related_model(this.model),this._bindModel()},_bindModel:function(){this.model.bind("change:template change:title change:show_title change:colors change:leftLabel change:rightLabel",this.render,this)},_generateColorList:function(){return _.map(this.model.get("colors"),function(a){return'
          '}).join("")},render:function(){var a=_.extend(this.model.toJSON(),{colors:this._generateColorList()});return this.$el.html(this.template(a)),this}}),cdb.geo.ui.Legend.Intensity=cdb.geo.ui.IntensityLegend.extend({className:"cartodb-legend intensity",type:"intensity",initialize:function(){this.items=this.options.items,this.model=new cdb.geo.ui.LegendModel({type:this.type,title:this.options.title,show_title:this.options.title?!0:!1,color:this.options.color,leftLabel:this.options.left||this.options.leftLabel,rightLabel:this.options.right||this.options.rightLabel}),this.add_related_model(this.model),this._bindModel()},_bindModel:function(){this.model.bind("change:title change:show_title change:color change:leftLabel change:rightLabel",this.render,this)},render:function(){return this.$el.html(this.template(this.model.toJSON())),this._renderGraph(this.model.get("color")),this}}),cdb.geo.ui.SwitcherItemModel=Backbone.Model.extend({}),cdb.geo.ui.SwitcherItems=Backbone.Collection.extend({model:cdb.geo.ui.SwitcherItemModel}),cdb.geo.ui.SwitcherItem=cdb.core.View.extend({tagName:"li",events:{"click a":"select"},initialize:function(){_.bindAll(this,"render"),this.template=cdb.templates.getTemplate("templates/map/switcher/item"),this.parent=this.options.parent,this.model.on("change:selected",this.render)},select:function(a){a.preventDefault(),this.parent.toggle(this);var b=this.model.get("callback");b&&b()},render:function(){return 1==this.model.get("selected")?this.$el.addClass("selected"):this.$el.removeClass("selected"),this.$el.html(this.template(this.model.toJSON())),this.$el}}),cdb.geo.ui.Switcher=cdb.core.View.extend({id:"switcher",default_options:{},initialize:function(){this.map=this.model,this.add_related_model(this.model),_.bindAll(this,"render","show","hide","toggle"),_.defaults(this.options,this.default_options),this.collection&&(this.model.collection=this.collection),this.template=this.options.template?this.options.template:cdb.templates.getTemplate("geo/switcher")},show:function(){this.$el.fadeIn(250)},hide:function(){this.$el.fadeOut(250)},toggle:function(a){this.collection&&this.collection.each(function(a){a.set("selected",!a.get("selected"))})},render:function(){var a=this;return void 0!=this.model&&this.$el.html(this.template(this.model.toJSON())),this.collection&&this.collection.each(function(b){var c=new cdb.geo.ui.SwitcherItem({parent:a,className:b.get("className"),model:b});a.$el.find("ul").append(c.render())}),this}}),cdb.geo.ui.InfowindowModel=Backbone.Model.extend({SYSTEM_COLUMNS:["the_geom","the_geom_webmercator","created_at","updated_at","cartodb_id","cartodb_georef_status"],defaults:{template_name:"infowindow_light",latlng:[0,0],offset:[28,0],maxHeight:180,autoPan:!0,template:"",content:"",visibility:!1,alternative_names:{},fields:null},clearFields:function(){this.set({fields:[]})},saveFields:function(a){a=a||"old_fields",this.set(a,_.clone(this.get("fields")))},fieldCount:function(){var a=this.get("fields");return a?a.length:0},restoreFields:function(a,b){b=b||"old_fields";var c=this.get(b);a&&(c=c.filter(function(b){return _.contains(a,b.name)})),c&&c.length&&this._setFields(c),this.unset(b)},_cloneFields:function(){return _(this.get("fields")).map(function(a){return _.clone(a)})},_setFields:function(a){a.sort(function(a,b){return a.position-b.position}),this.set({fields:a})},sortFields:function(){this.get("fields").sort(function(a,b){return a.position-b.position})},_addField:function(a,b){var c=$.Deferred();if(!this.containsField(a)){var d=this.get("fields");d?(b=void 0===b?d.length:b,d.push({name:a,title:!0,position:b})):(b=void 0===b?0:b,this.set("fields",[{name:a,title:!0,position:b}],{silent:!0}))}return c.resolve(),c.promise()},addField:function(a,b){var c=this;return $.when(this._addField(a,b)).then(function(){c.sortFields(),c.trigger("change:fields"),c.trigger("add:fields")}),this},getFieldProperty:function(a,b){if(this.containsField(a)){var c=this.get("fields")||[],d=_.indexOf(_(c).pluck("name"),a);return c[d][b]}return null},setFieldProperty:function(a,b,c){if(this.containsField(a)){var d=this._cloneFields()||[],e=_.indexOf(_(d).pluck("name"),a);d[e][b]=c,this._setFields(d)}return this},getAlternativeName:function(a){return this.get("alternative_names")&&this.get("alternative_names")[a]},setAlternativeName:function(a,b){var c=this.get("alternative_names")||[];c[a]=b,this.set({alternative_names:c}),this.trigger("change:alternative_names")},getFieldPos:function(a){var b=this.getFieldProperty(a,"position");return void 0==b?Number.MAX_VALUE:b},containsAlternativeName:function(a){var b=this.get("alternative_names")||[];return b[a]},containsField:function(a){var b=this.get("fields")||[];return _.contains(_(b).pluck("name"),a)},removeField:function(a){if(this.containsField(a)){var b=this._cloneFields()||[],c=_.indexOf(_(b).pluck("name"),a);c>=0&&b.splice(c,1),this._setFields(b),this.trigger("remove:fields")}return this},updateContent:function(a){var b=this.get("fields");this.set("content",cdb.geo.ui.InfowindowModel.contentForFields(a,b))},closeInfowindow:function(){this.get("visibility")&&(this.set("visibility",!1),this.trigger("close"))}},{contentForFields:function(a,b,c){c=c||{};for(var d=[],e=0;e0&&null!=a.data()&&a.data().jsp&&a.data().jsp.destroy();var b=_.map(this.model.attributes.content.fields,function(a){return _.clone(a)}),c=this.model.get("content")?this.model.get("content").data:{};if(this.model.get("template_name")){var d=_.clone(this.model.attributes.template_name);b=this._fieldsToString(b,d)}var e={};_.each(this.model.get("content").fields,function(a){e[a.title]=a.value});var f=_.extend({content:{fields:b,data:c}},e);this.$el.html(cdb.core.sanitize.html(this.template(f),this.model.get("sanitizeTemplate"))),this.model.get("width")&&this.$(".cartodb-popup").css("width",this.model.get("width")+"px"),this.$(".cartodb-popup .cartodb-popup-content").css("max-height",this.model.get("maxHeight")+"px");var g=this;setTimeout(function(){var a=g.$(".cartodb-popup-content").outerHeight();g.model.get("maxHeight")<=a&&g.$(".cartodb-popup-content").jScrollPane({verticalDragMinHeight:20,autoReinitialise:!0})},1),this._checkLoading(),this._loadCover(),this.isLoadingData()||(this.model.trigger("domready",this,this.$el),this.trigger("domready",this,this.$el))}return this},_getModelTemplate:function(){return this.model.get("template_name")},_setTemplate:function(){this.model.get("template_name")&&(this.template=cdb.templates.getTemplate(this._getModelTemplate()),this.render())},_compileTemplate:function(){var a=this.model.get("template")?this.model.get("template"):cdb.templates.getTemplate(this._getModelTemplate());"function"!=typeof a?this.template=new cdb.core.Template({template:a,type:this.model.get("template_type")||"mustache"}).asFunction():this.template=a,this.render()},_checkOrigin:function(a){var b=$(a.target).closest(".jspVerticalBar").length>0&&"touchstart"!=a.type;b||a.stopPropagation()},_fieldsToString:function(a,b){var c=[];if(a&&a.length>0){var d=this;c=_.map(a,function(a,c){return d._sanitizeField(a,b,a.index||c)})}return c},_sanitizeField:function(a,b,c){(null==a.value||void 0==a.value)&&(a.value="");var d=this.model.getAlternativeName(a.title);a.title&&d?a.title=d:a.title&&(a.title=a.title.replace(/_/g," "));var e=a.value.toString();return!a.type&&0==c&&a.value.length>35&&b&&-1!=b.search("_header_")&&(e=a.value.substr(0,32)+"..."),!a.type&&1==c&&a.value.length>35&&b&&-1!=b.search("_header_with_image")&&(e=a.value.substr(0,32)+"..."),this._isValidURL(a.value)&&(e=""+e+""),0==c&&-1!=b.search("_header_with_image")&&(e=a.value),a.value=e,a},isLoadingData:function(){var a=this.model.get("content");return a.fields&&1==a.fields.length&&"loading"===a.fields[0].type},_checkLoading:function(){this.isLoadingData()?this._startSpinner():this._stopSpinner()},_stopSpinner:function(){this.spinner&&this.spinner.stop()},_startSpinner:function(a){this._stopSpinner();var a=this.$el.find(".loading");if(a){var b=-1!=this.model.get("template_name").search("dark");b?this.spin_options.color="#FFF":this.spin_options.color="rgba(0,0,0,0.5)",this.spinner=new Spinner(this.spin_options).spin(),a.append(this.spinner.el)}},_containsCover:function(){return this.$el.find(".cartodb-popup.header").attr("data-cover")?!0:!1},_getCoverURL:function(){var a=this.model.get("content");return a&&a.fields&&a.fields.length>0?(a.fields[0].value||"").toString():!1},_loadCover:function(){if(this._containsCover()){var a=this.$(".cover"),b=a.find("img"),c=this.$(".shadow"),d=this._getCoverURL();if(!this._isValidURL(d))return b.hide(),c.hide(),void cdb.log.info("Header image url not valid");var e=document.getElementById("spinner"),f={lines:9,length:4,width:2,radius:4,corners:1,rotate:0,color:"#ccc",speed:1,trail:60,shadow:!0,hwaccel:!1,zIndex:2e9},g=new Spinner(f).spin(e);b.hide(function(){this.remove()}),b=$("").attr("src",d),a.append(b),b.load(function(){g.stop();var c=b.width(),d=b.height(),e=a.width(),f=a.height(),h=d/c,i=f/e;if(c>e&&d>f)if(i>h)b.css({height:f});else{var j=d/(c/e);b.css({width:e,top:"50%",position:"absolute","margin-top":-1*parseInt(j,10)/2})}else{var j=d/(c/e);b.css({width:e,top:"50%",position:"absolute","margin-top":-1*parseInt(j,10)/2})}b.fadeIn(300)}).error(function(){g.stop()})}},_isValidURL:function(a){if(a){var b=/^(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-|]*[\w@?^=%&\/~+#-])?$/;return null!=String(a).match(b)?!0:!1}return!1},toggle:function(){this.model.get("visibility")?this.show():this.hide()},_stopBubbling:function(a){a.preventDefault(),a.stopPropagation()},_stopPropagation:function(a){a.stopPropagation()},setLoading:function(){return this.model.set({content:{fields:[{title:null,alternative_name:null,value:"Loading content...",index:null,type:"loading"}],data:{}}}),this},setError:function(){return this.model.set({content:{fields:[{title:null,alternative_name:null,value:"There has been an error...",index:null,type:"error"}],data:{}}}),this},setLatLng:function(a){return this.model.set("latlng",a),this},_closeInfowindow:function(a){a&&(a.preventDefault(),a.stopPropagation()),this.model.get("visibility")&&(this.model.set("visibility",!1),this.trigger("close"))},showInfowindow:function(){this.model.set("visibility",!0)},show:function(a){var b=this;this.model.get("visibility")&&(b.$el.css({left:-5e3}),b._update(a))},isHidden:function(){return!this.model.get("visibility")},hide:function(a){(a||!this.model.get("visibility"))&&this._animateOut()},_update:function(a){if(!this.isHidden()){var b=0;if(!a)var b=this.adjustPan();this._updatePosition(),this._animateIn(b)}},_animateIn:function(a){!cdb.core.util.ie||cdb.core.util.browser.ie&&cdb.core.util.browser.ie.version>8?(this.$el.css({marginBottom:"-10px",display:"block",visibility:"visible",opacity:0}),this.$el.delay(a).animate({opacity:1,marginBottom:0},300)):this.$el.show()},_animateOut:function(){if(!$.browser.msie||$.browser.msie&&parseInt($.browser.version)>8){var a=this;this.$el.animate({marginBottom:"-10px",opacity:"0",display:"block"},180,function(){a.$el.css({visibility:"hidden"})})}else this.$el.hide()},_updatePosition:function(){if(!this.isHidden()){var a=this.model.get("offset"),b=this.mapView.latLonToPixel(this.model.get("latlng")),c=(this.$el.position().left,this.$el.position().top,this.$el.outerHeight(!0),this.$el.width(),b.x-a[0]),d=this.mapView.getSize(),e=-1*(b.y-a[1]-d.y);this.$el.css({bottom:e,left:c})}},adjustPan:function(){var a=this.model.get("offset");if(this.model.get("autoPan")&&!this.isHidden()){var b=(this.$el.position().left,this.$el.position().top,this.$el.outerHeight(!0)+15),c=this.$el.width(),d=this.mapView.latLonToPixel(this.model.get("latlng")),e={x:0,y:0};return size=this.mapView.getSize(),wait_callback=0,d.x-a[0]<0&&(e.x=d.x-a[0]-10),d.x-a[0]+c>size.x&&(e.x=d.x+c-size.x-a[0]+10),d.y-b<0&&(e.y=d.y-b-10),d.y-b>size.y&&(e.y=d.y+b-size.y),(e.x||e.y)&&(this.mapView.panBy(e),wait_callback=300),wait_callback}}}),cdb.geo.ui.Header=cdb.core.View.extend({className:"cartodb-header",initialize:function(){var a=this.model.get("extra");this.model.set({title:a.title,description:a.description,show_title:a.show_title,show_description:a.show_description},{silent:!0})},show:function(){var a=this.model.get("title")&&this.model.get("show_title"),b=this.model.get("description")&&this.model.get("show_description");(a||b)&&(this.$el.show(),a&&this.$el.find(".content div.title").show(),b&&this.$el.find(".content div.description").show())},_setLinksTarget:function(a){if(!a)return a;var b=new RegExp(/<(a)([^>]+)>/g);return a.replace(b,'<$1 target="_blank"$2>')},render:function(){var a=_.clone(this.model.attributes);return a.title=cdb.core.sanitize.html(a.title),a.description=this._setLinksTarget(cdb.core.sanitize.html(a.description)),this.$el.html(this.options.template(a)),this.options.slides&&(this.slides_controller=new cdb.geo.ui.SlidesController({transitions:this.options.transitions,slides:this.options.slides}),this.$el.append(this.slides_controller.render().$el)),this.model.get("show_title")||this.model.get("show_description")?this.show():this.hide(),this}}),cdb.geo.ui.Search=cdb.core.View.extend({className:"cartodb-searchbox",_ZOOM_BY_CATEGORY:{building:18,"postal-area":15,venue:18,region:8,address:18,country:5,county:8,locality:12,localadmin:11,neighbourhood:15,"default":12},events:{"click input[type='text']":"_onFocus","submit form":"_onSubmit",click:"_stopPropagation",dblclick:"_stopPropagation",mousedown:"_stopPropagation"},options:{searchPin:!0,infowindowTemplate:'
          x

          {{ address }}

          ',infowindowWidth:186,infowindowOffset:[93,90],iconUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAfCAYAAADXwvzvAAACuklEQVR4Ae3PQ+AsNxzA8e8vo/Xus237vVN9qW3b7qW2bdu2caxt29bu/meSmaTpqW63Pfc7wemTZPh9K/Xv3zhzxIgVrho0aMsLGo2N9o+iuYDwV02E5NJpM7d5fMGC515dMP/7l6dNMc+OGJY9Uq99cVMc33I4LOJXCQBQuXPBglNnDRm0Xa1RAWewP3yL/vJLul99Q/pNm0/b+qsnbLHngXAVgAI4b9KkXWc1m9vV58ykst56lKdMptyokdTKRJUIV1MMTGTgbOTknWABgFo2SSbOjuN9wlgIBrSIJ0yiVG9QUgGxUigRRAlpCQYrBs+A/QClliuXV6ppPVibDPPqi5irL8G+/QY2S3FZhityrLNYBWkAI2G5WTA2nGTthKDTJfP/FH1sCb76nNBa7I8/knba6Eyj8wJjLbk4qlCdAFNClWXKiiL72kGRUkSRhwUuTUm7XTqZ3z3KnMM7QhAFUfiKMZ9OQci+ydFFH32BIsDh8hxjDF2T0y0KtHHUczCg34P3wgesfWhZozstW1R/cJpuohA8dI7cWrSfxqM4gwEOnoJnn4HXBVDHwHnriNr2W3G0I8FEkKufMbjcIw1DC+iCuRw2OBduEYAKDD8drlkGlk6BHwAtIEDioD/QBnsnnHAI7A9YAAAGenwEnPuAd8+DewHcS+CeB3szvL0b7ADE/FWzYf5BCxa9dMvqa7oLll7WbTlsxKkDYRi9dPqhRz743L0PuKtOPMXtutHmm/InKf5Y6Co15Upl8qSCqVajXiEeUTRb6GqNIojoGaLEDwEA6B0KIKL8lH8JBeS/3AgK73qAPfc/tCLiAACUCmyvsJHnphwEAYFStNs/NoHgn2ATWPmlF54b/9GHH/Khn88/+9SywJx/+q0SsKTZbB45d/6CO0aNHnutv3kbYDQg9JAAIRDwF/0EjlkjUi3fkAMAAAAASUVORK5CYII=",iconAnchor:[7,31]},initialize:function(){this.mapView=this.options.mapView,this.template=this.options.template},render:function(){return this.$el.html(this.template(this.options)),this},_stopPropagation:function(a){a&&a.stopPropagation()},_onFocus:function(a){a&&(a.preventDefault(),$(a.target).focus())},_showLoader:function(){this.$("span.loader").show()},_hideLoader:function(){this.$("span.loader").hide()},_onSubmit:function(a){a.preventDefault();var b=this,c=this.$("input.text").val();c&&(this._showLoader(),this._destroySearchPin(),cdb.geo.geocoder.MAPZEN.geocode(c,function(a){b._onResult(a),b._hideLoader()}))},_onResult:function(a){var b="",c=this.$("input.text").val();if(a&&a.length>0){var d=a[0],e=this._isBBoxValid(d);if(e){var f=parseFloat(d.boundingbox.south),g=parseFloat(d.boundingbox.west),h=parseFloat(d.boundingbox.north),i=parseFloat(d.boundingbox.east),j=(g+i)/2,k=(f+h)/2;b=[k,j],this.model.setBounds([[f,g],[h,i]])}d.lat&&d.lon&&(b=[d.lat,d.lon]),e||(this.model.setCenter(b),this.model.setZoom(this._getZoomByCategory(d.type))),this.options.searchPin&&this._createSearchPin(b,c)}},_getZoomByCategory:function(a){return a&&this._ZOOM_BY_CATEGORY[a]?this._ZOOM_BY_CATEGORY[a]:this._ZOOM_BY_CATEGORY["default"]},_isBBoxValid:function(a){return a.boundingbox&&a.boundingbox.south!=a.boundingbox.north&&a.boundingbox.east!=a.boundingbox.west?!0:!1},_createSearchPin:function(a,b){this._destroySearchPin(),this._createPin(a,b),this._createInfowindow(a,b),this._bindEvents()},_destroySearchPin:function(){this._unbindEvents(),this._destroyPin(),this._destroyInfowindow()},_createInfowindow:function(a,b){var c=new cdb.geo.ui.InfowindowModel({template:this.options.infowindowTemplate,latlng:a,width:this.options.infowindowWidth,offset:this.options.infowindowOffset,content:{fields:[{title:"address",value:b}]}});this._searchInfowindow=new cdb.geo.ui.Infowindow({model:c,mapView:this.mapView}),this.mapView.$el.append(this._searchInfowindow.el),c.set("visibility",!0)},_destroyInfowindow:function(){if(this._searchInfowindow){this._searchInfowindow.hide(!0);var a=this._searchInfowindow;setTimeout(function(){a.clean()},1e3)}},_createPin:function(a,b){this._searchPin=this.mapView._addGeomToMap(new cdb.geo.Geometry({geojson:{type:"Point",coordinates:[a[1],a[0]]},iconUrl:this.options.iconUrl,iconAnchor:this.options.iconAnchor}))},_toggleSearchInfowindow:function(){var a=this._searchInfowindow.model.get("visibility");this._searchInfowindow.model.set("visibility",!a)},_destroyPin:function(){this._searchPin&&(this.mapView._removeGeomFromMap(this._searchPin),delete this._searchPin)},_bindEvents:function(){this._searchPin&&this._searchPin.bind("click",this._toggleSearchInfowindow,this),this.mapView.bind("click",this._destroySearchPin,this)},_unbindEvents:function(){this._searchPin&&this._searchPin.unbind("click",this._toggleSearchInfowindow,this),this.mapView.unbind("click",this._destroySearchPin,this)},clean:function(){this._unbindEvents(),this._destroySearchPin(),this.elder("clean")}}),cdb.geo.ui.LayerSelector=cdb.core.View.extend({className:"cartodb-layer-selector-box",events:{click:"_openDropdown",dblclick:"killEvent",mousedown:"killEvent"},initialize:function(){this.map=this.options.mapView.map,this.mapView=this.options.mapView,this.mapView.bind("click zoomstart drag",function(){this.dropdown&&this.dropdown.hide()},this),this.add_related_model(this.mapView),this.layers=[]},render:function(){return this.$el.html(this.options.template(this.options)),this.dropdown=new cdb.ui.common.Dropdown({className:"cartodb-dropdown border",template:this.options.dropdown_template,target:this.$el.find("a"),speedIn:300,speedOut:200,position:"position",tick:"right",vertical_position:"down",horizontal_position:"right",vertical_offset:7,horizontal_offset:13}),cdb.god&&cdb.god.bind("closeDialogs",this.dropdown.hide,this.dropdown),this.$el.append(this.dropdown.render().el),this._getLayers(),this._setCount(),this},_getLayers:function(){var a=this;this.layers=[],_.each(this.map.layers.models,function(b){if("layergroup"==b.get("type")||"namedmap"===b.get("type"))for(var c=a.mapView.getLayerByCid(b.cid),d=0;db;++b){var d=this.layers[b];d.model.get("visible")&&a++}this.$(".count").text(a),this.trigger("switchChanged",this)},_openDropdown:function(){this.dropdown.open()}}),cdb.geo.ui.LayerView=cdb.core.View.extend({tagName:"li",defaults:{template:' <%- layer_name %> switch"> '},events:{click:"_onSwitchClick"},initialize:function(){this.model.has("visible")||this.model.set("visible",!1),this.model.bind("change:visible",this._onSwitchSelected,this),this.add_related_model(this.model),this._onSwitchSelected(),this.template=this.options.template?cdb.templates.getTemplate(this.options.template):_.template(this.defaults.template)},render:function(){var a=_.clone(this.model.attributes);return a.layer_name=a.layer_name||a.table_name,this.$el.append(this.template(a)),this},_onSwitchSelected:function(){var a=this.model.get("visible");this.$el.find(".switch").removeClass(a?"disabled":"enabled").addClass(a?"enabled":"disabled"),this.trigger("switchChanged")},_onSwitchClick:function(a){this.killEvent(a),this.model.set("visible",!this.model.get("visible"))}}),cdb.geo.ui.LayerViewFromLayerGroup=cdb.geo.ui.LayerView.extend({_onSwitchSelected:function(){cdb.geo.ui.LayerView.prototype._onSwitchSelected.call(this);var a=this.options.layerView.getSubLayer(this.options.layerIndex),b=this.model.get("visible");b?a.show():a.hide()}}),cdb.geo.ui.SlidesControllerItem=cdb.core.View.extend({tagName:"li",events:{"click a":"_onClick"},template:cdb.core.Template.compile(''),initialize:function(){this.model=new cdb.core.Model(this.options),this.model.bind("change:active",this._onChangeActive,this)},_onChangeActive:function(a){this.model.get("active")?this.$el.find("a").addClass("active"):this.$el.find("a").removeClass("active")},_onClick:function(a){a&&this.killEvent(a),this.trigger("onClick",this)},render:function(){var a=_.extend({transition_trigger:"click"},this.options.transition_options);return this.$el.html(this.template(a)),this._onChangeActive(),this}}),cdb.geo.ui.SlidesController=cdb.core.View.extend({defaults:{show_counter:!1},events:{"click a.next":"_next","click a.prev":"_prev"},tagName:"div",className:"cartodb-slides-controller",template:cdb.core.Template.compile("
          <% if (show_counter) {%>
          <% } else { %>
            <% } %>
            "),initialize:function(){this.slidesCount=this.options.transitions.length,this.visualization=this.options.visualization,this.slides=this.visualization.slides},_prev:function(a){a&&this.killEvent(a),this.visualization.sequence.prev()},_next:function(a){a&&this.killEvent(a),this.visualization.sequence.next()},_renderDots:function(){for(var a=this.slides.state(),b=0;b

            <%- layer_name %><% } %>

            "),_stopPropagation:function(a){a.stopPropagation()},initialize:function(){_.defaults(this.options,this.default_options),this.model.bind("change:visible",this._onChangeVisible,this)},_onChangeVisible:function(){this.$el.find(".legend")[this.model.get("visible")?"fadeIn":"fadeOut"](150),this.$el[this.model.get("visible")?"removeClass":"addClass"]("hidden"),this.trigger("change_visibility",this)},_toggle:function(a){a.preventDefault(),a.stopPropagation(),this.options.hide_toggle||this.model.set("visible",!this.model.get("visible"))},_renderLegend:function(){if(this.options.show_legends&&(!this.model.get("legend")||"none"!=this.model.get("legend").type&&this.model.get("legend").type)&&(!this.model.get("legend")||!this.model.get("legend").items||0!=this.model.get("legend").items.length)){this.$el.addClass("has-legend");var a=new cdb.geo.ui.Legend(this.model.get("legend"));a.undelegateEvents(),this.$el.append(a.render().$el)}},_truncate:function(a,b){return a.substr(0,b-1)+(a.length>b?"…":"")},render:function(){var a=this.model.get("layer_name");a=a?this._truncate(a,23):"untitled";var b=_.extend(this.model.attributes,{layer_name:this.options.show_title?a:"",toggle_class:this.options.hide_toggle?" hide":""});return this.$el.html(this.template(_.extend(b,{show_title:this.options.show_title}))),this.options.hide_toggle&&this.$el.removeClass("has-toggle"),this.model.get("visible")||this.$el.addClass("hidden"),this.model.get("legend")&&this._renderLegend(),this._onChangeVisible(),this}}),cdb.geo.ui.Mobile=cdb.core.View.extend({className:"cartodb-mobile",events:{"click .cartodb-attribution-button":"_onAttributionClick","click .toggle":"_toggle","click .fullscreen":"_toggleFullScreen","click .backdrop":"_onBackdropClick","dblclick .aside":"_stopPropagation","dragstart .aside":"_checkOrigin","mousedown .aside":"_checkOrigin","touchstart .aside":"_checkOrigin","MSPointerDown .aside":"_checkOrigin"},initialize:function(){_.bindAll(this,"_toggle","_reInitScrollpane"),_.defaults(this.options,this.default_options),this.hasLayerSelector=!1,this.layersLoading=0,this.slides_data=this.options.slides_data,this.visualization=this.options.visualization,this.visualization&&(this.slides=this.visualization.slides),this.mobileEnabled=/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),this.visibility_options=this.options.visibility_options||{},this.mapView=this.options.mapView,this.map=this.mapView.map,this.template=this.options.template?this.options.template:cdb.templates.getTemplate("geo/zoom"),this._selectOverlays(),this._setupModel(),window.addEventListener("orientationchange",_.bind(this.doOnOrientationChange,this)),this._addWheelEvent()},loadingTiles:function(){this.loader&&this.loader.show(),0===this.layersLoading&&this.trigger("loading"),this.layersLoading++},loadTiles:function(){this.loader&&this.loader.hide(),this.layersLoading--,this.layersLoading<=0&&(this.layersLoading=0,this.trigger("load"))},_selectOverlays:function(){if(this.slides&&this.slides_data){var a=this.slides.state();0==a?this.overlays=this.options.overlays:this.overlays=this.slides_data[a-1].overlays}else this.overlays=this.options.overlays},_addWheelEvent:function(){var a=this.options.mapView;$(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||a.options.map.set("scrollwheel",!1),a.invalidateSize()})},_setupModel:function(){this.model=new Backbone.Model({open:!1,layer_count:0}),this.model.on("change:open",this._onChangeOpen,this),this.model.on("change:layer_count",this._onChangeLayerCount,this)},_checkOrigin:function(a){var b=$(a.target).closest(".jspVerticalBar").length>0&&"touchstart"!=a.type;b||a.stopPropagation()},_stopPropagation:function(a){a.stopPropagation()},_onBackdropClick:function(a){a.preventDefault(),a.stopPropagation(),this.$el.find(".backdrop").fadeOut(250),this.$el.find(".cartodb-attribution").fadeOut(250)},_onAttributionClick:function(a){a.preventDefault(),a.stopPropagation(),this.$el.find(".backdrop").fadeIn(250),this.$el.find(".cartodb-attribution").fadeIn(250)},_toggle:function(a){a.preventDefault(),a.stopPropagation(),this.model.set("open",!this.model.get("open"))},_toggleFullScreen:function(a){a.stopPropagation(),a.preventDefault();var b=window.document,c=$("#map > div")[0],d=c.requestFullscreen||c.mozRequestFullScreen||c.webkitRequestFullScreen,e=b.exitFullscreen||b.mozCancelFullScreen||b.webkitExitFullscreen,f=this.options.mapView;b.fullscreenElement||b.mozFullScreenElement||b.webkitFullscreenElement?e.call(b):(d.call(c),f&&f.options.map.set("scrollwheel",!0))},_open:function(){var a=this.$el.find(".aside").width();this.$el.find(".cartodb-header").animate({right:a},200),this.$el.find(".aside").animate({right:0},200),this.$el.find(".cartodb-attribution-button").animate({right:a+parseInt(this.$el.find(".cartodb-attribution-button").css("right"))},200),this.$el.find(".cartodb-attribution").animate({right:a+parseInt(this.$el.find(".cartodb-attribution-button").css("right"))},200),this._initScrollPane()},_close:function(){this.$el.find(".cartodb-header").animate({right:0},200),this.$el.find(".aside").animate({right:-this.$el.find(".aside").width()},200),this.$el.find(".cartodb-attribution-button").animate({right:20},200),this.$el.find(".cartodb-attribution").animate({right:20},200)},default_options:{timeout:0,msg:""},_stopPropagation:function(a){a.stopPropagation()},doOnOrientationChange:function(){switch(window.orientation){case-90:case 90:this.recalc("landscape");break;default:this.recalc("portrait")}},recalc:function(a){var b=$(".legends > div.cartodb-legend-stack").height();this.$el.hasClass("open")&&100>b&&!this.$el.hasClass("torque")?(this.$el.css("height",b),this.$el.find(".top-shadow").hide(),this.$el.find(".bottom-shadow").hide()):this.$el.hasClass("open")&&100>b&&this.$el.hasClass("legends")&&this.$el.hasClass("torque")&&(this.$el.css("height",b+$(".legends > div.torque").height()),this.$el.find(".top-shadow").hide(),this.$el.find(".bottom-shadow").hide())},_onChangeLayerCount:function(){var a=this.model.get("layer_count"),b=a+" layer"+(1!=a?"s":"");this.$el.find(".aside .layer-container > h3").html(b)},_onChangeOpen:function(){this.model.get("open")?this._open():this._close()},_createLayer:function(a,b){return new cdb.geo.ui[a](b)},_getLayers:function(){this.layers=[],this.options.layerView?this._getLayersFromLayerView():_.each(this.map.layers.models,this._getLayer,this)},_getLayersFromLayerView:function(){if(this.options.layerView&&"layergroup"==this.options.layerView.model.get("type"))this.layers=_.map(this.options.layerView.layers,function(b,c){var d=new cdb.core.Model(b);return d.set("order",c),d.set("type","layergroup"),d.set("visible",b.visible),d.set("layer_name",b.options.layer_name),a=this._createLayer("LayerViewFromLayerGroup",{model:d,layerView:this.options.layerView,layerIndex:c}),a.model},this);else if(this.options.layerView&&"torque"==this.options.layerView.model.get("type")){var a=this._createLayer("LayerView",{model:this.options.layerView.model});this.layers.push(a.model)}},_getLayer:function(a){if("layergroup"==a.get("type")||"namedmap"===a.get("type"))for(var b=this.mapView.getLayerByCid(a.cid),c=0;c+ -
            ',"mustache"),b=new cdb.geo.ui.Zoom({model:this.options.map,template:a});this.$el.append(b.render().$el),this.$el.addClass("with-zoom")},_addLoader:function(){var a=cdb.core.Template.compile('
            ',"mustache");this.loader=new cdb.geo.ui.TilesLoader({template:a}),this.$el.append(this.loader.render().$el),this.$el.addClass("with-loader")},_addFullscreen:function(){0!=this.visibility_options.fullscreen&&(this.hasFullscreen=!0,this.$el.addClass("with-fullscreen"))},_addSearch:function(){this.hasSearch=!0;var a=cdb.core.Template.compile('
            ',"mustache"),b=new cdb.geo.ui.Search({template:a,mapView:this.mapView,model:this.mapView.map});this.$el.find(".aside").prepend(b.render().$el),this.$el.find(".cartodb-searchbox").show(),this.$el.addClass("with-search")},_addHeader:function(a){this.hasHeader=!0,this.$header=this.$el.find(".cartodb-header");var b=_.template('
            <% if (show_title) { %>
            <%= title %>
            <% } %><% if (show_description) { %>
            <%= description %><% } %>
            '),c=a.options.extra,d=!1,e=!1,f=!1;if(c){(this.visibility_options.title||0!=this.visibility_options.title&&c.show_title)&&(d=!0,e=!0),(this.visibility_options.description||0!=this.visibility_options.description&&c.show_description)&&(d=!0,f=!0),this.slides&&(d=!0);var g=b({title:cdb.core.sanitize.html(c.title),show_title:e,description:cdb.core.sanitize.html(c.description),show_description:f});d&&(this.$el.addClass("with-header"),this.$header.find(".content").append(g))}},_addAttributions:function(){var a="";this.options.mapView.$el.find(".leaflet-control-attribution").hide(),this.options.layerView?(a=this.options.layerView.model.get("attribution"),this.$el.find(".cartodb-attribution").append(a)):this.options.map.get("attribution")&&(a=this.options.map.get("attribution"),_.each(a,function(a){var b=$("
          • ");b.html(a);this.$el.find(".cartodb-attribution").append(b)},this)),a&&this.$el.find(".cartodb-attribution-button").fadeIn(250)},_renderLayers:function(){var a=this.visibility_options.legends,b=this.layers.filter(function(a){return a.get("legend")&&"none"!==a.get("legend").type}),c=b.length?!0:!1;(this.hasLayerSelector||a)&&(this.hasLayerSelector||c)&&0!=this.layers.length&&(1!=this.layers.length||c)&&(this.$el.addClass("with-layers"),this.model.set("layer_count",0),this.hasSearch||this.$el.find(".aside .layer-container").prepend("

            "),_.each(this.layers,this._renderLayer,this))},_renderLayer:function(a){var b=a.get("legend")&&""!==a.get("legend").type&&"none"!==a.get("legend").type;if((this.hasLayerSelector||b)&&(this.hasLayerSelector||a.get("visible"))){var c=1==this.layers.length||!this.hasLayerSelector,d=!0;this.visibility_options&&void 0!==this.visibility_options.legends&&(d=this.visibility_options.legends);var e=new cdb.geo.ui.MobileLayer({model:a,show_legends:d,show_title:this.hasLayerSelector?!0:!1,hide_toggle:c});this.$el.find(".aside .layers").append(e.render().$el),e.bind("change_visibility",this._reInitScrollpane,this),this.model.set("layer_count",this.model.get("layer_count")+1)}},_renderTorque:function(){this.options.torqueLayer&&(this.hasTorque=!0,this.slider=new cdb.geo.ui.TimeSlider({type:"time_slider",layer:this.options.torqueLayer,map:this.options.map,pos_margin:0,position:"none",width:"auto"}),this.slider.bind("time_clicked",function(){this.slider.toggleTime()},this),this.$el.find(".torque").append(this.slider.render().$el),this.options.torqueLayer.hidden?this.slider.hide():this.$el.addClass("with-torque"))},_renderSlidesController:function(){this.slides&&(this.$el.addClass("with-slides"),this.slidesController=new cdb.geo.ui.SlidesController({show_counter:!0,transitions:this.options.transitions,visualization:this.options.visualization,slides:this.slides}),this.$el.append(this.slidesController.render().$el))},render:function(){return this._bindOrientationChange(),this.$el.html(this.template(this.options)),this.$header=this.$el.find(".cartodb-header"),this.$header.show(),this._renderOverlays(),this._renderSlidesController(),this._addAttributions(),this._getLayers(),this._renderLayers(),this._renderTorque(),this}}),cdb.geo.ui.TilesLoader=cdb.core.View.extend({className:"cartodb-tiles-loader",default_options:{animationSpeed:500},initialize:function(){_.defaults(this.options,this.default_options),this.isVisible=0,this.template=this.options.template?this.options.template:cdb.templates.getTemplate("geo/tiles_loader")},render:function(){return this.$el.html($(this.template(this.options))),this},show:function(a){this.isVisible||(!cdb.core.util.ie||cdb.core.util.browser.ie&&cdb.core.util.browser.ie.version>=10?this.$el.fadeTo(this.options.animationSpeed,1):this.$el.show(),this.isVisible++)},hide:function(a){this.isVisible--,this.isVisible>0||(this.isVisible=0,!cdb.core.util.ie||cdb.core.util.browser.ie&&cdb.core.util.browser.ie.version>=10?this.$el.stop(!0).fadeTo(this.options.animationSpeed,0):this.$el.hide())},visible:function(){return this.isVisible>0}}),cdb.geo.ui.InfoBox=cdb.core.View.extend({className:"cartodb-infobox",defaults:{pos_margin:20,position:"bottom|right",width:200},initialize:function(){_.defaults(this.options,this.defaults),this.options.layer&&this.enable(),this.setTemplate(this.options.template||this.defaultTemplate,"mustache")},setTemplate:function(a){this.template=cdb.core.Template.compile(a,"mustache")},enable:function(){this.options.layer&&this.options.layer.on("featureOver",function(a,b,c,d){this.render(d).show()},this).on("featureOut",function(){this.hide()},this)},disable:function(){this.options.layer&&this.options.layer.off(null,null,this)},setPosition:function(a){var b={};-1!==a.indexOf("top")?b.top=this.options.pos_margin:-1!==a.indexOf("bottom")&&(b.bottom=this.options.pos_margin),-1!==a.indexOf("left")?b.left=this.options.pos_margin:-1!==a.indexOf("right")&&(b.right=this.options.pos_margin),this.$el.css(b)},render:function(a){return this.$el.html(this.template(a)),this.options.width&&this.$el.css("width",this.options.width),this.options.position&&this.setPosition(this.options.position),this}}),cdb.geo.ui.Tooltip=cdb.geo.ui.InfoBox.extend({defaultTemplate:"

            {{text}}

            ",className:"cartodb-tooltip",defaults:{vertical_offset:0,horizontal_offset:0,position:"top|center"},initialize:function(){if(!this.options.mapView)throw new Error("mapView should be present");this.options.template=this.options.template||this.defaultTemplate,cdb.geo.ui.InfoBox.prototype.initialize.call(this),this._filter=null,this.showing=!1,this.showhideTimeout=null},setLayer:function(a){return this.options.layer=a,this},setFilter:function(a){return this._filter=a,this},setFields:function(a){return this.options.fields=a,this},setAlternativeNames:function(a){this.options.alternative_names=a},enable:function(){this.options.layer&&(this.options.layer.unbind(null,null,this),this.options.layer.on("mouseover",function(a,b,c,d){if(this.options.fields&&this.options.fields.length>0){var e=["fields","content"];this.options.omit_columns&&(e=e.concat(this.options.omit_columns));var f=cdb.geo.ui.InfowindowModel.contentForFields(d,this.options.fields,{empty_fields:this.options.empty_fields});d.content=_.omit(d,e),d.fields=f.fields;var g=this.options.alternative_names;if(g)for(var h=0;hf?f=a.y:f+c>e.y&&(f=a.y-c),g=-1!==b.indexOf("left")?a.x-d:-1!==b.indexOf("center")?a.x-d/2:a.x,0>g?g=a.x:g+d>e.x&&(g=a.x-d),f+=this.options.vertical_offset,g+=this.options.horizontal_offset,this.$el.css({top:f,left:g})},render:function(a){var b=cdb.core.sanitize.html(this.template(a));return this.$el.html(b),this}}),cdb.ui.common.FullScreen=cdb.core.View.extend({tagName:"div",className:"cartodb-fullscreen",events:{"click a":"_toggleFullScreen"},initialize:function(){_.bindAll(this,"render"),_.defaults(this.options,this.default_options),this._addWheelEvent()},_addWheelEvent:function(){var a=this,b=this.options.mapView;$(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange",function(){document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||a.model.get("allowWheelOnFullscreen")&&b.options.map.set("scrollwheel",!1),b.invalidateSize()})},_toggleFullScreen:function(a){a&&this.killEvent(a);var b=window.document,c=b.documentElement;this.options.doc&&(c=$(this.options.doc)[0]);var d=c.requestFullscreen||c.mozRequestFullScreen||c.webkitRequestFullScreen||c.msRequestFullscreen,e=b.exitFullscreen||b.mozCancelFullScreen||b.webkitExitFullscreen||b.msExitFullscreen,f=this.options.mapView;b.fullscreenElement||b.mozFullScreenElement||b.webkitFullscreenElement||b.msFullscreenElement?e.call(b):(c.webkitRequestFullScreen?d.call(c,void 0):d&&d.call(c),f&&this.model.get("allowWheelOnFullscreen")&&f.map.set("scrollwheel",!0))},render:function(){var a=_.extend(this.options,{mapUrl:location.href||""});return this.$el.html(this.options.template(a)),this._canFullScreenBeEnabled()||(this.undelegateEvents(),cdb.log.info("FullScreen API is deprecated on insecure origins. See https://goo.gl/rStTGz for more details.")),this},_canFullScreenBeEnabled:function(){if(this._isInIframe()){var a=document.referrer;if(0!==a.search("https:"))return!1}return!0},_isInIframe:function(){try{return window.self!==window.top}catch(a){return!0}}}),SubLayerFactory.createSublayer=function(a,b,c){if(a=a&&a.toLowerCase(),a&&"mapnik"!==a&&"cartodb"!==a){if("http"===a)return new HttpSubLayer(b,c);throw"Sublayer type not supported"}return new CartoDBSubLayer(b,c)},SubLayerBase.prototype={toJSON:function(){throw"toJSON must be implemented"},isValid:function(){throw"isValid must be implemented"},remove:function(){this._check(),this._parent.removeLayer(this._position),this._added=!1,this.trigger("remove",this),this._onRemove()},_onRemove:function(){},toggle:function(){return this.get("hidden")?this.show():this.hide(),!this.get("hidden")},show:function(){this.get("hidden")&&this.set({hidden:!1})},hide:function(){this.get("hidden")||this.set({hidden:!0})},set:function(a){this._check();var b=this._parent.getLayer(this._position),c=b.options;for(var d in a)c[d]=a[d];return this._parent.setLayer(this._position,b),void 0!==a.hidden&&this.trigger("change:visibility",this,a.hidden),this},unset:function(a){var b=this._parent.getLayer(this._position);delete b.options[a],this._parent.setLayer(this._position,b)},get:function(a){this._check();var b=this._parent.getLayer(this._position);return b.options[a]},isVisible:function(){return!this.get("hidden")},_check:function(){if(!this._added)throw"sublayer was removed"},_unbindInteraction:function(){this._parent.off&&this._parent.off(null,null,this)},_bindInteraction:function(){if(this._parent.on){var a=this,b=function(b,c){c=c||b,a._parent.on(b,function(){var b=Array.prototype.slice.call(arguments);parseInt(b[b.length-1],10)==a._position&&a.trigger.apply(a,[c].concat(b))},a)};b("featureOver"),b("featureOut"),b("featureClick"),b("layermouseover","mouseover"),b("layermouseout","mouseout")}},_setPosition:function(a){this._position=a}},_.extend(SubLayerBase.prototype,Backbone.Events),CartoDBSubLayer.prototype=_.extend({},SubLayerBase.prototype,{toJSON:function(){var a={type:"cartodb",options:{sql:this.getSQL(),cartocss:this.getCartoCSS(),cartocss_version:this.get("cartocss_version")||"2.1.0"}},b=this.getInteractivity();if(b&&b.length>0){a.options.interactivity=b;var c=this.getAttributes();c.length>0&&(a.options.attributes={id:"cartodb_id",columns:c})}return this.get("raster")&&(a.options.raster=!0,a.options.geom_column="the_raster_webmercator",a.options.geom_type="raster",a.options.raster_band=this.get("raster_band")||0,a.options.cartocss_version=this.get("cartocss_version")||"2.3.0"),a},isValid:function(){return this.get("sql")&&this.get("cartocss")},_onRemove:function(){this._unbindInteraction()},setSQL:function(a){return this.set({sql:a})},setCartoCSS:function(a){return this.set({cartocss:a})},setInteractivity:function(a){return this.set({interactivity:a})},setInteraction:function(a){this._parent.setInteraction(this._position,a)},getSQL:function(){return this.get("sql")},getCartoCSS:function(){return this.get("cartocss")},getInteractivity:function(){var a=this.get("interactivity");return a?("string"==typeof a&&(a=a.split(",")),this._trimArrayItems(a)):void 0},getAttributes:function(){var a=[];return a=this.get("attributes")?this.get("attributes"):_.map(this.infowindow.get("fields"),function(a){return a.name}),this._trimArrayItems(a)},_trimArrayItems:function(a){return _.map(a,function(a){return a.trim()})}}),HttpSubLayer.prototype=_.extend({},SubLayerBase.prototype,{toJSON:function(){var a={type:"http",options:{urlTemplate:this.getURLTemplate()}},b=this.get("subdomains");b&&(a.options.subdomains=b);var c=this.get("tms");return void 0!==c&&(a.options.tms=c),a},isValid:function(){return this.get("urlTemplate")},setURLTemplate:function(a){return this.set({urlTemplate:a})},setSubdomains:function(a){return this.set({subdomains:a})},setTms:function(a){return this.set({tms:a})},getURLTemplate:function(a){return this.get("urlTemplate")},getSubdomains:function(a){return this.get("subdomains")},getTms:function(a){return this.get("tms")}}),MapProperties.prototype.getMapId=function(){return this.mapProperties.layergroupid},MapProperties.prototype.getLayerIndexByType=function(a,b){var c=this.mapProperties.metadata&&this.mapProperties.metadata.layers;if(!c)return a;for(var d={},e=0,f=0;f0&&(f=f&&-1!=a.indexOf(e.type)),f&&c.push(d)}return c}},MapBase.BASE_URL="/api/v1/map",MapBase.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",MapBase.prototype={_buildMapsApiTemplate:function(a){var b=a.tiler_protocol,c=a.tiler_domain,d=""!=a.tiler_port?":"+a.tiler_port:"",e=a.user_name?"{user}.":"";a.maps_api_template=[b,"://",e,c,d].join("")},createMap:function(a){function b(a,b){for(var d;d=c._createMapCallbacks.pop();)d(a,b)}var c=this;clearTimeout(this._timeout),this._createMapCallsStack.push(b),this._createMapCallbacks.push(a),this._timeout=setTimeout(function(){c._createMap(b)},4)},_createMap:function(a){if(a=a||function(){},this._waiting)return this;if(this._createMapCallsStack=[],!this.named_map&&0===this.visibleLayers().length)return void a(null);this._waiting=!0;var b=null;b=this._usePOST()?this._requestPOST:this._requestGET;var c=this._getParamsFromOptions(this.options);return b.call(this,c,a),this},_getParamsFromOptions:function(a){var b=[],c=a.extra_params||{},d=a.map_key||a.api_key||c.map_key||c.api_key;if(d&&b.push("map_key="+d),c.auth_token)if(_.isArray(c.auth_token))for(var e=0,f=c.auth_token.length;f>e;e++)b.push("auth_token[]="+c.auth_token[e]);else b.push("auth_token="+c.auth_token);return this.stat_tag&&b.push("stat_tag="+this.stat_tag),b},_usePOST:function(){if(this.options.cors){if(this.options.force_cors)return!0;var a=JSON.stringify(this.toJSON());if(a.length>this.options.MAX_GET_SIZE)return!0}return!1},_requestPOST:function(a,b){var c=this,d=this.options.ajax,e=cartodb.core.Profiler.metric("cartodb-js.layergroup.post.time").start();d({crossOrigin:!0,type:"POST",method:"POST",dataType:"json",contentType:"application/json",url:this._tilerHost()+this.endPoint+(a.length?"?"+a.join("&"):""),data:JSON.stringify(this.toJSON()),success:function(a){e.end(),0===c._createMapCallsStack.length&&(a.errors?(cartodb.core.Profiler.metric("cartodb-js.layergroup.post.error").inc(),b(null,a)):b(a)),c._requestFinished()},error:function(a){e.end(),cartodb.core.Profiler.metric("cartodb-js.layergroup.post.error").inc();var d={errors:["unknow error"]};0===a.status&&(d={errors:["connection error"]});try{d=JSON.parse(a.responseText)}catch(f){}0===c._createMapCallsStack.length&&b(null,d),c._requestFinished()}})},_requestGET:function(a,b){var c=this,d=this.options.ajax,e=JSON.stringify(this.toJSON()),f=this._getCompressor(e),g=c.JSONPendPoint||c.endPoint;f(e,3,function(e){a.push(e);var f=cartodb.core.Profiler.metric("cartodb-js.layergroup.get.time").start(),h=c.options.dynamic_cdn?c._host():c._tilerHost();d({dataType:"jsonp",url:h+g+"?"+a.join("&"),jsonpCallback:c.options.instanciateCallback,cache:!!c.options.instanciateCallback,success:function(a){f.end(),0===c._createMapCallsStack.length&&(a.errors?(cartodb.core.Profiler.metric("cartodb-js.layergroup.get.error").inc(), -b(null,a)):b(a)),c._requestFinished()},error:function(a){f.end(),cartodb.core.Profiler.metric("cartodb-js.layergroup.get.error").inc();var d={errors:["unknow error"]};try{d=JSON.parse(xhr.responseText)}catch(e){}0===c._createMapCallsStack.length&&b(null,d),c._requestFinished()}})})},_getCompressor:function(a){return this.options.compressor?this.options.compressor:(a=a||JSON.stringify(this.toJSON()),!this.options.force_compress&&a.lengthh;h++)g.push("auth_token[]="+f[h]);d+="?"+g.join("&")}else d+="?auth_token="+f;return d},invalidate:function(){this.mapProperties=null,this.urls=null,this.onLayerDefinitionUpdated()},getTiles:function(a){var b=this;return b.mapProperties?(a&&a(b._layerGroupTiles(b.mapProperties,b.options.extra_params)),this):(this.createMap(function(c,d){if(c)b.mapProperties=new MapProperties(c),c.cdn_url&&(b.options.cdn_url=b.options.cdn_url||{},b.options.cdn_url={http:c.cdn_url.http||b.options.cdn_url.http,https:c.cdn_url.https||b.options.cdn_url.https}),b.urls=b._layerGroupTiles(b.mapProperties,b.options.extra_params),a&&a(b.urls);else if(null!==b.named_map&&d)a&&a(null,d);else if(0===b.visibleLayers().length)return void(a&&a({tiles:[MapBase.EMPTY_GIF],grids:[]}))}),this)},isHttps:function(){return 0===this.options.maps_api_template.indexOf("https")},_layerGroupTiles:function(a,b){var c=[],d=[],e=this._encodeParams(b,this.options.pngParams),f=this._encodeParams(b,this.options.gridParams),g=this.options.subdomains||["0","1","2","3"];this.isHttps()&&(g=[null]);var h=a.getLayerIndexesByType(this.options.filter);if(h.length)for(var i="/"+h.join(",")+"/{z}/{x}/{y}",j="/{z}/{x}/{y}",k=0;kg;g++)c.push(e+"[]="+encodeURIComponent(f[g]));else{var i=encodeURIComponent(f);i=i.replace(/%7Bx%7D/g,"{x}").replace(/%7By%7D/g,"{y}").replace(/%7Bz%7D/g,"{z}"),c.push(e+"="+i)}}return c.join("&")},onLayerDefinitionUpdated:function(){},setSilent:function(a){this.silent=a},_definitionUpdated:function(){this.silent||this.invalidate()},getTileJSON:function(a,b){a=void 0==a?0:a;var c=this;this.getTiles(function(d){return d?void(b&&b(c._tileJSONfromTiles(a,d))):void b(null)})},_tileJSONfromTiles:function(a,b,c){function d(a){for(var b=[],c=0;c=b.length?-1:+b[a]},visibleLayers:function(){for(var a=[],b=0;b=0){if(b.options.hidden){var c=this.interactionEnabled[a];c&&(b.interaction=!0,this.setInteraction(a,!1))}else this.layers[a].interaction&&(this.setInteraction(a,!0),delete this.layers[a].interaction);this.layers[a]=_.clone(b)}return this.invalidate(),this},getTooltipData:function(a){var b=this.layers[a].tooltip;return b&&b.fields&&b.fields.length?b:null},getInfowindowData:function(a){var b,c=this.layers[a].infowindow;return!c&&this.options.layer_definition&&(b=this.options.layer_definition.layers[a])&&(c=b.infowindow),c&&c.fields&&c.fields.length>0?c:null},containInfowindow:function(){for(var a=this.options.layer_definition.layers,b=0;b0)return!0}return!1},containTooltip:function(){for(var a=this.options.layer_definition.layers,b=0;b=0&&(this.layers.splice(a,1),this.interactionEnabled.splice(a,1),this._reorderSubLayers(),this.invalidate()),this},_reorderSubLayers:function(){for(var a=0;a=0){var c=a.type||"cartodb";delete a.type,this.layers.splice(b,0,{type:c,options:a});var d=this.getSubLayer(b);if(!d.isValid())throw d.remove(),"Layer definition should contain all the required attributes";this._definitionUpdated()}return this},setInteractivity:function(a,b){if(void 0===b&&(b=a,a=0),a>=this.getLayerCount()&&0>a)throw new Error("layer does not exist");"string"==typeof b&&(b=b.split(","));for(var c=0;c0)return!0}return!1},containTooltip:function(){for(var a=this.layers||[],b=0;bf;f++)d.test(e[f].className)&&c.push(e[f]);return c.length>0},isRetinaBrowser:function(){return"devicePixelRatio"in window&&window.devicePixelRatio>1||"matchMedia"in window&&window.matchMedia("(min-resolution:144dpi)")&&window.matchMedia("(min-resolution:144dpi)").matches},addWadus:function(a,b,c){var d=this;setTimeout(function(){if(!d.isWadusAdded(c,"cartodb-logo")){var b=document.createElement("div"),e=d.isRetinaBrowser();b.setAttribute("class","cartodb-logo"),b.setAttribute("style","position:absolute; bottom:0; left:0; display:block; border:none; z-index:1000000;");var f=-1===location.protocol.indexOf("https")?"http":"https",g=cdb.config.get("cartodb_logo_link");b.innerHTML="CARTO",c.appendChild(b)}},b||0)}},function(){var a=function(a,b,c){this.leafletLayer=b,this.leafletMap=c,this.model=a,this.setModel(a),this.type=a.get("type")||a.get("kind"),this.type=this.type.toLowerCase()};_.extend(a.prototype,Backbone.Events),_.extend(a.prototype,{setModel:function(a){this.model&&this.model.unbind("change",this._modelUpdated,this),this.model=a,this.model.bind("change",this._modelUpdated,this)},remove:function(){this.leafletMap.removeLayer(this.leafletLayer),this.trigger("remove",this),this.model.unbind(null,null,this),this.unbind()},reload:function(){this.leafletLayer.redraw()}}),cdb.geo.LeafLetLayerView=a}(),function(){if("undefined"!=typeof L){var a=L.Class.extend({includes:L.Mixin.Events,initialize:function(a,b){cdb.geo.LeafLetLayerView.call(this,a,this,b)},onAdd:function(){this.redraw()},onRemove:function(){var a=this.leafletMap.getContainer();a.style.background="none"},_modelUpdated:function(){this.redraw()},redraw:function(){var a=this.leafletMap.getContainer();if(a.style.backgroundColor=this.model.get("color")||"#FFF",this.model.get("image")){var b="transparent url("+this.model.get("image")+") repeat center center";a.style.background=b}},setZIndex:function(){}});_.extend(a.prototype,cdb.geo.LeafLetLayerView.prototype),cdb.geo.LeafLetPlainLayerView=a}}(),function(){if("undefined"!=typeof L){var a=L.TileLayer.extend({initialize:function(a,b){var c={tms:a.get("tms"),attribution:a.get("attribution"),minZoom:a.get("minZoom"),maxZoom:a.get("maxZoom"),subdomains:a.get("subdomains")||"abc",errorTileUrl:a.get("errorTileUrl"),opacity:a.get("opacity")};a.get("tileSize")&&(c.tileSize=a.get("tileSize")),a.get("zoomOffset")&&(c.zoomOffset=a.get("zoomOffset")),L.TileLayer.prototype.initialize.call(this,a.get("urlTemplate"),c),cdb.geo.LeafLetLayerView.call(this,a,this,b)}});_.extend(a.prototype,cdb.geo.LeafLetLayerView.prototype,{_modelUpdated:function(){_.defaults(this.leafletLayer.options,_.clone(this.model.attributes)),this.leafletLayer.options.subdomains=this.model.get("subdomains")||"abc",this.leafletLayer.options.attribution=this.model.get("attribution"),this.leafletLayer.options.maxZoom=this.model.get("maxZoom"),this.leafletLayer.options.minZoom=this.model.get("minZoom"),this.leafletLayer.setUrl(this.model.get("urlTemplate"))}}),cdb.geo.LeafLetTiledLayerView=a}}(),function(){if("undefined"!=typeof L){var a=function(a){return{url:"http://{s}.basemaps.cartocdn.com/"+a+"_all/{z}/{x}/{y}.png",subdomains:"abcd",minZoom:0,maxZoom:18,attribution:'Map designs by Stamen. Data by OpenStreetMap, Provided by CARTO'}},b=function(a){return{url:"https://{s}.maps.nlp.nokia.com/maptile/2.1/maptile/newest/"+a+".day/{z}/{x}/{y}/256/png8?lg=eng&token=A7tBPacePg9Mj_zghvKt9Q&app_id=KuYppsdXZznpffJsKT24",subdomains:"1234",minZoom:0,maxZoom:21,attribution:'©2012 Nokia Terms of use'}},c={roadmap:b("normal"),gray_roadmap:a("light"),dark_roadmap:a("dark"),hybrid:b("hybrid"),terrain:b("terrain"),satellite:b("satellite")},d=L.TileLayer.extend({initialize:function(a,b){var d=c[a.get("base_type")];L.TileLayer.prototype.initialize.call(this,d.url,{tms:!1,attribution:d.attribution,minZoom:d.minZoom,maxZoom:d.maxZoom,subdomains:d.subdomains,errorTileUrl:"",opacity:1}),cdb.geo.LeafLetLayerView.call(this,a,this,b)}});_.extend(d.prototype,cdb.geo.LeafLetLayerView.prototype,{_modelUpdated:function(){}}),cdb.geo.LeafLetGmapsTiledLayerView=d}}(),function(){if("undefined"!=typeof L){var a=L.TileLayer.WMS.extend({initialize:function(a,b){var c={attribution:a.get("attribution"),layers:a.get("layers"),format:a.get("format"),transparent:a.get("transparent"),minZoom:a.get("minZomm"),maxZoom:a.get("maxZoom"),subdomains:a.get("subdomains")||"abc",errorTileUrl:a.get("errorTileUrl"),opacity:a.get("opacity")};a.get("tileSize")&&(c.tileSize=a.get("tileSize")),a.get("zoomOffset")&&(c.zoomOffset=a.get("zoomOffset")),L.TileLayer.WMS.prototype.initialize.call(this,a.get("urlTemplate"),c),cdb.geo.LeafLetLayerView.call(this,a,this,b)}});_.extend(a.prototype,cdb.geo.LeafLetLayerView.prototype,{_modelUpdated:function(){_.defaults(this.leafletLayer.options,_.clone(this.model.attributes)),this.leafletLayer.setUrl(this.model.get("urlTemplate"))}}),cdb.geo.LeafLetWMSLayerView=a}}(),function(){function a(a){var b=a.extend({includes:[cdb.geo.LeafLetLayerView.prototype,Backbone.Events],initialize:function(b,c){var d=this,e=[],f=_.clone(b.attributes);f.map=c;var g,h=f.featureOver,i=f.featureOut,j=f.featureClick,k=-1;f.featureOver=function(a,b,c,f,i){e[i]||d.trigger("layerenter",a,b,c,f,i),e[i]=1,h&&h.apply(this,arguments),d.featureOver&&d.featureOver.apply(d,arguments),a.timeStamp===g&&clearTimeout(k),k=setTimeout(function(){d.trigger("mouseover",a,b,c,f,i),d.trigger("layermouseover",a,b,c,f,i)},0),g=a.timeStamp},f.featureOut=function(a,b){e[b]&&d.trigger("layermouseout",b),e[b]=0,_.any(e)||d.trigger("mouseout"),i&&i.apply(this,arguments),d.featureOut&&d.featureOut.apply(d,arguments)},f.featureClick=_.debounce(function(){j&&j.apply(d,arguments),d.featureClick&&d.featureClick.apply(d,arguments)},10),a.prototype.initialize.call(this,f),cdb.geo.LeafLetLayerView.call(this,b,this,c)},featureOver:function(a,b,c,d,e){this.trigger("featureOver",a,[b.lat,b.lng],c,d,e)},featureOut:function(a,b){this.trigger("featureOut",a,b)},featureClick:function(a,b,c,d,e){this.trigger("featureClick",a,[b.lat,b.lng],c,d,e)},error:function(a){this.trigger("error",a?a.errors||a:"unknown error"),this.model.trigger("error",a?a.errors:"unknown error")},ok:function(a){this.model.trigger("tileOk")},onLayerDefinitionUpdated:function(){this.__update()}});return b}"undefined"!=typeof L&&(L.CartoDBGroupLayerBase=L.TileLayer.extend({interactionClass:wax.leaf.interaction,includes:[cdb.geo.LeafLetLayerView.prototype,CartoDBLayerCommon.prototype],options:{opacity:.99,attribution:cdb.config.get("cartodb_attributions"),debug:!1,visible:!0,added:!1,tiler_domain:"carto.com",tiler_port:"80",tiler_protocol:"http",sql_api_domain:"carto.com",sql_api_port:"80",sql_api_protocol:"http",maxZoom:30,extra_params:{},cdn_url:null,subdomains:null},initialize:function(a){if(a=a||{},L.Util.setOptions(this,a),!a.layer_definition&&!a.sublayers)throw new Error("cartodb-leaflet needs at least the layer_definition or sublayer list");a.layer_definition||(this.options.layer_definition=LayerDefinition.layerDefFromSubLayers(a.sublayers)),LayerDefinition.call(this,this.options.layer_definition,this.options),this.fire=this.trigger,CartoDBLayerCommon.call(this),L.TileLayer.prototype.initialize.call(this),this.interaction=[],this.addProfiling()},addProfiling:function(){this.bind("tileloadstart",function(a){var b=this.tileStats||(this.tileStats={});b[a.tile.src]=cartodb.core.Profiler.metric("cartodb-js.tile.png.load.time").start()});var a=function(a){var b=this.tileStats&&this.tileStats[a.tile.src];b&&b.end()};this.bind("tileload",a),this.bind("tileerror",function(b){cartodb.core.Profiler.metric("cartodb-js.tile.png.error").inc(),a(b)})},getTileUrl:function(a){var b="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";this._adjustTilePoint(a);var c=[b];this.tilejson&&(c=this.tilejson.tiles);var d=(a.x+a.y)%c.length;return L.Util.template(c[d],L.Util.extend({z:this._getZoomForUrl(),x:a.x,y:a.y},this.options))},setOpacity:function(a){if(isNaN(a)||a>1||0>a)throw new Error(a+" is not a valid value");this.options.opacity=Math.min(a,.99),this.options.visible&&(L.TileLayer.prototype.setOpacity.call(this,this.options.opacity),this.fire("updated"))},onAdd:function(a){var b=this;this.options.map=a,0!=this.options.cartodb_logo&&cdb.geo.common.CartoDBLogo.addWadus({left:8,bottom:8},0,a._container),this.__update(function(){var c=L.stamp(b);a._layers[c]&&(L.TileLayer.prototype.onAdd.call(b,a),b.fire("added"),b.options.added=!0)})},getAttribution:function(){return cdb.core.sanitize.html(this.options.attribution)},onRemove:function(a){this.options.added&&(this.options.added=!1,L.TileLayer.prototype.onRemove.call(this,a))},__update:function(a){var b=this;this.fire("updated"),this.fire("loading");this.options.map;this.getTiles(function(c,d){c?(b.tilejson=c,b.setUrl(b.tilejson.tiles[0]),b._reloadInteraction(),b.ok&&b.ok(),a&&a()):(b.error&&b.error(d),a&&a())})},_checkLayer:function(){if(!this.options.added)throw new Error("the layer is not still added to the map")},setAttribution:function(a){this._checkLayer(),this.map.attributionControl.removeAttribution(cdb.core.sanitize.html(this.options.attribution)),this.map.attributionControl.addAttribution(cdb.core.sanitize.html(a)),this.options.attribution=a,this.tilejson.attribution=this.options.attribution,this.fire("updated")},_manageOnEvents:function(a,b){var c=this._findPos(a,b);if(!c||isNaN(c.x)||isNaN(c.y))return!1;var d=a.layerPointToLatLng(c),e=b.e.type.toLowerCase(),f=a.layerPointToContainerPoint(c);switch(e){case"mousemove":if(this.options.featureOver)return this.options.featureOver(b.e,d,f,b.data,b.layer);break;case"click":case"touchend":case"touchmove":case"mspointerup":case"pointerup":case"pointermove":this.options.featureClick&&this.options.featureClick(b.e,d,f,b.data,b.layer)}},_manageOffEvents:function(a,b){return this.options.featureOut?this.options.featureOut&&this.options.featureOut(b.e,b.layer):void 0},_findPos:function(a,b){var c,d,e=0,f=0,g=a.getContainer();if(b.e.changedTouches&&b.e.changedTouches.length>0?(c=b.e.changedTouches[0].clientX+window.scrollX,d=b.e.changedTouches[0].clientY+window.scrollY):(c=b.e.clientX,d=b.e.clientY),g.offsetParent&&g.offsetTop>0){do e+=g.offsetLeft,f+=g.offsetTop;while(g=g.offsetParent);var h=this._newPoint(c-e,d-f)}else var i=g.getBoundingClientRect(),j=window.scrollX||window.pageXOffset,k=window.scrollY||window.pageYOffset,h=this._newPoint((b.e.clientX?b.e.clientX:c)-i.left-g.clientLeft-j,(b.e.clientY?b.e.clientY:d)-i.top-g.clientTop-k);return a.containerPointToLayerPoint(h)},_newPoint:function(a,b){return new L.Point(a,b)}}),L.CartoDBGroupLayer=L.CartoDBGroupLayerBase.extend({includes:[LayerDefinition.prototype],_modelUpdated:function(){this.setLayerDefinition(this.model.get("layer_definition"))}}),L.NamedMap=L.CartoDBGroupLayerBase.extend({includes:[cdb.geo.LeafLetLayerView.prototype,NamedMap.prototype,CartoDBLayerCommon.prototype],initialize:function(a){if(a=a||{},L.Util.setOptions(this,a),!a.named_map&&!a.sublayers)throw new Error("cartodb-leaflet needs at least the named_map");NamedMap.call(this,this.options.named_map,this.options),this.fire=this.trigger,CartoDBLayerCommon.call(this),L.TileLayer.prototype.initialize.call(this),this.interaction=[],this.addProfiling()},_modelUpdated:function(){this.setLayerDefinition(this.model.get("named_map"))}}),cdb.geo.LeafLetCartoDBLayerGroupView=a(L.CartoDBGroupLayer),cdb.geo.LeafLetCartoDBNamedMapView=a(L.NamedMap))}(),function(){if("undefined"!=typeof L){L.CartoDBLayer=L.CartoDBGroupLayer.extend({options:{query:"SELECT * FROM {{table_name}}",opacity:.99,attribution:cdb.config.get("cartodb_attributions"),debug:!1,visible:!0,added:!1,extra_params:{},layer_definition_version:"1.0.0"},initialize:function(a){if(L.Util.setOptions(this,a),!a.table_name||!a.user_name||!a.tile_style)throw"cartodb-leaflet needs at least a CartoDB table name, user_name and tile_style";L.CartoDBGroupLayer.prototype.initialize.call(this,{layer_definition:{version:this.options.layer_definition_version,layers:[{type:"cartodb",options:this._getLayerDefinition(),infowindow:this.options.infowindow}]}}),this.setOptions(this.options)},setQuery:function(a,b){void 0===b&&(b=a,a=0),b=b||"select * from "+this.options.table_name,LayerDefinition.prototype.setQuery.call(this,a,b)},isVisible:function(){return this.visible},isAdded:function(){return this.options.added}});var a=L.CartoDBLayer.extend({initialize:function(a,b){var c=this;_.bindAll(this,"featureOut","featureOver","featureClick");var d=_.clone(a.attributes);d.map=b;var e=d.featureOver,f=d.featureOut,g=d.featureClick;d.featureOver=function(){e&&e.apply(this,arguments),c.featureOver&&c.featureOver.apply(this,arguments)},d.featureOut=function(){f&&f.apply(this,arguments),c.featureOut&&c.featureOut.apply(this,arguments)},d.featureClick=function(){g&&g.apply(this,arguments),c.featureClick&&c.featureClick.apply(d,arguments)},a.bind("change:visible",function(){c.model.get("visible")?c.show():c.hide()},this),L.CartoDBLayer.prototype.initialize.call(this,d),cdb.geo.LeafLetLayerView.call(this,a,this,b)},_modelUpdated:function(){var a=_.clone(this.model.attributes);this.leafletLayer.setOptions(a)},featureOver:function(a,b,c,d){this.trigger("featureOver",a,[b.lat,b.lng],c,d,0)},featureOut:function(a){this.trigger("featureOut",a,0)},featureClick:function(a,b,c,d){this.trigger("featureClick",a,[b.lat,b.lng],c,d,0)},reload:function(){this.model.invalidate()},error:function(a){this.trigger("error",a?a.error:"unknown error"),this.model.trigger("tileError",a?a.error:"unknown error")},tilesOk:function(a){this.model.trigger("tileOk")},includes:[cdb.geo.LeafLetLayerView.prototype,Backbone.Events]});cdb.geo.LeafLetLayerCartoDBView=a}}(),function(){function a(a){var b=this,c=["click","dblclick","mousedown","mouseover","mouseout","dragstart","drag","dragend"];this._eventHandlers={},this.model=a,this.points=[];var d={iconUrl:this.model.get("iconUrl")||cdb.config.get("assets_url")+"/images/layout/default_marker.png",iconAnchor:this.model.get("iconAnchor")||[11,11]};this.geom=L.GeoJSON.geometryToLayer(a.get("geojson"),function(a,e){var f,g=L.marker(e,{icon:L.icon(d)});for(f=0;f "+e.message)}else cdb.log.error("MAP: "+a.get("type")+" can't be created");return c},addLayerToMap:function(a,b,c){b.addLayer(a.leafletLayer),void 0!==c&&a.setZIndex&&a.setZIndex(c)},createGeometry:function(a){return a.isPoint()?new cdb.geo.leaflet.PointView(a):new cdb.geo.leaflet.PathView(a)}}),L.Icon.Default.imagePath=function(){var a,b,c,d,e=document.getElementsByTagName("script"),f=/\/?cartodb[\-\._]?([\w\-\._]*)\.js\??/;for(a=0,b=e.length;b>a;a++)if(c=e[a].src,d=c.match(f)){var g=c.split("/");return delete g[g.length-1],g.join("/")+"themes/css/images"}}())}(),function(){if("undefined"!=typeof google&&"undefined"!=typeof google.maps){var a=function(a,b,c){this.gmapsLayer=b,this.map=this.gmapsMap=c,this.model=a,this.model.bind("change",this._update,this),this.type=a.get("type")||a.get("kind"),this.type=this.type.toLowerCase()};_.extend(a.prototype,Backbone.Events),_.extend(a.prototype,{_searchLayerIndex:function(){var a=this,b=-1;return this.gmapsMap.overlayMapTypes.forEach(function(c,d){c==a&&(b=d)}),b},remove:function(){if(!this.isBase){var a=this._searchLayerIndex();a>=0?this.gmapsMap.overlayMapTypes.removeAt(a):this.gmapsLayer.setMap&&this.gmapsLayer.setMap(null),this.model.unbind(null,null,this),this.unbind()}},refreshView:function(){if(this.isBase){var a="_baseLayer";this.gmapsMap.setMapTypeId(null),this.gmapsMap.mapTypes.set(a,this.gmapsLayer),this.gmapsMap.setMapTypeId(a)}else{var b=this._searchLayerIndex();b>=0&&this.gmapsMap.overlayMapTypes.setAt(b,this)}},reload:function(){this.refreshView()},_update:function(){this.refreshView()}}),cdb.geo.GMapsLayerView=a}}(),function(){if("undefined"!=typeof google&&"undefined"!=typeof google.maps){var a=function(a,b){cdb.geo.GMapsLayerView.call(this,a,null,b)};_.extend(a.prototype,cdb.geo.GMapsLayerView.prototype,{_update:function(){var a=this.model,b={roadmap:google.maps.MapTypeId.ROADMAP,gray_roadmap:google.maps.MapTypeId.ROADMAP,dark_roadmap:google.maps.MapTypeId.ROADMAP,hybrid:google.maps.MapTypeId.HYBRID,satellite:google.maps.MapTypeId.SATELLITE,terrain:google.maps.MapTypeId.TERRAIN};this.gmapsMap.setOptions({mapTypeId:b[a.get("base_type")]}),this.gmapsMap.setOptions({styles:a.get("style")||DEFAULT_MAP_STYLE})},remove:function(){}}),cdb.geo.GMapsBaseLayerView=a}}(),function(){if("undefined"!=typeof google&&"undefined"!=typeof google.maps){var a=function(a,b){this.color=a.get("color"),cdb.geo.GMapsLayerView.call(this,a,this,b)};_.extend(a.prototype,cdb.geo.GMapsLayerView.prototype,{_update:function(){this.color=this.model.get("color"),this.refreshView()},getTile:function(a,b,c){var d=document.createElement("div");return d.style.width=this.tileSize.x,d.style.height=this.tileSize.y,d["background-color"]=this.color,d},tileSize:new google.maps.Size(256,256),maxZoom:100,minZoom:0,name:"plain layer",alt:"plain layer"}),cdb.geo.GMapsPlainLayerView=a}}(),function(){if("undefined"!=typeof google&&"undefined"!=typeof google.maps){var a=function(a,b){cdb.geo.GMapsLayerView.call(this,a,this,b),this.tileSize=new google.maps.Size(256,256),this.opacity=1,this.isPng=!0,this.maxZoom=22,this.minZoom=0,this.name="cartodb tiled layer",google.maps.ImageMapType.call(this,this)};_.extend(a.prototype,cdb.geo.GMapsLayerView.prototype,google.maps.ImageMapType.prototype,{getTileUrl:function(a,b){var c=a.y,d=1<c||c>=d)return null;var e=a.x;(0>e||e>=d)&&(e=(e%d+d)%d),this.model.get("tms")&&(c=d-c-1);var f=this.model.get("urlTemplate");return f.replace("{x}",e).replace("{y}",c).replace("{z}",b)}}),cdb.geo.GMapsTiledLayerView=a}}(),function(){function a(a,b){var c=Math.round(100*b);c>=99?a.style.filter=f:a.style.filter="alpha(opacity="+b+");"}function b(){}function c(a){var b=function(b,c){var d=this,e=[];_.bindAll(this,"featureOut","featureOver","featureClick");var f=_.clone(b.attributes);f.map=c;var g,h=f.featureOver,i=f.featureOut,j=f.featureClick,k=-1;f.featureOver=function(a,b,c,f,i){e[i]||d.trigger("layerenter",a,b,c,f,i),e[i]=1,h&&h.apply(this,arguments),d.featureOver&&d.featureOver.apply(this,arguments),a.timeStamp===g&&clearTimeout(k),k=setTimeout(function(){d.trigger("mouseover",a,b,c,f,i),d.trigger("layermouseover",a,b,c,f,i)},0),g=a.timeStamp},f.featureOut=function(a,b){e[b]&&d.trigger("layermouseout",b),e[b]=0,_.any(e)||d.trigger("mouseout"),i&&i.apply(this,arguments),d.featureOut&&d.featureOut.apply(this,arguments)},f.featureClick=_.debounce(function(){j&&j.apply(this,arguments),d.featureClick&&d.featureClick.apply(f,arguments)},10),a.call(this,f),cdb.geo.GMapsLayerView.call(this,b,this,c)};return _.extend(b.prototype,cdb.geo.GMapsLayerView.prototype,a.prototype,{_update:function(){this.setOptions(this.model.attributes)},reload:function(){this.model.invalidate()},remove:function(){cdb.geo.GMapsLayerView.prototype.remove.call(this),this.clear()},featureOver:function(a,b,c,d,e){this.trigger("featureOver",a,[b.lat(),b.lng()],c,d,e)},featureOut:function(a,b){this.trigger("featureOut",a,b)},featureClick:function(a,b,c,d,e){this.trigger("featureClick",a,[b.lat(),b.lng()],c,d,e)},error:function(a){this.model&&(this.model.trigger("error",a?a.errors:"unknown error"),this.model.trigger("tileError",a?a.errors:"unknown error"))},ok:function(a){this.model.trigger("tileOk")},tilesOk:function(a){this.model.trigger("tileOk")},loading:function(){this.trigger("loading")},finishLoading:function(){this.trigger("load")}}),b}if("undefined"!=typeof google&&"undefined"!=typeof google.maps){var d=function(a){this.setMap(a)};d.prototype=new google.maps.OverlayView,d.prototype.draw=function(){},d.prototype.latLngToPixel=function(a){var b=this.getProjection();return b?b.fromLatLngToContainerPixel(a):[0,0]},d.prototype.pixelToLatLng=function(a){var b=this.getProjection();return b?b.fromContainerPixelToLatLng(a):[0,0]};var e={opacity:.99,attribution:cdb.config.get("cartodb_attributions"),debug:!1,visible:!0,added:!1,tiler_domain:"carto.com",tiler_port:"80",tiler_protocol:"http",sql_api_domain:"carto.com",sql_api_port:"80",sql_api_protocol:"http",extra_params:{},cdn_url:null,subdomains:null},f="progid:DXImageTransform.Microsoft.gradient(startColorstr=#00FFFFFF,endColorstr=#00FFFFFF)",g=function(a){if(this.options=_.defaults(a,e),this.tiles=0,this.tilejson=null,this.interaction=[],!a.named_map&&!a.sublayers)throw new Error("cartodb-gmaps needs at least the named_map");0!=this.options.cartodb_logo&&cdb.geo.common.CartoDBLogo.addWadus({left:74,bottom:8},2e3,this.options.map.getDiv()),wax.g.connector.call(this,a),_.extend(this.options,a),this.projector=new d(a.map),NamedMap.call(this,this.options.named_map,this.options),CartoDBLayerCommon.call(this),this.update()},h=function(a){if(this.options=_.defaults(a,e),this.tiles=0,this.tilejson=null,this.interaction=[],!a.layer_definition&&!a.sublayers)throw new Error("cartodb-leaflet needs at least the layer_definition or sublayer list");a.layer_definition||(a.layer_definition=LayerDefinition.layerDefFromSubLayers(a.sublayers)),0!=this.options.cartodb_logo&&cdb.geo.common.CartoDBLogo.addWadus({left:74,bottom:8},2e3,this.options.map.getDiv()),wax.g.connector.call(this,a),_.extend(this.options,a),this.projector=new d(a.map),LayerDefinition.call(this,a.layer_definition,this.options),CartoDBLayerCommon.call(this),this.update()};b.prototype.setOpacity=function(b){if(isNaN(b)||b>1||0>b)throw new Error(b+" is not a valid value, should be in [0, 1] range");this.opacity=this.options.opacity=b;for(var c in this.cache){var d=this.cache[c];d.style.opacity=b,a(d,b)}},b.prototype.setAttribution=function(){},b.prototype.getTile=function(b,c,d){var e="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",f=this,g="ActiveXObject"in window,h=g&&!document.addEventListener;if(this.options.added=!0,null===this.tilejson){var i=c+"/"+b.x+"/"+b.y,j=this.cache[i]=new Image(256,256);return j.src=e,j.setAttribute("gTileKey",i),j.style.opacity=this.options.opacity,j}var k=wax.g.connector.prototype.getTile.call(this,b,c,d);h&&a(k,this.options.opacity),k.style.opacity=this.options.opacity,0===this.tiles&&this.loading&&this.loading(),this.tiles++;var l=cartodb.core.Profiler.metric("cartodb-js.tile.png.load.time").start(),m=function(){l.end(),f.tiles--,0===f.tiles&&f.finishLoading&&f.finishLoading()};return k.onload=m,k.onerror=function(){cartodb.core.Profiler.metric("cartodb-js.tile.png.error").inc(),m()},k},b.prototype.onAdd=function(){},b.prototype.clear=function(){this._clearInteraction(),self.finishLoading&&self.finishLoading()},b.prototype.update=function(a){var b=this;this.loading&&this.loading(),this.getTiles(function(c,d){c?(b.tilejson=c,b.options.tiles=c.tiles,b.tiles=0,b.cache={},b._reloadInteraction(),b.refreshView(),b.ok&&b.ok(),a&&a()):b.error&&b.error(d)})},b.prototype.refreshView=function(){var a=this,b=this.options.map;b.overlayMapTypes.forEach(function(c,d){return c==a?void b.overlayMapTypes.setAt(d,a):void 0})},b.prototype.onLayerDefinitionUpdated=function(){this.update()},b.prototype._checkLayer=function(){if(!this.options.added)throw new Error("the layer is not still added to the map")},b.prototype._findPos=function(a,b){var c,d,e=0,f=0,g=a.getDiv();if(b.e.changedTouches&&b.e.changedTouches.length>0?(c=b.e.changedTouches[0].clientX+window.scrollX,d=b.e.changedTouches[0].clientY+window.scrollY):(c=b.e.clientX,d=b.e.clientY),g.offsetParent&&g.offsetTop>0){do e+=g.offsetLeft,f+=g.offsetTop;while(g=g.offsetParent);var h=this._newPoint(c-e,d-f)}else var i=g.getBoundingClientRect(),j=window.scrollX||window.pageXOffset,k=window.scrollY||window.pageYOffset,h=this._newPoint((b.e.clientX?b.e.clientX:c)-i.left-g.clientLeft-j,(b.e.clientY?b.e.clientY:d)-i.top-g.clientTop-k);return h},b.prototype._newPoint=function(a,b){return new google.maps.Point(a,b)},b.prototype._manageOffEvents=function(a,b){return this.options.featureOut?this.options.featureOut&&this.options.featureOut(b.e,b.layer):void 0},b.prototype._manageOnEvents=function(a,b){var c=this._findPos(a,b),d=this.projector.pixelToLatLng(c),e=b.e.type.toLowerCase();switch(e){case"mousemove":if(this.options.featureOver)return this.options.featureOver(b.e,d,c,b.data,b.layer);break;case"click":case"touchend":case"touchmove":case"mspointerup":case"pointerup":case"pointermove":this.options.featureClick&&this.options.featureClick(b.e,d,c,b.data,b.layer)}},h.Projector=d,h.prototype=new wax.g.connector,_.extend(h.prototype,LayerDefinition.prototype,b.prototype,CartoDBLayerCommon.prototype),h.prototype.interactionClass=wax.g.interaction,g.prototype=new wax.g.connector,_.extend(g.prototype,NamedMap.prototype,b.prototype,CartoDBLayerCommon.prototype),g.prototype.interactionClass=wax.g.interaction,cdb.geo.CartoDBLayerGroupGMaps=h,cdb.geo.CartoDBNamedMapGMaps=g,cdb.geo.GMapsCartoDBLayerGroupView=c(h),cdb.geo.GMapsCartoDBNamedMapView=c(g),cdb.geo.CartoDBNamedMapGMaps=g}}(),function(){if("undefined"!=typeof google&&"undefined"!=typeof google.maps){var a=function(a){this.setMap(a)};a.prototype=new google.maps.OverlayView,a.prototype.draw=function(){},a.prototype.latLngToPixel=function(a){var b=this.getProjection();return b?b.fromLatLngToContainerPixel(a):[0,0]},a.prototype.pixelToLatLng=function(a){var b=this.getProjection();return b?b.fromContainerPixelToLatLng(a):[0,0]};var b=function(a){var b={query:"SELECT * FROM {{table_name}}",opacity:.99,attribution:cdb.config.get("cartodb_attributions"),opacity:1,debug:!1,visible:!0,added:!1,extra_params:{},layer_definition_version:"1.0.0"};if(this.options=_.defaults(a,b),!a.table_name||!a.user_name||!a.tile_style)throw"cartodb-gmaps needs at least a CartoDB table name, user_name and tile_style";this.options.layer_definition={version:this.options.layer_definition_version,layers:[{type:"cartodb",options:this._getLayerDefinition(),infowindow:this.options.infowindow}]},cdb.geo.CartoDBLayerGroupGMaps.call(this,this.options),this.setOptions(this.options)};_.extend(b.prototype,cdb.geo.CartoDBLayerGroupGMaps.prototype),b.prototype.setQuery=function(a,b){void 0===b&&(b=a,a=0),b=b||"select * from "+this.options.table_name,LayerDefinition.prototype.setQuery.call(this,a,b)},cdb.geo.CartoDBLayerGMaps=b;var c=function(a,b){var c=this;_.bindAll(this,"featureOut","featureOver","featureClick");var d=_.clone(a.attributes);d.map=b;var e=d.featureOver,f=d.featureOut,g=d.featureClick;d.featureOver=function(){e&&e.apply(this,arguments),c.featureOver&&c.featureOver.apply(this,arguments)},d.featureOut=function(){f&&f.apply(this,arguments),c.featureOut&&c.featureOut.apply(this,arguments)},d.featureClick=function(){g&&g.apply(this,arguments),c.featureClick&&c.featureClick.apply(d,arguments)},cdb.geo.CartoDBLayerGMaps.call(this,d),cdb.geo.GMapsLayerView.call(this,a,this,b)};cdb.geo.GMapsCartoDBLayerView=c,_.extend(c.prototype,cdb.geo.CartoDBLayerGMaps.prototype,cdb.geo.GMapsLayerView.prototype,{_update:function(){this.setOptions(this.model.attributes)},reload:function(){this.model.invalidate()},remove:function(){cdb.geo.GMapsLayerView.prototype.remove.call(this),this.clear()},featureOver:function(a,b,c,d){this.trigger("featureOver",a,[b.lat(),b.lng()],c,d,0)},featureOut:function(a){this.trigger("featureOut",a)},featureClick:function(a,b,c,d,e){this.trigger("featureClick",a,[b.lat(),b.lng()],c,d,0)},error:function(a){this.model&&(this.model.trigger("error",a?a.error:"unknown error"),this.model.trigger("tileError",a?a.error:"unknown error"))},tilesOk:function(a){this.model.trigger("tileOk")},loading:function(){this.trigger("loading")},finishLoading:function(){this.trigger("load")}})}}(),function(){function a(a){var b=this,c=["click","dblclick","mousedown","mouseover","mouseout","dragstart","drag","dragend"];this._eventHandlers={},this.model=a,this.points=[];var d=(_.clone(a.get("style"))||{},this.model.get("iconAnchor")),e={url:this.model.get("iconUrl")||cdb.config.get("assets_url")+"/images/layout/default_marker.png",anchor:{x:d&&d[0]||10,y:d&&d[1]||10}};this.geom=new GeoJSON(a.get("geojson"),{icon:e,raiseOnDrag:!1,crossOnDrag:!1});var f;for(f=0;f "+d.message)}else cdb.log.error("MAP: "+a.get("type")+" can't be created");return b},_addLayer:function(a,b,c){c=c||{};var d;return(d=this.createLayer(a))?this._addLayerToMap(d,c):void 0},_addLayerToMap:function(a,b){var c=a.model;if(this.layers[c.cid]=a,a){var d=_(this.layers).filter(function(a){return!!a.getTile}).length-1,e=1===_.keys(this.layers).length||b&&0===b.index||0===c.get("order");if(e&&!b.no_base_layer){var f=a.model;"GMapsBase"===f.get("type")?a._update():(a.isBase=!0,a._update())}else d-=1,d=Math.max(0,d),a.getTile?(a.gmapsLayer||cdb.log.error("gmaps layer can't be null"),this.map_googlemaps.overlayMapTypes.setAt(d,a.gmapsLayer)):a.gmapsLayer.setMap(this.map_googlemaps);void 0!==b&&b.silent||this.trigger("newLayerView",a,c,this)}else cdb.log.error("layer type not supported");return a},pixelToLatLon:function(a){var b=this.projector.pixelToLatLng(new google.maps.Point(a[0],a[1]));return{lat:b.lat(),lng:b.lng()}},latLonToPixel:function(a){return this.projector.latLngToPixel(new google.maps.LatLng(a[0],a[1]))},getSize:function(){return{x:this.$el.width(),y:this.$el.height()}},panBy:function(a){var b=this.map.get("center"),c=this.latLonToPixel(b);a.x+=c.x,a.y+=c.y;var d=this.projector.pixelToLatLng(a);this.map.setCenter([d.lat(),d.lng()])},getBounds:function(){if(this._isReady){var a=this.map_googlemaps.getBounds(),b=a.getSouthWest(),c=a.getNorthEast();return[[b.lat(),b.lng()],[c.lat(),c.lng()]]}return[[0,0],[0,0]]},setAttribution:function(){var a=document.getElementById("cartodb-gmaps-attribution"),b=cdb.core.sanitize.html(this.map.get("attribution").join(", "));a&&a.parentNode.removeChild(a);var c=this.map_googlemaps.getDiv(),d=document.createElement("div");d.setAttribute("id","cartodb-gmaps-attribution"),d.setAttribute("class","gmaps"),c.appendChild(d),d.innerHTML=b},setCursor:function(a){this.map_googlemaps.setOptions({draggableCursor:a})},_addGeomToMap:function(a){var b=cdb.geo.GoogleMapsMapView.createGeometry(a);if(b.geom.length)for(var c=0;c/g)||[]).join("");var c=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;return a&&"string"==typeof a?a.replace(c,function(a,c){return b.indexOf("<"+c.toLowerCase()+">")>-1?a:""}):""},open:function(){var a=this;this.$el.show(0,function(){a.isOpen=!0})},hide:function(){var a=this;this.$el.hide(0,function(){a.isOpen=!1}),this.options.clean_on_hide&&this.clean()},toggle:function(){this.isOpen?this.hide():this.open()},_truncateTitle:function(a,b){return a.substr(0,b-1)+(a.length>b?"…":"")},render:function(){var a,b,c=this.$el,d=cdb.core.sanitize.html(this.options.title),e=(cdb.core.sanitize.html(this.options.description),this._stripHTML(this.options.description)),f=this.options.share_url;this.$el.addClass(this.options.size);var g,h=d+": "+e;g=d&&e?this._truncateTitle(d+": "+e,112)+" %23map ":d?this._truncateTitle(d,112)+" %23map":e?this._truncateTitle(e,112)+" %23map":"%23map",a=this.options.facebook_url?this.options.facebook_url:"http://www.facebook.com/sharer.php?u="+f+"&text="+h,b=this.options.twitter_url?this.options.twitter_url:"https://twitter.com/share?url="+f+"&text="+g;var i=_.extend(this.options,{facebook_url:a,twitter_url:b});return c.html(this.options.template(i)),c.find(".modal").css({width:this.options.width}),this.render_content&&this.$(".content").append(this.render_content()),this.options.modal_class&&this.$el.addClass(this.options.modal_class),this.options.disableLinks&&this.$el.find("a").attr("target",""),this}}),cdb.ui.common.Notification=cdb.core.View.extend({ -tagName:"div",className:"dialog",events:{"click .close":"hide"},default_options:{timeout:0,msg:"",hideMethod:"",duration:"normal"},initialize:function(){this.closeTimeout=-1,_.defaults(this.options,this.default_options),this.template=this.options.template?_.template(this.options.template):cdb.templates.getTemplate("common/notification"),this.$el.hide()},render:function(){var a=this.$el;return a.html(this.template(this.options)),this.render_content&&this.$(".content").append(this.render_content()),this},hide:function(a){var b=this;a&&a.preventDefault(),clearTimeout(this.closeTimeout),""!=this.options.hideMethod&&this.$el.is(":visible")?this.$el[this.options.hideMethod](this.options.duration,"swing",function(){b.$el.html(""),b.trigger("notificationDeleted"),b.remove()}):(this.$el.hide(),b.$el.html(""),b.trigger("notificationDeleted"),b.remove())},open:function(a,b){this.render(),this.$el.show(a,b),this.options.timeout&&(this.closeTimeout=setTimeout(_.bind(this.hide,this),this.options.timeout))}}),cdb.ui.common.Row=cdb.core.Model.extend({}),cdb.ui.common.TableData=Backbone.Collection.extend({model:cdb.ui.common.Row,fetched:!1,initialize:function(){var a=this;this.bind("reset",function(){a.fetched=!0})},getCell:function(a,b){var c=this.at(a);return c?c.get(b):null},isEmpty:function(){return 0===this.length}}),cdb.ui.common.TableProperties=cdb.core.Model.extend({columnNames:function(){return _.map(this.get("schema"),function(a){return a[0]})},columnName:function(a){return this.columnNames()[a]}}),cdb.ui.common.RowView=cdb.core.View.extend({tagName:"tr",initialize:function(){this.model.bind("change",this.render,this),this.model.bind("destroy",this.clean,this),this.model.bind("remove",this.clean,this),this.model.bind("change",this.triggerChange,this),this.model.bind("sync",this.triggerSync,this),this.model.bind("error",this.triggerError,this),this.add_related_model(this.model),this.order=this.options.order},triggerChange:function(){this.trigger("changeRow")},triggerSync:function(){this.trigger("syncRow")},triggerError:function(){this.trigger("errorRow")},valueView:function(a,b){return b},render:function(){var a,b=this,c=this.model,d="",e=0;a=this.options.row_header?'
            ",e++,d+=a;for(var g=this.order||_.keys(c.attributes),h="",i=c.attributes,j=0,k=g.length;k>j;++j){var l=g[j],m=i[l];if(void 0!==m){var a='",e++,h+=a}}return d+=h,this.$el.html(d).attr("id","row_"+c.id),this},getCell:function(a){return this.options.row_header&&++a,this.$("td:eq("+a+")")},getTableView:function(){return this.tableView}}),cdb.ui.common.Table=cdb.core.View.extend({tagName:"table",rowView:cdb.ui.common.RowView,events:{"click td":"_cellClick","dblclick td":"_cellDblClick"},default_options:{},initialize:function(){var a=this;_.defaults(this.options,this.default_options),this.dataModel=this.options.dataModel,this.rowViews=[],this.setDataSource(this.dataModel),this.model.bind("change",this.render,this),this.model.bind("change:dataSource",this.setDataSource,this),this.bind("clean",this.clear_rows,this),this.add_related_model(this.dataModel),this.add_related_model(this.model),this.model.bind("removing:row",function(){a.rowsBeingDeleted=a.rowsBeingDeleted?a.rowsBeingDeleted+1:1,a.rowDestroying()}),this.model.bind("remove:row",function(){a.rowsBeingDeleted>0&&(a.rowsBeingDeleted--,a.rowDestroyed(),0==a.dataModel.length&&a.emptyTable())})},headerView:function(a){return a[0]},setDataSource:function(a){this.dataModel&&this.dataModel.unbind(null,null,this),this.dataModel=a,this.dataModel.bind("reset",this._renderRows,this),this.dataModel.bind("error",this._renderRows,this),this.dataModel.bind("add",this.addRow,this)},_renderHeader:function(){var a=this,b=$(""),c=$("");return this.options.row_header?c.append($("
            ':'';var f=b.valueView("","");f.html&&(f=f[0].outerHTML),a+=f,a+="',f=b.valueView(l,m);f.html&&(f=f[0].outerHTML),a+=f,a+="
            ").append(a.headerView(["","header"]))):c.append($("").append(a.headerView(["","header"]))),_(this.model.get("schema")).each(function(b){c.append($("").append(a.headerView(b)))}),b.append(c),b},clear_rows:function(){this.$("tfoot").remove(),this.$("tr.noRows").remove();for(var a=null;a=this.rowViews.pop();)a.unbind(null,null,this),a.clean();this.rowViews=[]},addRow:function(a,b,c){var d=this,e=new d.rowView({model:a,order:this.model.columnNames(),row_header:this.options.row_header});if(e.tableView=this,e.bind("clean",function(){var a=_.indexOf(d.rowViews,e);d.rowViews.splice(a,1);for(var b=a;b1&&!this.timeSlider){var c=this,d=a.create("time_slider",this,{layer:b});this.mapView.addOverlay(d),this.timeSlider=d,b.bind("remove",function e(){c.timeSlider=null,d.remove(),b.unbind("remove",e)})}},_setupSublayers:function(a,b){b.sublayer_options=[],_.each(a.slice(1),function(a){"layergroup"===a.type?_.each(a.options.layer_definition.layers,function(a){b.sublayer_options.push({visible:void 0!==a.visible?a.visible:!0})}):"namedmap"===a.type?_.each(a.options.named_map.layers,function(a){b.sublayer_options.push({visible:void 0!==a.visible?a.visible:!0})}):"torque"===a.type&&b.sublayer_options.push({visible:void 0!==a.options.visible?a.options.visible:!0})})},load:function(a,c){function d(){e._createSlides([a].concat(a.slides))}var e=this;if("string"==typeof a){var f=a;return cdb.core.Loader.get(f,function(a){a?e.load(a,c):e.throwError("error fetching viz.json file")}),this}var g=a.slides;g&&g.length>0&&(a=g[0],a.slides=g.slice(1));var h=a.layers;if(a.slides&&a.slides.length>0&&(h=h.concat(_.flatten(a.slides.map(function(a){return a.layers})))),!this.checkModules(h))return this.moduleChecked?(e.throwError("modules couldn't be loaded"),this):(this.moduleChecked=!0,this.loadModules(h,function(){e.load(a,c)}),this);window&&window.location.protocol&&"https:"===window.location.protocol&&(this.https=!0),a.https&&(this.https=a.https),c=c||{},this._applyOptions(a,c);var i=!!_.find(a.overlays,function(a){return"logo"===a.type&&a.options.display});this.cartodb_logo=void 0!==c.cartodb_logo?c.cartodb_logo:i,this.mobile?this.cartodb_logo=!1:i||void 0!==c.cartodb_logo||(this.cartodb_logo=!0);var j=void 0===c.scrollwheel?a.scrollwheel:c.scrollwheel,k=(void 0===c.slides_controller?a.slides_controller:c.slides_controller,this.isMobileDevice()),l=_.isObject(_.find(a.overlays,function(a){return"zoom"==a.type})),m=k||l||j;if(a.maxZoom||(a.maxZoom=20),a.minZoom||(a.minZoom=0),this.gmaps_base_type&&"leaflet"===a.map_provider){var n=["roadmap","gray_roadmap","dark_roadmap","hybrid","satellite","terrain"];_.contains(n,this.gmaps_base_type)?a.layers?(a.layers[0].options.type="GMapsBase",a.layers[0].options.base_type=this.gmaps_base_type,a.layers[0].options.name=this.gmaps_base_type,this.gmaps_style&&(a.layers[0].options.style="string"==typeof this.gmaps_style?JSON.parse(this.gmaps_style):this.gmaps_style),a.map_provider="googlemaps",a.layers[0].options.attribution=""):cdb.log.error("No base map loaded. Using Leaflet."):cdb.log.error('GMaps base_type "'+this.gmaps_base_type+" is not supported. Using leaflet.")}var o={title:a.title,description:a.description,maxZoom:a.maxZoom,minZoom:a.minZoom,legends:a.legends,scrollwheel:j,drag:m,provider:a.map_provider};if(a.bounding_box_sw&&a.bounding_box_ne&&(o.bounding_box_sw=a.bounding_box_sw,o.bounding_box_ne=a.bounding_box_ne),a.bounds)o.view_bounds_sw=a.bounds[0],o.view_bounds_ne=a.bounds[1];else{var p=a.center;"string"==typeof p&&(p=$.parseJSON(p)),o.center=p||[0,0],o.zoom=void 0===a.zoom?4:a.zoom}var q=new cdb.geo.Map(o);this.map=q,this.overlayModels=new Backbone.Collection,this.updated_at=a.updated_at||(new Date).getTime();var r=this.$el.outerHeight();0===r&&(this.mapConfig=o,$(window).bind("resize",this._onResize));var s=$("
            ").css({position:"relative",width:"100%",height:"100%"});this.container=s;var t=$("
            ").addClass("cartodb-map-wrapper").css({position:"absolute",top:0,left:0,right:0,bottom:0,width:"100%"});s.append(t),this.$el.append(s);var u=new cdb.geo.MapView.create(t,q);return this.mapView=u,(c.legends||void 0===c.legends&&this.map.get("legends")!==!1)&&q.layers.bind("reset",this.addLegends,this),this.overlayModels.bind("reset",function(b){this._addOverlays(b,a,c),this._addMobile(a,c)},this),this.mapView.bind("newLayerView",this._addLoading,this),c.time_slider&&this.mapView.bind("newLayerView",this._addTimeSlider,this),this.infowindow&&this.mapView.bind("newLayerView",this.addInfowindow,this),this.tooltip&&this.mapView.bind("newLayerView",this.addTooltip,this),this.map.layers.reset(_.map(a.layers,function(a){return b.create(a.type||a.kind,e,a)})),this.overlayModels.reset(a.overlays),c.sublayer_options||this._setupSublayers(a.layers,c),this._setLayerOptions(c),a.slides&&(this.map.disableKeyboard(),void 0===cartodb.odyssey?(cdb.config.bind("moduleLoaded:odyssey",d),Loader.loadModule("odyssey")):d()),_.defer(function(){e.trigger("done",e,e.getLayers())}),this},_addTimeSlider:function(){var a=_(this.getLayers()).find(function(a){return"torque"===a.model.get("type")&&a.model.get("visible")});a&&(this.torqueLayer=a,this.torqueLayer.bind("change:time",function(a){this.trigger("change:step",this.torqueLayer,this.torqueLayer.getStep())},this),!this.isMobileEnabled&&this.torqueLayer&&this.addTimeSlider(this.torqueLayer))},setAnimationStep:function(a,b){return this.torqueLayer?(this.torqueLayer.setStep(a,b),!0):!1},_createSlides:function(a){function c(a){var b={set:function(){var b=arguments;return O.Action({enter:function(){a.set.apply(a,b)}})},reset:function(){var b=arguments;return O.Action({enter:function(){a.reset.apply(a,b)}})}};return b}function d(a,b){var c=O.Trigger(),e=d._callbacks;return e||(e=d._callbacks=[],O.Keys().left().then(function(){for(var b=0;b0){var b=[a.transition_options].concat(_.pluck(a.slides,"transition_options"));return this.addOverlay({type:"slides_controller",transitions:b})}},_addHeader:function(a,b){var c=[b.transition_options].concat(_.pluck(b.slides,"transition_options"));return this.addOverlay({type:"header",options:a.options,transitions:c})},_addMobile:function(a,b){var c,d=a.layers[1];if(this.isMobileEnabled){b&&void 0===b.legends&&(b.legends=this.legends?!0:!1),d.options&&d.options.layer_definition?c=d.options.layer_definition.layers:d.options&&d.options.named_map&&d.options.named_map.layers&&(c=d.options.named_map.layers);var e=[a.transition_options].concat(_.pluck(a.slides,"transition_options"));this.mobileOverlay=this.addOverlay({type:"mobile",layers:c,slides:a.slides,transitions:e,overlays:a.overlays,options:b,torqueLayer:this.torqueLayer})}},_createLegendView:function(a,b){if(a.legend){a.legend.data=a.legend.items;var c=a.legend;if(c.items&&c.items.length||c.template){var d=_.extend(a.legend,{visible:a.visible}),e=new cdb.geo.ui.LegendModel(d),f=new cdb.geo.ui.Legend({model:e});return b.bind("change:visibility",function(a,b){f[b?"hide":"show"]()}),b.legend=e,f}}return null},createLegendView:function(a){for(var b=[],c=a.length-1;c>=0;--c){var d=a.at(c).cid,e=a.at(c).attributes;if(e.visible){var f=this.mapView.getLayerByCid(d);if(f){var f=this.mapView.getLayerByCid(d);b.push(this._createLayerLegendView(e,f))}}}return _.flatten(b)},_createLayerLegendView:function(a,b){var c=this,d=[];if(a.options&&a.options.layer_definition){var e=a.options.layer_definition.layers;_(e).each(function(a,e){d.push(c._createLegendView(a,b.getSubLayer(e)))})}else if(a.options&&a.options.named_map&&a.options.named_map.layers){var e=a.options.named_map.layers;_(e).each(function(a,e){d.push(c._createLegendView(a,b.getSubLayer(e)))})}else d.push(this._createLegendView(a,b));return _.compact(d).reverse()},addOverlay:function(b){b.map=this.map;var c=a.create(b.type,this,b);return c&&("loader"==b.type&&(this.loader=c),this.mapView.addOverlay(c),this.overlays.push(c),c.bind("clean",function(){for(var a in this.overlays){var b=this.overlays[a];if(c.cid===b.cid)return void this.overlays.splice(a,1)}},this)),c},_applyOptions:function(a,b){function c(b){if(!a.overlays)return null;for(var c=0;c1){var m=b.auth_token;if(e(a.layers),a.slides)for(var n=0;n','x','
            ','
            ',"{{#content.fields}}","{{#title}}

            {{title}}

            {{/title}}","{{#value}}",'

            {{{ value }}}

            ',"{{/value}}","{{^value}}",'

            null

            ',"{{/value}}","{{/content.fields}}","
            ","
            ",'
            ',"
            "].join("")},cdb.vis.Vis=c}(),function(){Queue=function(){this._methods=[],this._response=null,this._flushed=!1},Queue.prototype={add:function(a){this._flushed?a(this._response):this._methods.push(a)},flush:function(a){if(!this._flushed)for(this._response=a,this._flushed=!0;this._methods[0];)this._methods.shift()(a)}},StaticImage=function(){MapBase.call(this,this),this.imageOptions={},this.error=null,this.supported_formats=["png","jpg"],this.defaults={basemap_url_template:"http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png",basemap_subdomains:["a","b","c"],format:"png",zoom:10,center:[0,0],size:[320,240],tiler_port:80,tiler_domain:"carto.com"}},StaticImage.prototype=_.extend({},MapBase.prototype,{load:function(a,b){return _.bindAll(this,"_onVisLoaded"),this.queue=new Queue,this.no_cdn=b.no_cdn,this.userOptions=b,b=_.defaults({vizjson:a,temp_id:"s"+this._getUUID()},this.defaults),this.imageOptions=b,cdb.core.Loader.get(a,this._onVisLoaded),this},loadLayerDefinition:function(a,b){return this.queue=new Queue,a.user_name?(this.userOptions=b,this.options.api_key=a.api_key,this.options.user_name=a.user_name,this.options.tiler_protocol=a.tiler_protocol,this.options.tiler_domain=a.tiler_domain,this.options.tiler_port=a.tiler_port,this.options.maps_api_template=a.maps_api_template,this.endPoint="/api/v1/map",this.options.maps_api_template||this._buildMapsApiTemplate(this.options),this.options.layers=a,void this._requestLayerGroupID()):void cartodb.log.error("Please, specify the username")},_onVisLoaded:function(a){if(a){var b=a.layers[0],c=this._getDataLayer(a.layers);c.options&&(this.options.user_name=c.options.user_name),c.options.maps_api_template?this.options.maps_api_template=c.options.maps_api_template:this._setupTilerConfiguration(c.options.tiler_protocol,c.options.tiler_domain,c.options.tiler_port),this.auth_tokens=a.auth_tokens,this.endPoint="/api/v1/map";var d=[],e=a.bounds;e&&(d.push([e[0][1],e[0][0]]),d.push([e[1][1],e[1][0]])),this.imageOptions.zoom=a.zoom,this.imageOptions.center=JSON.parse(a.center),this.imageOptions.bbox=d,this.imageOptions.bounds=a.bounds,b&&b.options&&(this.imageOptions.basemap=b);var f=!1,g=this._getLayerByType(a.layers,"namedmap");if(g){var h=this._getLayerByType(a.layers,"torque");h&&h.options&&h.options.named_map&&h.options.named_map.name===g.options.named_map.name&&(f=!0)}var i=[],j=this._getBasemapLayer();j&&i.push(j);for(var k,l=1;l0&&(b.auth_tokens=this.auth_tokens),{type:"named",options:b}},_getVisibleLayers:function(a){return _.filter(a,function(a){return a.visible})},_getUrl:function(){var a=(this.options.user_name,this.imageOptions.bbox),b=this.imageOptions.layergroupid,c=this.imageOptions.zoom||this.defaults.zoom,d=this.imageOptions.center||this.defaults.center,e=this.imageOptions.size||this.defaults.size,f=this.imageOptions.format||this.defaults.format,g=d[0],h=d[1],i=e[0],j=e[1],k=this.isHttps()?null:"a",l=this._host(k)+this.endPoint;return a&&a.length&&!this.userOptions.override_bbox?[l,"static/bbox",b,a.join(","),i,j+"."+f].join("/"):[l,"static/center",b,c,g,h,i,j+"."+f].join("/")},_getUUID:function(){var a=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()},_set:function(a,b){var c=this;return this.queue.add(function(){c.imageOptions[a]=b}),this},zoom:function(a){return this._set("zoom",a)},bbox:function(a){return this._set("bbox",a)},center:function(a){return this._set("bbox",null),this._set("center",a)},format:function(a){return this._set("format",_.include(this.supported_formats,a)?a:this.defaults.format)},size:function(a,b){return this._set("size",[a,void 0===b?a:b])},into:function(a){var b=this;return a instanceof HTMLImageElement?(this.imageOptions.size=[a.width,a.height],void this.queue.add(function(c){a.src=b._getUrl()})):void cartodb.log.error("img should be an image")},getUrl:function(a){var b=this;this.queue.add(function(){a&&a(b.error,b._getUrl())})},write:function(a){var b=this;return this.imageOptions.attributes=a,a&&a.src?document.write(''):document.write(''),this.queue.add(function(){var a=document.getElementById(b.imageOptions.temp_id);a.src=b._getUrl(),a.removeAttribute("temp_id");var c=b.imageOptions.attributes;c&&c["class"]&&a.setAttribute("class",c["class"]),c&&c.id&&a.setAttribute("id",c.id)}),this}}),cdb.Image=function(a,b){b||(b={});var c=new StaticImage;return"string"==typeof a?c.load(a,b):c.loadLayerDefinition(a,b),c}}(),function(){cdb.vis.Overlay.register("logo",function(a,b){}),cdb.vis.Overlay.register("slides_controller",function(a,b){var c=new cdb.geo.ui.SlidesController({transitions:a.transitions,visualization:b});return c.render()}),cdb.vis.Overlay.register("mobile",function(a,b){var c=cdb.core.Template.compile(a.template||'
              ',a.templateType||"mustache"),d=new cdb.geo.ui.Mobile({template:c,mapView:b.mapView,overlays:a.overlays,transitions:a.transitions,slides_data:a.slides,visualization:b,layerView:a.layerView,visibility_options:a.options,torqueLayer:a.torqueLayer,map:a.map});return d.render()}),cdb.vis.Overlay.register("image",function(a,b){var c=a.options,d=cdb.core.Template.compile(a.template||'
              {{{ content }}}
              ',a.templateType||"mustache"),e=new cdb.geo.ui.Image({model:new cdb.core.Model(c),template:d});return e.render()}),cdb.vis.Overlay.register("text",function(a,b){var c=a.options,d=cdb.core.Template.compile(a.template||'
              {{{ text }}}
              ',a.templateType||"mustache"),e=new cdb.geo.ui.Text({model:new cdb.core.Model(c),template:d,className:"cartodb-overlay overlay-text "+c.device});return e.render()}),cdb.vis.Overlay.register("annotation",function(a,b){var c=a.options,d=cdb.core.Template.compile(a.template||'
              {{{ text }}}
              ',a.templateType||"mustache"),c=a.options,e=new cdb.geo.ui.Annotation({className:"cartodb-overlay overlay-annotation "+c.device,template:d,mapView:b.mapView,device:c.device,text:c.extra.rendered_text,minZoom:c.style["min-zoom"],maxZoom:c.style["max-zoom"],latlng:c.extra.latlng,style:c.style});return e.render()}),cdb.vis.Overlay.register("zoom_info",function(a,b){}),cdb.vis.Overlay.register("header",function(a,b){var c=a.options,d=cdb.core.Template.compile(a.template||'
              {{{ title }}}
              {{{ description }}}
              ',a.templateType||"mustache"),e=new cdb.geo.ui.Header({model:new cdb.core.Model(c),transitions:a.transitions,slides:b.slides,template:d});return e.render()}),cdb.vis.Overlay.register("zoom",function(a,b){if(!a.template)return void b.trigger("error","zoom template is empty");var c=new cdb.geo.ui.Zoom({model:a.map,template:cdb.core.Template.compile(a.template)});return c.render()}),cdb.vis.Overlay.register("loader",function(a){var b=new cdb.geo.ui.TilesLoader({template:cdb.core.Template.compile(a.template)});return b.render()}),cdb.vis.Overlay.register("time_slider",function(a,b){var c=new cdb.geo.ui.TimeSlider(a);return c.render()}),cdb.vis.Overlay.register("_header",function(a,b){function c(a,b){return a.substr(0,b-1)+(a.length>b?"…":"")}location.href?a.share_url=encodeURIComponent(location.href):a.share_url=a.url;var d,e=cdb.core.Template.compile(a.template||" {{#title}}

              {{#url}} {{title}} {{/url}} {{^url}} {{title}} {{/url}}

              {{/title}} {{#description}}

              {{{description}}}

              {{/description}} {{#mobile_shareable}} {{/mobile_shareable}} ",a.templateType||"mustache"),f=a.map.get("title"),g=a.map.get("description"),h=f+": "+g;d=f&&g?c(f+": "+g,112)+" %23map ":f?c(f,112)+" %23map":g?c(g,112)+" %23map":"%23map";var i="false"!=a.shareable&&a.shareable?a.shareable:null,j=i;j=j&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var k=new cdb.geo.ui.Header({title:f,description:g,facebook_title:h,twitter_title:d,url:a.url,share_url:a.share_url,mobile_shareable:j,shareable:i&&!j,template:e});return k.render()}),cdb.vis.Overlay.register("infowindow",function(a,b){if(0==_.size(a.fields))return null;var c=new cdb.geo.ui.InfowindowModel({template:a.template,template_type:a.templateType,alternative_names:a.alternative_names,fields:a.fields,template_name:a.template_name}),d=new cdb.geo.ui.Infowindow({model:c,mapView:b.mapView,template:a.template});return d}),cdb.vis.Overlay.register("layer_selector",function(a,b){var c=a.options,d=cdb.core.Template.compile(a.template||' Visible layers
              ',a.templateType||"underscore"),e=cdb.core.Template.compile(a.template||'
                ',a.templateType||"underscore"),f=new cdb.geo.ui.LayerSelector({model:new cdb.core.Model(c),mapView:b.mapView,template:d,dropdown_template:e,layer_names:a.layer_names}),g=b.timeSlider;return g&&f.bind("change:visible",function(a,b,c){"torque"===c.get("type")&&g[a?"show":"hide"]()}),b.legends&&f.bind("change:visible",function(a,c,d){if("layergroup"===d.get("type")||"torque"===d.get("type")){var e=b.legends&&b.legends.getLegendByIndex(c);e&&e[a?"show":"hide"]()}}),f.render()}),cdb.vis.Overlay.register("fullscreen",function(a,b){var c=a.options;c.allowWheelOnFullscreen=!1;var d=cdb.core.Template.compile(a.template||'',a.templateType||"mustache"),e=new cdb.ui.common.FullScreen({doc:"#map > div",model:new cdb.core.Model(c),mapView:b.mapView,template:d});return e.render()}),cdb.vis.Overlay.register("share",function(a,b){var c=a.options,d=cdb.core.Template.compile(a.template||'',a.templateType||"mustache"),e=new cdb.geo.ui.Share({model:new cdb.core.Model(c),vis:b,map:b.map,template:d});return e.createDialog(),e.render()}),cdb.vis.Overlay.register("search",function(a,b){var c=cdb.core.Template.compile(a.template||'
                ',a.templateType||"mustache"),d=new cdb.geo.ui.Search(_.extend(a,{template:c,mapView:b.mapView,model:b.map}));return d.render()}),cdb.vis.Overlay.register("tooltip",function(a,b){if(!a.layer&&b.getLayers().length<=1)throw new Error("layer is null");return a.layer=a.layer||b.getLayers()[1],a.layer.setInteraction(!0),a.mapView=b.mapView,new cdb.geo.ui.Tooltip(a)}),cdb.vis.Overlay.register("infobox",function(a,b){var c,d=b.getLayers();if(a.layer||(d.length>1&&(c=d[1]),a.layer=c),!a.layer)throw new Error("layer is null");a.layer.setInteraction(!0);var e=new cdb.geo.ui.InfoBox(a);return e})}(),function(){function a(a){for(var b in e)if(-1!==a.indexOf(b))return a.replace(b,e[b]);return a}function b(a){for(var b in e){var c=e[b];if(-1!==a.indexOf(c))return a.replace(c,b)}return a}function c(a,b){b.infowindow&&b.infowindow.fields&&(b.interactivity?-1===b.interactivity.indexOf("cartodb_id")&&(b.interactivity=b.interactivity+",cartodb_id"):b.interactivity="cartodb_id"),a.https&&(b.tiler_protocol="https",b.tiler_port=443,b.sql_api_protocol="https",b.sql_api_port=443),b.cartodb_logo=void 0==a.cartodb_logo?b.cartodb_logo:a.cartodb_logo}var d=cdb.vis.Layers,e={"https://dnv9my2eseobd.cloudfront.net/":"http://a.tiles.mapbox.com/","https://maps.nlp.nokia.com/":"http://maps.nlp.nokia.com/","https://tile.stamen.com/":"http://tile.stamen.com/","https://{s}.maps.nlp.nokia.com/":"http://{s}.maps.nlp.nokia.com/","https://cartocdn_{s}.global.ssl.fastly.net/":"http://{s}.api.cartocdn.com/","https://cartodb-basemaps-{s}.global.ssl.fastly.net/":"http://{s}.basemaps.cartocdn.com/"};d.register("tilejson",function(c,d){var e=d.tiles[0];return c.https===!0?e=b(e):c.https===!1&&(e=a(e)),new cdb.geo.TileLayer({urlTemplate:e})}),d.register("tiled",function(c,d){var e=d.urlTemplate;return c.https===!0?e=b(e):c.https===!1&&(e=a(e)),d.urlTemplate=e,new cdb.geo.TileLayer(d)}),d.register("wms",function(a,b){return new cdb.geo.WMSLayer(b)}),d.register("gmapsbase",function(a,b){return new cdb.geo.GMapsBaseLayer(b)}),d.register("plain",function(a,b){return new cdb.geo.PlainLayer(b)}),d.register("background",function(a,b){return new cdb.geo.PlainLayer(b)});var f=function(a,b){return c(a,b),b.sublayers?(b.type="layergroup",new cdb.geo.CartoDBGroupLayer(b)):new cdb.geo.CartoDBLayer(b)};d.register("cartodb",f),d.register("carto",f),d.register("layergroup",function(a,b){return c(a,b),new cdb.geo.CartoDBGroupLayer(b)}),d.register("namedmap",function(a,b){return c(a,b),new cdb.geo.CartoDBNamedMapLayer(b)}),d.register("torque",function(a,b){return c(a,b),a.https&&b.sql_api_domain&&-1!==b.sql_api_domain.indexOf("carto.com")&&(b.sql_api_protocol="https",b.sql_api_port=443,b.tiler_protocol="https",b.tiler_port=443),b.cartodb_logo=void 0==a.cartodb_logo?b.cartodb_logo:a.cartodb_logo,new cdb.geo.TorqueLayer(b)})}(),function(){function a(){}function b(a){var b=a.host||"carto.com",c=a.protocol||"https";return c+"://"+a.user+"."+b+"/api/v1/viz/"+a.table+"/viz.json"}function c(a,c){var d=null;return void 0!==a.layers||void 0!==(a.kind||a.type)?void _.defer(function(){c(a)}):(void 0!==a.table&&void 0!==a.user?d=b(a):a.indexOf&&(d=a),void(d?cdb.core.Loader.get(d,c):_.defer(function(){c(null)})))}_.extend(a.prototype,Backbone.Events,{done:function(a){return this.bind("done",a)},error:function(a){return this.bind("error",a)}}),cdb._Promise=a;cartodb.createLayer=function(b,d,e,f){if(void 0===b)throw new TypeError("map should be provided");if(void 0===d)throw new TypeError("layer should be provided");var g,h,e=e||{},i=arguments,j=i[i.length-1];_.isFunction(j)&&(f=j);var k=new a;return k.addTo=function(a,b){return k.on("done",function(){h.addLayerToMap(g,a,b)}),k},c(d,function(a){function c(){g=l.createLayer(d,{no_base_layer:!0});var a,c=/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),h=e.mobile_layout&&c||e.force_mobile;if(!g)return k.trigger("error","layer not supported"),k;if(e.infowindow&&l.addInfowindow(g),e.tooltip&&l.addTooltip(g),e.legends){var i=cdb.vis.Layers.create(d.type||d.kind,l,d);l._addLegends(l._createLayerLegendView(i.attributes,g))}e.time_slider&&"torque"===g.model.get("type")&&(h||l.addTimeSlider(g),a=g),h&&(e.mapView=b.viz.mapView,l.addOverlay({type:"mobile",layerView:g,overlays:[],torqueLayer:a,options:e})),f&&f(g),k.trigger("done",g)}var d;if(!a)return void k.trigger("error");if(a.layers){a.layers.length<2&&k.trigger("error","visualization file does not contain layer info");var i=e.layerIndex;if(void 0!==i){if(a.layers.length<=i)return void k.trigger("error","layerIndex out of bounds");d=a.layers[i]}else{var j=["namedmap","layergroup","torque"];d=_.find(a.layers,function(a){return-1!==j.indexOf(a.type)})}}else d=a;if(!d)return void k.trigger("error");if(e&&!_.isFunction(e)&&(d.options=d.options||{},_.extend(d.options,e)),e=_.defaults(e,{infowindow:!0,https:!1,legends:!0,time_slider:!0,tooltip:!0}),"undefined"!=typeof b.overlayMapTypes)h=cdb.geo.GoogleMapsMapView;else{if(!(b instanceof L.Map||window.L&&b instanceof window.L.Map))return k.trigger("error","cartodb.js can't guess the map type"),k;h=cdb.geo.LeafletMapView}var l=b.viz;if(!l){var m=new h({map_object:b,map:new cdb.geo.Map});b.viz=l=new cdb.vis.Vis({mapView:m}),l.updated_at=a.updated_at,l.https=e.https}l.checkModules([d])?c():l.loadModules([d],function(){c()})}),k}}(),function(){function a(b){if(cartodb===this||window===this)return new a(b);if(!b.user)throw new Error("user should be provided");var c=new String(window.location.protocol);if(c=c.slice(0,c.length-1),"file"==c&&(c="https"),this.ajax=b.ajax||("undefined"!=typeof jQuery?jQuery.ajax:reqwest),!this.ajax)throw new Error("jQuery or reqwest should be loaded");if(this.options=_.defaults(b,{version:"v2",protocol:c,jsonp:"undefined"!=typeof jQuery?!jQuery.support.cors:!1}),!this.options.sql_api_template){var d=this.options,e=null;if(d&&d.completeDomain)e=d.completeDomain;else{var f=d.host||"carto.com",g=d.protocol||"https";e=g+"://{user}."+f}this.options.sql_api_template=e}}function b(a){return JSON.parse(a.replace(/^{/,"[").replace(/}$/,"]"))}var c=this;c.cartodb=c.cartodb||{},a.prototype._host=function(){var a=this.options;return a.sql_api_template.replace("{user}",a.user)+"/api/"+a.version+"/sql"},a.prototype.execute=function(a,b,c,d){var e=1024,f=new cartodb._Promise;if(!a)throw new TypeError("sql should not be null");var g=arguments,h=g[g.length-1];_.isFunction(h)&&(d=h),c=_.defaults(c||{},this.options);var i={type:"get",dataType:"json",crossDomain:!0};void 0!==c.cache&&(i.cache=c.cache),c.jsonp&&(delete i.crossDomain,c.jsonpCallback&&(i.jsonpCallback=c.jsonpCallback),i.dataType="jsonp");var j="156543.03515625",k="ST_MakeEnvelope(-20037508.5,-20037508.5,20037508.5,20037508.5,3857)";a=a.replace("!bbox!",k).replace("!pixel_width!",j).replace("!pixel_height!",j);var l=Mustache.render(a,b),m=l.length0&&null!=a.rows[0].maxx){var b=a.rows[0],c=-85.0511,f=85.0511,g=-179,h=179,i=function(a,b,c){return b>a?b:a>c?c:a},j=i(b.maxx,g,h),k=i(b.minx,g,h),l=i(b.maxy,c,f),m=i(b.miny,c,f),n=[[l,j],[m,k]];e.trigger("done",n),d&&d(n)}}).error(function(a){e.trigger("error",a)}),e},a.prototype.table=function(a){function b(){b.fetch.apply(b,arguments)}var c,d,e,f,g=a,h=[],i=this;return b.fetch=function(a){a=a||{};var c=arguments,d=c[c.length-1];_.isFunction(d)&&(callback=d,1===c.length&&(a={})),i.execute(b.sql(),a,callback)},b.sql=function(){var a="select";return a+=h.length?" "+h.join(",")+" ":" * ",a+="from "+g,c&&(a+=" where "+c),d&&(a+=" limit "+d),e&&(a+=" order by "+e),f&&(a+=" "+f),a},b.filter=function(a){return c=a,b},b.order_by=function(a){return e=a,b},b.asc=function(){return f="asc",b},b.desc=function(){return f="desc",b},b.columns=function(a){return h=a,b},b.limit=function(a){return d=a,b},b},a.prototype.describeString=function(a,c,d){var e=["WITH t as ("," SELECT count(*) as total,"," count(DISTINCT {{column}}) as ndist"," FROM ({{sql}}) _wrap"," ), a as ("," SELECT "," count(*) cnt, "," {{column}}"," FROM "," ({{sql}}) _wrap "," GROUP BY "," {{column}} "," ORDER BY "," cnt DESC"," ), b As ("," SELECT"," row_number() OVER (ORDER BY cnt DESC) rn,"," cnt"," FROM a"," ), c As ("," SELECT "," sum(cnt) OVER (ORDER BY rn ASC) / t.total cumperc,"," rn,"," cnt "," FROM b, t"," LIMIT 10"," ),","stats as (","select count(distinct({{column}})) as uniq, "," count(*) as cnt, "," sum(case when COALESCE(NULLIF({{column}},'')) is null then 1 else 0 end)::numeric as null_count, "," sum(case when COALESCE(NULLIF({{column}},'')) is null then 1 else 0 end)::numeric / count(*)::numeric as null_ratio, "," (SELECT max(cumperc) weight FROM c) As skew ","from ({{sql}}) __wrap","),","hist as (","select array_agg(row(d, c)) array_agg from (select distinct({{column}}) d, count(*) as c from ({{sql}}) __wrap, stats group by 1 limit 100) _a",")","select * from stats, hist"],f=Mustache.render(e.join("\n"),{column:c,sql:a}),g=function(a){var b=a.replace(/^"(.+(?="$))?"$/,"$1");return b.replace(/""/g,'"')};this.execute(f,function(a){var c=a.rows[0],e=0,f=[];try{var h=b(c.array_agg),f=_(h).map(function(a){var b=a.match(/\((.*),(\d+)/),c=g(b[1]);return[c,+b[2]]});e=c.skew*(1-c.null_ratio)*(1-c.uniq/c.cnt)*(c.uniq>1?1:0)}catch(i){}d({type:"string",hist:f,distinct:c.uniq,count:c.cnt,null_count:c.null_count,null_ratio:c.null_ratio,skew:c.skew,weight:e})})},a.prototype.describeDate=function(a,b,c){var d=["with minimum as (","SELECT min({{column}}) as start_time FROM ({{sql}}) _wrap), ","maximum as (SELECT max({{column}}) as end_time FROM ({{sql}}) _wrap), ","null_ratio as (SELECT sum(case when {{column}} is null then 1 else 0 end)::numeric / count(*)::numeric as null_ratio FROM ({{sql}}) _wrap), ","moments as (SELECT count(DISTINCT {{column}}) as moments FROM ({{sql}}) _wrap)","SELECT * FROM minimum, maximum, moments, null_ratio"],e=Mustache.render(d.join("\n"),{column:b,sql:a});this.execute(e,function(a){var b=a.rows[0],d=new Date(b.end_time),e=new Date(b.start_time),f=(b.moments,Math.min(b.moments,1024));c({type:"date",start_time:e,end_time:d,range:d-e,steps:f,null_ratio:b.null_ratio})})},a.prototype.describeBoolean=function(a,b,c){var d=["with stats as (","select count(distinct({{column}})) as uniq,","count(*) as cnt","from ({{sql}}) _wrap ","),","null_ratio as (","SELECT sum(case when {{column}} is null then 1 else 0 end)::numeric / count(*)::numeric as null_ratio FROM ({{sql}}) _wrap), ","true_ratio as (","SELECT sum(case when {{column}} is true then 1 else 0 end)::numeric / count(*)::numeric as true_ratio FROM ({{sql}}) _wrap) ","SELECT * FROM true_ratio, null_ratio, stats"],e=Mustache.render(d.join("\n"),{column:b,sql:a});this.execute(e,function(a){var b=a.rows[0];c({type:"boolean",null_ratio:b.null_ratio,true_ratio:b.true_ratio,distinct:b.uniq,count:b.cnt})})},a.prototype.describeGeom=function(a,b,c){function d(a){return{st_multipolygon:"polygon",st_polygon:"polygon",st_multilinestring:"line",st_linestring:"line",st_multipoint:"point",st_point:"point"}[a.toLowerCase()]}var e=["with stats as (","select st_asgeojson(st_extent({{column}})) as bbox","from ({{sql}}) _wrap","),","geotype as (","select st_geometrytype({{column}}) as geometry_type from ({{sql}}) _w where {{column}} is not null limit 1","),","clusters as (","with clus as (","SELECT distinct(ST_snaptogrid(the_geom, 10)) as cluster, count(*) as clustercount FROM ({{sql}}) _wrap group by 1 order by 2 desc limit 3),","total as (","SELECT count(*) FROM ({{sql}}) _wrap)","SELECT sum(clus.clustercount)/sum(total.count) AS clusterrate FROM clus, total","),","density as (","SELECT count(*) / st_area(st_extent(the_geom)) as density FROM ({{sql}}) _wrap",")","select * from stats, geotype, clusters, density"],f=Mustache.render(e.join("\n"),{column:b,sql:a});this.execute(f,function(a){var b=a.rows[0],e=JSON.parse(b.bbox).coordinates[0];c({type:"geom",bbox:[[e[0][0],e[0][1]],[e[2][0],e[2][1]]],geometry_type:b.geometry_type,simplified_geometry_type:d(b.geometry_type),cluster_rate:b.clusterrate,density:b.density})})},a.prototype.columns=function(a,b,c){var d=arguments,e=d[d.length-1];_.isFunction(e)&&(c=e);var f="select * from ("+a+") __wrap limit 0",g=["cartodb_id","latitude","longitude","created_at","updated_at","lat","lon","the_geom_webmercator"];this.execute(f,function(a){var b={};for(var d in a.fields)-1===g.indexOf(d)&&(b[d]=a.fields[d].type);c(b)})},a.prototype.describeFloat=function(a,c,d){var e=["with stats as (","select min({{column}}) as min,","max({{column}}) as max,","avg({{column}}) as avg,","count(DISTINCT {{column}}) as cnt,","count(distinct({{column}})) as uniq,","count(*) as cnt,","sum(case when {{column}} is null then 1 else 0 end)::numeric / count(*)::numeric as null_ratio,","stddev_pop({{column}}) / count({{column}}) as stddev,","CASE WHEN abs(avg({{column}})) > 1e-7 THEN stddev({{column}}) / abs(avg({{column}})) ELSE 1e12 END as stddevmean,",'CDB_DistType(array_agg("{{column}}"::numeric)) as dist_type ',"from ({{sql}}) _wrap ","),","params as (select min(a) as min, (max(a) - min(a)) / 7 as diff from ( select {{column}} as a from ({{sql}}) _table_sql where {{column}} is not null ) as foo ),","histogram as (","select array_agg(row(bucket, range, freq)) as hist from (","select CASE WHEN uniq > 1 then width_bucket({{column}}, min-0.01*abs(min), max+0.01*abs(max), 100) ELSE 1 END as bucket,","numrange(min({{column}})::numeric, max({{column}})::numeric) as range,","count(*) as freq","from ({{sql}}) _w, stats","group by 1","order by 1",") __wrap","),","hist as (","select array_agg(row(d, c)) cat_hist from (select distinct({{column}}) d, count(*) as c from ({{sql}}) __wrap, stats group by 1 limit 100) _a","),","buckets as (","select CDB_QuantileBins(array_agg(distinct({{column}}::numeric)), 7) as quantiles, "," (select array_agg(x::numeric) FROM (SELECT (min + n * diff)::numeric as x FROM generate_series(1,7) n, params) p) as equalint,"," CDB_JenksBins(array_agg(distinct({{column}}::numeric)), 7) as jenks, "," CDB_HeadsTailsBins(array_agg(distinct({{column}}::numeric)), 7) as headtails ","from ({{sql}}) _table_sql where {{column}} is not null",")","select * from histogram, stats, buckets, hist"],f=Mustache.render(e.join("\n"),{column:c,sql:a});this.execute(f,function(a){var c=a.rows[0],e=b(c.hist),f=b(c.cat_hist);d({type:"number",cat_hist:_(f).map(function(a){var b=a.match(/\((.*),(\d+)/);return[+b[1],+b[2]]}),hist:_(e).map(function(a){if(!(a.indexOf("empty")>-1)){var b=a.split('"');return{index:b[0].replace(/\D/g,""),range:b[1].split(",").map(function(a){return a.replace(/\D/g,"")}),freq:b[2].replace(/\D/g,"")}}}),stddev:c.stddev,null_ratio:c.null_ratio,count:c.cnt,distinct:c.uniq,avg:c.avg,max:c.max,min:c.min,stddevmean:c.stddevmean,weight:(c.uniq>1?1:0)*(1-c.null_ratio)*(c.stddev<-1?1:c.stddev<1?.5:c.stddev<3?.25:.1),quantiles:c.quantiles,equalint:c.equalint,jenks:c.jenks,headtails:c.headtails,dist_type:c.dist_type})})},a.prototype.describe=function(a,b,c){var d=this,e=arguments,f=e[e.length-1];if(_.isFunction(f))var g=f;var h=function(a){a.column=b,g(a)},i="select * from ("+a+") __wrap limit 0";this.execute(i,function(e){var f=c&&c.type?c.type:e.fields[b].type;return f?void("string"===f?d.describeString(a,b,h):"number"===f?d.describeFloat(a,b,h):"geometry"===f?d.describeGeom(a,b,h):"date"===f?d.describeDate(a,b,h):"boolean"===f?d.describeBoolean(a,b,h):h(new Error("column type is not supported"))):void h(new Error("column does not exist"))})},c.cartodb.SQL=a}(),function(){cartodb.createVis=function(a,b,c,d){if(!a)throw new TypeError("a DOM element should be provided");var e=arguments,f=e[e.length-1];_.isFunction(f)&&(d=f),a="string"==typeof a?document.getElementById(a):a;var g=new cartodb.vis.Vis({el:a});return b&&(g.load(b,c),d&&g.done(d)),g}}(),cdb.$=$,cdb.L=L,cdb.Mustache=Mustache,cdb.Backbone=Backbone,cdb._=_}();for(var i in __prev)__prev[i]&&(window[i]=__prev[i])}(); +timeout:1e4,maximumAge:0,enableHighAccuracy:!1},locate:function(a){if(a=this._locateOptions=e.extend(this._defaultLocateOptions,a),!navigator.geolocation)return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var b=e.bind(this._handleGeolocationResponse,this),c=e.bind(this._handleGeolocationError,this);return a.watch?this._locationWatchId=navigator.geolocation.watchPosition(b,c,a):navigator.geolocation.getCurrentPosition(b,c,a),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(a){var b=a.code,c=a.message||(1===b?"permission denied":2===b?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:b,message:"Geolocation error: "+c+"."})},_handleGeolocationResponse:function(a){var b=a.coords.latitude,c=a.coords.longitude,d=new e.LatLng(b,c),f=180*a.coords.accuracy/40075017,g=f/Math.cos(e.LatLng.DEG_TO_RAD*b),h=e.latLngBounds([b-f,c-g],[b+f,c+g]),i=this._locateOptions;if(i.setView){var j=Math.min(this.getBoundsZoom(h),i.maxZoom);this.setView(d,j)}var k={latlng:d,bounds:h,timestamp:a.timestamp};for(var l in a.coords)"number"==typeof a.coords[l]&&(k[l]=a.coords[l]);this.fire("locationfound",k)}})}(window,document),!function(a,b,c){b[a]=c(a,b)}("bean",this,function(a,b){var c=window,d=b[a],e=/over|out/,f=/[^\.]*(?=\..*)\.|.*/,g=/\..*/,h="addEventListener",i="attachEvent",j="removeEventListener",k="detachEvent",l=document||{},m=l.documentElement||{},n=m[h],o=n?h:i,p=Array.prototype.slice,q=/click|mouse(?!(.*wheel|scroll))|menu|drag|drop/i,r=/mouse.*(wheel|scroll)/i,s=/^text/i,t=/^touch|^gesture/i,u={one:1},v=function(a,b,c){for(c=0;ci;i++)if((k||j[i].matches(c,e,f))&&!g(j[i],j,i,d))return}else for(var l in a)"$"===l.charAt(0)&&b(c,l.substr(1),e,f,g)},c=function(b,c,d){var e,f=a["$"+c];if(f)for(e=f.length;e--;)if(f[e].matches(b,d,null))return!0;return!1},d=function(a,c,d){var e=[];return b(a,c,d,null,function(a){return e.push(a)}),e},e=function(b){return(a["$"+b.type]||(a["$"+b.type]=[])).push(b),b},f=function(c){b(c.element,c.type,null,c.handler,function(b,c,d){return c.splice(d,1),0===c.length&&delete a["$"+b.type],!1})},g=function(){var b,c=[];for(b in a)"$"===b.charAt(0)&&(c=c.concat(a[b]));return c};return{has:c,get:d,put:e,del:f,entries:g}}(),B=n?function(a,b,c,d){a[d?h:j](b,c,!1)}:function(a,b,c,d,e){e&&d&&null===a["_on"+e]&&(a["_on"+e]=0),a[d?i:k]("on"+b,c)},C=function(a,b,d){return function(e){return e=x(e||((this.ownerDocument||this.document||this).parentWindow||c).event,!0),b.apply(a,[e].concat(d))}},D=function(a,b,d,e,f,g){return function(h){(e?e.apply(this,arguments):n?!0:h&&h.propertyName==="_on"+d||!h)&&(h&&(h=x(h||((this.ownerDocument||this.document||this).parentWindow||c).event,g)),b.apply(a,!h||f&&0!==f.length?p.call(arguments,h?0:1).concat(f):arguments))}},E=function(a,b,c,d,e){return function(){a(b,c,e),d.apply(this,arguments)}},F=function(a,b,c,d){var e,f,h,i=b&&b.replace(g,""),j=A.get(a,i,c);for(e=0,f=j.length;f>e;e++)j[e].inNamespaces(d)&&((h=j[e]).eventSupport&&B(h.target,h.eventType,h.handler,!1,h.type),A.del(h))},G=function(a,b,c,d,e){var h,i=b.replace(g,""),j=b.replace(f,"").split(".");return A.has(a,i,c)?a:("unload"===i&&(c=E(F,a,i,c,d)),w[i]&&(w[i].condition&&(c=D(a,c,i,w[i].condition,!0)),i=w[i].base||i),h=A.put(new z(a,i,c,d,j[0]&&j)),h.handler=h.isNative?C(a,h.handler,e):D(a,h.handler,i,!1,e,!1),void(h.eventSupport&&B(h.target,h.eventType,h.handler,!0,h.customType)))},H=function(a,b,c){return function(d){var e,f,g="string"==typeof a?c(a,this):a;for(e=d.target;e&&e!==this;e=e.parentNode)for(f=g.length;f--;)if(g[f]===e)return b.apply(e,arguments)}},I=function(a,b,c){var d,e,h,i,j=F,k=b&&"string"==typeof b;if(k&&b.indexOf(" ")>0){for(b=b.split(" "),i=b.length;i--;)I(a,b[i],c);return a}if(e=k&&b.replace(g,""),e&&w[e]&&(e=w[e].type),!b||k)(h=k&&b.replace(f,""))&&(h=h.split(".")),j(a,e,c,h);else if("function"==typeof b)j(a,null,b);else for(d in b)b.hasOwnProperty(d)&&I(a,d,b[d]);return a},J=function(a,b,c,d,e){var f,g,h,i,j=c,k=c&&"string"==typeof c;if(b&&!c&&"object"==typeof b)for(f in b)b.hasOwnProperty(f)&&J.apply(this,[a,f,b[f]]);else for(i=arguments.length>3?p.call(arguments,3):[],g=(k?c:b).split(" "),k&&(c=H(b,j=d,e))&&(i=p.call(i,1)),this===u&&(c=E(I,a,b,c,j)),h=g.length;h--;)G(a,g[h],c,j,i);return a},K=function(){return J.apply(u,arguments)},L=n?function(a,b,d){var e=l.createEvent(a?"HTMLEvents":"UIEvents");e[a?"initEvent":"initUIEvent"](b,!0,!0,c,1),d.dispatchEvent(e)}:function(a,b,c){c=y(c,a),a?c.fireEvent("on"+b,l.createEventObject()):c["_on"+b]++},M=function(a,b,c){var d,e,h,i,j,k=b.split(" ");for(d=k.length;d--;)if(b=k[d].replace(g,""),(i=k[d].replace(f,""))&&(i=i.split(".")),i||c||!a[o])for(j=A.get(a,b),c=[!1].concat(c),e=0,h=j.length;h>e;e++)j[e].inNamespaces(i)&&j[e].handler.apply(a,c);else L(v[b],b,a);return a},N=function(a,b,c){for(var d=0,e=A.get(b,c),f=e.length;f>d;d++)e[d].original&&J(a,e[d].type,e[d].original);return a},O={add:J,one:K,remove:I,clone:N,fire:M,noConflict:function(){return b[a]=d,this}};if(c[i]){var P=function(){var a,b=A.entries();for(a in b)b[a].type&&"unload"!==b[a].type&&I(b[a].element,b[a].type);c[k]("onunload",P),c.CollectGarbage&&c.CollectGarbage()};c[i]("onunload",P)}return O});var html4={};html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10},html4.ATTRIBS={"*::class":9,"*::dir":0,"*::id":4,"*::lang":0,"*::onclick":2,"*::ondblclick":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::style":3,"*::title":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::rel":0,"a::rev":0,"a::shape":0,"a::tabindex":0,"a::target":10,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::tabindex":0,"area::target":10,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::tabindex":0,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"del::cite":1,"del::datetime":0,"dir::compact":0,"div::align":0,"dl::compact":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::ismap":0,"input::maxlength":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::readonly":0,"input::size":0,"input::src":1,"input::tabindex":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"ol::compact":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"p::align":0,"pre::width":0,"q::cite":1,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::size":0,"select::tabindex":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::cols":0,"textarea::disabled":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::readonly":0,"textarea::rows":0,"textarea::tabindex":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"ul::compact":0,"ul::type":0},html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128},html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:16,area:2,b:0,base:18,basefont:18,bdo:0,big:0,blockquote:0,body:49,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,dd:1,del:0,dfn:0,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,font:0,form:0,frame:18,frameset:16,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:49,hr:2,html:49,i:0,iframe:4,img:2,input:2,ins:0,isindex:18,kbd:0,label:0,legend:0,li:1,link:18,map:0,menu:0,meta:18,nobr:0,noembed:4,noframes:20,noscript:20,object:16,ol:0,optgroup:0,option:1,p:1,param:18,pre:0,q:0,s:0,samp:0,script:84,select:0,small:0,span:0,strike:0,strong:0,style:148,sub:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,title:24,tr:1,tt:0,u:0,ul:0,"var":0},html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.URIEFFECTS={"a::href":2,"area::href":2,"blockquote::cite":0,"body::background":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0},html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.LOADERTYPES={"a::href":2,"area::href":2,"blockquote::cite":2,"body::background":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2};var html=function(a){function b(a){if(a=k(a),l.hasOwnProperty(a))return l[a];var b=a.match(n);return b?String.fromCharCode(parseInt(b[1],10)):(b=a.match(o))?String.fromCharCode(parseInt(b[1],16)):""}function c(a,c){return b(c)}function d(a){return a.replace(p,"")}function e(a){return a.replace(q,c)}function f(a){return a.replace(r,"&").replace(t,"<").replace(u,">").replace(v,""").replace(w,"=")}function g(a){return a.replace(s,"&$1").replace(t,"<").replace(u,">")}function h(b){return function(c,f){c=String(c);var h=null,i=!1,j=[],l=void 0,m=void 0,n=void 0;for(b.startDoc&&b.startDoc(f);c;){var o=c.match(i?x:y);if(c=c.substring(o[0].length),i){if(o[1]){var p,q=k(o[1]);if(o[2]){var r=o[3];switch(r.charCodeAt(0)){case 34:case 39:r=r.substring(1,r.length-1)}p=e(d(r))}else p=q;j.push(q,p)}else if(o[4]){if(void 0!==m&&(n?b.startTag&&b.startTag(l,j,f):b.endTag&&b.endTag(l,f)),n&&m&(a.eflags.CDATA|a.eflags.RCDATA)){h=null===h?k(c):h.substring(h.length-c.length);var s=h.indexOf("s&&(s=c.length),s&&(m&a.eflags.CDATA?b.cdata&&b.cdata(c.substring(0,s),f):b.rcdata&&b.rcdata(g(c.substring(0,s)),f),c=c.substring(s))}l=m=n=void 0,j.length=0,i=!1}}else if(o[1])b.pcdata&&b.pcdata(o[0],f);else if(o[3])n=!o[2],i=!0,l=k(o[3]),m=a.ELEMENTS.hasOwnProperty(l)?a.ELEMENTS[l]:void 0;else if(o[4])b.pcdata&&b.pcdata(o[4],f);else if(o[5]&&b.pcdata){var t=o[5];b.pcdata("<"===t?"<":">"===t?">":"&",f)}}b.endDoc&&b.endDoc(f)}}function i(b){var c,d;return h({startDoc:function(a){c=[],d=!1},startTag:function(e,g,h){if(!d&&a.ELEMENTS.hasOwnProperty(e)){var i=a.ELEMENTS[e];if(!(i&a.eflags.FOLDABLE)){if(i&a.eflags.UNSAFE)return void(d=!(i&a.eflags.EMPTY));if(g=b(e,g)){i&a.eflags.EMPTY||c.push(e),h.push("<",e);for(var j=0,k=g.length;k>j;j+=2){var l=g[j],m=g[j+1];null!==m&&void 0!==m&&h.push(" ",l,'="',f(m),'"')}h.push(">")}}}},endTag:function(b,e){if(d)return void(d=!1);if(a.ELEMENTS.hasOwnProperty(b)){var f=a.ELEMENTS[b];if(!(f&(a.eflags.UNSAFE|a.eflags.EMPTY|a.eflags.FOLDABLE))){var g;if(f&a.eflags.OPTIONAL_ENDTAG)for(g=c.length;--g>=0;){var h=c[g];if(h===b)break;if(!(a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG))return}else for(g=c.length;--g>=0&&c[g]!==b;);if(0>g)return;for(var i=c.length;--i>g;){var h=c[i];a.ELEMENTS[h]&a.eflags.OPTIONAL_ENDTAG||e.push("")}c.length=g,e.push("")}}},pcdata:function(a,b){d||b.push(a)},rcdata:function(a,b){d||b.push(a)},cdata:function(a,b){d||b.push(a)},endDoc:function(a){for(var b=c.length;--b>=0;)a.push("");c.length=0}})}function j(b,c,d){var e=[];return i(function(b,e){for(var f=0;f",amp:"&",nbsp:" ",quot:'"',apos:"'"},m=/^(?:https?|mailto|data)$/i,n=/^#(\d+)$/,o=/^#x([0-9A-Fa-f]+)$/,p=/\0/g,q=/&(#\d+|#x[0-9A-Fa-f]+|\w+);/g,r=/&/g,s=/&([^a-z#]|#(?:[^0-9x]|x(?:[^0-9a-f]|$)|$)|$)/gi,t=//g,v=/\"/g,w=/\=/g,x=new RegExp("^\\s*(?:(?:([a-z][a-z-]*)(\\s*=\\s*(\"[^\"]*\"|'[^']*'|(?=[a-z][a-z-]*\\s*=)|[^>\"'\\s]*))?)|(/?>)|[\\s\\S][^a-z\\s>]*)","i"),y=new RegExp("^(?:&(\\#[0-9]+|\\#[x][0-9a-f]+|\\w+);||]*>|<\\?[^>*]*>|<(/)?([a-z][a-z0-9]*)|([^<&>]+)|([<&>]))","i"),z=new RegExp("^(?:([^:/?#]+):)?");return{escapeAttrib:f,makeHtmlSanitizer:i,makeSaxParser:h,normalizeRCData:g,sanitize:j,unescapeEntities:e}}(html4),html_sanitize=html.sanitize;"undefined"!=typeof window&&(window.html=html,window.html_sanitize=html_sanitize),html4.ATTRIBS["*::style"]=0,html4.ELEMENTS.style=0,html4.ATTRIBS["a::target"]=0,html4.ELEMENTS.video=0,html4.ATTRIBS["video::src"]=0,html4.ATTRIBS["video::poster"]=0,html4.ATTRIBS["video::controls"]=0,html4.ELEMENTS.audio=0,html4.ATTRIBS["audio::src"]=0,html4.ATTRIBS["video::autoplay"]=0,html4.ATTRIBS["video::controls"]=0,function(a,b,c){b[a]=c()}("reqwest",this,function(){function handleReadyState(a,b,c){return function(){return a._aborted?c(a.request):void(a.request&&4==a.request[readyState]&&(a.request.onreadystatechange=noop,twoHundo.test(a.request.status)?b(a.request):c(a.request)))}}function setHeaders(a,b){var c,d=b.headers||{};d.Accept=d.Accept||defaultHeaders.accept[b.type]||defaultHeaders.accept["*"],b.crossOrigin||d[requestedWith]||(d[requestedWith]=defaultHeaders.requestedWith),d[contentType]||(d[contentType]=b.contentType||defaultHeaders.contentType);for(c in d)d.hasOwnProperty(c)&&a.setRequestHeader(c,d[c])}function setCredentials(a,b){"undefined"!=typeof b.withCredentials&&"undefined"!=typeof a.withCredentials&&(a.withCredentials=!!b.withCredentials)}function generalCallback(a){lastValue=a}function urlappend(a,b){return a+(/\?/.test(a)?"&":"?")+b}function handleJsonp(a,b,c,d){var e=uniqid++,f=a.jsonpCallback||"callback",g=a.jsonpCallbackName||reqwest.getcallbackPrefix(e),h=new RegExp("((^|\\?|&)"+f+")=([^&]+)"),i=d.match(h),j=doc.createElement("script"),k=0,l=-1!==navigator.userAgent.indexOf("MSIE 10.0");return i?"?"===i[3]?d=d.replace(h,"$1="+g):g=i[3]:d=urlappend(d,f+"="+g),win[g]=generalCallback,j.type="text/javascript","undefined"==typeof j.onreadystatechange||l||(j.event="onclick",j.htmlFor=j.id="_reqwest_"+e),j.onload=j.onreadystatechange=function(){return j[readyState]&&"complete"!==j[readyState]&&"loaded"!==j[readyState]||k?!1:(j.onload=j.onreadystatechange=null,j.onclick&&j.onclick(),a.success&&a.success(lastValue),lastValue=void 0,head.removeChild(j),void(k=1))},j.src=d,j.async=!0,head.appendChild(j),{abort:function(){j.onload=j.onreadystatechange=null,a.error&&a.error({},"Request is aborted: timeout",{}),lastValue=void 0,head.removeChild(j),k=1}}}function getRequest(a,b){var c,d=this.o,e=(d.method||"GET").toUpperCase(),f="string"==typeof d?d:d.url,g=d.processData!==!1&&d.data&&"string"!=typeof d.data?reqwest.toQueryString(d.data):d.data||null;return"jsonp"!=d.type&&"GET"!=e||!g||(f=urlappend(f,g),g=null),"jsonp"==d.type?handleJsonp(d,a,b,f):(c=xhr(),c.open(e,f,!0),setHeaders(c,d),setCredentials(c,d),c.onreadystatechange=handleReadyState(this,a,b),d.before&&d.before(c),c.send(g),c)}function Reqwest(a,b){this.o=a,this.fn=b,init.apply(this,arguments)}function setType(a){var b=a.match(/\.(json|jsonp|html|xml)(\?|$)/);return b?b[1]:"js"}function init(o,fn){function complete(a){for(o.timeout&&clearTimeout(self.timeout),self.timeout=null;self._completeHandlers.length>0;)self._completeHandlers.shift()(a)}function success(resp){var r=resp.responseText;if(r)switch(type){case"json":try{resp=win.JSON?win.JSON.parse(r):eval("("+r+")")}catch(err){return error(resp,"Could not parse JSON in response",err)}break;case"js":resp=eval(r);break;case"html":resp=r;break;case"xml":resp=resp.responseXML&&resp.responseXML.parseError&&resp.responseXML.parseError.errorCode&&resp.responseXML.parseError.reason?null:resp.responseXML}for(self._responseArgs.resp=resp,self._fulfilled=!0,fn(resp);self._fulfillmentHandlers.length>0;)self._fulfillmentHandlers.shift()(resp);complete(resp)}function error(a,b,c){for(self._responseArgs.resp=a,self._responseArgs.msg=b,self._responseArgs.t=c,self._erred=!0;self._errorHandlers.length>0;)self._errorHandlers.shift()(a,b,c);complete(a)}this.url="string"==typeof o?o:o.url,this.timeout=null,this._fulfilled=!1,this._fulfillmentHandlers=[],this._errorHandlers=[],this._completeHandlers=[],this._erred=!1,this._responseArgs={};var self=this,type=o.type||setType(this.url);fn=fn||function(){},o.timeout&&(this.timeout=setTimeout(function(){self.abort()},o.timeout)),o.success&&this._fulfillmentHandlers.push(function(){o.success.apply(o,arguments)}),o.error&&this._errorHandlers.push(function(){o.error.apply(o,arguments)}),o.complete&&this._completeHandlers.push(function(){o.complete.apply(o,arguments)}),this.request=getRequest.call(this,success,error)}function reqwest(a,b){return new Reqwest(a,b)}function normalize(a){return a?a.replace(/\r?\n/g,"\r\n"):""}function serial(a,b){var c,d,e,f,g=a.name,h=a.tagName.toLowerCase(),i=function(a){a&&!a.disabled&&b(g,normalize(a.attributes.value&&a.attributes.value.specified?a.value:a.text))};if(!a.disabled&&g)switch(h){case"input":/reset|button|image|file/i.test(a.type)||(c=/checkbox/i.test(a.type),d=/radio/i.test(a.type),e=a.value,(!(c||d)||a.checked)&&b(g,normalize(c&&""===e?"on":e)));break;case"textarea":b(g,normalize(a.value));break;case"select":if("select-one"===a.type.toLowerCase())i(a.selectedIndex>=0?a.options[a.selectedIndex]:null);else for(f=0;a.length&&f=93&&a--,a>=35&&a--,a-=32}b=b||{};var d={},e=b.resolution||4,f=b.tileSize||256;return d.grid_tile=function(){return a},d.getKey=function(b,d){return a&&a.grid&&!(0>d||0>b||Math.floor(d)>=f||Math.floor(b)>=f)?c(a.grid[Math.floor(d/e)].charCodeAt(Math.floor(b/e))):void 0},d.gridFeature=function(b,c){var d=this.getKey(b,c),e=a.keys;return e&&e[d]&&a.data[e[d]]?a.data[e[d]]:void 0},d.tileFeature=function(b,c,d){if(a){var e=wax.u.offset(d);return feature=this.gridFeature(b-e.left,c-e.top),feature}},d},wax.gm=function(){function a(a){return"string"==typeof a&&(a=[a]),function(b){if(b){var c=new RegExp(e.tileRegexp()),d=c.exec(b);if(d)return a[parseInt(d[2],10)%a.length].replace(/\{z\}/g,d[1]).replace(/\{x\}/g,d[2]).replace(/\{y\}/g,d[3])}}}var b,c,d=4,e={},f=function(a){return a?a.replace(/(\.png|\.jpg|\.jpeg)(\d*)/,".grid.json"):void 0};return e.tileRegexp=function(){var a=b.tiles[0],c=a.indexOf("?");-1!==c&&(a=a.substr(0,c)),a=a.replace(/[\(\)\?\$\*\+\^]/g,"."),0===a.indexOf("https")?a=a.replace(":443","[:0-9]*"):0===a.indexOf("http")&&(a=a.replace(":80","[:0-9]*"));var d="";if(b.tiles.length>1)for(var e=b.tiles[0],f=b.tiles[1],g=0;ga.y&&b[d][1]<=a.x&&b[d][1]+256>a.x;if(e&&c.exec(b[d][2].src))return b[d][2]}return!1}function b(){return q?(window.clearTimeout(q),q=null,!0):!1}function c(a){if(!p){var b="MSPointerMove"!==a.type&&"pointermove"!==a.type?a:a.originalEvent,c=wax.u.eventoffset(b);o.screen_feature(c,function(b){b?bean.fire(o,"on",{parent:l(),data:b,formatter:n.formatter().format,e:a}):bean.fire(o,"off")})}}function d(a){p=!0;var b="MSPointerDown"!==a.type&&"pointerdown"!==a.type?a:a.originalEvent;h=wax.u.eventoffset(b),"mousedown"===a.type?(bean.add(document.body,"click",g),bean.add(document.body,"mouseup",e)):"touchstart"===a.type&&1===a.touches.length?(bean.remove(document.body,"click",g),bean.add(document.body,"click",g),bean.add(document.body,"touchEnd",e)):"MSPointerDown"===a.originalEvent.type&&a.originalEvent.touches&&1===a.originalEvent.touches.length?(bean.fire(o,"off"),bean.add(l(),v)):"pointerdown"===a.type&&a.originalEvent.touches&&1===a.originalEvent.touches.length?(bean.fire(o,"off"),bean.add(l(),w)):p=!1}function e(){p=!1}function f(){bean.remove(l(),u),bean.remove(l(),v),bean.remove(l(),w),p=!1}function g(a){var c={},d="MSPointerMove"!==a.type&&"MSPointerUp"!==a.type&&"pointerup"!==a.type&&"pointermove"!==a.type?a:a.originalEvent,e=wax.u.eventoffset(d);p=!1;for(var f in d)c[f]=d[f];if(bean.remove(document.body,"mouseup",g), +bean.remove(l(),u),bean.remove(l(),v),bean.remove(l(),w),"touchend"===a.type)o.click(a,h);else if(e&&h)if("MSPointerMove"===c.type||"MSPointerUp"===c.type)c.changedTouches=[],o.click(c,e);else if("pointermove"===c.type||"pointerup"===c.type)o.click(c,e);else if(Math.round(e.y/r)===Math.round(h.y/r)&&Math.round(e.x/r)===Math.round(h.x/r)){if(s&&"touchmove"===c.type)return g;q?b():q=window.setTimeout(function(){q=null,o.click(c,e)},150)}return g}var h,i,j,k,l,m,n=wax.gm(),o={},p=!1,q=null,r=4,s=!1,t={mousemove:c,touchstart:d,mousedown:d},u={touchend:g,touchmove:g,touchcancel:f},v={MSPointerUp:g,MSPointerMove:g,MSPointerCancel:f},w={pointerup:g,pointermove:g,pointercancel:f};return o.discardTouchMove=function(a){return arguments.length?(s=a,o):s},o.click=function(a,b){o.screen_feature(b,function(b){b&&bean.fire(o,"on",{parent:l(),data:b,formatter:n.formatter().format,e:a})})},o.screen_feature=function(b,c){var d=a(b);d||c(null),n.getGrid(d.src,function(a,e){if(a||!e)return c(null);var f=e.tileFeature(b.x,b.y,d);c(f)})},o.attach=function(a){return arguments.length?(j=a,o):j},o.detach=function(a){return arguments.length?(k=a,o):k},o.map=function(a){return arguments.length?(m=a,j&&j(m),bean.add(l(),t),bean.add(l(),"touchstart",d),bean.add(l(),"MSPointerDown",d),bean.add(l(),"pointerdown",d),o):m},o.grid=function(a){return arguments.length?(i=a,o):i},o.remove=function(a){return k&&k(m),bean.remove(l(),t),bean.fire(o,"remove"),o},o.tilejson=function(a){return arguments.length?(n.tilejson(a),o):n.tilejson()},o.formatter=function(){return n.formatter()},o.on=function(a,b){return bean.add(o,a,b),o},o.off=function(a,b){return bean.remove(o,a,b),o},o.gridmanager=function(a){return arguments.length?(n=a,o):n},o.parent=function(a){return l=a,o},o};var wax=wax||{};wax.location=function(){function a(a){if("mousemove"!==a.e.type&&a.e.type){var b=a.formatter({format:"location"},a.data);b&&(window.location.href=b)}}var b={};return b.events=function(){return{on:a}},b};var wax=wax||{};if(wax.request={cache:{},locks:{},promises:{},get:function(a,b){if(this.cache[a])return b(this.cache[a][0],this.cache[a][1]);if(this.promises[a]=this.promises[a]||[],this.promises[a].push(b),!this.locks[a]){var c=this;this.locks[a]=!0,reqwest({url:a+(~a.indexOf("?")?"&":"?")+"callback=grid",type:"jsonp",jsonpCallback:"callback",success:function(b){c.locks[a]=!1,c.cache[a]=[null,b];for(var d=0;d0||!h))return e;e=[];var a=f.getZoom(),b=(wax.u.offset(f.getDiv()),function(b){if(b&&b.interactive){h=!0;for(var c in b.cache)if(c.split("/")[0]==a){var d=wax.u.offset(b.cache[c]);e.push([d.top,d.left,b.cache[c]])}}});for(var c in f.mapTypes)b(f.mapTypes[c]);return f.overlayMapTypes.forEach(b),e}function c(b){return arguments.length?(f=b,i=google.maps.event.addListener(f,"tileloaded",a),void(j=google.maps.event.addListener(f,"idle",a))):f}function d(a){i&&google.maps.event.removeListener(i),j&&google.maps.event.removeListener(j)}var e,f,g=!1,h=!1,i=null,j=null;return wax.interaction().attach(c).detach(d).discardTouchMove(!0).parent(function(){return f.getDiv()}).grid(b)};var wax=wax||{};wax.g=wax.g||{},wax.g.connector=function(a){a=a||{},this.options={tiles:a.tiles,scheme:a.scheme||"xyz",blankImage:a.blankImage||"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="},this.opacity=a.opacity||0,this.minZoom=a.minzoom||0,this.maxZoom=a.maxzoom||22,this.name=a.name||"",this.description=a.description||"",this.interactive=!0,this.tileSize=new google.maps.Size(256,256),this.cache={}},wax.g.connector.prototype.getTile=function(a,b,c){var d=b+"/"+a.x+"/"+a.y;if(!this.cache[d]){var e=this.cache[d]=new Image(256,256);this.cache[d].src=this.getTileUrl(a,b),this.cache[d].setAttribute("gTileKey",d),this.cache[d].setAttribute("style","opacity: "+this.opacity+"; filter: alpha(opacity="+100*this.opacity+");"),this.cache[d].onerror=function(){e.style.display="none"}}return this.cache[d]},wax.g.connector.prototype.releaseTile=function(a){},wax.g.connector.prototype.getTileUrl=function(a,b){var c=Math.pow(2,b),d="tms"===this.options.scheme?c-1-a.y:a.y,e=a.x%c;return e=0>e?a.x%c+c:e,0>d?this.options.blankImage:this.options.tiles[parseInt(e+d,10)%this.options.tiles.length].replace(/\{z\}/g,b).replace(/\{x\}/g,e).replace(/\{y\}/g,d)};var GeoJSON=function(a,b){var c,d=function(a,b,c){var g;switch(a.type){case"Point":b.position=new google.maps.LatLng(a.coordinates[1],a.coordinates[0]),g=new google.maps.Marker(b),c&&g.set("geojsonProperties",c);break;case"MultiPoint":g=[];for(var h=0;h0?!0:!1},g=b||{};switch(a.type){case"FeatureCollection":if(a.features){c=[];for(var h=0;h').css("padding",sa).append(d.children()),T=a('
                ').css({width:R+"px",height:S+"px"}).append(Q).appendTo(d);else{if(d.css("width",""),q=P.stickToBottom&&C(),r=P.stickToRight&&D(),l=d.innerWidth()+ta!=R||d.outerHeight()!=S,l&&(R=d.innerWidth()+ta,S=d.innerHeight(),T.css({width:R+"px",height:S+"px"})),!l&&ua==U&&Q.outerHeight()==V)return void d.width(R);ua=U,Q.css("width",""),d.width(R),T.find(">.jspVerticalBar,>.jspHorizontalBar").remove().end()}Q.css("overflow","auto"),U=b.contentWidth?b.contentWidth:Q[0].scrollWidth,V=Q[0].scrollHeight,Q.css("overflow",""),W=U/R,X=V/S,Y=X>1,Z=W>1,Z||Y?(d.addClass("jspScrollable"),e=P.maintainPosition&&(aa||da),e&&(h=A(),j=B()),g(),i(),k(),e&&(y(r?U-R:h,!1),x(q?V-S:j,!1)),H(),E(),N(),P.enableKeyboardNavigation&&J(),P.clickOnTrack&&o(),L(),P.hijackInternalLinks&&M()):(d.removeClass("jspScrollable"),Q.css({top:0,width:T.width()-ta}),F(),I(),K(),p()),P.autoReinitialise&&!ra?ra=setInterval(function(){f(P)},P.autoReinitialiseDelay):!P.autoReinitialise&&ra&&clearInterval(ra),m&&d.scrollTop(0)&&x(m,!1),n&&d.scrollLeft(0)&&y(n,!1),d.trigger("jsp-initialised",[Z||Y])}function g(){Y&&(T.append(a('
                ').append(a('
                '),a('
                ').append(a('
                ').append(a('
                '),a('
                '))),a('
                '))),ea=T.find(">.jspVerticalBar"),fa=ea.find(">.jspTrack"),$=fa.find(">.jspDrag"),P.showArrows&&(ja=a('').bind("mousedown.jsp",m(0,-1)).bind("click.jsp",G),ka=a('').bind("mousedown.jsp",m(0,1)).bind("click.jsp",G),P.arrowScrollOnHover&&(ja.bind("mouseover.jsp",m(0,-1,ja)),ka.bind("mouseover.jsp",m(0,1,ka))),l(fa,P.verticalArrowPositions,ja,ka)),ha=S,T.find(">.jspVerticalBar>.jspCap:visible,>.jspVerticalBar>.jspArrow").each(function(){ha-=a(this).outerHeight()}),$.hover(function(){$.addClass("jspHover")},function(){$.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",G),$.addClass("jspActive");var c=b.pageY-$.position().top;return a("html").bind("mousemove.jsp",function(a){r(a.pageY-c,!1)}).bind("mouseup.jsp mouseleave.jsp",q),!1}),h())}function h(){fa.height(ha+"px"),aa=0,ga=P.verticalGutter+fa.outerWidth(),Q.width(R-ga-ta);try{0===ea.position().left&&Q.css("margin-left",ga+"px")}catch(a){}}function i(){Z&&(T.append(a('
                ').append(a('
                '),a('
                ').append(a('
                ').append(a('
                '),a('
                '))),a('
                '))),la=T.find(">.jspHorizontalBar"),ma=la.find(">.jspTrack"),ba=ma.find(">.jspDrag"),P.showArrows&&(pa=a('').bind("mousedown.jsp",m(-1,0)).bind("click.jsp",G),qa=a('').bind("mousedown.jsp",m(1,0)).bind("click.jsp",G),P.arrowScrollOnHover&&(pa.bind("mouseover.jsp",m(-1,0,pa)),qa.bind("mouseover.jsp",m(1,0,qa))),l(ma,P.horizontalArrowPositions,pa,qa)),ba.hover(function(){ba.addClass("jspHover")},function(){ba.removeClass("jspHover")}).bind("mousedown.jsp",function(b){a("html").bind("dragstart.jsp selectstart.jsp",G),ba.addClass("jspActive");var c=b.pageX-ba.position().left;return a("html").bind("mousemove.jsp",function(a){t(a.pageX-c,!1)}).bind("mouseup.jsp mouseleave.jsp",q),!1}),na=T.innerWidth(),j())}function j(){T.find(">.jspHorizontalBar>.jspCap:visible,>.jspHorizontalBar>.jspArrow").each(function(){na-=a(this).outerWidth()}),ma.width(na+"px"),da=0}function k(){if(Z&&Y){var b=ma.outerHeight(),c=fa.outerWidth();ha-=b,a(la).find(">.jspCap:visible,>.jspArrow").each(function(){na+=a(this).outerWidth()}),na-=c,S-=c,R-=b,ma.parent().append(a('
                ').css("width",b+"px")),h(),j()}Z&&Q.width(T.outerWidth()-ta+"px"),V=Q.outerHeight(),X=V/S,Z&&(oa=Math.ceil(1/W*na),oa>P.horizontalDragMaxWidth?oa=P.horizontalDragMaxWidth:oaP.verticalDragMaxHeight?ia=P.verticalDragMaxHeight:iag)aa-k>c?va.scrollByY(-f):r(c);else{if(!(g>0))return void j();c>aa+k?va.scrollByY(f):r(c)}d=setTimeout(i,h?P.initialDelay:P.trackClickRepeatFreq),h=!1},j=function(){d&&clearTimeout(d),d=null,a(document).unbind("mouseup.jsp",j)};return i(),a(document).bind("mouseup.jsp",j),!1}}),Z&&ma.bind("mousedown.jsp",function(b){if(b.originalTarget===c||b.originalTarget==b.currentTarget){var d,e=a(this),f=e.offset(),g=b.pageX-f.left-da,h=!0,i=function(){var a=e.offset(),c=b.pageX-a.left-oa/2,f=R*P.scrollPagePercent,k=ca*f/(U-R);if(0>g)da-k>c?va.scrollByX(-f):t(c);else{if(!(g>0))return void j();c>da+k?va.scrollByX(f):t(c)}d=setTimeout(i,h?P.initialDelay:P.trackClickRepeatFreq),h=!1},j=function(){d&&clearTimeout(d),d=null,a(document).unbind("mouseup.jsp",j)};return i(),a(document).bind("mouseup.jsp",j),!1}})}function p(){ma&&ma.unbind("mousedown.jsp"),fa&&fa.unbind("mousedown.jsp")}function q(){a("html").unbind("dragstart.jsp selectstart.jsp mousemove.jsp mouseup.jsp mouseleave.jsp"),$&&$.removeClass("jspActive"),ba&&ba.removeClass("jspActive")}function r(a,b){Y&&(0>a?a=0:a>_&&(a=_),b===c&&(b=P.animateScroll),b?va.animate($,"top",a,s):($.css("top",a),s(a)))}function s(a){a===c&&(a=$.position().top),T.scrollTop(0),aa=a;var b=0===aa,e=aa==_,f=a/_,g=-f*(V-S);(wa!=b||ya!=e)&&(wa=b,ya=e,d.trigger("jsp-arrow-change",[wa,ya,xa,za])),v(b,e),Q.css("top",g),d.trigger("jsp-scroll-y",[-g,b,e]).trigger("scroll")}function t(a,b){Z&&(0>a?a=0:a>ca&&(a=ca),b===c&&(b=P.animateScroll),b?va.animate(ba,"left",a,u):(ba.css("left",a),u(a)))}function u(a){a===c&&(a=ba.position().left),T.scrollTop(0),da=a;var b=0===da,e=da==ca,f=a/ca,g=-f*(U-R);(xa!=b||za!=e)&&(xa=b,za=e,d.trigger("jsp-arrow-change",[wa,ya,xa,za])),w(b,e),Q.css("left",g),d.trigger("jsp-scroll-x",[-g,b,e]).trigger("scroll")}function v(a,b){P.showArrows&&(ja[a?"addClass":"removeClass"]("jspDisabled"),ka[b?"addClass":"removeClass"]("jspDisabled"))}function w(a,b){P.showArrows&&(pa[a?"addClass":"removeClass"]("jspDisabled"),qa[b?"addClass":"removeClass"]("jspDisabled"))}function x(a,b){var c=a/(V-S);r(c*_,b)}function y(a,b){var c=a/(U-R);t(c*ca,b)}function z(b,c,d){var e,f,g,h,i,j,k,l,m,n=0,o=0;try{e=a(b)}catch(p){return}for(f=e.outerHeight(),g=e.outerWidth(),T.scrollTop(0),T.scrollLeft(0);!e.is(".jspPane");)if(n+=e.position().top,o+=e.position().left,e=e.offsetParent(),/^body|html$/i.test(e[0].nodeName))return;h=B(),j=h+S,h>n||c?l=n-P.verticalGutter:n+f>j&&(l=n-S+f+P.verticalGutter),l&&x(l,d),i=A(),k=i+R,i>o||c?m=o-P.horizontalGutter:o+g>k&&(m=o-R+g+P.horizontalGutter),m&&y(m,d)}function A(){return-Q.position().left}function B(){return-Q.position().top}function C(){var a=V-S;return a>20&&a-B()<10}function D(){var a=U-R;return a>20&&a-A()<10}function E(){T.unbind(Ba).bind(Ba,function(a,b,c,d){var e=da,f=aa;return va.scrollBy(c*P.mouseWheelSpeed,-d*P.mouseWheelSpeed,!1),e==da&&f==aa})}function F(){T.unbind(Ba)}function G(){return!1}function H(){Q.find(":input,a").unbind("focus.jsp").bind("focus.jsp",function(a){z(a.target,!1)})}function I(){Q.find(":input,a").unbind("focus.jsp")}function J(){function b(){var a=da,b=aa;switch(c){case 40:va.scrollByY(P.keyboardSpeed,!1);break;case 38:va.scrollByY(-P.keyboardSpeed,!1);break;case 34:case 32:va.scrollByY(S*P.scrollPagePercent,!1);break;case 33:va.scrollByY(-S*P.scrollPagePercent,!1);break;case 39:va.scrollByX(P.keyboardSpeed,!1);break;case 37:va.scrollByX(-P.keyboardSpeed,!1)}return e=a!=da||b!=aa}var c,e,f=[];Z&&f.push(la[0]),Y&&f.push(ea[0]),Q.focus(function(){d.focus()}),d.attr("tabindex",0).unbind("keydown.jsp keypress.jsp").bind("keydown.jsp",function(d){if(d.target===this||f.length&&a(d.target).closest(f).length){var g=da,h=aa;switch(d.keyCode){case 40:case 38:case 34:case 32:case 33:case 39:case 37:c=d.keyCode,b();break;case 35:x(V-S),c=null;break;case 36:x(0),c=null}return e=d.keyCode==c&&g!=da||h!=aa,!e}}).bind("keypress.jsp",function(a){return a.keyCode==c&&b(),!e}),P.hideFocus?(d.css("outline","none"),"hideFocus"in T[0]&&d.attr("hideFocus",!0)):(d.css("outline",""),"hideFocus"in T[0]&&d.attr("hideFocus",!1))}function K(){d.attr("tabindex","-1").removeAttr("tabindex").unbind("keydown.jsp keypress.jsp")}function L(){if(location.hash&&location.hash.length>1){var b,c,d=escape(location.hash.substr(1));try{b=a("#"+d+', a[name="'+d+'"]')}catch(e){return}b.length&&Q.find(d)&&(0===T.scrollTop()?c=setInterval(function(){T.scrollTop()>0&&(z(b,!0),a(document).scrollTop(T.position().top),clearInterval(c))},50):(z(b,!0),a(document).scrollTop(T.position().top)))}}function M(){a(document.body).data("jspHijack")||(a(document.body).data("jspHijack",!0),a(document.body).delegate("a[href*=#]","click",function(c){var d,e,f,g,h,i,j=this.href.substr(0,this.href.indexOf("#")),k=location.href;if(-1!==location.href.indexOf("#")&&(k=location.href.substr(0,location.href.indexOf("#"))),j===k){d=escape(this.href.substr(this.href.indexOf("#")+1));try{e=a("#"+d+', a[name="'+d+'"]')}catch(l){return}e.length&&(f=e.closest(".jspScrollable"),g=f.data("jsp"),g.scrollToElement(e,!0),f[0].scrollIntoView&&(h=a(b).scrollTop(),i=e.offset().top,(h>i||i>h+a(b).height())&&f[0].scrollIntoView()),c.preventDefault())}}))}function N(){var a,b,c,d,e,f=!1;T.unbind("touchstart.jsp touchmove.jsp touchend.jsp click.jsp-touchclick").bind("touchstart.jsp",function(g){var h=g.originalEvent.touches[0];a=A(),b=B(),c=h.pageX,d=h.pageY,e=!1,f=!0}).bind("touchmove.jsp",function(g){if(f){var h=g.originalEvent.touches[0],i=da,j=aa;return va.scrollTo(a+c-h.pageX,b+d-h.pageY),e=e||Math.abs(c-h.pageX)>5||Math.abs(d-h.pageY)>5,i==da&&j==aa}}).bind("touchend.jsp",function(a){f=!1}).bind("click.jsp-touchclick",function(a){return e?(e=!1,!1):void 0})}function O(){var a=B(),b=A();d.removeClass("jspScrollable").unbind(".jsp"),d.replaceWith(Aa.append(Q.children())),Aa.scrollTop(a),Aa.scrollLeft(b),ra&&clearInterval(ra)}var P,Q,R,S,T,U,V,W,X,Y,Z,$,_,aa,ba,ca,da,ea,fa,ga,ha,ia,ja,ka,la,ma,na,oa,pa,qa,ra,sa,ta,ua,va=this,wa=!0,xa=!0,ya=!1,za=!1,Aa=d.clone(!1,!1).empty(),Ba=a.fn.mwheelIntent?"mwheelIntent.jsp":"mousewheel.jsp";sa=d.css("paddingTop")+" "+d.css("paddingRight")+" "+d.css("paddingBottom")+" "+d.css("paddingLeft"),ta=(parseInt(d.css("paddingLeft"),10)||0)+(parseInt(d.css("paddingRight"),10)||0),a.extend(va,{reinitialise:function(b){b=a.extend({},P,b),f(b)},scrollToElement:function(a,b,c){z(a,b,c)},scrollTo:function(a,b,c){y(a,c),x(b,c)},scrollToX:function(a,b){y(a,b)},scrollToY:function(a,b){x(a,b)},scrollToPercentX:function(a,b){y(a*(U-R),b)},scrollToPercentY:function(a,b){x(a*(V-S),b)},scrollBy:function(a,b,c){va.scrollByX(a,c),va.scrollByY(b,c)},scrollByX:function(a,b){var c=A()+Math[0>a?"floor":"ceil"](a),d=c/(U-R);t(d*ca,b)},scrollByY:function(a,b){var c=B()+Math[0>a?"floor":"ceil"](a),d=c/(V-S);r(d*_,b)},positionDragX:function(a,b){t(a,b)},positionDragY:function(a,b){r(a,b)},animate:function(a,b,c,d){var e={};e[b]=c,a.animate(e,{duration:P.animateDuration,easing:P.animateEase,queue:!1,step:d})},getContentPositionX:function(){return A()},getContentPositionY:function(){return B()},getContentWidth:function(){return U},getContentHeight:function(){return V},getPercentScrolledX:function(){return A()/(U-R)},getPercentScrolledY:function(){return B()/(V-S)},getIsScrollableH:function(){return Z},getIsScrollableV:function(){return Y},getContentPane:function(){return Q},scrollToBottom:function(a){r(_,a)},hijackInternalLinks:a.noop,destroy:function(){O()}}),f(e)}return d=a.extend({},a.fn.jScrollPane.defaults,d),a.each(["mouseWheelSpeed","arrowButtonSpeed","trackClickSpeed","keyboardSpeed"],function(){d[this]=d[this]||d.speed}),this.each(function(){var b=a(this),c=b.data("jsp");c?c.reinitialise(d):(a("script",b).filter('[type="text/javascript"],:not([type])').remove(),c=new e(b,d),b.data("jsp",c))})},a.fn.jScrollPane.defaults={showArrows:!1,maintainPosition:!0,stickToBottom:!1,stickToRight:!1,clickOnTrack:!0,autoReinitialise:!1,autoReinitialiseDelay:500,verticalDragMinHeight:0,verticalDragMaxHeight:99999,horizontalDragMinWidth:0,horizontalDragMaxWidth:99999,contentWidth:c,animateScroll:!1,animateDuration:300,animateEase:"linear",hijackInternalLinks:!1,verticalGutter:4,horizontalGutter:4,mouseWheelSpeed:0,arrowButtonSpeed:0,arrowRepeatFreq:50,arrowScrollOnHover:!1,trackClickSpeed:0,trackClickRepeatFreq:70,verticalArrowPositions:"split",horizontalArrowPositions:"split",enableKeyboardNavigation:!0,hideFocus:!1,keyboardSpeed:0,initialDelay:300,speed:30,scrollPagePercent:.8}}(jQuery,this),function(a){function b(b){var c=b||window.event,d=[].slice.call(arguments,1),e=0,f=0,g=0;return b=a.event.fix(c),b.type="mousewheel",c.wheelDelta&&(e=c.wheelDelta/120),c.detail&&(e=-c.detail/3),g=e,void 0!==c.axis&&c.axis===c.HORIZONTAL_AXIS&&(g=0,f=-1*e),void 0!==c.wheelDeltaY&&(g=c.wheelDeltaY/120),void 0!==c.wheelDeltaX&&(f=-1*c.wheelDeltaX/120),d.unshift(b,e,f,g),(a.event.dispatch||a.event.handle).apply(this,d)}var c=["DOMMouseScroll","mousewheel"];if(a.event.fixHooks)for(var d=c.length;d;)a.event.fixHooks[c[--d]]=a.event.mouseHooks;a.event.special.mousewheel={setup:function(){if(this.addEventListener)for(var a=c.length;a;)this.addEventListener(c[--a],b,!1);else this.onmousewheel=b},teardown:function(){if(this.removeEventListener)for(var a=c.length;a;)this.removeEventListener(c[--a],b,!1);else this.onmousewheel=null}},a.fn.extend({mousewheel:function(a){return a?this.bind("mousewheel",a):this.trigger("mousewheel")},unmousewheel:function(a){return this.unbind("mousewheel",a)}})}(jQuery),function(a){function b(){this===e.elem&&(e.pos=[-260,-260],e.elem=!1,f=3)}var c,d,e={pos:[-260,-260]},f=3,g=document,h=g.documentElement,i=g.body;a.event.special.mwheelIntent={setup:function(){var c=a(this).bind("mousewheel",a.event.special.mwheelIntent.handler);return this!==g&&this!==h&&this!==i&&c.bind("mouseleave",b),c=null,!0},teardown:function(){return a(this).unbind("mousewheel",a.event.special.mwheelIntent.handler).unbind("mouseleave",b),!0},handler:function(b,g){var h=[b.clientX,b.clientY];return this===e.elem||Math.abs(e.pos[0]-h[0])>f||Math.abs(e.pos[1]-h[1])>f?(e.elem=this,e.pos=h,f=250,clearTimeout(d),d=setTimeout(function(){f=10},200),clearTimeout(c),c=setTimeout(function(){f=3},1500),b=a.extend({},b,{type:"mwheelIntent"}),(a.event.dispatch||a.event.handle).apply(this,arguments)):void 0}},a.fn.extend({mwheelIntent:function(a){return a?this.bind("mwheelIntent",a):this.trigger("mwheelIntent")},unmwheelIntent:function(a){return this.unbind("mwheelIntent",a)}}),a(function(){i=g.body,a(g).bind("mwheelIntent.mwheelIntentDefault",a.noop)})}(jQuery),function(a,b,c){function d(a,c){var d,e=b.createElement(a||"div");for(d in c)e[d]=c[d];return e}function e(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function f(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=k.substring(0,k.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(n.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",0),m[e]=1),e}function g(a,b){var d,e,f=a.style;if(f[b]!==c)return b;for(b=b.charAt(0).toUpperCase()+b.slice(1),e=0;e>1):f.left+i)+"px",top:("auto"==f.top?c.y-b.y+(a.offsetHeight>>1):f.top+i)+"px"})),g.setAttribute("aria-role","progressbar"),e.lines(g,e.opts),!k){var l=0,m=f.fps,n=m/f.speed,o=(1-f.opacity)/(n*f.trail/100),p=n/f.lines;!function q(){l++;for(var a=f.lines;a;a--){var b=Math.max(1-(l+a*p)%n*o,f.opacity);e.opacity(g,f.lines-a,b,f)}e.timeout=e.el&&setTimeout(q,~~(1e3/m))}()}return e},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=c),this},lines:function(a,b){function c(a,c){return h(d(),{position:"absolute",width:b.length+b.width+"px",height:b.width+"px",background:a,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/b.lines*i+b.rotate)+"deg) translate("+b.radius+"px,0)",borderRadius:(b.width>>1)+"px"})}for(var g,i=0;i',b); +}var b=h(d("group"),{behavior:"url(#default#VML)"});!g(b,"transform")&&b.adj?(n.addRule(".spin-vml","behavior:url(#default#VML)"),p.prototype.lines=function(b,c){function d(){return h(a("group",{coordsize:j+" "+j,coordorigin:-i+" "+-i}),{width:j,height:j})}function f(b,f,g){e(l,e(h(d(),{rotation:360/c.lines*b+"deg",left:~~f}),e(h(a("roundrect",{arcsize:1}),{width:i,height:c.width,left:c.radius,top:-c.width>>1,filter:g}),a("fill",{color:c.color,opacity:c.opacity}),a("stroke",{opacity:0}))))}var g,i=c.length+c.width,j=2*i,k=2*-(c.width+c.length)+"px",l=h(d(),{position:"absolute",top:k,left:k});if(c.shadow)for(g=1;g<=c.lines;g++)f(g,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(g=1;g<=c.lines;g++)f(g);return e(b,l)},p.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d0)for(var d=[null,0,!1,[0,0]][a],e=0;b>e;++e)c[e]=d;return c}function r(){return this.arrayClass$}function s(a,b,c,d,e){var f;return f=q(e,d),w(),y(f,Je,Ke),f.arrayClass$=a,f.typeId$=b,f.queryId$=c,f}function t(a,b,c,d){return w(),y(d,Je,Ke),d.arrayClass$=a,d.typeId$=b,d.queryId$=c,d}function u(a,b,c){if(null!=c){if(a.queryId$>0&&!A(c.typeId$,a.queryId$))throw new Ba;if(a.queryId$<0&&(c.typeMarker$==se||2==c.typeId$))throw new Ba}return a[b]=c}function v(){}function w(){w=se,Je=[],Ke=[],x(new v,Je,Ke)}function x(a,b,c){var d,e=0;for(var f in a)(d=a[f])&&(b[e]=f,c[e]=d,++e)}function y(a,b,c){w();for(var d=0,e=b.length;e>d;++d)a[b[d]]=c[d]}function z(a,b){return a&&!!Ue[a][b]}function A(a,b){return a&&Ue[a][b]}function B(a,b){if(null!=a&&!A(a.typeId$,b))throw new Ia;return a}function C(a,b){return null!=a&&z(a.typeId$,b)}function D(a){return~~Math.max(Math.min(a,2147483647),-2147483648)}function E(a){return null!=a&&z(a.typeId$,2)?a:k(new m,a)}function F(a,b){var c,d;return c=a[1]+b[1],d=a[0]+b[0],J(d,c)}function G(a,b,c){return 0==b?a:0==c?a:F(a,J(b*c,0))}function H(a,b){return Q(~~Math.max(Math.min(a[1]/4294967296,2147483647),-2147483648)&~~Math.max(Math.min(b[1]/4294967296,2147483647),-2147483648),P(a)&P(b))}function I(a,b){var c,d;return a[0]==b[0]&&a[1]==b[1]?0:(c=a[1]<0,d=b[1]<0,c&&!d?-1:!c&&d?1:Y(a,b)[1]<0?-1:1)}function J(a,b){var c,d;for(b%=0x10000000000000000,a%=0x10000000000000000,c=b%4294967296,d=4294967296*Math.floor(a/4294967296),b=b-c+d,a=a-d+c;0>a;)a+=4294967296,b-=4294967296;for(;a>4294967295;)a-=4294967296,b+=4294967296;for(b%=0x10000000000000000;b>0x7fffffff00000000;)b-=0x10000000000000000;for(;-0x8000000000000000>b;)b+=0x10000000000000000;return[a,b]}function K(a,b){var c,d,e,f,g,h;if(0==b[0]&&0==b[1])throw wa(new ya,"/ by zero");if(0==a[0]&&0==a[1])return ba(),Te;if(L(a,(ba(),Oe)))return L(b,Qe)||L(b,Pe)?Oe:(f=W(a,1),c=V(K(f,b),1),g=Y(a,R(b,c)),F(c,K(g,b)));if(L(b,Oe))return Te;if(a[1]<0)return b[1]<0?K(T(a),T(b)):T(K(T(a),b));if(b[1]<0)return T(K(a,T(b)));for(h=Te,g=a;I(g,b)>=0;)e=M(Math.floor(Z(g)/$(b))),0==e[0]&&0==e[1]&&(e=Qe),d=R(e,b),h=F(h,e),g=Y(g,d);return h}function L(a,b){return a[0]==b[0]&&a[1]==b[1]}function M(a){return isNaN(a)?(ba(),Te):-0x8000000000000000>a?(ba(),Oe):a>=0x8000000000000000?(ba(),Ne):a>0?J(Math.floor(a),0):J(Math.ceil(a),0)}function N(a){var b,c;return a>-129&&128>a?(b=a+128,c=(aa(),Le)[b],null==c&&(c=Le[b]=O(a)),c):O(a)}function O(a){return a>=0?[a,0]:[a+4294967296,-4294967296]}function P(a){return a[0]>=2147483648?~~Math.max(Math.min(a[0]-4294967296,2147483647),-2147483648):~~Math.max(Math.min(a[0],2147483647),-2147483648)}function Q(a,b){var c,d;return c=4294967296*a,d=b,0>b&&(d+=4294967296),[d,c]}function R(a,b){var c,d,e,f,g,h,i,j,k;return 0==a[0]&&0==a[1]?(ba(),Te):0==b[0]&&0==b[1]?(ba(),Te):L(a,(ba(),Oe))?S(b):L(b,Oe)?S(a):a[1]<0?b[1]<0?R(T(a),T(b)):T(R(T(a),b)):b[1]<0?T(R(a,T(b))):I(a,Se)<0&&I(b,Se)<0?J((a[1]+a[0])*(b[1]+b[0]),0):(e=a[1]%281474976710656,f=a[1]-e,c=a[0]%65536,d=a[0]-c,i=b[1]%281474976710656,j=b[1]-i,g=b[0]%65536,h=b[0]-g,k=Te,k=G(k,f,g),k=G(k,e,h),k=G(k,e,g),k=G(k,d,i),k=G(k,d,h),k=G(k,d,g),k=G(k,c,j),k=G(k,c,i),k=G(k,c,h),k=G(k,c,g))}function S(a){return 1==(1&P(a))?(ba(),Oe):(ba(),Te)}function T(a){var b,c;return L(a,(ba(),Oe))?Oe:(b=-a[1],c=-a[0],c>4294967295&&(c-=4294967296,b+=4294967296),0>c&&(c+=4294967296,b-=4294967296),[c,b])}function U(a){return 30>=a?1<=0x8000000000000000&&(d-=0x10000000000000000),[e,d])}function W(a,b){var c,d,e;return b&=63,e=U(b),c=a[1]/e,d=Math.floor(a[0]/e),J(d,c)}function X(a,b){var c;return b&=63,c=W(a,b),a[1]<0&&(c=F(c,V((ba(),Re),63-b))),c}function Y(a,b){var c,d;return c=a[1]-b[1],d=a[0]-b[0],J(d,c)}function Z(a){var b,c,d;return c=D(Math.log(a[1])/(ba(),Me)),48>=c?a[1]+a[0]:(b=c-48,d=(1<=c?a[1]+a[0]:(b=c-48,d=(1<0;--g)b="0"+b;e=b+e}return e}function aa(){aa=se,Le=s(cf,0,9,256,0)}function ba(){ba=se,Me=Math.log(2),Ne=Ie,Oe=ye,Pe=N(-1),Qe=N(1),Re=N(2),Se=Fe,Te=N(0)}function ca(){return df}function da(){}function ea(a,b){return fa(a,b,0,b.length),a}function fa(a,b,c,d){return a.buf=b,a.pos=c,a.count=c+d,a.count>b.length&&(a.count=b.length),a}function ga(a){return a.pos>=a.count?-1:255&a.buf[a.pos++]}function ha(a,b,c,d){return a.pos>=a.count?-1:(d=Ta(d,a.count-a.pos),ab(a.buf,a.pos,b,c,d),a.pos+=d,d)}function ia(){return ef}function ja(){}function ka(){return gf}function la(){}function ma(a){return a.buf=s(ff,0,-1,32,1),a}function na(a,b){var c;b<=a.buf.length||(b=Sa(b,2*a.buf.length),c=s(ff,0,-1,b,1),ab(a.buf,0,c,0,a.buf.length),a.buf=c)}function oa(a){var b;return b=s(ff,0,-1,a.count,1),ab(a.buf,0,b,0,a.count),b}function pa(a,b){na(a,a.count+1),a.buf[a.count++]=b<<24>>24}function qa(a,b,c,d){na(a,a.count+d),ab(b,c,a.buf,a.count,d),a.count+=d}function ra(){return hf}function sa(){}function ta(a,b){return a.detailMessage=b,a}function ua(){return jf}function va(){}function wa(a,b){return a.detailMessage=b,a}function xa(){return lf}function ya(){}function za(a,b){return a.detailMessage=b,a}function Aa(){return mf}function Ba(){}function Ca(a,b){var c;return c=new Ga,c.typeName=a+b,c}function Da(a,b){var c;return c=new Ga,c.typeName=a+b,c}function Ea(a,b){var c;return c=new Ga,c.typeName=a+b,c}function Fa(){return of}function Ga(){}function Ha(){return pf}function Ia(){}function Ja(){return kf}function Ka(){}function La(a,b){return a.detailMessage=b,a}function Ma(){return qf}function Na(){}function Oa(){return rf}function Pa(){}function Qa(){return sf}function Ra(){}function Sa(a,b){return a>b?a:b}function Ta(a,b){return b>a?a:b}function Ua(){return uf}function Va(){}function Wa(a,b){return null==b?!1:String(a)==b}function Xa(a,b,c,d,e){var f;for(f=b;c>f;++f)d[e++]=a.charCodeAt(f)}function Ya(){return vf}function Za(a){var b;return a.data=(b=[],b.explicitLength=0,b),a}function $a(){return wf}function _a(){}function ab(a,b,c,d,e){var f,g,h,i,j,k,l,m;if(null==a||null==c)throw new Va;if(l=(a.typeMarker$==se||2==a.typeId$?a.getClass$():bf).typeName,h=(c.typeMarker$==se||2==c.typeId$?c.getClass$():bf).typeName,91!=l.charCodeAt(0)||91!=h.charCodeAt(0))throw za(new Ba,"Must be array types");if(l.charCodeAt(1)!=h.charCodeAt(1))throw za(new Ba,"Array types must match");if(m=a.length,i=c.length,0>b||0>d||0>e||b+e>m||d+e>i)throw new Ra;if(76!=l.charCodeAt(1)&&91!=l.charCodeAt(1)||Wa(l,h))for(j=0;e>j;++j)c[d+j]=a[b+j];else if(k=B(a,3),f=B(c,3),(null==a?null:a)===(null==c?null:c)&&d>b)for(b+=e,g=d+e;g-->d;)u(f,g,k[--b]);else for(g=d+e;g>d;)u(f,d++,k[b++])}function bb(a,b){if(!Vc(b,1<g;g+=8)pa(c,255&P(W(d,g)));a.chunker=(f._needReleaseMFStream=!1,f._inStream=b,f._finished=!1,Hc(f),f._rangeEncoder.Stream=c,Qc(f),Kc(f),Jc(f),f._lenEncoder._tableSize=f._numFastBytes+1-2,md(f._lenEncoder,1<>24}if(d=gc(new mc),!ic(d,f))throw ta(new va,"corrupted input");for(e=0;64>e;e+=8){if(g=ga(b),-1==g)throw ta(new va,"truncated input");g=g.toString(16),1==g.length&&(g="0"+g),i=g+""+i}"ffffffffffffffffff"==i.toLowerCase()||0==i?a.length_0=ze:(h=parseInt(i,16),h>4294967295?a.length_0=ze:a.length_0=M(h)),a.chunker=ec(d,b,c,a.length_0)}function nb(){return $f}function ob(){}function pb(a,b){return a.output=ma(new sa),mb(a,ea(new ja,b),a.output),a}function qb(){return _f}function rb(){}function sb(a,b,c,d){var e;a._keepSizeBefore=b,a._keepSizeAfter=c,e=b+c+d,(null==a._bufferBase||a._blockSize!=e)&&(a._bufferBase=null,a._blockSize=e,a._bufferBase=s(ff,0,-1,a._blockSize,1)),a._pointerToLastSafePosition=a._blockSize-c}function tb(a,b){return a._bufferBase[a._bufferOffset+a._pos+b]}function ub(a,b,c,d){var e,f;for(a._streamEndWasReached&&a._pos+b+d>a._streamPos&&(d=a._streamPos-(a._pos+b)),++c,f=a._bufferOffset+a._pos+b,e=0;d>e&&a._bufferBase[f+e]==a._bufferBase[f+e-c];++e);return e}function vb(a){return a._streamPos-a._pos}function wb(a){var b,c,d;for(d=a._bufferOffset+a._pos-a._keepSizeBefore,d>0&&--d,c=a._bufferOffset+a._streamPos-d,b=0;c>b;++b)a._bufferBase[b]=a._bufferBase[d+b];a._bufferOffset-=d}function xb(a){var b;++a._pos,a._pos>a._posLimit&&(b=a._bufferOffset+a._pos,b>a._pointerToLastSafePosition&&wb(a),yb(a))}function yb(a){var b,c,d;if(!a._streamEndWasReached)for(;;){if(d=-a._bufferOffset+a._blockSize-a._streamPos,0==d)return;if(b=ha(a._stream,a._bufferBase,a._bufferOffset+a._streamPos,d),-1==b)return a._posLimit=a._streamPos,c=a._bufferOffset+a._posLimit,c>a._pointerToLastSafePosition&&(a._posLimit=a._pointerToLastSafePosition-a._bufferOffset),void(a._streamEndWasReached=!0);a._streamPos+=b,a._streamPos>=a._pos+a._keepSizeAfter&&(a._posLimit=a._streamPos-a._keepSizeAfter)}}function zb(a,b){a._bufferOffset+=b,a._posLimit-=b,a._pos-=b,a._streamPos-=b}function Ab(){return xf}function Bb(){}function Cb(){Cb=se;var a,b,c;for(Ve=s(tf,0,-1,256,1),a=0;256>a;++a){for(c=a,b=0;8>b;++b)0!=(1&c)?c=c>>>1^-306674912:c>>>=1;Ve[a]=c}}function Db(a,b,c,d,e){var f,g,h;return b>1073741567?!1:(a._cutValue=16+(d>>1),h=~~((b+c+d+e)/2)+256,sb(a,b+c,d+e,h),a._matchMaxLen=d,f=b+1,a._cyclicBufferSize!=f&&(a._son=s(tf,0,-1,2*(a._cyclicBufferSize=f),1)),g=65536,a.HASH_ARRAY&&(g=b-1,g|=g>>1,g|=g>>2,g|=g>>4,g|=g>>8,g>>=1,g|=65535,g>16777216&&(g>>=1),a._hashMask=g,++g,g+=a.kFixHashSize),g!=a._hashSizeSum&&(a._hash=s(tf,0,-1,a._hashSizeSum=g,1)),!0)}function Eb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;if(a._pos+a._matchMaxLen<=a._streamPos)p=a._matchMaxLen;else if(p=a._streamPos-a._pos,pa._cyclicBufferSize?a._pos-a._cyclicBufferSize:0,d=a._bufferOffset+a._pos,r=1,j=0,k=0,a.HASH_ARRAY?(w=Ve[255&a._bufferBase[d]]^255&a._bufferBase[d+1],j=1023&w,w^=(255&a._bufferBase[d+2])<<8,k=65535&w,l=(w^Ve[255&a._bufferBase[d+3]]<<5)&a._hashMask):l=255&a._bufferBase[d]^(255&a._bufferBase[d+1])<<8,e=a._hash[a.kFixHashSize+l],a.HASH_ARRAY&&(f=a._hash[j],g=a._hash[1024+k],a._hash[j]=a._pos,a._hash[1024+k]=a._pos,f>q&&a._bufferBase[a._bufferOffset+f]==a._bufferBase[d]&&(b[s++]=r=2,b[s++]=a._pos-f-1),g>q&&a._bufferBase[a._bufferOffset+g]==a._bufferBase[d]&&(g==f&&(s-=2),b[s++]=r=3,b[s++]=a._pos-g-1,f=g),0!=s&&f==e&&(s-=2,r=1)),a._hash[a.kFixHashSize+l]=a._pos,u=(a._cyclicBufferPos<<1)+1,v=a._cyclicBufferPos<<1,n=o=a.kNumHashDirectBytes,0!=a.kNumHashDirectBytes&&e>q&&a._bufferBase[a._bufferOffset+e+a.kNumHashDirectBytes]!=a._bufferBase[d+a.kNumHashDirectBytes]&&(b[s++]=r=a.kNumHashDirectBytes,b[s++]=a._pos-e-1),c=a._cutValue;;){if(q>=e||0==c--){a._son[u]=a._son[v]=0;break}if(i=a._pos-e,h=(i<=a._cyclicBufferPos?a._cyclicBufferPos-i:a._cyclicBufferPos-i+a._cyclicBufferSize)<<1,t=a._bufferOffset+e,m=o>n?n:o,a._bufferBase[t+m]==a._bufferBase[d+m]){for(;++m!=p&&a._bufferBase[t+m]==a._bufferBase[d+m];);if(m>r&&(b[s++]=r=m,b[s++]=i-1,m==p)){a._son[v]=a._son[h],a._son[u]=a._son[h+1];break}}(255&a._bufferBase[t+m])<(255&a._bufferBase[d+m])?(a._son[v]=e,v=h+1,e=a._son[v],o=m):(a._son[u]=e,u=h,e=a._son[u],n=m)}return Gb(a),s}function Fb(a){var b;for(a._bufferOffset=0,a._pos=0,a._streamPos=0,a._streamEndWasReached=!1,yb(a),b=0;b=a._cyclicBufferSize&&(a._cyclicBufferPos=0),xb(a),1073741823==a._pos&&(b=a._pos-a._cyclicBufferSize,Hb(a._son,2*a._cyclicBufferSize,b),Hb(a._hash,a._hashSizeSum,b),zb(a,b))}function Hb(a,b,c){var d,e;for(d=0;b>d;++d)e=a[d],c>=e?e=0:e-=c,a[d]=e}function Ib(a,b){a.HASH_ARRAY=b>2,a.HASH_ARRAY?(a.kNumHashDirectBytes=0,a.kMinMatchCheck=4,a.kFixHashSize=66560):(a.kNumHashDirectBytes=2,a.kMinMatchCheck=3,a.kFixHashSize=0)}function Jb(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;do{if(a._pos+a._matchMaxLen<=a._streamPos)n=a._matchMaxLen;else if(n=a._streamPos-a._pos,na._cyclicBufferSize?a._pos-a._cyclicBufferSize:0,d=a._bufferOffset+a._pos,a.HASH_ARRAY?(s=Ve[255&a._bufferBase[d]]^255&a._bufferBase[d+1],h=1023&s,a._hash[h]=a._pos,s^=(255&a._bufferBase[d+2])<<8,i=65535&s,a._hash[1024+i]=a._pos,j=(s^Ve[255&a._bufferBase[d+3]]<<5)&a._hashMask):j=255&a._bufferBase[d]^(255&a._bufferBase[d+1])<<8,e=a._hash[a.kFixHashSize+j],a._hash[a.kFixHashSize+j]=a._pos,q=(a._cyclicBufferPos<<1)+1,r=a._cyclicBufferPos<<1,l=m=a.kNumHashDirectBytes,c=a._cutValue;;){if(o>=e||0==c--){a._son[q]=a._son[r]=0;break}if(g=a._pos-e,f=(g<=a._cyclicBufferPos?a._cyclicBufferPos-g:a._cyclicBufferPos-g+a._cyclicBufferSize)<<1,p=a._bufferOffset+e,k=m>l?l:m,a._bufferBase[p+k]==a._bufferBase[d+k]){for(;++k!=n&&a._bufferBase[p+k]==a._bufferBase[d+k];);if(k==n){a._son[r]=a._son[f],a._son[q]=a._son[f+1];break}}(255&a._bufferBase[p+k])<(255&a._bufferBase[d+k])?(a._son[r]=e,r=f+1,e=a._son[r],m=k):(a._son[q]=e,q=f,e=a._son[q],l=k)}Gb(a)}while(0!=--b)}function Kb(){return yf}function Lb(){}function Mb(a,b,c){var d;for(d=a._pos-b-1,0>d&&(d+=a._windowSize);0!=c;--c)d>=a._windowSize&&(d=0),a._buffer[a._pos++]=a._buffer[d++],a._pos>=a._windowSize&&Ob(a)}function Nb(a,b){(null==a._buffer||a._windowSize!=b)&&(a._buffer=s(ff,0,-1,b,1)),a._windowSize=b,a._pos=0,a._streamPos=0}function Ob(a){var b;b=a._pos-a._streamPos,0!=b&&(qa(a._stream,a._buffer,a._streamPos,b),a._pos>=a._windowSize&&(a._pos=0),a._streamPos=a._pos)}function Pb(a,b){var c;return c=a._pos-b-1,0>c&&(c+=a._windowSize),a._buffer[c]}function Qb(a,b){b||(a._streamPos=0,a._pos=0)}function Rb(a,b){a._buffer[a._pos++]=b,a._pos>=a._windowSize&&Ob(a)}function Sb(a){Ob(a),a._stream=null}function Tb(a,b){Ob(a),a._stream=null,a._stream=b}function Ub(){return zf}function Vb(){}function Wb(a){return a-=2,4>a?a:3}function Xb(a){return 4>a?0:10>a?a-3:a-6}function Yb(a,b){return a.encoder=b,a.decoder=null,a.alive=!0,a}function Zb(a,b){return a.decoder=b,a.encoder=null,a.alive=!0,a}function $b(a){var b;if(!a.alive)throw new Pa;b=!0;try{return a.encoder?ac(a):_b(a),b=!1,a.alive}finally{b&&(a.alive=!1)}}function _b(a){var b;if(b=fc(a.decoder),-1==b)throw ta(new va,"corrupted input");a.inBytesProcessed=ze,a.outBytesProcessed=a.decoder.nowPos64,(1==b||I(a.decoder.outSize,Ae)>=0&&I(a.decoder.nowPos64,a.decoder.outSize)>=0)&&(dc(a.decoder),a.alive=!1)}function ac(a){Gc(a.encoder,a.encoder.processedInSize,a.encoder.processedOutSize,a.encoder.finished),a.inBytesProcessed=a.encoder.processedInSize[0],a.encoder.finished[0]&&(Uc(a.encoder),a.alive=!1)}function bc(){return Af}function cc(){}function dc(a){Ob(a.m_OutWindow),Sb(a.m_OutWindow),a.m_RangeDecoder.Stream=null}function ec(a,b,c,d){return a.m_RangeDecoder.Stream=b,Tb(a.m_OutWindow,c),hc(a),a.state=0,a.rep0=0,a.rep1=0,a.rep2=0,a.rep3=0,a.outSize=d,a.nowPos64=Ae,a.prevByte=0,Zb(new cc,a)}function fc(a){var b,c,d,e,f,g;if(g=P(a.nowPos64)&a.m_PosStateMask,0==Td(a.m_RangeDecoder,a.m_IsMatchDecoders,(a.state<<4)+g))b=uc(a.m_LiteralDecoder,P(a.nowPos64),a.prevByte),a.state<7?a.prevByte=yc(b,a.m_RangeDecoder):a.prevByte=zc(b,a.m_RangeDecoder,Pb(a.m_OutWindow,a.rep0)),Rb(a.m_OutWindow,a.prevByte),a.state=Xb(a.state),a.nowPos64=F(a.nowPos64,Be);else{if(1==Td(a.m_RangeDecoder,a.m_IsRepDecoders,a.state))d=0,0==Td(a.m_RangeDecoder,a.m_IsRepG0Decoders,a.state)?0==Td(a.m_RangeDecoder,a.m_IsRep0LongDecoders,(a.state<<4)+g)&&(a.state=a.state<7?9:11,d=1):(0==Td(a.m_RangeDecoder,a.m_IsRepG1Decoders,a.state)?c=a.rep1:(0==Td(a.m_RangeDecoder,a.m_IsRepG2Decoders,a.state)?c=a.rep2:(c=a.rep3,a.rep3=a.rep2),a.rep2=a.rep1),a.rep1=a.rep0,a.rep0=c),0==d&&(d=oc(a.m_RepLenDecoder,a.m_RangeDecoder,g)+2,a.state=a.state<7?8:11);else if(a.rep3=a.rep2,a.rep2=a.rep1,a.rep1=a.rep0,d=2+oc(a.m_LenDecoder,a.m_RangeDecoder,g),a.state=a.state<7?7:10,f=Fd(a.m_PosSlotDecoder[Wb(d)],a.m_RangeDecoder),f>=4){if(e=(f>>1)-1,a.rep0=(2|1&f)<f)a.rep0+=Hd(a.m_PosDecoders,a.rep0-f-1,a.m_RangeDecoder,e);else if(a.rep0+=Ud(a.m_RangeDecoder,e-4)<<4,a.rep0+=Gd(a.m_PosAlignDecoder,a.m_RangeDecoder),a.rep0<0)return-1==a.rep0?1:-1}else a.rep0=f;if(I(N(a.rep0),a.nowPos64)>=0||a.rep0>=a.m_DictionarySizeCheck)return-1;Mb(a.m_OutWindow,a.rep0,d),a.nowPos64=F(a.nowPos64,N(d)),a.prevByte=Pb(a.m_OutWindow,0)}return 0}function gc(a){var b;for(a.m_OutWindow=new Vb,a.m_RangeDecoder=new Yd,a.m_IsMatchDecoders=s(Bf,0,-1,192,1),a.m_IsRepDecoders=s(Bf,0,-1,12,1),a.m_IsRepG0Decoders=s(Bf,0,-1,12,1),a.m_IsRepG1Decoders=s(Bf,0,-1,12,1),a.m_IsRepG2Decoders=s(Bf,0,-1,12,1),a.m_IsRep0LongDecoders=s(Bf,0,-1,192,1),a.m_PosSlotDecoder=s(Cf,0,7,4,0),a.m_PosDecoders=s(Bf,0,-1,114,1),a.m_PosAlignDecoder=Ed(new Jd,4),a.m_LenDecoder=pc(new sc),a.m_RepLenDecoder=pc(new sc),a.m_LiteralDecoder=new xc,b=0;4>b;++b)a.m_PosSlotDecoder[b]=Ed(new Jd,6);return a}function hc(a){var b;for(Qb(a.m_OutWindow,!1),Wd(a.m_IsMatchDecoders),Wd(a.m_IsRep0LongDecoders),Wd(a.m_IsRepDecoders),Wd(a.m_IsRepG0Decoders),Wd(a.m_IsRepG1Decoders),Wd(a.m_IsRepG2Decoders),Wd(a.m_PosDecoders),vc(a.m_LiteralDecoder),b=0;4>b;++b)Wd(a.m_PosSlotDecoder[b].Models);qc(a.m_LenDecoder),qc(a.m_RepLenDecoder),Wd(a.m_PosAlignDecoder.Models),Vd(a.m_RangeDecoder)}function ic(a,b){var c,d,e,f,g,h,i;if(b.length<5)return!1;for(i=255&b[0],e=i%9,h=~~(i/9),f=h%5,g=~~(h/5),c=0,d=0;4>d;++d)c+=(255&b[1+d])<<8*d;return kc(a,e,f,g)?jc(a,c):!1}function jc(a,b){return 0>b?!1:(a.m_DictionarySize!=b&&(a.m_DictionarySize=b,a.m_DictionarySizeCheck=Sa(a.m_DictionarySize,1),Nb(a.m_OutWindow,Sa(a.m_DictionarySizeCheck,4096))),!0)}function kc(a,b,c,d){var e;return b>8||c>4||d>4?!1:(tc(a.m_LiteralDecoder,c,b),e=1<d;++d)a.m_Coders[d]=Ac(new Cc)}function uc(a,b,c){return a.m_Coders[((b&a.m_PosMask)<>>8-a.m_NumPrevBits)]}function vc(a){var b,c;for(c=1<b;++b)Wd(a.m_Coders[b].m_Decoders)}function wc(){return Gf}function xc(){}function yc(a,b){var c;c=1;do c=c<<1|Td(b,a.m_Decoders,c);while(256>c);return c<<24>>24}function zc(a,b,c){var d,e,f;f=1;do if(e=c>>7&1,c<<=1,d=Td(b,a.m_Decoders,(1+e<<8)+f),f=f<<1|d,e!=d){for(;256>f;)f=f<<1|Td(b,a.m_Decoders,f);break}while(256>f);return f<<24>>24}function Ac(a){return a.m_Decoders=s(Bf,0,-1,768,1),a}function Bc(){return Hf}function Cc(){}function Dc(){Dc=se;var a,b,c,d;for(We=s(ff,0,-1,2048,1),a=2,We[0]=0,We[1]=1,d=2;22>d;++d)for(c=1<<(d>>1)-1,b=0;c>b;++b,++a)We[a]=d<<24>>24}function Ec(a,b){var c,d,e,f;a._optimumEndIndex=b,e=a._optimum[b].PosPrev,d=a._optimum[b].BackPrev;do a._optimum[b].Prev1IsChar&&(Ad(a._optimum[e]),a._optimum[e].PosPrev=e-1,a._optimum[b].Prev2&&(a._optimum[e-1].Prev1IsChar=!1,a._optimum[e-1].PosPrev=a._optimum[b].PosPrev2,a._optimum[e-1].BackPrev=a._optimum[b].BackPrev2)),f=e,c=d,d=a._optimum[f].BackPrev,e=a._optimum[f].PosPrev,a._optimum[f].BackPrev=c,a._optimum[f].PosPrev=b,b=f;while(b>0);return a.backRes=a._optimum[0].BackPrev,a._optimumCurrentIndex=a._optimum[0].PosPrev,a._optimumCurrentIndex}function Fc(a){var b;for(a._state=0,a._previousByte=0,b=0;4>b;++b)a._repDistances[b]=0}function Gc(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;if(b[0]=Ae,c[0]=Ae,d[0]=!0,a._inStream&&(a._matchFinder._stream=a._inStream,Fb(a._matchFinder),a._needReleaseMFStream=!0,a._inStream=null),!a._finished){if(a._finished=!0,r=a.nowPos64,L(a.nowPos64,Ae)){if(0==vb(a._matchFinder))return void Lc(a,P(a.nowPos64));Sc(a),q=P(a.nowPos64)&a._posStateMask,$d(a._rangeEncoder,a._isMatch,(a._state<<4)+q,0),a._state=Xb(a._state),g=tb(a._matchFinder,-a._additionalOffset),ud(qd(a._literalEncoder,P(a.nowPos64),a._previousByte),a._rangeEncoder,g),a._previousByte=g,--a._additionalOffset,a.nowPos64=F(a.nowPos64,Be)}if(0==vb(a._matchFinder))return void Lc(a,P(a.nowPos64));for(;;){if(k=Mc(a,P(a.nowPos64)),n=a.backRes,q=P(a.nowPos64)&a._posStateMask,f=(a._state<<4)+q,1==k&&-1==n)$d(a._rangeEncoder,a._isMatch,f,0),g=tb(a._matchFinder,-a._additionalOffset),s=qd(a._literalEncoder,P(a.nowPos64),a._previousByte),a._state<7?ud(s,a._rangeEncoder,g):(m=tb(a._matchFinder,-a._repDistances[0]-1-a._additionalOffset),vd(s,a._rangeEncoder,m,g)),a._previousByte=g,a._state=Xb(a._state);else{if($d(a._rangeEncoder,a._isMatch,f,1),4>n){if($d(a._rangeEncoder,a._isRep,a._state,1),0==n?($d(a._rangeEncoder,a._isRepG0,a._state,0),1==k?$d(a._rangeEncoder,a._isRep0Long,f,0):$d(a._rangeEncoder,a._isRep0Long,f,1)):($d(a._rangeEncoder,a._isRepG0,a._state,1),1==n?$d(a._rangeEncoder,a._isRepG1,a._state,0):($d(a._rangeEncoder,a._isRepG1,a._state,1),$d(a._rangeEncoder,a._isRepG2,a._state,n-2))),1==k?a._state=a._state<7?9:11:(jd(a._repMatchLenEncoder,a._rangeEncoder,k-2,q),a._state=a._state<7?8:11),h=a._repDistances[n],0!=n){for(j=n;j>=1;--j)a._repDistances[j]=a._repDistances[j-1];a._repDistances[0]=h}}else{for($d(a._rangeEncoder,a._isRep,a._state,0),a._state=a._state<7?7:10,jd(a._lenEncoder,a._rangeEncoder,k-2,q),n-=4,p=_c(n),l=Wb(k),Ld(a._posSlotEncoder[l],a._rangeEncoder,p),p>=4&&(i=(p>>1)-1,e=(2|1&p)<p?Pd(a._posEncoders,e-p-1,a._rangeEncoder,i,o):(_d(a._rangeEncoder,o>>4,i-4),Nd(a._posAlignEncoder,a._rangeEncoder,15&o),++a._alignPriceCount)),h=n,j=3;j>=1;--j)a._repDistances[j]=a._repDistances[j-1];a._repDistances[0]=h,++a._matchPriceCount}a._previousByte=tb(a._matchFinder,k-1-a._additionalOffset)}if(a._additionalOffset-=k,a.nowPos64=F(a.nowPos64,N(k)),0==a._additionalOffset){if(a._matchPriceCount>=128&&Kc(a),a._alignPriceCount>=16&&Jc(a),b[0]=a.nowPos64,c[0]=be(a._rangeEncoder),0==vb(a._matchFinder))return void Lc(a,P(a.nowPos64));if(I(Y(a.nowPos64,r),De)>=0)return a._finished=!1,void(d[0]=!1)}}}}function Hc(a){var b,c;a._matchFinder||(Cb(),b=new Lb,c=4,0==a._matchFinderType&&(c=2),Ib(b,c),a._matchFinder=b),pd(a._literalEncoder,a._numLiteralPosStateBits,a._numLiteralContextBits),(a._dictionarySize!=a._dictionarySizePrev||a._numFastBytesPrev!=a._numFastBytes)&&(Db(a._matchFinder,a._dictionarySize,4096,a._numFastBytes,274),a._dictionarySizePrev=a._dictionarySize,a._numFastBytesPrev=a._numFastBytes)}function Ic(a){var b;for(Dc(),a._repDistances=s(tf,0,-1,4,1),a._optimum=s(If,0,6,4096,0),a._rangeEncoder=(Zd(),new he),a._isMatch=s(Bf,0,-1,192,1),a._isRep=s(Bf,0,-1,12,1),a._isRepG0=s(Bf,0,-1,12,1),a._isRepG1=s(Bf,0,-1,12,1),a._isRepG2=s(Bf,0,-1,12,1),a._isRep0Long=s(Bf,0,-1,192,1),a._posSlotEncoder=s(Jf,0,8,4,0),a._posEncoders=s(Bf,0,-1,114,1),a._posAlignEncoder=Kd(new Sd,4),a._lenEncoder=kd(new od),a._repMatchLenEncoder=kd(new od),a._literalEncoder=new td,a._matchDistances=s(tf,0,-1,548,1),a._posSlotPrices=s(tf,0,-1,256,1),a._distancesPrices=s(tf,0,-1,512,1),a._alignPrices=s(tf,0,-1,16,1),a.reps=s(tf,0,-1,4,1),a.repLens=s(tf,0,-1,4,1),a.processedInSize=s(Kf,0,-1,1,3),a.processedOutSize=s(Kf,0,-1,1,3),a.finished=s(Lf,0,-1,1,2),a.properties=s(ff,0,-1,5,1),a.tempPrices=s(tf,0,-1,128,1),b=0;4096>b;++b)a._optimum[b]=new Dd;for(b=0;4>b;++b)a._posSlotEncoder[b]=Kd(new Sd,6);return a}function Jc(a){var b;for(b=0;16>b;++b)a._alignPrices[b]=Od(a._posAlignEncoder,b);a._alignPriceCount=0}function Kc(a){var b,c,d,e,f,g,h,i;for(e=4;128>e;++e)g=_c(e),d=(g>>1)-1,b=(2|1&g)<f;++f){for(c=a._posSlotEncoder[f],h=f<<6,g=0;g>1)-1-4<<6;for(i=128*f,e=0;4>e;++e)a._distancesPrices[i+e]=a._posSlotPrices[h+e];for(;128>e;++e)a._distancesPrices[i+e]=a._posSlotPrices[h+_c(e)]+a.tempPrices[e]}a._matchPriceCount=0}function Lc(a,b){Tc(a),$c(a,b&a._posStateMask),ae(a._rangeEncoder)}function Mc(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z;if(a._optimumEndIndex!=a._optimumCurrentIndex)return o=a._optimum[a._optimumCurrentIndex].PosPrev-a._optimumCurrentIndex,a.backRes=a._optimum[a._optimumCurrentIndex].BackPrev,a._optimumCurrentIndex=a._optimum[a._optimumCurrentIndex].PosPrev,o;if(a._optimumCurrentIndex=a._optimumEndIndex=0,a._longestMatchWasFound?(n=a._longestMatchLength,a._longestMatchWasFound=!1):n=Sc(a),C=a._numDistancePairs,A=vb(a._matchFinder)+1,2>A)return a.backRes=-1,1;for(A>273&&(A=273),P=0,k=0;4>k;++k)a.reps[k]=a._repDistances[k],a.repLens[k]=ub(a._matchFinder,-1,a.reps[k],273),a.repLens[k]>a.repLens[P]&&(P=k);if(a.repLens[P]>=a._numFastBytes)return a.backRes=P,o=a.repLens[P],Rc(a,o-1),o;if(n>=a._numFastBytes)return a.backRes=a._matchDistances[C-1]+4,Rc(a,n-1),n;if(i=tb(a._matchFinder,-1),s=tb(a._matchFinder,-a._repDistances[0]-1-1),2>n&&i!=s&&a.repLens[P]<2)return a.backRes=-1,1;if(a._optimum[0].State=a._state,J=b&a._posStateMask,a._optimum[1].Price=(Zd(),Xe[a._isMatch[(a._state<<4)+J]>>>2]+xd(qd(a._literalEncoder,b,a._previousByte),a._state>=7,s,i)),Ad(a._optimum[1]),t=Xe[2048-a._isMatch[(a._state<<4)+J]>>>2],O=t+Xe[2048-a._isRep[a._state]>>>2],s==i&&(Q=O+Pc(a,a._state,J),Q=a.repLens[P]?n:a.repLens[P],2>m)return a.backRes=a._optimum[1].BackPrev,1;a._optimum[1].PosPrev=0,a._optimum[0].Backs0=a.reps[0],a._optimum[0].Backs1=a.reps[1],a._optimum[0].Backs2=a.reps[2],a._optimum[0].Backs3=a.reps[3],l=m;do a._optimum[l--].Price=268435455;while(l>=2);for(k=0;4>k;++k)if(N=a.repLens[k],!(2>N)){L=O+Oc(a,k,a._state,J);do f=L+ld(a._repMatchLenEncoder,N-2,J),G=a._optimum[N],f=2)}if(z=t+Xe[a._isRep[a._state]>>>2],l=a.repLens[0]>=2?a.repLens[0]+1:2,n>=l){for(D=0;l>a._matchDistances[D];)D+=2;for(;j=a._matchDistances[D+1],f=z+Nc(a,j,l,J),G=a._optimum[l],f=a._numFastBytes)return a._longestMatchLength=u,a._longestMatchWasFound=!0,Ec(a,c);if(++b,I=a._optimum[c].PosPrev,a._optimum[c].Prev1IsChar?(--I,a._optimum[c].Prev2?(S=a._optimum[a._optimum[c].PosPrev2].State,S=a._optimum[c].BackPrev2<4?7>S?8:11:7>S?7:10):S=a._optimum[I].State,S=Xb(S)):S=a._optimum[I].State,I==c-1?S=0==a._optimum[c].BackPrev?7>S?9:11:Xb(S):(a._optimum[c].Prev1IsChar&&a._optimum[c].Prev2?(I=a._optimum[c].PosPrev2,H=a._optimum[c].BackPrev2,S=7>S?8:11):(H=a._optimum[c].BackPrev,S=4>H?7>S?8:11:7>S?7:10),F=a._optimum[I],4>H?0==H?(a.reps[0]=F.Backs0,a.reps[1]=F.Backs1,a.reps[2]=F.Backs2,a.reps[3]=F.Backs3):1==H?(a.reps[0]=F.Backs1,a.reps[1]=F.Backs0,a.reps[2]=F.Backs2,a.reps[3]=F.Backs3):2==H?(a.reps[0]=F.Backs2,a.reps[1]=F.Backs0,a.reps[2]=F.Backs1,a.reps[3]=F.Backs3):(a.reps[0]=F.Backs3,a.reps[1]=F.Backs0,a.reps[2]=F.Backs1,a.reps[3]=F.Backs2):(a.reps[0]=H-4,a.reps[1]=F.Backs0,a.reps[2]=F.Backs1,a.reps[3]=F.Backs2)),a._optimum[c].State=S,a._optimum[c].Backs0=a.reps[0],a._optimum[c].Backs1=a.reps[1],a._optimum[c].Backs2=a.reps[2],a._optimum[c].Backs3=a.reps[3],h=a._optimum[c].Price,i=tb(a._matchFinder,-1),s=tb(a._matchFinder,-a.reps[0]-1-1),J=b&a._posStateMask,d=h+Xe[a._isMatch[(S<<4)+J]>>>2]+xd(qd(a._literalEncoder,b,tb(a._matchFinder,-2)),S>=7,s,i),x=a._optimum[c+1],v=!1,d>>2],O=t+Xe[2048-a._isRep[S]>>>2],s!=i||x.PosPrev>>2]+Xe[a._isRep0Long[(S<<4)+J]>>>2]),Q<=x.Price&&(x.Price=Q,x.PosPrev=c,x.BackPrev=0,x.Prev1IsChar=!1,v=!0)),B=vb(a._matchFinder)+1,B=B>4095-c?4095-c:B,A=B,!(2>A)){if(A>a._numFastBytes&&(A=a._numFastBytes),!v&&s!=i&&(U=Ta(B-1,a._numFastBytes),q=ub(a._matchFinder,0,a.reps[0],U),q>=2)){for(T=Xb(S),K=b+1&a._posStateMask,y=d+Xe[2048-a._isMatch[(T<<4)+K]>>>2]+Xe[2048-a._isRep[T]>>>2],E=c+1+q;E>m;)a._optimum[++m].Price=268435455;f=y+(V=ld(a._repMatchLenEncoder,q-2,K),V+Oc(a,0,T,K)),G=a._optimum[E],fM;++M)if(p=ub(a._matchFinder,-1,a.reps[M],A),!(2>p)){r=p;do{for(;c+p>m;)a._optimum[++m].Price=268435455;f=O+(W=ld(a._repMatchLenEncoder,p-2,J),W+Oc(a,M,S,J)),G=a._optimum[c+p],f=2);if(p=r,0==M&&(R=p+1),B>p&&(U=Ta(B-1-p,a._numFastBytes),q=ub(a._matchFinder,p,a.reps[M],U),q>=2)){for(T=7>S?8:11,K=b+p&a._posStateMask,e=O+(X=ld(a._repMatchLenEncoder,p-2,J),X+Oc(a,M,S,J))+Xe[a._isMatch[(T<<4)+K]>>>2]+xd(qd(a._literalEncoder,b+p,tb(a._matchFinder,p-1-1)),!0,tb(a._matchFinder,p-1-(a.reps[M]+1)),tb(a._matchFinder,p-1)), +T=Xb(T),K=b+p+1&a._posStateMask,w=e+Xe[2048-a._isMatch[(T<<4)+K]>>>2],y=w+Xe[2048-a._isRep[T]>>>2],E=p+1+q;c+E>m;)a._optimum[++m].Price=268435455;f=y+(Y=ld(a._repMatchLenEncoder,q-2,K),Y+Oc(a,0,T,K)),G=a._optimum[c+E],fA){for(u=A,C=0;u>a._matchDistances[C];C+=2);a._matchDistances[C]=u,C+=2}if(u>=R){for(z=t+Xe[a._isRep[S]>>>2];c+u>m;)a._optimum[++m].Price=268435455;for(D=0;R>a._matchDistances[D];)D+=2;for(p=R;;++p)if(g=a._matchDistances[D+1],f=z+Nc(a,g,p,J),G=a._optimum[c+p],fp&&(U=Ta(B-1-p,a._numFastBytes),q=ub(a._matchFinder,p,g,U),q>=2)){for(T=7>S?7:10,K=b+p&a._posStateMask,e=f+Xe[a._isMatch[(T<<4)+K]>>>2]+xd(qd(a._literalEncoder,b+p,tb(a._matchFinder,p-1-1)),!0,tb(a._matchFinder,p-(g+1)-1),tb(a._matchFinder,p-1)),T=Xb(T),K=b+p+1&a._posStateMask,w=e+Xe[2048-a._isMatch[(T<<4)+K]>>>2],y=w+Xe[2048-a._isRep[T]>>>2],E=p+1+q;c+E>m;)a._optimum[++m].Price=268435455;f=y+(Z=ld(a._repMatchLenEncoder,q-2,K),Z+Oc(a,0,T,K)),G=a._optimum[c+E],fb?a._distancesPrices[128*e+b]:a._posSlotPrices[(e<<6)+ad(b)]+a._alignPrices[15&b],f+ld(a._lenEncoder,c-2,d)}function Oc(a,b,c,d){var e;return 0==b?(Zd(),e=Xe[a._isRepG0[c]>>>2],e+=Xe[2048-a._isRep0Long[(c<<4)+d]>>>2]):(Zd(),e=Xe[2048-a._isRepG0[c]>>>2],1==b?e+=Xe[a._isRepG1[c]>>>2]:(e+=Xe[2048-a._isRepG1[c]>>>2],e+=ee(a._isRepG2[c],b-2))),e}function Pc(a,b,c){return Zd(),Xe[a._isRepG0[b]>>>2]+Xe[a._isRep0Long[(b<<4)+c]>>>2]}function Qc(a){var b;for(Fc(a),ce(a._rangeEncoder),fe(a._isMatch),fe(a._isRep0Long),fe(a._isRep),fe(a._isRepG0),fe(a._isRepG1),fe(a._isRepG2),fe(a._posEncoders),rd(a._literalEncoder),b=0;4>b;++b)Wd(a._posSlotEncoder[b].Models);fd(a._lenEncoder,1<0&&(Jb(a._matchFinder,b),a._additionalOffset+=b)}function Sc(a){var b;return b=0,a._numDistancePairs=Eb(a._matchFinder,a._matchDistances),a._numDistancePairs>0&&(b=a._matchDistances[a._numDistancePairs-2],b==a._numFastBytes&&(b+=ub(a._matchFinder,b-1,a._matchDistances[a._numDistancePairs-1],273-b))),++a._additionalOffset,b}function Tc(a){a._matchFinder&&a._needReleaseMFStream&&(a._matchFinder._stream=null,a._needReleaseMFStream=!1)}function Uc(a){Tc(a),a._rangeEncoder.Stream=null}function Vc(a,b){var c;if(1>b||b>536870912)return!1;for(a._dictionarySize=b,c=0;b>1<c||c>4||0>b||b>8||0>d||d>4?!1:(a._numLiteralPosStateBits=c,a._numLiteralContextBits=b,a._posStateBits=d,a._posStateMask=(1<b||b>2?!1:(c=a._matchFinderType,a._matchFinderType=b,a._matchFinder&&c!=a._matchFinderType&&(a._dictionarySizePrev=-1,a._matchFinder=null),!0)}function Yc(a,b){return 5>b||b>273?!1:(a._numFastBytes=b,!0)}function Zc(a,b){var c;for(a.properties[0]=9*(5*a._posStateBits+a._numLiteralPosStateBits)+a._numLiteralContextBits<<24>>24,c=0;4>c;++c)a.properties[1+c]=a._dictionarySize>>8*c<<24>>24;qa(b,a.properties,0,5)}function $c(a,b){var c;a._writeEndMark&&($d(a._rangeEncoder,a._isMatch,(a._state<<4)+b,1),$d(a._rangeEncoder,a._isRep,a._state,0),a._state=a._state<7?7:10,jd(a._lenEncoder,a._rangeEncoder,0,b),c=Wb(2),Ld(a._posSlotEncoder[c],a._rangeEncoder,63),_d(a._rangeEncoder,67108863,26),Nd(a._posAlignEncoder,a._rangeEncoder,15))}function _c(a){return 2048>a?We[a]:2097152>a?We[a>>10]+20:We[a>>20]+40}function ad(a){return 131072>a?We[a>>6]+12:134217728>a?We[a>>16]+32:We[a>>26]+52}function bd(){return Mf}function cd(){}function dd(a,b,c,d){8>c?($d(b,a._choice,0,0),Ld(a._lowCoder[d],b,c)):(c-=8,$d(b,a._choice,0,1),8>c?($d(b,a._choice,1,0),Ld(a._midCoder[d],b,c)):($d(b,a._choice,1,1),Ld(a._highCoder,b,c-8)))}function ed(a){var b;for(a._choice=s(Bf,0,-1,2,1),a._lowCoder=s(Jf,0,8,16,0),a._midCoder=s(Jf,0,8,16,0),a._highCoder=Kd(new Sd,8),b=0;16>b;++b)a._lowCoder[b]=Kd(new Sd,3),a._midCoder[b]=Kd(new Sd,3);return a}function fd(a,b){var c;for(fe(a._choice),c=0;b>c;++c)Wd(a._lowCoder[c].Models),Wd(a._midCoder[c].Models);Wd(a._highCoder.Models)}function gd(a,b,c,d,e){var f,g,h,i,j;for(Zd(),f=Xe[a._choice[0]>>>2],g=Xe[2048-a._choice[0]>>>2],h=g+Xe[a._choice[1]>>>2],i=g+Xe[2048-a._choice[1]>>>2],j=0,j=0;8>j;++j){if(j>=c)return;d[e+j]=f+Md(a._lowCoder[b],j)}for(;16>j;++j){if(j>=c)return;d[e+j]=h+Md(a._midCoder[b],j-8)}for(;c>j;++j)d[e+j]=i+Md(a._highCoder,j-8-8)}function hd(){return Qf}function id(){}function jd(a,b,c,d){dd(a,b,c,d),0==--a._counters[d]&&(gd(a,d,a._tableSize,a._prices,272*d),a._counters[d]=a._tableSize)}function kd(a){return ed(a),a._prices=s(tf,0,-1,4352,1),a._counters=s(tf,0,-1,16,1),a}function ld(a,b,c){return a._prices[272*c+b]}function md(a,b){var c;for(c=0;b>c;++c)gd(a,c,a._tableSize,a._prices,272*c),a._counters[c]=a._tableSize}function nd(){return Rf}function od(){}function pd(a,b,c){var d,e;if(null==a.m_Coders||a.m_NumPrevBits!=c||a.m_NumPosBits!=b)for(a.m_NumPosBits=b,a.m_PosMask=(1<d;++d)a.m_Coders[d]=wd(new zd)}function qd(a,b,c){return a.m_Coders[((b&a.m_PosMask)<>>8-a.m_NumPrevBits)]}function rd(a){var b,c;for(c=1<b;++b)fe(a.m_Coders[b].m_Encoders)}function sd(){return Of}function td(){}function ud(a,b,c){var d,e,f;for(e=1,f=7;f>=0;--f)d=c>>f&1,$d(b,a.m_Encoders,e,d),e=e<<1|d}function vd(a,b,c,d){var e,f,g,h,i,j;for(f=1,i=!0,g=7;g>=0;--g)e=d>>g&1,j=f,i&&(h=c>>g&1,j+=1+h<<8,i=h==e),$d(b,a.m_Encoders,j,e),f=f<<1|e}function wd(a){return a.m_Encoders=s(Bf,0,-1,768,1),a}function xd(a,b,c,d){var e,f,g,h,i;if(i=0,f=1,g=7,b)for(;g>=0;--g)if(h=c>>g&1,e=d>>g&1,i+=ee(a.m_Encoders[(1+h<<8)+f],e),f=f<<1|e,h!=e){--g;break}for(;g>=0;--g)e=d>>g&1,i+=ee(a.m_Encoders[f],e),f=f<<1|e;return i}function yd(){return Pf}function zd(){}function Ad(a){a.BackPrev=-1,a.Prev1IsChar=!1}function Bd(a){a.BackPrev=0,a.Prev1IsChar=!1}function Cd(){return Sf}function Dd(){}function Ed(a,b){return a.NumBitLevels=b,a.Models=s(Bf,0,-1,1<f;++f)e=Td(c,a,b+g),g<<=1,g+=e,h|=e<>>e&1,$d(b,a.Models,f,d),f=f<<1|d}function Md(a,b){var c,d,e,f;for(f=0,e=1,d=a.NumBitLevels;0!=d;)--d,c=b>>>d&1,f+=ee(a.Models[e],c),e=(e<<1)+c;return f}function Nd(a,b,c){var d,e,f;for(f=1,e=0;e>=1}function Od(a,b){var c,d,e,f;for(f=0,e=1,d=a.NumBitLevels;0!=d;--d)c=1&b,b>>>=1,f+=ee(a.Models[e],c),e=e<<1|c;return f}function Pd(a,b,c,d,e){var f,g,h;for(h=1,g=0;d>g;++g)f=1&e,$d(c,a,b+h,f),h=h<<1|f,e>>=1}function Qd(a,b,c,d){var e,f,g,h;for(h=0,g=1,f=c;0!=f;--f)e=1&d,d>>>=1,Zd(),h+=Xe[(2047&(a[b+g]-e^-e))>>>2],g=g<<1|e;return h}function Rd(){return Uf}function Sd(){}function Td(a,b,c){var d,e;return e=b[c],d=(a.Range>>>11)*e,(-2147483648^a.Code)<(-2147483648^d)?(a.Range=d,b[c]=e+(2048-e>>>5)<<16>>16,0==(-16777216&a.Range)&&(a.Code=a.Code<<8|ga(a.Stream),a.Range<<=8),0):(a.Range-=d,a.Code-=d,b[c]=e-(e>>>5)<<16>>16,0==(-16777216&a.Range)&&(a.Code=a.Code<<8|ga(a.Stream),a.Range<<=8),1)}function Ud(a,b){var c,d,e;for(d=0,c=b;0!=c;--c)a.Range>>>=1,e=a.Code-a.Range>>>31,a.Code-=a.Range&e-1,d=d<<1|1-e,0==(-16777216&a.Range)&&(a.Code=a.Code<<8|ga(a.Stream),a.Range<<=8);return d}function Vd(a){var b;for(a.Code=0,a.Range=-1,b=0;5>b;++b)a.Code=a.Code<<8|ga(a.Stream)}function Wd(a){var b;for(b=0;b=0;--b)for(d=1<<9-b-1,a=1<<9-b,c=d;a>c;++c)Xe[c]=(b<<6)+(a-c<<6>>>9-b-1)}function $d(a,b,c,d){var e,f;f=b[c],e=(a.Range>>>11)*f,0==d?(a.Range=e,b[c]=f+(2048-f>>>5)<<16>>16):(a.Low=F(a.Low,H(N(e),He)),a.Range-=e,b[c]=f-(f>>>5)<<16>>16),0==(-16777216&a.Range)&&(a.Range<<=8,de(a))}function _d(a,b,c){var d;for(d=c-1;d>=0;--d)a.Range>>>=1,1==(b>>>d&1)&&(a.Low=F(a.Low,N(a.Range))),0==(-16777216&a.Range)&&(a.Range<<=8,de(a))}function ae(a){var b;for(b=0;5>b;++b)de(a)}function be(a){return F(F(N(a._cacheSize),a._position),Ce)}function ce(a){a._position=Ae,a.Low=Ae,a.Range=-1,a._cacheSize=1,a._cache=0}function de(a){var b,c;if(b=P(X(a.Low,32)),0!=b||I(a.Low,Ge)<0){a._position=F(a._position,N(a._cacheSize)),c=a._cache;do pa(a.Stream,c+b),c=255;while(0!=--a._cacheSize);a._cache=P(a.Low)>>>24}++a._cacheSize,a.Low=V(H(a.Low,Ee),8)}function ee(a,b){return Zd(),Xe[(2047&(a-b^-b))>>>2]}function fe(a){Zd();var b;for(b=0;b=a.length)throw La(new Na,"invalid UTF-8");if(e=255&a[++c],128!=(192&e))throw La(new Na,"invalid UTF-8");n(b.data,String.fromCharCode((31&d)<<6&65535|63&e))}else{if(224!=(240&d))throw La(new Na,"invalid UTF-8");if(c+2>=a.length)throw La(new Na,"invalid UTF-8");if(e=255&a[++c],128!=(192&e))throw La(new Na,"invalid UTF-8");if(f=255&a[++c],128!=(192&f))throw La(new Na,"invalid UTF-8");o(b.data,String.fromCharCode(65535&((15&d)<<12|(63&e)<<6|63&f)))}return p(b.data)}function je(a){var b,c,d,e,f,g,h;for(h=a.length,g=s(nf,0,-1,h,1),Xa(a,0,h,g,0),c=g,e=0,f=0;f=1&&127>=b?++e:e+=0==b||b>=128&&2047>=b?2:3;for(d=s(ff,0,-1,e,1),e=0,f=0;f=1&&127>=b?d[e++]=b<<24>>24:0==b||b>=128&&2047>=b?(d[e++]=(192|b>>6&31)<<24>>24,d[e++]=(128|63&b)<<24>>24):(d[e++]=(224|b>>12&15)<<24>>24,d[e++]=(128|b>>6&63)<<24>>24,d[e++]=(128|63&b)<<24>>24);return d}function ke(a){return a}function le(a){return a[1]+a[0]}function me(){function b(){var i;for(d=(new Date).getTime();eb(h.c);)if(c=le(h.c.chunker.inBytesProcessed)/le(h.c.length_0),(new Date).getTime()-d>200)return g?g(c):"undefined"!=typeof e&&a(c,e),setTimeout(b,0),!1;g?g(1):"undefined"!=typeof e&&a(1,e),i=oa(h.c.output).slice(0),f?f(i):"undefined"!=typeof e&&postMessage({action:we,callback_num:e,result:i})}var c,d,e,f,g,h=ke(new pe),i=arguments[0],j=arguments[1];"function"==typeof arguments[2]?(f=arguments[2],"function"==typeof arguments[3]&&(g=arguments[3])):e=arguments[2],h.mode=bg(j),h.c=ib(new kb,je(i),h.mode),g?g(0):"undefined"!=typeof e&&a(0,e),setTimeout(b,1)}function ne(){function b(){var d;for(e=(new Date).getTime();lb(i.d);)if(c=le(i.d.chunker.decoder.nowPos64)/le(i.d.length_0),(new Date).getTime()-e>200)return h?h(c):"undefined"!=typeof f&&a(c,f),setTimeout(b,0),!1;h?h(1):"undefined"!=typeof f&&a(1,f),d=ie(oa(i.d.output)),g?g(d):"undefined"!=typeof f&&postMessage({action:xe,callback_num:f,result:d})}var c,d,e,f,g,h,i=ke(new pe),j=arguments[0];"function"==typeof arguments[1]?(g=arguments[1],"function"==typeof arguments[2]&&(h=arguments[2])):f=arguments[1],d=t(ff,0,-1,j),i.d=pb(new rb,d),h?h(0):"undefined"!=typeof f&&a(0,f),setTimeout(b,0)}function oe(){return ag}function pe(){}function qe(){!!$stats&&$stats({moduleName:te,subSystem:"startup",evtGroup:"moduleStartup",millis:(new Date).getTime(),type:"onModuleLoadStart",className:"org.dellroad.lzma.demo.client.LZMADemo"})}function re(a,b,c){if(te=b,ue=c,a)try{qe()}catch(d){a(b)}else qe()}function se(){}var te,ue,ve,we=1,xe=2,ye=[0,-0x8000000000000000],ze=[4294967295,-4294967296],Ae=[0,0],Be=[1,0],Ce=[4,0],De=[4096,0],Ee=[16777215,0],Fe=[16777216,0],Ge=[4278190080,0],He=[4294967295,0],Ie=[4294967295,0x7fffffff00000000];ve=c.prototype={},ve.getClass$=b,ve.typeMarker$=se,ve.typeId$=1,ve=e.prototype=new c,ve.getClass$=d,ve.typeId$=3,ve.detailMessage=null,ve=g.prototype=new e,ve.getClass$=f,ve.typeId$=4,ve=j.prototype=new g,ve.getClass$=i,ve.typeId$=5,ve=m.prototype=new j,ve.getClass$=l,ve.typeId$=6,ve=v.prototype=new c,ve.getClass$=r,ve.typeId$=0,ve.arrayClass$=null,ve.length=0,ve.queryId$=0;var Je,Ke,Le,Me,Ne,Oe,Pe,Qe,Re,Se,Te,Ue=[{},{},{1:1},{2:1},{2:1},{2:1},{2:1},{2:1,10:1},{2:1},{2:1},{2:1},{2:1},{2:1},{2:1,11:1},{2:1},{2:1},{2:1},{4:1},{5:1},{6:1},{7:1},{8:1},{9:1}];ve=da.prototype=new c,ve.getClass$=ca,ve.typeId$=0,ve=ja.prototype=new da,ve.getClass$=ia,ve.typeId$=0,ve.buf=null,ve.count=0,ve.pos=0,ve=la.prototype=new c,ve.getClass$=ka,ve.typeId$=0,ve=sa.prototype=new la,ve.getClass$=ra,ve.typeId$=0,ve.buf=null,ve.count=0,ve=va.prototype=new g,ve.getClass$=ua,ve.typeId$=7,ve=ya.prototype=new j,ve.getClass$=xa,ve.typeId$=8,ve=Ba.prototype=new j,ve.getClass$=Aa,ve.typeId$=9,ve=Ga.prototype=new c,ve.getClass$=Fa,ve.typeId$=0,ve.typeName=null,ve=Ia.prototype=new j,ve.getClass$=Ha,ve.typeId$=12,ve=Ka.prototype=new c,ve.getClass$=Ja,ve.typeId$=0,ve=Na.prototype=new j,ve.getClass$=Ma,ve.typeId$=13,ve=Pa.prototype=new j,ve.getClass$=Oa,ve.typeId$=14,ve=Ra.prototype=new j,ve.getClass$=Qa,ve.typeId$=15,ve=Va.prototype=new j,ve.getClass$=Ua,ve.typeId$=16,ve=String.prototype,ve.getClass$=Ya,ve.typeId$=2,ve=_a.prototype=new c,ve.getClass$=$a,ve.typeId$=0,ve=db.prototype=new Ka,ve.getClass$=cb,ve.typeId$=0,ve.dictionarySize=0,ve.fb=0,ve.lc=0,ve.lp=0,ve.matchFinder=0,ve.pb=0,ve=hb.prototype=new c,ve.getClass$=gb,ve.typeId$=0,ve.chunker=null,ve=kb.prototype=new hb,ve.getClass$=jb,ve.typeId$=0,ve.output=null,ve=ob.prototype=new c,ve.getClass$=nb,ve.typeId$=0,ve.chunker=null,ve.exception=null,ve.length_0=Ae,ve=rb.prototype=new ob,ve.getClass$=qb,ve.typeId$=0,ve.output=null,ve=Bb.prototype=new c,ve.getClass$=Ab,ve.typeId$=0,ve._blockSize=0,ve._bufferBase=null,ve._bufferOffset=0,ve._keepSizeAfter=0,ve._keepSizeBefore=0,ve._pointerToLastSafePosition=0,ve._pos=0,ve._posLimit=0,ve._stream=null,ve._streamEndWasReached=!1,ve._streamPos=0,ve=Lb.prototype=new Bb,ve.getClass$=Kb,ve.typeId$=0,ve.HASH_ARRAY=!0,ve._cutValue=255,ve._cyclicBufferPos=0,ve._cyclicBufferSize=0,ve._hash=null,ve._hashMask=0,ve._hashSizeSum=0,ve._matchMaxLen=0,ve._son=null,ve.kFixHashSize=66560,ve.kMinMatchCheck=4,ve.kNumHashDirectBytes=0;var Ve;ve=Vb.prototype=new c,ve.getClass$=Ub,ve.typeId$=0,ve._buffer=null,ve._pos=0,ve._stream=null,ve._streamPos=0,ve._windowSize=0,ve=cc.prototype=new c,ve.getClass$=bc,ve.typeId$=0,ve.alive=!1,ve.decoder=null,ve.encoder=null,ve=mc.prototype=new c,ve.getClass$=lc,ve.typeId$=0,ve.m_DictionarySize=-1,ve.m_DictionarySizeCheck=-1,ve.m_PosStateMask=0,ve.nowPos64=Ae,ve.outSize=Ae,ve.prevByte=0,ve.rep0=0,ve.rep1=0,ve.rep2=0,ve.rep3=0,ve.state=0,ve=sc.prototype=new c,ve.getClass$=rc,ve.typeId$=0,ve.m_NumPosStates=0,ve=xc.prototype=new c,ve.getClass$=wc,ve.typeId$=0,ve.m_Coders=null,ve.m_NumPosBits=0,ve.m_NumPrevBits=0,ve.m_PosMask=0,ve=Cc.prototype=new c,ve.getClass$=Bc,ve.typeId$=17,ve=cd.prototype=new c,ve.getClass$=bd,ve.typeId$=0,ve._additionalOffset=0,ve._alignPriceCount=0,ve._dictionarySize=4194304,ve._dictionarySizePrev=-1,ve._distTableSize=44,ve._finished=!1,ve._inStream=null,ve._longestMatchLength=0,ve._longestMatchWasFound=!1,ve._matchFinder=null,ve._matchFinderType=1,ve._matchPriceCount=0,ve._needReleaseMFStream=!1,ve._numDistancePairs=0,ve._numFastBytes=32,ve._numFastBytesPrev=-1,ve._numLiteralContextBits=3,ve._numLiteralPosStateBits=0,ve._optimumCurrentIndex=0,ve._optimumEndIndex=0,ve._posStateBits=2,ve._posStateMask=3,ve._previousByte=0,ve._state=0,ve._writeEndMark=!1,ve.backRes=0,ve.nowPos64=Ae;var We;ve=id.prototype=new c,ve.getClass$=hd,ve.typeId$=0,ve=od.prototype=new id,ve.getClass$=nd,ve.typeId$=0,ve._tableSize=0,ve=td.prototype=new c,ve.getClass$=sd,ve.typeId$=0,ve.m_Coders=null,ve.m_NumPosBits=0,ve.m_NumPrevBits=0,ve.m_PosMask=0,ve=zd.prototype=new c,ve.getClass$=yd,ve.typeId$=18,ve=Dd.prototype=new c,ve.getClass$=Cd,ve.typeId$=19,ve.BackPrev=0,ve.BackPrev2=0,ve.Backs0=0,ve.Backs1=0,ve.Backs2=0,ve.Backs3=0,ve.PosPrev=0,ve.PosPrev2=0,ve.Prev1IsChar=!1,ve.Prev2=!1,ve.Price=0,ve.State=0,ve=Jd.prototype=new c,ve.getClass$=Id,ve.typeId$=20,ve.Models=null,ve.NumBitLevels=0,ve=Sd.prototype=new c,ve.getClass$=Rd,ve.typeId$=21,ve.Models=null,ve.NumBitLevels=0,ve=Yd.prototype=new c,ve.getClass$=Xd,ve.typeId$=0,ve.Code=0,ve.Range=0,ve.Stream=null,ve=he.prototype=new c,ve.getClass$=ge,ve.typeId$=0,ve.Low=Ae,ve.Range=0,ve.Stream=null,ve._cache=0,ve._cacheSize=0,ve._position=Ae;var Xe;ve=pe.prototype=new c,ve.getClass$=oe,ve.typeId$=0,ve.c=null,ve.d=null;var Ye=Da("java.lang.","Object"),Ze=Da("java.lang.","Throwable"),$e=Da("java.lang.","Exception"),_e=Da("java.lang.","RuntimeException"),af=Da("com.google.gwt.core.client.","JavaScriptException"),bf=Da("com.google.gwt.core.client.","JavaScriptObject$"),cf=Ca("","[[D"),df=Da("java.io.","InputStream"),ef=Da("java.io.","ByteArrayInputStream"),ff=Ca("","[B"),gf=Da("java.io.","OutputStream"),hf=Da("java.io.","ByteArrayOutputStream"),jf=Da("java.io.","IOException"),kf=Da("java.lang.","Enum"),lf=Da("java.lang.","ArithmeticException"),mf=Da("java.lang.","ArrayStoreException"),nf=Ca("","[C"),of=Da("java.lang.","Class"),pf=Da("java.lang.","ClassCastException"),qf=Da("java.lang.","IllegalArgumentException"),rf=Da("java.lang.","IllegalStateException"),sf=Da("java.lang.","IndexOutOfBoundsException"),tf=Ca("","[I"),uf=Da("java.lang.","NullPointerException"),vf=Da("java.lang.","String"),wf=Da("java.lang.","StringBuilder"),xf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZ.","InWindow"),yf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZ.","BinTree"),zf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZ.","OutWindow"),Af=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Chunker"),Bf=Ca("","[S"),Cf=Ca("[Lorg.dellroad.lzma.client.SevenZip.Compression.RangeCoder.","BitTreeDecoder;"),Df=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Decoder"),Ef=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Decoder$LenDecoder"),Ff=Ca("[Lorg.dellroad.lzma.client.SevenZip.Compression.LZMA.","Decoder$LiteralDecoder$Decoder2;"),Gf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Decoder$LiteralDecoder"),Hf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Decoder$LiteralDecoder$Decoder2"),If=Ca("[Lorg.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder$Optimal;"),Jf=Ca("[Lorg.dellroad.lzma.client.SevenZip.Compression.RangeCoder.","BitTreeEncoder;"),Kf=Ca("","[J"),Lf=Ca("","[Z"),Mf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder"),Nf=Ca("[Lorg.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder$LiteralEncoder$Encoder2;"),Of=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder$LiteralEncoder"),Pf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder$LiteralEncoder$Encoder2"),Qf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder$LenEncoder"),Rf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder$LenPriceTableEncoder"),Sf=Da("org.dellroad.lzma.client.SevenZip.Compression.LZMA.","Encoder$Optimal"),Tf=Da("org.dellroad.lzma.client.SevenZip.Compression.RangeCoder.","BitTreeDecoder"),Uf=Da("org.dellroad.lzma.client.SevenZip.Compression.RangeCoder.","BitTreeEncoder"),Vf=Da("org.dellroad.lzma.client.SevenZip.Compression.RangeCoder.","Decoder"),Wf=Da("org.dellroad.lzma.client.SevenZip.Compression.RangeCoder.","Encoder"),Xf=Ea("org.dellroad.lzma.client.","CompressionMode"),Yf=Da("org.dellroad.lzma.client.","LZMACompressor"),Zf=Da("org.dellroad.lzma.client.","LZMAByteArrayCompressor"),$f=Da("org.dellroad.lzma.client.","LZMADecompressor"),_f=Da("org.dellroad.lzma.client.","LZMAByteArrayDecompressor"),ag=Da("org.dellroad.lzma.demo.client.","LZMADemo");re(function(){},"lzma_demo","");var bg=function(){function a(a){return!isNaN(parseFloat(a))&&isFinite(a)}var b=[{dictionarySize:16,fb:64,matchFinder:0,lc:3,lp:0,pb:2},{dictionarySize:20,fb:64,matchFinder:0,lc:3,lp:0,pb:2},{dictionarySize:19,fb:64,matchFinder:1,lc:3,lp:0,pb:2},{dictionarySize:20,fb:64,matchFinder:1,lc:3,lp:0,pb:2},{dictionarySize:21,fb:128,matchFinder:1,lc:3,lp:0,pb:2},{dictionarySize:22,fb:128,matchFinder:1,lc:3,lp:0,pb:2},{dictionarySize:23,fb:128,matchFinder:1,lc:3,lp:0,pb:2},{dictionarySize:24,fb:255,matchFinder:1,lc:3,lp:0,pb:2},{dictionarySize:25,fb:255,matchFinder:1,lc:3,lp:0,pb:2}];return function(c){return a(c)?1>c?c=1:c>9&&(c=9):c=1,b[c-1]}}();return{compress:me,decompress:ne}}();this.LZMA=LZMA;var CSS_PROP_BIT_QUANTITY=1,CSS_PROP_BIT_HASH_VALUE=2,CSS_PROP_BIT_NEGATIVE_QUANTITY=4,CSS_PROP_BIT_QSTRING=8,CSS_PROP_BIT_URL=16,CSS_PROP_BIT_UNRESERVED_WORD=64,CSS_PROP_BIT_UNICODE_RANGE=128,CSS_PROP_BIT_GLOBAL_NAME=512,CSS_PROP_BIT_PROPERTY_NAME=1024,cssSchema=function(){var a=[["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","transparent","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],["all-scroll","col-resize","crosshair","default","e-resize","hand","help","move","n-resize","ne-resize","no-drop","not-allowed","nw-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait"],["armenian","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","square","upper-alpha","upper-latin","upper-roman"],["100","200","300","400","500","600","700","800","900","bold","bolder","lighter"],["block-level","inline-level","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"],["condensed","expanded","extra-condensed","extra-expanded","narrower","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded","wider"],["inherit","inline","inline-block","inline-box","inline-flex","inline-grid","inline-list-item","inline-stack","inline-table","run-in"],["behind","center-left","center-right","far-left","far-right","left-side","leftwards","right-side","rightwards"],["large","larger","small","smaller","x-large","x-small","xx-large","xx-small"],["dashed","dotted","double","groove","outset","ridge","solid"],["ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start"],["at","closest-corner","closest-side","ellipse","farthest-corner","farthest-side"],["baseline","middle","sub","super","text-bottom","text-top"],["caption","icon","menu","message-box","small-caption","status-bar"],["fast","faster","slow","slower","x-fast","x-slow"],["above","below","higher","level","lower"],["cursive","fantasy","monospace","sans-serif","serif"],["loud","silent","soft","x-loud","x-soft"],["no-repeat","repeat-x","repeat-y","round","space"],["blink","line-through","overline","underline"],["block","flex","grid","table"],["high","low","x-high","x-low"],["nowrap","pre","pre-line","pre-wrap"],["absolute","relative","static"],["alternate","alternate-reverse","reverse"],["border-box","content-box","padding-box"],["capitalize","lowercase","uppercase"],["child","female","male"],["=","opacity"],["backwards","forwards"],["bidi-override","embed"],["bottom","top"],["break-all","keep-all"],["clip","ellipsis"],["contain","cover"],["continuous","digits"],["end","start"],["flat","preserve-3d"],["hide","show"],["horizontal","vertical"],["inside","outside"],["italic","oblique"],["left","right"],["ltr","rtl"],["no-content","no-display"],["paused","running"],["suppress","unrestricted"],["thick","thin"],[","],["/"],["all"],["always"],["auto"],["avoid"],["both"],["break-word"],["center"],["circle"],["code"],["collapse"],["contents"],["fixed"],["hidden"],["infinite"],["inset"],["invert"],["justify"],["list-item"],["local"],["medium"],["mix"],["none"],["normal"],["once"],["repeat"],["scroll"],["separate"],["small-caps"],["spell-out"],["to"],["visible"]],b={animation:{cssPropBits:517,cssLitGroup:[a[10],a[24],a[29],a[45],a[48],a[54],a[63],a[71],a[72]],cssFns:["cubic-bezier()","steps()"]},"animation-delay":{cssPropBits:5,cssLitGroup:[a[48]],cssFns:[]},"animation-direction":{cssPropBits:0,cssLitGroup:[a[24],a[48],a[72]],cssFns:[]},"animation-duration":"animation-delay","animation-fill-mode":{cssPropBits:0,cssLitGroup:[a[29],a[48],a[54],a[71]],cssFns:[]},"animation-iteration-count":{cssPropBits:5,cssLitGroup:[a[48],a[63]],cssFns:[]},"animation-name":{cssPropBits:512,cssLitGroup:[a[48],a[71]],cssFns:[]},"animation-play-state":{cssPropBits:0,cssLitGroup:[a[45],a[48]],cssFns:[]},"animation-timing-function":{cssPropBits:0,cssLitGroup:[a[10],a[48]],cssFns:["cubic-bezier()","steps()"]},appearance:{cssPropBits:0,cssLitGroup:[a[71]],cssFns:[]},azimuth:{cssPropBits:5,cssLitGroup:[a[7],a[42],a[56]],cssFns:[]},"backface-visibility":{cssPropBits:0,cssLitGroup:[a[59],a[62],a[80]],cssFns:[]},background:{cssPropBits:23,cssLitGroup:[a[0],a[18],a[25],a[31],a[34],a[42],a[48],a[49],a[52],a[56],a[61],a[68],a[71],a[74],a[75]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","rgb()","rgba()"]},"background-attachment":{cssPropBits:0,cssLitGroup:[a[48],a[61],a[68],a[75]],cssFns:[]},"background-color":{cssPropBits:2,cssLitGroup:[a[0]],cssFns:["rgb()","rgba()"]},"background-image":{cssPropBits:16,cssLitGroup:[a[48],a[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"background-position":{cssPropBits:5,cssLitGroup:[a[31],a[42],a[48],a[56]],cssFns:[]},"background-repeat":{cssPropBits:0,cssLitGroup:[a[18],a[48],a[74]],cssFns:[]},"background-size":{cssPropBits:5,cssLitGroup:[a[34],a[48],a[52]],cssFns:[]},border:{cssPropBits:7,cssLitGroup:[a[0],a[9],a[47],a[62],a[64],a[69],a[71]],cssFns:["rgb()","rgba()"]},"border-bottom":"border","border-bottom-color":"background-color","border-bottom-left-radius":{cssPropBits:5,cssFns:[]},"border-bottom-right-radius":"border-bottom-left-radius","border-bottom-style":{cssPropBits:0,cssLitGroup:[a[9],a[62],a[64],a[71]],cssFns:[]},"border-bottom-width":{cssPropBits:5,cssLitGroup:[a[47],a[69]],cssFns:[]},"border-collapse":{cssPropBits:0,cssLitGroup:[a[59],a[76]],cssFns:[]},"border-color":"background-color","border-left":"border","border-left-color":"background-color","border-left-style":"border-bottom-style","border-left-width":"border-bottom-width","border-radius":{cssPropBits:5,cssLitGroup:[a[49]],cssFns:[]},"border-right":"border","border-right-color":"background-color","border-right-style":"border-bottom-style","border-right-width":"border-bottom-width","border-spacing":"border-bottom-left-radius","border-style":"border-bottom-style","border-top":"border","border-top-color":"background-color","border-top-left-radius":"border-bottom-left-radius","border-top-right-radius":"border-bottom-left-radius","border-top-style":"border-bottom-style","border-top-width":"border-bottom-width","border-width":"border-bottom-width",bottom:{cssPropBits:5,cssLitGroup:[a[52]],cssFns:[]},box:{cssPropBits:0,cssLitGroup:[a[60],a[71],a[72]],cssFns:[]},"box-shadow":{cssPropBits:7,cssLitGroup:[a[0],a[48],a[64],a[71]],cssFns:["rgb()","rgba()"]},"box-sizing":{cssPropBits:0,cssLitGroup:[a[25]],cssFns:[]},"caption-side":{cssPropBits:0,cssLitGroup:[a[31]],cssFns:[]},clear:{cssPropBits:0,cssLitGroup:[a[42],a[54],a[71]],cssFns:[]},clip:{cssPropBits:0,cssLitGroup:[a[52]],cssFns:["rect()"]},color:"background-color",content:{cssPropBits:8,cssLitGroup:[a[71],a[72]],cssFns:[]},cue:{cssPropBits:16,cssLitGroup:[a[71]],cssFns:[]},"cue-after":"cue","cue-before":"cue",cursor:{cssPropBits:16,cssLitGroup:[a[1],a[48],a[52]],cssFns:[]},direction:{cssPropBits:0,cssLitGroup:[a[43]],cssFns:[]},display:{cssPropBits:0,cssLitGroup:[a[4],a[6],a[20],a[52],a[67],a[71]],cssFns:[]},"display-extras":{cssPropBits:0,cssLitGroup:[a[67],a[71]],cssFns:[]},"display-inside":{cssPropBits:0,cssLitGroup:[a[20],a[52]],cssFns:[]},"display-outside":{cssPropBits:0,cssLitGroup:[a[4],a[71]],cssFns:[]},elevation:{cssPropBits:5,cssLitGroup:[a[15]],cssFns:[]},"empty-cells":{cssPropBits:0,cssLitGroup:[a[38]],cssFns:[]},filter:{cssPropBits:0,cssFns:["alpha()"]},"float":{cssPropBits:0,cssLitGroup:[a[42],a[71]],cssFns:[]},font:{cssPropBits:73,cssLitGroup:[a[3],a[8],a[13],a[16],a[41],a[48],a[49],a[69],a[72],a[77]],cssFns:[]},"font-family":{cssPropBits:72,cssLitGroup:[a[16],a[48]],cssFns:[]},"font-size":{cssPropBits:1,cssLitGroup:[a[8],a[69]],cssFns:[]},"font-stretch":{cssPropBits:0,cssLitGroup:[a[5],a[72]],cssFns:[]},"font-style":{cssPropBits:0,cssLitGroup:[a[41],a[72]],cssFns:[]},"font-variant":{cssPropBits:0,cssLitGroup:[a[72],a[77]],cssFns:[]},"font-weight":{cssPropBits:0,cssLitGroup:[a[3],a[72]],cssFns:[]},height:"bottom",left:"bottom","letter-spacing":{cssPropBits:5,cssLitGroup:[a[72]],cssFns:[]},"line-height":{cssPropBits:1,cssLitGroup:[a[72]],cssFns:[]},"list-style":{cssPropBits:16,cssLitGroup:[a[2],a[40],a[57],a[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-image":{cssPropBits:16,cssLitGroup:[a[71]],cssFns:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"list-style-position":{cssPropBits:0,cssLitGroup:[a[40]],cssFns:[]},"list-style-type":{cssPropBits:0,cssLitGroup:[a[2],a[57],a[71]],cssFns:[]},margin:"bottom","margin-bottom":"bottom","margin-left":"bottom","margin-right":"bottom","margin-top":"bottom","max-height":{cssPropBits:1,cssLitGroup:[a[52],a[71]],cssFns:[]},"max-width":"max-height","min-height":{cssPropBits:1,cssLitGroup:[a[52]],cssFns:[]},"min-width":"min-height",opacity:{cssPropBits:1,cssFns:[]},outline:{cssPropBits:7,cssLitGroup:[a[0],a[9],a[47],a[62],a[64],a[65],a[69],a[71]],cssFns:["rgb()","rgba()"]},"outline-color":{cssPropBits:2,cssLitGroup:[a[0],a[65]],cssFns:["rgb()","rgba()"]},"outline-style":"border-bottom-style","outline-width":"border-bottom-width",overflow:{cssPropBits:0,cssLitGroup:[a[52],a[62],a[75],a[80]],cssFns:[]},"overflow-wrap":{cssPropBits:0,cssLitGroup:[a[55],a[72]],cssFns:[]},"overflow-x":{cssPropBits:0,cssLitGroup:[a[44],a[52],a[62],a[75],a[80]],cssFns:[]},"overflow-y":"overflow-x",padding:"opacity","padding-bottom":"opacity", +"padding-left":"opacity","padding-right":"opacity","padding-top":"opacity","page-break-after":{cssPropBits:0,cssLitGroup:[a[42],a[51],a[52],a[53]],cssFns:[]},"page-break-before":"page-break-after","page-break-inside":{cssPropBits:0,cssLitGroup:[a[52],a[53]],cssFns:[]},pause:"border-bottom-left-radius","pause-after":"border-bottom-left-radius","pause-before":"border-bottom-left-radius",perspective:{cssPropBits:5,cssLitGroup:[a[71]],cssFns:[]},"perspective-origin":{cssPropBits:5,cssLitGroup:[a[31],a[42],a[56]],cssFns:[]},pitch:{cssPropBits:5,cssLitGroup:[a[21],a[69]],cssFns:[]},"pitch-range":"border-bottom-left-radius","play-during":{cssPropBits:16,cssLitGroup:[a[52],a[70],a[71],a[74]],cssFns:[]},position:{cssPropBits:0,cssLitGroup:[a[23]],cssFns:[]},quotes:{cssPropBits:8,cssLitGroup:[a[71]],cssFns:[]},resize:{cssPropBits:0,cssLitGroup:[a[39],a[54],a[71]],cssFns:[]},richness:"border-bottom-left-radius",right:"bottom",speak:{cssPropBits:0,cssLitGroup:[a[71],a[72],a[78]],cssFns:[]},"speak-header":{cssPropBits:0,cssLitGroup:[a[51],a[73]],cssFns:[]},"speak-numeral":{cssPropBits:0,cssLitGroup:[a[35]],cssFns:[]},"speak-punctuation":{cssPropBits:0,cssLitGroup:[a[58],a[71]],cssFns:[]},"speech-rate":{cssPropBits:5,cssLitGroup:[a[14],a[69]],cssFns:[]},stress:"border-bottom-left-radius","table-layout":{cssPropBits:0,cssLitGroup:[a[52],a[61]],cssFns:[]},"text-align":{cssPropBits:0,cssLitGroup:[a[42],a[56],a[66]],cssFns:[]},"text-decoration":{cssPropBits:0,cssLitGroup:[a[19],a[71]],cssFns:[]},"text-indent":"border-bottom-left-radius","text-overflow":{cssPropBits:8,cssLitGroup:[a[33]],cssFns:[]},"text-shadow":"box-shadow","text-transform":{cssPropBits:0,cssLitGroup:[a[26],a[71]],cssFns:[]},"text-wrap":{cssPropBits:0,cssLitGroup:[a[46],a[71],a[72]],cssFns:[]},top:"bottom",transform:{cssPropBits:0,cssLitGroup:[a[71]],cssFns:["matrix()","perspective()","rotate()","rotate3d()","rotatex()","rotatey()","rotatez()","scale()","scale3d()","scalex()","scaley()","scalez()","skew()","skewx()","skewy()","translate()","translate3d()","translatex()","translatey()","translatez()"]},"transform-origin":"perspective-origin","transform-style":{cssPropBits:0,cssLitGroup:[a[37]],cssFns:[]},transition:{cssPropBits:1029,cssLitGroup:[a[10],a[48],a[50],a[71]],cssFns:["cubic-bezier()","steps()"]},"transition-delay":"animation-delay","transition-duration":"animation-delay","transition-property":{cssPropBits:1024,cssLitGroup:[a[48],a[50]],cssFns:[]},"transition-timing-function":"animation-timing-function","unicode-bidi":{cssPropBits:0,cssLitGroup:[a[30],a[72]],cssFns:[]},"vertical-align":{cssPropBits:5,cssLitGroup:[a[12],a[31]],cssFns:[]},visibility:"backface-visibility","voice-family":{cssPropBits:8,cssLitGroup:[a[27],a[48]],cssFns:[]},volume:{cssPropBits:1,cssLitGroup:[a[17],a[69]],cssFns:[]},"white-space":{cssPropBits:0,cssLitGroup:[a[22],a[72]],cssFns:[]},width:"min-height","word-break":{cssPropBits:0,cssLitGroup:[a[32],a[72]],cssFns:[]},"word-spacing":"letter-spacing","word-wrap":"overflow-wrap","z-index":"bottom",zoom:"line-height","cubic-bezier()":"animation-delay","steps()":{cssPropBits:5,cssLitGroup:[a[36],a[48]],cssFns:[]},"image()":{cssPropBits:18,cssLitGroup:[a[0],a[48]],cssFns:["rgb()","rgba()"]},"linear-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[31],a[42],a[48],a[79]],cssFns:["rgb()","rgba()"]},"radial-gradient()":{cssPropBits:7,cssLitGroup:[a[0],a[11],a[31],a[42],a[48],a[56],a[57]],cssFns:["rgb()","rgba()"]},"repeating-linear-gradient()":"linear-gradient()","repeating-radial-gradient()":"radial-gradient()","rgb()":{cssPropBits:1,cssLitGroup:[a[48]],cssFns:[]},"rgba()":"rgb()","rect()":{cssPropBits:5,cssLitGroup:[a[48],a[52]],cssFns:[]},"alpha()":{cssPropBits:1,cssLitGroup:[a[28]],cssFns:[]},"matrix()":"animation-delay","perspective()":"border-bottom-left-radius","rotate()":"border-bottom-left-radius","rotate3d()":"animation-delay","rotatex()":"border-bottom-left-radius","rotatey()":"border-bottom-left-radius","rotatez()":"border-bottom-left-radius","scale()":"animation-delay","scale3d()":"animation-delay","scalex()":"border-bottom-left-radius","scaley()":"border-bottom-left-radius","scalez()":"border-bottom-left-radius","skew()":"animation-delay","skewx()":"border-bottom-left-radius","skewy()":"border-bottom-left-radius","translate()":"animation-delay","translate3d()":"animation-delay","translatex()":"border-bottom-left-radius","translatey()":"border-bottom-left-radius","translatez()":"border-bottom-left-radius"};for(var c in b)"string"==typeof b[c]&&Object.hasOwnProperty.call(b,c)&&(b[c]=b[b[c]]);return b}();"undefined"!=typeof window&&(window.cssSchema=cssSchema);var lexCss,decodeCss;!function(){function a(a){var b=parseInt(a.substring(1),16);return b>65535?(b-=65536,String.fromCharCode(55296+(b>>10),56320+(1023&b))):b==b?String.fromCharCode(b):a[1]<" "?"":a[1]}function b(a,b){return'"'+a.replace(/[\u0000-\u001f\\\"<>]/g,b)+'"'}function c(a){return e[a]||(e[a]="\\"+a.charCodeAt(0).toString(16)+" ")}function d(a){return f[a]||(f[a]=("">a?"%0":"%")+a.charCodeAt(0).toString(16))}var e={"\\":"\\\\"},f={"\\":"%5c"},g="[\\t\\n\\f ]",h=g+"*",i="[\\n\\f]",j="[\\ud800-\\udbff][\\udc00-\\udfff]",k="[\\u0080-\\ud7ff\\ue000-\\ufffd]|"+j,l="[0-9a-fA-F]{1,6}"+g+"?",m="(?:"+l+"|[\\u0020-\\u007e\\u0080-\\ud7ff\\ue000\\ufffd]|"+j+")",n="\\\\"+m,o="(?:[\\t\\x21\\x23-\\x26\\x28-\\x5b\\x5d-\\x7e]|"+k+"|"+n+")",p="[^'\"\\n\\f\\\\]|\\\\[\\s\\S]",q="\"(?:'|"+p+')*"|\'(?:"|'+p+")*'",r="[-+]?(?:[0-9]+(?:[.][0-9]+)?|[.][0-9]+)",s="(?:[a-zA-Z_]|"+k+"|"+n+")",t="(?:[a-zA-Z0-9_-]|"+k+"|"+n+")",u="-?"+s+t+"*",v="(?:@?-?"+s+"|#)"+t+"*",w=r+"(?:%|"+u+")?",x="url[(]"+h+"(?:"+q+"|"+o+"*)"+h+"[)]",y="U[+][0-9A-F?]{1,6}(?:-[0-9A-F]{1,6})?",z="",B=g+"+",C="/(?:[*][^*]*[*]+(?:[^/][^*]*[*]+)*/|/[^\\n\\f]*)",D="(?!url[(])"+u+"[(]",E="[~|^$*]=",F="[^\"'\\\\/]|/(?![/*])",G="\\uFEFF",H=new RegExp([G,y,x,D,v,q,w,z,A,B,C,E,F].join("|"),"gi"),I=new RegExp("\\\\(?:"+m+"|"+i+")","g"),J=new RegExp("^url\\("+h+"[\"']?|[\"']?"+h+"\\)$","gi");decodeCss=function(b){return b.replace(I,a)},lexCss=function(a){a=("ï¿¿"+a).replace(/^\uffff/,""),a=a.replace(/\r\n?/g,"\n");for(var e=a.match(H)||[],f=0,g=" ",h=0,i=e.length;i>h;++h){var j=decodeCss(e[h]),k=j.length,l=j.charCodeAt(0);j=l=='"'.charCodeAt(0)||l=="'".charCodeAt(0)?b(j.substring(1,k-1),c):l=="/".charCodeAt(0)&&k>1||"\\"==j||j==A||j==z||"\ufeff"==j||l<=" ".charCodeAt(0)?" ":/url\(/i.test(j)?"url("+b(j.replace(J,""),d)+")":j,(g!=j||" "!=j)&&(e[f++]=g=j)}return e.length=f,e}}(),"undefined"!=typeof window&&(window.lexCss=lexCss,window.decodeCss=decodeCss);var URI=function(){function a(a){var b=(""+a).match(n);return b?new i(j(b[1]),j(b[2]),j(b[3]),j(b[4]),j(b[5]),j(b[6]),j(b[7])):null}function b(a,b,f,g,h,j,k){var l=new i(d(a,o),d(b,o),c(f),g>0?g.toString():null,d(h,p),null,c(k));return j&&("string"==typeof j?l.setRawQuery(j.replace(/[^?&=0-9A-Za-z_\-~.%]/g,e)):l.setAllParameters(j)),l}function c(a){return"string"==typeof a?encodeURIComponent(a):null}function d(a,b){return"string"==typeof a?encodeURI(a).replace(b,e):null}function e(a){var b=a.charCodeAt(0);return"%"+"0123456789ABCDEF".charAt(b>>4&15)+"0123456789ABCDEF".charAt(15&b)}function f(a){return a.replace(/(^|\/)\.(?:\/|$)/g,"$1").replace(/\/{2,}/g,"/")}function g(a){if(null===a)return null;for(var b,c=f(a),d=l;(b=c.replace(d,"$1"))!=c;c=b);return c}function h(a,b){var c=a.clone(),d=b.hasScheme();d?c.setRawScheme(b.getRawScheme()):d=b.hasCredentials(),d?c.setRawCredentials(b.getRawCredentials()):d=b.hasDomain(),d?c.setRawDomain(b.getRawDomain()):d=b.hasPort();var e=b.getRawPath(),f=g(e);if(d)c.setPort(b.getPort()),f=f&&f.replace(m,"");else if(d=!!e){if(47!==f.charCodeAt(0)){var h=g(c.getRawPath()||"").replace(m,""),i=h.lastIndexOf("/")+1;f=g((i?h.substring(0,i):"")+g(e)).replace(m,"")}}else f=f&&f.replace(m,""),f!==e&&c.setRawPath(f);return d?c.setRawPath(f):d=b.hasQuery(),d?c.setRawQuery(b.getRawQuery()):d=b.hasFragment(),d&&c.setRawFragment(b.getRawFragment()),c}function i(a,b,c,d,e,f,g){this.scheme_=a,this.credentials_=b,this.domain_=c,this.port_=d,this.path_=e,this.query_=f,this.fragment_=g,this.paramCache_=null}function j(a){return"string"==typeof a&&a.length>0?a:null}var k=new RegExp("(/|^)(?:[^./][^/]*|\\.{2,}(?:[^./][^/]*)|\\.{3,}[^/]*)/\\.\\.(?:/|$)"),l=new RegExp(k),m=/^(?:\.\.\/)*(?:\.\.$)?/;i.prototype.toString=function(){var a=[];return null!==this.scheme_&&a.push(this.scheme_,":"),null!==this.domain_&&(a.push("//"),null!==this.credentials_&&a.push(this.credentials_,"@"),a.push(this.domain_),null!==this.port_&&a.push(":",this.port_.toString())),null!==this.path_&&a.push(this.path_),null!==this.query_&&a.push("?",this.query_),null!==this.fragment_&&a.push("#",this.fragment_),a.join("")},i.prototype.clone=function(){return new i(this.scheme_,this.credentials_,this.domain_,this.port_,this.path_,this.query_,this.fragment_)},i.prototype.getScheme=function(){return this.scheme_&&decodeURIComponent(this.scheme_).toLowerCase()},i.prototype.getRawScheme=function(){return this.scheme_},i.prototype.setScheme=function(a){return this.scheme_=d(a,o),this},i.prototype.setRawScheme=function(a){return this.scheme_=a?a:null,this},i.prototype.hasScheme=function(){return null!==this.scheme_},i.prototype.getCredentials=function(){return this.credentials_&&decodeURIComponent(this.credentials_)},i.prototype.getRawCredentials=function(){return this.credentials_},i.prototype.setCredentials=function(a){return this.credentials_=d(a,o),this},i.prototype.setRawCredentials=function(a){return this.credentials_=a?a:null,this},i.prototype.hasCredentials=function(){return null!==this.credentials_},i.prototype.getDomain=function(){return this.domain_&&decodeURIComponent(this.domain_)},i.prototype.getRawDomain=function(){return this.domain_},i.prototype.setDomain=function(a){return this.setRawDomain(a&&encodeURIComponent(a))},i.prototype.setRawDomain=function(a){return this.domain_=a?a:null,this.setRawPath(this.path_)},i.prototype.hasDomain=function(){return null!==this.domain_},i.prototype.getPort=function(){return this.port_&&decodeURIComponent(this.port_)},i.prototype.setPort=function(a){if(a){if(a=Number(a),a!==(65535&a))throw new Error("Bad port number "+a);this.port_=""+a}else this.port_=null;return this},i.prototype.hasPort=function(){return null!==this.port_},i.prototype.getPath=function(){return this.path_&&decodeURIComponent(this.path_)},i.prototype.getRawPath=function(){return this.path_},i.prototype.setPath=function(a){return this.setRawPath(d(a,p))},i.prototype.setRawPath=function(a){return a?(a=String(a),this.path_=!this.domain_||/^\//.test(a)?a:"/"+a):this.path_=null,this},i.prototype.hasPath=function(){return null!==this.path_},i.prototype.getQuery=function(){return this.query_&&decodeURIComponent(this.query_).replace(/\+/g," ")},i.prototype.getRawQuery=function(){return this.query_},i.prototype.setQuery=function(a){return this.paramCache_=null,this.query_=c(a),this},i.prototype.setRawQuery=function(a){return this.paramCache_=null,this.query_=a?a:null,this},i.prototype.hasQuery=function(){return null!==this.query_},i.prototype.setAllParameters=function(a){if("object"==typeof a&&!(a instanceof Array)&&(a instanceof Object||"[object Array]"!==Object.prototype.toString.call(a))){var b=[],c=-1;for(var d in a){var e=a[d];"string"==typeof e&&(b[++c]=d,b[++c]=e)}a=b}this.paramCache_=null;for(var f=[],g="",h=0;h]/g,h={"\n":"%0a","\f":"%0c","\r":"%0d",'"':"%22","'":"%27","(":"%28",")":"%29","*":"%2a","<":"%3c",">":"%3e"},i=new RegExp("^(?:([^:/?# ]+):)?"),j=/^(?:https?|mailto)$/i;sanitizeCssProperty=function(){function b(a){for(var b={},c=a.length;--c>=0;)for(var d=a[c],e=d.length;--e>=0;)b[d[e]]=g;return b}var g={};return function h(i,j,k,l,m){function n(a,b){for(var c=1,d=b+1,f=a.length;f>d&&c;){var g=a[d++];c+=")"===g?-1:/^[^"']*\($/.test(g)}if(!c)for(var i=a[b].toLowerCase(),j=e(i),m=a.splice(b,d-b,""),n=p.cssFns,o=0,q=n.length;q>o;++o)if(n[o].substring(0,j.length)==j)return m[0]=m[m.length-1]="",h(n[o],m,k,l),i+m.join(" ")+")";return""}var o=e(i),p=cssSchema[o];if(!p||"object"!=typeof p)return void(j.length=0);for(var q=p.cssPropBits,r=q&(CSS_PROP_BIT_URL|CSS_PROP_BIT_UNRESERVED_WORD),s=q&(CSS_PROP_BIT_GLOBAL_NAME|CSS_PROP_BIT_PROPERTY_NAME),t=NaN,u=0,v=0;u"]=l["+"]=l["~"]=l,sanitizeCssSelectorList=function(a,b,c){function d(d,e){function f(c,d,e){var f,g,j,l,n,o=!0;if(f="",d>c)if(n=a[c],"*"===n)++c,f=n;else if(/^[a-zA-Z]/.test(n)){var p=i(n.toLowerCase(),[]);p&&("tagName"in p&&(n=p.tagName),++c,f=n)}for(g="",j="",l="";o&&d>c;++c)if(n=a[c],"#"===n.charAt(0))/^#_|__$|[^\w#:\-]/.test(n)?o=!1:g+=n+h;else if("."===n)++cc+1&&"["===a[c]){++c;var q=a[c++].toLowerCase(),r=html4.ATTRIBS[f+"::"+q];r!==+r&&(r=html4.ATTRIBS["*::"+q]);var s;b.virtualizeAttrName?(s=b.virtualizeAttrName(f,q),"string"!=typeof s&&(o=!1,s=q),o&&r!==+r&&(r=html4.atype.NONE)):(s=q,r!==+r&&(o=!1));var t="",u="",v=!1;switch(/^[~^$*|]?=$/.test(a[c])&&(t=a[c++],u=a[c++],/^[0-9A-Za-z:_\-]+$/.test(u)?u='"'+u+'"':"]"===u&&(u='""',--c),/^"([^\"\\]|\\.)*"$/.test(u)||(o=!1),v="i"===a[c],v&&++c),"]"!==a[c]&&(++c,o=!1),r){case html4.atype.CLASSES:case html4.atype.LOCAL_NAME:case html4.atype.NONE:break;case html4.atype.GLOBAL_NAME:case html4.atype.ID:case html4.atype.IDREF:"="!==t&&"~="!==t&&"$="!==t||'""'==u||v?"|="===t||""===t||(o=!1):u='"'+u.substring(1,u.length-1)+h+'"';break;case html4.atype.URI:case html4.atype.URI_FRAGMENT:""!==t&&(o=!1);break;default:o=!1}o&&(j+="["+s.replace(/[^\w-]/g,"\\$&")+t+u+(v?" i]":"]"))}else{if(!(d>c&&":"===a[c]))break;if(n=a[++c],!k.test(n))break;l+=":"+n}if(c!==d&&(o=!1),o){var w=(f+g).replace(/[^ .*#\w-]/g,"\\$&")+j+l+e;w&&m.push(w)}return o}" "===a[d]&&++d,e-1!==d&&" "===a[e]&&--e;for(var m=[],n=d,o=!0,p=d;o&&e>p;++p){var q=a[p];(l[q]===l||" "===q)&&(f(n,p,q)?n=p+1:o=!1)}if(f(n,e,"")||(o=!1),o){if(m.length){var r=m.join("");null!==g&&(r="."+g+" "+r),j.push(r)}return!0}return!c||c(a.slice(d,e))}var e,f,g=b.containerClass,h=b.idSuffix,i=b.tagPolicy,j=[],m=0,n=0;for(e=0;ee;++e)if(","===a[e]){if(!d(p,e))return null;p=e+1}return d(p,o)?j:null},function(){var a="(?:all|aural|braille|embossed|handheld|print|projection|screen|speech|tty|tv)",b="(?:(?:min-|max-)?(?:(?:device-)?(?:aspect-ratio|height|width)|color(?:-index)?|monochrome|orientation|resolution)|grid|hover|luminosity|pointer|scan|script)",c="(?:p[cxt]|[cem]m|in|dpi|dppx|dpcm|%)",d="-?(?:[a-z]\\w+(?:-\\w+)*|\\d+(?: / \\d+|(?:\\.\\d+)?"+c+"?))",e="\\( "+b+" (?:: "+d+" )?\\)",f="(?:(?:(?:(?:only|not) )?"+a+"|"+e+")(?: and ?"+e+")*)",g=/^\w/,h=new RegExp("^"+f+"(?: , "+f+")*$","i");sanitizeMediaQuery=function(a){a=a.slice();for(var b=a.length,c=0,d=0;b>d;++d){var e=a[d];" "!=e&&(a[c++]=e)}a.length=c;var f=a.join(" ");return f=f.length?h.test(f)?g.test(f)?f:"not all , "+f:"not all":""}}(),function(){function a(a){var b,c=/^\s*["]([^"]*)["]\s*$/,d=/^\s*[']([^']*)[']\s*$/,e=/^\s*url\s*[(]["]([^"]*)["][)]\s*$/,f=/^\s*url\s*[(][']([^']*)['][)]\s*$/,g=/^\s*url\s*[(]([^)]*)[)]\s*$/;return(b=c.exec(a))?b[1]:(b=d.exec(a))?b[1]:(b=e.exec(a))?b[1]:(b=f.exec(a))?b[1]:(b=g.exec(a))?b[1]:null}function b(e,f,g,h,i,j,k){function l(){p=o.length&&null===o[o.length-1]}var m=void 0,n=k||[0],o=[],p=!1;return parseCssStylesheet(f,{startStylesheet:function(){m=[]},endStylesheet:function(){},startAtrule:function(f,k){if(p)f=null;else if("@media"===f)m.push("@media"," ",sanitizeMediaQuery(k));else if("@keyframes"===f||"@-webkit-keyframes"===f){var l=k[0];1!==k.length||/__$|[^\w\-]/.test(l)?f=null:(m.push(f," ",l+g.idSuffix),f="@keyframes")}else if("@import"===f&&k.length>0)if(f=null,"function"==typeof j){var q=sanitizeMediaQuery(k.slice(1));if("not all"!==q){++n[0];var r=[];m.push(r);var s=d(c(e,a(k[0])),function(a){var c=b(s,a.html,g,h,i,j,n);--n[0];var d=q?{toString:function(){return"@media "+q+" {"+c.result+"}"}}:c.result;r[0]=d,j(d,!!n[0])},i)}}else window.console&&window.console.log("@import "+k.join(" ")+" elided");p=!f,o.push(f)},endAtrule:function(){o.pop(),p||m.push(";"),l()},startBlock:function(){p||m.push("{")},endBlock:function(){p||(m.push("}"),p=!0)},startRuleset:function(a){if(!p){var b=void 0;if("@keyframes"===o[o.length-1])b=a.join(" ").match(/^ *(?:from|to|\d+(?:\.\d+)?%) *(?:, *(?:from|to|\d+(?:\.\d+)?%) *)*$/i),p=!b,b&&(b=b[0].replace(/ +/g,""));else{var c=sanitizeCssSelectorList(a,g);c&&c.length?b=c.join(", "):p=!0}p||m.push(b,"{")}o.push(null)},endRuleset:function(){o.pop(),p||m.push("}"),l()},declaration:function(a,b){if(!p){var c=!1,d=b.length;d>=2&&"!"===b[d-2]&&"important"===b[d-1].toLowerCase()&&(c=!0,b.length-=2),sanitizeCssProperty(a,b,h,e,g.idSuffix),b.length&&m.push(a,":",b.join(" "),c?" !important;":";")}}}),{result:{toString:function(){return m.join("")}},moreToCome:!!n[0]}}sanitizeStylesheet=function(a,c,d,e){return b(a,c,d,e,void 0,void 0).result.toString()},sanitizeStylesheetWithExternals=function(a,c,d,e,f,g){return b(a,c,d,e,f,g)}}()}(),"undefined"!=typeof window&&(window.sanitizeCssProperty=sanitizeCssProperty,window.sanitizeCssSelectorList=sanitizeCssSelectorList,window.sanitizeStylesheet=sanitizeStylesheet,window.sanitizeMediaQuery=sanitizeMediaQuery),"i"!=="I".toLowerCase())throw"I/i problem";var parseCssStylesheet,parseCssDeclarations;!function(){function a(a,c,e,f){if(e>c){var g=a[c];return"@"===g.charAt(0)?b(a,c,e,f,!0):d(a,c,e,f)}return c}function b(a,b,d,e,f){for(var g=b++;d>b&&"{"!==a[b]&&";"!==a[b];)++b;if(d>b&&(f||";"===a[b])){var h=g+1,i=b;d>h&&" "===a[h]&&++h,i>h&&" "===a[i-1]&&--i,e.startAtrule&&e.startAtrule(a[g].toLowerCase(),a.slice(h,i)),b="{"===a[b]?c(a,b,d,e):b+1,e.endAtrule&&e.endAtrule()}return b}function c(a,e,f,g){for(++e,g.startBlock&&g.startBlock();f>e;){var h=a[e].charAt(0);if("}"==h){++e;break}" "===h||";"===h?e+=1:e="@"===h?b(a,e,f,g,!1):"{"===h?c(a,e,f,g):d(a,e,f,g)}return g.endBlock&&g.endBlock(),e}function d(a,b,c,d){var f=b,h=e(a,b,c,!0);if(0>h)return h=~h,h===f?h+1:h;var i=a[h];if("{"!==i)return h===f?h+1:h;for(b=h+1,h>f&&" "===a[h-1]&&--h,d.startRuleset&&d.startRuleset(a.slice(f,h));c>b;){if(i=a[b],"}"===i){++b;break}" "===i?b+=1:b=g(a,b,c,d)}return d.endRuleset&&d.endRuleset(),b}function e(a,b,c,d){for(var e,f=[],g=-1;c>b;++b)if(e=a[b].charAt(0),"["===e||"("===e)f[++g]=e;else if("]"===e&&"["===f[g]||")"===e&&"("===f[g])--g;else if("{"===e||"}"===e||";"===e||"@"===e||":"===e&&!d)break;return g>=0&&(b=~(b+1)),b}function f(a,b,c){for(;c>b&&";"!==a[b]&&"}"!==a[b];)++b;return c>b&&";"===a[b]?b+1:b}function g(a,b,c,d){var g=a[b++];if(!h.test(g))return f(a,b,c);var i;if(c>b&&" "===a[b]&&++b,b==c||":"!==a[b])return f(a,b,c);++b,c>b&&" "===a[b]&&++b;var j=b,k=e(a,b,c,!1);if(0>k)k=~k;else{for(var l=[],m=0,n=j;k>n;++n)i=a[n]," "!==i&&(l[m++]=i);if(c>k){do{if(i=a[k],";"===i||"}"===i)break;m=0}while(++ke;)e=" "===d[e]?e+1:a(d,e,f,c);c.endStylesheet&&c.endStylesheet()};var h=/^-?[a-z]/i;parseCssDeclarations=function(a,b){for(var c=lexCss(a),d=0,e=c.length;e>d;)d=" "!==c[d]?g(c,d,e,b):d+1}}(),"undefined"!=typeof window&&(window.parseCssStylesheet=parseCssStylesheet,window.parseCssDeclarations=parseCssDeclarations);var html4={};if(html4.atype={NONE:0,URI:1,URI_FRAGMENT:11,SCRIPT:2,STYLE:3,HTML:12,ID:4,IDREF:5,IDREFS:6,GLOBAL_NAME:7,LOCAL_NAME:8,CLASSES:9,FRAME_TARGET:10,MEDIA_QUERY:13},html4.atype=html4.atype,html4.ATTRIBS={"*::class":9,"*::dir":0,"*::draggable":0,"*::hidden":0,"*::id":4,"*::inert":0,"*::itemprop":0,"*::itemref":6,"*::itemscope":0,"*::lang":0,"*::onblur":2,"*::onchange":2,"*::onclick":2,"*::ondblclick":2,"*::onerror":2,"*::onfocus":2,"*::onkeydown":2,"*::onkeypress":2,"*::onkeyup":2,"*::onload":2,"*::onmousedown":2,"*::onmousemove":2,"*::onmouseout":2,"*::onmouseover":2,"*::onmouseup":2,"*::onreset":2,"*::onscroll":2,"*::onselect":2,"*::onsubmit":2,"*::ontouchcancel":2,"*::ontouchend":2,"*::ontouchenter":2,"*::ontouchleave":2,"*::ontouchmove":2,"*::ontouchstart":2,"*::onunload":2,"*::spellcheck":0,"*::style":3,"*::tabindex":0,"*::title":0,"*::translate":0,"a::accesskey":0,"a::coords":0,"a::href":1,"a::hreflang":0,"a::name":7,"a::onblur":2,"a::onfocus":2,"a::shape":0,"a::target":0,"a::type":0,"area::accesskey":0,"area::alt":0,"area::coords":0,"area::href":1,"area::nohref":0,"area::onblur":2,"area::onfocus":2,"area::shape":0,"area::target":10,"audio::controls":0,"audio::loop":0,"audio::mediagroup":5,"audio::muted":0,"audio::preload":0,"audio::src":1,"bdo::dir":0,"blockquote::cite":1,"br::clear":0,"button::accesskey":0,"button::disabled":0,"button::name":8,"button::onblur":2,"button::onfocus":2,"button::type":0,"button::value":0,"canvas::height":0,"canvas::width":0,"caption::align":0,"col::align":0,"col::char":0,"col::charoff":0,"col::span":0,"col::valign":0,"col::width":0,"colgroup::align":0,"colgroup::char":0,"colgroup::charoff":0,"colgroup::span":0,"colgroup::valign":0,"colgroup::width":0,"command::checked":0,"command::command":5,"command::disabled":0,"command::icon":1,"command::label":0,"command::radiogroup":0,"command::type":0,"data::value":0,"del::cite":1,"del::datetime":0,"details::open":0,"dir::compact":0,"div::align":0,"dl::compact":0,"fieldset::disabled":0,"font::color":0,"font::face":0,"font::size":0,"form::accept":0,"form::action":1,"form::autocomplete":0,"form::enctype":0,"form::method":0,"form::name":7,"form::novalidate":0,"form::onreset":2,"form::onsubmit":2,"form::target":10,"h1::align":0,"h2::align":0,"h3::align":0,"h4::align":0,"h5::align":0,"h6::align":0,"hr::align":0,"hr::noshade":0,"hr::size":0,"hr::width":0,"iframe::align":0,"iframe::frameborder":0,"iframe::height":0,"iframe::marginheight":0,"iframe::marginwidth":0,"iframe::width":0,"img::align":0,"img::alt":0,"img::border":0,"img::height":0,"img::hspace":0,"img::ismap":0,"img::name":7,"img::src":1,"img::usemap":11,"img::vspace":0,"img::width":0,"input::accept":0,"input::accesskey":0,"input::align":0,"input::alt":0,"input::autocomplete":0,"input::checked":0,"input::disabled":0,"input::inputmode":0,"input::ismap":0,"input::list":5,"input::max":0,"input::maxlength":0,"input::min":0,"input::multiple":0,"input::name":8,"input::onblur":2,"input::onchange":2,"input::onfocus":2,"input::onselect":2,"input::pattern":0,"input::placeholder":0,"input::readonly":0,"input::required":0,"input::size":0,"input::src":1,"input::step":0,"input::type":0,"input::usemap":11,"input::value":0,"ins::cite":1,"ins::datetime":0,"label::accesskey":0,"label::for":5,"label::onblur":2,"label::onfocus":2,"legend::accesskey":0,"legend::align":0,"li::type":0,"li::value":0,"map::name":7,"menu::compact":0,"menu::label":0,"menu::type":0,"meter::high":0,"meter::low":0,"meter::max":0,"meter::min":0,"meter::optimum":0,"meter::value":0,"ol::compact":0,"ol::reversed":0,"ol::start":0,"ol::type":0,"optgroup::disabled":0,"optgroup::label":0,"option::disabled":0,"option::label":0,"option::selected":0,"option::value":0,"output::for":6,"output::name":8,"p::align":0,"pre::width":0,"progress::max":0,"progress::min":0,"progress::value":0,"q::cite":1,"select::autocomplete":0,"select::disabled":0,"select::multiple":0,"select::name":8,"select::onblur":2,"select::onchange":2,"select::onfocus":2,"select::required":0,"select::size":0,"source::type":0,"table::align":0,"table::bgcolor":0,"table::border":0,"table::cellpadding":0,"table::cellspacing":0,"table::frame":0,"table::rules":0,"table::summary":0,"table::width":0,"tbody::align":0,"tbody::char":0,"tbody::charoff":0,"tbody::valign":0,"td::abbr":0,"td::align":0,"td::axis":0,"td::bgcolor":0,"td::char":0,"td::charoff":0,"td::colspan":0,"td::headers":6,"td::height":0,"td::nowrap":0,"td::rowspan":0,"td::scope":0,"td::valign":0,"td::width":0,"textarea::accesskey":0,"textarea::autocomplete":0,"textarea::cols":0,"textarea::disabled":0,"textarea::inputmode":0,"textarea::name":8,"textarea::onblur":2,"textarea::onchange":2,"textarea::onfocus":2,"textarea::onselect":2,"textarea::placeholder":0,"textarea::readonly":0,"textarea::required":0,"textarea::rows":0,"textarea::wrap":0,"tfoot::align":0,"tfoot::char":0,"tfoot::charoff":0,"tfoot::valign":0,"th::abbr":0,"th::align":0,"th::axis":0,"th::bgcolor":0,"th::char":0,"th::charoff":0,"th::colspan":0,"th::headers":6,"th::height":0,"th::nowrap":0,"th::rowspan":0,"th::scope":0,"th::valign":0,"th::width":0,"thead::align":0,"thead::char":0,"thead::charoff":0,"thead::valign":0,"tr::align":0,"tr::bgcolor":0,"tr::char":0,"tr::charoff":0,"tr::valign":0,"track::default":0,"track::kind":0,"track::label":0,"track::srclang":0,"ul::compact":0,"ul::type":0,"video::controls":0,"video::height":0,"video::loop":0,"video::mediagroup":5,"video::muted":0,"video::poster":1,"video::preload":0,"video::src":1,"video::width":0},html4.ATTRIBS=html4.ATTRIBS,html4.eflags={OPTIONAL_ENDTAG:1,EMPTY:2,CDATA:4,RCDATA:8,UNSAFE:16,FOLDABLE:32,SCRIPT:64,STYLE:128,VIRTUALIZED:256},html4.eflags=html4.eflags,html4.ELEMENTS={a:0,abbr:0,acronym:0,address:0,applet:272,area:2,article:0,aside:0,audio:0,b:0,base:274,basefont:274,bdi:0,bdo:0,big:0,blockquote:0,body:305,br:2,button:0,canvas:0,caption:0,center:0,cite:0,code:0,col:2,colgroup:1,command:2,data:0,datalist:0,dd:1,del:0,details:0,dfn:0,dialog:272,dir:0,div:0,dl:0,dt:1,em:0,fieldset:0,figcaption:0,figure:0,font:0,footer:0,form:0,frame:274,frameset:272,h1:0,h2:0,h3:0,h4:0,h5:0,h6:0,head:305,header:0,hgroup:0,hr:2,html:305,i:0,iframe:16,img:2,input:2,ins:0,isindex:274,kbd:0,keygen:274,label:0,legend:0,li:1,link:274,map:0,mark:0,menu:0,meta:274,meter:0,nav:0,nobr:0,noembed:276,noframes:276,noscript:276,object:272,ol:0,optgroup:0,option:1,output:0,p:1,param:274,pre:0,progress:0,q:0,s:0,samp:0,script:84,section:0,select:0,small:0,source:2,span:0,strike:0,strong:0,style:148,sub:0,summary:0,sup:0,table:0,tbody:1,td:1,textarea:8,tfoot:1,th:1,thead:1,time:0,title:280,tr:1,track:2,tt:0,u:0,ul:0,"var":0,video:0,wbr:2},html4.ELEMENTS=html4.ELEMENTS,html4.ELEMENT_DOM_INTERFACES={a:"HTMLAnchorElement",abbr:"HTMLElement",acronym:"HTMLElement",address:"HTMLElement",applet:"HTMLAppletElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLBaseFontElement",bdi:"HTMLElement",bdo:"HTMLElement",big:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",center:"HTMLElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",command:"HTMLCommandElement",data:"HTMLElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement", +h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",isindex:"HTMLUnknownElement",kbd:"HTMLElement",keygen:"HTMLKeygenElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",map:"HTMLMapElement",mark:"HTMLElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",nobr:"HTMLElement",noembed:"HTMLElement",noframes:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",section:"HTMLElement",select:"HTMLSelectElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strike:"HTMLElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableDataCellElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableHeaderCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",tt:"HTMLElement",u:"HTMLElement",ul:"HTMLUListElement","var":"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"},html4.ELEMENT_DOM_INTERFACES=html4.ELEMENT_DOM_INTERFACES,html4.ueffects={NOT_LOADED:0,SAME_DOCUMENT:1,NEW_DOCUMENT:2},html4.ueffects=html4.ueffects,html4.URIEFFECTS={"a::href":2,"area::href":2,"audio::src":1,"blockquote::cite":0,"command::icon":1,"del::cite":0,"form::action":2,"img::src":1,"input::src":1,"ins::cite":0,"q::cite":0,"video::poster":1,"video::src":1},html4.URIEFFECTS=html4.URIEFFECTS,html4.ltypes={UNSANDBOXED:2,SANDBOXED:1,DATA:0},html4.ltypes=html4.ltypes,html4.LOADERTYPES={"a::href":2,"area::href":2,"audio::src":2,"blockquote::cite":2,"command::icon":1,"del::cite":2,"form::action":2,"img::src":1,"input::src":1,"ins::cite":2,"q::cite":2,"video::poster":1,"video::src":2},html4.LOADERTYPES=html4.LOADERTYPES,"undefined"!=typeof window&&(window.html4=html4),"i"!=="I".toLowerCase())throw"I/i problem";var html=function(a){function b(a){if(E.hasOwnProperty(a))return E[a];var b=a.match(F);if(b)return String.fromCharCode(parseInt(b[1],10));if(b=a.match(G))return String.fromCharCode(parseInt(b[1],16));if(I&&H.test(a)){I.innerHTML="&"+a+";";var c=I.textContent;return E[a]=c,c}return"&"+a+";"}function c(a,c){return b(c)}function d(a){return a.replace(J,"")}function e(a){return a.replace(K,c)}function f(a){return(""+a).replace(M,"&").replace(O,"<").replace(P,">").replace(Q,""")}function g(a){return a.replace(N,"&$1").replace(O,"<").replace(P,">")}function h(a){var b={cdata:a.cdata||a.cdata,comment:a.comment||a.comment,endDoc:a.endDoc||a.endDoc,endTag:a.endTag||a.endTag,pcdata:a.pcdata||a.pcdata,rcdata:a.rcdata||a.rcdata,startDoc:a.startDoc||a.startDoc,startTag:a.startTag||a.startTag};return function(a,c){return i(a,b,c)}}function i(a,b,c){var d=l(a),e={noMoreGT:!1,noMoreEndComments:!1};k(b,d,0,e,c)}function j(a,b,c,d,e){return function(){k(a,b,c,d,e)}}function k(b,c,d,e,f){try{b.startDoc&&0==d&&b.startDoc(f);for(var g,h,i,k=d,l=c.length;l>k;){var p=c[k++],q=c[k];switch(p){case"&":L.test(q)?(b.pcdata&&b.pcdata("&"+q,f,U,j(b,c,k,e,f)),k++):b.pcdata&&b.pcdata("&",f,U,j(b,c,k,e,f));break;case""===c[k+1]?(k+=2,i=g[1].toLowerCase(),b.endTag&&b.endTag(i,f,U,j(b,c,k,e,f))):k=m(c,k,b,f,U,e):b.pcdata&&b.pcdata("</",f,U,j(b,c,k,e,f));break;case"<":if(g=/^([-\w:]+)\s*\/?/.exec(q))if(g[0].length===q.length&&">"===c[k+1]){k+=2,i=g[1].toLowerCase(),b.startTag&&b.startTag(i,[],f,U,j(b,c,k,e,f));var r=a.ELEMENTS[i];if(r&T){var s={name:i,next:k,eflags:r};k=o(c,s,b,f,U,e)}}else k=n(c,k,b,f,U,e);else b.pcdata&&b.pcdata("<",f,U,j(b,c,k,e,f));break;case"', and\n // repeated failure to find '-->' is quadratic. We avoid that by\n // remembering when search for '-->' fails.\n if (!state.noMoreEndComments) {\n // A comment <\\!--x--> is split into three tokens:\n // '<\\!--', 'x--', '>'\n // We want to find the next '>' token that has a preceding '--'.\n // pos is at the 'x--'.\n for (p = pos + 1; p < end; p++) {\n if (parts[p] === '>' && /--$/.test(parts[p - 1])) { break; }\n }\n if (p < end) {\n if (h.comment) {\n var comment = parts.slice(pos, p).join('');\n h.comment(\n comment.substr(0, comment.length - 2), param,\n continuationMarker,\n continuationMaker(h, parts, p + 1, state, param));\n }\n pos = p + 1;\n } else {\n state.noMoreEndComments = true;\n }\n }\n if (state.noMoreEndComments) {\n if (h.pcdata) {\n h.pcdata('<!--', param, continuationMarker,\n continuationMaker(h, parts, pos, state, param));\n }\n }\n break;\n case '<\\!':\n if (!/^\\w/.test(next)) {\n if (h.pcdata) {\n h.pcdata('<!', param, continuationMarker,\n continuationMaker(h, parts, pos, state, param));\n }\n } else {\n // similar to noMoreEndComment logic\n if (!state.noMoreGT) {\n for (p = pos + 1; p < end; p++) {\n if (parts[p] === '>') { break; }\n }\n if (p < end) {\n pos = p + 1;\n } else {\n state.noMoreGT = true;\n }\n }\n if (state.noMoreGT) {\n if (h.pcdata) {\n h.pcdata('<!', param, continuationMarker,\n continuationMaker(h, parts, pos, state, param));\n }\n }\n }\n break;\n case '') { break; }\n }\n if (p < end) {\n pos = p + 1;\n } else {\n state.noMoreGT = true;\n }\n }\n if (state.noMoreGT) {\n if (h.pcdata) {\n h.pcdata('<?', param, continuationMarker,\n continuationMaker(h, parts, pos, state, param));\n }\n }\n break;\n case '>':\n if (h.pcdata) {\n h.pcdata(\">\", param, continuationMarker,\n continuationMaker(h, parts, pos, state, param));\n }\n break;\n case '':\n break;\n default:\n if (h.pcdata) {\n h.pcdata(current, param, continuationMarker,\n continuationMaker(h, parts, pos, state, param));\n }\n break;\n }\n }\n if (h.endDoc) { h.endDoc(param); }\n } catch (e) {\n if (e !== continuationMarker) { throw e; }\n }\n }\n\n // Split str into parts for the html parser.\n function htmlSplit(str) {\n // can't hoist this out of the function because of the re.exec loop.\n var re = /(<\\/|<\\!--|<[!?]|[&<>])/g;\n str += '';\n if (splitWillCapture) {\n return str.split(re);\n } else {\n var parts = [];\n var lastPos = 0;\n var m;\n while ((m = re.exec(str)) !== null) {\n parts.push(str.substring(lastPos, m.index));\n parts.push(m[0]);\n lastPos = m.index + m[0].length;\n }\n parts.push(str.substring(lastPos));\n return parts;\n }\n }\n\n function parseEndTag(parts, pos, h, param, continuationMarker, state) {\n var tag = parseTagAndAttrs(parts, pos);\n // drop unclosed tags\n if (!tag) { return parts.length; }\n if (h.endTag) {\n h.endTag(tag.name, param, continuationMarker,\n continuationMaker(h, parts, pos, state, param));\n }\n return tag.next;\n }\n\n function parseStartTag(parts, pos, h, param, continuationMarker, state) {\n var tag = parseTagAndAttrs(parts, pos);\n // drop unclosed tags\n if (!tag) { return parts.length; }\n if (h.startTag) {\n h.startTag(tag.name, tag.attrs, param, continuationMarker,\n continuationMaker(h, parts, tag.next, state, param));\n }\n // tags like