##// END OF EJS Templates
Update RC models, views, templates & statics...
Juan C. Espinoza -
r45:f516e8aeadc3
parent child
Show More
@@ -0,0 +1,11
1 @import url("https://fonts.googleapis.com/css?family=Ubuntu:400,700");/*!
2 * bootswatch v3.3.6
3 * Homepage: http://bootswatch.com
4 * Copyright 2012-2016 Thomas Park
5 * Licensed under MIT
6 * Based on Bootstrap
7 *//*!
8 * Bootstrap v3.3.6 (http://getbootstrap.com)
9 * Copyright 2011-2015 Twitter, Inc.
10 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
11 *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:0.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace, monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:0.35em 0.625em 0.75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,*:before,*:after{background:transparent !important;color:#000 !important;-webkit-box-shadow:none !important;box-shadow:none !important;text-shadow:none !important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000 !important}.label{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered th,.table-bordered td{border:1px solid #ddd !important}}@font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:normal;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-euro:before,.glyphicon-eur:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}*:before,*:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Ubuntu",Tahoma,"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333333;background-color:#ffffff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#dd4814;text-decoration:none}a:hover,a:focus{color:#97310e;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.img-responsive,.thumbnail>img,.thumbnail a>img,.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{padding:4px;line-height:1.42857143;background-color:#ffffff;border:1px solid #dddddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out;display:inline-block;max-width:100%;height:auto}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eeeeee}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role="button"]{cursor:pointer}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Ubuntu",Tahoma,"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1;color:inherit}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small,h1 .small,h2 .small,h3 .small,h4 .small,h5 .small,h6 .small,.h1 .small,.h2 .small,.h3 .small,.h4 .small,.h5 .small,.h6 .small{font-weight:normal;line-height:1;color:#aea79f}h1,.h1,h2,.h2,h3,.h3{margin-top:20px;margin-bottom:10px}h1 small,.h1 small,h2 small,.h2 small,h3 small,.h3 small,h1 .small,.h1 .small,h2 .small,.h2 .small,h3 .small,.h3 .small{font-size:65%}h4,.h4,h5,.h5,h6,.h6{margin-top:10px;margin-bottom:10px}h4 small,.h4 small,h5 small,.h5 small,h6 small,.h6 small,h4 .small,.h4 .small,h5 .small,.h5 .small,h6 .small,.h6 .small{font-size:75%}h1,.h1{font-size:36px}h2,.h2{font-size:30px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}small,.small{font-size:85%}mark,.mark{background-color:#fcf8e3;padding:.2em}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#aea79f}.text-primary{color:#dd4814}a.text-primary:hover,a.text-primary:focus{color:#ae3910}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-danger{color:#b94a48}a.text-danger:hover,a.text-danger:focus{color:#953b39}.bg-primary{color:#fff;background-color:#dd4814}a.bg-primary:hover,a.bg-primary:focus{background-color:#ae3910}.bg-success{background-color:#dff0d8}a.bg-success:hover,a.bg-success:focus{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:hover,a.bg-info:focus{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:hover,a.bg-warning:focus{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:hover,a.bg-danger:focus{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eeeeee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none;margin-left:-5px}.list-inline>li{display:inline-block;padding-left:5px;padding-right:5px}dl{margin-top:0;margin-bottom:20px}dt,dd{line-height:1.42857143}dt{font-weight:bold}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #aea79f}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eeeeee}blockquote p:last-child,blockquote ul:last-child,blockquote ol:last-child{margin-bottom:0}blockquote footer,blockquote small,blockquote .small{display:block;font-size:80%;line-height:1.42857143;color:#aea79f}blockquote footer:before,blockquote small:before,blockquote .small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;text-align:right}.blockquote-reverse footer:before,blockquote.pull-right footer:before,.blockquote-reverse small:before,blockquote.pull-right small:before,.blockquote-reverse .small:before,blockquote.pull-right .small:before{content:''}.blockquote-reverse footer:after,blockquote.pull-right footer:after,.blockquote-reverse small:after,blockquote.pull-right small:after,.blockquote-reverse .small:after,blockquote.pull-right .small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#ffffff;background-color:#333333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.25)}kbd kbd{padding:0;font-size:100%;font-weight:bold;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;word-break:break-all;word-wrap:break-word;color:#333333;background-color:#f5f5f5;border:1px solid #cccccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.row{margin-left:-15px;margin-right:-15px}.col-xs-1,.col-sm-1,.col-md-1,.col-lg-1,.col-xs-2,.col-sm-2,.col-md-2,.col-lg-2,.col-xs-3,.col-sm-3,.col-md-3,.col-lg-3,.col-xs-4,.col-sm-4,.col-md-4,.col-lg-4,.col-xs-5,.col-sm-5,.col-md-5,.col-lg-5,.col-xs-6,.col-sm-6,.col-md-6,.col-lg-6,.col-xs-7,.col-sm-7,.col-md-7,.col-lg-7,.col-xs-8,.col-sm-8,.col-md-8,.col-lg-8,.col-xs-9,.col-sm-9,.col-md-9,.col-lg-9,.col-xs-10,.col-sm-10,.col-md-10,.col-lg-10,.col-xs-11,.col-sm-11,.col-md-11,.col-lg-11,.col-xs-12,.col-sm-12,.col-md-12,.col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0%}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0%}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0%}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0%}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#aea79f;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #dddddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #dddddd}.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>th,.table>caption+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>td,.table>thead:first-child>tr:first-child>td{border-top:0}.table>tbody+tbody{border-top:2px solid #dddddd}.table .table{background-color:#ffffff}.table-condensed>thead>tr>th,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>tbody>tr>td,.table-condensed>tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #dddddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #dddddd}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover,.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.table>thead>tr>td.info,.table>tbody>tr>td.info,.table>tfoot>tr>td.info,.table>thead>tr>th.info,.table>tbody>tr>th.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>tbody>tr.info>td,.table>tfoot>tr.info>td,.table>thead>tr.info>th,.table>tbody>tr.info>th,.table>tfoot>tr.info>th{background-color:#d9edf7}.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover,.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}.table-responsive{overflow-x:auto;min-height:0.01%}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #dddddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>thead>tr>th,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tfoot>tr>td{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>thead>tr>th:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.table-responsive>.table-bordered>thead>tr>th:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>th,.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:9px;font-size:14px;line-height:1.42857143;color:#333333}.form-control{display:block;width:100%;height:38px;padding:8px 12px;font-size:14px;line-height:1.42857143;color:#333333;background-color:#ffffff;background-image:none;border:1px solid #cccccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(102,175,233,0.6)}.form-control::-moz-placeholder{color:#aea79f;opacity:1}.form-control:-ms-input-placeholder{color:#aea79f}.form-control::-webkit-input-placeholder{color:#aea79f}.form-control::-ms-expand{border:0;background-color:transparent}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eeeeee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type="search"]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type="date"].form-control,input[type="time"].form-control,input[type="datetime-local"].form-control,input[type="month"].form-control{line-height:38px}input[type="date"].input-sm,input[type="time"].input-sm,input[type="datetime-local"].input-sm,input[type="month"].input-sm,.input-group-sm input[type="date"],.input-group-sm input[type="time"],.input-group-sm input[type="datetime-local"],.input-group-sm input[type="month"]{line-height:30px}input[type="date"].input-lg,input[type="time"].input-lg,input[type="datetime-local"].input-lg,input[type="month"].input-lg,.input-group-lg input[type="date"],.input-group-lg input[type="time"],.input-group-lg input[type="datetime-local"],.input-group-lg input[type="month"]{line-height:54px}}.form-group{margin-bottom:15px}.radio,.checkbox{position:relative;display:block;margin-top:10px;margin-bottom:10px}.radio label,.checkbox label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{position:absolute;margin-left:-20px;margin-top:4px \9}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"].disabled,input[type="checkbox"].disabled,fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"]{cursor:not-allowed}.radio-inline.disabled,.checkbox-inline.disabled,fieldset[disabled] .radio-inline,fieldset[disabled] .checkbox-inline{cursor:not-allowed}.radio.disabled label,.checkbox.disabled label,fieldset[disabled] .radio label,fieldset[disabled] .checkbox label{cursor:not-allowed}.form-control-static{padding-top:9px;padding-bottom:9px;margin-bottom:0;min-height:34px}.form-control-static.input-lg,.form-control-static.input-sm{padding-left:0;padding-right:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}textarea.input-sm,select[multiple].input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm textarea.form-control,.form-group-sm select[multiple].form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:54px;line-height:54px}textarea.input-lg,select[multiple].input-lg{height:auto}.form-group-lg .form-control{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:54px;line-height:54px}.form-group-lg textarea.form-control,.form-group-lg select[multiple].form-control{height:auto}.form-group-lg .form-control-static{height:54px;min-height:38px;padding:15px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:47.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:38px;height:38px;line-height:38px;text-align:center;pointer-events:none}.input-lg+.form-control-feedback,.input-group-lg+.form-control-feedback,.form-group-lg .form-control+.form-control-feedback{width:54px;height:54px;line-height:54px}.input-sm+.form-control-feedback,.input-group-sm+.form-control-feedback,.form-group-sm .form-control+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .help-block,.has-success .control-label,.has-success .radio,.has-success .checkbox,.has-success .radio-inline,.has-success .checkbox-inline,.has-success.radio label,.has-success.checkbox label,.has-success.radio-inline label,.has-success.checkbox-inline label{color:#468847}.has-success .form-control{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;border-color:#468847;background-color:#dff0d8}.has-success .form-control-feedback{color:#468847}.has-warning .help-block,.has-warning .control-label,.has-warning .radio,.has-warning .checkbox,.has-warning .radio-inline,.has-warning .checkbox-inline,.has-warning.radio label,.has-warning.checkbox label,.has-warning.radio-inline label,.has-warning.checkbox-inline label{color:#c09853}.has-warning .form-control{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;border-color:#c09853;background-color:#fcf8e3}.has-warning .form-control-feedback{color:#c09853}.has-error .help-block,.has-error .control-label,.has-error .radio,.has-error .checkbox,.has-error .radio-inline,.has-error .checkbox-inline,.has-error.radio label,.has-error.checkbox label,.has-error.radio-inline label,.has-error.checkbox-inline label{color:#b94a48}.has-error .form-control{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;border-color:#b94a48;background-color:#f2dede}.has-error .form-control-feedback{color:#b94a48}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn,.form-inline .input-group .form-control{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .radio,.form-inline .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .radio label,.form-inline .checkbox label{padding-left:0}.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .radio,.form-horizontal .checkbox,.form-horizontal .radio-inline,.form-horizontal .checkbox-inline{margin-top:0;margin-bottom:0;padding-top:9px}.form-horizontal .radio,.form-horizontal .checkbox{min-height:29px}.form-horizontal .form-group{margin-left:-15px;margin-right:-15px}@media (min-width:768px){.form-horizontal .control-label{text-align:right;margin-bottom:0;padding-top:9px}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:15px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:8px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.btn:focus,.btn:active:focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn.active.focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus,.btn.focus{color:#ffffff;text-decoration:none}.btn:active,.btn.active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#ffffff;background-color:#aea79f;border-color:#aea79f}.btn-default:focus,.btn-default.focus{color:#ffffff;background-color:#978e83;border-color:#6f675e}.btn-default:hover{color:#ffffff;background-color:#978e83;border-color:#92897e}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{color:#ffffff;background-color:#978e83;border-color:#92897e}.btn-default:active:hover,.btn-default.active:hover,.open>.dropdown-toggle.btn-default:hover,.btn-default:active:focus,.btn-default.active:focus,.open>.dropdown-toggle.btn-default:focus,.btn-default:active.focus,.btn-default.active.focus,.open>.dropdown-toggle.btn-default.focus{color:#ffffff;background-color:#867c71;border-color:#6f675e}.btn-default:active,.btn-default.active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled.focus,.btn-default[disabled].focus,fieldset[disabled] .btn-default.focus{background-color:#aea79f;border-color:#aea79f}.btn-default .badge{color:#aea79f;background-color:#ffffff}.btn-primary{color:#ffffff;background-color:#dd4814;border-color:#dd4814}.btn-primary:focus,.btn-primary.focus{color:#ffffff;background-color:#ae3910;border-color:#682209}.btn-primary:hover{color:#ffffff;background-color:#ae3910;border-color:#a5360f}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{color:#ffffff;background-color:#ae3910;border-color:#a5360f}.btn-primary:active:hover,.btn-primary.active:hover,.open>.dropdown-toggle.btn-primary:hover,.btn-primary:active:focus,.btn-primary.active:focus,.open>.dropdown-toggle.btn-primary:focus,.btn-primary:active.focus,.btn-primary.active.focus,.open>.dropdown-toggle.btn-primary.focus{color:#ffffff;background-color:#8d2e0d;border-color:#682209}.btn-primary:active,.btn-primary.active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled.focus,.btn-primary[disabled].focus,fieldset[disabled] .btn-primary.focus{background-color:#dd4814;border-color:#dd4814}.btn-primary .badge{color:#dd4814;background-color:#ffffff}.btn-success{color:#ffffff;background-color:#38b44a;border-color:#38b44a}.btn-success:focus,.btn-success.focus{color:#ffffff;background-color:#2c8d3a;border-color:#1a5322}.btn-success:hover{color:#ffffff;background-color:#2c8d3a;border-color:#298537}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{color:#ffffff;background-color:#2c8d3a;border-color:#298537}.btn-success:active:hover,.btn-success.active:hover,.open>.dropdown-toggle.btn-success:hover,.btn-success:active:focus,.btn-success.active:focus,.open>.dropdown-toggle.btn-success:focus,.btn-success:active.focus,.btn-success.active.focus,.open>.dropdown-toggle.btn-success.focus{color:#ffffff;background-color:#23722f;border-color:#1a5322}.btn-success:active,.btn-success.active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled.focus,.btn-success[disabled].focus,fieldset[disabled] .btn-success.focus{background-color:#38b44a;border-color:#38b44a}.btn-success .badge{color:#38b44a;background-color:#ffffff}.btn-info{color:#ffffff;background-color:#772953;border-color:#772953}.btn-info:focus,.btn-info.focus{color:#ffffff;background-color:#511c39;border-color:#180811}.btn-info:hover{color:#ffffff;background-color:#511c39;border-color:#491933}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{color:#ffffff;background-color:#511c39;border-color:#491933}.btn-info:active:hover,.btn-info.active:hover,.open>.dropdown-toggle.btn-info:hover,.btn-info:active:focus,.btn-info.active:focus,.open>.dropdown-toggle.btn-info:focus,.btn-info:active.focus,.btn-info.active.focus,.open>.dropdown-toggle.btn-info.focus{color:#ffffff;background-color:#371326;border-color:#180811}.btn-info:active,.btn-info.active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled.focus,.btn-info[disabled].focus,fieldset[disabled] .btn-info.focus{background-color:#772953;border-color:#772953}.btn-info .badge{color:#772953;background-color:#ffffff}.btn-warning{color:#ffffff;background-color:#efb73e;border-color:#efb73e}.btn-warning:focus,.btn-warning.focus{color:#ffffff;background-color:#e7a413;border-color:#a0720d}.btn-warning:hover{color:#ffffff;background-color:#e7a413;border-color:#dd9d12}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{color:#ffffff;background-color:#e7a413;border-color:#dd9d12}.btn-warning:active:hover,.btn-warning.active:hover,.open>.dropdown-toggle.btn-warning:hover,.btn-warning:active:focus,.btn-warning.active:focus,.open>.dropdown-toggle.btn-warning:focus,.btn-warning:active.focus,.btn-warning.active.focus,.open>.dropdown-toggle.btn-warning.focus{color:#ffffff;background-color:#c68c10;border-color:#a0720d}.btn-warning:active,.btn-warning.active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled.focus,.btn-warning[disabled].focus,fieldset[disabled] .btn-warning.focus{background-color:#efb73e;border-color:#efb73e}.btn-warning .badge{color:#efb73e;background-color:#ffffff}.btn-danger{color:#ffffff;background-color:#df382c;border-color:#df382c}.btn-danger:focus,.btn-danger.focus{color:#ffffff;background-color:#bc271c;border-color:#791912}.btn-danger:hover{color:#ffffff;background-color:#bc271c;border-color:#b3251b}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{color:#ffffff;background-color:#bc271c;border-color:#b3251b}.btn-danger:active:hover,.btn-danger.active:hover,.open>.dropdown-toggle.btn-danger:hover,.btn-danger:active:focus,.btn-danger.active:focus,.open>.dropdown-toggle.btn-danger:focus,.btn-danger:active.focus,.btn-danger.active.focus,.open>.dropdown-toggle.btn-danger.focus{color:#ffffff;background-color:#9d2118;border-color:#791912}.btn-danger:active,.btn-danger.active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled.focus,.btn-danger[disabled].focus,fieldset[disabled] .btn-danger.focus{background-color:#df382c;border-color:#df382c}.btn-danger .badge{color:#df382c;background-color:#ffffff}.btn-link{color:#dd4814;font-weight:normal;border-radius:0}.btn-link,.btn-link:active,.btn-link.active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#97310e;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#aea79f;text-decoration:none}.btn-lg,.btn-group-lg>.btn{padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-sm,.btn-group-sm>.btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-xs,.btn-group-xs>.btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height, visibility;-o-transition-property:height, visibility;transition-property:height, visibility;-webkit-transition-duration:0.35s;-o-transition-duration:0.35s;transition-duration:0.35s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid \9;border-right:4px solid transparent;border-left:4px solid transparent}.dropup,.dropdown{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;text-align:left;background-color:#ffffff;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);-webkit-background-clip:padding-box;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#333333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{text-decoration:none;color:#ffffff;background-color:#dd4814}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#dd4814}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#aea79f}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);cursor:not-allowed}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{left:auto;right:0}.dropdown-menu-left{left:0;right:auto}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#aea79f;white-space:nowrap}.dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px dashed;border-bottom:4px solid \9;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{left:auto;right:0}.navbar-right .dropdown-menu-left{left:0;right:auto}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active,.btn-group>.btn.active,.btn-group-vertical>.btn.active{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-left:12px;padding-right:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-right-radius:0;border-top-left-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{float:none;display:table-cell;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle="buttons"]>.btn input[type="radio"],[data-toggle="buttons"]>.btn-group>.btn input[type="radio"],[data-toggle="buttons"]>.btn input[type="checkbox"],[data-toggle="buttons"]>.btn-group>.btn input[type="checkbox"]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:54px;padding:14px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:54px;line-height:54px}textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn,select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn,select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:8px 12px;font-size:14px;font-weight:normal;line-height:1;color:#333333;text-align:center;background-color:#eeeeee;border:1px solid #cccccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:14px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group-btn:last-child>.btn-group:not(:last-child)>.btn{border-bottom-right-radius:0;border-top-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:first-child>.btn-group:not(:first-child)>.btn{border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:hover,.input-group-btn>.btn:focus,.input-group-btn>.btn:active{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{margin-bottom:0;padding-left:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee}.nav>li.disabled>a{color:#aea79f}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#aea79f;text-decoration:none;background-color:transparent;cursor:not-allowed}.nav .open>a,.nav .open>a:hover,.nav .open>a:focus{background-color:#eeeeee;border-color:#dd4814}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #dddddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#777777;background-color:#ffffff;border:1px solid #dddddd;border-bottom-color:transparent;cursor:default}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border:1px solid #dddddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #dddddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:hover,.nav-tabs.nav-justified>.active>a:focus{border-bottom-color:#ffffff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#ffffff;background-color:#dd4814}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{text-align:center;margin-bottom:5px}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border:1px solid #dddddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #dddddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:hover,.nav-tabs-justified>.active>a:focus{border-bottom-color:#ffffff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{overflow-x:visible;padding-right:15px;padding-left:15px;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1);-webkit-overflow-scrolling:touch}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block !important;height:auto !important;padding-bottom:0;overflow:visible !important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{padding-left:0;padding-right:0}}.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-top .navbar-collapse,.navbar-fixed-bottom .navbar-collapse{max-height:200px}}.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container>.navbar-header,.container-fluid>.navbar-header,.container>.navbar-collapse,.container-fluid>.navbar-collapse{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-top,.navbar-fixed-bottom{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;padding:15px 15px;font-size:18px;line-height:20px;height:50px}.navbar-brand:hover,.navbar-brand:focus{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;margin-right:15px;padding:9px 10px;margin-top:8px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu>li>a,.navbar-nav .open .dropdown-menu .dropdown-header{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:hover,.navbar-nav .open .dropdown-menu>li>a:focus{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{margin-left:-15px;margin-right:-15px;padding:10px 15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);margin-top:6px;margin-bottom:6px}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn,.navbar-form .input-group .form-control{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .radio,.navbar-form .checkbox{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .radio label,.navbar-form .checkbox label{padding-left:0}.navbar-form .radio input[type="radio"],.navbar-form .checkbox input[type="checkbox"]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;border:0;margin-left:0;margin-right:0;padding-top:0;padding-bottom:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-right-radius:4px;border-top-left-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:6px;margin-bottom:6px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-left:15px;margin-right:15px}}@media (min-width:768px){.navbar-left{float:left !important}.navbar-right{float:right !important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#dd4814;border-color:#bf3e11}.navbar-default .navbar-brand{color:#ffffff}.navbar-default .navbar-brand:hover,.navbar-default .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-default .navbar-text{color:#ffffff}.navbar-default .navbar-nav>li>a{color:#ffffff}.navbar-default .navbar-nav>li>a:hover,.navbar-default .navbar-nav>li>a:focus{color:#ffffff;background-color:#97310e}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:hover,.navbar-default .navbar-nav>.active>a:focus{color:#ffffff;background-color:#ae3910}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:hover,.navbar-default .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#97310e}.navbar-default .navbar-toggle:hover,.navbar-default .navbar-toggle:focus{background-color:#97310e}.navbar-default .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#bf3e11}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:hover,.navbar-default .navbar-nav>.open>a:focus{background-color:#ae3910;color:#ffffff}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#97310e}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#ae3910}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-default .navbar-link{color:#ffffff}.navbar-default .navbar-link:hover{color:#ffffff}.navbar-default .btn-link{color:#ffffff}.navbar-default .btn-link:hover,.navbar-default .btn-link:focus{color:#ffffff}.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:hover,.navbar-default .btn-link[disabled]:focus,fieldset[disabled] .navbar-default .btn-link:focus{color:#cccccc}.navbar-inverse{background-color:#772953;border-color:#511c39}.navbar-inverse .navbar-brand{color:#ffffff}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#ffffff;background-color:none}.navbar-inverse .navbar-text{color:#ffffff}.navbar-inverse .navbar-nav>li>a{color:#ffffff}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#ffffff;background-color:#3e152b}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#ffffff;background-color:#511c39}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#cccccc;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#3e152b}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#3e152b}.navbar-inverse .navbar-toggle .icon-bar{background-color:#ffffff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#5c2040}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{background-color:#511c39;color:#ffffff}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#511c39}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#511c39}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#ffffff}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus{color:#ffffff;background-color:#3e152b}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus{color:#ffffff;background-color:#511c39}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus{color:#cccccc;background-color:transparent}}.navbar-inverse .navbar-link{color:#ffffff}.navbar-inverse .navbar-link:hover{color:#ffffff}.navbar-inverse .btn-link{color:#ffffff}.navbar-inverse .btn-link:hover,.navbar-inverse .btn-link:focus{color:#ffffff}.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:hover,.navbar-inverse .btn-link[disabled]:focus,fieldset[disabled] .navbar-inverse .btn-link:focus{color:#cccccc}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{content:"/\00a0";padding:0 5px;color:#cccccc}.breadcrumb>.active{color:#aea79f}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:8px 12px;line-height:1.42857143;text-decoration:none;color:#dd4814;background-color:#ffffff;border:1px solid #dddddd;margin-left:-1px}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-bottom-right-radius:4px;border-top-right-radius:4px}.pagination>li>a:hover,.pagination>li>span:hover,.pagination>li>a:focus,.pagination>li>span:focus{z-index:2;color:#97310e;background-color:#eeeeee;border-color:#dddddd}.pagination>.active>a,.pagination>.active>span,.pagination>.active>a:hover,.pagination>.active>span:hover,.pagination>.active>a:focus,.pagination>.active>span:focus{z-index:3;color:#aea79f;background-color:#f5f5f5;border-color:#dddddd;cursor:default}.pagination>.disabled>span,.pagination>.disabled>span:hover,.pagination>.disabled>span:focus,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#aea79f;background-color:#ffffff;border-color:#dddddd;cursor:not-allowed}.pagination-lg>li>a,.pagination-lg>li>span{padding:14px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-bottom-right-radius:6px;border-top-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-bottom-right-radius:3px;border-top-right-radius:3px}.pager{padding-left:0;margin:20px 0;list-style:none;text-align:center}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#ffffff;border:1px solid #dddddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#eeeeee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#aea79f;background-color:#ffffff;cursor:not-allowed}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#ffffff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:hover,a.label:focus{color:#ffffff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#aea79f}.label-default[href]:hover,.label-default[href]:focus{background-color:#978e83}.label-primary{background-color:#dd4814}.label-primary[href]:hover,.label-primary[href]:focus{background-color:#ae3910}.label-success{background-color:#38b44a}.label-success[href]:hover,.label-success[href]:focus{background-color:#2c8d3a}.label-info{background-color:#772953}.label-info[href]:hover,.label-info[href]:focus{background-color:#511c39}.label-warning{background-color:#efb73e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#e7a413}.label-danger{background-color:#df382c}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#bc271c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;color:#ffffff;line-height:1;vertical-align:middle;white-space:nowrap;text-align:center;background-color:#aea79f;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-xs .badge,.btn-group-xs>.btn .badge{top:0;padding:1px 5px}a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#dd4814;background-color:#ffffff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eeeeee}.jumbotron h1,.jumbotron .h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{border-radius:6px;padding-left:15px;padding-right:15px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-left:60px;padding-right:60px}.jumbotron h1,.jumbotron .h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#ffffff;border:1px solid #dddddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-left:auto;margin-right:auto}a.thumbnail:hover,a.thumbnail:focus,a.thumbnail.active{border-color:#dd4814}.thumbnail .caption{padding:9px;color:#333333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:bold}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-warning{background-color:#fcf8e3;border-color:#fbeed5;color:#c09853}.alert-warning hr{border-top-color:#f8e5be}.alert-warning .alert-link{color:#a47e3c}.alert-danger{background-color:#f2dede;border-color:#eed3d7;color:#b94a48}.alert-danger hr{border-top-color:#e6c1c7}.alert-danger .alert-link{color:#953b39}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0%;height:100%;font-size:12px;line-height:20px;color:#ffffff;text-align:center;background-color:#dd4814;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease}.progress-striped .progress-bar,.progress-bar-striped{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress.active .progress-bar,.progress-bar.active{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#38b44a}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-info{background-color:#772953}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-warning{background-color:#efb73e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-danger{background-color:#df382c}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{zoom:1;overflow:hidden}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-left,.media-right,.media-body{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{margin-bottom:20px;padding-left:0}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#ffffff;border:1px solid #dddddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333333}a.list-group-item:hover,button.list-group-item:hover,a.list-group-item:focus,button.list-group-item:focus{text-decoration:none;color:#555555;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:hover,.list-group-item.disabled:focus{background-color:#eeeeee;color:#aea79f;cursor:not-allowed}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text{color:#aea79f}.list-group-item.active,.list-group-item.active:hover,.list-group-item.active:focus{z-index:2;color:#ffffff;background-color:#dd4814;border-color:#dd4814}.list-group-item.active .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>.small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:hover .list-group-item-text,.list-group-item.active:focus .list-group-item-text{color:#fad1c3}.list-group-item-success{color:#468847;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#468847}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:hover,button.list-group-item-success:hover,a.list-group-item-success:focus,button.list-group-item-success:focus{color:#468847;background-color:#d0e9c6}a.list-group-item-success.active,button.list-group-item-success.active,a.list-group-item-success.active:hover,button.list-group-item-success.active:hover,a.list-group-item-success.active:focus,button.list-group-item-success.active:focus{color:#fff;background-color:#468847;border-color:#468847}.list-group-item-info{color:#3a87ad;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#3a87ad}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:hover,button.list-group-item-info:hover,a.list-group-item-info:focus,button.list-group-item-info:focus{color:#3a87ad;background-color:#c4e3f3}a.list-group-item-info.active,button.list-group-item-info.active,a.list-group-item-info.active:hover,button.list-group-item-info.active:hover,a.list-group-item-info.active:focus,button.list-group-item-info.active:focus{color:#fff;background-color:#3a87ad;border-color:#3a87ad}.list-group-item-warning{color:#c09853;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#c09853}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:hover,button.list-group-item-warning:hover,a.list-group-item-warning:focus,button.list-group-item-warning:focus{color:#c09853;background-color:#faf2cc}a.list-group-item-warning.active,button.list-group-item-warning.active,a.list-group-item-warning.active:hover,button.list-group-item-warning.active:hover,a.list-group-item-warning.active:focus,button.list-group-item-warning.active:focus{color:#fff;background-color:#c09853;border-color:#c09853}.list-group-item-danger{color:#b94a48;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#b94a48}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:hover,button.list-group-item-danger:hover,a.list-group-item-danger:focus,button.list-group-item-danger:focus{color:#b94a48;background-color:#ebcccc}a.list-group-item-danger.active,button.list-group-item-danger.active,a.list-group-item-danger.active:hover,button.list-group-item-danger.active:hover,a.list-group-item-danger.active:focus,button.list-group-item-danger.active:focus{color:#fff;background-color:#b94a48;border-color:#b94a48}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#ffffff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>a,.panel-title>small,.panel-title>.small,.panel-title>small>a,.panel-title>.small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #dddddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.table,.panel>.table-responsive>.table,.panel>.panel-collapse>.table{margin-bottom:0}.panel>.table caption,.panel>.table-responsive>.table caption,.panel>.panel-collapse>.table caption{padding-left:15px;padding-right:15px}.panel>.table:first-child,.panel>.table-responsive:first-child>.table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table:last-child,.panel>.table-responsive:last-child>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-left-radius:3px;border-bottom-right-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #dddddd}.panel>.table>tbody:first-child>tr:first-child th,.panel>.table>tbody:first-child>tr:first-child td{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child{border-left:0}.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child{border-right:0}.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{border:0;margin-bottom:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.panel-body,.panel-group .panel-heading+.panel-collapse>.list-group{border-top:1px solid #dddddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #dddddd}.panel-default{border-color:#dddddd}.panel-default>.panel-heading{color:#333333;background-color:#f5f5f5;border-color:#dddddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dddddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dddddd}.panel-primary{border-color:#dd4814}.panel-primary>.panel-heading{color:#ffffff;background-color:#dd4814;border-color:#dd4814}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#dd4814}.panel-primary>.panel-heading .badge{color:#dd4814;background-color:#ffffff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#dd4814}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#468847}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#3a87ad}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#fbeed5}.panel-warning>.panel-heading{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#fbeed5}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#c09853}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#fbeed5}.panel-danger{border-color:#eed3d7}.panel-danger>.panel-heading{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#eed3d7}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#b94a48}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#eed3d7}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive iframe,.embed-responsive embed,.embed-responsive object,.embed-responsive video{position:absolute;top:0;left:0;bottom:0;height:100%;width:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.modal-open{overflow:hidden}.modal{display:none;overflow:hidden;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transform:translate(0, -25%);-ms-transform:translate(0, -25%);-o-transform:translate(0, -25%);transform:translate(0, -25%);-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.in .modal-dialog{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#ffffff;border:1px solid #999999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);-webkit-background-clip:padding-box;background-clip:padding-box;outline:0}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.in{opacity:0.5;filter:alpha(opacity=50)}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:20px}.modal-footer{padding:20px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Ubuntu",Tahoma,"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:12px;opacity:0;filter:alpha(opacity=0)}.tooltip.in{opacity:0.9;filter:alpha(opacity=90)}.tooltip.top{margin-top:-3px;padding:5px 0}.tooltip.right{margin-left:3px;padding:0 5px}.tooltip.bottom{margin-top:3px;padding:5px 0}.tooltip.left{margin-left:-3px;padding:0 5px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;background-color:#000000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-left .tooltip-arrow{bottom:0;right:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Ubuntu",Tahoma,"Helvetica Neue",Helvetica,Arial,sans-serif;font-style:normal;font-weight:normal;letter-spacing:normal;line-break:auto;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;white-space:normal;word-break:normal;word-spacing:normal;word-wrap:normal;font-size:14px;background-color:#ffffff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #cccccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{margin:0;padding:8px 14px;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{border-width:10px;content:""}.popover.top>.arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999999;border-top-color:rgba(0,0,0,0.25);bottom:-11px}.popover.top>.arrow:after{content:" ";bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999999;border-right-color:rgba(0,0,0,0.25)}.popover.right>.arrow:after{content:" ";left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff}.popover.bottom>.arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.popover.bottom>.arrow:after{content:" ";top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999999;border-left-color:rgba(0,0,0,0.25)}.popover.left>.arrow:after{content:" ";right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px}.carousel{position:relative}.carousel-inner{position:relative;overflow:hidden;width:100%}.carousel-inner>.item{display:none;position:relative;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.next,.carousel-inner>.item.active.right{-webkit-transform:translate3d(100%, 0, 0);transform:translate3d(100%, 0, 0);left:0}.carousel-inner>.item.prev,.carousel-inner>.item.active.left{-webkit-transform:translate3d(-100%, 0, 0);transform:translate3d(-100%, 0, 0);left:0}.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right,.carousel-inner>.item.active{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0);left:0}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;left:0;bottom:0;width:15%;opacity:0.5;filter:alpha(opacity=50);font-size:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);background-color:rgba(0,0,0,0)}.carousel-control.left{background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.5)), to(rgba(0,0,0,0.0001)));background-image:linear-gradient(to right, rgba(0,0,0,0.5) 0, rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1)}.carousel-control.right{left:auto;right:0;background-image:-webkit-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-o-linear-gradient(left, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-image:-webkit-gradient(linear, left top, right top, from(rgba(0,0,0,0.0001)), to(rgba(0,0,0,0.5)));background-image:linear-gradient(to right, rgba(0,0,0,0.0001) 0, rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1)}.carousel-control:hover,.carousel-control:focus{outline:0;color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90)}.carousel-control .icon-prev,.carousel-control .icon-next,.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right{position:absolute;top:50%;margin-top:-10px;z-index:5;display:inline-block}.carousel-control .icon-prev,.carousel-control .glyphicon-chevron-left{left:50%;margin-left:-10px}.carousel-control .icon-next,.carousel-control .glyphicon-chevron-right{right:50%;margin-right:-10px}.carousel-control .icon-prev,.carousel-control .icon-next{width:20px;height:20px;line-height:1;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;margin-left:-30%;padding-left:0;list-style:none;text-align:center}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;border:1px solid #ffffff;border-radius:10px;cursor:pointer;background-color:#000 \9;background-color:rgba(0,0,0,0)}.carousel-indicators .active{margin:0;width:12px;height:12px;background-color:#ffffff}.carousel-caption{position:absolute;left:15%;right:15%;bottom:20px;z-index:10;padding-top:20px;padding-bottom:20px;color:#ffffff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{left:20%;right:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.clearfix:before,.clearfix:after,.dl-horizontal dd:before,.dl-horizontal dd:after,.container:before,.container:after,.container-fluid:before,.container-fluid:after,.row:before,.row:after,.form-horizontal .form-group:before,.form-horizontal .form-group:after,.btn-toolbar:before,.btn-toolbar:after,.btn-group-vertical>.btn-group:before,.btn-group-vertical>.btn-group:after,.nav:before,.nav:after,.navbar:before,.navbar:after,.navbar-header:before,.navbar-header:after,.navbar-collapse:before,.navbar-collapse:after,.pager:before,.pager:after,.panel-body:before,.panel-body:after,.modal-header:before,.modal-header:after,.modal-footer:before,.modal-footer:after{content:" ";display:table}.clearfix:after,.dl-horizontal dd:after,.container:after,.container-fluid:after,.row:after,.form-horizontal .form-group:after,.btn-toolbar:after,.btn-group-vertical>.btn-group:after,.nav:after,.navbar:after,.navbar-header:after,.navbar-collapse:after,.pager:after,.panel-body:after,.modal-header:after,.modal-footer:after{clear:both}.center-block{display:block;margin-left:auto;margin-right:auto}.pull-right{float:right !important}.pull-left{float:left !important}.hide{display:none !important}.show{display:block !important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none !important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-xs,.visible-sm,.visible-md,.visible-lg{display:none !important}.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block{display:none !important}@media (max-width:767px){.visible-xs{display:block !important}table.visible-xs{display:table !important}tr.visible-xs{display:table-row !important}th.visible-xs,td.visible-xs{display:table-cell !important}}@media (max-width:767px){.visible-xs-block{display:block !important}}@media (max-width:767px){.visible-xs-inline{display:inline !important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block !important}table.visible-sm{display:table !important}tr.visible-sm{display:table-row !important}th.visible-sm,td.visible-sm{display:table-cell !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline !important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block !important}table.visible-md{display:table !important}tr.visible-md{display:table-row !important}th.visible-md,td.visible-md{display:table-cell !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline !important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block !important}}@media (min-width:1200px){.visible-lg{display:block !important}table.visible-lg{display:table !important}tr.visible-lg{display:table-row !important}th.visible-lg,td.visible-lg{display:table-cell !important}}@media (min-width:1200px){.visible-lg-block{display:block !important}}@media (min-width:1200px){.visible-lg-inline{display:inline !important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block !important}}@media (max-width:767px){.hidden-xs{display:none !important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none !important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none !important}}@media (min-width:1200px){.hidden-lg{display:none !important}}.visible-print{display:none !important}@media print{.visible-print{display:block !important}table.visible-print{display:table !important}tr.visible-print{display:table-row !important}th.visible-print,td.visible-print{display:table-cell !important}}.visible-print-block{display:none !important}@media print{.visible-print-block{display:block !important}}.visible-print-inline{display:none !important}@media print{.visible-print-inline{display:inline !important}}.visible-print-inline-block{display:none !important}@media print{.visible-print-inline-block{display:inline-block !important}}@media print{.hidden-print{display:none !important}}.navbar-default .badge{background-color:#fff;color:#dd4814}.navbar-inverse .badge{background-color:#fff;color:#772953}@media (max-width:767px){.navbar .dropdown-menu a{color:#fff}} No newline at end of file
@@ -0,0 +1,2
1 .bk-bs-container{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}@media(min-width:768px){.bk-bs-container{width:750px}}@media(min-width:992px){.bk-bs-container{width:970px}}@media(min-width:1200px){.bk-bs-container{width:1170px}}.bk-bs-container-fluid{margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}.bk-bs-row{margin-left:-15px;margin-right:-15px}.bk-bs-col-xs-1,.bk-bs-col-sm-1,.bk-bs-col-md-1,.bk-bs-col-lg-1,.bk-bs-col-xs-2,.bk-bs-col-sm-2,.bk-bs-col-md-2,.bk-bs-col-lg-2,.bk-bs-col-xs-3,.bk-bs-col-sm-3,.bk-bs-col-md-3,.bk-bs-col-lg-3,.bk-bs-col-xs-4,.bk-bs-col-sm-4,.bk-bs-col-md-4,.bk-bs-col-lg-4,.bk-bs-col-xs-5,.bk-bs-col-sm-5,.bk-bs-col-md-5,.bk-bs-col-lg-5,.bk-bs-col-xs-6,.bk-bs-col-sm-6,.bk-bs-col-md-6,.bk-bs-col-lg-6,.bk-bs-col-xs-7,.bk-bs-col-sm-7,.bk-bs-col-md-7,.bk-bs-col-lg-7,.bk-bs-col-xs-8,.bk-bs-col-sm-8,.bk-bs-col-md-8,.bk-bs-col-lg-8,.bk-bs-col-xs-9,.bk-bs-col-sm-9,.bk-bs-col-md-9,.bk-bs-col-lg-9,.bk-bs-col-xs-10,.bk-bs-col-sm-10,.bk-bs-col-md-10,.bk-bs-col-lg-10,.bk-bs-col-xs-11,.bk-bs-col-sm-11,.bk-bs-col-md-11,.bk-bs-col-lg-11,.bk-bs-col-xs-12,.bk-bs-col-sm-12,.bk-bs-col-md-12,.bk-bs-col-lg-12{position:relative;min-height:1px;padding-left:15px;padding-right:15px}.bk-bs-col-xs-1,.bk-bs-col-xs-2,.bk-bs-col-xs-3,.bk-bs-col-xs-4,.bk-bs-col-xs-5,.bk-bs-col-xs-6,.bk-bs-col-xs-7,.bk-bs-col-xs-8,.bk-bs-col-xs-9,.bk-bs-col-xs-10,.bk-bs-col-xs-11,.bk-bs-col-xs-12{float:left}.bk-bs-col-xs-12{width:100%}.bk-bs-col-xs-11{width:91.66666667%}.bk-bs-col-xs-10{width:83.33333333%}.bk-bs-col-xs-9{width:75%}.bk-bs-col-xs-8{width:66.66666667%}.bk-bs-col-xs-7{width:58.33333333%}.bk-bs-col-xs-6{width:50%}.bk-bs-col-xs-5{width:41.66666667%}.bk-bs-col-xs-4{width:33.33333333%}.bk-bs-col-xs-3{width:25%}.bk-bs-col-xs-2{width:16.66666667%}.bk-bs-col-xs-1{width:8.33333333%}.bk-bs-col-xs-pull-12{right:100%}.bk-bs-col-xs-pull-11{right:91.66666667%}.bk-bs-col-xs-pull-10{right:83.33333333%}.bk-bs-col-xs-pull-9{right:75%}.bk-bs-col-xs-pull-8{right:66.66666667%}.bk-bs-col-xs-pull-7{right:58.33333333%}.bk-bs-col-xs-pull-6{right:50%}.bk-bs-col-xs-pull-5{right:41.66666667%}.bk-bs-col-xs-pull-4{right:33.33333333%}.bk-bs-col-xs-pull-3{right:25%}.bk-bs-col-xs-pull-2{right:16.66666667%}.bk-bs-col-xs-pull-1{right:8.33333333%}.bk-bs-col-xs-pull-0{right:0}.bk-bs-col-xs-push-12{left:100%}.bk-bs-col-xs-push-11{left:91.66666667%}.bk-bs-col-xs-push-10{left:83.33333333%}.bk-bs-col-xs-push-9{left:75%}.bk-bs-col-xs-push-8{left:66.66666667%}.bk-bs-col-xs-push-7{left:58.33333333%}.bk-bs-col-xs-push-6{left:50%}.bk-bs-col-xs-push-5{left:41.66666667%}.bk-bs-col-xs-push-4{left:33.33333333%}.bk-bs-col-xs-push-3{left:25%}.bk-bs-col-xs-push-2{left:16.66666667%}.bk-bs-col-xs-push-1{left:8.33333333%}.bk-bs-col-xs-push-0{left:0}.bk-bs-col-xs-offset-12{margin-left:100%}.bk-bs-col-xs-offset-11{margin-left:91.66666667%}.bk-bs-col-xs-offset-10{margin-left:83.33333333%}.bk-bs-col-xs-offset-9{margin-left:75%}.bk-bs-col-xs-offset-8{margin-left:66.66666667%}.bk-bs-col-xs-offset-7{margin-left:58.33333333%}.bk-bs-col-xs-offset-6{margin-left:50%}.bk-bs-col-xs-offset-5{margin-left:41.66666667%}.bk-bs-col-xs-offset-4{margin-left:33.33333333%}.bk-bs-col-xs-offset-3{margin-left:25%}.bk-bs-col-xs-offset-2{margin-left:16.66666667%}.bk-bs-col-xs-offset-1{margin-left:8.33333333%}.bk-bs-col-xs-offset-0{margin-left:0}@media(min-width:768px){.bk-bs-col-sm-1,.bk-bs-col-sm-2,.bk-bs-col-sm-3,.bk-bs-col-sm-4,.bk-bs-col-sm-5,.bk-bs-col-sm-6,.bk-bs-col-sm-7,.bk-bs-col-sm-8,.bk-bs-col-sm-9,.bk-bs-col-sm-10,.bk-bs-col-sm-11,.bk-bs-col-sm-12{float:left}.bk-bs-col-sm-12{width:100%}.bk-bs-col-sm-11{width:91.66666667%}.bk-bs-col-sm-10{width:83.33333333%}.bk-bs-col-sm-9{width:75%}.bk-bs-col-sm-8{width:66.66666667%}.bk-bs-col-sm-7{width:58.33333333%}.bk-bs-col-sm-6{width:50%}.bk-bs-col-sm-5{width:41.66666667%}.bk-bs-col-sm-4{width:33.33333333%}.bk-bs-col-sm-3{width:25%}.bk-bs-col-sm-2{width:16.66666667%}.bk-bs-col-sm-1{width:8.33333333%}.bk-bs-col-sm-pull-12{right:100%}.bk-bs-col-sm-pull-11{right:91.66666667%}.bk-bs-col-sm-pull-10{right:83.33333333%}.bk-bs-col-sm-pull-9{right:75%}.bk-bs-col-sm-pull-8{right:66.66666667%}.bk-bs-col-sm-pull-7{right:58.33333333%}.bk-bs-col-sm-pull-6{right:50%}.bk-bs-col-sm-pull-5{right:41.66666667%}.bk-bs-col-sm-pull-4{right:33.33333333%}.bk-bs-col-sm-pull-3{right:25%}.bk-bs-col-sm-pull-2{right:16.66666667%}.bk-bs-col-sm-pull-1{right:8.33333333%}.bk-bs-col-sm-pull-0{right:0}.bk-bs-col-sm-push-12{left:100%}.bk-bs-col-sm-push-11{left:91.66666667%}.bk-bs-col-sm-push-10{left:83.33333333%}.bk-bs-col-sm-push-9{left:75%}.bk-bs-col-sm-push-8{left:66.66666667%}.bk-bs-col-sm-push-7{left:58.33333333%}.bk-bs-col-sm-push-6{left:50%}.bk-bs-col-sm-push-5{left:41.66666667%}.bk-bs-col-sm-push-4{left:33.33333333%}.bk-bs-col-sm-push-3{left:25%}.bk-bs-col-sm-push-2{left:16.66666667%}.bk-bs-col-sm-push-1{left:8.33333333%}.bk-bs-col-sm-push-0{left:0}.bk-bs-col-sm-offset-12{margin-left:100%}.bk-bs-col-sm-offset-11{margin-left:91.66666667%}.bk-bs-col-sm-offset-10{margin-left:83.33333333%}.bk-bs-col-sm-offset-9{margin-left:75%}.bk-bs-col-sm-offset-8{margin-left:66.66666667%}.bk-bs-col-sm-offset-7{margin-left:58.33333333%}.bk-bs-col-sm-offset-6{margin-left:50%}.bk-bs-col-sm-offset-5{margin-left:41.66666667%}.bk-bs-col-sm-offset-4{margin-left:33.33333333%}.bk-bs-col-sm-offset-3{margin-left:25%}.bk-bs-col-sm-offset-2{margin-left:16.66666667%}.bk-bs-col-sm-offset-1{margin-left:8.33333333%}.bk-bs-col-sm-offset-0{margin-left:0}}@media(min-width:992px){.bk-bs-col-md-1,.bk-bs-col-md-2,.bk-bs-col-md-3,.bk-bs-col-md-4,.bk-bs-col-md-5,.bk-bs-col-md-6,.bk-bs-col-md-7,.bk-bs-col-md-8,.bk-bs-col-md-9,.bk-bs-col-md-10,.bk-bs-col-md-11,.bk-bs-col-md-12{float:left}.bk-bs-col-md-12{width:100%}.bk-bs-col-md-11{width:91.66666667%}.bk-bs-col-md-10{width:83.33333333%}.bk-bs-col-md-9{width:75%}.bk-bs-col-md-8{width:66.66666667%}.bk-bs-col-md-7{width:58.33333333%}.bk-bs-col-md-6{width:50%}.bk-bs-col-md-5{width:41.66666667%}.bk-bs-col-md-4{width:33.33333333%}.bk-bs-col-md-3{width:25%}.bk-bs-col-md-2{width:16.66666667%}.bk-bs-col-md-1{width:8.33333333%}.bk-bs-col-md-pull-12{right:100%}.bk-bs-col-md-pull-11{right:91.66666667%}.bk-bs-col-md-pull-10{right:83.33333333%}.bk-bs-col-md-pull-9{right:75%}.bk-bs-col-md-pull-8{right:66.66666667%}.bk-bs-col-md-pull-7{right:58.33333333%}.bk-bs-col-md-pull-6{right:50%}.bk-bs-col-md-pull-5{right:41.66666667%}.bk-bs-col-md-pull-4{right:33.33333333%}.bk-bs-col-md-pull-3{right:25%}.bk-bs-col-md-pull-2{right:16.66666667%}.bk-bs-col-md-pull-1{right:8.33333333%}.bk-bs-col-md-pull-0{right:0}.bk-bs-col-md-push-12{left:100%}.bk-bs-col-md-push-11{left:91.66666667%}.bk-bs-col-md-push-10{left:83.33333333%}.bk-bs-col-md-push-9{left:75%}.bk-bs-col-md-push-8{left:66.66666667%}.bk-bs-col-md-push-7{left:58.33333333%}.bk-bs-col-md-push-6{left:50%}.bk-bs-col-md-push-5{left:41.66666667%}.bk-bs-col-md-push-4{left:33.33333333%}.bk-bs-col-md-push-3{left:25%}.bk-bs-col-md-push-2{left:16.66666667%}.bk-bs-col-md-push-1{left:8.33333333%}.bk-bs-col-md-push-0{left:0}.bk-bs-col-md-offset-12{margin-left:100%}.bk-bs-col-md-offset-11{margin-left:91.66666667%}.bk-bs-col-md-offset-10{margin-left:83.33333333%}.bk-bs-col-md-offset-9{margin-left:75%}.bk-bs-col-md-offset-8{margin-left:66.66666667%}.bk-bs-col-md-offset-7{margin-left:58.33333333%}.bk-bs-col-md-offset-6{margin-left:50%}.bk-bs-col-md-offset-5{margin-left:41.66666667%}.bk-bs-col-md-offset-4{margin-left:33.33333333%}.bk-bs-col-md-offset-3{margin-left:25%}.bk-bs-col-md-offset-2{margin-left:16.66666667%}.bk-bs-col-md-offset-1{margin-left:8.33333333%}.bk-bs-col-md-offset-0{margin-left:0}}@media(min-width:1200px){.bk-bs-col-lg-1,.bk-bs-col-lg-2,.bk-bs-col-lg-3,.bk-bs-col-lg-4,.bk-bs-col-lg-5,.bk-bs-col-lg-6,.bk-bs-col-lg-7,.bk-bs-col-lg-8,.bk-bs-col-lg-9,.bk-bs-col-lg-10,.bk-bs-col-lg-11,.bk-bs-col-lg-12{float:left}.bk-bs-col-lg-12{width:100%}.bk-bs-col-lg-11{width:91.66666667%}.bk-bs-col-lg-10{width:83.33333333%}.bk-bs-col-lg-9{width:75%}.bk-bs-col-lg-8{width:66.66666667%}.bk-bs-col-lg-7{width:58.33333333%}.bk-bs-col-lg-6{width:50%}.bk-bs-col-lg-5{width:41.66666667%}.bk-bs-col-lg-4{width:33.33333333%}.bk-bs-col-lg-3{width:25%}.bk-bs-col-lg-2{width:16.66666667%}.bk-bs-col-lg-1{width:8.33333333%}.bk-bs-col-lg-pull-12{right:100%}.bk-bs-col-lg-pull-11{right:91.66666667%}.bk-bs-col-lg-pull-10{right:83.33333333%}.bk-bs-col-lg-pull-9{right:75%}.bk-bs-col-lg-pull-8{right:66.66666667%}.bk-bs-col-lg-pull-7{right:58.33333333%}.bk-bs-col-lg-pull-6{right:50%}.bk-bs-col-lg-pull-5{right:41.66666667%}.bk-bs-col-lg-pull-4{right:33.33333333%}.bk-bs-col-lg-pull-3{right:25%}.bk-bs-col-lg-pull-2{right:16.66666667%}.bk-bs-col-lg-pull-1{right:8.33333333%}.bk-bs-col-lg-pull-0{right:0}.bk-bs-col-lg-push-12{left:100%}.bk-bs-col-lg-push-11{left:91.66666667%}.bk-bs-col-lg-push-10{left:83.33333333%}.bk-bs-col-lg-push-9{left:75%}.bk-bs-col-lg-push-8{left:66.66666667%}.bk-bs-col-lg-push-7{left:58.33333333%}.bk-bs-col-lg-push-6{left:50%}.bk-bs-col-lg-push-5{left:41.66666667%}.bk-bs-col-lg-push-4{left:33.33333333%}.bk-bs-col-lg-push-3{left:25%}.bk-bs-col-lg-push-2{left:16.66666667%}.bk-bs-col-lg-push-1{left:8.33333333%}.bk-bs-col-lg-push-0{left:0}.bk-bs-col-lg-offset-12{margin-left:100%}.bk-bs-col-lg-offset-11{margin-left:91.66666667%}.bk-bs-col-lg-offset-10{margin-left:83.33333333%}.bk-bs-col-lg-offset-9{margin-left:75%}.bk-bs-col-lg-offset-8{margin-left:66.66666667%}.bk-bs-col-lg-offset-7{margin-left:58.33333333%}.bk-bs-col-lg-offset-6{margin-left:50%}.bk-bs-col-lg-offset-5{margin-left:41.66666667%}.bk-bs-col-lg-offset-4{margin-left:33.33333333%}.bk-bs-col-lg-offset-3{margin-left:25%}.bk-bs-col-lg-offset-2{margin-left:16.66666667%}.bk-bs-col-lg-offset-1{margin-left:8.33333333%}.bk-bs-col-lg-offset-0{margin-left:0}}table{max-width:100%;background-color:transparent}th{text-align:left}.bk-bs-table{width:100%;margin-bottom:20px}.bk-bs-table>thead>tr>th,.bk-bs-table>tbody>tr>th,.bk-bs-table>tfoot>tr>th,.bk-bs-table>thead>tr>td,.bk-bs-table>tbody>tr>td,.bk-bs-table>tfoot>tr>td{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.bk-bs-table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.bk-bs-table>caption+thead>tr:first-child>th,.bk-bs-table>colgroup+thead>tr:first-child>th,.bk-bs-table>thead:first-child>tr:first-child>th,.bk-bs-table>caption+thead>tr:first-child>td,.bk-bs-table>colgroup+thead>tr:first-child>td,.bk-bs-table>thead:first-child>tr:first-child>td{border-top:0}.bk-bs-table>tbody+tbody{border-top:2px solid #ddd}.bk-bs-table .bk-bs-table{background-color:#fff}.bk-bs-table-condensed>thead>tr>th,.bk-bs-table-condensed>tbody>tr>th,.bk-bs-table-condensed>tfoot>tr>th,.bk-bs-table-condensed>thead>tr>td,.bk-bs-table-condensed>tbody>tr>td,.bk-bs-table-condensed>tfoot>tr>td{padding:5px}.bk-bs-table-bordered{border:1px solid #ddd}.bk-bs-table-bordered>thead>tr>th,.bk-bs-table-bordered>tbody>tr>th,.bk-bs-table-bordered>tfoot>tr>th,.bk-bs-table-bordered>thead>tr>td,.bk-bs-table-bordered>tbody>tr>td,.bk-bs-table-bordered>tfoot>tr>td{border:1px solid #ddd}.bk-bs-table-bordered>thead>tr>th,.bk-bs-table-bordered>thead>tr>td{border-bottom-width:2px}.bk-bs-table-striped>tbody>tr:nth-child(odd)>td,.bk-bs-table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.bk-bs-table-hover>tbody>tr:hover>td,.bk-bs-table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class*="col-"]{position:static;float:none;display:table-column}table td[class*="col-"],table th[class*="col-"]{position:static;float:none;display:table-cell}.bk-bs-table>thead>tr>td.active,.bk-bs-table>tbody>tr>td.active,.bk-bs-table>tfoot>tr>td.active,.bk-bs-table>thead>tr>th.active,.bk-bs-table>tbody>tr>th.active,.bk-bs-table>tfoot>tr>th.active,.bk-bs-table>thead>tr.active>td,.bk-bs-table>tbody>tr.active>td,.bk-bs-table>tfoot>tr.active>td,.bk-bs-table>thead>tr.active>th,.bk-bs-table>tbody>tr.active>th,.bk-bs-table>tfoot>tr.active>th{background-color:#f5f5f5}.bk-bs-table-hover>tbody>tr>td.active:hover,.bk-bs-table-hover>tbody>tr>th.active:hover,.bk-bs-table-hover>tbody>tr.active:hover>td,.bk-bs-table-hover>tbody>tr.active:hover>th{background-color:#e8e8e8}.bk-bs-table>thead>tr>td.success,.bk-bs-table>tbody>tr>td.success,.bk-bs-table>tfoot>tr>td.success,.bk-bs-table>thead>tr>th.success,.bk-bs-table>tbody>tr>th.success,.bk-bs-table>tfoot>tr>th.success,.bk-bs-table>thead>tr.success>td,.bk-bs-table>tbody>tr.success>td,.bk-bs-table>tfoot>tr.success>td,.bk-bs-table>thead>tr.success>th,.bk-bs-table>tbody>tr.success>th,.bk-bs-table>tfoot>tr.success>th{background-color:#dff0d8}.bk-bs-table-hover>tbody>tr>td.success:hover,.bk-bs-table-hover>tbody>tr>th.success:hover,.bk-bs-table-hover>tbody>tr.success:hover>td,.bk-bs-table-hover>tbody>tr.success:hover>th{background-color:#d0e9c6}.bk-bs-table>thead>tr>td.info,.bk-bs-table>tbody>tr>td.info,.bk-bs-table>tfoot>tr>td.info,.bk-bs-table>thead>tr>th.info,.bk-bs-table>tbody>tr>th.info,.bk-bs-table>tfoot>tr>th.info,.bk-bs-table>thead>tr.info>td,.bk-bs-table>tbody>tr.info>td,.bk-bs-table>tfoot>tr.info>td,.bk-bs-table>thead>tr.info>th,.bk-bs-table>tbody>tr.info>th,.bk-bs-table>tfoot>tr.info>th{background-color:#d9edf7}.bk-bs-table-hover>tbody>tr>td.info:hover,.bk-bs-table-hover>tbody>tr>th.info:hover,.bk-bs-table-hover>tbody>tr.info:hover>td,.bk-bs-table-hover>tbody>tr.info:hover>th{background-color:#c4e3f3}.bk-bs-table>thead>tr>td.warning,.bk-bs-table>tbody>tr>td.warning,.bk-bs-table>tfoot>tr>td.warning,.bk-bs-table>thead>tr>th.warning,.bk-bs-table>tbody>tr>th.warning,.bk-bs-table>tfoot>tr>th.warning,.bk-bs-table>thead>tr.warning>td,.bk-bs-table>tbody>tr.warning>td,.bk-bs-table>tfoot>tr.warning>td,.bk-bs-table>thead>tr.warning>th,.bk-bs-table>tbody>tr.warning>th,.bk-bs-table>tfoot>tr.warning>th{background-color:#fcf8e3}.bk-bs-table-hover>tbody>tr>td.warning:hover,.bk-bs-table-hover>tbody>tr>th.warning:hover,.bk-bs-table-hover>tbody>tr.warning:hover>td,.bk-bs-table-hover>tbody>tr.warning:hover>th{background-color:#faf2cc}.bk-bs-table>thead>tr>td.danger,.bk-bs-table>tbody>tr>td.danger,.bk-bs-table>tfoot>tr>td.danger,.bk-bs-table>thead>tr>th.danger,.bk-bs-table>tbody>tr>th.danger,.bk-bs-table>tfoot>tr>th.danger,.bk-bs-table>thead>tr.danger>td,.bk-bs-table>tbody>tr.danger>td,.bk-bs-table>tfoot>tr.danger>td,.bk-bs-table>thead>tr.danger>th,.bk-bs-table>tbody>tr.danger>th,.bk-bs-table>tfoot>tr.danger>th{background-color:#f2dede}.bk-bs-table-hover>tbody>tr>td.danger:hover,.bk-bs-table-hover>tbody>tr>th.danger:hover,.bk-bs-table-hover>tbody>tr.danger:hover>td,.bk-bs-table-hover>tbody>tr.danger:hover>th{background-color:#ebcccc}@media(max-width:767px){.bk-bs-table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;overflow-x:scroll;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd;-webkit-overflow-scrolling:touch}.bk-bs-table-responsive>.bk-bs-table{margin-bottom:0}.bk-bs-table-responsive>.bk-bs-table>thead>tr>th,.bk-bs-table-responsive>.bk-bs-table>tbody>tr>th,.bk-bs-table-responsive>.bk-bs-table>tfoot>tr>th,.bk-bs-table-responsive>.bk-bs-table>thead>tr>td,.bk-bs-table-responsive>.bk-bs-table>tbody>tr>td,.bk-bs-table-responsive>.bk-bs-table>tfoot>tr>td{white-space:nowrap}.bk-bs-table-responsive>.bk-bs-table-bordered{border:0}.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:first-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:first-child{border-left:0}.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:last-child,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:last-child{border-right:0}.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>th,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>th,.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>td,.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>td{border-bottom:0}}fieldset{padding:0;margin:0;border:0;min-width:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}input[type="range"]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.bk-bs-form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.bk-bs-form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,0.6)}.bk-bs-form-control::-moz-placeholder{color:#999;opacity:1}.bk-bs-form-control:-ms-input-placeholder{color:#999}.bk-bs-form-control::-webkit-input-placeholder{color:#999}.bk-bs-form-control[disabled],.bk-bs-form-control[readonly],fieldset[disabled] .bk-bs-form-control{cursor:not-allowed;background-color:#eee;opacity:1}textarea.bk-bs-form-control{height:auto}input[type="search"]{-webkit-appearance:none}input[type="date"]{line-height:34px}.bk-bs-form-group{margin-bottom:15px}.bk-bs-radio,.bk-bs-checkbox{display:block;min-height:20px;margin-top:10px;margin-bottom:10px;padding-left:20px}.bk-bs-radio label,.bk-bs-checkbox label{display:inline;font-weight:normal;cursor:pointer}.bk-bs-radio input[type="radio"],.bk-bs-radio-inline input[type="radio"],.bk-bs-checkbox input[type="checkbox"],.bk-bs-checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.bk-bs-radio+.bk-bs-radio,.bk-bs-checkbox+.bk-bs-checkbox{margin-top:-5px}.bk-bs-radio-inline,.bk-bs-checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;vertical-align:middle;font-weight:normal;cursor:pointer}.bk-bs-radio-inline+.bk-bs-radio-inline,.bk-bs-checkbox-inline+.bk-bs-checkbox-inline{margin-top:0;margin-left:10px}input[type="radio"][disabled],input[type="checkbox"][disabled],.bk-bs-radio[disabled],.bk-bs-radio-inline[disabled],.bk-bs-checkbox[disabled],.bk-bs-checkbox-inline[disabled],fieldset[disabled] input[type="radio"],fieldset[disabled] input[type="checkbox"],fieldset[disabled] .bk-bs-radio,fieldset[disabled] .bk-bs-radio-inline,fieldset[disabled] .bk-bs-checkbox,fieldset[disabled] .bk-bs-checkbox-inline{cursor:not-allowed}.bk-bs-input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.bk-bs-input-sm{height:30px;line-height:30px}textarea.bk-bs-input-sm,select[multiple].bk-bs-input-sm{height:auto}.bk-bs-input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.bk-bs-input-lg{height:46px;line-height:46px}textarea.bk-bs-input-lg,select[multiple].bk-bs-input-lg{height:auto}.bk-bs-has-feedback{position:relative}.bk-bs-has-feedback .bk-bs-form-control{padding-right:42.5px}.bk-bs-has-feedback .bk-bs-form-control-feedback{position:absolute;top:25px;right:0;display:block;width:34px;height:34px;line-height:34px;text-align:center}.bk-bs-has-success .bk-bs-help-block,.bk-bs-has-success .bk-bs-control-label,.bk-bs-has-success .bk-bs-radio,.bk-bs-has-success .bk-bs-checkbox,.bk-bs-has-success .bk-bs-radio-inline,.bk-bs-has-success .bk-bs-checkbox-inline{color:#3c763d}.bk-bs-has-success .bk-bs-form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.bk-bs-has-success .bk-bs-form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #67b168}.bk-bs-has-success .bk-bs-input-group-addon{color:#3c763d;border-color:#3c763d;background-color:#dff0d8}.bk-bs-has-success .bk-bs-form-control-feedback{color:#3c763d}.bk-bs-has-warning .bk-bs-help-block,.bk-bs-has-warning .bk-bs-control-label,.bk-bs-has-warning .bk-bs-radio,.bk-bs-has-warning .bk-bs-checkbox,.bk-bs-has-warning .bk-bs-radio-inline,.bk-bs-has-warning .bk-bs-checkbox-inline{color:#8a6d3b}.bk-bs-has-warning .bk-bs-form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.bk-bs-has-warning .bk-bs-form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #c0a16b}.bk-bs-has-warning .bk-bs-input-group-addon{color:#8a6d3b;border-color:#8a6d3b;background-color:#fcf8e3}.bk-bs-has-warning .bk-bs-form-control-feedback{color:#8a6d3b}.bk-bs-has-error .bk-bs-help-block,.bk-bs-has-error .bk-bs-control-label,.bk-bs-has-error .bk-bs-radio,.bk-bs-has-error .bk-bs-checkbox,.bk-bs-has-error .bk-bs-radio-inline,.bk-bs-has-error .bk-bs-checkbox-inline{color:#a94442}.bk-bs-has-error .bk-bs-form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.bk-bs-has-error .bk-bs-form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #ce8483}.bk-bs-has-error .bk-bs-input-group-addon{color:#a94442;border-color:#a94442;background-color:#f2dede}.bk-bs-has-error .bk-bs-form-control-feedback{color:#a94442}.bk-bs-form-control-static{margin-bottom:0}.bk-bs-help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media(min-width:768px){.bk-bs-form-inline .bk-bs-form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.bk-bs-form-inline .bk-bs-form-control{display:inline-block;width:auto;vertical-align:middle}.bk-bs-form-inline .bk-bs-input-group>.bk-bs-form-control{width:100%}.bk-bs-form-inline .bk-bs-control-label{margin-bottom:0;vertical-align:middle}.bk-bs-form-inline .bk-bs-radio,.bk-bs-form-inline .bk-bs-checkbox{display:inline-block;margin-top:0;margin-bottom:0;padding-left:0;vertical-align:middle}.bk-bs-form-inline .bk-bs-radio input[type="radio"],.bk-bs-form-inline .bk-bs-checkbox input[type="checkbox"]{float:none;margin-left:0}.bk-bs-form-inline .bk-bs-has-feedback .bk-bs-form-control-feedback{top:0}}.bk-bs-form-horizontal .bk-bs-control-label,.bk-bs-form-horizontal .bk-bs-radio,.bk-bs-form-horizontal .bk-bs-checkbox,.bk-bs-form-horizontal .bk-bs-radio-inline,.bk-bs-form-horizontal .bk-bs-checkbox-inline{margin-top:0;margin-bottom:0;padding-top:7px}.bk-bs-form-horizontal .bk-bs-radio,.bk-bs-form-horizontal .bk-bs-checkbox{min-height:27px}.bk-bs-form-horizontal .bk-bs-form-group{margin-left:-15px;margin-right:-15px}.bk-bs-form-horizontal .bk-bs-form-control-static{padding-top:7px}@media(min-width:768px){.bk-bs-form-horizontal .bk-bs-control-label{text-align:right}}.bk-bs-form-horizontal .bk-bs-has-feedback .bk-bs-form-control-feedback{top:0;right:15px}.bk-bs-btn{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.bk-bs-btn:focus,.bk-bs-btn:active:focus,.bk-bs-btn.bk-bs-active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.bk-bs-btn:hover,.bk-bs-btn:focus{color:#333;text-decoration:none}.bk-bs-btn:active,.bk-bs-btn.bk-bs-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.bk-bs-btn.bk-bs-disabled,.bk-bs-btn[disabled],fieldset[disabled] .bk-bs-btn{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.bk-bs-btn-default{color:#333;background-color:#fff;border-color:#ccc}.bk-bs-btn-default:hover,.bk-bs-btn-default:focus,.bk-bs-btn-default:active,.bk-bs-btn-default.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-default{color:#333;background-color:#ebebeb;border-color:#adadad}.bk-bs-btn-default:active,.bk-bs-btn-default.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-default{background-image:none}.bk-bs-btn-default.bk-bs-disabled,.bk-bs-btn-default[disabled],fieldset[disabled] .bk-bs-btn-default,.bk-bs-btn-default.bk-bs-disabled:hover,.bk-bs-btn-default[disabled]:hover,fieldset[disabled] .bk-bs-btn-default:hover,.bk-bs-btn-default.bk-bs-disabled:focus,.bk-bs-btn-default[disabled]:focus,fieldset[disabled] .bk-bs-btn-default:focus,.bk-bs-btn-default.bk-bs-disabled:active,.bk-bs-btn-default[disabled]:active,fieldset[disabled] .bk-bs-btn-default:active,.bk-bs-btn-default.bk-bs-disabled.bk-bs-active,.bk-bs-btn-default[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-default.bk-bs-active{background-color:#fff;border-color:#ccc}.bk-bs-btn-default .bk-bs-badge{color:#fff;background-color:#333}.bk-bs-btn-primary{color:#fff;background-color:#428bca;border-color:#357ebd}.bk-bs-btn-primary:hover,.bk-bs-btn-primary:focus,.bk-bs-btn-primary:active,.bk-bs-btn-primary.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-primary{color:#fff;background-color:#3276b1;border-color:#285e8e}.bk-bs-btn-primary:active,.bk-bs-btn-primary.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-primary{background-image:none}.bk-bs-btn-primary.bk-bs-disabled,.bk-bs-btn-primary[disabled],fieldset[disabled] .bk-bs-btn-primary,.bk-bs-btn-primary.bk-bs-disabled:hover,.bk-bs-btn-primary[disabled]:hover,fieldset[disabled] .bk-bs-btn-primary:hover,.bk-bs-btn-primary.bk-bs-disabled:focus,.bk-bs-btn-primary[disabled]:focus,fieldset[disabled] .bk-bs-btn-primary:focus,.bk-bs-btn-primary.bk-bs-disabled:active,.bk-bs-btn-primary[disabled]:active,fieldset[disabled] .bk-bs-btn-primary:active,.bk-bs-btn-primary.bk-bs-disabled.bk-bs-active,.bk-bs-btn-primary[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-primary.bk-bs-active{background-color:#428bca;border-color:#357ebd}.bk-bs-btn-primary .bk-bs-badge{color:#428bca;background-color:#fff}.bk-bs-btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.bk-bs-btn-success:hover,.bk-bs-btn-success:focus,.bk-bs-btn-success:active,.bk-bs-btn-success.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-success{color:#fff;background-color:#47a447;border-color:#398439}.bk-bs-btn-success:active,.bk-bs-btn-success.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-success{background-image:none}.bk-bs-btn-success.bk-bs-disabled,.bk-bs-btn-success[disabled],fieldset[disabled] .bk-bs-btn-success,.bk-bs-btn-success.bk-bs-disabled:hover,.bk-bs-btn-success[disabled]:hover,fieldset[disabled] .bk-bs-btn-success:hover,.bk-bs-btn-success.bk-bs-disabled:focus,.bk-bs-btn-success[disabled]:focus,fieldset[disabled] .bk-bs-btn-success:focus,.bk-bs-btn-success.bk-bs-disabled:active,.bk-bs-btn-success[disabled]:active,fieldset[disabled] .bk-bs-btn-success:active,.bk-bs-btn-success.bk-bs-disabled.bk-bs-active,.bk-bs-btn-success[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-success.bk-bs-active{background-color:#5cb85c;border-color:#4cae4c}.bk-bs-btn-success .bk-bs-badge{color:#5cb85c;background-color:#fff}.bk-bs-btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.bk-bs-btn-info:hover,.bk-bs-btn-info:focus,.bk-bs-btn-info:active,.bk-bs-btn-info.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-info{color:#fff;background-color:#39b3d7;border-color:#269abc}.bk-bs-btn-info:active,.bk-bs-btn-info.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-info{background-image:none}.bk-bs-btn-info.bk-bs-disabled,.bk-bs-btn-info[disabled],fieldset[disabled] .bk-bs-btn-info,.bk-bs-btn-info.bk-bs-disabled:hover,.bk-bs-btn-info[disabled]:hover,fieldset[disabled] .bk-bs-btn-info:hover,.bk-bs-btn-info.bk-bs-disabled:focus,.bk-bs-btn-info[disabled]:focus,fieldset[disabled] .bk-bs-btn-info:focus,.bk-bs-btn-info.bk-bs-disabled:active,.bk-bs-btn-info[disabled]:active,fieldset[disabled] .bk-bs-btn-info:active,.bk-bs-btn-info.bk-bs-disabled.bk-bs-active,.bk-bs-btn-info[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-info.bk-bs-active{background-color:#5bc0de;border-color:#46b8da}.bk-bs-btn-info .bk-bs-badge{color:#5bc0de;background-color:#fff}.bk-bs-btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.bk-bs-btn-warning:hover,.bk-bs-btn-warning:focus,.bk-bs-btn-warning:active,.bk-bs-btn-warning.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-warning{color:#fff;background-color:#ed9c28;border-color:#d58512}.bk-bs-btn-warning:active,.bk-bs-btn-warning.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-warning{background-image:none}.bk-bs-btn-warning.bk-bs-disabled,.bk-bs-btn-warning[disabled],fieldset[disabled] .bk-bs-btn-warning,.bk-bs-btn-warning.bk-bs-disabled:hover,.bk-bs-btn-warning[disabled]:hover,fieldset[disabled] .bk-bs-btn-warning:hover,.bk-bs-btn-warning.bk-bs-disabled:focus,.bk-bs-btn-warning[disabled]:focus,fieldset[disabled] .bk-bs-btn-warning:focus,.bk-bs-btn-warning.bk-bs-disabled:active,.bk-bs-btn-warning[disabled]:active,fieldset[disabled] .bk-bs-btn-warning:active,.bk-bs-btn-warning.bk-bs-disabled.bk-bs-active,.bk-bs-btn-warning[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-warning.bk-bs-active{background-color:#f0ad4e;border-color:#eea236}.bk-bs-btn-warning .bk-bs-badge{color:#f0ad4e;background-color:#fff}.bk-bs-btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.bk-bs-btn-danger:hover,.bk-bs-btn-danger:focus,.bk-bs-btn-danger:active,.bk-bs-btn-danger.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-danger{color:#fff;background-color:#d2322d;border-color:#ac2925}.bk-bs-btn-danger:active,.bk-bs-btn-danger.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-danger{background-image:none}.bk-bs-btn-danger.bk-bs-disabled,.bk-bs-btn-danger[disabled],fieldset[disabled] .bk-bs-btn-danger,.bk-bs-btn-danger.bk-bs-disabled:hover,.bk-bs-btn-danger[disabled]:hover,fieldset[disabled] .bk-bs-btn-danger:hover,.bk-bs-btn-danger.bk-bs-disabled:focus,.bk-bs-btn-danger[disabled]:focus,fieldset[disabled] .bk-bs-btn-danger:focus,.bk-bs-btn-danger.bk-bs-disabled:active,.bk-bs-btn-danger[disabled]:active,fieldset[disabled] .bk-bs-btn-danger:active,.bk-bs-btn-danger.bk-bs-disabled.bk-bs-active,.bk-bs-btn-danger[disabled].bk-bs-active,fieldset[disabled] .bk-bs-btn-danger.bk-bs-active{background-color:#d9534f;border-color:#d43f3a}.bk-bs-btn-danger .bk-bs-badge{color:#d9534f;background-color:#fff}.bk-bs-btn-link{color:#428bca;font-weight:normal;cursor:pointer;border-radius:0}.bk-bs-btn-link,.bk-bs-btn-link:active,.bk-bs-btn-link[disabled],fieldset[disabled] .bk-bs-btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.bk-bs-btn-link,.bk-bs-btn-link:hover,.bk-bs-btn-link:focus,.bk-bs-btn-link:active{border-color:transparent}.bk-bs-btn-link:hover,.bk-bs-btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.bk-bs-btn-link[disabled]:hover,fieldset[disabled] .bk-bs-btn-link:hover,.bk-bs-btn-link[disabled]:focus,fieldset[disabled] .bk-bs-btn-link:focus{color:#999;text-decoration:none}.bk-bs-btn-lg,.bk-bs-btn-group-lg>.bk-bs-btn{padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}.bk-bs-btn-sm,.bk-bs-btn-group-sm>.bk-bs-btn{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.bk-bs-btn-xs,.bk-bs-btn-group-xs>.bk-bs-btn{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.bk-bs-btn-block{display:block;width:100%;padding-left:0;padding-right:0}.bk-bs-btn-block+.bk-bs-btn-block{margin-top:5px}input[type="submit"].bk-bs-btn-block,input[type="reset"].bk-bs-btn-block,input[type="button"].bk-bs-btn-block{width:100%}.bk-bs-caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.bk-bs-dropdown{position:relative}.bk-bs-dropdown-toggle:focus{outline:0}.bk-bs-dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;font-size:14px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.bk-bs-dropdown-menu.bk-bs-pull-right{right:0;left:auto}.bk-bs-dropdown-menu .bk-bs-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.bk-bs-dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.42857143;color:#333;white-space:nowrap}.bk-bs-dropdown-menu>li>a:hover,.bk-bs-dropdown-menu>li>a:focus{text-decoration:none;color:#262626;background-color:#f5f5f5}.bk-bs-dropdown-menu>.bk-bs-active>a,.bk-bs-dropdown-menu>.bk-bs-active>a:hover,.bk-bs-dropdown-menu>.bk-bs-active>a:focus{color:#fff;text-decoration:none;outline:0;background-color:#428bca}.bk-bs-dropdown-menu>.bk-bs-disabled>a,.bk-bs-dropdown-menu>.bk-bs-disabled>a:hover,.bk-bs-dropdown-menu>.bk-bs-disabled>a:focus{color:#999}.bk-bs-dropdown-menu>.bk-bs-disabled>a:hover,.bk-bs-dropdown-menu>.bk-bs-disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.bk-bs-Microsoft.bk-bs-gradient(enabled = false);cursor:not-allowed}.bk-bs-open>.bk-bs-dropdown-menu{display:block}.bk-bs-open>a{outline:0}.bk-bs-dropdown-menu-right{left:auto;right:0}.bk-bs-dropdown-menu-left{left:0;right:auto}.bk-bs-dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#999}.bk-bs-dropdown-backdrop{position:fixed;left:0;right:0;bottom:0;top:0;z-index:990}.bk-bs-pull-right>.bk-bs-dropdown-menu{right:0;left:auto}.bk-bs-dropup .bk-bs-caret,.bk-bs-navbar-fixed-bottom .bk-bs-dropdown .bk-bs-caret{border-top:0;border-bottom:4px solid;content:""}.bk-bs-dropup .bk-bs-dropdown-menu,.bk-bs-navbar-fixed-bottom .bk-bs-dropdown .bk-bs-dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}@media(min-width:768px){.bk-bs-navbar-right .bk-bs-dropdown-menu{left:auto;right:0}.bk-bs-navbar-right .bk-bs-dropdown-menu-left{left:0;right:auto}}.bk-bs-btn-group,.bk-bs-btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.bk-bs-btn-group>.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn{position:relative;float:left}.bk-bs-btn-group>.bk-bs-btn:hover,.bk-bs-btn-group-vertical>.bk-bs-btn:hover,.bk-bs-btn-group>.bk-bs-btn:focus,.bk-bs-btn-group-vertical>.bk-bs-btn:focus,.bk-bs-btn-group>.bk-bs-btn:active,.bk-bs-btn-group-vertical>.bk-bs-btn:active,.bk-bs-btn-group>.bk-bs-btn.bk-bs-active,.bk-bs-btn-group-vertical>.bk-bs-btn.bk-bs-active{z-index:2}.bk-bs-btn-group>.bk-bs-btn:focus,.bk-bs-btn-group-vertical>.bk-bs-btn:focus{outline:0}.bk-bs-btn-group .bk-bs-btn+.bk-bs-btn,.bk-bs-btn-group .bk-bs-btn+.bk-bs-btn-group,.bk-bs-btn-group .bk-bs-btn-group+.bk-bs-btn,.bk-bs-btn-group .bk-bs-btn-group+.bk-bs-btn-group{margin-left:-1px}.bk-bs-btn-toolbar{margin-left:-5px}.bk-bs-btn-toolbar .bk-bs-btn-group,.bk-bs-btn-toolbar .bk-bs-input-group{float:left}.bk-bs-btn-toolbar>.bk-bs-btn,.bk-bs-btn-toolbar>.bk-bs-btn-group,.bk-bs-btn-toolbar>.bk-bs-input-group{margin-left:5px}.bk-bs-btn-group>.bk-bs-btn:not(:first-child):not(:last-child):not(.bk-bs-dropdown-toggle){border-radius:0}.bk-bs-btn-group>.bk-bs-btn:first-child{margin-left:0}.bk-bs-btn-group>.bk-bs-btn:first-child:not(:last-child):not(.bk-bs-dropdown-toggle){border-bottom-right-radius:0;border-top-right-radius:0}.bk-bs-btn-group>.bk-bs-btn:last-child:not(:first-child),.bk-bs-btn-group>.bk-bs-dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.bk-bs-btn-group>.bk-bs-btn-group{float:left}.bk-bs-btn-group>.bk-bs-btn-group:not(:first-child):not(:last-child)>.bk-bs-btn{border-radius:0}.bk-bs-btn-group>.bk-bs-btn-group:first-child>.bk-bs-btn:last-child,.bk-bs-btn-group>.bk-bs-btn-group:first-child>.bk-bs-dropdown-toggle{border-bottom-right-radius:0;border-top-right-radius:0}.bk-bs-btn-group>.bk-bs-btn-group:last-child>.bk-bs-btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.bk-bs-btn-group .bk-bs-dropdown-toggle:active,.bk-bs-btn-group.bk-bs-open .bk-bs-dropdown-toggle{outline:0}.bk-bs-btn-group>.bk-bs-btn+.bk-bs-dropdown-toggle{padding-left:8px;padding-right:8px}.bk-bs-btn-group>.bk-bs-btn-lg+.bk-bs-dropdown-toggle{padding-left:12px;padding-right:12px}.bk-bs-btn-group.bk-bs-open .bk-bs-dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.bk-bs-btn-group.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-link{-webkit-box-shadow:none;box-shadow:none}.bk-bs-btn .bk-bs-caret{margin-left:0}.bk-bs-btn-lg .bk-bs-caret{border-width:5px 5px 0;border-bottom-width:0}.bk-bs-dropup .bk-bs-btn-lg .bk-bs-caret{border-width:0 5px 5px}.bk-bs-btn-group-vertical>.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn-group,.bk-bs-btn-group-vertical>.bk-bs-btn-group>.bk-bs-btn{display:block;float:none;width:100%;max-width:100%}.bk-bs-btn-group-vertical>.bk-bs-btn-group>.bk-bs-btn{float:none}.bk-bs-btn-group-vertical>.bk-bs-btn+.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn+.bk-bs-btn-group,.bk-bs-btn-group-vertical>.bk-bs-btn-group+.bk-bs-btn,.bk-bs-btn-group-vertical>.bk-bs-btn-group+.bk-bs-btn-group{margin-top:-1px;margin-left:0}.bk-bs-btn-group-vertical>.bk-bs-btn:not(:first-child):not(:last-child){border-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn:first-child:not(:last-child){border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn:last-child:not(:first-child){border-bottom-left-radius:4px;border-top-right-radius:0;border-top-left-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn-group:not(:first-child):not(:last-child)>.bk-bs-btn{border-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn-group:first-child:not(:last-child)>.bk-bs-btn:last-child,.bk-bs-btn-group-vertical>.bk-bs-btn-group:first-child:not(:last-child)>.bk-bs-dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.bk-bs-btn-group-vertical>.bk-bs-btn-group:last-child:not(:first-child)>.bk-bs-btn:first-child{border-top-right-radius:0;border-top-left-radius:0}.bk-bs-btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.bk-bs-btn-group-justified>.bk-bs-btn,.bk-bs-btn-group-justified>.bk-bs-btn-group{float:none;display:table-cell;width:1%}.bk-bs-btn-group-justified>.bk-bs-btn-group .bk-bs-btn{width:100%}[data-bk-bs-toggle="buttons"]>.bk-bs-btn>input[type="radio"],[data-bk-bs-toggle="buttons"]>.bk-bs-btn>input[type="checkbox"]{display:none}.bk-bs-input-group{position:relative;display:table;border-collapse:separate}.bk-bs-input-group[class*="col-"]{float:none;padding-left:0;padding-right:0}.bk-bs-input-group .bk-bs-form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.bk-bs-input-group-lg>.bk-bs-form-control,.bk-bs-input-group-lg>.bk-bs-input-group-addon,.bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.33;border-radius:6px}select.bk-bs-input-group-lg>.bk-bs-form-control,select.bk-bs-input-group-lg>.bk-bs-input-group-addon,select.bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn{height:46px;line-height:46px}textarea.bk-bs-input-group-lg>.bk-bs-form-control,textarea.bk-bs-input-group-lg>.bk-bs-input-group-addon,textarea.bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn,select[multiple].bk-bs-input-group-lg>.bk-bs-form-control,select[multiple].bk-bs-input-group-lg>.bk-bs-input-group-addon,select[multiple].bk-bs-input-group-lg>.bk-bs-input-group-btn>.bk-bs-btn{height:auto}.bk-bs-input-group-sm>.bk-bs-form-control,.bk-bs-input-group-sm>.bk-bs-input-group-addon,.bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.bk-bs-input-group-sm>.bk-bs-form-control,select.bk-bs-input-group-sm>.bk-bs-input-group-addon,select.bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn{height:30px;line-height:30px}textarea.bk-bs-input-group-sm>.bk-bs-form-control,textarea.bk-bs-input-group-sm>.bk-bs-input-group-addon,textarea.bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn,select[multiple].bk-bs-input-group-sm>.bk-bs-form-control,select[multiple].bk-bs-input-group-sm>.bk-bs-input-group-addon,select[multiple].bk-bs-input-group-sm>.bk-bs-input-group-btn>.bk-bs-btn{height:auto}.bk-bs-input-group-addon,.bk-bs-input-group-btn,.bk-bs-input-group .bk-bs-form-control{display:table-cell}.bk-bs-input-group-addon:not(:first-child):not(:last-child),.bk-bs-input-group-btn:not(:first-child):not(:last-child),.bk-bs-input-group .bk-bs-form-control:not(:first-child):not(:last-child){border-radius:0}.bk-bs-input-group-addon,.bk-bs-input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.bk-bs-input-group-addon{padding:6px 12px;font-size:14px;font-weight:normal;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.bk-bs-input-group-addon.bk-bs-input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.bk-bs-input-group-addon.bk-bs-input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.bk-bs-input-group-addon input[type="radio"],.bk-bs-input-group-addon input[type="checkbox"]{margin-top:0}.bk-bs-input-group .bk-bs-form-control:first-child,.bk-bs-input-group-addon:first-child,.bk-bs-input-group-btn:first-child>.bk-bs-btn,.bk-bs-input-group-btn:first-child>.bk-bs-btn-group>.bk-bs-btn,.bk-bs-input-group-btn:first-child>.bk-bs-dropdown-toggle,.bk-bs-input-group-btn:last-child>.bk-bs-btn:not(:last-child):not(.bk-bs-dropdown-toggle),.bk-bs-input-group-btn:last-child>.bk-bs-btn-group:not(:last-child)>.bk-bs-btn{border-bottom-right-radius:0;border-top-right-radius:0}.bk-bs-input-group-addon:first-child{border-right:0}.bk-bs-input-group .bk-bs-form-control:last-child,.bk-bs-input-group-addon:last-child,.bk-bs-input-group-btn:last-child>.bk-bs-btn,.bk-bs-input-group-btn:last-child>.bk-bs-btn-group>.bk-bs-btn,.bk-bs-input-group-btn:last-child>.bk-bs-dropdown-toggle,.bk-bs-input-group-btn:first-child>.bk-bs-btn:not(:first-child),.bk-bs-input-group-btn:first-child>.bk-bs-btn-group:not(:first-child)>.bk-bs-btn{border-bottom-left-radius:0;border-top-left-radius:0}.bk-bs-input-group-addon:last-child{border-left:0}.bk-bs-input-group-btn{position:relative;font-size:0;white-space:nowrap}.bk-bs-input-group-btn>.bk-bs-btn{position:relative}.bk-bs-input-group-btn>.bk-bs-btn+.bk-bs-btn{margin-left:-1px}.bk-bs-input-group-btn>.bk-bs-btn:hover,.bk-bs-input-group-btn>.bk-bs-btn:focus,.bk-bs-input-group-btn>.bk-bs-btn:active{z-index:2}.bk-bs-input-group-btn:first-child>.bk-bs-btn,.bk-bs-input-group-btn:first-child>.bk-bs-btn-group{margin-right:-1px}.bk-bs-input-group-btn:last-child>.bk-bs-btn,.bk-bs-input-group-btn:last-child>.bk-bs-btn-group{margin-left:-1px}.bk-bs-nav{margin-bottom:0;padding-left:0;list-style:none}.bk-bs-nav>li{position:relative;display:block}.bk-bs-nav>li>a{position:relative;display:block;padding:10px 15px}.bk-bs-nav>li>a:hover,.bk-bs-nav>li>a:focus{text-decoration:none;background-color:#eee}.bk-bs-nav>li.bk-bs-disabled>a{color:#999}.bk-bs-nav>li.bk-bs-disabled>a:hover,.bk-bs-nav>li.bk-bs-disabled>a:focus{color:#999;text-decoration:none;background-color:transparent;cursor:not-allowed}.bk-bs-nav .bk-bs-open>a,.bk-bs-nav .bk-bs-open>a:hover,.bk-bs-nav .bk-bs-open>a:focus{background-color:#eee;border-color:#428bca}.bk-bs-nav .bk-bs-nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.bk-bs-nav>li>a>img{max-width:none}.bk-bs-nav-tabs{border-bottom:1px solid #ddd}.bk-bs-nav-tabs>li{float:left;margin-bottom:-1px}.bk-bs-nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.bk-bs-nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.bk-bs-nav-tabs>li.bk-bs-active>a,.bk-bs-nav-tabs>li.bk-bs-active>a:hover,.bk-bs-nav-tabs>li.bk-bs-active>a:focus{color:#555;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default}.bk-bs-nav-tabs.bk-bs-nav-justified{width:100%;border-bottom:0}.bk-bs-nav-tabs.bk-bs-nav-justified>li{float:none}.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{text-align:center;margin-bottom:5px}.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-dropdown .bk-bs-dropdown-menu{top:auto;left:auto}@media(min-width:768px){.bk-bs-nav-tabs.bk-bs-nav-justified>li{display:table-cell;width:1%}.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{margin-bottom:0}}.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{margin-right:0;border-radius:4px}.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:focus{border:1px solid #ddd}@media(min-width:768px){.bk-bs-nav-tabs.bk-bs-nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs.bk-bs-nav-justified>.bk-bs-active>a:focus{border-bottom-color:#fff}}.bk-bs-nav-pills>li{float:left}.bk-bs-nav-pills>li>a{border-radius:4px}.bk-bs-nav-pills>li+li{margin-left:2px}.bk-bs-nav-pills>li.bk-bs-active>a,.bk-bs-nav-pills>li.bk-bs-active>a:hover,.bk-bs-nav-pills>li.bk-bs-active>a:focus{color:#fff;background-color:#428bca}.bk-bs-nav-stacked>li{float:none}.bk-bs-nav-stacked>li+li{margin-top:2px;margin-left:0}.bk-bs-nav-justified{width:100%}.bk-bs-nav-justified>li{float:none}.bk-bs-nav-justified>li>a{text-align:center;margin-bottom:5px}.bk-bs-nav-justified>.bk-bs-dropdown .bk-bs-dropdown-menu{top:auto;left:auto}@media(min-width:768px){.bk-bs-nav-justified>li{display:table-cell;width:1%}.bk-bs-nav-justified>li>a{margin-bottom:0}}.bk-bs-nav-tabs-justified{border-bottom:0}.bk-bs-nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.bk-bs-nav-tabs-justified>.bk-bs-active>a,.bk-bs-nav-tabs-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs-justified>.bk-bs-active>a:focus{border:1px solid #ddd}@media(min-width:768px){.bk-bs-nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.bk-bs-nav-tabs-justified>.bk-bs-active>a,.bk-bs-nav-tabs-justified>.bk-bs-active>a:hover,.bk-bs-nav-tabs-justified>.bk-bs-active>a:focus{border-bottom-color:#fff}}.bk-bs-tab-content>.bk-bs-tab-pane{display:none}.bk-bs-tab-content>.bk-bs-active{display:block}.bk-bs-nav-tabs .bk-bs-dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.bk-bs-label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}.bk-bs-label[href]:hover,.bk-bs-label[href]:focus{color:#fff;text-decoration:none;cursor:pointer}.bk-bs-label:empty{display:none}.bk-bs-btn .bk-bs-label{position:relative;top:-1px}.bk-bs-label-default{background-color:#999}.bk-bs-label-default[href]:hover,.bk-bs-label-default[href]:focus{background-color:gray}.bk-bs-label-primary{background-color:#428bca}.bk-bs-label-primary[href]:hover,.bk-bs-label-primary[href]:focus{background-color:#3071a9}.bk-bs-label-success{background-color:#5cb85c}.bk-bs-label-success[href]:hover,.bk-bs-label-success[href]:focus{background-color:#449d44}.bk-bs-label-info{background-color:#5bc0de}.bk-bs-label-info[href]:hover,.bk-bs-label-info[href]:focus{background-color:#31b0d5}.bk-bs-label-warning{background-color:#f0ad4e}.bk-bs-label-warning[href]:hover,.bk-bs-label-warning[href]:focus{background-color:#ec971f}.bk-bs-label-danger{background-color:#d9534f}.bk-bs-label-danger[href]:hover,.bk-bs-label-danger[href]:focus{background-color:#c9302c}.bk-bs-panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.bk-bs-panel-body{padding:15px}.bk-bs-panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-right-radius:3px;border-top-left-radius:3px}.bk-bs-panel-heading>.bk-bs-dropdown .bk-bs-dropdown-toggle{color:inherit}.bk-bs-panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.bk-bs-panel-title>a{color:inherit}.bk-bs-panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.bk-bs-panel>.bk-bs-list-group{margin-bottom:0}.bk-bs-panel>.bk-bs-list-group .bk-bs-list-group-item{border-width:1px 0;border-radius:0}.bk-bs-panel>.bk-bs-list-group:first-child .bk-bs-list-group-item:first-child{border-top:0;border-top-right-radius:3px;border-top-left-radius:3px}.bk-bs-panel>.bk-bs-list-group:last-child .bk-bs-list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.bk-bs-panel-heading+.bk-bs-list-group .bk-bs-list-group-item:first-child{border-top-width:0}.bk-bs-panel>.bk-bs-table,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table{margin-bottom:0}.bk-bs-panel>.bk-bs-table:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child{border-top-right-radius:3px;border-top-left-radius:3px}.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:first-child,.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child th:first-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child td:last-child,.bk-bs-panel>.bk-bs-table:first-child>thead:first-child>tr:first-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>thead:first-child>tr:first-child th:last-child,.bk-bs-panel>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:first-child>.bk-bs-table:first-child>tbody:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.bk-bs-panel>.bk-bs-table:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:first-child,.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:first-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:first-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child td:last-child,.bk-bs-panel>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tbody:last-child>tr:last-child th:last-child,.bk-bs-panel>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:last-child,.bk-bs-panel>.bk-bs-table-responsive:last-child>.bk-bs-table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.bk-bs-panel>.bk-bs-panel-body+.bk-bs-table,.bk-bs-panel>.bk-bs-panel-body+.bk-bs-table-responsive{border-top:1px solid #ddd}.bk-bs-panel>.bk-bs-table>tbody:first-child>tr:first-child th,.bk-bs-panel>.bk-bs-table>tbody:first-child>tr:first-child td{border-top:0}.bk-bs-panel>.bk-bs-table-bordered,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered{border:0}.bk-bs-panel>.bk-bs-table-bordered>thead>tr>th:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:first-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>th:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:first-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>th:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:first-child,.bk-bs-panel>.bk-bs-table-bordered>thead>tr>td:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:first-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>td:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:first-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>td:first-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:first-child{border-left:0}.bk-bs-panel>.bk-bs-table-bordered>thead>tr>th:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>th:last-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>th:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>th:last-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>th:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>th:last-child,.bk-bs-panel>.bk-bs-table-bordered>thead>tr>td:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr>td:last-child,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr>td:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr>td:last-child,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr>td:last-child,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr>td:last-child{border-right:0}.bk-bs-panel>.bk-bs-table-bordered>thead>tr:first-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr:first-child>td,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:first-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:first-child>td,.bk-bs-panel>.bk-bs-table-bordered>thead>tr:first-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>thead>tr:first-child>th,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:first-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:first-child>th{border-bottom:0}.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:last-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>td,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr:last-child>td,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>td,.bk-bs-panel>.bk-bs-table-bordered>tbody>tr:last-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tbody>tr:last-child>th,.bk-bs-panel>.bk-bs-table-bordered>tfoot>tr:last-child>th,.bk-bs-panel>.bk-bs-table-responsive>.bk-bs-table-bordered>tfoot>tr:last-child>th{border-bottom:0}.bk-bs-panel>.bk-bs-table-responsive{border:0;margin-bottom:0}.bk-bs-panel-group{margin-bottom:20px}.bk-bs-panel-group .bk-bs-panel{margin-bottom:0;border-radius:4px;overflow:hidden}.bk-bs-panel-group .bk-bs-panel+.bk-bs-panel{margin-top:5px}.bk-bs-panel-group .bk-bs-panel-heading{border-bottom:0}.bk-bs-panel-group .bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top:1px solid #ddd}.bk-bs-panel-group .bk-bs-panel-footer{border-top:0}.bk-bs-panel-group .bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom:1px solid #ddd}.bk-bs-panel-default{border-color:#ddd}.bk-bs-panel-default>.bk-bs-panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.bk-bs-panel-default>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#ddd}.bk-bs-panel-default>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#ddd}.bk-bs-panel-primary{border-color:#428bca}.bk-bs-panel-primary>.bk-bs-panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.bk-bs-panel-primary>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#428bca}.bk-bs-panel-primary>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#428bca}.bk-bs-panel-success{border-color:#d6e9c6}.bk-bs-panel-success>.bk-bs-panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.bk-bs-panel-success>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#d6e9c6}.bk-bs-panel-success>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#d6e9c6}.bk-bs-panel-info{border-color:#bce8f1}.bk-bs-panel-info>.bk-bs-panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.bk-bs-panel-info>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#bce8f1}.bk-bs-panel-info>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#bce8f1}.bk-bs-panel-warning{border-color:#faebcc}.bk-bs-panel-warning>.bk-bs-panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.bk-bs-panel-warning>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#faebcc}.bk-bs-panel-warning>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#faebcc}.bk-bs-panel-danger{border-color:#ebccd1}.bk-bs-panel-danger>.bk-bs-panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.bk-bs-panel-danger>.bk-bs-panel-heading+.bk-bs-panel-collapse .bk-bs-panel-body{border-top-color:#ebccd1}.bk-bs-panel-danger>.bk-bs-panel-footer+.bk-bs-panel-collapse .bk-bs-panel-body{border-bottom-color:#ebccd1}.bk-bs-close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.bk-bs-close:hover,.bk-bs-close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.bk-bs-close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.bk-bs-modal-open{overflow:hidden}.bk-bs-modal{display:none;overflow:auto;overflow-y:scroll;position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;-webkit-overflow-scrolling:touch;outline:0}.bk-bs-modal.bk-bs-fade .bk-bs-modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.bk-bs-modal.bk-bs-in .bk-bs-modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.bk-bs-modal-dialog{position:relative;width:auto;margin:10px}.bk-bs-modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box;outline:0}.bk-bs-modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.bk-bs-modal-backdrop.bk-bs-fade{opacity:0;filter:alpha(opacity=0)}.bk-bs-modal-backdrop.bk-bs-in{opacity:.5;filter:alpha(opacity=50)}.bk-bs-modal-header{padding:15px;border-bottom:1px solid #e5e5e5;min-height:16.42857143px}.bk-bs-modal-header .bk-bs-close{margin-top:-2px}.bk-bs-modal-title{margin:0;line-height:1.42857143}.bk-bs-modal-body{position:relative;padding:20px}.bk-bs-modal-footer{margin-top:15px;padding:19px 20px 20px;text-align:right;border-top:1px solid #e5e5e5}.bk-bs-modal-footer .bk-bs-btn+.bk-bs-btn{margin-left:5px;margin-bottom:0}.bk-bs-modal-footer .bk-bs-btn-group .bk-bs-btn+.bk-bs-btn{margin-left:-1px}.bk-bs-modal-footer .bk-bs-btn-block+.bk-bs-btn-block{margin-left:0}@media(min-width:768px){.bk-bs-modal-dialog{width:600px;margin:30px auto}.bk-bs-modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}.bk-bs-modal-sm{width:300px}}@media(min-width:992px){.bk-bs-modal-lg{width:900px}}.bk-bs-clearfix:before,.bk-bs-clearfix:after,.bk-bs-container:before,.bk-bs-container:after,.bk-bs-container-fluid:before,.bk-bs-container-fluid:after,.bk-bs-row:before,.bk-bs-row:after,.bk-bs-form-horizontal .bk-bs-form-group:before,.bk-bs-form-horizontal .bk-bs-form-group:after,.bk-bs-btn-toolbar:before,.bk-bs-btn-toolbar:after,.bk-bs-btn-group-vertical>.bk-bs-btn-group:before,.bk-bs-btn-group-vertical>.bk-bs-btn-group:after,.bk-bs-nav:before,.bk-bs-nav:after,.bk-bs-panel-body:before,.bk-bs-panel-body:after,.bk-bs-modal-footer:before,.bk-bs-modal-footer:after{content:" ";display:table}.bk-bs-clearfix:after,.bk-bs-container:after,.bk-bs-container-fluid:after,.bk-bs-row:after,.bk-bs-form-horizontal .bk-bs-form-group:after,.bk-bs-btn-toolbar:after,.bk-bs-btn-group-vertical>.bk-bs-btn-group:after,.bk-bs-nav:after,.bk-bs-panel-body:after,.bk-bs-modal-footer:after{clear:both}.bk-bs-center-block{display:block;margin-left:auto;margin-right:auto}.bk-bs-pull-right{float:right !important}.bk-bs-pull-left{float:left !important}.bk-bs-hide{display:none !important}.bk-bs-show{display:block !important}.bk-bs-invisible{visibility:hidden}.bk-bs-text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.bk-bs-hidden{display:none !important;visibility:hidden !important}.bk-bs-affix{position:fixed}.tableelem{padding:2px 10px;border:2px white;background-color:#e0e0e0}.tableheader{background-color:silver}#notebook .bk-plot-wrapper table{border:none !important}#notebook .bk-plot-wrapper table tr{border:none !important}#notebook .bk-plot-wrapper table tr td{border:none !important;padding:0 !important;margin:0 !important}#notebook .bk-plot-wrapper table tr td.bk-plot-above{border-bottom:2px solid #efefef !important}#notebook .bk-plot-wrapper table tr td.bk-plot-below{border-top:2px solid #efefef !important}#notebook .bk-plot-wrapper table tr td.bk-plot-left{border-right:2px solid #efefef !important}#notebook .bk-plot-wrapper table tr td.bk-plot-right{border-left:2px solid #efefef !important}.bk-table table tr td{padding:2px}.bk-table form table tr td{padding:2px}.bk-table form table tr td input{padding:0}.jsp:after,.bk-plot:after,.bk-canvas-wrapper:after,.bk-sidebar:after,.bk-box:after{content:" ";height:0;display:block;clear:both}.bk-canvas-wrapper .bk-resize-popup{position:absolute;left:0;top:0;width:40px;height:40px;overflow:hidden;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAEnSURBVEiJzZXBioQwDIb/XQuF6U3wCRSEvv8zeFOoB2++QD14aqHSOntYtthxdHesDptTk4Z+hKR/PqqquuNi+7wa8DYIWTplWSJN0yDBGAMhBJxzhyFBJY8AACCErGKv2u4L1lp0XRdVBfBLTwghuN1uUYBNiDHGn4uiQJZl50GmaYJSCm3bou/700BBT4QQAL57IaUEAOR57kEAMAxDHMRaG1wuQc45aK1fBqwgz+wHpJSCUuoayBJ01P6/djHG/jR1hzWDMQbOuZedvak7XAljzAMe/xGlFEmSeP9wJVv/SGsNzjmcc2iaJg6yBbLWghASqHf0dEkpAwl6thpOGWGl1O46iIZQSsE5Dxp9OsQ5h3meV/FxHP05erdaa1HX9W7OW2TlC31ceRWbb5+AAAAAAElFTkSuQmCC);background-position:bottom right;background-repeat:no-repeat;cursor:se-resize}.bk-canvas-wrapper:hover .bk-resize-popup{display:block}.bk-sidebar.bk-logo{margin:5px auto}.bk-logo{position:relative;display:block;background-repeat:no-repeat}.bk-logo.grey{filter:url("data:image/svg+xml;utf8,<svgxmlns=\'http://www.w3.org/2000/svg\'><filterid=\'grayscale\'><feColorMatrixtype=\'matrix\'values=\'0.33330.33330.3333000.33330.33330.3333000.33330.33330.33330000010\'/></filter></svg>#grayscale");filter:gray;-webkit-filter:grayscale(100%)}.bk-logo-notebook{display:inline-block;vertical-align:middle;margin-right:5px}.bk-banner>span{display:inline-block;vertical-align:middle}.bk-logo-small{width:20px;height:20px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAOkSURBVDiNjZRtaJVlGMd/1/08zzln5zjP1LWcU9N0NkN8m2CYjpgQYQXqSs0I84OLIC0hkEKoPtiH3gmKoiJDU7QpLgoLjLIQCpEsNJ1vqUOdO7ppbuec5+V+rj4ctwzd8IIbbi6u+8f1539dt3A78eXC7QizUF7gyV1fD1Yqg4JWz84yffhm0qkFqBogB9rM8tZdtwVsPUhWhGcFJngGeWrPzHm5oaMmkfEg1usvLFyc8jLRqDOMru7AyC8saQr7GG7f5fvDeH7Ej8CM66nIF+8yngt6HWaKh7k49Soy9nXurCi1o3qUbS3zWfrYeQDTB/Qj6kX6Ybhw4B+bOYoLKCC9H3Nu/leUTZ1JdRWkkn2ldcCamzrcf47KKXdAJllSlxAOkRgyHsGC/zRday5Qld9DyoM4/q/rUoy/CXh3jzOu3bHUVZeU+DEn8FInkPBFlu3+nW3Nw0mk6vCDiWg8CeJaxEwuHS3+z5RgY+YBR6V1Z1nxSOfoaPa4LASWxxdNp+VWTk7+4vzaou8v8PN+xo+KY2xsw6une2frhw05CTYOmQvsEhjhWjn0bmXPjpE1+kplmmkP3suftwTubK9Vq22qKmrBhpY4jvd5afdRA3wGjFAgcnTK2s4hY0/GPNIb0nErGMCRxWOOX64Z8RAC4oCXdklmEvcL8o0BfkNK4lUg9HTl+oPlQxdNo3Mg4Nv175e/1LDGzZen30MEjRUtmXSfiTVu1kK8W4txyV6BMKlbgk3lMwYCiusNy9fVfvvwMxv8Ynl6vxoByANLTWplvuj/nF9m2+PDtt1eiHPBr1oIfhCChQMBw6Aw0UulqTKZdfVvfG7VcfIqLG9bcldL/+pdWTLxLUy8Qq38heUIjh4XlzZxzQm19lLFlr8vdQ97rjZVOLf8nclzckbcD4wxXMidpX30sFd37Fv/GtwwhzhxGVAprjbg0gCAEeIgwCZyTV2Z1REEW8O4py0wsjeloKoMr6iCY6dP92H6Vw/oTyICIthibxjm/DfN9lVz8IqtqKYLUXfoKVMVQVVJOElGjrnnUt9T9wbgp8AyYKaGlqingHZU/uG2NTZSVqwHQTWkx9hxjkpWDaCg6Ckj5qebgBVbT3V3NNXMSiWSDdGV3hrtzla7J+duwPOToIg42ChPQOQjspnSlp1V+Gjdged7+8UN5CRAV7a5EdFNwCjEaBR27b3W890TE7g24NAP/mMDXRWrGoFPQI9ls/MWO2dWFAar/xcOIImbbpA3zgAAAABJRU5ErkJggg==)}.bk-logo-medium{width:35px;height:35px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAjCAYAAAAe2bNZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAK6wAACusBgosNWgAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAf9SURBVFiFvZh7cFTVHcc/59y7793sJiFAwkvAYDRqFWwdraLVlj61diRYsDjqCFbFKrYo0CltlSq1tLaC2GprGIriGwqjFu10OlrGv8RiK/IICYECSWBDkt3s695zTv9IAtlHeOn0O7Mzu797z+/3Ob/z+p0VfBq9doNFljuABwAXw2PcvGHt6bgwxhz7Ls4YZNVXxxANLENwE2D1W9PAGmAhszZ0/X9gll5yCbHoOirLzmaQs0F6F8QMZq1v/8xgNm7DYwwjgXJLYL4witQ16+sv/U9HdDmV4WrKw6B06cZC/RMrM4MZ7xz61DAbtzEXmAvUAX4pMOVecg9/MFFu3j3Gz7gQBLygS2RGumBkL0cubiFRsR3LzVBV1UMk3IrW73PT9C2lYOwhQB4ClhX1AuKpjLcV27oEjyUpNUJCg1CvcejykWTCXyQgzic2HIIBjg3pS6+uRLKAhumZvD4U+tq0jTrgkVKQQtLekfTtxIPAkhTNF6G7kZm7aPp6M9myKVQEoaYaIhEQYvD781DML/RfBGNZXAl4irJiwBa07e/y7cQnBaJghIX6ENl2GR/fGCBoz6cm5qeyEqQA5ZYA5x5eeiV0Qph4gjFAUSwAr6QllQgcxS/Jm25Cr2Tmpsk03XI9NfI31FTZBEOgVOk51adqDBNPCNPSRlkiDXbBEwOU2WxH+I7itQZ62g56OjM33suq1YsZHVtGZSUI2QdyYgkgOthQNIF7BIGDnRAJgJSgj69cUx1gB8PkOGwL4E1gPrM27gIg7NlGKLQApc7BmEnAxP5g/rw4YqBrCDB5xHkw5rdR/1qTrN/hKNo6YUwVDNpFsnjYS8RbidBPcPXFP6R6yfExuOXmN4A3jv1+8ZUwgY9D2OWjUZE6lO88jDwHI8ZixGiMKSeYTBamCoDk6kDAb6y1OcH1a6KpD/fZesoFw5FlIXAVCIiH4PxrV+p2npVDToTBmtjY8t1swh2V61E9KqWiyuPEjM8dbfxuvfa49Zayf9R136Wr8mBSf/T7bNteA8zwaGEUbFpckWwq95n59dUIywKl2fbOIS5e8bWSu0tJ1a5redAYfqkdjesodFajcgaVNWhXo1C9SrkN3Usmv3UMJrc6/DDwkwEntkEJLe67tSLhvyzK8rHDQWleve5CGk4VZEB1r+5bg2E2si+Y0QatDK6jUVkX5eg2YYlp++ZM+rfMNYamAj8Y7MAVWFqaR1f/t2xzU4IHjybBtthzuiAASqv7jTF7jOqDMAakFHgDNsFyP+FhwZHBmH9F7cutIYkQCylYYv1AZSqsn1/+bX51OMMjPSl2nAnM7hnjOx2v53YgNWAzHM9Q/9l0lQWPSCBSyokAtOBC1Rj+w/1Xs+STDp4/E5g7Rs2zm2+oeVd7PUuHKDf6A4r5EsPT5K3gfCnBXNUYnvGzb+KcCczYYWOnLpy4eOXuG2oec0PBN8XQQAnpvS35AvAykr56rWhPBiV4MvtceGLxk5Mr6A1O8IfK7rl7xJ0r9kyumuP4fa0lMqTBLJIAJqEf1J3qE92lMBndlyfRD2YBghHC4hlny7ASqCeWo5zaoDdIWfnIefNGTb9fC73QDfhyBUCNOxrGPSUBfPem9us253YTV+3mcBbdkUYfzmHiLqZbYdIGHHON2ZlemXouaJUOO6TqtdHEQuXYY8Yt+EbDgmlS6RdzkaDTv2P9A3gICiq93sWhb5mc5wVhuU3Y7m5hOc3So7qFT3SLgOXHb/cyOfMn7xROegoC/PTcn3v8gbKPgDopJFk3R/uBPWQiwQ+2/GJevRMObLUzqe/saJjQUQTTftEVMW9tWxPgAocwcj9abNcZe7s+6t2R2xXZG7zyYLp8Q1PiRBBHym5bYuXi8Qt+/LvGu9f/5YDAxABsaRNPH6Xr4D4Sk87a897SOy9v/fKwjoF2eQel95yDESGEF6gEMwKhLwKus3wOVjTtes7qzgLdXTMnNCNoEpbcrtNuq6N7Xh/+eqcbj94xQkp7mdKpW5XbtbR8Z26kgMCAf2UU5YEovRUVRHbu2b3vK1UdDFkDCyMRQxbpdv8nhKAGIa7QaQedzT07fFPny53R738JoVYBdVrnsNx9XZ9v33UeGO+AA2MMUkgqQ5UcdDLZSFeVgONnXeHqSAC5Ew1BXwko0D1Zct3dT1duOjS3MzZnEUJtBuoQAq3SGOLR4ekjn9NC5nVOaYXf9lETrUkmOJy3pOz8OKIb2A1cWhJCCEzOxU2mUPror+2/L3yyM3pkM7jTjr1nBOgkGeyQ7erxpdJsMAS9wb2F9rzMxNY1K2PMU0WtZV82VU8Wp6vbKJVo9Lx/+4cydORdxCCQ/kDGTZCWsRpLu7VD7bfKqL8V2orKTp/PtzaXy42jr6TwAuisi+7JolUG4wY+8vyrISCMtRrLKWpvjAOqx/QGhp0rjRo5xD3x98CWQuOQN8qumRMmI7jKZPUEpzNVZsj4Zbaq1to5tZZsKIydLWojhIXrJnES79EaOzv3du2NytKuxzJKAA6wF8xqEE8s2jo/1wd/khslQGxd81Zg62Bbp31XBH+iETt7Y3ELA0iU6iGDlQ5mexe0VEx4a3x8V1AaYwFJgTiwaOsDmeK2J8nMUOqsnB1A+dcA04ucCYt0urkjmflk9iT2v30q/gZn5rQPvor4n9Ou634PeBzoznes/iot/7WnClKoM/+zCIjH5kwT8ChQjTHPIPTjFV3PpU/Hx+DM/A9U3IXI4SPCYAAAAABJRU5ErkJggg==)}.bk-logo-large{width:75px;height:75px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEsAAABLCAYAAAA4TnrqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAABNHSURBVHiczZx5nFxVlce/576q6uqq6q7e0t0habIRgQScfEBAJ4MLo4gogY9CAkkIApElCqOCI8IAKriMg6MwoqiBgERMIJEECCoIKKIYWcImS9KEJCxJOr2kt1rfu2f+eN2d7qS7tu4Efp9Pf7rqvvvOOfV759577r3nPuG9hF/PmQXmZEQ/CkwEtqLyV8Q+yPz7nn03TFLVgc/ybhiwD+469WiQLwOfAmqHqbEb1bWo/JCFa148kKa9t8hafuqVGLkWCBVQuxvVy1mw9hf726x+vDfIOqMxzCdm3U4sPK/oe1V/wIK1X98PVg2j6t0m63uzx2O95YyLn0BlFKwtRcrPmb/morE2bW8MJsvsb2X74PsfmoToAwScEwgFAM17ywi4kLtO+78xtCwvDixZPzjuGMQ8CRxFwIFgALRksgC+xF2n/WyMrMuLMWmG9zxLRQjGIYxjGFc5tJLsOX8+/Ij1LbX/g2gDVqE8BI3VYEdFVj9uYf6ai8dC0N4Y3AwDpQpZs4GZYjgVmCNwEBAFIsPV3ZXFa4wmo2QDEMr6hcGSVe8L8S7il0sitM66l2Ci1S/UXqz2kEgYKmKdTJray+lzukejpmiLVz9NNBjgOoRLASdffQGs0tOTDbyO0WkDF8rGiCwnk6FnQged0xcRTC4aKPcdopfaWkNNdRtepouVq5pRfQbVFZw1d2Oxqorqs377DNXBIL9H+AoFENVvc9CwvTVV9iLSN+oZ6euvijV3L5hsM11Nt9F+pIs6DAi0FkSgujpK/bhygsGJwAxgDiLfwpiXWLnqTn5z96Si1BVacd0GAo7DauDfilEAINDd3FnxGkb9Dj3ggFMQ1yPDZO6h9cjraX//SYidgFhftrVQXg4NDVAV90nbdxAJAgsx5klWrPpowSoLregKF4vwsULrD4Zj2NKbLOtA1H/4AQeMKXUk9Ah2XcimT19BYuJ1ONnJgE+SMVBTA/XjIFzml+XWMR7ht6y458hCFBdE1r0bKBfhskLqDocywyuo+LpUIRQAp6SBeBOBnuP5+9V3E3bvx7hNA94UiUBjA8QrfW8qPNCtRmQZd63MO90qiCwHPgYU1b4HI2R4hUxwC4r/9EuJr1RvoXzzUTx30RYan38O0RkD3lTb503BYCHeNByOxphT8lUqrBkaPl2s9sEYF2ETGccftgUIOsV07i2ozmfB2ot5+gaoeesh0ElDvKmy0q85qgBXFuarURBZIkwZhRWp2nq2EvKCoOAU41n6R6x+hAVrf8MNP6qi+uUHsfYIHGcsvGkohKNZsbw8V5W8ZH34mwQzLvVSeqy/E2gj4AZR/P4qv7As8A3a3E+ycO2r/PDGCpQ/YPV4YrE93qQ6epL2oAYNTc9VIW9kOLOJirdaiU+q952iBNteF8Hlu24YFEJBvymOLOdFVJewYO0TACy5KkA2u5RQ6FiqqiAW9WuVtlKRC2WINOSqkNezGuLYzl681i4/liwWqmz1NXm9gBJ0GHlKqrcAsweIOuPcIJNqfkUsNpfGBqiIjbU3DUYAqMlXISdCIeJA3a5OqIxAtAy8Ih6qgL8M7Ho7CQVdAk5wnx+r+g7IpSxYu3qg7MabY4isJBY9mVjMLxt7b9obORXk9SwRykWIWgs7OsDT4pYqFPw5mKcOASME9oncH/Y78TWrh5QKh1MVL6eiYiOqqf3kTUUhr2dpX3dsDHQloLUTGqvALewhewov+Z8sOI7imP5lmTToNSTlBs6/b19pl37xKeAElq+qxrF1iEwGZoAciXA40AjUAZUFWTIGyEvWG0HKJmcJO/h9VstuiIUhEs7fKlR5Wyy7AD9iLws6fReeBZawYO36vBYuPL0D6AA2AQ8PlC//dTmB0DRgKiJTQN8HchjooSCNFDjRLwZ5yTq/I3Tc47EMGfG1uxa2d8DUhpHmqHsgwitzjiLha3KEsqBB9Zdk7OWce3/XqCxfuCCJ77UvDZQtXSZURCpQUw8cBnIEwmHAwYP+giMLzd3Wc5KVWhaZH0o5N0UwyTWxlDUQdQx0JWFXFzRUg+flUN3fXwGEAq9izGc4a826XDpHhcXnKtDV99cMPDDk+jNX19E2oZHuimNxAx9AZCb+wmUVSB0BN5NL/IhkpZZFFojIHR7qHJkKJjyrq1dVpY+PWaYYgZZOqCz3V4e9kZ/HawOfvvbEDmC/EHXQT1+emOnNzPLSWqtWRVURI2qMGHHMeFQCoiYrv5OsqHFVbJ2KdYCXbTDb7oYyh9hAts64gY92wX0j6RmWrNSyyJlGzJ2AKJAVjcxKBz+yrce7fkPEvb5MaHA92L4bJtePGGMqyhtjQ0duROJl4Ug8fKebtlVu2sXLeHiuxctarKeIKCoW6V/pGDSciw0QSgZADYj9cu33n9vYdsWsW4bTs0/okFoWWdBP1ODyrGHSnN7yU7Ien3LhZcdAZy+0dvmR/TDoPlBkNS+Y1uyEnEvClSFi4yLEJ1RQNaGCqgkx4uOjRGvKCUWCmIAgBtQq1lPUKqqKiqLGQ0UF5KfV39swZzg9QwhJLYvMM2LuIkf8FczKFytmdq+8so1/oEw1BqaPh7LQPqPj5myGmZ87htRYEFIIDl259XaEc6Av3hEZcHtVnxwvY3EzLm7a4mU9vIz/fwiEXuvZE3f/11F/G3ZHOn179GhB/gLknHkDGsw4x5w+uXPnB9I86lmmxyMwpWHorpYqT5w6i+NH+fuLwrTlr9cEQoH1wCEj1RERMH0bKZ5irWJdi5tyyaY9vIyHdS3W1R29HcmTkv993PP99xqA5K3hqKgsIz9RAJINeatXvVjX3g3HO8ITnYl9m6MIL5T6o0vF6wuntVu155Njmq6qqOc3QwQcxxAMByivClPZGKW6qZKqCRXED4o1jp9R99tD79l2UP+9BsAxznkIBa1D92FStib1s++ewk5VTjPCUzt3QzLjR/q+VRS91TQW2DRvyuOKfqegyoOap1qfRLWKE3QIRYOUxUJTQX/aX92kbi2vQuS8oq0SFqWXRRddeSptBj6RdvndO+0MPFPlwHtWP1Kkvqmqfyn1/sEECnLqoXdvXQhgjGOOB95filARuTF1W2z6FXPo3LaLOZ29rGjtBseQQXmrVGNHi21zD/Osp58Hdo+FPBG57JCVWyoMyL9SeoJIlRGWJW6NOUu/gHv1HSxo6+bB7iTJujitY2FoqWieP2Wzqn51jMTNckTOMKo0jUqMMNsxXAvAvdi3Wjm9tZPzurpIjoWVo8HGeZOXKXrnGImbJ+llsZtFWDIqMUpW0U+Undv75zEybMww7e7N1QGcZ2BUmy4Au4zAk6O2SAiKyM2p2yoO2NpSLnx1+lUnXdB0aRPA63OndljPfp48q6AFYJxR1T8B20YpCGCmiD2gmXgjoSZas7giXPH4/PrzDgfYdNaUx1X1+tFJ1S2m7LzetzTHTLsYiMiizO2x+WMhq1R8+7DrTNAJ1MXL45MrwhX3LWq8cBpAWtPXKTxRqlyFJ/rzD24CesfEWuVHqdvKp46JrBIQCEerrdpJZaEyqiPVh4QCwYcumHjJkVvPPNRV9EL8ta5i4aGy3ACUndu7yaq9CsEPIkaTPCnUG+Ms7bmtesyXdQs0oB5ostZSFa0iWhadaoXHvtB0yfGb5k5+2ap+pViJCus8Yx4ZiK/C5yZu1KS9R3usvx/cT1z/n1AMiR8LSuaA5KnvDRXbRN/6uyDUxGpwjKkVZM1F4y/60KZ5k29TkbuLEJlVa7/VfPpEd0gwmlqX+LzX4v7R25HFbs9iW1x0t4cmFXXVH0+MFESeiHw7fXvsgK469On9YP9nq5ZwIEx1eTWK1miw7KEl9ReeuvGMg+epSHMh8hS9fOO8yc/CXpF7/H4S6tqFePYFTSnaY7HtHnaAvCy21UW7PDRpwWMPaYM90Icjyi8SS8MHNJwQlSH5CopSFamiPFSOVRvzwuFV/xmcd+LbH2yai0g2j7ibXjtj0k39X/aZ5kSvd3ci+jkMu4YQ4OF7WKeLbfWwLS7eO1mfyA4P7bJoSsFlMHmHOcHATXvr2K8Qjhj8VVUREWqiNRg/ny7Q2djw4JKDP9vYW199lY6Qk6Dw89fmTvqPwWXDzgnLr3GbrbWfVHQXjgWjezzHkT13eYqmFN3tYXe52B1ZvB1ZvO1ZbKuH9lhI23NSS6N5c5/GAtf8y3fiDHOqzKqlPFhOdaQaqxZEnJ7xB635zJnfkGyk/A9qhtKg6E82zp20z1GXEXd3ot90N/ReFb5I02W/wrFtUpZ9XkLuDsAiqhjdLtCDNSG1EkQlgJIm472JxdFeD/XJDWrUvD56KvIj7JS/D6gf7pqqEo/ESWQSJLNJCARCgXTmO8f+4Pa7/vG1c94MpDNNxvUAfr5x7uRLhpORc9+w9+EjHg5N6ehEqEKZoWg9Vl5Q2KiJsiczOyu2jn96/bu2FNMSO3OWZ3sC4xMPPA0gKk0IZcPVVRQjhppYDdt3b0dR3HAoMO6lTXNnLF+3c9PnPo4XcH7W/NmJI86Tc5IVnLIrjHEEqESoFJiG0eMEoDJFeWWK3YdMfRNhm8JWVDcBL4C+qso7mUymu/Hed3Jsw5aO9qoLL7Re7w3JTMs3gacBVPRQyTFE9zfHqkgV7T3tiBGy5eHwwX96elKoJ3H/vfd/MeeCQu7teykguhKagCaB2Xsy+sSCdoTD4X/uPmtKM8g/VfUtYKOqt6Vm5baSF+VaK89vMMb8WOBMqxlct71i0OWcmXvge1g8EieRTpByUxgx2GCApseeeizfvWN4gGYIjIjUAh8G+TD07apAj0igveOsqTtR3Qg8L8Ir1upWYGfNyi0tuYS2Vy4+ESO3AFMQg+t1ASoA35v1Y+MnheSGquKIQ02shh2dO1AUQUhVV7bTk/ve/UXWSIgBMYGDETkGWABgjICwbffcKW96vdk7ate99cvBN7VULg4GhOsR+RoDni5Ym0Dpa+WiFcBhhRhh1RItixIvj9OeaMcRBwrg4kCTNTyMoGnvYLc3Hde099TgS23xxYeLyE+AE/aUCqoWz0tC3xaJhzvBIZAzzXEwrPpzx0QmQdpNI8g7ec3Mc33/Hgvu6+O8rjSZtsTr6fbEcfWPtjzXf7ktvvhiEfk7Q4jym7S1CaxNIQSMX2ZmFaNaVXGMQ22sFhFB0bz9aD7PSgBjP5r1ba1rxsXrzOBl3Dc81z1p4vrOZoC2qsUHifK/iIxw2NzB2hTWpkCc8SgIganFLoZaa4mEIsTL49rS1ZJ30yZnheoVW7sZo+2kAYiAgtedJtuWxGay3cDZBz3R4RNVef6JgvxpZKIAFGsT+ORI2JfLzFLMsWqpjlRnmmoO7shXt4CcUn1VkJIMGYI+b7IpF68ng2ZcUDoQTmt4bNdf34wsCkWCoWtF5Mr8wiyu1wsYHPUyAKo6odQ+w4jpriyL5T3lWsh+4SMl2jDYGt+butK47UmfKJGUBjKfqX+s9fG2qsVHRUNljxZGlN/feF4XIDh42VPmrI+P5siMopvTmeSOvD8jryTLOqC0s8VC30jnkm1L4HWn+z3Mw0kvaPhj59/a4ouX9GXvzC5UqGra79xFcHDTkzvfrkMZV5KNgCrPXv3SFfmWa/KTVb3yjW2qOmwmXE70901dKbJtCTTr9R/RyGhFy8k8vHtde+UF94jIzYxwEH14sQbP60HV9b+j1Q3d22YiMuycsDCZ+qtC6hW0be9lvWsV/WthmgEj2Ey/N2X6ksoEjEUj7fND913dFohf8AJGTy9I5hDxBtfrHSDLwxkX8tIfKPlIgfKHbzz71YL2Tgsiq271tqRm9GRFH80tTcAqbmfK75v2eBM4bkKtXBt85OIZWrlzPcL7CtE9FIJisV7vwHeLMSpOMelSg9FmxSs4H6LghJCa1Vu6rJc9GfQaVPdN+hDBJl0/HOjJDJQB4GRTdDTeF1w/bzah9LcRLXHnR7CaxbMp+s8EKMb05boXizbgs1c9e/nLhWsvAe1nTKoXx5wuIv8OTEWp83rStV5v1oJGh5wnFIvZNSVhNh/biZMd7+c/lwa/v0rR1f0U4GFU6Q3FNj4wc/5E1wQjRgsLSlV5CLVXXPncZRvy1x3Dtxy1njW13HSn49nWRFzKjMWYGCJRQGwo3eC0Ns1wmj/0rb7U6VHpEnHIZHbR0/s8IgEC6tISG88j00/rdU3AGLXD/R5L/0EC1ccVXX3lhst+X6jOMXm9Sj/qfrM5CSSBEeKUTtoqZjeL4y0v5Ahrbgie103/M/bEIZxJfNfDrnUFDQxHluJa67599fNf3zk63ft7ojwIbfHF80XkDkbxgESC9PQ+TyazE5GAp/Clafpq8WFNEXhX3p9V27n0LlV7dukSBNUsnpcASKnaM/Y3UXvjgL4/q7bz1hVW9WxKWMnoD0atzWxX7EnT2HjvfjAxJw74m9nqOpcuV9VFQLq4OxVV3exp4tOHsPldyTA88K+xw2+SKB/HP+ZWEKz1VgSdcbOn80be4X5/4V199eau+OJaB5YgcjbD78x4oH9W1VtqO2+950DbB++Ft0nuhfbKL0yyhk8JepIohwApFZ5BdVUy2f34xMzdRTbZscNgsv4fCI1BY5O1DJEAAAAASUVORK5CYII=)}.bk-sidebar{box-sizing:border-box}.bk-button-bar .bk-bs-dropdown{padding:10px 10px 0 5px}.bk-button-bar .bk-bs-dropdown a{color:transparent;font-size:0;display:block;float:left;width:13px;height:13px;margin:5px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAYAAABy6+R8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTNui8sowAAAGdSURBVCiRXZJPSxtRFMV/dyYTunBREASRIkKwddPSjYIL+x2K9plR+owR7K7L7vsZutIkZqhO8jZ+h25aQilUkbaUgv2zEOpGpAsZnbld+BJC7ubAvYd77uEeYaTaB25bhJqi44Kcq9LYWDOt/lxVkQG542ZFaQP3gB6wBLwDFoGfKtQ2qua7qhIAJB1XEeUE9CtSPLCxWQbObGxWEL0P+k2Uk3barQBImrrgWvmE8NnGpgaQpO4OcArM2Nhc+d4e8DCUcL6UwZYIk0WYzw9Zy4CnHm+9hNcvJI/+3GhuJUndR+A3yCpoCGQ2NkWfnKQuAMqo5Ih2gakScBeYBj32vE3gw5DqAtBCFGAcuCwBF8CRIFX1SiNf6AGPQXLwSgq7Aq+zMGPLrPdNB16h50+92uvul4MiWlJ4FZShAZxFebQztL0MHHoEICiiBvCrRJiI31wBvii8zQt9WV9f/Zek7sjG5lFzvzsWBvJGYA2Ye1599mOQiKTjZlVpCcwA74En/UQonIqwaX0ihJFKUlcH6sAE8Bdo2tg0B/9S5T8JNaZ11wlT0wAAAABJRU5ErkJggg==)}.bk-button-bar .bk-button-bar-list{margin:0;padding:0}.bk-button-bar-list>li{list-style-type:none;float:left;padding:0;margin:0;position:relative;display:block;overflow:visible;background-color:transparent}.bk-button-bar-list>li:last-child:after{content:"|";font-size:90%;color:lightgray;display:inline-block;float:left;height:28px;line-height:28px;padding:0 3px}.bk-button-bar-list.bk-bs-dropdown:after{content:"|";font-size:90%;color:lightgray;display:inline-block;float:left;height:28px;line-height:28px;padding:0 3px}.bk-button-bar-list[type='help'] li:after{content:"" !important;display:none}.bk-button-bar-list>a:after{content:"|";font-size:90%;color:lightgray;display:inline-block;float:left;height:28px;line-height:28px;padding:0 3px}.bk-button-bar .bk-button-bar-list .bk-bs-dropdown-menu{padding:10px 8px}.bk-button-bar .bk-button-bar-list .bk-bs-dropdown-menu li{float:none;clear:both;font-family:Helvetica,sans-serif;line-height:1.5em}.bk-button-bar .bk-button-bar-list .bk-bs-dropdown-menu li input{margin-right:8px}.bk-button-bar-list .bk-toolbar-button{width:30px;height:28px;padding:5px;border:0;border-radius:0 !important;-moz-border-radius:0 !important;-webkit-border-radius:0 !important;background:transparent !important}.bk-button-bar-list .bk-toolbar-button .bk-btn-icon{display:block;position:relative;height:16px;margin:0;border:0;background-size:contain;background-color:transparent;background-repeat:no-repeat;background-position:center center}.bk-button-bar-list .bk-toolbar-button span.tip{display:none}.bk-button-bar-list .bk-toolbar-button span.tip:before{display:none;content:" ";position:relative;width:100%;background-position:top left;background-repeat:no-repeat}.bk-button-bar-list li::hover .bk-toolbar-button{cursor:pointer;background:transparent !important}.bk-button-bar-list li:hover .bk-toolbar-button span.tip:before{display:inline-block}.bk-button-bar-list li:hover .bk-toolbar-button span.tip{z-index:100;font-size:100%;color:#fff;font-family:'Open Sans',sans-serif;white-space:nowrap;background-color:#818789;border-radius:3px !important;-moz-border-radius:3px !important;-webkit-border-radius:3px !important;display:inline-block;position:relative;top:25px;padding:3px 5px;transition:all .6s ease;-webkit-transition:all .6s ease;-moz-transition:all .6s ease;-o-transition:all .6s ease}.bk-button-bar-list li:hover .bk-toolbar-button span.tip>*{display:block;text-align:left}.bk-button-bar-list li:hover .bk-toolbar-button span.tip span{width:200px;white-space:normal}.bk-button-bar-list .bk-toolbar-button.active{background:#fff;-box-shadow:none !important;-webkit-box-shadow:none !important;-moz-box-shadow:none !important;outline:none !important;border-bottom:2px solid #26aae1}.bk-button-bar>.bk-toolbar-button.active{border-bottom:2px solid #26aae1}.bk-plot-above.bk-toolbar-active{border-bottom:2px solid #e5e5e5}.bk-plot-below.bk-toolbar-active{border-top:2px solid #e5e5e5;padding-bottom:45px}.bk-plot-above.bk-toolbar-active,.bk-plot-below.bk-toolbar-active{height:30px}.bk-plot-above.bk-toolbar-active .bk-logo,.bk-plot-below.bk-toolbar-active .bk-logo{float:left;top:5px;margin:5px 0}.bk-plot-above.bk-toolbar-active .bk-button-bar,.bk-plot-below.bk-toolbar-active .bk-button-bar{float:right;position:relative;top:5px}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-button-bar-list,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-button-bar-list{float:left}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown{margin-right:20px}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:before,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:before{right:-6px}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:after,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:after{right:-12px;position:absolute}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-button-bar-list .bk-bs-dropdown-menu:after,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-button-bar-list .bk-bs-dropdown-menu:after{content:""}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-toolbar-button,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-toolbar-button{float:left}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-toolbar-button.help,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-toolbar-button.help{float:right}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-toolbar-button.help span.tip,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-toolbar-button.help span.tip{right:0;text-align:left;width:200px;white-space:normal}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-toolbar-button.help span.tip>*,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-toolbar-button.help span.tip>*{margin-left:0;margin-right:0}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-toolbar-button span.tip,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-toolbar-button span.tip{top:41px;left:0;z-index:100;position:absolute;width:auto;padding:0 10px 5px 10px}.bk-plot-above.bk-toolbar-active .bk-button-bar .bk-toolbar-button span.tip:before,.bk-plot-below.bk-toolbar-active .bk-button-bar .bk-toolbar-button span.tip:before{top:-7px;left:-5px;width:100%;height:9px;padding:0 10px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAJCAYAAAAGuM1UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3NzIwRUFGMDYyMjE2ODExOTdBNUNBNjVEQTY5OTRDRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpDQjA4MDBGRDQ3NjExMUU0QjI1NEVEQTlCODRBRDIyNiIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpDQjA4MDBGQzQ3NjExMUU0QjI1NEVEQTlCODRBRDIyNiIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6N0Y0M0E0Nzk5NDIyNjgxMTk3QTVDQTY1REE2OTk0Q0UiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzcyMEVBRjA2MjIxNjgxMTk3QTVDQTY1REE2OTk0Q0UiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4te1g5AAAAk0lEQVR42mL8//8/AymApamjC5dcJRBPBOJvyIJM2FQCbS0GUm1APAddDkPDv3//3BgZGTuh3Eig5lKcGv78+aPKxMS0HMhkhokBNbcDDfHApoGHmZl5HZAWQrOUGWQIyDBkDYxAqxcBTdPBEQACQMM2AGk+Jqgn64CKA/EFJ1BeC2QoE9B9AUBOPTFxAFTnDxBgAI5eL2ABBdyaAAAAAElFTkSuQmCC);display:block !important}.bk-plot-left.bk-toolbar-active{border-right:2px solid #e5e5e5}.bk-plot-right.bk-toolbar-active{border-left:2px solid #e5e5e5}.bk-plot-left.bk-toolbar-active,.bk-plot-right.bk-toolbar-active{display:block;margin:45px 0 0 0}.bk-plot-left.bk-toolbar-active .bk-logo,.bk-plot-right.bk-toolbar-active .bk-logo{left:6px;margin-bottom:20px}.bk-plot-left.bk-toolbar-active .bk-button-bar,.bk-plot-right.bk-toolbar-active .bk-button-bar{position:relative;left:3px}.bk-plot-left.bk-toolbar-active .bk-button-bar:before,.bk-plot-right.bk-toolbar-active .bk-button-bar:before,.bk-plot-left.bk-toolbar-active .bk-button-bar:after,.bk-plot-right.bk-toolbar-active .bk-button-bar:after{content:" ";display:block;height:0;clear:both}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list:after,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list:after{content:" ";height:0;display:block;clear:both}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:before,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:before{top:}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:after,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list.bk-bs-dropdown:after{content:" \2014";float:none;clear:both;display:block;width:30px;height:8px;line-height:8px;padding:3px 0;text-align:center}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li{clear:both}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li:last-child:after,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li:last-child:after{content:" \2014";float:none;clear:both;display:block;width:30px;height:8px;line-height:8px;padding:3px 0;text-align:center}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button.active,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button.active{border-bottom:0;border-right:2px solid #26aae1}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button.help span.tip:before,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button.help span.tip:before{left:-57%}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button span.tip,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button span.tip{position:absolute;top:4px;left:40px;padding:5px 10px 5px 10px}.bk-plot-left.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button span.tip:before,.bk-plot-right.bk-toolbar-active .bk-button-bar .bk-button-bar-list>li .bk-toolbar-button span.tip:before{top:2px;left:-19px;width:9px;height:15px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAPCAMAAAABFhU/AAAAA3NCSVQICAjb4U/gAAAAY1BMVEX////////8/Pz5+fn39/f19fX09PTv8fHv7+/t7e7s7Ozp6enn6Onm5ubj4+Ph4eHf39/X2drW1tfMzMzAw8S+wMGusbKorK6orK2nq6ufo6WcoaGYnZ+RlpiJj5GGjI6Bh4n1ho2QAAAAIXRSTlMA//////////////////////////////////////////9G9E6kAAAACXBIWXMAAAsSAAALEgHS3X78AAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABR0RVh0Q3JlYXRpb24gVGltZQA5LzUvMTTY+fXxAAAAUklEQVQImTXN2xZAIABE0VQUIfdLwvz/V1rL1DztpzOi4EoIQoekNoIaH1AL8EvvoExEUkBWfWZZvyWVzq/vL6kbP9/sKdtPF8vKdMPBN1m5AR+0BAnD6uP50QAAAABJRU5ErkJggg==)}.bk-bs-caret{color:lightgray;display:inline-block;width:0;height:0;position:relative;left:11px;top:3px;vertical-align:middle;border-top:4px solid;border-right:4px solid transparent;border-left:4px solid transparent}.bk-hbox{display:-webkit-box;-webkit-box-orient:horizontal;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:horizontal;-moz-box-align:stretch;display:-ms-flexbox;display:box;box-orient:horizontal;box-align:stretch;display:flex;display:-webkit-flex;flex-direction:row;flex-wrap:nowrap}.bk-vbox{display:-webkit-box;-webkit-box-orient:vertical;-webkit-box-align:stretch;display:-moz-box;-moz-box-orient:vertical;-moz-box-align:stretch;display:box;box-orient:vertical;box-align:stretch;width:100%;width:auto}.bk-hbox-spacer{margin-right:40px}.bk-vbox-spacer{margin-bottom:auto}.bk-button-bar{margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:2px;position:relative;display:inline-block;vertical-align:middle}.bk-button-bar>.bk-bs-btn{position:relative;float:left}.bk-button-bar>.bk-bs-btn:hover,.bk-button-bar>.bk-bs-btn:focus,.bk-button-bar>.bk-bs-btn:active,.bk-button-bar>.bk-bs-btn.bk-bs-active{z-index:2}.bk-button-bar>.bk-bs-btn:focus{outline:0}.bk-button-bar .bk-bs-btn+.bk-bs-btn,.bk-button-bar .bk-bs-btn+.bk-bs-btn-group,.bk-button-bar .bk-bs-btn-group+.bk-bs-btn,.bk-button-bar .bk-bs-btn-group+.bk-bs-btn-group{margin-left:-1px}.bk-toolbar-button{display:inline-block;margin-bottom:0;font-weight:normal;text-align:center;vertical-align:middle;cursor:pointer;background-image:none;border:1px solid transparent;white-space:nowrap;padding:6px 12px;font-size:14px;line-height:1.42857143;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px;color:#333;background-color:#fff;border-color:#ccc}.bk-toolbar-button:focus,.bk-toolbar-button:active:focus,.bk-toolbar-button.bk-bs-active:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.bk-toolbar-button:hover,.bk-toolbar-button:focus{color:#333;text-decoration:none}.bk-toolbar-button:active,.bk-toolbar-button.bk-bs-active{outline:0;background-image:none;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.bk-toolbar-button.bk-bs-disabled,.bk-toolbar-button[disabled],fieldset[disabled] .bk-toolbar-button{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.bk-toolbar-button:hover,.bk-toolbar-button:focus,.bk-toolbar-button:active,.bk-toolbar-button.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-toolbar-button{color:#333;background-color:#ebebeb;border-color:#adadad}.bk-toolbar-button:active,.bk-toolbar-button.bk-bs-active,.bk-bs-open .bk-bs-dropdown-toggle.bk-toolbar-button{background-image:none}.bk-toolbar-button.bk-bs-disabled,.bk-toolbar-button[disabled],fieldset[disabled] .bk-toolbar-button,.bk-toolbar-button.bk-bs-disabled:hover,.bk-toolbar-button[disabled]:hover,fieldset[disabled] .bk-toolbar-button:hover,.bk-toolbar-button.bk-bs-disabled:focus,.bk-toolbar-button[disabled]:focus,fieldset[disabled] .bk-toolbar-button:focus,.bk-toolbar-button.bk-bs-disabled:active,.bk-toolbar-button[disabled]:active,fieldset[disabled] .bk-toolbar-button:active,.bk-toolbar-button.bk-bs-disabled.bk-bs-active,.bk-toolbar-button[disabled].bk-bs-active,fieldset[disabled] .bk-toolbar-button.bk-bs-active{background-color:#fff;border-color:#ccc}.bk-toolbar-button .bk-bs-badge{color:#fff;background-color:#333}.bk-canvas-wrapper{position:relative;font-size:12pt;float:left}.bk-canvas{clear:both;position:absolute;font-size:12pt}.bk-canvas-wrapper .bk-canvas-map{position:absolute !important;z-index:-5}.bk-tooltip{position:absolute;padding:5px;border:1px solid #1e4b6c;background-color:#1e4b6c;border-radius:5px;pointer-events:none}.bk-tooltip.bk-left::before{position:absolute;margin:-7px 0 0 0;top:50%;width:0;height:0;border-style:solid;border-width:7px 0 7px 0;border-color:transparent;content:" ";display:block;left:-10px;border-right-width:10px;border-right-color:#1e4b6c}.bk-tooltip.bk-right::after{position:absolute;margin:-7px 0 0 0;top:50%;width:0;height:0;border-style:solid;border-width:7px 0 7px 0;border-color:transparent;content:" ";display:block;right:-10px;border-left-width:10px;border-left-color:#1e4b6c}.bk-tooltip.bk-tooltip-custom.bk-left::before{border-right-color:black}.bk-tooltip.bk-tooltip-custom.bk-right::after{border-left-color:black}.bk-tooltip.bk-tooltip-custom{border-color:black;background-color:white}.bk-tooltip-row-label{color:#9ab9b1;font-family:Helvetica,sans-serif;text-align:right}.bk-tooltip-row-value{color:#e2ddbd;font-family:Helvetica,sans-serif}.bk-tooltip-color-block{width:12px;height:12px;margin-left:5px;margin-right:5px;outline:#ddd solid 1px;display:inline-block}.bk-canvas-map{position:absolute;border:0;z-index:-5}.shading{position:absolute;display:block;border:1px dashed green;z-index:100}.gridplot_container{position:relative}.gridplot_container .gp_plotwrapper{position:absolute}.table_wrap table{display:block;margin:5px;height:300px;overflow-y:scroll}.bk-table{overflow:auto}.bokehdelete{float:right}.plottitle{padding-left:50px;padding-bottom:10px}.bk-toolbar-button.hover:focus{outline:0}.bk-tool-icon-box-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBODVDNDBCRjIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBODVDNDBDMDIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4NUM0MEJEMjBCMzExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4NUM0MEJFMjBCMzExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+hdQ7dQAAAJdJREFUeNpiXLhs5X8GBPgIxAJQNjZxfiD+wIAKGCkUZ0SWZGIYZIAF3YVoPkEHH6kojhUMyhD6jydEaAlgaWnwh9BAgf9DKpfxDxYHjeay0Vw2bHMZw2guG81lwyXKRnMZWlt98JdDTFAX/x9NQwPkIH6kGMAVEyjyo7lstC4jouc69Moh9L42rlyBTZyYXDS00xBAgAEAqsguPe03+cYAAAAASUVORK5CYII=")}.bk-tool-icon-box-zoom{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozMjFERDhEMjIwQjIxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozMjFERDhEMzIwQjIxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjMyMUREOEQwMjBCMjExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjMyMUREOEQxMjBCMjExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+a2Q0KAAAAmVJREFUeNq8V19EpFEUvzOtmKfpJSJKDL2WiLJExKaUEq0eeikiaolZLT2lVUpPydqHqIlIo1ilFOmphxj1miKWWHppnobIt7+zeyZ3jjvz/bnf9OPHd8/9d77z3XN+94ts7ew6SqksWKX+w1GFiLjYdVSAfeAQ2Ag2sf0GvAXT4C/wle1x3lt9UOGBNk6BrYa+FuYIeAWOsmNviGqe6W+q081OmAGvizgh0cpjZ3RjGBFZBpMG+xn4wM8NYJfWFwNXwXrwS96RiIUTwwYn6AxMgb+FvQ5c4zOUxzR4Ce5GLZyo5LfSsQP2G5xQbKO+bWFfoLWinA1OAEcoM2rFRpMe5sloJWgtm4j0iPZcPhVdkOWxBWvZONIi2uc+5sqxbTaO1Ij2o4+5T6JdGy1SF4Kg2mLsi01E/oh2l4+5HTKaNlmTEe0ka40XyNqTsYnIkWiTwC16rMRNci0bR0hJ7w1veizqy9uB5D4ZDZKBtI3WvLCCJoT9E3jHny4j1DdmWOcbrWWjNYuGoqaL2kdmKayTztio7yzTJprz4A/9PuI3a8YMh5IKVC9fetxAY5rB79pNzXdESMJ/GrSjm8/DCTjAgpjQZCDDh5I+w4HuQBBHOsE9USty4KB2KF85m9J+v5XX9KXr3T7fQZS26WefYlcU+ayJlxhDIT40jBnn21hQOPrfgFtEqAhdGETqK7gZ4h/Av4g4Jf5TUoYquQSuqJDhFpEJca3b4EoYOtyyhrSkHTzlcj4R4t4FZ9NL+j6yMzlT/ocZES9aky3D3r6y5t2gaw3xWXgs7XFhdyzsgSpr2fFXgAEAmp2J9DuX/WgAAAAASUVORK5CYII=")}.bk-tool-icon-help{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBODVDNDBDMzIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBODVDNDBDNDIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4NUM0MEMxMjBCMzExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4NUM0MEMyMjBCMzExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+mR+SmAAAA/BJREFUeNq8lulPU1kUwOnjCS2yL12pFZFRoBU1MYpCRVGD0cREo4kziX/ffDDxkzNmcEUUd0cBGYdhKYXSln0riyz+mNvceb6W15dxMvdDc3rfvb9z7rnn3HMsW1tbWTsPvkaisfFoND4xiTw9M8tkaUmxxWKxV5S7nE6304FsQLDspGB5ZeVDd89wKLz25YvB/pxdu/b6vA0Bv81qNatgY2PjY++nvs/96+vr/C0pLvJWetxOZ3Z2NrYzwzlYE4lGw6NjM7NzzKiqWnug5lB9HWsyKMDwRx2dk1PTyD5v5ZFDgcLCAoMTzM8vvP/YHQqPIpeXlZ4JNumO8o0CTIO+lEjk5+9ubjxRUV6WZW5MTE51POtiY57NdvZ0szioXgG2373XnlhedtgrWppP5ebkpLoukVguKMhPq2N1be3x02ex+AQ6LrWdl+dIKtjc3Lx3/yGecTrs51qCiqLInajs7ftjYHBY3nZRUeE+n++HmmqdEUDaHz1BB75qO3dWQJIK8GN3bx/WXTzfas3N1TrtweMODpdqMhcbPNVY6XZpJ1dWV3/57f7i4lKgvpb7Y0YRNhIzCE0njmvp6H7a9UJL1zqXGMPv7NUqYDsQBIDi07aCnk99rCZmdLdKis3NzQsZS3+6ce1y24Ufr1/1uJxSx+BQSHcyEhAUn8BuK0DqHxhCEifSDhJYyseOHhExjmeOHm6Q8zOzs6neEyiwwJXwWITwIHJS431pKSEEAkMbPDbbP5Ge9p0ABRAscDUWjzPlcblS151uOpk2IkMjo1IuKS5OuwYg4QRcEbluPqeGR8Kv372XD9H+6qq0ywQQuLqwsChC2wz9c//Ayzdvk46yWltbgqn5KHOFX+CqSB9syUgfCo28evtOerk12LxTVksgcDXL9CCfRVZysSSqNmMMhiJVZVzKQySdk5EuHaOIY/LqZlTAMyDzK+NiAQSuUE+QqIhZ/+kQQOCqw27/869BypO/7qDxnls3b5hXEPn7FQCueD1u3gCSwoyXTA5Q0VgcLHCeFnX/vr0E+O/dPTy/Bpf28+07Qt6dl3ftymUDBaD4ramuAr79mgbq65BI0anpme83n6oFCqC/rjb5XPOW0RMgdDzvovJ9D51Io4QgAASbVMCg4yC5yewnnc+pfP+OzkZKEBBQAPVFnw+/tj/AhJ2KvvGQRZ8cpO7KV+SbtoU7oG2h1PE5eLKxrLTEfNvS+eIlJuIWWiPtRqPGq8q353DAb/CiiXPTMHCrphov2f986OmlaiPwF3O8HsqwQ9c6jkdj4bExEXh84lYb/PWZW8f/o/nVBQa9RWR8HC/r2ndqltvlon3Xdmmp46sAAwDlJz2CuiavpwAAAABJRU5ErkJggg==")}.bk-tool-icon-inspector{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAADEUlEQVRYR81XXVIaQRCeHqug8CXmBNETaE4gniDwIgpVspxAbxC9ATkBkCpQ8gKeQDiB5AQxNyAvUlrldr7eHxyGXZi1rMJ5opbp7m++7un+htSGF204vsoMoNXrlzSpfWa1oxQfhAegCZGaEtPorHo8znIoJwCt6+td8uk7ApUQCIHTF4BNAWzImq8ap6cP68CsBdDp9i9ZqXM7ML79g/EnCWD+jgMKENKqWT+tXK0CkQqgNRjs0OxpQIqKhoMxaG6/6JeRnK7T6yO2UvVqhYSlLX+ryORfgKn9ORDFIy7ky41yGcwsr0QAQfDH5zucOswx819fs4egI9OFCcD8DjBF7VNbEX0JzdWEt3NHSSASAcCxBDqMgt/623kvyTgNgNjJIfTjk4D4FqaJR1715MjmYAmA5Bx3AwUXQL+t105KaTlcBSC26XRvhjEIoLiq1yqXpr8FAGG16/ug4IT27fxBWu7EiQuAiImJpEMKE6nYM30uAIDDttSUOPfJP7JzbjPhAiBIh9QE67vIvoOi9WJfCwDavf40ulpjbCqmUf+W753ezURuh7Dg1SqflwAEHU6pgfyBq9Y4qx0LG++2fnZ/eUzcstmdM2AWH+jfc+liWdBJfSENf8Lifi3GVwC9mybOfi5dzatWVrbbLIHNva8p5h/16gkaFiLGGxbufkoE6XguwePiXLF3XmMfCUCUAqtKXU7sumd1CowOuJEi3Pg1FBpjitIGhyvVSfvmjci6ZR+rFQfDiPVE2jFYeICQ+PoewwjC5h7CZld6DBdyu6nDSKgzOyIMhmhK5TTqXYbRorZYM46TmpKAAOrGWwSJJekSB1yqJNOzp1Gs7YJ0EDeySDIMtJbQHh6Kf/uFfNFZkolJICRmz0P8DKWZuIG2g1hpok+Mk0Qphs0h9lzMtWRoNvYLuVImUWrmPJDlBKeRBDfATGOpHkhw670QSHWGLLckmF1PTsMlYqMJpyUbiO0weiMMceqLVTcotnMCYAYJJbcuQrVgZFP0NOOJYpr62pf3AmrHfWUG4O7abefGAfwH7EXSMJafOlYAAAAASUVORK5CYII=")}.bk-tool-icon-lasso-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3NzIwRUFGMDYyMjE2ODExOTdBNUNBNjVEQTY5OTRDRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1ODBEQzAzNDQ0RTMxMUU0QTE0ODk2NTE1M0M0MkZENCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1ODBEQzAzMzQ0RTMxMUU0QTE0ODk2NTE1M0M0MkZENCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTU0QzIwMUM1RjIxNjgxMUE3QkFFMzhGRjc2NTI3MjgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzcyMEVBRjA2MjIxNjgxMTk3QTVDQTY1REE2OTk0Q0UiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7r0xDwAAAC9klEQVR42sSXb2hNcRjHz50rt1aslNQitSimq6VESW6SFMvFyJ+UknnhhVhkRIkX/iRbSPMnyt95sblZFvMC02patEKtaE3Km1taqWlxfZ/6Hj39+p17zr3nHJ76dO4953d+53ue5/k9v+ck2jseORHYRDAXpHmcDSar84McNwLegwHQa5soGULENFAPMmApH+5laXVcw9/fwA1wDYyFEbQI7FITl2vTQTPYDnaCj3KyooQJVoNu0BmBGG0zQc71YhAPzQEnGRY/+8R8+QGGVCjcXEqBZQy3tkrQBpYnfRL1EGgEEzzGSB48AT2gT+eCj8nLbQCbDU9lk0USto35Ytov0MWE7C8zTL3kKbiiFsQqWw7VcaBNzD2wGOwJIUabePeB+l9tCloI2i0xlnCsBAfAVyda69Pe1yGbBW4ywVwbB2fBRSc+0y8/5AqSpL0KpqqLo2BHRKHxMnnuFvW/xxUkD65VF76DBpb5OG0vy8rfFVtBrzQbA/f9AzFZ0KT+t0iKiKCNRt7kuMriNAlTq6pvkti33Eq9whh8N0YhUqlPcP9ybRjs1pvrfEv5j8NkyzgFatS5PNjKo+NurinjxtqIhcgedh3cN8SIZ9by6GhBI8YEkuBVHpNXlyAkQyHP2SloG7CJcQW9tOzu3VwFlVyFl8Bn8AZ8AMctnk1RxFHwDtyxCBG7DNbrMGlLoIWVXfaVR8f3ExQsDxf7wpeZwp067eMxaUsOg7fFBiUZsiPgjOX6pCL3zgDbAvZIp8HjIHF2K/VturDVqElhrJ8tShdbFqcUQW4rIK3FfrCpTGHS47wGHZbFEsjM9iPP8M3j/pYPOI+smgV8kZZyxRRr8sfZlh4LOI/0UReiiLPfV4e4/pwlB3571J3GsIKCfHWcp7cyLIzyNfGCHqkzxjaxzR0tV1CiUChYLzzszPndKx3mM0vyH+SqdRrW1UfnIT2Zh7hhtilZ4/wSV1AcOeRntmJXE2dS+9mg5VzV/xRkq1NjYSb8I8AAdTOa+zQjMmsAAAAASUVORK5CYII=")}.bk-tool-icon-pan{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCRTI5MDhEODIwQjUxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCRTI5MDhEOTIwQjUxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkJFMjkwOEQ2MjBCNTExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkJFMjkwOEQ3MjBCNTExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+OXzPwwAAAKNJREFUeNrsVsEKgCAM3cyj0f8fuwT9XdEHrLyVIOKYY4kPPDim0+fenF+3HZi4nhFec+Rs4oCPAALwjDVUsKMWA6DNAFX6YXcMYIERdRWIYBzAZbKYGsSKex6mVUAK8Za0TphgoFTbpSvlx3/I0EQOILO2i/ibegLk/mgVONM4JvuBVizgkGH3XTGrR/xlV0ycbO8qCeMN54wdtVQwSTFwCzAATqEZUn8W8W4AAAAASUVORK5CYII=")}.bk-tool-icon-polygon-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAgCAYAAAB6kdqOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpFMzNBREIxOTQ0MUExMUU0QTE0ODk2NTE1M0M0MkZENCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpFMzNBREIxQTQ0MUExMUU0QTE0ODk2NTE1M0M0MkZENCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkUzM0FEQjE3NDQxQTExRTRBMTQ4OTY1MTUzQzQyRkQ0IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkUzM0FEQjE4NDQxQTExRTRBMTQ4OTY1MTUzQzQyRkQ0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+xB9jgwAAAe5JREFUeNrsmL1LAzEYxu9KUVDBW8RBhRscXNSCoyA6uIl0kYqIXFcXBRdBoYpuDi7iYEFbkFZPpX6sin+BtAhODloHRZTaSkEUUZ/A23rUer275mjFBn40hJA8eZI3ea+iGjn4FL5LCkigHiQ5trM5HEPuQaFQcQhlVpy0GoFWpF2hmKe/lfaUWUHZYsRSM2Vn/9CSQ5LNu2Bq/LI7Qw6KgqSNc5gavywdqgiqRFklyv7doS7q7flrUbYImkG61FvmAU9gBvhLHWUrYIucfwdxM6kNL4fqwBzV18AHOAaNYJo1BsOqDFyiKAp68BA0Cx6BD4yDc8ql+0FC008Gp4HQtttOh6JgAVSDF/BM7WmdZyQCUct6giSTkdYCpqjup+0JghqwaXCMSYhibknFOFQFwnRIl0AbWKXtUSy42wuuIMplNcoewDB9XdyB2gLbYzQTiEKUYtShHjBK9RM6JxOgCZxxvCo2IIohOX/pwMJ1D3STCBWMgTeCZyYQI+I/3jKNmFuNe5d0zyRsSt68yojnOl+UeUEXuAc3dLew67WTs5gYzZUpvtxD3UEurINdam8HDeCIsyNMTB8cCeA344qCsyNrBbFOrfQPxQWHyCkkJhPR8/lcYoJe6XJj98GAXXkIE6IRI+S4lHXoS4ABAP0ljy6tE4wBAAAAAElFTkSuQmCC")}.bk-tool-icon-redo{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAgCAYAAABgrToAAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wwGEDEBYlsi0wAAAYBJREFUWMPtl71Lw0AYxn9ppVAodKoUBGfHDtJJR0FRFAc5uMEbBFcdBcXi4G5Hhw5ZAkFQHASho07i0L+hUCi4KBSKQsHlLYSS0iQ0rcI9EMjHfTz3e58LCVhZWf1vOVEbup6fBTbkWAOyQEUet4AB8Ao0gabRajATg67nl4ErQAHFiON+AT5QM1p1UzHoen4eOAdOgELC8XtAHbg2WvWnZlCoPQLVKUXpDdhLQtMJMVcRc8sh7TvAA/AEfEj2kCyWgG1gH1ga03fHaNVKbFDIvYdM0AVqQGNS+GUzHUluyyEmV+OQdAID54CXkLI+AwdGq16clbueXwDugM2Qcq8brX6ijLMQOL8MMVc3Wp0mCZ0saMv1/BvZaENVZa6Lqb4Hk0pKfg/sjuzuFaNVZ1L/TNoGJbOHkr+hCsDZnyAYIHkM3AZu9YHFSdnOMDs1gHbgOj9S9tkTdD2/CHzGjIQzL4Lpfs2kTXKUnCU4hmQO+I5Cbl4ES/YfwcrKyiqefgEvB2gLTkQWKgAAAABJRU5ErkJggg==")}.bk-tool-icon-reset{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAgCAYAAABgrToAAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCRTI5MDhFMDIwQjUxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyOUMzNDE3NDIwQkIxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkJFMjkwOERFMjBCNTExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkJFMjkwOERGMjBCNTExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+kFHGtQAAAm1JREFUeNrMmE9ExFEQx3+7ZYmlLrEsUUTHaEV0iESJVqduXaJr1xKlFB1bdYqoQ9GlFBFdikgpIhLd0rLqUsQqrW2G7+YZr+2993vaHT6H3583M795897M+0U2t3cCR6kh+kA3rtvx7IYoEGfEMSi4GIk4OJgg5ogRot5wzBvBhmaJnI2xqMW7dcQC8UCMWzgX4N1xjF2ALq8OctROiGkiHrhLHDpOoNOLg5xXF0Sn5lmWWCUGiBRRC1K4t4p3pLCuKyVnnXMwAUVJcT+HfFo3SH5ePGPI24TmA1Pl8rJcBGPEvsa5I6KVWDNcmQW824qxqiRhI+bi4IxmWjOYuneH/HvH2Ixmumd8bjNhhad8lxgSzrfp8jUa/L/wlI8KZ3h1T4bdB30Kb9zz4t6YbgurlIMBdoBHUQiGTBx8JYoKPqVe0ftFNInnW8J20SSCjRWM8k8E1S+TNfbZYyQ59yJEg0kjw1QyB42k1iI6ReXLfEWSK8iHJnJVsYqN8jtammuFc/FOr3juU7Ia+39uM7fiuq8aVrEqp+J6BPWzahw8IPLKdTPKUNU4yJ3Fhqb1inu0y7qeRNVYsWkWFkXPl0QZ8iVbohFmW0s2DmY1jSUX8mUPzi1rmoLML2eXsvsgR/FO3JtAix53nNZ96FDlDrasW35eKGniRRPJeywck9VdOjTdayL3Ahv5MC1/xy+Hp1Iq7BGHMHatjOEqMUgMlxmbVsaEOpMk4GSnp0VyCedyLtuMTlhRD1ZaPoRjeejoMf1HE7VUPkW04Jz7Ztm9rGHslM1Hhjl2xlCn+4muQP/77RyHdf799uli5FuAAQC+l5Sj5nEBdwAAAABJRU5ErkJggg==")}.bk-tool-icon-resize{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpBODVDNDBCQjIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpBODVDNDBCQzIwQjMxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjMyMUREOEQ4MjBCMjExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4NUM0MEJBMjBCMzExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+nIbQ0AAAAIJJREFUeNpiXLhs5X8G7ICRgTYAq31MDIMEwBzyERoCyJhWAN2ej4MqRFiIjUMahczgSyMsNE4PxACBQZlrcAFsuYkcLECpQwZNiIw6ZNQhow4ZdcioQ0YdMuoQerRZkQE/vdqwgypqQD7+MIBuANn9f1CnEcbRXIMjd4zM0QCAAAMAbdAPQaze1JcAAAAASUVORK5CYII=")}.bk-tool-icon-save{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDozMjFERDhENjIwQjIxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDozMjFERDhENzIwQjIxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjMyMUREOEQ0MjBCMjExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjMyMUREOEQ1MjBCMjExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+h5hT8AAAAKBJREFUeNpiWbhs5QcGBgZ+hgECTAwDDGAO+AjEjGj4Lw5xUrAAkl3ocr8IhQAzjT3PRu0o+I+EHw65NDDqgJHrABYC8t9JMIuRmiHACS2IKC0LOKH0X1JDAOTzs0BsBs3XlIKz5KSBRCA+RQXLjwNxNDlp4BoQm9Mo7fGPZsNRB4w6YNQBI94BfwfaAV9G08CoA9DbA/xUavkMvRAACDAAaPgYViexODkAAAAASUVORK5CYII=")}.bk-tool-icon-tap-select{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDo3NzIwRUFGMDYyMjE2ODExOTdBNUNBNjVEQTY5OTRDRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCOTJBQzE0RDQ0RDUxMUU0QTE0ODk2NTE1M0M0MkZENCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCOTJBQzE0QzQ0RDUxMUU0QTE0ODk2NTE1M0M0MkZENCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1LjEgTWFjaW50b3NoIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6OTQ0QzIwMUM1RjIxNjgxMUE3QkFFMzhGRjc2NTI3MjgiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6NzcyMEVBRjA2MjIxNjgxMTk3QTVDQTY1REE2OTk0Q0UiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz6eYZ88AAADLklEQVR42rSXf2TUYRzHv7tuGcfE6Vwb5zLSSjEj7Y9KWqfEmFZJP+yPMdKKmUrrn0iUfjhWlLFi6YfNrF+StBoTo39iYkTGco4xxxG59P7k/T2PT8/37nu3bx9ezvPj+zyf5/PreS78bGLS8SmrwE6yje3NHJsDBTALpknBz6JhH3NiYAB0gHqPOVv52wJ6QQ48BzdAttTioRJjdeA8mAHHS2xuk3p+M8M16ipVQE49Ds6CiFO9RLjGONf05QLx6wPQaBlbBlPgJVgkP0ETiIJ2sB/E1XfimjfgBOOlKDUqCGOcqBcQnw6BYW5YTo4wbvQhMmCfGRemC2rBiGXzWUb+kM/NRZ6CHWBM9ce5R61NgX6ayhSJ5EPlItlDRNkz4JbFHf06BkSzHjXxM+gDv1S/mPUo2AXWgt9UUHL/IVhS8yUV1/EbV3o4N+NaoE9Fu/i827K5pNYHnqAVJECShWmAaddpscYFFXwR7vnXBRGlnUN/L6kqKJlxnRUuDbaDBiL+vst5d4gpcpBrqk/2jIgCKVUolhntplzivHmwh4stGOPfwBWwl/2dpp8p7xjQZqFLiQJtauKkivYm+kzccpK57yXfOUe+P23JqAnVbhMFmlXntCWnxbT31am9ZJ4BJifsUmNTqt0cYhA5ypympPg7VkEKunPbVb8cIG+0kyHLJZNR7fUMooUKFHAPkfQo58VLK+RzwRDd4FdWG9mjpaAXzqkJa1R7kQttqEABWXMjOOxxVRfnhRm5URX1prk/0pQHwNcKlchZ+jdpC+hFdVqO0my9Hj5dkYgCn1Rfh/KdlNDHrJhPqlDih+IfBd6qwpOgEqYMsorJ2HtWxtagLJDn/W3KRfPOZhoeBJfZPgVeGKeKrkQBh5dLXl25Ny3pc4/1fkTdbvFqFQgbxWeYD0hXulhQ0pYiM1jG547fcbMQpVnHTZEn9W3ljsCzwHxCdVteNHIZvQa7/7cC7nV6zHIfyFP9EXjFa7YxKAVqPP4bxhhoLWW+z9JyCb6M/MREg59/RlmmXbmneIybB+YC/ay+yrffqEddDzwGvKxxDmzhc0tc80XVgblqFfgjwAAPubcGjAOl1wAAAABJRU5ErkJggg==")}.bk-tool-icon-undo{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAgCAYAAABgrToAAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3wwGEAgO/GCy+AAAAXlJREFUWMPtlr1LQzEUxX+1ohQKuhQK/Sc6SCcdBUVQFCSQwQwOjjoKisXB3a5Ch7c8CA6iKAgddRKHjs6FQtGpUBCEoksK5RE179FPyIEs+bg59+TcJODh4THdSA0qUBDqNLBq2jKQBopmuA50gWegBtSUFN2REAxCnQfOAQEsOC5rAxooKylaQyEYhDoDnACHQDZhmA5QAS6UFJ8DI2hUuwVKA3LIC7BlUzOVgFwRuAcKluEmcAM8AB/Gexgv5oANYPuXtQ1Dsp6YoFHu1bJBCygD1f/Mb4pp3/g2b0lwqV/JVAxyc8CT5VgfgV0lRSdmslngGlizHPeKkuILYDZGzDMLuYqS4iiJ6UxC60GoL02h9VAye506KxiEugC8Rar1Dthxvc+SYsZx3nGEXBPYGzY5JwWNV96BTF/3gZLiahRPnYuCmxFyDaA6trc4CPV3zBiLSor2uD04eb8ZByWHqtz0K/iHkvO9W35SqjiKnP/ne3h4eIwOP9GxagtPmsh6AAAAAElFTkSuQmCC")}.bk-tool-icon-wheel-zoom{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAgCAYAAABpRpp6AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDpCRTI5MDhEQzIwQjUxMUU0ODREQUYzNzM5QTM2MjBCRSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDpCRTI5MDhERDIwQjUxMUU0ODREQUYzNzM5QTM2MjBCRSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkJFMjkwOERBMjBCNTExRTQ4NERBRjM3MzlBMzYyMEJFIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkJFMjkwOERCMjBCNTExRTQ4NERBRjM3MzlBMzYyMEJFIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+sFLapAAAA8xJREFUeNq8WH9k1VEU/+67ecTYxKM8xlJiifKIMUqUKMvy1CqbEmUxJZbSlGXTLBuJpYi18dpqStOzacT+WcTXpkiRUjziETEeY9bnzHm5O53vj/te7fDx3r3fc+/9fM/3nHPPvWWP0mOOIlVAC3AQqOc2SRZ4A9Cg58CSNrj1+FEnSIYfPynHTyOQArYCO/jRPPAJGAcmMM9f87vKfG3AF+AucMAgS5LgRZ4CH/mFrARkieAs8Aw4ASSBckaS++jZLOv6El4HjAKDwPoIa28GXgLdFmQv4WcO2BVBnXTmeIxK+D5wzLGXa8D1CGT78NPPhjFlGnjAmBbPSLefx65IBf+eZZ81hfznIfsr+W0eaACa2G3MhbuAt8CUD1kyRIfongDa4affhW4Nu2Oj0d2Bfg+6Y2UIukr2x4ShkAMOMQlNyLcmgVqj7z2wk17UDDosFOOYMOdPQ+dkyBcZFkb8DGxz2ckTwrKHA8g6HMn7gQWjbzsHqZSUmJ8sej6Cq7WzrhkzKVeYnmSEXSBM6I17RZ+WNWRfJ6z7K2xy1umUc7lGDizIkDL+AsNRXs6U3YpOUrRfWwS01K2noIuLzg+iTcFSiFLKlQPi8+aNAIwri24QlstaEM6JdoIsHBOdiyJl9RntfiXazUljEdJb3IKw1F10Q/Krtin0KaSD5Ido77MYK10sG0S4ByjzwW2LRT3pYlxLRBFpGM91/r9kRJuC/FbEnVEmhEwQYRqw7IMuC8LjnAKllSeBhEI0Qc8U636luWinWxYPqoFCnuxmX16VR9ldCvINqOH/NK5alpe8NY8qL5Nnl/GMFJhU6g2SZtqaw1xCkrss2pGEFhLp0CxuGow83+BDdoDn+FP8hJFeYusNlODL9LI/ubKLRRxDKfamuaNWRBx4o9TI49NDD9yjSdn9NKFa5jTGrdrIKpw1FJCtU8h6Rp/HwbVyBNOOSGtKGHJKtGdAao/NBO4aWrecS9mwQiuU8KLoi1nOEfepQ6TsFXVxnnO0NWFZEdVZjK8RaSgXoHtGbihwh4ViCM+LvhaL8VJ3xscdqnwOCk4xhDNKYNRHPOZfCakbzGOS+SWyloX8KsIj4lNScLwIuTsgsq+ASnFkmor4JdJayopKeEHZGOJ8OzMoatIkF0XvxIm5cGhcUtyhVqlrh4rNNoU8fI+jOCUs3cYIk14L63py9yo2D7fyBZ+t3AGuWgTmiFOCuCIvHuHFo6QbCpxm4GLIxZ+880j/K8Lm593EVZqnXF9N8UXIFt7zgwoeunDZCJzju44M+nKlEP4twAAD1RclkNDukAAAAABJRU5ErkJggg==")}
2 /*# sourceMappingURL=bokeh.min.css.map */
@@ -0,0 +1,269
1 window.Bokeh=Bokeh=function(){var t=void 0;return function e(t,n,r){function o(i){function s(e){var n=t[i][1][e];return o(n?n:e)}if(!n[i]){if(!t[i]){var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var l=n[i]={exports:{}};s.modules=o.modules,t[i][0].call(l.exports,s,l,l.exports,e,t,n,r)}return n[i].exports}o.modules=t;for(var i=null,s=0;s<r.length;s++)i=o(r[s]);return i}({"common/base":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g=function(t,e){function n(){this.constructor=t}for(var r in e)y.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},y={}.hasOwnProperty;s=t("underscore"),r=t("./collection"),("undefined"==typeof m||null===m)&&(m={location:{href:"local"}}),p=t("./logging").logger,t("./custom").monkey_patch(),i={},f=m.location.href,f.indexOf("/bokeh")>0?i.prefix=f.slice(0,f.lastIndexOf("/bokeh"))+"/":i.prefix="/",console.log("Bokeh: setting prefix to",i.prefix),c=t("./models"),u={},d=function(t){var e;return new(e=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return g(n,e),n.prototype.model=t,n}(r))},_=function(t){var e,n,r,o,i,a,l,u,h;i={};for(r in t)if(a=t[r],s.isArray(a)){u=a[0],h=null!=(o=a[1])?o:"";for(l in u)e=u[l],n=l+h,i[n]=e}else i[r]=a;return i},l=null,a=function(){return null==l&&(l=_(c)),l},o=function(t){var e,n;if(n=a(),u[t])return u[t];if(e=n[t],null==e)throw new Error("Module `"+t+"' does not exists. The problem may be two fold. Either a model was requested that's available in an extra bundle, e.g. a widget, or a custom model was requested, but it wasn't registered before first usage.");return null==e.Collection&&(e.Collection=d(e.Model)),e.Collection},o.register=function(t,e){return u[t]=e},o.register_locations=function(t,e,n){var r,o,i,s,l;null==e&&(e=!1),null==n&&(n=null),o=a(),r=_(t),l=[];for(s in r)y.call(r,s)&&(i=r[s],e||!o.hasOwnProperty(s)?l.push(o[s]=i):l.push("function"==typeof n?n(s):void 0));return l},o.registered_names=function(){return Object.keys(a())},h={},e.exports={collection_overrides:u,locations:c,index:h,Collections:o,Config:i}},{"./collection":"common/collection","./custom":"common/custom","./logging":"common/logging","./models":"common/models",underscore:"underscore"}],"common/bbox":[function(t,e,n){var r,o;r=function(){return[[1/0,-(1/0)],[1/0,-(1/0)]]},o=function(t,e){return t[0][0]=Math.min(t[0][0],e[0][0]),t[0][1]=Math.max(t[0][1],e[0][1]),t[1][0]=Math.min(t[1][0],e[1][0]),t[1][1]=Math.max(t[1][1],e[1][1]),t},e.exports={empty:r,extend:o}},{}],"common/build_views":[function(t,e,n){var r,o,i;r=t("underscore"),o=function(t,e,n,o){var s,a,l,u,h,c,p,_,d,f,m;for(null==o&&(o=[]),s=[],d=r.filter(e,function(e){return!r.has(t,e.id)}),l=a=0,c=d.length;c>a;l=++a)_=d[l],m=r.extend({},n,{model:_}),l<o.length?t[_.id]=new o[l](m):t[_.id]=new _.default_view(m),t[_.id].$el.find("*[class*='ui-']").each(function(t,e){return e.className=i(e)}),s.push(t[_.id]);for(f=r.difference(r.keys(t),r.pluck(e,"id")),u=0,p=f.length;p>u;u++)h=f[u],t[h].remove(),delete t[h];return s},i=function(t){var e,n;if(null!=t.className)return e=t.className.split(" "),n=r.map(e,function(t){return t=t.trim(),0===t.indexOf("ui-")?"bk-"+t:t}),n.join(" ")},o.jQueryUIPrefixer=i,e.exports=o=o},{underscore:"underscore"}],"common/canvas":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f=function(t,e){function n(){this.constructor=t}for(var r in e)m.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},m={}.hasOwnProperty;c=t("underscore"),_=t("kiwi"),a=_.Expression,i=_.Constraint,u=_.Operator,p=t("./canvas_template"),s=t("./continuum_view"),l=t("./layout_box"),d=t("./logging").logger,h=t("./solver"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.className="bk-canvas-wrapper",e.prototype.template=p,e.prototype.initialize=function(t){var n,r,o;return e.__super__.initialize.call(this,t),o={map:this.mget("map")},n=this.template(o),this.$el.html(n),this.canvas_wrapper=this.$el,this.canvas=this.$("canvas.bk-canvas"),this.canvas_events=this.$("div.bk-canvas-events"),this.canvas_overlay=this.$("div.bk-canvas-overlays"),this.map_div=null!=(r=this.$("div.bk-canvas-map"))?r:null,this.ctx=this.canvas[0].getContext("2d"),this.ctx.glcanvas=null,d.debug("CanvasView initialized")},e.prototype.render=function(t){var e,n,r,o,i;return null==t&&(t=!1),this.model.new_bounds||t?(this.mget("use_hidpi")?(n=window.devicePixelRatio||1,e=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,o=n/e):o=1,i=this.mget("width"),r=this.mget("height"),this.$el.attr("style","z-index: 50; width:"+i+"px; height:"+r+"px"),this.canvas.attr("style","width:"+i+"px;height:"+r+"px"),this.canvas.attr("width",i*o).attr("height",r*o),this.$el.attr("width",i).attr("height",r),this.canvas_events.attr("style","z-index:100; position:absolute; top:0; left:0; width:"+i+"px; height:"+r+"px;"),this.canvas_overlay.attr("style","z-index:75; position:absolute; top:0; left:0; width:"+i+"px; height:"+r+"px;"),this.ctx.scale(o,o),this.ctx.translate(.5,.5),this._fixup_line_dash(this.ctx),this._fixup_line_dash_offset(this.ctx),this._fixup_image_smoothing(this.ctx),this._fixup_measure_text(this.ctx),this.model.new_bounds=!1):void 0},e.prototype._fixup_line_dash=function(t){return t.setLineDash||(t.setLineDash=function(e){return t.mozDash=e,t.webkitLineDash=e}),t.getLineDash?void 0:t.getLineDash=function(){return t.mozDash}},e.prototype._fixup_line_dash_offset=function(t){return t.setLineDashOffset=function(e){return t.lineDashOffset=e,t.mozDashOffset=e,t.webkitLineDashOffset=e},t.getLineDashOffset=function(){return t.mozDashOffset}},e.prototype._fixup_image_smoothing=function(t){return t.setImageSmoothingEnabled=function(e){return t.imageSmoothingEnabled=e,t.mozImageSmoothingEnabled=e,t.oImageSmoothingEnabled=e,t.webkitImageSmoothingEnabled=e},t.getImageSmoothingEnabled=function(){var e;return null!=(e=t.imageSmoothingEnabled)?e:!0}},e.prototype._fixup_measure_text=function(t){return t.measureText&&null==t.html5MeasureText?(t.html5MeasureText=t.measureText,t.measureText=function(e){var n;return n=t.html5MeasureText(e),n.ascent=1.6*t.html5MeasureText("m").width,n}):void 0},e}(s),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return f(e,t),e.prototype.type="Canvas",e.prototype.default_view=o,e.prototype.initialize=function(t,n){var r;return r=new h,this.set("solver",r),e.__super__.initialize.call(this,t,n),this.new_bounds=!0,r.add_constraint(new i(new a(this._left),u.Eq)),r.add_constraint(new i(new a(this._bottom),u.Eq)),this._set_dims([this.get("canvas_width"),this.get("canvas_height")]),d.debug("Canvas initialized")},e.prototype.vx_to_sx=function(t){return t},e.prototype.vy_to_sy=function(t){return this.get("height")-(t+1)},e.prototype.v_vx_to_sx=function(t){var e,n,r,o;for(n=e=0,r=t.length;r>e;n=++e)o=t[n],t[n]=o;return t},e.prototype.v_vy_to_sy=function(t){var e,n,r,o,i;for(e=this.get("height"),r=n=0,o=t.length;o>n;r=++n)i=t[r],t[r]=e-(i+1);return t},e.prototype.sx_to_vx=function(t){return t},e.prototype.sy_to_vy=function(t){return this.get("height")-(t+1)},e.prototype.v_sx_to_vx=function(t){var e,n,r,o;for(n=e=0,r=t.length;r>e;n=++e)o=t[n],t[n]=o;return t},e.prototype.v_sy_to_vy=function(t){var e,n,r,o,i;for(e=this.get("height"),r=n=0,o=t.length;o>n;r=++n)i=t[r],t[r]=e-(i+1);return t},e.prototype._set_width=function(t,e){return null==e&&(e=!0),null!=this._width_constraint&&this.solver.remove_constraint(this._width_constraint),this._width_constraint=new i(new a(this._width,-t),u.Eq),this.solver.add_constraint(this._width_constraint),e&&this.solver.update_variables(),this.new_bounds=!0},e.prototype._set_height=function(t,e){return null==e&&(e=!0),null!=this._height_constraint&&this.solver.remove_constraint(this._height_constraint),this._height_constraint=new i(new a(this._height,-t),u.Eq),this.solver.add_constraint(this._height_constraint),e&&this.solver.update_variables(),this.new_bounds=!0},e.prototype._set_dims=function(t,e){return null==e&&(e=!0),this._set_width(t[0],!1),this._set_height(t[1],!1),this.solver.update_variables(e)},e.prototype.defaults=function(){return c.extend({},e.__super__.defaults.call(this),{width:300,height:300,map:!1,mousedown_callbacks:[],mousemove_callbacks:[],use_hidpi:!0})},e}(l.Model),e.exports={Model:r}},{"./canvas_template":"common/canvas_template","./continuum_view":"common/continuum_view","./layout_box":"common/layout_box","./logging":"common/logging","./solver":"common/solver",kiwi:"kiwi",underscore:"underscore"}],"common/canvas_template":[function(t,e,n){e.exports=function(t){t||(t={});var e,n=[],r=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){(function(){this.map&&n.push('\n<div class="bk-canvas-map"></div>\n'),n.push('\n<div class="bk-canvas-events" />\n<div class="bk-canvas-overlays" />\n<canvas class=\'bk-canvas\'></canvas>')}).call(this)}.call(t),t.safe=r,t.escape=o,n.join("")}},{}],"common/cartesian_frame":[function(t,e,n){var r,o,i,s,a,l,u,h,c=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;u=t("underscore"),s=t("./layout_box"),h=t("./logging").logging,a=t("../models/mappers/linear_mapper"),l=t("../models/mappers/log_mapper"),o=t("../models/mappers/categorical_mapper"),i=t("../models/mappers/grid_mapper"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="CartesianFrame",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("x_ranges",function(){return this._get_ranges("x")},!0),this.add_dependencies("x_ranges",this,["x_range","extra_x_ranges"]),this.register_property("y_ranges",function(){return this._get_ranges("y")},!0),this.add_dependencies("y_ranges",this,["y_range","extra_y_ranges"]),this.register_property("x_mappers",function(){return this._get_mappers("x",this.get("x_ranges"),this.get("h_range"))},!0),this.add_dependencies("x_ranges",this,["x_ranges","h_range"]),this.register_property("y_mappers",function(){return this._get_mappers("y",this.get("y_ranges"),this.get("v_range"))},!0),this.add_dependencies("y_ranges",this,["y_ranges","v_range"]),this.register_property("mapper",function(){return new i.Model({domain_mapper:this.get("x_mapper"),codomain_mapper:this.get("y_mapper")})},!0),this.add_dependencies("mapper",this,["x_mapper","y_mapper"]),this.listenTo(this.solver,"layout_update",this._update_mappers)},e.prototype.map_to_screen=function(t,e,n,r,o){var i,s,a,l;return null==r&&(r="default"),null==o&&(o="default"),a=this.get("x_mappers")[r].v_map_to_target(t),i=n.v_vx_to_sx(a),l=this.get("y_mappers")[o].v_map_to_target(e),s=n.v_vy_to_sy(l),[i,s]},e.prototype._get_ranges=function(t){var e,n,r,o;if(o={},o["default"]=this.get(t+"_range"),e=this.get("extra_"+t+"_ranges"),null!=e)for(n in e)r=e[n],o[n]=this.resolve_ref(r);return o},e.prototype._get_mappers=function(t,e,n){var r,i,s,u;i={};for(s in e){if(u=e[s],"Range1d"===u.type||"DataRange1d"===u.type)r="log"===this.get(t+"_mapper_type")?l.Model:a.Model;else{if("FactorRange"!==u.type)return logger.warn("unknown range type for range '"+s+"': "+u),null;r=o.Model}i[s]=new r({source_range:u,target_range:n})}return i},e.prototype._update_mappers=function(){var t,e,n,r,o;n=this.get("x_mappers");for(e in n)t=n[e],t.set("target_range",this.get("h_range"));r=this.get("y_mappers"),o=[];for(e in r)t=r[e],o.push(t.set("target_range",this.get("v_range")));return o},e.prototype.defaults=function(){return u.extend({},e.__super__.defaults.call(this),{extra_x_ranges:{},extra_y_ranges:{}})},e}(s.Model),e.exports={Model:r}},{"../models/mappers/categorical_mapper":"models/mappers/categorical_mapper","../models/mappers/grid_mapper":"models/mappers/grid_mapper","../models/mappers/linear_mapper":"models/mappers/linear_mapper","../models/mappers/log_mapper":"models/mappers/log_mapper","./layout_box":"common/layout_box","./logging":"common/logging",underscore:"underscore"}],"common/client":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y;d=t("underscore"),c=t("es6-promise").Promise,f=t("./logging").logger,y=t("./document"),a=y.Document,h=y.ModelChangedEvent,p=y.RootAddedEvent,_=y.RootRemovedEvent,l=t("./has_props"),i="ws://localhost:5006/ws",s="default",u=function(){function t(t,e,n){this.header=t,this.metadata=e,this.content=n,this.buffers=[]}return t.assemble=function(e,n,r){var o,i,s,a,l;try{return a=JSON.parse(e),l=JSON.parse(n),o=JSON.parse(r),new t(a,l,o)}catch(s){throw i=s,f.error("Failure parsing json "+i+" "+e+" "+n+" "+r,i),i}},t.create_header=function(t,e){var n;return n={msgid:d.uniqueId(),msgtype:t},d.extend(n,e)},t.create=function(e,n,r){var o;return null==r&&(r={}),o=t.create_header(e,n),new t(o,{},r)},t.prototype.send=function(t){var e,n,r,o,i;try{return o=JSON.stringify(this.header),i=JSON.stringify(this.metadata),e=JSON.stringify(this.content),t.send(o),t.send(i),t.send(e)}catch(r){throw n=r,f.error("Error sending ",this,n),n}},t.prototype.complete=function(){return null!=this.header&&null!=this.metadata&&null!=this.content?"num_buffers"in this.header?this.buffers.length===this.header.num_buffers:!0:!1},t.prototype.add_buffer=function(t){return this.buffers.push(t)},t.prototype._header_field=function(t){return t in this.header?this.header[t]:null},t.prototype.msgid=function(){return this._header_field("msgid")},t.prototype.msgtype=function(){return this._header_field("msgtype")},t.prototype.sessid=function(){return this._header_field("sessid")},t.prototype.reqid=function(){return this._header_field("reqid")},t.prototype.problem=function(){return"msgid"in this.header?"msgtype"in this.header?null:"No msgtype in header":"No msgid in header"},t}(),m={"PATCH-DOC":function(t,e){return t._for_session(function(t){return t._handle_patch(e)})},OK:function(t,e){return f.debug("Unhandled OK reply to "+e.reqid())},ERROR:function(t,e){return f.error("Unhandled ERROR reply to "+e.reqid()+": "+e.content.text)}},r=function(){function t(e,n,r,o){this.url=e,this.id=n,this._on_have_session_hook=r,this._on_closed_permanently_hook=o,this._number=t._connection_count,t._connection_count=this._number+1,null==this.url&&(this.url=i),null==this.id&&(this.id=s),f.debug("Creating websocket "+this._number+" to '"+this.url+"' session '"+this.id+"'"),this.socket=null,this.closed_permanently=!1,this._fragments=[],this._partial=null,this._current_handler=null,this._pending_ack=null,this._pending_replies={},this.session=null}return t._connection_count=0,t.prototype._for_session=function(t){return null!==this.session?t(this.session):void 0},t.prototype.connect=function(){var t,e,n;if(this.closed_permanently)return c.reject(new Error("Cannot connect() a closed ClientConnection"));if(null!=this.socket)return c.reject(new Error("Already connected"));this._fragments=[],this._partial=null,this._pending_replies={},this._current_handler=null;try{return n=this.url+"?bokeh-protocol-version=1.0&bokeh-session-id="+this.id,null!=window.MozWebSocket?this.socket=new MozWebSocket(n):this.socket=new WebSocket(n),new c(function(t){return function(e,n){return t.socket.binarytype="arraybuffer",t.socket.onopen=function(){return t._on_open(e,n)},t.socket.onmessage=function(e){return t._on_message(e)},t.socket.onclose=function(e){return t._on_close(e)},t.socket.onerror=function(){return t._on_error(n)}}}(this))}catch(e){return t=e,f.error("websocket creation failed to url: "+this.url),f.error(" - "+t),c.reject(t)}},t.prototype.close=function(){return this.closed_permanently||(f.debug("Permanently closing websocket connection "+this._number),this.closed_permanently=!0,null!=this.socket&&this.socket.close(1e3,"close method called on ClientConnection "+this._number),this._for_session(function(t){return t._connection_closed()}),null==this._on_closed_permanently_hook)?void 0:(this._on_closed_permanently_hook(),this._on_closed_permanently_hook=null)},t.prototype._schedule_reconnect=function(t){var e;return e=function(t){return function(){t.closed_permanently||f.info("Websocket connection "+t._number+" disconnected, will not attempt to reconnect")}}(this),setTimeout(e,t)},t.prototype.send=function(t){var e,n;try{if(null===this.socket)throw new Error("not connected so cannot send "+t);return t.send(this.socket)}catch(n){return e=n,f.error("Error sending message ",e,t)}},t.prototype.send_with_reply=function(t){var e;return e=new c(function(e){return function(n,r){return e._pending_replies[t.msgid()]=[n,r],e.send(t)}}(this)),e.then(function(t){if("ERROR"===t.msgtype())throw new Error("Error reply "+t.content.text);return t},function(t){throw t})},t.prototype._pull_doc_json=function(){var t,e;return t=u.create("PULL-DOC-REQ",{}),e=this.send_with_reply(t),e.then(function(t){if(!("doc"in t.content))throw new Error("No 'doc' field in PULL-DOC-REPLY");return t.content.doc},function(t){throw t})},t.prototype._repull_session_doc=function(){return null===this.session?f.debug("Pulling session for first time"):f.debug("Repulling session"),this._pull_doc_json().then(function(t){return function(e){var n,r,i;return null!==t.session?(t.session.document.replace_with_json(e),f.debug("Updated existing session with new pulled doc")):t.closed_permanently?f.debug("Got new document after connection was already closed"):(n=a.from_json(e),r=a._compute_patch_since_json(e,n),r.events.length>0&&(f.debug("Sending "+r.events.length+" changes from model construction back to server"),i=u.create("PATCH-DOC",{},r),t.send(i)),t.session=new o(t,n,t.id),f.debug("Created a new session from new pulled doc"),null!=t._on_have_session_hook?(t._on_have_session_hook(t.session),t._on_have_session_hook=null):void 0)}}(this),function(t){throw t})["catch"](function(t){return null!=console.trace&&console.trace(t),f.error("Failed to repull session "+t)})},t.prototype._on_open=function(t,e){return f.info("Websocket connection "+this._number+" is now open"),this._pending_ack=[t,e],this._current_handler=function(t){return function(e){return t._awaiting_ack_handler(e)}}(this)},t.prototype._on_message=function(t){var e,n;try{return this._on_message_unchecked(t)}catch(n){return e=n,f.error("Error handling message: "+e+", "+t)}},t.prototype._on_message_unchecked=function(t){var e,n;return null==this._current_handler&&f.error("got a message but haven't set _current_handler"),t.data instanceof ArrayBuffer?null==this._partial||this._partial.complete()?this._close_bad_protocol("Got binary from websocket but we were expecting text"):this._partial.add_buffer(t.data):null!=this._partial?this._close_bad_protocol("Got text from websocket but we were expecting binary"):(this._fragments.push(t.data),3===this._fragments.length&&(this._partial=u.assemble(this._fragments[0],this._fragments[1],this._fragments[2]),this._fragments=[],n=this._partial.problem(),null!==n&&this._close_bad_protocol(n))),null!=this._partial&&this._partial.complete()?(e=this._partial,this._partial=null,this._current_handler(e)):void 0},t.prototype._on_close=function(t){var e,n;for(f.info("Lost websocket "+this._number+" connection, "+t.code+" ("+t.reason+")"),this.socket=null,null!=this._pending_ack&&(this._pending_ack[1](new Error("Lost websocket connection, "+t.code+" ("+t.reason+")")),this._pending_ack=null),e=function(){var t,e,n;e=this._pending_replies;for(n in e)return t=e[n],delete this._pending_replies[n],t;return null},n=e();null!==n;)n[1]("Disconnected"),n=e();return this.closed_permanently?void 0:this._schedule_reconnect(2e3)},t.prototype._on_error=function(t){return f.debug("Websocket error on socket "+this._number),t(new Error("Could not open websocket"))},t.prototype._close_bad_protocol=function(t){return f.error("Closing connection: "+t),null!=this.socket?this.socket.close(1002,t):void 0},t.prototype._awaiting_ack_handler=function(t){return"ACK"!==t.msgtype()?this._close_bad_protocol("First message was not an ACK"):(this._current_handler=function(t){return function(e){return t._steady_state_handler(e)}}(this),this._repull_session_doc(),null!=this._pending_ack?(this._pending_ack[0](this),this._pending_ack=null):void 0)},t.prototype._steady_state_handler=function(t){var e;return t.reqid()in this._pending_replies?(e=this._pending_replies[t.reqid()],delete this._pending_replies[t.reqid()],e[0](t)):t.msgtype()in m?m[t.msgtype()](this,t):f.debug("Doing nothing with message "+t.msgtype())},t}(),o=function(){function t(t,e,n){this._connection=t,this.document=e,this.id=n,this._current_patch=null,this.document_listener=function(t){return function(e){return t._document_changed(e)}}(this),this.document.on_change(this.document_listener)}return t.prototype.close=function(){return this._connection.close()},t.prototype._connection_closed=function(){return this.document.remove_on_change(this.document_listener)},t.prototype.request_server_info=function(){var t,e;return t=u.create("SERVER-INFO-REQ",{}),e=this._connection.send_with_reply(t),e.then(function(t){return t.content})},t.prototype.force_roundtrip=function(){return this.request_server_info().then(function(t){})},t.prototype._should_suppress_on_change=function(t,e){var n,r,o,i,s,a,u,c,f,m,g,y,v,b;if(e instanceof h){for(g=t.content.events,r=0,a=g.length;a>r;r++)if(n=g[r],"ModelChanged"===n.kind&&n.model.id===e.model.id&&n.attr===e.attr)if(m=n["new"],e.new_ instanceof l){if("object"==typeof m&&"id"in m&&m.id===e.new_.id)return!0}else if(d.isEqual(m,e.new_))return!0}else if(e instanceof p){for(y=t.content.events,o=0,u=y.length;u>o;o++)if(n=y[o],"RootAdded"===n.kind&&n.model.id===e.model.id)return!0}else if(e instanceof _){for(v=t.content.events,i=0,c=v.length;c>i;i++)if(n=v[i],"RootRemoved"===n.kind&&n.model.id===e.model.id)return!0}else if(e instanceof TitleChangedEvent)for(b=t.content.events,s=0,f=b.length;f>s;s++)if(n=b[s],"TitleChanged"===n.kind&&n.title===e.title)return!0;return!1},t.prototype._document_changed=function(t){var e;if(!(null!=this._current_patch&&this._should_suppress_on_change(this._current_patch,t)||t instanceof h&&!(t.attr in t.model.serializable_attributes())))return e=u.create("PATCH-DOC",{},this.document.create_json_patch([t])),this._connection.send(e)},t.prototype._handle_patch=function(t){this._current_patch=t;try{return this.document.apply_json_patch(t.content)}finally{this._current_patch=null}},t}(),g=function(t,e){var n,o,i;return i=null,n=null,o=new c(function(o,i){return n=new r(t,e,function(t){var e,n;try{return o(t)}catch(n){throw e=n,f.error("Promise handler threw an error, closing session "+error),t.close(),e}},function(){return i(new Error("Connection was closed before we successfully pulled a session"))}),n.connect().then(function(t){},function(t){throw f.error("Failed to connect to Bokeh server "+t),t})}),o.close=function(){return n.close()},o},e.exports={pull_session:g,DEFAULT_SERVER_WEBSOCKET_URL:i,DEFAULT_SESSION_ID:s}},{"./document":"common/document","./has_props":"common/has_props","./logging":"common/logging","es6-promise":"es6-promise",underscore:"underscore"}],"common/collection":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;r=t("backbone"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e}(r.Collection),e.exports=o},{backbone:"backbone"}],"common/color":[function(t,e,n){var r,o,i,s;o=function(t){var e;return e=Number(t).toString(16),e=1===e.length?"0"+e:e},i=function(t){var e,n,i;return t+="",0===t.indexOf("#")?t:null!=r[t]?r[t]:0===t.indexOf("rgb")?(n=t.match(/\d+/g),e=function(){var t,e,r;for(r=[],t=0,e=n.length;e>t;t++)i=n[t],r.push(o(i));return r}().join(""),"#"+e.slice(0,8)):t},s=function(t,e){var n,r,o;if(null==e&&(e=1),!t)return[0,0,0,0];for(n=i(t),n=n.replace(/ |#/g,""),n.length<=4&&(n=n.replace(/(.)/g,"$1$1")),n=n.match(/../g),o=function(){var t,e,o;for(o=[],t=0,e=n.length;e>t;t++)r=n[t],o.push(parseInt(r,16)/255);return o}();o.length<3;)o.push(0);return o.length<4&&o.push(e),o.slice(0,4)},r={k:"#000000",w:"#FFFFFF",r:"#FF0000",g:"#00FF00",b:"#0000FF",y:"#FFFF00",m:"#FF00FF",c:"#00FFFF",aqua:"#00ffff",aliceblue:"#f0f8ff",antiquewhite:"#faebd7",black:"#000000",blue:"#0000ff",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgreen:"#006400",darkturquoise:"#00ced1",deepskyblue:"#00bfff",green:"#008000",lime:"#00ff00",mediumblue:"#0000cd",mediumspringgreen:"#00fa9a",navy:"#000080",springgreen:"#00ff7f",teal:"#008080",midnightblue:"#191970",dodgerblue:"#1e90ff",lightseagreen:"#20b2aa",forestgreen:"#228b22",seagreen:"#2e8b57",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",limegreen:"#32cd32",mediumseagreen:"#3cb371",turquoise:"#40e0d0",royalblue:"#4169e1",steelblue:"#4682b4",darkslateblue:"#483d8b",mediumturquoise:"#48d1cc",indigo:"#4b0082",darkolivegreen:"#556b2f",cadetblue:"#5f9ea0",cornflowerblue:"#6495ed",mediumaquamarine:"#66cdaa",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6a5acd",olivedrab:"#6b8e23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7b68ee",lawngreen:"#7cfc00",aquamarine:"#7fffd4",chartreuse:"#7fff00",gray:"#808080",grey:"#808080",maroon:"#800000",olive:"#808000",purple:"#800080",lightskyblue:"#87cefa",skyblue:"#87ceeb",blueviolet:"#8a2be2",darkmagenta:"#8b008b",darkred:"#8b0000",saddlebrown:"#8b4513",darkseagreen:"#8fbc8f",lightgreen:"#90ee90",mediumpurple:"#9370db",darkviolet:"#9400d3",palegreen:"#98fb98",darkorchid:"#9932cc",yellowgreen:"#9acd32",sienna:"#a0522d",brown:"#a52a2a",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",greenyellow:"#adff2f",lightblue:"#add8e6",paleturquoise:"#afeeee",lightsteelblue:"#b0c4de",powderblue:"#b0e0e6",firebrick:"#b22222",darkgoldenrod:"#b8860b",mediumorchid:"#ba55d3",rosybrown:"#bc8f8f",darkkhaki:"#bdb76b",silver:"#c0c0c0",mediumvioletred:"#c71585",indianred:"#cd5c5c",peru:"#cd853f",chocolate:"#d2691e",tan:"#d2b48c",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",thistle:"#d8bfd8",goldenrod:"#daa520",orchid:"#da70d6",palevioletred:"#db7093",crimson:"#dc143c",gainsboro:"#dcdcdc",plum:"#dda0dd",burlywood:"#deb887",lightcyan:"#e0ffff",lavender:"#e6e6fa",darksalmon:"#e9967a",palegoldenrod:"#eee8aa",violet:"#ee82ee",azure:"#f0ffff",honeydew:"#f0fff0",khaki:"#f0e68c",lightcoral:"#f08080",sandybrown:"#f4a460",beige:"#f5f5dc",mintcream:"#f5fffa",wheat:"#f5deb3",whitesmoke:"#f5f5f5",ghostwhite:"#f8f8ff",lightgoldenrodyellow:"#fafad2",linen:"#faf0e6",salmon:"#fa8072",oldlace:"#fdf5e6",bisque:"#ffe4c4",blanchedalmond:"#ffebcd",coral:"#ff7f50",cornsilk:"#fff8dc",darkorange:"#ff8c00",deeppink:"#ff1493",floralwhite:"#fffaf0",fuchsia:"#ff00ff",gold:"#ffd700",hotpink:"#ff69b4",ivory:"#fffff0",lavenderblush:"#fff0f5",lemonchiffon:"#fffacd",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightyellow:"#ffffe0",magenta:"#ff00ff",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",orange:"#ffa500",orangered:"#ff4500",papayawhip:"#ffefd5",peachpuff:"#ffdab9",pink:"#ffc0cb",red:"#ff0000",seashell:"#fff5ee",snow:"#fffafa",tomato:"#ff6347",white:"#ffffff",yellow:"#ffff00"},e.exports={color2hex:i,color2rgba:s}},{}],"common/continuum_view":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("backbone"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){return i.has(t,"id")?void 0:this.id=i.uniqueId("ContinuumView")},e.prototype.bind_bokeh_events=function(){return"pass"},e.prototype.delegateEvents=function(t){return e.__super__.delegateEvents.call(this,t)},e.prototype.remove=function(){var t,n,r;if(i.has(this,"eventers")){t=this.eventers;for(n in t)a.call(t,n)&&(r=t[n],r.off(null,null,this))}return this.trigger("remove",this),e.__super__.remove.call(this)},e.prototype.mget=function(){return this.model.get.apply(this.model,arguments)},e.prototype.mset=function(){return this.model.set.apply(this.model,arguments)},e.prototype.render_end=function(){return"pass"},e}(r.View),e.exports=o},{backbone:"backbone",underscore:"underscore"}],"common/custom":[function(t,e,n){var r,o;r=t("underscore"),o=function(){return r.uniqueId=function(t){var e,n,r,o,i;for(o=[],e="0123456789ABCDEF",n=r=0;31>=r;n=++r)o[n]=e.substr(Math.floor(16*Math.random()),1);return o[12]="4",o[16]=e.substr(3&o[16]|8,1),i=o.join(""),t?t+"-"+i:i}},r.isNullOrUndefined=function(t){return r.isNull(t)||r.isUndefined(t)},r.setdefault=function(t,e,n){return r.has(t,e)?t[e]:(t[e]=n,n)},e.exports={monkey_patch:o}},{underscore:"underscore"}],"common/document":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f=function(t,e){function n(){this.constructor=t}for(var r in e)m.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},m={}.hasOwnProperty,g=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};p=t("underscore"),d=t("./logging").logger,a=t("./has_props"),r=t("./base").Collections,s=function(){function t(t){this.document=t}return t}(),l=function(t){function e(t,n,r,o,i){this.document=t,this.model=n,this.attr=r,this.old=o,this.new_=i,e.__super__.constructor.call(this,this.document)}return f(e,t),e}(s),c=function(t){function e(t,n){this.document=t,this.title=n,e.__super__.constructor.call(this,this.document)}return f(e,t),e}(s),u=function(t){function e(t,n){this.document=t,this.model=n,e.__super__.constructor.call(this,this.document)}return f(e,t),e}(s),h=function(t){function e(t,n){this.document=t,this.model=n,e.__super__.constructor.call(this,this.document)}return f(e,t),e}(s),o="Bokeh Application",_=function(){function t(){this._dict={}}return t.prototype._existing=function(t){return t in this._dict?this._dict[t]:null},t.prototype.add_value=function(t,e){var n;if(null===e)throw new Error("Can't put null in this dict");if(p.isArray(e))throw new Error("Can't put arrays in this dict");return n=this._existing(t),null===n?this._dict[t]=e:p.isArray(n)?n.push(e):this._dict[t]=[n,e]},t.prototype.remove_value=function(t,e){var n,r;return n=this._existing(t),p.isArray(n)?(r=p.without(n,e),r.length>0?this._dict[t]=r:delete this._dict[t]):p.isEqual(n,e)?delete this._dict[t]:void 0},t.prototype.get_one=function(t,e){var n;if(n=this._existing(t),p.isArray(n)){if(1===n.length)return n[0];throw new Error(e)}return n},t}(),i=function(){function t(){this._title=o,this._roots=[],this._all_models={},this._all_models_by_name=new _,this._all_model_counts={},this._callbacks=[]}return t.prototype.clear=function(){var t;for(t=[];this._roots.length>0;)t.push(this.remove_root(this._roots[0]));return t},t.prototype._destructively_move=function(t){var e;for(t.clear();this._roots.length>0;)e=this._roots[0],this.remove_root(e),t.add_root(e);return t.set_title(this._title)},t.prototype.roots=function(){return this._roots},t.prototype.add_root=function(t){return g.call(this._roots,t)>=0?void 0:(this._roots.push(t),t.attach_document(this),this._trigger_on_change(new u(this,t)))},t.prototype.remove_root=function(t){var e;return e=this._roots.indexOf(t),0>e?void 0:(this._roots.splice(e,1),t.detach_document(),this._trigger_on_change(new h(this,t)))},t.prototype.title=function(){return this._title},t.prototype.set_title=function(t){return t!==this._title?(this._title=t,this._trigger_on_change(new c(this,t))):void 0},t.prototype.get_model_by_id=function(t){return t in this._all_models?this._all_models[t]:null},t.prototype.get_model_by_name=function(t){
2 return this._all_models_by_name.get_one(t,"Multiple models are named '"+t+"'")},t.prototype.on_change=function(t){return g.call(this._callbacks,t)>=0?void 0:this._callbacks.push(t)},t.prototype.remove_on_change=function(t){var e;return e=this._callbacks.indexOf(t),e>=0?this._callbacks.splice(e,1):void 0},t.prototype._trigger_on_change=function(t){var e,n,r,o,i;for(o=this._callbacks,i=[],n=0,r=o.length;r>n;n++)e=o[n],i.push(e(t));return i},t.prototype._notify_change=function(t,e,n,r){return"name"===e&&(this._all_models_by_name.remove_value(n,t),null!==r&&this._all_models_by_name.add_value(r,t)),this._trigger_on_change(new l(this,t,e,n,r))},t.prototype._notify_attach=function(t){var e;if(!t.serializable_in_document())throw console.log("Attempted to attach nonserializable to document ",t),new Error("Should not attach nonserializable model "+t.constructor.name+" to document");return t.id in this._all_model_counts?this._all_model_counts[t.id]=this._all_model_counts[t.id]+1:this._all_model_counts[t.id]=1,this._all_models[t.id]=t,e=t.get("name"),null!==e?this._all_models_by_name.add_value(e,t):void 0},t.prototype._notify_detach=function(t){var e,n;return this._all_model_counts[t.id]-=1,e=this._all_model_counts[t.id],0===e&&(delete this._all_models[t.id],delete this._all_model_counts[t.id],n=t.get("name"),null!==n&&this._all_models_by_name.remove_value(n,t)),e},t._references_json=function(t,e){var n,r,o,i,s;for(null==e&&(e=!0),s=[],n=0,r=t.length;r>n;n++){if(o=t[n],!o.serializable_in_document())throw console.log("nonserializable value in references ",o),new Error("references should never contain nonserializable value");i=o.ref(),i.attributes=o.attributes_as_json(e),delete i.attributes.id,s.push(i)}return s},t._instantiate_object=function(t,e,n){var o,i;if(i=p.extend({},n,{id:t}),o=r(e),null==o)throw new Error("unknown model type "+e+" for "+t);return new o.model(i,{silent:!0,defer_initialization:!0})},t._instantiate_references_json=function(e,n){var r,o,i,s,a,l,u,h;for(h={},o=0,i=e.length;i>o;o++)s=e[o],l=s.id,u=s.type,a=s.attributes,l in n?r=n[l]:(r=t._instantiate_object(l,u,a),"subtype"in s&&r.set_subtype(s.subtype)),h[r.id]=r;return h},t._resolve_refs=function(t,e,n){var r,o,i;return i=function(t){if(a._is_ref(t)){if(t.id in e)return e[t.id];if(t.id in n)return n[t.id];throw new Error("reference "+JSON.stringify(t)+" isn't known (not in Document?)")}return p.isArray(t)?r(t):p.isObject(t)?o(t):t},o=function(t){var e,n,r;n={};for(e in t)r=t[e],n[e]=i(r);return n},r=function(t){var e,n,r,o;for(r=[],e=0,n=t.length;n>e;e++)o=t[e],r.push(i(o));return r},i(t)},t._initialize_references_json=function(e,n,r){var o,i,s,l,u,h,c,_,d;for(_={},s=0,l=e.length;l>s;s++)u=e[s],c=u.id,h=u.attributes,d=!1,i=c in n?n[c]:(d=!0,r[c]),h=t._resolve_refs(h,n,r),_[i.id]=[i,h,d];return o=function(t,e){var n,r,o,i,s;n={},r=function(e,o){var i,s,l,u,h,c,_,f,m,g;if(e instanceof a){if(!(e.id in n)&&e.id in t){n[e.id]=!0,_=t[e.id],g=_[0],s=_[1],d=_[2];for(i in s)l=s[i],r(l,o);return o(e,s,d)}}else{if(p.isArray(e)){for(f=[],h=0,c=e.length;c>h;h++)l=e[h],f.push(r(l,o));return f}if(p.isObject(e)){m=[];for(u in e)l=e[u],m.push(r(l,o));return m}}},i=[];for(o in t)s=t[o],i.push(r(s[0],e));return i},o(_,function(t,e,n){return n?t.set(e):void 0}),o(_,function(t,e,n){return n?t.initialize(e):void 0})},t._event_for_attribute_change=function(t,e,n,r,o){var i,s;return i=r.get_model_by_id(t.id),i.attribute_is_serializable(e)?(s={kind:"ModelChanged",model:{id:t.id,type:t.type},attr:e,"new":n},a._json_record_references(r,n,o,!0),s):null},t._events_to_sync_objects=function(e,n,r,o){var i,s,a,l,u,h,c,_,f,m,g,y,v,b,x;for(a=Object.keys(e.attributes),x=Object.keys(n.attributes),v=p.difference(a,x),i=p.difference(x,a),b=p.intersection(a,x),s=[],l=0,c=v.length;c>l;l++)u=v[l],d.warn("Server sent key "+u+" but we don't seem to have it in our JSON");for(h=0,_=i.length;_>h;h++)u=i[h],g=n.attributes[u],s.push(t._event_for_attribute_change(e,u,g,r,o));for(m=0,f=b.length;f>m;m++)u=b[m],y=e.attributes[u],g=n.attributes[u],null===y&&null===g||(null===y||null===g?s.push(t._event_for_attribute_change(e,u,g,r,o)):p.isEqual(y,g)||s.push(t._event_for_attribute_change(e,u,g,r,o)));return p.filter(s,function(t){return null!==t})},t._compute_patch_since_json=function(e,n){var r,o,i,s,a,l,u,h,c,_,d,f,m,g,y,v,b,x,w,k,M,j;for(b=n.to_json(l=!1),v=function(t){var e,n,r,o,i;for(i={},o=t.roots.references,e=0,n=o.length;n>e;e++)r=o[e],i[r.id]=r;return i},o=v(e),s={},i=[],m=e.roots.root_ids,u=0,c=m.length;c>u;u++)f=m[u],s[f]=o[f],i.push(f);for(x=v(b),k={},w=[],g=b.roots.root_ids,h=0,_=g.length;_>h;h++)f=g[h],k[f]=x[f],w.push(f);if(i.sort(),w.sort(),p.difference(i,w).length>0||p.difference(w,i).length>0)throw new Error("Not implemented: computing add/remove of document roots");j={},r=[],y=n._all_models;for(a in y)d=y[a],a in o&&(M=t._events_to_sync_objects(o[a],x[a],n,j),r=r.concat(M));return{events:r,references:t._references_json(p.values(j),l=!1)}},t.prototype.to_json_string=function(t){return null==t&&(t=!0),JSON.stringify(this.to_json(t))},t.prototype.to_json=function(e){var n,r,o,i,s,a,l,u;for(null==e&&(e=!0),a=[],s=this._roots,n=0,o=s.length;o>n;n++)i=s[n],a.push(i.id);return l=function(){var t,e;t=this._all_models,e=[];for(r in t)u=t[r],e.push(u);return e}.call(this),{title:this._title,roots:{root_ids:a,references:t._references_json(l,e)}}},t.from_json_string=function(e){var n;if(null===e||null==e)throw new Error("JSON string is "+typeof e);return n=JSON.parse(e),t.from_json(n)},t.from_json=function(e){var n,r,o,i,s,a,l,u;if("object"!=typeof e)throw new Error("JSON object has wrong type "+typeof e);for(u=e.roots,l=u.root_ids,a=u.references,s=t._instantiate_references_json(a,{}),t._initialize_references_json(a,{},s),n=new t,r=0,o=l.length;o>r;r++)i=l[r],n.add_root(s[i]);return n.set_title(e.title),n},t.prototype.replace_with_json=function(e){var n;return n=t.from_json(e),n._destructively_move(this)},t.prototype.create_json_patch_string=function(t){return JSON.stringify(this.create_json_patch(t))},t.prototype.create_json_patch=function(e){var n,r,o,i,s,_,d,f,m,g;for(d={},s=[],o=0,_=e.length;_>o;o++){if(n=e[o],n.document!==this)throw console.log("Cannot create a patch using events from a different document, event had ",n.document," we are ",this),new Error("Cannot create a patch using events from a different document");if(n instanceof l){if("id"===n.attr)throw console.log("'id' field is immutable and should never be in a ModelChangedEvent ",n),new Error("'id' field should never change, whatever code just set it is wrong");f=n.new_,m=a._value_to_json("new_",f,n.model),g={},a._value_record_references(f,g,!0),n.model.id in g&&n.model!==f&&delete g[n.model.id];for(r in g)d[r]=g[r];i={kind:"ModelChanged",model:n.model.ref(),attr:n.attr,"new":m},s.push(i)}else n instanceof u?(a._value_record_references(n.model,d,!0),i={kind:"RootAdded",model:n.model.ref()},s.push(i)):n instanceof h?(i={kind:"RootRemoved",model:n.model.ref()},s.push(i)):n instanceof c&&(i={kind:"TitleChanged",title:n.title},s.push(i))}return{events:s,references:t._references_json(p.values(d))}},t.prototype.apply_json_patch_string=function(t){return this.apply_json_patch(JSON.parse(t))},t.prototype.apply_json_patch=function(e){var n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j;for(b=e.references,a=e.events,v=t._instantiate_references_json(b,this._all_models),u=0,c=a.length;c>u;u++)if(s=a[u],"model"in s){if(_=s.model.id,!(_ in this._all_models))throw console.log("Got an event for unknown model ",s.model),new Error("event model wasn't known");v[_]=this._all_models[_]}m={},d={};for(l in v)j=v[l],l in this._all_models?m[l]=j:d[l]=j;for(t._initialize_references_json(b,m,d),x=[],h=0,p=a.length;p>h;h++)if(s=a[h],"ModelChanged"===s.kind){if(g=s.model.id,!(g in this._all_models))throw new Error("Cannot apply patch to "+g+" which is not in the document");y=this._all_models[g],n=s.attr,j=t._resolve_refs(s["new"],m,d),x.push(y.set((f={},f[""+n]=j,f)))}else if("ColumnsStreamed"===s.kind){if(o=s.column_source.id,!(o in this._all_models))throw new Error("Cannot stream to "+o+" which is not in the document");r=this._all_models[o],i=s.data,w=s.rollover,x.push(r.stream(i,w))}else if("RootAdded"===s.kind)k=s.model.id,M=v[k],x.push(this.add_root(M));else if("RootRemoved"===s.kind)k=s.model.id,M=v[k],x.push(this.remove_root(M));else{if("TitleChanged"!==s.kind)throw new Error("Unknown patch event "+JSON.stringify(s));x.push(this.set_title(s.title))}return x},t}(),e.exports={Document:i,DocumentChangedEvent:s,ModelChangedEvent:l,TitleChangedEvent:c,RootAddedEvent:u,RootRemovedEvent:h,DEFAULT_TITLE:o}},{"./base":"common/base","./has_props":"common/has_props","./logging":"common/logging",underscore:"underscore"}],"common/embed":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S;r=t("jquery"),h=t("underscore"),o=t("backbone"),x=t("./base"),E=t("./logging"),T=E.logger,S=E.set_log_level,P=t("./document"),i=P.Document,a=P.RootAddedEvent,l=P.RootRemovedEvent,u=P.TitleChangedEvent,z=t("./client").pull_session,s=t("es6-promise").Promise,_=function(t){var e;if(T.debug("handling notebook comms"),e=JSON.parse(t.content.data),"events"in e&&"references"in e)return this.apply_json_patch(e);if("doc"in e)return this.replace_with_json(e.doc);throw new Error("handling notebook comms message: ",t)},d=function(t,e){var n;return"undefined"!=typeof Jupyter&&null!==Jupyter?(n=Jupyter.notebook.kernel.comm_manager,n.register_target(t,function(n,r){return T.info("Registering Jupyter comms for target "+t),n.on_msg(h.bind(_,e))})):console.warn("Juptyer notebooks comms not available. push_notebook will not function")},c=function(t){var e;return e=new t.default_view({model:t}),x.index[t.id]=e,e},b=function(t,e,n){var o,i;if(o=n.get_model_by_id(e),null==o)throw new Error("Model "+e+" was not in document "+n);return i=c(o),h.delay(function(){return r(t).replaceWith(i.$el)})},f=function(t,e,n){var o,i,s,h,p,_,d;d={},p=function(e){var n;return n=c(e),d[e.id]=n,r(t).append(n.$el)},_=function(e){var n;return e.id in d?(n=d[e.id],r(t).remove(n.$el),delete d[e.id],delete x.index[e.id]):void 0},h=e.roots();for(o=0,i=h.length;i>o;o++)s=h[o],p(s);return n&&(window.document.title=e.title()),e.on_change(function(t){return t instanceof a?p(t.model):t instanceof l?_(t.model):n&&t instanceof u?window.document.title=t.title:void 0})},y=function(t,e,n){return h.delay(function(){return f(r(t),e,n)})},m={},p=function(t,e){var n;if(null==t||null===t)throw new Error("Missing websocket_url");return t in m||(m[t]={}),n=m[t],e in n||(n[e]=z(t,e)),n[e]},g=function(t,e,n,r){var o;return o=p(e,n),o.then(function(e){return f(t,e.document,r)},function(t){throw T.error("Failed to load Bokeh session "+n+": "+t),t})},v=function(t,e,n,o){var i;return i=p(e,o),i.then(function(e){var o,i;if(o=e.document.get_model_by_id(n),null==o)throw new Error("Did not find model "+n+" in session");return i=c(o),r(t).replaceWith(i.$el)},function(t){throw T.error("Failed to load Bokeh session "+o+": "+t),t})},M=function(t){var e;return e=r("<link href='"+t+"' rel='stylesheet' type='text/css'>"),r("body").append(e)},j=function(t){var e;return e=r("<style>").html(t),r("body").append(e)},k=function(t,e){var n;return n=t.data(),null!=n.bokehLogLevel&&n.bokehLogLevel.length>0&&S(n.bokehLogLevel),null!=n.bokehDocId&&n.bokehDocId.length>0&&(e.docid=n.bokehDocId),null!=n.bokehModelId&&n.bokehModelId.length>0&&(e.modelid=n.bokehModelId),null!=n.bokehSessionId&&n.bokehSessionId.length>0&&(e.sessionid=n.bokehSessionId),T.info("Will inject Bokeh script tag with params "+JSON.stringify(e))},w=function(t,e,n){var o,s,a,l,u,h,c,p,_,f,m;null==n&&(n=null),a={};for(s in t)a[s]=i.from_json(t[s]);for(f=[],h=0,p=e.length;p>h;h++){if(c=e[h],null!=c.notebook_comms_target&&d(c.notebook_comms_target,a[s]),u=c.elementid,l=r("#"+u),0===l.length)throw new Error("Error rendering Bokeh model: could not find tag with id: "+u);if(l.length>1)throw new Error("Error rendering Bokeh model: found too many tags with id: "+u);if(!document.body.contains(l[0]))throw new Error("Error rendering Bokeh model: element with id '"+u+"' must be under <body>");if("SCRIPT"===l.prop("tagName")&&(k(l,c),o=r("<div>",{"class":"bokeh-container"}),l.replaceWith(o),l=o),m=null!=c.use_for_title&&c.use_for_title,_=null,null!=c.modelid)if(null!=c.docid)b(l,c.modelid,a[c.docid]);else{if(null==c.sessionid)throw new Error("Error rendering Bokeh model "+c.modelid+" to element "+u+": no document ID or session ID specified");_=v(l,n,c.modelid,c.sessionid)}else if(null!=c.docid)y(l,a[c.docid],m);else{if(null==c.sessionid)throw new Error("Error rendering Bokeh document to element "+u+": no document ID or session ID specified");_=g(l,n,c.sessionid,m)}null!==_?f.push(_.then(function(t){return console.log("Bokeh items were rendered successfully")},function(t){return console.log("Error rendering Bokeh items ",t)})):f.push(void 0)}return f},e.exports={embed_items:w,inject_css:M,inject_raw_css:j}},{"./base":"common/base","./client":"common/client","./document":"common/document","./logging":"common/logging",backbone:"backbone","es6-promise":"es6-promise",jquery:"jquery",underscore:"underscore"}],"common/has_props":[function(t,e,n){var r,o,i,s,a,l=function(t,e){return function(){return t.apply(e,arguments)}},u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;r=t("jquery"),s=t("underscore"),o=t("backbone"),a=t("./logging").logger,i=function(e){function n(t,e){this.resolve_ref=l(this.resolve_ref,this),this.convert_to_ref=l(this.convert_to_ref,this);var n,r;this.document=null,n=t||{},e||(e={}),this.cid=s.uniqueId("c"),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(n=this.parse(n,e)||{}),r=s.result(this,"defaults"),this.set(r,{defaults:!0}),this._set_after_defaults={},this.set(n,e),this.changed={},this._base=!1,this.properties={},this.property_cache={},s.has(n,this.idAttribute)||(this.id=s.uniqueId(this.type),this.attributes[this.idAttribute]=this.id),e.defer_initialization||this.initialize.apply(this,arguments)}return u(n,e),n.prototype.toString=function(){return this.type+"("+this.id+")"},n.prototype.destroy=function(t){return n.__super__.destroy.call(this,t),this.stopListening()},n.prototype.isNew=function(){return!1},n.prototype.attrs_and_props=function(){var t,e,n,r,o;for(t=s.clone(this.attributes),o=s.keys(this.properties),e=0,n=o.length;n>e;e++)r=o[e],t[r]=this.get(r);return t},n.prototype.forceTrigger=function(t){var e,n,r,o,i;for(s.isArray(t)||(t=[t]),i={},n=this._changing,this._changing=!0,t.length&&(this._pending=!0),r=0,o=t.length;o>r;r++)e=t[r],this.trigger("change:"+e,this,this.attributes[e],i);if(n)return this;for(;this._pending;)this._pending=!1,this.trigger("change",this,i);return this._pending=!1,this._changing=!1,this},n.prototype.set_obj=function(t,e,n){var r,o;s.isObject(t)||null===t?(r=t,n=e):(r={},r[t]=e);for(t in r)h.call(r,t)&&(o=r[t],r[t]=this.convert_to_ref(o));return this.set(r,n)},n.prototype.set=function(t,e,r){var o,i,a,l,u,c,p,_;s.isObject(t)||null===t?(o=t,r=e):(o={},o[t]=e),p=[];for(t in o)h.call(o,t)&&(_=o[t],null!=r&&r.defaults||(this._set_after_defaults[t]=!0),s.has(this,"properties")&&s.has(this.properties,t)&&this.properties[t].setter&&(this.properties[t].setter.call(this,_,t),p.push(t)));if(!s.isEmpty(p))for(o=s.clone(o),i=0,a=p.length;a>i;i++)t=p[i],delete o[t];if(!s.isEmpty(o)){l={};for(t in o)e=o[t],l[t]=this.get(t,u=!1);if(n.__super__.set.call(this,o,r),null==(null!=r?r.silent:void 0)){c=[];for(t in o)e=o[t],c.push(this._tell_document_about_change(t,l[t],this.get(t,u=!1)));return c}}},n.prototype.convert_to_ref=function(t){return s.isArray(t)?s.map(t,this.convert_to_ref):t instanceof n?t.ref():void 0},n.prototype.add_dependencies=function(t,e,n){var r,o,i,a,l;for(s.isArray(n)||(n=[n]),a=this.properties[t],a.dependencies=a.dependencies.concat({obj:e,fields:n}),l=[],o=0,i=n.length;i>o;o++)r=n[o],l.push(this.listenTo(e,"change:"+r,a.callbacks.changedep));return l},n.prototype.register_setter=function(t,e){var n;return n=this.properties[t],n.setter=e},n.prototype.register_property=function(t,e,n){var r,o,i;return s.isUndefined(n)&&(n=!0),s.has(this.properties,t)&&this.remove_property(t),r=function(e){return function(){return e.trigger("changedep:"+t)}}(this),i=function(e){return function(){var n,r,i;return n=!0,o.use_cache&&(i=e.get_cache(t),e.clear_cache(t),r=e.get(t),n=r!==i),n?(e.trigger("change:"+t,e,e.get(t)),e.trigger("change",e)):void 0}}(this),o={getter:e,dependencies:[],use_cache:n,setter:null,callbacks:{changedep:r,propchange:i}},this.properties[t]=o,this.listenTo(this,"changedep:"+t,o.callbacks.propchange),o},n.prototype.remove_property=function(t){var e,n,r,o,i,s,a,l,u,h;for(u=this.properties[t],n=u.dependencies,o=0,s=n.length;s>o;o++)for(e=n[o],l=e.obj,h=e.fields,i=0,a=h.length;a>i;i++)r=h[i],l.off("change:"+r,u.callbacks.changedep,this);return this.off("changedep:"+e),delete this.properties[t],u.use_cache?this.clear_cache(t):void 0},n.prototype.has_cache=function(t){return s.has(this.property_cache,t)},n.prototype.add_cache=function(t,e){return this.property_cache[t]=e},n.prototype.clear_cache=function(t,e){return delete this.property_cache[t]},n.prototype.get_cache=function(t){return this.property_cache[t]},n.prototype.get=function(t,e){var r;return null==e&&(e=!0),s.has(this.properties,t)?this._get_prop(t):(r=n.__super__.get.call(this,t),e?this.resolve_ref(r):r)},n.prototype._get_prop=function(t){var e,n,r;return r=this.properties[t],r.use_cache&&this.has_cache(t)?this.property_cache[t]:(n=r.getter,e=n.apply(this,[t]),this.properties[t].use_cache&&this.add_cache(t,e),e)},n.prototype.ref=function(){var t;return t={type:this.type,id:this.id},null!=this._subtype&&(t.subtype=this._subtype),t},n._is_ref=function(t){var e;if(s.isObject(t)){if(e=s.keys(t).sort(),2===e.length)return"id"===e[0]&&"type"===e[1];if(3===e.length)return"id"===e[0]&&"subtype"===e[1]&&"type"===e[2]}return!1},n.prototype.set_subtype=function(t){return this._subtype=t},n.prototype.resolve_ref=function(t){var e,r;if(s.isUndefined(t))return t;if(s.isArray(t))return function(){var e,n,o;for(o=[],e=0,n=t.length;n>e;e++)r=t[e],o.push(this.resolve_ref(r));return o}.call(this);if(n._is_ref(t)){if(t.type===this.type&&t.id===this.id)return this;if(this.document){if(e=this.document.get_model_by_id(t.id),null===e)throw new Error(this+" refers to "+JSON.stringify(t)+" but it isn't in document "+this._document);return e}throw new Error(this+" Cannot resolve ref "+JSON.stringify(t)+" when not in a Document")}return t},n.prototype.get_base=function(){return this._base||(this._base=t("./base")),this._base},n.prototype.sync=function(t,e,n){return n.success(e.attributes,null,{})},n.prototype.defaults=function(){return{}},n.prototype.serializable_in_document=function(){return!0},n.prototype.nonserializable_attribute_names=function(){return[]},n.prototype._get_nonserializable_dict=function(){var t,e,n,r,o;if(null==this.constructor._nonserializable_names_cache){for(r={},o=this.nonserializable_attribute_names(),t=0,e=o.length;e>t;t++)n=o[t],r[n]=!0;this.constructor._nonserializable_names_cache=r}return this.constructor._nonserializable_names_cache},n.prototype.attribute_is_serializable=function(t){return!(t in this._get_nonserializable_dict())&&t in this.attributes},n.prototype.serializable_attributes=function(){var t,e,n,r,o;n=this._get_nonserializable_dict(),t={},r=this.attributes;for(e in r)o=r[e],e in n||(t[e]=o);return t},n.prototype.toJSON=function(t){throw new Error("bug: toJSON should not be called on "+this+", models require special serialization measures")},n._value_to_json=function(t,e,r){var o,i,a,l,u,c,p;if(e instanceof n)return e.ref();if(s.isArray(e)){for(l=[],o=i=0,a=e.length;a>i;o=++i)p=e[o],p instanceof n&&!p.serializable_in_document()?console.log("May need to add "+t+" to nonserializable_attribute_names of "+(null!=r?r.constructor.name:void 0)+" because array contains a nonserializable type "+p.constructor.name+" under index "+o):l.push(n._value_to_json(o,p,e));return l}if(s.isObject(e)){u={};for(c in e)h.call(e,c)&&(e[c]instanceof n&&!e[c].serializable_in_document()?console.log("May need to add "+t+" to nonserializable_attribute_names of "+(null!=r?r.constructor.name:void 0)+" because value of type "+e.constructor.name+" contains a nonserializable type "+e[c].constructor.name+" under "+c):u[c]=n._value_to_json(c,e[c],e));return u}return e},n.prototype.attributes_as_json=function(t){var e,r,o,i,s;null==t&&(t=!0),e={},r=!1,i=this.serializable_attributes();for(o in i)h.call(i,o)&&(s=i[o],t?e[o]=s:o in this._set_after_defaults&&(e[o]=s),s instanceof n&&!s.serializable_in_document()&&(console.log("May need to add "+o+" to nonserializable_attribute_names of "+this.constructor.name+" because value "+s.constructor.name+" is not serializable"),r=!0));return r?{}:n._value_to_json("attributes",e,this)},n._json_record_references=function(t,e,r,o){var i,a,l,u,c,p,_;if(null===e);else if(n._is_ref(e)){if(!(e.id in r))return c=t.get_model_by_id(e.id),n._value_record_references(c,r,o)}else{if(s.isArray(e)){for(p=[],a=0,u=e.length;u>a;a++)i=e[a],p.push(n._json_record_references(t,i,r,o));return p}if(s.isObject(e)){_=[];for(l in e)h.call(e,l)&&(i=e[l],_.push(n._json_record_references(t,i,r,o)));return _}}},n._value_record_references=function(t,e,r){var o,i,a,l,u,c,p,_,d,f,m;if(null===t);else if(t instanceof n){if(!(t.id in e)&&(e[t.id]=t,r)){for(i=t._immediate_references(),d=[],a=0,c=i.length;c>a;a++)_=i[a],d.push(n._value_record_references(_,e,!0));return d}}else{if(s.isArray(t)){for(f=[],u=0,p=t.length;p>u;u++){if(o=t[u],o instanceof n&&!o.serializable_in_document())throw console.log("Array contains nonserializable item, we shouldn't traverse this property ",o),new Error("Trying to record refs for array with nonserializable item");f.push(n._value_record_references(o,e,r))}return f}if(s.isObject(t)){m=[];for(l in t)if(h.call(t,l)){if(o=t[l],o instanceof n&&!o.serializable_in_document())throw console.log("Dict contains nonserializable item under "+l+", we shouldn't traverse this property ",o),new Error("Trying to record refs for dict with nonserializable item");m.push(n._value_record_references(o,e,r))}return m}}},n.prototype._immediate_references=function(){var t,e,r,o;r={},t=this.serializable_attributes();for(e in t)o=t[e],o instanceof n&&!o.serializable_in_document()&&console.log("May need to add "+e+" to nonserializable_attribute_names of "+this.constructor.name+" because value "+o.constructor.name+" is not serializable"),n._value_record_references(o,r,!1);return s.values(r)},n.prototype.attach_document=function(t){var e,n,r,o,i,s;if(null!==this.document&&this.document!==t)throw new Error("Models must be owned by only a single document");if(n=null===this.document,this.document=t,null!==t&&(t._notify_attach(this),n)){for(i=this._immediate_references(),s=[],r=0,o=i.length;o>r;r++)e=i[r],s.push(e.attach_document(t));return s}},n.prototype.detach_document=function(){var t,e,n,r,o;if(null!==this.document&&0===this.document._notify_detach(this)){for(this.document=null,r=this._immediate_references(),o=[],e=0,n=r.length;n>e;e++)t=r[e],o.push(t.detach_document());return o}},n.prototype._tell_document_about_change=function(t,e,r){var o,i,s,a,l,u;if(this.attribute_is_serializable(t)){if(e instanceof n&&!e.serializable_in_document())return void console.log("May need to add "+t+" to nonserializable_attribute_names of "+this.constructor.name+" because old value "+e.constructor.name+" is not serializable");if(r instanceof n&&!r.serializable_in_document())return void console.log("May need to add "+t+" to nonserializable_attribute_names of "+this.constructor.name+" because new value "+r.constructor.name+" is not serializable");if(null!==this.document){s={},n._value_record_references(r,s,!1),u={},n._value_record_references(e,u,!1);for(o in s)i=s[o],o in u||i.attach_document(this.document);for(a in u)l=u[a],a in s||l.detach_document();return this.document._notify_change(this,t,e,r)}}},n}(o.Model),e.exports=i},{"./base":"common/base","./logging":"common/logging",backbone:"backbone",jquery:"jquery",underscore:"underscore"}],"common/hittest":[function(t,e,n){var r,o,i,s,a,l,u;l=function(t,e,n,r){var o,i,s,a,l,u,h,c;for(i=!1,l=n[n.length-1],h=r[r.length-1],o=s=0,a=n.length;a>=0?a>s:s>a;o=a>=0?++s:--s)u=n[o],c=r[o],e>h!=e>c&&t>l+(e-h)/(c-h)*(u-l)&&(i=!i),l=u,h=c;return i},o=function(){var t;return t={"0d":{glyph:null,indices:[]},"1d":{indices:[]},"2d":{indices:[]}}},u=function(t){return t*t},i=function(t,e,n,r){return u(t-n)+u(e-r)},a=function(t,e,n){var r,o;return r=i(e.x,e.y,n.x,n.y),0===r?i(t.x,t.y,e.x,e.y):(o=((t.x-e.x)*(n.x-e.x)+(t.y-e.y)*(n.y-e.y))/r,0>o?i(t.x,t.y,e.x,e.y):o>1?i(t.x,t.y,n.x,n.y):i(t.x,t.y,e.x+o*(n.x-e.x),e.y+o*(n.y-e.y)))},s=function(t,e,n){return Math.sqrt(a(t,e,n))},r=function(t,e,n,r,o,i,s,a){var l,u,h,c,p,_,d;return h=(a-i)*(n-t)-(s-o)*(r-e),0===h?{hit:!1,x:null,y:null}:(l=e-i,u=t-o,c=(s-o)*l-(a-i)*u,p=(n-t)*l-(r-e)*u,l=c/h,u=p/h,_=t+l*(n-t),d=e+l*(r-e),{hit:l>0&&1>l&&u>0&&1>u,x:_,y:d})},e.exports={point_in_poly:l,create_hit_test_result:o,dist_2_pts:i,dist_to_segment:s,check_2_segments_intersect:r}},{}],"common/layout_box":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f=function(t,e){function n(){this.constructor=t}for(var r in e)m.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},m={}.hasOwnProperty;_=t("underscore"),d=t("kiwi"),p=d.Variable,i=d.Expression,r=d.Constraint,h=d.Operator,o=h.Eq,l=h.Le,s=h.Ge,u=t("../model"),c=t("../models/ranges/range1d"),a=function(t){function e(t,n){this.solver=null,this._initialized=!1,e.__super__.constructor.call(this,t,n)}return f(e,t),e.prototype.type="LayoutBox",e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["solver","layout_location"])},e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this._initialized=!0,this._initialize_if_we_have_solver()},e.prototype.set=function(t,n,r){return e.__super__.set.call(this,t,n,r),this._initialize_if_we_have_solver()},e.prototype._initialize_if_we_have_solver=function(){var t,e,n,a,l,u,h,_;if(this._initialized)if(null==this.solver){if(this.solver=this.get("solver"),null!=this.solver){for(this.var_constraints={},u=["top","left","width","height"],t=0,n=u.length;n>t;t++)_=u[t],l="_"+_,this[l]=new p(_),this.register_property(_,this._get_var,!1),this.register_setter(_,this._set_var),this.solver.add_edit_variable(this[l],d.Strength.strong);for(h=["right","bottom"],e=0,a=h.length;a>e;e++)_=h[e],l="_"+_,this[l]=new p(_),this.register_property(_,this._get_var,!1);return this.solver.add_constraint(new r(new i(this._top),s)),this.solver.add_constraint(new r(new i(this._bottom),s)),this.solver.add_constraint(new r(new i(this._left),s)),this.solver.add_constraint(new r(new i(this._right),s)),this.solver.add_constraint(new r(new i(this._width),s)),this.solver.add_constraint(new r(new i(this._height),s)),this.solver.add_constraint(new r(new i(this._left,this._width,[-1,this._right]),o)),this.solver.add_constraint(new r(new i(this._bottom,this._height,[-1,this._top]),o)),this._h_range=new c.Model({start:this.get("left"),end:this.get("left")+this.get("width")}),this.register_property("h_range",function(t){return function(){return t._h_range.set("start",t.get("left")),t._h_range.set("end",t.get("left")+t.get("width")),t._h_range}}(this),!1),this.add_dependencies("h_range",this,["left","width"]),this._v_range=new c.Model({start:this.get("bottom"),end:this.get("bottom")+this.get("height")}),this.register_property("v_range",function(t){return function(){return t._v_range.set("start",t.get("bottom")),t._v_range.set("end",t.get("bottom")+t.get("height")),t._v_range}}(this),!1),this.add_dependencies("v_range",this,["bottom","height"]),this._aspect_constraint=null,this.register_property("aspect",function(t){return function(){return t.get("width")/t.get("height")}}(this),!0),this.register_setter("aspect",this._set_aspect),this.add_dependencies("aspect",this,["width","height"])}}else if(this.get("solver")!==this.solver)throw new Error("We do not support changing the solver attribute on LayoutBox")},e.prototype.contains=function(t,e){return t>=this.get("left")&&t<=this.get("right")&&e>=this.get("bottom")&&e<=this.get("top")},e.prototype._set_var=function(t,e){var n,s;return s=this["_"+e],_.isNumber(t)?this.solver.suggest_value(s,t):_.isString(t)?void 0:(n=new r(new i(s,[-1,t]),o),null==this.var_constraints[e]&&(this.var_constraints[e]=[]),this.var_constraints[e].push(n),this.solver.add_constraint(n))},e.prototype._get_var=function(t){return this["_"+t].value()},e.prototype._set_aspect=function(t){var e;return null!=this._aspect_constraint?(this.solver.remove_constraint(this.aspect_constraint),e=new r(new i([t,this._height],[-1,this._width]),o),this._aspect_constraint=e,this.solver.add_constraint(e)):void 0},e}(u),e.exports={Model:a}},{"../model":"model","../models/ranges/range1d":"models/ranges/range1d",kiwi:"kiwi",underscore:"underscore"}],"common/logging":[function(t,e,n){var r,o,i;r=t("jsnlog").JL,o=r("Bokeh"),o.setOptions({appenders:[r.createConsoleAppender("consoleAppender")]}),i=function(t){var e;return e={trace:r.getTraceLevel(),debug:r.getDebugLevel(),info:r.getInfoLevel(),warn:r.getWarnLevel(),error:r.getErrorLevel(),fatal:r.getFatalLevel()},t in e?(console.log("Bokeh: setting log level to: '"+t+"'"),o.setOptions({level:e[t]})):(console.log("Bokeh: Unrecognized logging level '"+t+"' passed to Bokeh.set_log_level, ignoring."),void console.log("Bokeh: Valid log levels are: "+Object.keys(e)))},e.exports={logger:o,set_log_level:i}},{jsnlog:"jsnlog"}],"common/mathutils":[function(t,e,n){var r,o,i,s,a;a=function(t){var e,n,r;for(e=t.length,n=1/0;e--;)r=t[e],n>r&&(n=r);return n},s=function(t){var e,n,r;for(e=t.length,n=-(1/0);e--;)r=t[e],r>n&&(n=r);return n},i=function(t){for(;0>t;)t+=2*Math.PI;for(;t>2*Math.PI;)t-=2*Math.PI;return t},o=function(t,e){return Math.abs(i(t-e))},r=function(t,e,n,r){var s;return t=i(t),s=o(e,n),"anticlock"===r?o(e,t)<=s&&o(t,n)<=s:!(o(e,t)<=s&&o(t,n)<=s)},e.exports={arrayMin:a,arrayMax:s,angle_norm:i,angle_dist:o,angle_between:r}},{}],"common/models":[function(t,e,n){e.exports={Canvas:t("./canvas"),LayoutBox:t("./layout_box"),CartesianFrame:t("./cartesian_frame"),SelectionManager:t("./selection_manager"),Selector:t("./selector"),ToolEvents:t("./tool_events"),BoxAnnotation:t("../models/annotations/box_annotation"),Legend:t("../models/annotations/legend"),PolyAnnotation:t("../models/annotations/poly_annotation"),Span:t("../models/annotations/span"),Tooltip:t("../models/annotations/tooltip"),CategoricalAxis:t("../models/axes/categorical_axis"),DatetimeAxis:t("../models/axes/datetime_axis"),LinearAxis:t("../models/axes/linear_axis"),LogAxis:t("../models/axes/log_axis"),CustomJS:t("../models/callbacks/customjs"),OpenURL:t("../models/callbacks/open_url"),BasicTickFormatter:t("../models/formatters/basic_tick_formatter"),CategoricalTickFormatter:t("../models/formatters/categorical_tick_formatter"),DatetimeTickFormatter:t("../models/formatters/datetime_tick_formatter"),LogTickFormatter:t("../models/formatters/log_tick_formatter"),NumeralTickFormatter:t("../models/formatters/numeral_tick_formatter"),PrintfTickFormatter:t("../models/formatters/printf_tick_formatter"),AnnularWedge:t("../models/glyphs/annular_wedge"),Annulus:t("../models/glyphs/annulus"),Arc:t("../models/glyphs/arc"),Bezier:t("../models/glyphs/bezier"),Circle:t("../models/glyphs/circle"),Gear:t("../models/glyphs/gear"),Image:t("../models/glyphs/image"),ImageRGBA:t("../models/glyphs/image_rgba"),ImageURL:t("../models/glyphs/image_url"),Line:t("../models/glyphs/line"),MultiLine:t("../models/glyphs/multi_line"),Oval:t("../models/glyphs/oval"),Patch:t("../models/glyphs/patch"),Patches:t("../models/glyphs/patches"),Quad:t("../models/glyphs/quad"),
3 Quadratic:t("../models/glyphs/quadratic"),Ray:t("../models/glyphs/ray"),Rect:t("../models/glyphs/rect"),Segment:t("../models/glyphs/segment"),Text:t("../models/glyphs/text"),Wedge:t("../models/glyphs/wedge"),Grid:t("../models/grids/grid"),GridPlot:t("../models/layouts/grid_plot"),HBox:t("../models/layouts/hbox"),VBox:t("../models/layouts/vbox"),VBoxForm:t("../models/layouts/vboxform"),CategoricalMapper:t("../models/mappers/categorical_mapper"),GridMapper:t("../models/mappers/grid_mapper"),LinearColorMapper:t("../models/mappers/linear_color_mapper"),LinearMapper:t("../models/mappers/linear_mapper"),LogMapper:t("../models/mappers/log_mapper"),Asterisk:t("../models/markers/asterisk"),CircleCross:t("../models/markers/circle_cross"),CircleX:t("../models/markers/circle_x"),Cross:t("../models/markers/cross"),Diamond:t("../models/markers/diamond"),DiamondCross:t("../models/markers/diamond_cross"),InvertedTriangle:t("../models/markers/inverted_triangle"),Square:t("../models/markers/square"),SquareCross:t("../models/markers/square_cross"),SquareX:t("../models/markers/square_x"),Triangle:t("../models/markers/triangle"),X:t("../models/markers/x"),Plot:t("../models/plots/plot"),GMapPlot:t("../models/plots/gmap_plot"),DataRange1d:t("../models/ranges/data_range1d"),FactorRange:t("../models/ranges/factor_range"),Range1d:t("../models/ranges/range1d"),GlyphRenderer:t("../models/renderers/glyph_renderer"),AjaxDataSource:t("../models/sources/ajax_data_source"),BlazeDataSource:t("../models/sources/blaze_data_source"),ColumnDataSource:t("../models/sources/column_data_source"),GeoJSONDataSource:t("../models/sources/geojson_data_source"),AdaptiveTicker:t("../models/tickers/adaptive_ticker"),BasicTicker:t("../models/tickers/basic_ticker"),CategoricalTicker:t("../models/tickers/categorical_ticker"),CompositeTicker:t("../models/tickers/composite_ticker"),ContinuousTicker:t("../models/tickers/continuous_ticker"),DatetimeTicker:t("../models/tickers/datetime_ticker"),DaysTicker:t("../models/tickers/days_ticker"),FixedTicker:t("../models/tickers/fixed_ticker"),LogTicker:t("../models/tickers/log_ticker"),MonthsTicker:t("../models/tickers/months_ticker"),SingleIntervalTicker:t("../models/tickers/single_interval_ticker"),YearsTicker:t("../models/tickers/years_ticker"),TileRenderer:t("../models/tiles/tile_renderer"),TileSource:t("../models/tiles/tile_source"),TMSTileSource:t("../models/tiles/tms_tile_source"),WMTSTileSource:t("../models/tiles/wmts_tile_source"),QUADKEYTileSource:t("../models/tiles/quadkey_tile_source"),BBoxTileSource:t("../models/tiles/bbox_tile_source"),DynamicImageRenderer:t("../models/tiles/dynamic_image_renderer"),ImageSource:t("../models/tiles/image_source"),ButtonTool:t("../models/tools/button_tool"),ActionTool:t("../models/tools/actions/action_tool"),PreviewSaveTool:t("../models/tools/actions/preview_save_tool"),UndoTool:t("../models/tools/actions/undo_tool"),RedoTool:t("../models/tools/actions/redo_tool"),ResetTool:t("../models/tools/actions/reset_tool"),HelpTool:t("../models/tools/actions/help_tool"),BoxSelectTool:t("../models/tools/gestures/box_select_tool"),BoxZoomTool:t("../models/tools/gestures/box_zoom_tool"),GestureTool:t("../models/tools/gestures/gesture_tool"),LassoSelectTool:t("../models/tools/gestures/lasso_select_tool"),PanTool:t("../models/tools/gestures/pan_tool"),PolySelectTool:t("../models/tools/gestures/poly_select_tool"),SelectTool:t("../models/tools/gestures/select_tool"),ResizeTool:t("../models/tools/gestures/resize_tool"),TapTool:t("../models/tools/gestures/tap_tool"),WheelZoomTool:t("../models/tools/gestures/wheel_zoom_tool"),CrosshairTool:t("../models/tools/inspectors/crosshair_tool"),HoverTool:t("../models/tools/inspectors/hover_tool"),InspectTool:t("../models/tools/inspectors/inspect_tool")}},{"../models/annotations/box_annotation":"models/annotations/box_annotation","../models/annotations/legend":"models/annotations/legend","../models/annotations/poly_annotation":"models/annotations/poly_annotation","../models/annotations/span":"models/annotations/span","../models/annotations/tooltip":"models/annotations/tooltip","../models/axes/categorical_axis":"models/axes/categorical_axis","../models/axes/datetime_axis":"models/axes/datetime_axis","../models/axes/linear_axis":"models/axes/linear_axis","../models/axes/log_axis":"models/axes/log_axis","../models/callbacks/customjs":"models/callbacks/customjs","../models/callbacks/open_url":"models/callbacks/open_url","../models/formatters/basic_tick_formatter":"models/formatters/basic_tick_formatter","../models/formatters/categorical_tick_formatter":"models/formatters/categorical_tick_formatter","../models/formatters/datetime_tick_formatter":"models/formatters/datetime_tick_formatter","../models/formatters/log_tick_formatter":"models/formatters/log_tick_formatter","../models/formatters/numeral_tick_formatter":"models/formatters/numeral_tick_formatter","../models/formatters/printf_tick_formatter":"models/formatters/printf_tick_formatter","../models/glyphs/annular_wedge":"models/glyphs/annular_wedge","../models/glyphs/annulus":"models/glyphs/annulus","../models/glyphs/arc":"models/glyphs/arc","../models/glyphs/bezier":"models/glyphs/bezier","../models/glyphs/circle":"models/glyphs/circle","../models/glyphs/gear":"models/glyphs/gear","../models/glyphs/image":"models/glyphs/image","../models/glyphs/image_rgba":"models/glyphs/image_rgba","../models/glyphs/image_url":"models/glyphs/image_url","../models/glyphs/line":"models/glyphs/line","../models/glyphs/multi_line":"models/glyphs/multi_line","../models/glyphs/oval":"models/glyphs/oval","../models/glyphs/patch":"models/glyphs/patch","../models/glyphs/patches":"models/glyphs/patches","../models/glyphs/quad":"models/glyphs/quad","../models/glyphs/quadratic":"models/glyphs/quadratic","../models/glyphs/ray":"models/glyphs/ray","../models/glyphs/rect":"models/glyphs/rect","../models/glyphs/segment":"models/glyphs/segment","../models/glyphs/text":"models/glyphs/text","../models/glyphs/wedge":"models/glyphs/wedge","../models/grids/grid":"models/grids/grid","../models/layouts/grid_plot":"models/layouts/grid_plot","../models/layouts/hbox":"models/layouts/hbox","../models/layouts/vbox":"models/layouts/vbox","../models/layouts/vboxform":"models/layouts/vboxform","../models/mappers/categorical_mapper":"models/mappers/categorical_mapper","../models/mappers/grid_mapper":"models/mappers/grid_mapper","../models/mappers/linear_color_mapper":"models/mappers/linear_color_mapper","../models/mappers/linear_mapper":"models/mappers/linear_mapper","../models/mappers/log_mapper":"models/mappers/log_mapper","../models/markers/asterisk":"models/markers/asterisk","../models/markers/circle_cross":"models/markers/circle_cross","../models/markers/circle_x":"models/markers/circle_x","../models/markers/cross":"models/markers/cross","../models/markers/diamond":"models/markers/diamond","../models/markers/diamond_cross":"models/markers/diamond_cross","../models/markers/inverted_triangle":"models/markers/inverted_triangle","../models/markers/square":"models/markers/square","../models/markers/square_cross":"models/markers/square_cross","../models/markers/square_x":"models/markers/square_x","../models/markers/triangle":"models/markers/triangle","../models/markers/x":"models/markers/x","../models/plots/gmap_plot":"models/plots/gmap_plot","../models/plots/plot":"models/plots/plot","../models/ranges/data_range1d":"models/ranges/data_range1d","../models/ranges/factor_range":"models/ranges/factor_range","../models/ranges/range1d":"models/ranges/range1d","../models/renderers/glyph_renderer":"models/renderers/glyph_renderer","../models/sources/ajax_data_source":"models/sources/ajax_data_source","../models/sources/blaze_data_source":"models/sources/blaze_data_source","../models/sources/column_data_source":"models/sources/column_data_source","../models/sources/geojson_data_source":"models/sources/geojson_data_source","../models/tickers/adaptive_ticker":"models/tickers/adaptive_ticker","../models/tickers/basic_ticker":"models/tickers/basic_ticker","../models/tickers/categorical_ticker":"models/tickers/categorical_ticker","../models/tickers/composite_ticker":"models/tickers/composite_ticker","../models/tickers/continuous_ticker":"models/tickers/continuous_ticker","../models/tickers/datetime_ticker":"models/tickers/datetime_ticker","../models/tickers/days_ticker":"models/tickers/days_ticker","../models/tickers/fixed_ticker":"models/tickers/fixed_ticker","../models/tickers/log_ticker":"models/tickers/log_ticker","../models/tickers/months_ticker":"models/tickers/months_ticker","../models/tickers/single_interval_ticker":"models/tickers/single_interval_ticker","../models/tickers/years_ticker":"models/tickers/years_ticker","../models/tiles/bbox_tile_source":"models/tiles/bbox_tile_source","../models/tiles/dynamic_image_renderer":"models/tiles/dynamic_image_renderer","../models/tiles/image_source":"models/tiles/image_source","../models/tiles/quadkey_tile_source":"models/tiles/quadkey_tile_source","../models/tiles/tile_renderer":"models/tiles/tile_renderer","../models/tiles/tile_source":"models/tiles/tile_source","../models/tiles/tms_tile_source":"models/tiles/tms_tile_source","../models/tiles/wmts_tile_source":"models/tiles/wmts_tile_source","../models/tools/actions/action_tool":"models/tools/actions/action_tool","../models/tools/actions/help_tool":"models/tools/actions/help_tool","../models/tools/actions/preview_save_tool":"models/tools/actions/preview_save_tool","../models/tools/actions/redo_tool":"models/tools/actions/redo_tool","../models/tools/actions/reset_tool":"models/tools/actions/reset_tool","../models/tools/actions/undo_tool":"models/tools/actions/undo_tool","../models/tools/button_tool":"models/tools/button_tool","../models/tools/gestures/box_select_tool":"models/tools/gestures/box_select_tool","../models/tools/gestures/box_zoom_tool":"models/tools/gestures/box_zoom_tool","../models/tools/gestures/gesture_tool":"models/tools/gestures/gesture_tool","../models/tools/gestures/lasso_select_tool":"models/tools/gestures/lasso_select_tool","../models/tools/gestures/pan_tool":"models/tools/gestures/pan_tool","../models/tools/gestures/poly_select_tool":"models/tools/gestures/poly_select_tool","../models/tools/gestures/resize_tool":"models/tools/gestures/resize_tool","../models/tools/gestures/select_tool":"models/tools/gestures/select_tool","../models/tools/gestures/tap_tool":"models/tools/gestures/tap_tool","../models/tools/gestures/wheel_zoom_tool":"models/tools/gestures/wheel_zoom_tool","../models/tools/inspectors/crosshair_tool":"models/tools/inspectors/crosshair_tool","../models/tools/inspectors/hover_tool":"models/tools/inspectors/hover_tool","../models/tools/inspectors/inspect_tool":"models/tools/inspectors/inspect_tool","./canvas":"common/canvas","./cartesian_frame":"common/cartesian_frame","./layout_box":"common/layout_box","./selection_manager":"common/selection_manager","./selector":"common/selector","./tool_events":"common/tool_events"}],"common/plot_template":[function(t,e,n){e.exports=function(t){t||(t={});var e,n=[],r=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){(function(){n.push("<div class='bk-plot-wrapper'>\n <table>\n <tr>\n <td></td>\n <td class='bk-plot-above'></td>\n <td></td>\n </tr>\n <tr>\n <td class=\"bk-plot-left\"></td>\n <td class='bk-plot-canvas-wrapper'></td>\n <td class=\"bk-plot-right\"></td>\n </tr>\n <tr>\n <td></td>\n <td class='bk-plot-below'></td>\n <td></td>\n </tr>\n </table>\n</div>\n")}).call(this)}.call(t),t.safe=r,t.escape=o,n.join("")}},{}],"common/plot_utils":[function(t,e,n){var r,o,i,s;r=["image","underlay","glyph","overlay","annotation","tool"],o=function(t){return t()},i=("undefined"!=typeof window&&null!==window?window.requestAnimationFrame:void 0)||("undefined"!=typeof window&&null!==window?window.mozRequestAnimationFrame:void 0)||("undefined"!=typeof window&&null!==window?window.webkitRequestAnimationFrame:void 0)||("undefined"!=typeof window&&null!==window?window.msRequestAnimationFrame:void 0)||o,s=function(t,e){var n,r,o,s,a,l,u,h;return l=[null,null,null,null],r=l[0],n=l[1],h=l[2],u=l[3],a=0,s=!1,o=function(){return a=new Date,h=null,s=!1,u=t.apply(r,n)},function(){var t,l;return t=new Date,l=e-(t-a),r=this,n=arguments,0>=l&&!s?(clearTimeout(h),s=!0,i(o)):h||(h=setTimeout(function(){return i(o)},l)),u}},e.exports={LEVELS:r,throttle_animation:s}},{}],"common/plot_widget":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;r=t("./continuum_view"),o=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return i(n,t),n.prototype.tagName="div",n.prototype.initialize=function(t){return this.plot_model=t.plot_model,this.plot_view=t.plot_view},n.prototype.bind_bokeh_events=function(){},n.prototype.request_render=function(){return this.plot_view.request_render()},e.exports=n,n}(r)},{"./continuum_view":"common/continuum_view"}],"common/properties":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T=function(t,e){function n(){this.constructor=t}for(var r in e)z.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},z={}.hasOwnProperty,E=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};v=t("underscore"),_=t("./has_props"),M=t("./svg_colors"),m=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.obj=this.get("obj"),this.attr=this.get("attr"),this.listenTo(this.obj,"change:"+this.attr,function(){return this._init(),this.obj.trigger("propchange")}),this._init()},e.prototype.serializable_in_document=function(){var t;return null!=this.get("obj")?(t=this.get("obj").serializable_in_document(),t||console.log(" 'obj' field of "+this.constructor.name+" has a nonserializable value of type "+this.get("obj").constructor.name),t):!0},e.prototype._init=function(){var t;if(t=this.obj.get(this.attr),v.isObject(t)&&!v.isArray(t))if(this.spec=t,v.isUndefined(this.spec.value)){if(null==this.spec.field)throw new Error("spec for property '"+attr+"' needs one of 'value' or 'field'");this.field=this.spec.field}else this.fixed_value=this.spec.value;else this.fixed_value=t;if(null!=this.field&&!v.isString(this.field))throw new Error("field value for property '"+attr+"' is not a string");return null!=this.fixed_value?this.validate(this.fixed_value,this.attr):void 0},e.prototype.value=function(){var t;return t=null!=this.fixed_value?this.fixed_value:NaN,this.transform([t])[0]},e.prototype.array=function(t){var e,n,r,o;return e=t.get("data"),null!=this.field&&this.field in e?this.transform(t.get_column(this.field)):(r=t.get_length(),null==r&&(r=1),o=this.value(),function(){var t,e,i;for(i=[],n=t=0,e=r;e>=0?e>t:t>e;n=e>=0?++t:--t)i.push(o);return i}())},e.prototype.transform=function(t){return t},e.prototype.validate=function(t,e){return!0},e}(_),f=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.validate=function(t,e){if(!v.isNumber(t))throw new Error("numeric property '"+e+"' given invalid value: "+t);return!0},e.prototype.transform=function(t){var e,n,r,o;for(o=new Float64Array(t.length),e=n=0,r=t.length;r>=0?r>n:n>r;e=r>=0?++n:--n)o[e]=t[e];return o},e}(m),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype._init=function(){var t,n;if(e.__super__._init.call(this),this.units=null!=(t=null!=(n=this.spec)?n.units:void 0)?t:"rad","deg"!==this.units&&"rad"!==this.units)throw new Error("Angle units must be one of 'deg' or 'rad', given invalid value: "+this.units)},e.prototype.transform=function(t){var n;return"deg"===this.units&&(t=function(){var e,r,o;for(o=[],e=0,r=t.length;r>e;e++)n=t[e],o.push(n*Math.PI/180);return o}()),t=function(){var e,r,o;for(o=[],e=0,r=t.length;r>e;e++)n=t[e],o.push(-n);return o}(),e.__super__.transform.call(this,t)},e}(f),h=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype._init=function(){var t,n;if(e.__super__._init.call(this),this.units=null!=(t=null!=(n=this.spec)?n.units:void 0)?t:"data","data"!==this.units&&"screen"!==this.units)throw new Error("Distance units must be one of 'data' or 'screen', given invalid value: "+this.units)},e}(f),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.validate=function(t,e){if(!v.isArray(t))throw new Error("array property '"+e+"' given invalid value: "+t);return!0},e}(m),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.validate=function(t,e){if(!v.isBoolean(t))throw new Error("boolean property '"+e+"' given invalid value: "+t);return!0},e}(m),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.validate=function(t,e){if(!v.isNumber(t)&&!v.isString(t))throw new Error("coordinate property '"+e+"' given invalid value: "+t);return!0},e}(m),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.validate=function(t,e){if(null==M[t.toLowerCase()]&&"#"!==t.substring(0,1)&&!this.valid_rgb(t))throw new Error("color property '"+e+"' given invalid value: "+t);return!0},e.prototype.valid_rgb=function(t){var e,n,r,o;switch(t.substring(0,4)){case"rgba":n={start:"rgba(",len:4,alpha:!0};break;case"rgb(":n={start:"rgb(",len:3,alpha:!1};break;default:return!1}if(new RegExp(".*?(\\.).*(,)").test(t))throw new Error("color expects integers for rgb in rgb/rgba tuple, received "+t);if(e=t.replace(n.start,"").replace(")","").split(",").map(parseFloat),e.length!==n.len)throw new Error("color expects rgba "+expect_len+"-tuple, received "+t);if(n.alpha&&!(0<=(r=e[3])&&1>=r))throw new Error("color expects rgba 4-tuple to have alpha value between 0 and 1");if(E.call(function(){var t,n,r,i;for(r=e.slice(0,3),i=[],t=0,n=r.length;n>t;t++)o=r[t],i.push(o>=0&&255>=o);return i}(),!1)>=0)throw new Error("color expects rgb to have value between 0 and 255");return!0},e}(m),g=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.validate=function(t,e){if(!v.isString(t))throw new Error("string property '"+e+"' given invalid value: "+t);return!0},e}(m),c=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.initialize=function(t,n){return this.levels=t.values.split(" "),e.__super__.initialize.call(this,t,n)},e.prototype.validate=function(t,e){if(E.call(this.levels,t)<0)throw new Error("enum property '"+e+"' given invalid value: "+t+", valid values are: "+this.levels);return!0},e}(m),u=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.initialize=function(t,n){return t.values="anticlock clock",e.__super__.initialize.call(this,t,n)},e.prototype.transform=function(t){var e,n,r,o;for(o=new Uint8Array(t.length),e=n=0,r=t.length;r>=0?r>n:n>r;e=r>=0?++n:--n)switch(t[e]){case"clock":o[e]=!1;break;case"anticlock":o[e]=!0}return o},e}(c),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.initialize=function(t,n){return this.cache={},e.__super__.initialize.call(this,t,n)},e.prototype.warm_cache=function(t,e){var n,r,o,i,s;for(s=[],r=0,o=e.length;o>r;r++)n=e[r],i=this[n],null!=i.fixed_value?s.push(this.cache[n]=i.fixed_value):s.push(this.cache[n+"_array"]=i.array(t));return s},e.prototype.cache_select=function(t,e){var n;return n=this[t],null!=n.fixed_value?this.cache[t]=n.fixed_value:this.cache[t]=this.cache[t+"_array"][e]},e}(_),d=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.initialize=function(t,n){var r,i;return e.__super__.initialize.call(this,t,n),r=this.get("obj"),i=this.get("prefix"),this.color=new s({obj:r,attr:i+"line_color"}),this.width=new f({obj:r,attr:i+"line_width"}),this.alpha=new f({obj:r,attr:i+"line_alpha"}),this.join=new c({obj:r,attr:i+"line_join",values:"miter round bevel"}),this.cap=new c({obj:r,attr:i+"line_cap",values:"butt round square"}),this.dash=new o({obj:r,attr:i+"line_dash"}),this.dash_offset=new f({obj:r,attr:i+"line_dash_offset"}),this.do_stroke=!0,!v.isUndefined(this.color.fixed_value)&&v.isNull(this.color.fixed_value)?this.do_stroke=!1:void 0},e.prototype.warm_cache=function(t){return e.__super__.warm_cache.call(this,t,["color","width","alpha","join","cap","dash","dash_offset"])},e.prototype.set_value=function(t){return t.strokeStyle=this.color.value(),t.globalAlpha=this.alpha.value(),t.lineWidth=this.width.value(),t.lineJoin=this.join.value(),t.lineCap=this.cap.value(),t.setLineDash(this.dash.value()),t.setLineDashOffset(this.dash_offset.value())},e.prototype.set_vectorize=function(t,e){return this.cache_select("color",e),t.strokeStyle!==this.cache.fill&&(t.strokeStyle=this.cache.color),this.cache_select("alpha",e),t.globalAlpha!==this.cache.alpha&&(t.globalAlpha=this.cache.alpha),this.cache_select("width",e),t.lineWidth!==this.cache.width&&(t.lineWidth=this.cache.width),this.cache_select("join",e),t.lineJoin!==this.cache.join&&(t.lineJoin=this.cache.join),this.cache_select("cap",e),t.lineCap!==this.cache.cap&&(t.lineCap=this.cache.cap),this.cache_select("dash",e),t.getLineDash()!==this.cache.dash&&t.setLineDash(this.cache.dash),this.cache_select("dash_offset",e),t.getLineDashOffset()!==this.cache.dash_offset?t.setLineDashOffset(this.cache.dash_offset):void 0},e}(a),p=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.initialize=function(t,n){var r,o;return e.__super__.initialize.call(this,t,n),r=this.get("obj"),o=this.get("prefix"),this.color=new s({obj:r,attr:o+"fill_color"}),this.alpha=new f({obj:r,attr:o+"fill_alpha"}),this.do_fill=!0,!v.isUndefined(this.color.fixed_value)&&v.isNull(this.color.fixed_value)?this.do_fill=!1:void 0},e.prototype.warm_cache=function(t){return e.__super__.warm_cache.call(this,t,["color","alpha"])},e.prototype.set_value=function(t){return t.fillStyle=this.color.value(),t.globalAlpha=this.alpha.value()},e.prototype.set_vectorize=function(t,e){return this.cache_select("color",e),t.fillStyle!==this.cache.fill&&(t.fillStyle=this.cache.color),this.cache_select("alpha",e),t.globalAlpha!==this.cache.alpha?t.globalAlpha=this.cache.alpha:void 0},e}(a),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return T(e,t),e.prototype.initialize=function(t,n){var r,o;return e.__super__.initialize.call(this,t,n),r=this.get("obj"),o=this.get("prefix"),this.font=new g({obj:r,attr:o+"text_font"}),this.font_size=new g({obj:r,attr:o+"text_font_size"}),this.font_style=new c({obj:r,attr:o+"text_font_style",values:"normal italic bold"}),this.color=new s({obj:r,attr:o+"text_color"}),this.alpha=new f({obj:r,attr:o+"text_alpha"}),this.align=new c({obj:r,attr:o+"text_align",values:"left right center"}),this.baseline=new c({obj:r,attr:o+"text_baseline",values:"top middle bottom alphabetic hanging"})},e.prototype.warm_cache=function(t){return e.__super__.warm_cache.call(this,t,["font","font_size","font_style","color","alpha","align","baseline"])},e.prototype.cache_select=function(t,n){var r;return"font"===t?(r=e.__super__.cache_select.call(this,"font_style",n)+" "+e.__super__.cache_select.call(this,"font_size",n)+" "+e.__super__.cache_select.call(this,"font",n),this.cache.font=r):e.__super__.cache_select.call(this,t,n)},e.prototype.font_value=function(){var t,e,n;return t=this.font.value(),e=this.font_size.value(),n=this.font_style.value(),n+" "+e+" "+t},e.prototype.set_value=function(t){return t.font=this.font_value(),t.fillStyle=this.color.value(),t.globalAlpha=this.alpha.value(),t.textAlign=this.align.value(),t.textBaseline=this.baseline.value()},e.prototype.set_vectorize=function(t,e){return this.cache_select("font",e),t.font!==this.cache.font&&(t.font=this.cache.font),this.cache_select("color",e),t.fillStyle!==this.cache.color&&(t.fillStyle=this.cache.color),this.cache_select("alpha",e),t.globalAlpha!==this.cache.alpha&&(t.globalAlpha=this.cache.alpha),this.cache_select("align",e),t.textAlign!==this.cache.align&&(t.textAlign=this.cache.align),this.cache_select("baseline",e),t.textBaseline!==this.cache.baseline?t.textBaseline=this.cache.baseline:void 0},e}(a),b=function(t,e){var n,o,i,s,a;for(null==e&&(e="angles"),a={},s=t[e],o=0,i=s.length;i>o;o++)n=s[o],a[n]=new r({obj:t,attr:n});return a},x=function(t,e){var n,r,o,i,s,a,u;for(null==e&&(e="coords"),s={},o=t[e],n=0,r=o.length;r>n;n++)i=o[n],a=i[0],u=i[1],s[a]=new l({obj:t,attr:a}),s[u]=new l({obj:t,attr:u});return s},w=function(t,e){var n,r,o,i,s;for(null==e&&(e="distances"),s={},i=t[e],r=0,o=i.length;o>r;r++)n=i[r],("?"!==n[0]||(n=n.slice(1),null!=t.get(n)))&&(s[n]=new h({obj:t,attr:n}));return s},k=function(t,e){var n,r,a,l,h,p,_,d;for(null==e&&(e="fields"),_={},h=t[e],a=0,l=h.length;l>a;a++)if(r=h[a],d="number",r.indexOf(":")>-1&&(p=r.split(":"),r=p[0],d=p[1],n=p[2]),"?"!==r[0]||(r=r.slice(1),null!=t.attributes[r]))switch(d){case"array":_[r]=new o({obj:t,attr:r});break;case"bool":_[r]=new i({obj:t,attr:r});break;case"color":_[r]=new s({obj:t,attr:r});break;case"direction":_[r]=new u({obj:t,attr:r});break;case"enum":_[r]=new c({obj:t,attr:r,values:n});break;case"number":_[r]=new f({obj:t,attr:r});break;case"string":_[r]=new g({obj:t,attr:r})}return _},j=function(t,e){var n,r,o,i,s,a,l,u;for(null==e&&(e="visuals"),u={},a=t[e],n=0,r=a.length;r>n;n++)switch(s=a[n],i="",s.indexOf(":")>-1&&(l=s.split(":"),s=l[0],i=l[1]),o=""+i+s,s){case"line":u[o]=new d({obj:t,prefix:i});break;case"fill":u[o]=new p({obj:t,prefix:i});break;case"text":u[o]=new y({obj:t,prefix:i})}return u},e.exports={Angle:r,Array:o,Bool:i,Color:s,Coord:l,Direction:u,Distance:h,Enum:c,Numeric:f,Property:m,String:g,Line:d,Fill:p,Text:y,factories:{coords:x,distances:w,angles:b,fields:k,visuals:j}}},{"./has_props":"common/has_props","./svg_colors":"common/svg_colors",underscore:"underscore"}],"common/selection_manager":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),r=t("./has_props"),l=t("./logging").logger,i=t("./selector"),a=t("./hittest"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="SelectionManager",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.selectors={},this.inspectors={},this.empty=a.create_hit_test_result(),this.last_inspection_was_empty={}},e.prototype.serializable_in_document=function(){return!1},e.prototype.select=function(t,e,n,r,o){var i,s,a;return null==o&&(o=!1),a=this.get("source"),a!==e.mget("data_source")&&l.warn("select called with mis-matched data sources"),i=e.hit_test(n),null!=i?(s=this._get_selector(e),s.update(i,r,o),this.get("source").set({selected:s.get("indices")}),a.trigger("select"),a.trigger("select-"+e.mget("id"))):void 0},e.prototype.inspect=function(t,e,n,r){var o,i,a,u;if(u=this.get("source"),u!==e.mget("data_source")&&l.warn("inspect called with mis-matched data sources"),o=e.hit_test(n),null!=o){if(a=e.model.id,s.isEqual(o,this.empty)){if(null==this.last_inspection_was_empty[a]&&(this.last_inspection_was_empty[a]=!1),this.last_inspection_was_empty[a])return;this.last_inspection_was_empty[a]=!0}else this.last_inspection_was_empty[a]=!1;return i=this._get_inspector(e),i.update(o,!0,!1,!0),this.get("source").set({inspected:i.get("indices")},{silent:!0}),u.trigger("inspect",o,t,e,u,r),u.trigger("inspect"+e.mget("id"),o,t,e,u,r)}},e.prototype.clear=function(t){var e,n,r,o;if(null!=t)o=this._get_selector(t),o.clear();else{n=this.selectors;for(e in n)r=n[e],r.clear()}return this.get("source").set({selected:a.create_hit_test_result()})},e.prototype._get_selector=function(t){return s.setdefault(this.selectors,t.model.id,new i),this.selectors[t.model.id]},e.prototype._get_inspector=function(t){return s.setdefault(this.inspectors,t.model.id,new i),this.inspectors[t.model.id]},e}(r),e.exports=o},{"./has_props":"common/has_props","./hittest":"common/hittest","./logging":"common/logging","./selector":"common/selector",underscore:"underscore"}],"common/selector":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;i=t("underscore"),r=t("./has_props"),s=t("./hittest"),a=t("./logging").logger,o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="Selector",e.prototype.update=function(t,e,n,r){return null==r&&(r=!1),this.set("timestamp",new Date,{silent:r}),this.set("final",e,{silent:r}),n&&(t["0d"].indices=i.union(this.get("indices")["0d"].indices,t["0d"].indices),t["0d"].glyph=this.get("indices")["0d"].glyph||t["0d"].glyph,t["1d"].indices=i.union(this.get("indices")["1d"].indices,t["1d"].indices),t["2d"].indices=i.union(this.get("indices")["2d"].indices,t["2d"].indices)),this.set("indices",t,{silent:r})},e.prototype.clear=function(){return this.set("timestamp",new Date),this.set("final",!0),this.set("indices",s.create_hit_test_result())},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{indices:s.create_hit_test_result()})},e}(r),e.exports=o},{"./has_props":"common/has_props","./hittest":"common/hittest","./logging":"common/logging",underscore:"underscore"}],"common/solver":[function(t,e,n){var r,o,i,s;i=t("underscore"),r=t("backbone"),s=t("kiwi"),o=function(){function t(){this.solver=new s.Solver}return t.prototype.update_variables=function(t){return null==t&&(t=!0),this.solver.updateVariables(),t?this.trigger("layout_update"):void 0},t.prototype.add_constraint=function(t){return this.solver.addConstraint(t)},t.prototype.remove_constraint=function(t){return this.solver.removeConstraint(t)},t.prototype.add_edit_variable=function(t,e){return null==e&&(e=s.Strength.strong),this.solver.addEditVariable(t,e)},t.prototype.suggest_value=function(t,e){return this.solver.suggestValue(t,e)},t}(),i.extend(o.prototype,r.Events),e.exports=o},{backbone:"backbone",kiwi:"kiwi",underscore:"underscore"}],"common/svg_colors":[function(t,e,n){e.exports={indianred:"#CD5C5C",lightcoral:"#F08080",salmon:"#FA8072",darksalmon:"#E9967A",lightsalmon:"#FFA07A",crimson:"#DC143C",red:"#FF0000",firebrick:"#B22222",darkred:"#8B0000",pink:"#FFC0CB",lightpink:"#FFB6C1",hotpink:"#FF69B4",deeppink:"#FF1493",mediumvioletred:"#C71585",palevioletred:"#DB7093",coral:"#FF7F50",tomato:"#FF6347",orangered:"#FF4500",darkorange:"#FF8C00",orange:"#FFA500",gold:"#FFD700",yellow:"#FFFF00",lightyellow:"#FFFFE0",lemonchiffon:"#FFFACD",lightgoldenrodyellow:"#FAFAD2",papayawhip:"#FFEFD5",moccasin:"#FFE4B5",peachpuff:"#FFDAB9",palegoldenrod:"#EEE8AA",khaki:"#F0E68C",darkkhaki:"#BDB76B",lavender:"#E6E6FA",thistle:"#D8BFD8",plum:"#DDA0DD",violet:"#EE82EE",orchid:"#DA70D6",fuchsia:"#FF00FF",magenta:"#FF00FF",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",blueviolet:"#8A2BE2",darkviolet:"#9400D3",darkorchid:"#9932CC",darkmagenta:"#8B008B",purple:"#800080",indigo:"#4B0082",slateblue:"#6A5ACD",darkslateblue:"#483D8B",mediumslateblue:"#7B68EE",greenyellow:"#ADFF2F",chartreuse:"#7FFF00",lawngreen:"#7CFC00",lime:"#00FF00",limegreen:"#32CD32",palegreen:"#98FB98",lightgreen:"#90EE90",
4 mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",mediumseagreen:"#3CB371",seagreen:"#2E8B57",forestgreen:"#228B22",green:"#008000",darkgreen:"#006400",yellowgreen:"#9ACD32",olivedrab:"#6B8E23",olive:"#808000",darkolivegreen:"#556B2F",mediumaquamarine:"#66CDAA",darkseagreen:"#8FBC8F",lightseagreen:"#20B2AA",darkcyan:"#008B8B",teal:"#008080",aqua:"#00FFFF",cyan:"#00FFFF",lightcyan:"#E0FFFF",paleturquoise:"#AFEEEE",aquamarine:"#7FFFD4",turquoise:"#40E0D0",mediumturquoise:"#48D1CC",darkturquoise:"#00CED1",cadetblue:"#5F9EA0",steelblue:"#4682B4",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",lightblue:"#ADD8E6",skyblue:"#87CEEB",lightskyblue:"#87CEFA",deepskyblue:"#00BFFF",dodgerblue:"#1E90FF",cornflowerblue:"#6495ED",royalblue:"#4169E1",blue:"#0000FF",mediumblue:"#0000CD",darkblue:"#00008B",navy:"#000080",midnightblue:"#191970",cornsilk:"#FFF8DC",blanchedalmond:"#FFEBCD",bisque:"#FFE4C4",navajowhite:"#FFDEAD",wheat:"#F5DEB3",burlywood:"#DEB887",tan:"#D2B48C",rosybrown:"#BC8F8F",sandybrown:"#F4A460",goldenrod:"#DAA520",darkgoldenrod:"#B8860B",peru:"#CD853F",chocolate:"#D2691E",saddlebrown:"#8B4513",sienna:"#A0522D",brown:"#A52A2A",maroon:"#800000",white:"#FFFFFF",snow:"#FFFAFA",honeydew:"#F0FFF0",mintcream:"#F5FFFA",azure:"#F0FFFF",aliceblue:"#F0F8FF",ghostwhite:"#F8F8FF",whitesmoke:"#F5F5F5",seashell:"#FFF5EE",beige:"#F5F5DC",oldlace:"#FDF5E6",floralwhite:"#FFFAF0",ivory:"#FFFFF0",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lavenderblush:"#FFF0F5",mistyrose:"#FFE4E1",gainsboro:"#DCDCDC",lightgrey:"#D3D3D3",silver:"#C0C0C0",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",gray:"#808080",grey:"#808080",dimgray:"#696969",dimgrey:"#696969",lightslategray:"#778899",lightslategrey:"#778899",slategray:"#708090",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",black:"#000000"}},{}],"common/textutils":[function(t,e,n){var r,o,i;r=t("jquery"),o={},i=function(t){var e,n,i,s,a;if(null!=o[t])return o[t];a=r("<span>Hg</span>").css({font:t}),e=r('<div style="display: inline-block; width: 1px; height: 0px;"> </div>'),i=r("<div></div>"),i.append(a,e),n=r("body"),n.append(i);try{s={},e.css({verticalAlign:"baseline"}),s.ascent=e.offset().top-a.offset().top,e.css({verticalAlign:"bottom"}),s.height=e.offset().top-a.offset().top,s.descent=s.height-s.ascent}finally{i.remove()}return o[t]=s,s},e.exports={getTextHeight:i}},{jquery:"jquery"}],"common/tool_events":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;i=t("underscore"),r=t("../model"),s=t("./logging").logger,o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="ToolEvents",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{geometries:[]})},e}(r),e.exports={Model:o}},{"../model":"model","./logging":"common/logging",underscore:"underscore"}],"common/tool_manager":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m=function(t,e){function n(){this.constructor=t}for(var r in e)g.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},g={}.hasOwnProperty,y=function(t,e){return function(){return t.apply(e,arguments)}};_=t("underscore"),r=t("jquery"),o=t("bootstrap/dropdown"),s=t("backbone"),i=t("../models/tools/actions/action_tool"),u=t("../models/tools/actions/help_tool"),a=t("../models/tools/gestures/gesture_tool"),h=t("../models/tools/inspectors/inspect_tool"),d=t("./logging").logger,f=t("./toolbar_template"),l=t("./has_props"),p=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return m(e,t),e.prototype.template=f,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this.model,"change",this.render),this.have_rendered=!1},e.prototype.render=function(){var t,e,n,o,s,l;if(!this.have_rendered){this.have_rendered=!0,this.$el.html(this.template(this.model.attributes)),this.$el.addClass("bk-sidebar"),this.$el.addClass("bk-toolbar-active"),e=this.$(".bk-button-bar-list"),s=this.model.get("inspectors"),e=this.$(".bk-bs-dropdown[type='inspectors']"),0===s.length?e.hide():(t=r('<a href="#" data-bk-bs-toggle="dropdown" class="bk-bs-dropdown-toggle">inspect <span class="bk-bs-caret"></a>'),t.appendTo(e),l=r('<ul class="bk-bs-dropdown-menu" />'),_.each(s,function(t){var e;return e=r("<li />"),e.append(new h.ListItemView({model:t}).el),e.appendTo(l)}),l.on("click",function(t){return t.stopPropagation()}),l.appendTo(e),t.dropdown()),e=this.$(".bk-button-bar-list[type='help']"),_.each(this.model.get("help"),function(t){return e.append(new i.ButtonView({model:t}).el)}),e=this.$(".bk-button-bar-list[type='actions']"),_.each(this.model.get("actions"),function(t){return e.append(new i.ButtonView({model:t}).el)}),o=this.model.get("gestures");for(n in o)e=this.$(".bk-button-bar-list[type='"+n+"']"),_.each(o[n].tools,function(t){return e.append(new a.ButtonView({model:t}).el)});return this}},e}(s.View),c=function(t){function e(){return this._active_change=y(this._active_change,this),e.__super__.constructor.apply(this,arguments)}return m(e,t),e.prototype.type="ToolManager",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this._init_tools()},e.prototype.serializable_in_document=function(){return!1},e.prototype._init_tools=function(){var t,e,n,r,o,s,l,c,p,f,m;for(n=this.get("gestures"),c=this.get("tools"),o=0,l=c.length;l>o;o++)if(f=c[o],f instanceof h.Model)s=this.get("inspectors"),s.push(f),this.set("inspectors",s);else if(f instanceof u.Model)r=this.get("help"),r.push(f),this.set("help",r);else if(f instanceof i.Model)t=this.get("actions"),t.push(f),this.set("actions",t);else if(f instanceof a.Model){if(e=f.get("event_type"),!(e in n)){d.warn("ToolManager: unknown event type '"+e+"' for tool: "+f.type+" ("+f.id+")");continue}n[e].tools.push(f),this.listenTo(f,"change:active",_.bind(this._active_change,f))}p=[];for(e in n)m=n[e].tools,0!==m.length&&(n[e].tools=_.sortBy(m,function(t){return t.get("default_order")}),"pinch"!==e&&"scroll"!==e?p.push(n[e].tools[0].set("active",!0)):p.push(void 0));return p},e.prototype._active_change=function(t){var e,n,r;return n=t.get("event_type"),r=this.get("gestures"),e=r[n].active,null!=e&&e!==t&&(d.debug("ToolManager: deactivating tool: "+e.type+" ("+e.id+") for event type '"+n+"'"),e.set("active",!1)),r[n].active=t,this.set("gestures",r),d.debug("ToolManager: activating tool: "+t.type+" ("+t.id+") for event type '"+n+"'"),null},e.prototype.defaults=function(){return{gestures:{pan:{tools:[],active:null},tap:{tools:[],active:null},doubletap:{tools:[],active:null},scroll:{tools:[],active:null},pinch:{tools:[],active:null},press:{tools:[],active:null},rotate:{tools:[],active:null}},actions:[],inspectors:[],help:[]}},e}(l),e.exports={Model:c,View:p}},{"../models/tools/actions/action_tool":"models/tools/actions/action_tool","../models/tools/actions/help_tool":"models/tools/actions/help_tool","../models/tools/gestures/gesture_tool":"models/tools/gestures/gesture_tool","../models/tools/inspectors/inspect_tool":"models/tools/inspectors/inspect_tool","./has_props":"common/has_props","./logging":"common/logging","./toolbar_template":"common/toolbar_template",backbone:"backbone","bootstrap/dropdown":"bootstrap/dropdown",jquery:"jquery",underscore:"underscore"}],"common/toolbar_template":[function(t,e,n){e.exports=function(t){t||(t={});var e,n=[],r=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){(function(){null!=this.logo&&"grey"===this.logo?n.push("\n <a href='http://bokeh.pydata.org/' target='_blank' class='bk-logo bk-logo-small grey'></a>\n"):null!=this.logo&&n.push("\n<a href='http://bokeh.pydata.org/' target='_blank' class='bk-logo bk-logo-small'></a>\n"),n.push("\n<div class='bk-button-bar'>\n <ul class='bk-button-bar-list' type=\"pan\" />\n <ul class='bk-button-bar-list' type=\"scroll\" />\n <ul class='bk-button-bar-list' type=\"pinch\" />\n <ul class='bk-button-bar-list' type=\"tap\" />\n <ul class='bk-button-bar-list' type=\"press\" />\n <ul class='bk-button-bar-list' type=\"rotate\" />\n <ul class='bk-button-bar-list' type=\"actions\" />\n <div class='bk-button-bar-list bk-bs-dropdown' type=\"inspectors\" />\n <ul class='bk-button-bar-list' type=\"help\" />\n</div>\n")}).call(this)}.call(t),t.safe=r,t.escape=o,n.join("")}},{}],"common/ui_events":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;r=t("jquery"),o=t("backbone"),i=t("hammerjs"),l=t("jquery-mousewheel")(r),a=t("./logging").logger,s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this._hammer_element()},e.prototype._hammer_element=function(){var t;return t=this.get("hit_area"),this.hammer=new i(t[0]),this.hammer.get("doubletap").recognizeWith("tap"),this.hammer.get("tap").requireFailure("doubletap"),this.hammer.get("doubletap").dropRequireFailure("tap"),this.hammer.on("doubletap",function(t){return function(e){return t._doubletap(e)}}(this)),this.hammer.on("tap",function(t){return function(e){return t._tap(e)}}(this)),this.hammer.on("press",function(t){return function(e){return t._press(e)}}(this)),this.hammer.get("pan").set({direction:i.DIRECTION_ALL}),this.hammer.on("panstart",function(t){return function(e){return t._pan_start(e)}}(this)),this.hammer.on("pan",function(t){return function(e){return t._pan(e)}}(this)),this.hammer.on("panend",function(t){return function(e){return t._pan_end(e)}}(this)),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("pinchstart",function(t){return function(e){return t._pinch_start(e)}}(this)),this.hammer.on("pinch",function(t){return function(e){return t._pinch(e)}}(this)),this.hammer.on("pinchend",function(t){return function(e){return t._pinch_end(e)}}(this)),this.hammer.get("rotate").set({enable:!0}),this.hammer.on("rotatestart",function(t){return function(e){return t._rotate_start(e)}}(this)),this.hammer.on("rotate",function(t){return function(e){return t._rotate(e)}}(this)),this.hammer.on("rotateend",function(t){return function(e){return t._rotate_end(e)}}(this)),t.mousemove(function(t){return function(e){return t._mouse_move(e)}}(this)),t.mouseenter(function(t){return function(e){return t._mouse_enter(e)}}(this)),t.mouseleave(function(t){return function(e){return t._mouse_exit(e)}}(this)),t.mousewheel(function(t){return function(e,n){return t._mouse_wheel(e,n)}}(this)),r(document).keydown(function(t){return function(e){return t._key_down(e)}}(this)),r(document).keyup(function(t){return function(e){return t._key_up(e)}}(this))},e.prototype.register_tool=function(t){var e,n,r;return e=t.mget("event_type"),n=t.mget("id"),r=t.model.type,null==e?void a.debug("Button tool: "+r):("pan"===e||"pinch"===e||"rotate"===e?(a.debug("Registering tool: "+r+" for event '"+e+"'"),null!=t["_"+e+"_start"]&&t.listenTo(this,e+":start:"+n,t["_"+e+"_start"]),t["_"+e]&&t.listenTo(this,e+":"+n,t["_"+e]),t["_"+e+"_end"]&&t.listenTo(this,e+":end:"+n,t["_"+e+"_end"])):"move"===e?(a.debug("Registering tool: "+r+" for event '"+e+"'"),null!=t._move_enter&&t.listenTo(this,"move:enter",t._move_enter),t.listenTo(this,"move",t._move),null!=t._move_exit&&t.listenTo(this,"move:exit",t._move_exit)):(a.debug("Registering tool: "+r+" for event '"+e+"'"),t.listenTo(this,e+":"+n,t["_"+e])),null!=t._keydown&&(a.debug("Registering tool: "+r+" for event 'keydown'"),t.listenTo(this,"keydown",t._keydown)),null!=t._keyup&&(a.debug("Registering tool: "+r+" for event 'keyup'"),t.listenTo(this,"keyup",t._keyup)),null!=t._doubletap?(a.debug("Registering tool: "+r+" for event 'doubletap'"),t.listenTo(this,"doubletap",t._doubletap)):void 0)},e.prototype._trigger=function(t,e){var n,r,o,i;return i=this.get("tool_manager"),r=t.split(":")[0],o=i.get("gestures"),n=o[r].active,null!=n?this._trigger_event(t,n,e):void 0},e.prototype._trigger_event=function(t,e,n){return e.get("active")===!0?("scroll"===t&&(n.preventDefault(),n.stopPropagation()),this.trigger(t+":"+e.id,n)):void 0},e.prototype._bokify_hammer=function(t){var e,n,o,i,s,a,l;return"mouse"===t.pointerType?(a=t.srcEvent.pageX,l=t.srcEvent.pageY):(a=t.center.x,l=t.center.y),n=r(t.target).offset(),e=null!=(o=n.left)?o:0,s=null!=(i=n.top)?i:0,t.bokeh={sx:a-e,sy:l-s}},e.prototype._bokify_jq=function(t){var e,n,o,i,s;return n=r(t.currentTarget).offset(),e=null!=(o=n.left)?o:0,s=null!=(i=n.top)?i:0,t.bokeh={sx:t.pageX-e,sy:t.pageY-s}},e.prototype._tap=function(t){return this._bokify_hammer(t),this._trigger("tap",t)},e.prototype._doubletap=function(t){return this._bokify_hammer(t),this.trigger("doubletap",t)},e.prototype._press=function(t){return this._bokify_hammer(t),this._trigger("press",t)},e.prototype._pan_start=function(t){return this._bokify_hammer(t),t.bokeh.sx-=t.deltaX,t.bokeh.sy-=t.deltaY,this._trigger("pan:start",t)},e.prototype._pan=function(t){return this._bokify_hammer(t),this._trigger("pan",t)},e.prototype._pan_end=function(t){return this._bokify_hammer(t),this._trigger("pan:end",t)},e.prototype._pinch_start=function(t){return this._bokify_hammer(t),this._trigger("pinch:start",t)},e.prototype._pinch=function(t){return this._bokify_hammer(t),this._trigger("pinch",t)},e.prototype._pinch_end=function(t){return this._bokify_hammer(t),this._trigger("pinch:end",t)},e.prototype._rotate_start=function(t){return this._bokify_hammer(t),this._trigger("rotate:start",t)},e.prototype._rotate=function(t){return this._bokify_hammer(t),this._trigger("rotate",t)},e.prototype._rotate_end=function(t){return this._bokify_hammer(t),this._trigger("rotate:end",t)},e.prototype._mouse_enter=function(t){return this._bokify_jq(t),this.trigger("move:enter",t)},e.prototype._mouse_move=function(t){return this._bokify_jq(t),this.trigger("move",t)},e.prototype._mouse_exit=function(t){return this._bokify_jq(t),this.trigger("move:exit",t)},e.prototype._mouse_wheel=function(t,e){return this._bokify_jq(t),t.bokeh.delta=e,this._trigger("scroll",t)},e.prototype._key_down=function(t){return this.trigger("keydown",t)},e.prototype._key_up=function(t){return this.trigger("keyup",t)},e}(o.Model),e.exports=s},{"./logging":"common/logging",backbone:"backbone",hammerjs:"hammerjs/hammer",jquery:"jquery","jquery-mousewheel":"jquery-mousewheel"}],main:[function(t,e,n){var r,o;r={},r.require=t,r.version="0.11.1",r._=t("underscore"),r.$=t("jquery"),r.Backbone=t("backbone"),r.Backbone.$=r.$,o=t("./common/logging"),r.logger=o.logger,r.set_log_level=o.set_log_level,window.Float64Array||(r.logger.warn("Float64Array is not supported. Using generic Array instead."),window.Float64Array=Array),r.index=t("./common/base").index,r.embed=t("./common/embed"),r.Collections=t("./common/base").Collections,r.Config=t("./common/base").Config,r.Bokeh=r,e.exports=r},{"./common/base":"common/base","./common/embed":"common/embed","./common/logging":"common/logging",backbone:"backbone",jquery:"jquery",underscore:"underscore"}],model:[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("./common/has_props"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="Model",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{tags:[],name:null})},e}(r),e.exports=o},{"./common/has_props":"common/has_props",underscore:"underscore"}],"models/annotations/annotation":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("../renderers/renderer"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="Annotation",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{level:"overlay",plot:null})},e}(o),e.exports={Model:r}},{"../renderers/renderer":"models/renderers/renderer",underscore:"underscore"}],"models/annotations/box_annotation":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),r=t("./annotation"),s=t("../../common/plot_widget"),l=t("../../common/properties"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.fill_props=new l.Fill({obj:this.model,prefix:""}),this.line_props=new l.Line({obj:this.model,prefix:""}),this.$el.appendTo(this.plot_view.$el.find("div.bk-canvas-overlays")),this.$el.addClass("shading"),this.$el.hide()},e.prototype.bind_bokeh_events=function(){return"css"===this.mget("render_mode")?this.listenTo(this.model,"data_update",this.render):this.listenTo(this.model,"data_update",this.plot_view.request_render)},e.prototype.render=function(){var t,e,n,r;return null==this.mget("left")&&null==this.mget("right")&&null==this.mget("top")&&null==this.mget("bottom")?(this.$el.hide(),null):(this.frame=this.plot_model.get("frame"),this.canvas=this.plot_model.get("canvas"),this.xmapper=this.plot_view.frame.get("x_mappers")[this.mget("x_range_name")],this.ymapper=this.plot_view.frame.get("y_mappers")[this.mget("y_range_name")],e=this.canvas.vx_to_sx(this._calc_dim("left",this.xmapper,this.frame.get("h_range").get("start"))),n=this.canvas.vx_to_sx(this._calc_dim("right",this.xmapper,this.frame.get("h_range").get("end"))),t=this.canvas.vy_to_sy(this._calc_dim("bottom",this.ymapper,this.frame.get("v_range").get("start"))),r=this.canvas.vy_to_sy(this._calc_dim("top",this.ymapper,this.frame.get("v_range").get("end"))),"css"===this.mget("render_mode")?this._css_box(e,n,t,r):this._canvas_box(e,n,t,r))},e.prototype._css_box=function(t,e,n,r){var o,i,s,l,u,h,c,p;return p=Math.abs(e-t),h=Math.abs(n-r),u=this.mget("line_width").value,s=this.mget("line_color").value,i=this.mget("fill_color").value,o=this.mget("fill_alpha").value,c="left:"+t+"px; width:"+p+"px; top:"+r+"px; height:"+h+"px; border-width:"+u+"px; border-color:"+s+"; background-color:"+i+"; opacity:"+o+";",l=this.mget("line_dash"),a.isArray(l)&&(l=l.length<2?"solid":"dashed"),a.isString(l)&&(c+=" border-style:"+l+";"),this.$el.attr("style",c),this.$el.show()},e.prototype._canvas_box=function(t,e,n,r){var o;return o=this.plot_view.canvas_view.ctx,o.save(),o.beginPath(),o.rect(t,r,e-t,n-r),this.fill_props.set_value(o),o.fill(),this.line_props.set_value(o),o.stroke(),o.restore()},e.prototype._calc_dim=function(t,e,n){var r;return r=null!=this.mget(t)?"data"===this.mget(t+"_units")?e.map_to_target(this.mget(t)):this.mget(t):n},e}(s),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=i,e.prototype.type="BoxAnnotation",e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["silent_update"])},e.prototype.update=function(t){var e,n,r,o;return n=t.left,r=t.right,o=t.top,e=t.bottom,this.get("silent_update")?(this.attributes.left=n,this.attributes.right=r,this.attributes.top=o,this.attributes.bottom=e):this.set({left:n,right:r,top:o,bottom:e}),this.trigger("data_update")},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{silent_update:!1,render_mode:"canvas",x_range_name:"default",y_range_name:"default",level:"annotation",left:null,right:null,top:null,bottom:null,left_units:"data",right_units:"data",top_units:"data",bottom_units:"data",fill_color:"#fff9ba",fill_alpha:.4,line_color:"#cccccc",line_width:1,line_alpha:.3,line_join:"miter",line_cap:"butt",line_dash:[],line_dash_offset:0})},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","./annotation":"models/annotations/annotation",underscore:"underscore"}],"models/annotations/legend":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),r=t("./annotation"),s=t("../../common/plot_widget"),l=t("../../common/properties"),u=t("../../common/textutils"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.label_props=new l.Text({obj:this.model,prefix:"label_"}),this.border_props=new l.Line({obj:this.model,prefix:"border_"}),this.background_props=new l.Fill({obj:this.model,prefix:"background_"}),this.need_calc_dims=!0,this.listenTo(this.plot_model.solver,"layout_update",function(){return this.need_calc_dims=!0})},e.prototype.calc_dims=function(t){var e,n,r,o,i,s,l,h,c,p,_,d,f,m,g;if(l=function(){var t,e,r,o,i;for(r=this.mget("legends"),i=[],t=0,e=r.length;e>t;t++)o=r[t],s=o[0],n=o[1],i.push(s);return i}.call(this),o=this.mget("label_height"),this.glyph_height=this.mget("glyph_height"),i=this.mget("label_width"),this.glyph_width=this.mget("glyph_width"),c=this.mget("legend_spacing"),this.label_height=a.max([u.getTextHeight(this.label_props.font_value()),o,this.glyph_height]),this.legend_height=this.label_height,this.legend_height=l.length*this.legend_height+(1+l.length)*c,e=this.plot_view.canvas_view.ctx,e.save(),this.label_props.set_value(e),d=a.map(l,function(t){return e.measureText(t).width}),e.restore(),_=a.max(d),this.label_width=a.max([_,i]),this.legend_width=this.label_width+this.glyph_width+3*c,p=this.mget("location"),h=this.mget("legend_padding"),r=this.plot_view.frame.get("h_range"),f=this.plot_view.frame.get("v_range"),a.isString(p))switch(p){case"top_left":m=r.get("start")+h,g=f.get("end")-h;break;case"top_center":m=(r.get("end")+r.get("start"))/2-this.legend_width/2,g=f.get("end")-h;break;case"top_right":m=r.get("end")-h-this.legend_width,g=f.get("end")-h;break;case"right_center":m=r.get("end")-h-this.legend_width,g=(f.get("end")+f.get("start"))/2+this.legend_height/2;break;case"bottom_right":m=r.get("end")-h-this.legend_width,g=f.get("start")+h+this.legend_height;break;case"bottom_center":m=(r.get("end")+r.get("start"))/2-this.legend_width/2,g=f.get("start")+h+this.legend_height;break;case"bottom_left":m=r.get("start")+h,g=f.get("start")+h+this.legend_height;break;case"left_center":m=r.get("start")+h,g=(f.get("end")+f.get("start"))/2+this.legend_height/2;break;case"center":m=(r.get("end")+r.get("start"))/2-this.legend_width/2,g=(f.get("end")+f.get("start"))/2+this.legend_height/2}else a.isArray(p)&&2===p.length&&(m=p[0],g=p[1]);return m=this.plot_view.canvas.vx_to_sx(m),g=this.plot_view.canvas.vy_to_sy(g),this.box_coords=[m,g]},e.prototype.render=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x;for(this.need_calc_dims&&(this.calc_dims(),this.need_calc_dims=!1),t=this.plot_view.canvas_view.ctx,t.save(),t.beginPath(),t.rect(this.box_coords[0],this.box_coords[1],this.legend_width,this.legend_height),this.background_props.set_value(t),t.fill(),this.border_props.do_stroke&&(this.border_props.set_value(t),t.stroke()),s=this.mget("legend_spacing"),u=this.mget("legends"),r=n=0,a=u.length;a>n;r=++n)for(h=u[r],i=h[0],e=h[1],b=r*this.label_height,x=(1+r)*s,g=this.box_coords[1]+this.label_height/2+b+x,d=this.box_coords[0]+s,f=this.box_coords[0]+2*s+this.label_width,m=f+this.glyph_width,y=this.box_coords[1]+b+x,v=y+this.glyph_height,this.label_props.set_value(t),t.fillText(i,d,g),c=this.model.resolve_ref(e),o=0,l=c.length;l>o;o++)p=c[o],_=this.plot_view.renderers[p.id],_.draw_legend(t,f,m,y,v);return t.restore()},e}(s),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.default_view=i,e.prototype.type="Legend",e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{legends:[],level:"annotation",border_line_color:"black",border_line_width:1,border_line_alpha:1,border_line_join:"miter",border_line_cap:"butt",border_line_dash:[],border_line_dash_offset:0,background_fill_color:"#ffffff",background_fill_alpha:1,label_standoff:15,label_text_font:"helvetica",label_text_font_size:"10pt",label_text_font_style:"normal",label_text_color:"#444444",label_text_alpha:1,label_text_align:"left",label_text_baseline:"middle",glyph_height:20,glyph_width:20,label_height:20,label_width:50,legend_padding:10,legend_spacing:3,location:"top_right"})},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","../../common/textutils":"common/textutils","./annotation":"models/annotations/annotation",underscore:"underscore"}],"models/annotations/poly_annotation":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),r=t("./annotation"),o=t("../../common/plot_widget"),l=t("../../common/properties"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.line=new l.Line({obj:this.model,prefix:""}),this.fill=new l.Fill({obj:this.model,prefix:""})},e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"data_update",this.plot_view.request_render)},e.prototype.render=function(t){var e,n,r,o,i,s,a,l,u,h;if(u=this.mget("xs"),h=this.mget("ys"),u.length!==h.length)return null;if(u.length<3||h.length<3)return null;for(e=this.plot_view.canvas,t=this.plot_view.canvas_view.ctx,n=r=0,o=u.length;o>=0?o>r:r>o;n=o>=0?++r:--r)"screen"===this.mget("xs_units")&&(a=u[n]),"screen"===this.mget("ys_units")&&(l=h[n]),i=e.vx_to_sx(a),s=e.vy_to_sy(l),0===n?(t.beginPath(),t.moveTo(i,s)):t.lineTo(i,s);return t.closePath(),this.line.do_stroke&&(this.line.set_value(t),t.stroke()),this.fill.do_fill?(this.fill.set_value(t),t.fill()):void 0},e}(o),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=s,e.prototype.type="PolyAnnotation",e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["silent_update"])},e.prototype.update=function(t){var e,n;return e=t.xs,n=t.ys,this.get("silent_update")?(this.attributes.xs=e,this.attributes.ys=n):this.set({xs:e,ys:n}),this.trigger("data_update")},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{silent_update:!1,plot:null,xs:[],ys:[],xs_units:"data",ys_units:"data",x_range_name:"default",y_range_name:"default",level:"annotation",fill_color:"#fff9ba",fill_alpha:.4,line_width:1,line_color:"#cccccc",line_alpha:.3,line_alpha:.3,line_join:"miter",line_cap:"butt",line_dash:[],line_dash_offset:0})},e}(r.Model),e.exports={Model:i,View:s}},{"../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","./annotation":"models/annotations/annotation",underscore:"underscore"}],"models/annotations/span":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),r=t("./annotation"),o=t("../../common/plot_widget"),l=t("../../common/properties"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.line_props=new l.Line({obj:this.model,prefix:""}),this.$el.appendTo(this.plot_view.$el.find("div.bk-canvas-overlays")),this.$el.css({position:"absolute"}),this.$el.hide()},e.prototype.bind_bokeh_events=function(){return this.mget("for_hover")?this.listenTo(this.model,"change:computed_location",this._draw_span):this.listenTo(this.model,"change:location",this._draw_span)},e.prototype.render=function(){return this._draw_span()},e.prototype._draw_span=function(){var t,e,n,r,o,i,s,a,l,u;return o=this.mget("for_hover")?this.mget("computed_location"):this.mget("location"),null==o?void this.$el.hide():(n=this.plot_model.get("frame"),t=this.plot_model.get("canvas"),l=this.plot_view.frame.get("x_mappers")[this.mget("x_range_name")],u=this.plot_view.frame.get("y_mappers")[this.mget("y_range_name")],"width"===this.mget("dimension")?(s=t.vy_to_sy(this._calc_dim(o,u)),i=t.vx_to_sx(n.get("left")),a=n.get("width"),r=this.line_props.width.value()):(s=t.vy_to_sy(n.get("top")),i=t.vx_to_sx(this._calc_dim(o,l)),a=this.line_props.width.value(),r=n.get("height")),"css"===this.mget("render_mode")?(this.$el.css({top:s,left:i,width:a+"px",height:r+"px","z-index":1e3,"background-color":this.line_props.color.value(),opacity:this.line_props.alpha.value()}),this.$el.show()):"canvas"===this.mget("render_mode")?(e=this.plot_view.canvas_view.ctx,e.save(),e.beginPath(),this.line_props.set_value(e),e.moveTo(i,s),"width"===this.mget("dimension")?e.lineTo(i+a,s):e.lineTo(i,s+r),e.stroke(),e.restore()):void 0)},e.prototype._calc_dim=function(t,e){var n;return n="data"===this.mget("location_units")?e.map_to_target(t):t},e}(o),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=s,e.prototype.type="Span",e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["for_hover","computed_location"])},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{for_hover:!1,x_range_name:"default",y_range_name:"default",render_mode:"canvas",location_units:"data",level:"annotation",dimension:"width",location:null,line_color:"black",line_width:1,line_alpha:1,line_dash:[],line_dash_offset:0,line_cap:"butt",line_join:"miter"})},e}(r.Model),e.exports={Model:i,View:s}},{"../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","./annotation":"models/annotations/annotation",underscore:"underscore"}],"models/annotations/tooltip":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;r=t("jquery"),l=t("underscore"),o=t("./annotation"),i=t("../../common/plot_widget"),u=t("../../common/logging").logger,a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.className="bk-tooltip",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.$el.appendTo(this.plot_view.$el.find("div.bk-canvas-overlays")),this.$el.css({"z-index":1010}),this.$el.hide()},e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change:data",this._draw_tips)},e.prototype.render=function(){return this._draw_tips()},e.prototype._draw_tips=function(){var t,e,n,o,i,s,a,u,h,c,p,_,d,f,m;if(this.$el.empty(),this.$el.hide(),this.$el.toggleClass("bk-tooltip-custom",this.mget("custom")),!l.isEmpty(this.mget("data"))){for(a=this.mget("data"),n=0,i=a.length;i>n;n++)d=a[n],f=d[0],m=d[1],e=d[2],(!this.mget("inner_only")||this.plot_view.frame.contains(f,m))&&(p=r("<div />").appendTo(this.$el),
5 p.append(e));switch(h=this.plot_view.mget("canvas").vx_to_sx(f),c=this.plot_view.mget("canvas").vy_to_sy(m),u=this.mget("side"),"auto"===u&&(s=this.plot_view.frame.get("width"),u=f-this.plot_view.frame.get("left")<s/2?"right":"left"),this.$el.removeClass("bk-right"),this.$el.removeClass("bk-left"),t=10,u){case"right":this.$el.addClass("bk-left"),o=h+(this.$el.outerWidth()-this.$el.innerWidth())+t;break;case"left":this.$el.addClass("bk-right"),o=h-this.$el.outerWidth()-t}return _=c-this.$el.outerHeight()/2,this.$el.children().length>0?(this.$el.css({top:_,left:o}),this.$el.show()):void 0}},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.default_view=a,e.prototype.type="Tooltip",e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["data","custom"])},e.prototype.clear=function(){return this.set("data",[])},e.prototype.add=function(t,e,n){var r;return r=this.get("data"),r.push([t,e,n]),this.set("data",r)},e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{level:"overlay",side:"auto",inner_only:!0})},e}(o.Model),e.exports={Model:s,View:a}},{"../../common/logging":"common/logging","../../common/plot_widget":"common/plot_widget","./annotation":"models/annotations/annotation",jquery:"jquery",underscore:"underscore"}],"models/axes/axis":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j=function(t,e){function n(){this.constructor=t}for(var r in e)T.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},T={}.hasOwnProperty;d=t("underscore"),x=t("kiwi"),a=t("../renderers/guide_renderer"),h=t("../../common/layout_box"),w=t("../../common/logging").logger,p=t("../../common/plot_widget"),M=t("../../common/properties"),k=Math.PI/2,r="alphabetic",c="middle",l="hanging",u="left",_="right",s="center",y={above:{parallel:0,normal:-k,horizontal:0,vertical:-k},below:{parallel:0,normal:k,horizontal:0,vertical:k},left:{parallel:-k,normal:0,horizontal:0,vertical:-k},right:{parallel:k,normal:0,horizontal:0,vertical:k}},b={above:{parallel:r,normal:c,horizontal:r,vertical:c},below:{parallel:l,normal:c,horizontal:l,vertical:c},left:{parallel:r,normal:c,horizontal:c,vertical:r},right:{parallel:r,normal:c,horizontal:c,vertical:r}},f={above:{parallel:s,normal:u,horizontal:s,vertical:u},below:{parallel:s,normal:u,horizontal:s,vertical:_},left:{parallel:s,normal:_,horizontal:_,vertical:s},right:{parallel:s,normal:u,horizontal:u,vertical:s}},m={above:_,below:u,left:_,right:u},g={above:u,below:_,left:_,right:u},v=function(t,e,n){var r,o;return d.isString(n)?(o=b[e][n],r=f[e][n]):0===n?(o=b[e][n],r=f[e][n]):0>n?(o="middle",r=m[e]):n>0&&(o="middle",r=g[e]),t.textBaseline=o,t.textAlign=r},i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return j(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.rule_props=new M.Line({obj:this.model,prefix:"axis_"}),this.major_tick_props=new M.Line({obj:this.model,prefix:"major_tick_"}),this.minor_tick_props=new M.Line({obj:this.model,prefix:"minor_tick_"}),this.major_label_props=new M.Text({obj:this.model,prefix:"major_label_"}),this.axis_label_props=new M.Text({obj:this.model,prefix:"axis_label_"}),this.x_range_name=this.mget("x_range_name"),this.y_range_name=this.mget("y_range_name")},e.prototype.render=function(){var t;if(this.mget("visible"))return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_rule(t),this._draw_major_ticks(t),this._draw_minor_ticks(t),this._draw_major_labels(t),this._draw_axis_label(t),t.restore()},e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change",this.plot_view.request_render)},e.prototype._draw_rule=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m;if(this.rule_props.do_stroke){for(s=e=this.mget("rule_coords"),_=s[0],f=s[1],a=this.plot_view.map_to_screen(_,f,this.x_range_name,this.y_range_name),c=a[0],p=a[1],l=this.mget("normals"),o=l[0],i=l[1],u=this.mget("offsets"),d=u[0],m=u[1],this.rule_props.set_value(t),t.beginPath(),t.moveTo(Math.round(c[0]+o*d),Math.round(p[0]+i*m)),n=r=1,h=c.length;h>=1?h>r:r>h;n=h>=1?++r:--r)t.lineTo(Math.round(c[n]+o*d),Math.round(p[n]+i*m));return t.stroke()}},e.prototype._draw_major_ticks=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v;if(this.major_tick_props.do_stroke){for(e=this.mget("tick_coords"),s=e.major,m=s[0],y=s[1],a=this.plot_view.map_to_screen(m,y,this.x_range_name,this.y_range_name),p=a[0],_=a[1],l=this.mget("normals"),o=l[0],i=l[1],u=this.mget("offsets"),g=u[0],v=u[1],d=this.mget("major_tick_in"),f=this.mget("major_tick_out"),this.major_tick_props.set_value(t),c=[],n=r=0,h=p.length;h>=0?h>r:r>h;n=h>=0?++r:--r)t.beginPath(),t.moveTo(Math.round(p[n]+o*f+o*g),Math.round(_[n]+i*f+i*v)),t.lineTo(Math.round(p[n]-o*d+o*g),Math.round(_[n]-i*d+i*v)),c.push(t.stroke());return c}},e.prototype._draw_minor_ticks=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v;if(this.minor_tick_props.do_stroke){for(e=this.mget("tick_coords"),s=e.minor,m=s[0],y=s[1],a=this.plot_view.map_to_screen(m,y,this.x_range_name,this.y_range_name),p=a[0],_=a[1],l=this.mget("normals"),o=l[0],i=l[1],u=this.mget("offsets"),g=u[0],v=u[1],d=this.mget("minor_tick_in"),f=this.mget("minor_tick_out"),this.minor_tick_props.set_value(t),c=[],n=r=0,h=p.length;h>=0?h>r:r>h;n=h>=0?++r:--r)t.beginPath(),t.moveTo(Math.round(p[n]+o*f+o*g),Math.round(_[n]+i*f+i*v)),t.lineTo(Math.round(p[n]-o*d+o*g),Math.round(_[n]-i*d+i*v)),c.push(t.stroke());return c}},e.prototype._draw_major_labels=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,f,m,g,b,x,w,k,M,j,T;for(n=this.mget("tick_coords"),h=n.major,k=h[0],j=h[1],c=this.plot_view.map_to_screen(k,j,this.x_range_name,this.y_range_name),x=c[0],w=c[1],p=this.mget("normals"),a=p[0],l=p[1],_=this.mget("offsets"),M=_[0],T=_[1],r=this.mget("dimension"),g=this.mget("layout_location"),u=this.mget("major_label_orientation"),e=d.isString(u)?y[g][u]:-u,b=this.model._tick_extent(this)+this.mget("major_label_standoff"),s=this.mget("formatter").format(n.major[r]),this.major_label_props.set_value(t),v(t,g,u),m=[],o=i=0,f=x.length;f>=0?f>i:i>f;o=f>=0?++i:--i)e?(t.translate(x[o]+a*b+a*M,w[o]+l*b+l*T),t.rotate(e),t.fillText(s[o],0,0),t.rotate(-e),m.push(t.translate(-x[o]-a*b+a*M,-w[o]-l*b+l*T))):m.push(t.fillText(s[o],Math.round(x[o]+a*b+a*M),Math.round(w[o]+l*b+l*T)));return m},e.prototype._draw_axis_label=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g;return n=this.mget("axis_label"),null!=n?(s=this.mget("rule_coords"),d=s[0],m=s[1],a=this.plot_view.map_to_screen(d,m,this.x_range_name,this.y_range_name),p=a[0],_=a[1],l=this.mget("normals"),r=l[0],o=l[1],u=this.mget("offsets"),f=u[0],g=u[1],h=this.mget("layout_location"),i="parallel",e=y[h][i],c=this.model._tick_extent(this)+this.model._tick_label_extent(this)+this.mget("axis_label_standoff"),p=(p[0]+p[p.length-1])/2,_=(_[0]+_[_.length-1])/2,this.axis_label_props.set_value(t),v(t,h,i),e?(t.translate(p+r*c+r*f,_+o*c+o*g),t.rotate(e),t.fillText(n,0,0),t.rotate(-e),t.translate(-p-r*c+r*f,-_-o*c+o*g)):t.fillText(n,p+r*c+r*f,_+o*c+o*g)):void 0},e}(p),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return j(e,t),e.prototype.default_view=i,e.prototype.type="Axis",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("computed_bounds",this._computed_bounds,!1),this.add_dependencies("computed_bounds",this,["bounds"]),this.add_dependencies("computed_bounds",this.get("plot"),["x_range","y_range"]),this.register_property("rule_coords",this._rule_coords,!1),this.add_dependencies("rule_coords",this,["computed_bounds","side"]),this.register_property("tick_coords",this._tick_coords,!1),this.add_dependencies("tick_coords",this,["computed_bounds","layout_location"]),this.register_property("ranges",this._ranges,!0),this.register_property("normals",function(){return this._normals},!0),this.register_property("dimension",function(){return this._dim},!0),this.register_property("offsets",this._offsets,!0)},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["layout_location"])},e.prototype.initialize_layout=function(t){var e,n;return e=new h.Model({solver:t}),this.panel=e,this._top=e._top,this._bottom=e._bottom,this._left=e._left,this._right=e._right,this._width=e._width,this._height=e._height,n=this.get("layout_location"),"above"===n?(this._dim=0,this._normals=[0,-1],this._size=e._height,this._anchor=e._bottom):"below"===n?(this._dim=0,this._normals=[0,1],this._size=e._height,this._anchor=e._top):"left"===n?(this._dim=1,this._normals=[-1,0],this._size=e._width,this._anchor=e._right):"right"===n?(this._dim=1,this._normals=[1,0],this._size=e._width,this._anchor=e._left):w.error("unrecognized side: '"+n+"'")},e.prototype.update_layout=function(t,e){var n;if(this.get("visible")&&(n=this._tick_extent(t)+this._tick_label_extent(t)+this._axis_label_extent(t),null==this._last_size&&(this._last_size=-1),n!==this._last_size))return this._last_size=n,null!=this._size_constraint&&e.remove_constraint(this._size_constraint),this._size_constraint=new x.Constraint(new x.Expression(this._size,-n),x.Operator.Eq),e.add_constraint(this._size_constraint)},e.prototype._offsets=function(){var t,e,n,r,o;return n=this.get("layout_location"),e=[0,0],r=e[0],o=e[1],t=this.get("plot").get("frame"),"below"===n?o=Math.abs(this.panel.get("top")-t.get("bottom")):"above"===n?o=Math.abs(this.panel.get("bottom")-t.get("top")):"right"===n?r=Math.abs(this.panel.get("left")-t.get("right")):"left"===n&&(r=Math.abs(this.panel.get("right")-t.get("left"))),[r,o]},e.prototype._ranges=function(){var t,e,n,r;return e=this.get("dimension"),n=(e+1)%2,t=this.get("plot").get("frame"),r=[t.get("x_ranges")[this.get("x_range_name")],t.get("y_ranges")[this.get("y_range_name")]],[r[e],r[n]]},e.prototype._computed_bounds=function(){var t,e,n,r,o,i,s,a;return o=this.get("ranges"),n=o[0],t=o[1],a=null!=(i=this.get("bounds"))?i:"auto",r=[n.get("min"),n.get("max")],"auto"===a?r:d.isArray(a)?(Math.abs(a[0]-a[1])>Math.abs(r[0]-r[1])?(s=Math.max(Math.min(a[0],a[1]),r[0]),e=Math.min(Math.max(a[0],a[1]),r[1])):(s=Math.min(a[0],a[1]),e=Math.max(a[0],a[1])),[s,e]):(w.error("user bounds '"+a+"' not understood"),null)},e.prototype._rule_coords=function(){var t,e,n,r,o,i,s,a,l,u,h,c;return r=this.get("dimension"),o=(r+1)%2,a=this.get("ranges"),s=a[0],e=a[1],l=this.get("computed_bounds"),u=l[0],n=l[1],h=new Array(2),c=new Array(2),t=[h,c],i=this._get_loc(e),t[r][0]=Math.max(u,s.get("min")),t[r][1]=Math.min(n,s.get("max")),t[r][0]>t[r][1]&&(t[r][0]=t[r][1]=NaN),t[o][0]=i,t[o][1]=i,t},e.prototype._tick_coords=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z;if(r=this.get("dimension"),i=(r+1)%2,y=this.get("ranges"),f=y[0],e=y[1],v=this.get("computed_bounds"),M=v[0],n=v[1],j=this.get("ticker").get_ticks(M,n,f,{}),h=j.major,d=j.minor,l=this._get_loc(e),T=[],z=[],t=[T,z],p=[],_=[],c=[p,_],"FactorRange"===f.type)for(o=s=0,b=h.length;b>=0?b>s:s>b;o=b>=0?++s:--s)t[r].push(h[o]),t[i].push(l);else{for(x=[f.get("min"),f.get("max")],g=x[0],m=x[1],o=a=0,w=h.length;w>=0?w>a:a>w;o=w>=0?++a:--a)h[o]<g||h[o]>m||(t[r].push(h[o]),t[i].push(l));for(o=u=0,k=d.length;k>=0?k>u:u>k;o=k>=0?++u:--u)d[o]<g||d[o]>m||(c[r].push(d[o]),c[i].push(l))}return{major:t,minor:c}},e.prototype._get_loc=function(t){var e,n,r,o;return n=t.get("start"),e=t.get("end"),o=this.get("layout_location"),"left"===o||"below"===o?r="start":("right"===o||"above"===o)&&(r="end"),t.get(r)},e.prototype._tick_extent=function(t){return this.get("major_tick_out")},e.prototype._tick_label_extent=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,f,m,g,v,b,x;for(s=0,i=this.get("dimension"),o=t.plot_view.canvas_view.ctx,r=this.get("tick_coords").major,g=this.get("layout_location"),_=this.get("major_label_orientation"),p=this.get("formatter").format(r[i]),t.major_label_props.set_value(o),d.isString(_)?(u=1,e=y[g][_]):(u=2,e=-_),e=Math.abs(e),n=Math.cos(e),m=Math.sin(e),"above"===g||"below"===g?(x=m,l=n):(x=n,l=m),h=c=0,f=p.length;f>=0?f>c:c>f;h=f>=0?++c:--c)null!=p[h]&&(b=1.1*o.measureText(p[h]).width,a=.9*o.measureText(p[h]).ascent,v=b*x+a/u*l,v>s&&(s=v));return s>0&&(s+=this.get("major_label_standoff")),s},e.prototype._axis_label_extent=function(t){var e,n,r,o,i,s,a,l,u;return o=0,l=this.get("layout_location"),s="parallel",r=t.plot_view.canvas_view.ctx,t.axis_label_props.set_value(r),e=Math.abs(y[l][s]),n=Math.cos(e),a=Math.sin(e),this.get("axis_label")&&(o+=this.get("axis_label_standoff"),t.axis_label_props.set_value(r),u=1.1*r.measureText(this.get("axis_label")).width,i=.9*r.measureText(this.get("axis_label")).ascent,o+="above"===l||"below"===l?u*a+i*n:u*n+i*a),o},e.prototype.defaults=function(){return d.extend({},e.__super__.defaults.call(this),{location:"auto",bounds:"auto",x_range_name:"default",y_range_name:"default",axis_label:"",visible:!0,axis_line_color:"black",axis_line_width:1,axis_line_alpha:1,axis_line_join:"miter",axis_line_cap:"butt",axis_line_dash:[],axis_line_dash_offset:0,major_tick_in:2,major_tick_out:6,major_tick_line_color:"black",major_tick_line_width:1,major_tick_line_alpha:1,major_tick_line_join:"miter",major_tick_line_cap:"butt",major_tick_line_dash:[],major_tick_line_dash_offset:0,minor_tick_in:0,minor_tick_out:4,minor_tick_line_color:"black",minor_tick_line_width:1,minor_tick_line_alpha:1,minor_tick_line_join:"miter",minor_tick_line_cap:"butt",minor_tick_line_dash:[],minor_tick_line_dash_offset:0,major_label_standoff:5,major_label_orientation:"horizontal",major_label_text_font:"helvetica",major_label_text_font_size:"10pt",major_label_text_font_style:"normal",major_label_text_color:"#444444",major_label_text_alpha:1,major_label_text_align:"center",major_label_text_baseline:"alphabetic",axis_label_standoff:5,axis_label_text_font:"helvetica",axis_label_text_font_size:"16pt",axis_label_text_font_style:"normal",axis_label_text_color:"#444444",axis_label_text_alpha:1,axis_label_text_align:"center",axis_label_text_baseline:"alphabetic"})},e}(a.Model),e.exports={Model:o,View:i}},{"../../common/layout_box":"common/layout_box","../../common/logging":"common/logging","../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","../renderers/guide_renderer":"models/renderers/guide_renderer",kiwi:"kiwi",underscore:"underscore"}],"models/axes/categorical_axis":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("underscore"),u=t("../../common/logging").logger,a=t("../tickers/categorical_ticker"),s=t("../formatters/categorical_tick_formatter"),r=t("./axis"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.default_view=i,e.prototype.type="CategoricalAxis",e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{ticker:new a.Model,formatter:new s.Model})},e.prototype._computed_bounds=function(){var t,e,n,r,o,i;return r=this.get("ranges"),e=r[0],t=r[1],i=null!=(o=this.get("bounds"))?o:"auto",n=[e.get("min"),e.get("max")],"auto"!==i&&u.warn("Categorical Axes only support user_bounds='auto', ignoring"),n},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/logging":"common/logging","../formatters/categorical_tick_formatter":"models/formatters/categorical_tick_formatter","../tickers/categorical_ticker":"models/tickers/categorical_ticker","./axis":"models/axes/axis",underscore:"underscore"}],"models/axes/continuous_axis":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;r=t("./axis"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type="ContinuousAxis",e}(r.Model),e.exports={Model:o}},{"./axis":"models/axes/axis"}],"models/axes/datetime_axis":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=t("underscore"),a=t("./axis"),s=t("../tickers/datetime_ticker"),i=t("../formatters/datetime_tick_formatter"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e}(a.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=o,e.prototype.type="DatetimeAxis",e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{axis_label:"",ticker:new s.Model,formatter:new i.Model})},e}(a.Model),e.exports={Model:r,View:o}},{"../formatters/datetime_tick_formatter":"models/formatters/datetime_tick_formatter","../tickers/datetime_ticker":"models/tickers/datetime_ticker","./axis":"models/axes/axis",underscore:"underscore"}],"models/axes/linear_axis":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;u=t("underscore"),r=t("./axis"),s=t("./continuous_axis"),i=t("../tickers/basic_ticker"),o=t("../formatters/basic_tick_formatter"),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e}(r.View),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.default_view=l,e.prototype.type="LinearAxis",e.prototype.defaults=function(){return u.extend({},e.__super__.defaults.call(this),{ticker:new i.Model,formatter:new o.Model})},e}(s.Model),e.exports={Model:a,View:l}},{"../formatters/basic_tick_formatter":"models/formatters/basic_tick_formatter","../tickers/basic_ticker":"models/tickers/basic_ticker","./axis":"models/axes/axis","./continuous_axis":"models/axes/continuous_axis",underscore:"underscore"}],"models/axes/log_axis":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;u=t("underscore"),r=t("./axis"),o=t("./continuous_axis"),l=t("../tickers/log_ticker"),a=t("../formatters/log_tick_formatter"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e}(r.View),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.default_view=s,e.prototype.type="LogAxis",e.prototype.defaults=function(){return u.extend({},e.__super__.defaults.call(this),{ticker:new l.Model,formatter:new a.Model})},e}(o.Model),e.exports={Model:i,View:s}},{"../formatters/log_tick_formatter":"models/formatters/log_tick_formatter","../tickers/log_ticker":"models/tickers/log_ticker","./axis":"models/axes/axis","./continuous_axis":"models/axes/continuous_axis",underscore:"underscore"}],"models/callbacks/customjs":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty,l=[].slice;i=t("underscore"),o=t("../../model"),r=function(e){function n(){return n.__super__.constructor.apply(this,arguments)}return s(n,e),n.prototype.type="CustomJS",n.prototype.initialize=function(t,e){return n.__super__.initialize.call(this,t,e),this.register_property("values",this._make_values,!0),this.add_dependencies("values",this,["args"]),this.register_property("func",this._make_func,!0),this.add_dependencies("func",this,["args","code"])},n.prototype.execute=function(e,n){return this.get("func").apply(null,l.call(this.get("values")).concat([e],[n],[t]))},n.prototype._make_values=function(){return i.values(this.get("args"))},n.prototype._make_func=function(){var e,n;return e=this.get("code"),e=function(){switch(this.get("lang")){case"javascript":return e;case"coffeescript":return n=t("coffee-script"),n.compile(e,{bare:!0,shiftLine:!0})}}.call(this),function(t,e,n){n.prototype=t.prototype;var r=new n,o=t.apply(r,e);return Object(o)===o?o:r}(Function,l.call(i.keys(this.get("args"))).concat(["cb_obj"],["cb_data"],["require"],[e]),function(){})},n.prototype.defaults=function(){return i.extend({},n.__super__.defaults.call(this),{args:{},code:"",lang:"javascript"})},n}(o),e.exports={Model:r}},{"../../model":"model","coffee-script":void 0,underscore:"underscore"}],"models/callbacks/open_url":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("../../util/util"),r=t("../../model"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="OpenURL",e.prototype.execute=function(t){var e,n,r,o,s;for(o=i.get_indices(t),n=0,r=o.length;r>n;n++)e=o[n],s=i.replace_placeholders(this.get("url"),t,e),window.open(s);return null},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{url:"http://"})},e}(r),e.exports={Model:o}},{"../../model":"model","../../util/util":"util/util",underscore:"underscore"}],"models/component":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("../model"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="Component",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{disabled:!1})},e}(o),e.exports={Model:r}},{"../model":"model",underscore:"underscore"}],"models/formatters/basic_tick_formatter":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("./tick_formatter"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="BasicTickFormatter",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("scientific_limit_low",function(){return Math.pow(10,this.get("power_limit_low"))},!0),this.add_dependencies("scientific_limit_low",this,["power_limit_low"]),this.register_property("scientific_limit_high",function(){return Math.pow(10,this.get("power_limit_high"))},!0),this.add_dependencies("scientific_limit_high",this,["power_limit_high"]),this.last_precision=3},e.prototype.format=function(t){var e,n,r,o,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w;if(0===t.length)return[];if(w=0,t.length>=2&&(w=Math.abs(t[1]-t[0])/1e4),c=!1,this.get("use_scientific"))for(r=0,l=t.length;l>r;r++)if(v=t[r],b=Math.abs(v),b>w&&(b>=this.get("scientific_limit_high")||b<=this.get("scientific_limit_low"))){c=!0;break}if(_=this.get("precision"),null==_||i.isNumber(_)){if(a=new Array(t.length),c)for(e=o=0,d=t.length;d>=0?d>o:o>d;e=d>=0?++o:--o)a[e]=t[e].toExponential(_||void 0);else for(e=s=0,f=t.length;f>=0?f>s:s>f;e=f>=0?++s:--s)a[e]=t[e].toFixed(_||void 0).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,"");return a}if("auto"===_)for(a=new Array(t.length),x=u=m=this.last_precision;15>=m?15>=u:u>=15;x=15>=m?++u:--u){if(n=!0,c){for(e=h=0,g=t.length;g>=0?g>h:h>g;e=g>=0?++h:--h)if(a[e]=t[e].toExponential(x),e>0&&a[e]===a[e-1]){n=!1;break}if(n)break}else{for(e=p=0,y=t.length;y>=0?y>p:p>y;e=y>=0?++p:--p)if(a[e]=t[e].toFixed(x).replace(/(\.[0-9]*?)0+$/,"$1").replace(/\.$/,""),e>0&&a[e]===a[e-1]){n=!1;break}if(n)break}if(n)return this.last_precision=x,a}return a},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{precision:"auto",use_scientific:!0,power_limit_high:5,power_limit_low:-3})},e}(o.Model),e.exports={Model:r}},{"./tick_formatter":"models/formatters/tick_formatter",underscore:"underscore"}],"models/formatters/categorical_tick_formatter":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=t("../formatters/tick_formatter"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type="CategoricalTickFormatter",e.prototype.format=function(t){return t},e}(o.Model),e.exports={Model:r}},{"../formatters/tick_formatter":"models/formatters/tick_formatter"}],"models/formatters/datetime_tick_formatter":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d=function(t,e){function n(){this.constructor=t}for(var r in e)f.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty;s=t("underscore"),o=t("sprintf"),_=t("timezone"),i=t("./tick_formatter"),p=t("../../common/logging").logger,c=function(t){return Math.round(t/1e3%1*1e6)},h=function(t){var e,n;return e=new Date(t),n=e.getFullYear(),e.getMonth()>=7&&(n+=1),o.sprintf("'%02d",n%100)},l=function(t){var e,n;return e=new Date(t),n=e.getFullYear(),e.getMonth()>=7&&(n+=1),o.sprintf("%d",n)},a=function(t){return _(t,"%Y %m %d %H %M %S").split(/\s+/).map(function(t){return parseInt(t,10)})},u=function(t,e){var n;return s.isFunction(e)?e(t):(n=o.sprintf("$1%06d",c(t)),e=e.replace(/((^|[^%])(%%)*)%f/,n),-1===e.indexOf("%")?e:_(t,e))},r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.type="DatetimeTickFormatter",e.prototype.format_order=["microseconds","milliseconds","seconds","minsec","minutes","hourmin","hours","days","months","years"],e.prototype._formats={microseconds:["%fus"],milliseconds:["%3Nms","%S.%3Ns"],seconds:["%Ss"],minsec:[":%M:%S"],minutes:[":%M","%Mm"],hourmin:["%H:%M"],hours:["%Hh","%H:%M"],days:["%m/%d","%a%d"],months:["%m/%Y","%b%y"],years:["%Y",h,l]},e.prototype.strip_leading_zeros=!0,e.prototype.initialize=function(t,n){var r,o,i,a,l,h,c,p;e.__super__.initialize.call(this,t,n),r=s.extend({},this._formats,this.get("formats")),l=_(new Date),this.formats={},h=[];for(o in r)a=r[o],c=function(){var t,e,n;for(n=[],t=0,e=a.length;e>t;t++)i=a[t],n.push(u(l,i).length);return n}(),p=s.sortBy(s.zip(c,a),function(t){var e,n;return n=t[0],e=t[1],n}),h.push(this.formats[o]=s.zip.apply(s,p));return h},e.prototype._get_resolution_str=function(t,e){var n,r;return n=1.1*t,r=.001>n?"microseconds":1>n?"milliseconds":60>n?e>=60?"minsec":"seconds":3600>n?e>=3600?"hourmin":"minutes":86400>n?"hours":2678400>n?"days":31536e3>n?"months":"years"},e.prototype.format=function(t,e,n,r,o){var i,l,h,c,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D;if(null==e&&(e=null),null==n&&(n=null),null==r&&(r=.3),null==o&&(o=null),0===t.length)return[];if(A=Math.abs(t[t.length-1]-t[0])/1e3,j=o?o.resolution:A/(t.length-1),P=this._get_resolution_str(j,A),T=this.formats[P],D=T[0],_=T[1],c=_[0],n){for(d=[],m=g=0,z=D.length;z>=0?z>g:g>z;m=z>=0?++g:--g)D[m]*t.length<r*n&&d.push(this.formats[m]);d.length>0&&(c=s.last(d))}for(b=[],S=this.format_order.indexOf(P),q={},E=this.format_order,y=0,x=E.length;x>y;y++)h=E[y],q[h]=0;for(q.seconds=5,q.minsec=4,q.minutes=4,q.hourmin=3,q.hours=3,v=0,w=t.length;w>v;v++){N=t[v];try{F=a(N),C=u(N,c)}catch(l){i=l,p.warn("unable to format tick for timestamp value "+N),p.warn(" - "+i),b.push("ERR");continue}for(f=!1,M=S;0===F[q[this.format_order[M]]]&&(M+=1,M!==this.format_order.length);){if(("minsec"===P||"hourmin"===P)&&!f){if("minsec"===P&&0===F[4]&&0!==F[5]||"hourmin"===P&&0===F[3]&&0!==F[4]){k=this.formats[this.format_order[S-1]][1][0],C=u(N,k);break}f=!0}k=this.formats[this.format_order[M]][1][0],C=u(N,k)}this.strip_leading_zeros?(O=C.replace(/^0+/g,""),O!==C&&isNaN(parseInt(O))&&(O="0"+O),b.push(O)):b.push(C)}return b},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{formats:{}})},e}(i.Model),e.exports={Model:r}},{"../../common/logging":"common/logging","./tick_formatter":"models/formatters/tick_formatter",sprintf:"sprintf",timezone:"timezone/index",underscore:"underscore"}],"models/formatters/log_tick_formatter":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),a=t("../../common/logging").logger,i=t("./tick_formatter"),r=t("./basic_tick_formatter"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="LogTickFormatter",e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{ticker:null})},e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.basic_formatter=new r.Model,null==this.get("ticker")?a.warn("LogTickFormatter not configured with a ticker, using default base of 10 (labels will be incorrect if ticker base is not 10)"):void 0},e.prototype.format=function(t){var e,n,r,o,i,s;if(0===t.length)return[];for(e=null!=this.get("ticker")?this.get("ticker").get("base"):10,s=!1,o=new Array(t.length),n=r=0,i=t.length;i>=0?i>r:r>i;n=i>=0?++r:--r)if(o[n]=e+"^"+Math.round(Math.log(t[n])/Math.log(e)),n>0&&o[n]===o[n-1]){s=!0;break}return s&&(o=this.basic_formatter.format(t)),o},e}(i.Model),e.exports={Model:o}},{"../../common/logging":"common/logging","./basic_tick_formatter":"models/formatters/basic_tick_formatter","./tick_formatter":"models/formatters/tick_formatter",underscore:"underscore"}],"models/formatters/numeral_tick_formatter":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("numeral"),i=t("./tick_formatter"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="NumeralTickFormatter",e.prototype.format=function(t){var e,n,o,i,s;return e=this.get("format"),o=this.get("language"),i=function(){switch(this.get("rounding")){case"round":case"nearest":return Math.round;case"floor":case"rounddown":return Math.floor;case"ceil":case"roundup":return Math.ceil}}.call(this),n=function(){var n,a,l;for(l=[],n=0,a=t.length;a>n;n++)s=t[n],l.push(r.format(s,e,o,i));return l}()},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{format:"0,0",language:"en",rounding:"round"})},e}(i.Model),e.exports={Model:o}},{"./tick_formatter":"models/formatters/tick_formatter",numeral:"numeral",underscore:"underscore"}],"models/formatters/printf_tick_formatter":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),o=t("sprintf"),i=t("./tick_formatter"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="PrintfTickFormatter",e.prototype.format=function(t){var e,n,r;return e=this.get("format"),n=function(){var n,i,s;for(s=[],n=0,i=t.length;i>n;n++)r=t[n],s.push(o.sprintf(e,r));return s}()},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{format:"%s"})},e}(i.Model),e.exports={Model:r}},{"./tick_formatter":"models/formatters/tick_formatter",sprintf:"sprintf",underscore:"underscore"}],"models/formatters/tick_formatter":[function(t,e,n){
6 var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("../../model"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="TickFormatter",e}(r),e.exports={Model:o}},{"../../model":"model",underscore:"underscore"}],"models/glyphs/annular_wedge":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),l=t("../../common/mathutils"),i=t("./glyph"),a=t("../../common/hittest"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){var t,e,n,r;for("data"===this.distances.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xmapper,this.x,this.inner_radius):this.sinner_radius=this.inner_radius,"data"===this.distances.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xmapper,this.x,this.outer_radius):this.souter_radius=this.outer_radius,this.angle=new Float32Array(this.start_angle.length),r=[],t=e=0,n=this.start_angle.length;n>=0?n>e:e>n;t=n>=0?++e:--e)r.push(this.angle[t]=this.end_angle[t]-this.start_angle[t]);return r},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_;for(p=n.sx,_=n.sy,c=n.start_angle,r=n.angle,u=n.sinner_radius,h=n.souter_radius,o=n.direction,l=[],s=0,a=e.length;a>s;s++)i=e[s],isNaN(p[i]+_[i]+u[i]+h[i]+c[i]+r[i]+o[i])||(t.translate(p[i],_[i]),t.rotate(this.start_angle[i]),t.moveTo(h[i],0),t.beginPath(),t.arc(0,0,h[i],0,r[i],o[i]),t.rotate(this.angle[i]),t.lineTo(u[i],0),t.arc(0,0,u[i],0,-r[i],!o[i]),t.closePath(),t.rotate(-r[i]-c[i]),t.translate(-p[i],-_[i]),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,i),t.fill()),this.visuals.line.do_stroke?(this.visuals.line.set_vectorize(t,i),l.push(t.stroke())):l.push(void 0));return l},e.prototype._hit_point=function(t){var e,n,r,o,i,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D,I,R;for(m=[t.vx,t.vy],E=m[0],C=m[1],N=this.renderer.xmapper.map_from_target(E,!0),D=this.renderer.ymapper.map_from_target(C,!0),"data"===this.distances.outer_radius.units?(q=N-this.max_outer_radius,F=N+this.max_outer_radius,I=D-this.max_outer_radius,R=D+this.max_outer_radius):(P=E-this.max_outer_radius,S=E+this.max_outer_radius,g=this.renderer.xmapper.v_map_from_target([P,S],!0),q=g[0],F=g[1],A=C-this.max_outer_radius,O=C+this.max_outer_radius,y=this.renderer.ymapper.v_map_from_target([A,O],!0),I=y[0],R=y[1]),n=[],v=function(){var t,e,n,r;for(n=this.index.search([q,I,F,R]),r=[],t=0,e=n.length;e>t;t++)f=n[t],r.push(f[4].i);return r}.call(this),h=0,p=v.length;p>h;h++)i=v[h],d=Math.pow(this.souter_radius[i],2),u=Math.pow(this.sinner_radius[i],2),k=this.renderer.xmapper.map_to_target(N,!0),M=this.renderer.xmapper.map_to_target(this.x[i],!0),T=this.renderer.ymapper.map_to_target(D,!0),z=this.renderer.ymapper.map_to_target(this.y[i],!0),r=Math.pow(k-M,2)+Math.pow(T-z,2),d>=r&&r>=u&&n.push([i,r]);for(o=[],c=0,_=n.length;_>c;c++)b=n[c],i=b[0],r=b[1],w=this.renderer.plot_view.canvas.vx_to_sx(E),j=this.renderer.plot_view.canvas.vy_to_sy(C),e=Math.atan2(j-this.sy[i],w-this.sx[i]),l.angle_between(-e,-this.start_angle[i],-this.end_angle[i],this.direction[i])&&o.push([i,r]);return x=a.create_hit_test_result(),x["1d"].indices=s.chain(o).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value(),x},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_area_legend(t,e,n,r,o)},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=o,e.prototype.type="AnnularWedge",e.prototype.distances=["inner_radius","outer_radius"],e.prototype.angles=["start_angle","end_angle"],e.prototype.fields=["direction:direction"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{direction:"anticlock"})},e}(i.Model),e.exports={Model:r,View:o}},{"../../common/hittest":"common/hittest","../../common/mathutils":"common/mathutils","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/annulus":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),i=t("./glyph"),a=t("../../common/hittest"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){return"data"===this.distances.inner_radius.units?this.sinner_radius=this.sdist(this.renderer.xmapper,this.x,this.inner_radius):this.sinner_radius=this.inner_radius,"data"===this.distances.outer_radius.units?this.souter_radius=this.sdist(this.renderer.xmapper,this.x,this.outer_radius):this.souter_radius=this.outer_radius},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f;for(d=n.sx,f=n.sy,p=n.sinner_radius,_=n.souter_radius,c=[],s=0,l=e.length;l>s;s++)if(o=e[s],!isNaN(d[o]+f[o]+p[o]+_[o])){if(i=navigator.userAgent.indexOf("MSIE")>=0||navigator.userAgent.indexOf("Trident")>0||navigator.userAgent.indexOf("Edge")>0,this.visuals.fill.do_fill){if(this.visuals.fill.set_vectorize(t,o),t.beginPath(),i)for(h=[!1,!0],a=0,u=h.length;u>a;a++)r=h[a],t.arc(d[o],f[o],p[o],0,Math.PI,r),t.arc(d[o],f[o],_[o],Math.PI,0,!r);else t.arc(d[o],f[o],p[o],0,2*Math.PI,!0),t.arc(d[o],f[o],_[o],2*Math.PI,0,!1);t.fill()}this.visuals.line.do_stroke?(this.visuals.line.set_vectorize(t,o),t.beginPath(),t.arc(d[o],f[o],p[o],0,2*Math.PI),t.moveTo(d[o]+_[o],f[o]),t.arc(d[o],f[o],_[o],0,2*Math.PI),c.push(t.stroke())):c.push(void 0)}return c},e.prototype._hit_point=function(t){var e,n,r,o,i,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j;for(c=[t.vx,t.vy],y=c[0],v=c[1],b=this.renderer.xmapper.map_from_target(y,!0),x=b-this.max_radius,w=b+this.max_radius,k=this.renderer.ymapper.map_from_target(v,!0),M=k-this.max_radius,j=k+this.max_radius,n=[],p=function(){var t,e,n,r;for(n=this.index.search([x,M,w,j]),r=[],t=0,e=n.length;e>t;t++)h=n[t],r.push(h[4].i);return r}.call(this),i=0,l=p.length;l>i;i++)r=p[i],u=Math.pow(this.souter_radius[r],2),o=Math.pow(this.sinner_radius[r],2),d=this.renderer.xmapper.map_to_target(b),f=this.renderer.xmapper.map_to_target(this.x[r]),m=this.renderer.ymapper.map_to_target(k),g=this.renderer.ymapper.map_to_target(this.y[r]),e=Math.pow(d-f,2)+Math.pow(m-g,2),u>=e&&e>=o&&n.push([r,e]);return _=a.create_hit_test_result(),_["1d"].indices=s.chain(n).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value(),_},e.prototype.draw_legend=function(t,e,n,r,o){var i,s,a,l,u,h,c,p,_;return u=null!=(l=this.get_reference_point())?l:0,s=[u],p={},p[u]=(e+n)/2,_={},_[u]=(r+o)/2,a=.5*Math.min(Math.abs(n-e),Math.abs(o-r)),h={},h[u]=.4*a,c={},c[u]=.8*a,i={sx:p,sy:_,sinner_radius:h,souter_radius:c},this._render(t,s,i)},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=o,e.prototype.type="Annulus",e.prototype.distances=["inner_radius","outer_radius"],e}(i.Model),e.exports={Model:r,View:o}},{"../../common/hittest":"common/hittest","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/arc":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./glyph"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){return"data"===this.distances.radius.units?this.sradius=this.sdist(this.renderer.xmapper,this.x,this.radius):this.sradius=this.radius},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;if(c=n.sx,p=n.sy,u=n.sradius,h=n.start_angle,o=n.end_angle,r=n.direction,this.visuals.line.do_stroke){for(l=[],s=0,a=e.length;a>s;s++)i=e[s],isNaN(c[i]+p[i]+u[i]+h[i]+o[i]+r[i])||(t.beginPath(),t.arc(c[i],p[i],u[i],h[i],o[i],r[i]),this.visuals.line.set_vectorize(t,i),l.push(t.stroke()));return l}},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_line_legend(t,e,n,r,o)},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="Arc",e.prototype.visuals=["line"],e.prototype.distances=["radius"],e.prototype.angles=["start_angle","end_angle"],e.prototype.fields=["direction:direction"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{direction:"anticlock"})},e}(i.Model),e.exports={Model:r,View:o}},{"./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/bezier":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),l=t("rbush"),i=t("./glyph"),a=function(t,e,n,r,o,i,s,a){var l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M;for(w=[],c=[[],[]],_=m=0;2>=m;_=++m)if(0===_?(u=6*t-12*n+6*o,l=-3*t+9*n-9*o+3*s,p=3*n-3*t):(u=6*e-12*r+6*i,l=-3*e+9*r-9*i+3*a,p=3*r-3*e),Math.abs(l)<1e-12){if(Math.abs(u)<1e-12)continue;v=-p/u,v>0&&1>v&&w.push(v)}else h=u*u-4*p*l,y=Math.sqrt(h),0>h||(b=(-u+y)/(2*l),b>0&&1>b&&w.push(b),x=(-u-y)/(2*l),x>0&&1>x&&w.push(x));for(d=w.length,f=d;d--;)v=w[d],g=1-v,k=g*g*g*t+3*g*g*v*n+3*g*v*v*o+v*v*v*s,c[0][d]=k,M=g*g*g*e+3*g*g*v*r+3*g*v*v*i+v*v*v*a,c[1][d]=M;return c[0][f]=t,c[1][f]=e,c[0][f+1]=s,c[1][f+1]=a,[Math.min.apply(null,c[0]),Math.max.apply(null,c[1]),Math.max.apply(null,c[0]),Math.min.apply(null,c[1])]},o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._index_data=function(){var t,e,n,r,o,i,s,u,h,c;for(e=l(),r=[],t=n=0,o=this.x0.length;o>=0?o>n:n>o;t=o>=0?++n:--n)isNaN(this.x0[t]+this.x1[t]+this.y0[t]+this.y1[t]+this.cx0[t]+this.cy0[t]+this.cx1[t]+this.cy1[t])||(i=a(this.x0[t],this.y0[t],this.x1[t],this.y1[t],this.cx0[t],this.cy0[t],this.cx1[t],this.cy1[t]),s=i[0],h=i[1],u=i[2],c=i[3],r.push([s,h,u,c,{i:t}]));return e.load(r),e},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f;if(p=n.sx0,d=n.sy0,_=n.sx1,f=n.sy1,a=n.scx,l=n.scx0,h=n.scy0,u=n.scx1,c=n.scy1,this.visuals.line.do_stroke){for(s=[],o=0,i=e.length;i>o;o++)r=e[o],isNaN(p[r]+d[r]+_[r]+f[r]+l[r]+h[r]+u[r]+c[r])||(t.beginPath(),t.moveTo(p[r],d[r]),t.bezierCurveTo(l[r],h[r],u[r],c[r],_[r],f[r]),this.visuals.line.set_vectorize(t,r),s.push(t.stroke()));return s}},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_line_legend(t,e,n,r,o)},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=o,e.prototype.type="Bezier",e.prototype.visuals=["line"],e.prototype.coords=[["x0","y0"],["x1","y1"],["cx0","cy0"],["cx1","cy1"]],e}(i.Model),e.exports={Model:r,View:o}},{"./glyph":"models/glyphs/glyph",rbush:"rbush",underscore:"underscore"}],"models/glyphs/bokehgl":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g=function(t,e){function n(){this.constructor=t}for(var r in e)y.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},y={}.hasOwnProperty;f=t("gloo2"),c=t("../../common/color"),p=c.color2rgba,m=function(t){return 2>t&&(t=Math.sqrt(2*t)),t},_=function(t,e){var n,r,o,i;for(n=new Float32Array(t),r=o=0,i=t;i>=0?i>o:o>i;r=i>=0?++o:--o)n[r]=e;return n},d=function(t,e,n){var r,o,i,s,a,l,u;for(r=new Float32Array(t*e),o=s=0,l=t;l>=0?l>s:s>l;o=l>=0?++s:--s)for(i=a=0,u=e;u>=0?u>a:a>u;i=u>=0?++a:--a)r[o*e+i]=n[i];return r},h=function(t,e,n,r,o,i){var s;return e.used=!0,null!=o[i].fixed_value?(t.set_attribute(n,"float",null,o[i].fixed_value),e.used=!1):(s=new Float32Array(o.cache[i+"_array"]),e.set_size(4*r),e.set_data(0,s),t.set_attribute(n,"float",[e,0,0])),s},u=function(t,e,n,r,o){var i,s,a,l,u,h,c,d,f,m,g;if(c=4,e.used=!0,null!=o.color.fixed_value&&null!=o.alpha.fixed_value)g=p(o.color.fixed_value,o.alpha.fixed_value),t.set_attribute(n,"vec4",null,g),e.used=!1;else{for(a=null!=o.color.fixed_value?function(){var t,e,n;for(n=[],l=t=0,e=r;e>=0?e>t:t>e;l=e>=0?++t:--t)n.push(o.color.fixed_value);return n}():o.cache.color_array,s=null!=o.alpha.fixed_value?_(r,o.alpha.fixed_value):o.cache.alpha_array,i=new Float32Array(r*c),l=h=0,f=r;f>=0?f>h:h>f;l=f>=0?++h:--h)for(g=p(a[l],s[l]),u=d=0,m=c;m>=0?m>d:d>m;u=m>=0?++d:--d)i[l*c+u]=g[u];e.set_size(r*c*4),e.set_data(0,i),t.set_attribute(n,"vec4",[e,0,0])}return i},i=function(){function t(t){this._atlas={},this._index=0,this._width=256,this._height=256,this.tex=new f.Texture2D(t),this.tex.set_wrapping(t.REPEAT,t.REPEAT),this.tex.set_interpolation(t.NEAREST,t.NEAREST),this.tex.set_size([this._height,this._width],t.RGBA),this.get_atlas_data([1])}return t.prototype.get_atlas_data=function(t){var e,n,r,o,i,s;return r=t.join("-"),n=this._atlas[r],void 0===n&&(i=this.make_pattern(t),e=i[0],o=i[1],this.tex.set_data([this._index,0],[1,this._width],new Uint8Array(function(){var t,n,r;for(r=[],t=0,n=e.length;n>t;t++)s=e[t],r.push(s+10);return r}())),this._atlas[r]=[this._index/this._height,o],this._index+=1),this._atlas[r]},t.prototype.make_pattern=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j;for(t.length>1&&t.length%2&&(t=t.concat(t)),m=0,p=0,_=t.length;_>p;p++)w=t[p],m+=w;for(e=[],i=0,u=f=0,v=t.length+2;v>f;u=f+=2)r=Math.max(1e-4,t[u%t.length]),o=Math.max(1e-4,t[(u+1)%t.length]),e.push.apply(e,[i,i+r]),i+=r+o;for(d=this._width,n=new Float32Array(4*d),u=g=0,b=d;b>=0?b>g:g>b;u=b>=0?++g:--g){for(j=m*u/(d-1),h=0,M=1e16,c=y=0,x=e.length;x>=0?x>y:y>x;c=x>=0?++y:--y)k=Math.abs(e[c]-j),M>k&&(h=c,M=k);h%2===0?(l=j<=e[h]?1:0,a=e[h],s=e[h+1]):(l=j>e[h]?-1:0,a=e[h-1],s=e[h]),n[4*u+0]=e[h],n[4*u+1]=l,n[4*u+2]=a,n[4*u+3]=s}return[n,m]},t}(),r=function(){function t(t,e){this.gl=t,this.glyph=e,this.nvertices=0,this.size_changed=!1,this.data_changed=!1,this.visuals_changed=!1,this.init()}return t.prototype.GLYPH="",t.prototype.VERT="",t.prototype.FRAG="",t.prototype.set_data_changed=function(t){return t!==this.nvertices&&(this.nvertices=t,this.size_changed=!0),this.data_changed=!0},t.prototype.set_visuals_changed=function(){return this.visuals_changed=!0},t}(),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return g(e,t),e.prototype.GLYPH="line",e.prototype.JOINS={miter:0,round:1,bevel:2},e.prototype.CAPS={"":0,none:0,".":0,round:1,")":1,"(":1,o:1,"triangle in":2,"<":2,"triangle out":3,">":3,square:4,"[":4,"]":4,"=":4,butt:5,"|":5},e.prototype.VERT="precision mediump float;\n\nconst float PI = 3.14159265358979323846264;\nconst float THETA = 15.0 * 3.14159265358979323846264/180.0;\n\nuniform vec2 u_canvas_size, u_offset;\nuniform vec2 u_scale_aspect;\nuniform float u_scale_length;\n \nuniform vec4 u_color;\nuniform float u_antialias;\nuniform float u_length;\nuniform float u_linewidth;\nuniform float u_dash_index;\nuniform float u_closed;\n\nattribute vec2 a_position;\nattribute vec4 a_tangents;\nattribute vec2 a_segment;\nattribute vec2 a_angles;\nattribute vec2 a_texcoord;\n\nvarying vec4 v_color;\nvarying vec2 v_segment;\nvarying vec2 v_angles;\nvarying vec2 v_texcoord;\nvarying vec2 v_miter;\nvarying float v_length;\nvarying float v_linewidth;\n\nfloat cross(in vec2 v1, in vec2 v2)\n{\n return v1.x*v2.y - v1.y*v2.x;\n}\n\nfloat signed_distance(in vec2 v1, in vec2 v2, in vec2 v3)\n{\n return cross(v2-v1,v1-v3) / length(v2-v1);\n}\n\nvoid rotate( in vec2 v, in float alpha, out vec2 result )\n{\n float c = cos(alpha);\n float s = sin(alpha);\n result = vec2( c*v.x - s*v.y,\n s*v.x + c*v.y );\n}\n\nvoid main()\n{ \n bool closed = (u_closed > 0.0);\n \n // Attributes and uniforms to varyings\n v_color = u_color;\n v_linewidth = u_linewidth;\n v_segment = a_segment * u_scale_length;\n v_length = u_length * u_scale_length;\n \n // Scale to map to pixel coordinates. The original algorithm from the paper\n // assumed isotropic scale. We obviously do not have this.\n vec2 abs_scale_aspect = abs(u_scale_aspect);\n vec2 abs_scale = u_scale_length * abs_scale_aspect;\n \n // Correct angles for aspect ratio\n vec2 av;\n av = vec2(1.0, tan(a_angles.x)) / abs_scale_aspect;\n v_angles.x = atan(av.y, av.x);\n av = vec2(1.0, tan(a_angles.y)) / abs_scale_aspect;\n v_angles.y = atan(av.y, av.x);\n \n // Thickness below 1 pixel are represented using a 1 pixel thickness\n // and a modified alpha\n v_color.a = min(v_linewidth, v_color.a);\n v_linewidth = max(v_linewidth, 1.0);\n \n // If color is fully transparent we just will discard the fragment anyway\n if( v_color.a <= 0.0 ) {\n gl_Position = vec4(0.0,0.0,0.0,1.0);\n return;\n }\n\n // This is the actual half width of the line\n float w = ceil(1.25*u_antialias+v_linewidth)/2.0;\n \n vec2 position = a_position * abs_scale;\n \n vec2 t1 = normalize(a_tangents.xy * abs_scale_aspect); // note the scaling for aspect ratio here\n vec2 t2 = normalize(a_tangents.zw * abs_scale_aspect);\n float u = a_texcoord.x;\n float v = a_texcoord.y;\n vec2 o1 = vec2( +t1.y, -t1.x);\n vec2 o2 = vec2( +t2.y, -t2.x);\n \n // This is a join\n // ----------------------------------------------------------------\n if( t1 != t2 ) {\n float angle = atan (t1.x*t2.y-t1.y*t2.x, t1.x*t2.x+t1.y*t2.y); // Angle needs recalculation for some reason\n vec2 t = normalize(t1+t2);\n vec2 o = vec2( + t.y, - t.x);\n\n if ( u_dash_index > 0.0 )\n {\n // Broken angle\n // ----------------------------------------------------------------\n if( (abs(angle) > THETA) ) {\n position += v * w * o / cos(angle/2.0);\n float s = sign(angle);\n if( angle < 0.0 ) {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n if( v == 1.0 ) {\n position -= 2.0 * w * t1 / sin(angle);\n u -= 2.0 * w / sin(angle);\n }\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n if( v == 1.0 ) {\n position += 2.0 * w * t2 / sin(angle);\n u += 2.0*w / sin(angle);\n }\n }\n } else {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n if( v == -1.0 ) {\n position += 2.0 * w * t1 / sin(angle);\n u += 2.0 * w / sin(angle);\n }\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n if( v == -1.0 ) {\n position -= 2.0 * w * t2 / sin(angle);\n u -= 2.0*w / sin(angle);\n }\n }\n }\n // Continuous angle\n // ------------------------------------------------------------\n } else {\n position += v * w * o / cos(angle/2.0);\n if( u == +1.0 ) u = v_segment.y;\n else u = v_segment.x;\n }\n }\n\n // Solid line\n // --------------------------------------------------------------------\n else\n {\n position.xy += v * w * o / cos(angle/2.0);\n if( angle < 0.0 ) {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n }\n } else {\n if( u == +1.0 ) {\n u = v_segment.y + v * w * tan(angle/2.0);\n } else {\n u = v_segment.x - v * w * tan(angle/2.0);\n }\n }\n }\n\n // This is a line start or end (t1 == t2)\n // ------------------------------------------------------------------------\n } else {\n position += v * w * o1;\n if( u == -1.0 ) {\n u = v_segment.x - w;\n position -= w * t1;\n } else {\n u = v_segment.y + w;\n position += w * t2;\n }\n }\n\n // Miter distance\n // ------------------------------------------------------------------------\n vec2 t;\n vec2 curr = a_position * abs_scale;\n if( a_texcoord.x < 0.0 ) {\n vec2 next = curr + t2*(v_segment.y-v_segment.x);\n\n rotate( t1, +v_angles.x/2.0, t);\n v_miter.x = signed_distance(curr, curr+t, position);\n\n rotate( t2, +v_angles.y/2.0, t);\n v_miter.y = signed_distance(next, next+t, position);\n } else {\n vec2 prev = curr - t1*(v_segment.y-v_segment.x);\n\n rotate( t1, -v_angles.x/2.0,t);\n v_miter.x = signed_distance(prev, prev+t, position);\n\n rotate( t2, -v_angles.y/2.0,t);\n v_miter.y = signed_distance(curr, curr+t, position);\n }\n\n if (!closed && v_segment.x <= 0.0) {\n v_miter.x = 1e10;\n }\n if (!closed && v_segment.y >= v_length)\n {\n v_miter.y = 1e10;\n }\n \n v_texcoord = vec2( u, v*w );\n \n // Calculate position in device coordinates. Note that we \n // already scaled with abs scale above.\n vec2 normpos = position * sign(u_scale_aspect) + (u_offset - vec2(0.5, 0.5));\n normpos /= u_canvas_size; // in 0..1 \n gl_Position = vec4(normpos*2.0-1.0, 0.0, 1.0);\n gl_Position.y *= -1.0;\n}\n",e.prototype.FRAG_="// Fragment shader that can be convenient during debugging to show the line skeleton.\nprecision mediump float;\nuniform vec4 u_color;\nvoid main () {\n gl_FragColor = u_color;\n} ",e.prototype.FRAG="precision mediump float;\n \nconst float PI = 3.14159265358979323846264;\nconst float THETA = 15.0 * 3.14159265358979323846264/180.0;\n\nuniform sampler2D u_dash_atlas;\n\nuniform vec2 u_linecaps;\nuniform float u_miter_limit;\nuniform float u_linejoin;\nuniform float u_antialias;\nuniform float u_dash_phase;\nuniform float u_dash_period;\nuniform float u_dash_index;\nuniform vec2 u_dash_caps;\nuniform float u_closed;\n\nvarying vec4 v_color;\nvarying vec2 v_segment;\nvarying vec2 v_angles;\nvarying vec2 v_texcoord;\nvarying vec2 v_miter;\nvarying float v_length;\nvarying float v_linewidth;\n\n// Compute distance to cap ----------------------------------------------------\nfloat cap( int type, float dx, float dy, float t )\n{\n float d = 0.0;\n dx = abs(dx);\n dy = abs(dy);\n \n if (type == 0) discard; // None\n else if (type == 1) d = sqrt(dx*dx+dy*dy); // Round\n else if (type == 3) d = (dx+abs(dy)); // Triangle in\n else if (type == 2) d = max(abs(dy),(t+dx-abs(dy))); // Triangle out\n else if (type == 4) d = max(dx,dy); // Square\n else if (type == 5) d = max(dx+t,dy); // Butt\n return d;\n}\n \n// Compute distance to join -------------------------------------------------\nfloat join( in int type, in float d, in vec2 segment, in vec2 texcoord, in vec2 miter,\n in float miter_limit, in float linewidth )\n{\n float dx = texcoord.x;\n // Round join\n if( type == 1 ) {\n if (dx < segment.x) {\n d = max(d,length( texcoord - vec2(segment.x,0.0)));\n //d = length( texcoord - vec2(segment.x,0.0));\n } else if (dx > segment.y) {\n d = max(d,length( texcoord - vec2(segment.y,0.0)));\n //d = length( texcoord - vec2(segment.y,0.0));\n }\n } \n // Bevel join\n else if ( type == 2 ) {\n if (dx < segment.x) {\n vec2 x= texcoord - vec2(segment.x,0.0);\n d = max(d, max(abs(x.x), abs(x.y)));\n \n } else if (dx > segment.y) {\n vec2 x = texcoord - vec2(segment.y,0.0);\n d = max(d, max(abs(x.x), abs(x.y)));\n }\n /* Original code for bevel which does not work for us\n if( (dx < segment.x) || (dx > segment.y) )\n d = max(d, min(abs(x.x),abs(x.y)));\n */\n } \n // Miter limit\n if( (dx < segment.x) || (dx > segment.y) ) {\n d = max(d, min(abs(miter.x),abs(miter.y)) - miter_limit*linewidth/2.0 );\n }\n return d;\n}\n\nvoid main() \n{\n // If color is fully transparent we just discard the fragment\n if( v_color.a <= 0.0 ) {\n discard;\n }\n\n // Test if dash pattern is the solid one (0)\n bool solid = (u_dash_index == 0.0);\n\n // Test if path is closed\n bool closed = (u_closed > 0.0);\n \n vec4 color = v_color;\n float dx = v_texcoord.x;\n float dy = v_texcoord.y;\n float t = v_linewidth/2.0-u_antialias;\n float width = 1.0; //v_linewidth; original code had dashes scale with line width, we do not\n float d = 0.0;\n \n vec2 linecaps = u_linecaps;\n vec2 dash_caps = u_dash_caps;\n float line_start = 0.0;\n float line_stop = v_length;\n \n // Solid line --------------------------------------------------------------\n if( solid ) {\n d = abs(dy);\n if( (!closed) && (dx < line_start) ) {\n d = cap( int(u_linecaps.x), abs(dx), abs(dy), t );\n }\n else if( (!closed) && (dx > line_stop) ) {\n d = cap( int(u_linecaps.y), abs(dx)-line_stop, abs(dy), t );\n }\n else {\n d = join( int(u_linejoin), abs(dy), v_segment, v_texcoord, v_miter, u_miter_limit, v_linewidth );\n }\n \n // Dash line --------------------------------------------------------------\n } else {\n float segment_start = v_segment.x;\n float segment_stop = v_segment.y;\n float segment_center= (segment_start+segment_stop)/2.0;\n float freq = u_dash_period*width;\n float u = mod( dx + u_dash_phase*width, freq);\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\n float dash_center= tex.x * width;\n float dash_type = tex.y;\n float _start = tex.z * width;\n float _stop = tex.a * width;\n float dash_start = dx - u + _start;\n float dash_stop = dx - u + _stop;\n \n // Compute extents of the first dash (the one relative to v_segment.x)\n // Note: this could be computed in the vertex shader\n if( (dash_stop < segment_start) && (dash_caps.x != 5.0) ) {\n float u = mod(segment_start + u_dash_phase*width, freq);\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\n dash_center= tex.x * width;\n //dash_type = tex.y;\n float _start = tex.z * width;\n float _stop = tex.a * width;\n dash_start = segment_start - u + _start;\n dash_stop = segment_start - u + _stop;\n }\n\n // Compute extents of the last dash (the one relatives to v_segment.y)\n // Note: This could be computed in the vertex shader\n else if( (dash_start > segment_stop) && (dash_caps.y != 5.0) ) {\n float u = mod(segment_stop + u_dash_phase*width, freq);\n vec4 tex = texture2D(u_dash_atlas, vec2(u/freq, u_dash_index)) * 255.0 -10.0; // conversion to int-like\n dash_center= tex.x * width;\n //dash_type = tex.y;\n float _start = tex.z * width;\n float _stop = tex.a * width;\n dash_start = segment_stop - u + _start;\n dash_stop = segment_stop - u + _stop; \n }\n\n // This test if the we are dealing with a discontinuous angle\n bool discontinuous = ((dx < segment_center) && abs(v_angles.x) > THETA) ||\n ((dx >= segment_center) && abs(v_angles.y) > THETA);\n //if( dx < line_start) discontinuous = false;\n //if( dx > line_stop) discontinuous = false;\n\n float d_join = join( int(u_linejoin), abs(dy),\n v_segment, v_texcoord, v_miter, u_miter_limit, v_linewidth );\n\n // When path is closed, we do not have room for linecaps, so we make room\n // by shortening the total length\n if (closed) {\n line_start += v_linewidth/2.0;\n line_stop -= v_linewidth/2.0;\n }\n\n // We also need to take antialias area into account\n //line_start += u_antialias;\n //line_stop -= u_antialias;\n\n // Check is dash stop is before line start\n if( dash_stop <= line_start ) {\n discard;\n }\n // Check is dash start is beyond line stop\n if( dash_start >= line_stop ) {\n discard;\n }\n\n // Check if current dash start is beyond segment stop\n if( discontinuous ) {\n // Dash start is beyond segment, we discard\n if( (dash_start > segment_stop) ) {\n discard;\n //gl_FragColor = vec4(1.0,0.0,0.0,.25); return;\n }\n \n // Dash stop is before segment, we discard\n if( (dash_stop < segment_start) ) {\n discard; //gl_FragColor = vec4(0.0,1.0,0.0,.25); return;\n }\n \n // Special case for round caps (nicer with this)\n if( dash_caps.x == 1.0 ) {\n if( (u > _stop) && (dash_stop > segment_stop ) && (abs(v_angles.y) < PI/2.0)) {\n discard;\n }\n }\n\n // Special case for round caps (nicer with this)\n if( dash_caps.y == 1.0 ) {\n if( (u < _start) && (dash_start < segment_start ) && (abs(v_angles.x) < PI/2.0)) {\n discard;\n }\n }\n\n // Special case for triangle caps (in & out) and square\n // We make sure the cap stop at crossing frontier\n if( (dash_caps.x != 1.0) && (dash_caps.x != 5.0) ) {\n if( (dash_start < segment_start ) && (abs(v_angles.x) < PI/2.0) ) {\n float a = v_angles.x/2.0;\n float x = (segment_start-dx)*cos(a) - dy*sin(a);\n float y = (segment_start-dx)*sin(a) + dy*cos(a);\n if( x > 0.0 ) discard;\n // We transform the cap into square to avoid holes\n dash_caps.x = 4.0;\n }\n }\n\n // Special case for triangle caps (in & out) and square\n // We make sure the cap stop at crossing frontier\n if( (dash_caps.y != 1.0) && (dash_caps.y != 5.0) ) {\n if( (dash_stop > segment_stop ) && (abs(v_angles.y) < PI/2.0) ) {\n float a = v_angles.y/2.0;\n float x = (dx-segment_stop)*cos(a) - dy*sin(a);\n float y = (dx-segment_stop)*sin(a) + dy*cos(a);\n if( x > 0.0 ) discard;\n // We transform the caps into square to avoid holes\n dash_caps.y = 4.0;\n }\n }\n }\n\n // Line cap at start\n if( (dx < line_start) && (dash_start < line_start) && (dash_stop > line_start) ) {\n d = cap( int(linecaps.x), dx-line_start, dy, t);\n }\n // Line cap at stop\n else if( (dx > line_stop) && (dash_stop > line_stop) && (dash_start < line_stop) ) {\n d = cap( int(linecaps.y), dx-line_stop, dy, t);\n }\n // Dash cap left - dash_type = -1, 0 or 1, but there may be roundoff errors\n else if( dash_type < -0.5 ) {\n d = cap( int(dash_caps.y), abs(u-dash_center), dy, t);\n if( (dx > line_start) && (dx < line_stop) )\n d = max(d,d_join);\n }\n // Dash cap right\n else if( dash_type > 0.5 ) {\n d = cap( int(dash_caps.x), abs(dash_center-u), dy, t);\n if( (dx > line_start) && (dx < line_stop) )\n d = max(d,d_join);\n }\n // Dash body (plain)\n else {// if( dash_type > -0.5 && dash_type < 0.5) {\n d = abs(dy);\n }\n\n // Line join\n if( (dx > line_start) && (dx < line_stop)) {\n if( (dx <= segment_start) && (dash_start <= segment_start)\n && (dash_stop >= segment_start) ) {\n d = d_join;\n // Antialias at outer border\n float angle = PI/2.+v_angles.x;\n float f = abs( (segment_start - dx)*cos(angle) - dy*sin(angle));\n d = max(f,d);\n }\n else if( (dx > segment_stop) && (dash_start <= segment_stop)\n && (dash_stop >= segment_stop) ) {\n d = d_join;\n // Antialias at outer border\n float angle = PI/2.+v_angles.y;\n float f = abs((dx - segment_stop)*cos(angle) - dy*sin(angle));\n d = max(f,d);\n }\n else if( dx < (segment_start - v_linewidth/2.)) {\n discard;\n }\n else if( dx > (segment_stop + v_linewidth/2.)) {\n discard;\n }\n }\n else if( dx < (segment_start - v_linewidth/2.)) {\n discard;\n }\n else if( dx > (segment_stop + v_linewidth/2.)) {\n discard;\n }\n }\n \n // Distance to border ------------------------------------------------------\n d = d - t;\n if( d < 0.0 ) {\n gl_FragColor = color;\n }\n else {\n d /= u_antialias;\n gl_FragColor = vec4(color.xyz, exp(-d*d)*color.a);\n }\n}",
7 e.prototype.init=function(){var t;return t=this.gl,this._scale_aspect=0,this.prog=new f.Program(t),this.prog.set_shaders(this.VERT,this.FRAG),this.index_buffer=new f.IndexBuffer(t),this.vbo_position=new f.VertexBuffer(t),this.vbo_tangents=new f.VertexBuffer(t),this.vbo_segment=new f.VertexBuffer(t),this.vbo_angles=new f.VertexBuffer(t),this.vbo_texcoord=new f.VertexBuffer(t),this.dash_atlas=new i(t)},e.prototype.draw=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b;if(this.data_changed&&(this._set_data(),this.data_changed=!1),this.visuals_changed&&(this._set_visuals(),this.visuals_changed=!1),g=n.sx,y=n.sy,m=Math.sqrt(g*g+y*y),g/=m,y/=m,Math.abs(this._scale_aspect-y/g)>Math.abs(.001*this._scale_aspect)&&(this._update_scale(g,y),this._scale_aspect=y/g),this.prog.set_attribute("a_position","vec2",[e.glglyph.vbo_position,0,0]),this.prog.set_attribute("a_tangents","vec4",[e.glglyph.vbo_tangents,0,0]),this.prog.set_attribute("a_segment","vec2",[e.glglyph.vbo_segment,0,0]),this.prog.set_attribute("a_angles","vec2",[e.glglyph.vbo_angles,0,0]),this.prog.set_attribute("a_texcoord","vec2",[e.glglyph.vbo_texcoord,0,0]),this.prog.set_uniform("u_length","float",[e.glglyph.cumsum]),this.prog.set_texture("u_dash_atlas",this.dash_atlas.tex),this.prog.set_uniform("u_canvas_size","vec2",[n.width,n.height]),this.prog.set_uniform("u_offset","vec2",[n.dx[0],n.dy[0]]),this.prog.set_uniform("u_scale_aspect","vec2",[g,y]),this.prog.set_uniform("u_scale_length","float",[m]),this.I_triangles.length<65535)return this.index_buffer.set_size(2*this.I_triangles.length),this.index_buffer.set_data(0,new Uint16Array(this.I_triangles)),this.prog.draw(this.gl.TRIANGLES,this.index_buffer);for(t=this.I_triangles,l=this.I_triangles.length,i=64008,o=[],s=a=0,p=Math.ceil(l/i);p>=0?p>a:a>p;s=p>=0?++a:--a)o.push([]);for(s=h=0,_=t.length;_>=0?_>h:h>_;s=_>=0?++h:--h)b=t[s]%i,r=Math.floor(t[s]/i),o[r].push(b);for(f=[],r=c=0,d=o.length;d>=0?d>c:c>d;r=d>=0?++c:--c)v=new Uint16Array(o[r]),u=r*i*4,0!==v.length&&(this.prog.set_attribute("a_position","vec2",[e.glglyph.vbo_position,0,2*u]),this.prog.set_attribute("a_tangents","vec4",[e.glglyph.vbo_tangents,0,4*u]),this.prog.set_attribute("a_segment","vec2",[e.glglyph.vbo_segment,0,2*u]),this.prog.set_attribute("a_angles","vec2",[e.glglyph.vbo_angles,0,2*u]),this.prog.set_attribute("a_texcoord","vec2",[e.glglyph.vbo_texcoord,0,2*u]),this.index_buffer.set_size(2*v.length),this.index_buffer.set_data(0,v),f.push(this.prog.draw(this.gl.TRIANGLES,this.index_buffer)));return f},e.prototype._set_data=function(){return this._bake(),this.vbo_position.set_size(4*this.V_position.length),this.vbo_position.set_data(0,this.V_position),this.vbo_tangents.set_size(4*this.V_tangents.length),this.vbo_tangents.set_data(0,this.V_tangents),this.vbo_angles.set_size(4*this.V_angles.length),this.vbo_angles.set_data(0,this.V_angles),this.vbo_texcoord.set_size(4*this.V_texcoord.length),this.vbo_texcoord.set_data(0,this.V_texcoord)},e.prototype._set_visuals=function(){var t,e,n,r,o,i;return window.X=this,c=p(this.glyph.visuals.line.color.value(),this.glyph.visuals.line.alpha.value()),t=this.CAPS[this.glyph.visuals.line.cap.value()],o=this.JOINS[this.glyph.visuals.line.join.value()],this.prog.set_uniform("u_color","vec4",c),this.prog.set_uniform("u_linewidth","float",[this.glyph.visuals.line.width.value()]),this.prog.set_uniform("u_antialias","float",[.9]),this.prog.set_uniform("u_linecaps","vec2",[t,t]),this.prog.set_uniform("u_linejoin","float",[o]),this.prog.set_uniform("u_miter_limit","float",[10]),n=this.glyph.visuals.line.dash.value(),e=0,r=1,n.length&&(i=this.dash_atlas.get_atlas_data(n),e=i[0],r=i[1]),this.prog.set_uniform("u_dash_index","float",[e]),this.prog.set_uniform("u_dash_phase","float",[this.glyph.visuals.line.dash_offset.value()]),this.prog.set_uniform("u_dash_period","float",[r]),this.prog.set_uniform("u_dash_caps","vec2",[t,t]),this.prog.set_uniform("u_closed","float",[0])},e.prototype._bake=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D,I,R,B,L;for(w=this.nvertices,_=new Float32Array(this.glyph.x),d=new Float32Array(this.glyph.y),i=c=new Float32Array(2*w),r=new Float32Array(2*w),a=p=new Float32Array(4*w),u=new Float32Array(2*w),g=b=0,E=w;E>=0?E>b:b>E;g=E>=0?++b:--b)i[2*g+0]=_[g],i[2*g+1]=d[g];for(this.tangents=n=new Float32Array(2*w-2),g=j=0,P=w-1;P>=0?P>j:j>P;g=P>=0?++j:--j)n[2*g+0]=c[2*(g+1)+0]-c[2*g+0],n[2*g+1]=c[2*(g+1)+1]-c[2*g+1];for(g=T=0,S=w-1;S>=0?S>T:T>S;g=S>=0?++T:--T)a[4*(g+1)+0]=n[2*g+0],a[4*(g+1)+1]=n[2*g+1],a[4*g+2]=n[2*g+0],a[4*g+3]=n[2*g+1];for(a[0]=n[0],a[1]=n[1],a[4*(w-1)+2]=n[2*(w-2)+0],a[4*(w-1)+3]=n[2*(w-2)+1],t=new Float32Array(w),g=z=0,C=w;C>=0?C>z:z>C;g=C>=0?++z:--z)t[g]=Math.atan2(p[4*g+0]*p[4*g+3]-p[4*g+1]*p[4*g+2],p[4*g+0]*p[4*g+2]+p[4*g+1]*p[4*g+3]);for(g=D=0,A=w-1;A>=0?A>D:D>A;g=A>=0?++D:--D)r[2*g+0]=t[g],r[2*g+1]=t[g+1];for(x=4*w-4,this.V_position=s=new Float32Array(2*x),this.V_angles=o=new Float32Array(2*x),this.V_tangents=l=new Float32Array(4*x),this.V_texcoord=h=new Float32Array(2*x),M=2,g=I=0,O=w;O>=0?O>I:I>O;g=O>=0?++I:--I)for(y=R=0;4>R;y=++R){for(v=B=0;2>B;v=++B)s[2*(4*g+y-M)+v]=i[2*g+v],o[2*(4*g+y)+v]=r[2*g+v];for(v=L=0;4>L;v=++L)l[4*(4*g+y-M)+v]=a[4*g+v]}for(g=f=0,N=w;N>=0?N>=f:f>=N;g=N>=0?++f:--f)h[2*(4*g+0)+0]=-1,h[2*(4*g+1)+0]=-1,h[2*(4*g+2)+0]=1,h[2*(4*g+3)+0]=1,h[2*(4*g+0)+1]=-1,h[2*(4*g+1)+1]=1,h[2*(4*g+2)+1]=-1,h[2*(4*g+3)+1]=1;for(k=6*(w-1),this.I_triangles=e=new Uint32Array(k),F=[],g=m=0,q=w;q>=0?q>m:m>q;g=q>=0?++m:--m)e[6*g+0]=0+4*g,e[6*g+1]=1+4*g,e[6*g+2]=3+4*g,e[6*g+3]=2+4*g,e[6*g+4]=0+4*g,F.push(e[6*g+5]=3+4*g);return F},e.prototype._update_scale=function(t,e){var n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v;for(p=this.nvertices,c=4*p-4,r=this.tangents,n=new Float32Array(p-1),o=new Float32Array(2*p),this.V_segment=i=new Float32Array(2*c),a=h=0,m=p-1;m>=0?m>h:h>m;a=m>=0?++h:--h)n[a]=Math.sqrt(Math.pow(r[2*a+0]*t,2)+Math.pow(r[2*a+1]*e,2));for(s=0,a=_=0,g=p-1;g>=0?g>_:_>g;a=g>=0?++_:--_)s+=n[a],o[2*(a+1)+0]=s,o[2*a+1]=s;for(a=d=0,y=p;y>=0?y>d:d>y;a=y>=0?++d:--d)for(l=f=0;4>f;l=++f)for(u=v=0;2>v;u=++v)i[2*(4*a+l)+u]=o[2*a+u];return this.cumsum=s,this.vbo_segment.set_size(4*this.V_segment.length),this.vbo_segment.set_data(0,this.V_segment)},e}(r),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return g(e,t),e.prototype.VERT="precision mediump float;\nconst float SQRT_2 = 1.4142135623730951;\n//\nuniform vec2 u_canvas_size;\nuniform vec2 u_offset;\nuniform vec2 u_scale;\nuniform float u_antialias;\n//\nattribute float a_x;\nattribute float a_y;\nattribute float a_size;\nattribute float a_angle; // in radians\nattribute float a_linewidth;\nattribute vec4 a_fg_color;\nattribute vec4 a_bg_color;\n//\nvarying float v_linewidth;\nvarying float v_size;\nvarying vec4 v_fg_color;\nvarying vec4 v_bg_color;\nvarying vec2 v_rotation;\n\nvoid main (void)\n{\n v_size = a_size;\n v_linewidth = a_linewidth;\n v_fg_color = a_fg_color;\n v_bg_color = a_bg_color;\n v_rotation = vec2(cos(-a_angle), sin(-a_angle));\n // Calculate position - the -0.5 is to correct for canvas origin\n vec2 pos = vec2(a_x, a_y) * u_scale + u_offset - vec2(0.5, 0.5); // in pixels\n pos /= u_canvas_size; // in 0..1\n gl_Position = vec4(pos*2.0-1.0, 0.0, 1.0);\n gl_Position.y *= -1.0; \n gl_PointSize = SQRT_2 * v_size + 2.0 * (a_linewidth + 1.5*u_antialias);\n}",e.prototype.FRAG="precision mediump float;\nconst float SQRT_2 = 1.4142135623730951;\nconst float PI = 3.14159265358979323846264;\n//\nuniform float u_antialias;\n//\nvarying vec4 v_fg_color;\nvarying vec4 v_bg_color;\nvarying float v_linewidth;\nvarying float v_size;\nvarying vec2 v_rotation;\n\nMARKERCODE\n\nvec4 outline(float distance, float linewidth, float antialias, vec4 fg_color, vec4 bg_color)\n{\n vec4 frag_color;\n float t = linewidth/2.0 - antialias;\n float signed_distance = distance;\n float border_distance = abs(signed_distance) - t;\n float alpha = border_distance/antialias;\n alpha = exp(-alpha*alpha);\n \n // If fg alpha is zero, it probably means no outline. To avoid a dark outline\n // shining through due to aa, we set the fg color to the bg color. Avoid if (i.e. branching).\n float select = float(bool(fg_color.a));\n fg_color.rgb = select * fg_color.rgb + (1.0 - select) * bg_color.rgb;\n // Similarly, if we want a transparent bg\n select = float(bool(bg_color.a));\n bg_color.rgb = select * bg_color.rgb + (1.0 - select) * fg_color.rgb;\n \n if( border_distance < 0.0)\n frag_color = fg_color;\n else if( signed_distance < 0.0 ) {\n frag_color = mix(bg_color, fg_color, sqrt(alpha));\n } else {\n if( abs(signed_distance) < (linewidth/2.0 + antialias) ) {\n frag_color = vec4(fg_color.rgb, fg_color.a * alpha);\n } else {\n discard;\n }\n }\n return frag_color;\n}\n\nvoid main()\n{\n vec2 P = gl_PointCoord.xy - vec2(0.5, 0.5);\n P = vec2(v_rotation.x*P.x - v_rotation.y*P.y,\n v_rotation.y*P.x + v_rotation.x*P.y);\n float point_size = SQRT_2*v_size + 2.0 * (v_linewidth + 1.5*u_antialias);\n float distance = marker(P*point_size, v_size);\n gl_FragColor = outline(distance, v_linewidth, u_antialias, v_fg_color, v_bg_color);\n //gl_FragColor.rgb *= gl_FragColor.a; // pre-multiply alpha\n}",e.prototype.MARKERCODE="<defined in subclasses>",e.prototype.init=function(){var t,e;return e=this.gl,t=this.FRAG.replace(/MARKERCODE/,this.MARKERCODE),this.last_trans={},this.prog=new f.Program(e),this.prog.set_shaders(this.VERT,t),this.vbo_x=new f.VertexBuffer(e),this.prog.set_attribute("a_x","float",[this.vbo_x,0,0]),this.vbo_y=new f.VertexBuffer(e),this.prog.set_attribute("a_y","float",[this.vbo_y,0,0]),this.vbo_s=new f.VertexBuffer(e),this.prog.set_attribute("a_size","float",[this.vbo_s,0,0]),this.vbo_a=new f.VertexBuffer(e),this.prog.set_attribute("a_angle","float",[this.vbo_a,0,0]),this.vbo_linewidth=new f.VertexBuffer(e),this.vbo_fg_color=new f.VertexBuffer(e),this.vbo_bg_color=new f.VertexBuffer(e),this.index_buffer=new f.IndexBuffer(e)},e.prototype.draw=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y;if(l=e.glglyph.nvertices,this.data_changed?(this._set_data(l),this.data_changed=!1):null==this.glyph.radius||n.sx===this.last_trans.sx&&n.sy===this.last_trans.sy||(this.last_trans=n,this.vbo_s.set_data(0,new Float32Array(function(){var t,e,n,r;for(n=this.glyph.sradius,r=[],t=0,e=n.length;e>t;t++)m=n[t],r.push(2*m);return r}.call(this)))),this.visuals_changed&&(this._set_visuals(l),this.visuals_changed=!1),this.prog.set_uniform("u_canvas_size","vec2",[n.width,n.height]),this.prog.set_uniform("u_offset","vec2",[n.dx[0],n.dy[0]]),this.prog.set_uniform("u_scale","vec2",[n.sx,n.sy]),this.prog.set_attribute("a_x","float",[e.glglyph.vbo_x,0,0]),this.prog.set_attribute("a_y","float",[e.glglyph.vbo_y,0,0]),this.prog.set_attribute("a_size","float",[e.glglyph.vbo_s,0,0]),this.prog.set_attribute("a_angle","float",[e.glglyph.vbo_a,0,0]),0!==t.length){if(t.length===l)return this.prog.draw(this.gl.POINTS,[0,l]);if(65535>l)return this.index_buffer.set_size(2*t.length),this.index_buffer.set_data(0,new Uint16Array(t)),this.prog.draw(this.gl.POINTS,this.index_buffer);for(i=64e3,o=[],s=a=0,p=Math.ceil(l/i);p>=0?p>a:a>p;s=p>=0?++a:--a)o.push([]);for(s=h=0,_=t.length;_>=0?_>h:h>_;s=_>=0?++h:--h)y=t[s]%i,r=Math.floor(t[s]/i),o[r].push(y);for(f=[],r=c=0,d=o.length;d>=0?d>c:c>d;r=d>=0?++c:--c)g=new Uint16Array(o[r]),u=r*i*4,0!==g.length&&(this.prog.set_attribute("a_x","float",[e.glglyph.vbo_x,0,u]),this.prog.set_attribute("a_y","float",[e.glglyph.vbo_y,0,u]),this.prog.set_attribute("a_size","float",[e.glglyph.vbo_s,0,u]),this.prog.set_attribute("a_angle","float",[e.glglyph.vbo_a,0,u]),this.vbo_linewidth.used&&this.prog.set_attribute("a_linewidth","float",[this.vbo_linewidth,0,u]),this.vbo_fg_color.used&&this.prog.set_attribute("a_fg_color","vec4",[this.vbo_fg_color,0,4*u]),this.vbo_bg_color.used&&this.prog.set_attribute("a_bg_color","vec4",[this.vbo_bg_color,0,4*u]),this.index_buffer.set_size(2*g.length),this.index_buffer.set_data(0,g),f.push(this.prog.draw(this.gl.POINTS,this.index_buffer)));return f}},e.prototype._set_data=function(t){var e,n;return e=4*t,this.vbo_x.set_size(e),this.vbo_y.set_size(e),this.vbo_a.set_size(e),this.vbo_s.set_size(e),this.vbo_x.set_data(0,new Float32Array(this.glyph.x)),this.vbo_y.set_data(0,new Float32Array(this.glyph.y)),null!=this.glyph.angle&&this.vbo_a.set_data(0,new Float32Array(this.glyph.angle)),null!=this.glyph.radius?this.vbo_s.set_data(0,new Float32Array(function(){var t,e,r,o;for(r=this.glyph.sradius,o=[],t=0,e=r.length;e>t;t++)n=r[t],o.push(2*n);return o}.call(this))):this.vbo_s.set_data(0,new Float32Array(this.glyph.size))},e.prototype._set_visuals=function(t){return h(this.prog,this.vbo_linewidth,"a_linewidth",t,this.glyph.visuals.line,"width"),u(this.prog,this.vbo_fg_color,"a_fg_color",t,this.glyph.visuals.line),u(this.prog,this.vbo_bg_color,"a_bg_color",t,this.glyph.visuals.fill),this.prog.set_uniform("u_antialias","float",[.9])},e}(r),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return g(e,t),e.prototype.GLYPH="circle",e.prototype.MARKERCODE="// --- disc\nfloat marker(vec2 P, float size)\n{\n return length(P) - size/2.0;\n}",e}(a),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return g(e,t),e.prototype.GLYPH="square",e.prototype.MARKERCODE="// --- square\nfloat marker(vec2 P, float size)\n{\n return max(abs(P.x), abs(P.y)) - size/2.0;\n}",e}(a),e.exports={CircleGLGlyph:o,SquareGLGlyph:l,LineGLGlyph:s}},{"../../common/color":"common/color",gloo2:"gloo2"}],"models/glyphs/circle":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),a=t("./bokehgl"),i=t("./glyph"),l=t("../../common/hittest"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._init_gl=function(t){return this.glglyph=new a.CircleGLGlyph(t,this)},e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){var t,e;return null!=this.radius?"data"===this.distances.radius.units?(t=this.fields.radius_dimension.fixed_value,this.sradius=this.sdist(this.renderer[t+"mapper"],this[t],this.radius)):(this.sradius=this.radius,this.max_size=2*this.max_radius):this.sradius=function(){var t,n,r,o;for(r=this.size,o=[],t=0,n=r.length;n>t;t++)e=r[t],o.push(e/2);return o}.call(this)},e.prototype._mask_data=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g;return e=this.renderer.plot_view.frame.get("h_range"),p=this.renderer.plot_view.frame.get("v_range"),null!=this.radius&&"data"===this.distances.radius.units?(l=e.get("start"),u=e.get("end"),n=this.renderer.xmapper.v_map_from_target([l,u],!0),d=n[0],f=n[1],d-=this.max_radius,f+=this.max_radius,h=p.get("start"),c=p.get("end"),r=this.renderer.ymapper.v_map_from_target([h,c],!0),m=r[0],g=r[1],m-=this.max_radius,g+=this.max_radius):(l=e.get("start")-this.max_size,u=e.get("end")+this.max_size,o=this.renderer.xmapper.v_map_from_target([l,u],!0),d=o[0],f=o[1],h=p.get("start")-this.max_size,c=p.get("end")+this.max_size,i=this.renderer.ymapper.v_map_from_target([h,c],!0),m=i[0],g=i[1]),d>f&&(s=[f,d],d=s[0],f=s[1]),m>g&&(a=[g,m],m=a[0],g=a[1]),function(){var t,e,n,r;for(n=this.index.search([d,m,f,g]),r=[],t=0,e=n.length;e>t;t++)_=n[t],r.push(_[4].i);return r}.call(this)},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u;for(l=n.sx,u=n.sy,a=n.sradius,s=[],o=0,i=e.length;i>o;o++)r=e[o],isNaN(l[r]+u[r]+a[r])||(t.beginPath(),t.arc(l[r],u[r],a[r],0,2*Math.PI,!1),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,r),t.fill()),this.visuals.line.do_stroke?(this.visuals.line.set_vectorize(t,r),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,n,r,o,i,a,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F;if(_=[t.vx,t.vy],j=_[0],E=_[1],C=this.renderer.xmapper.map_from_target(j,!0),N=this.renderer.ymapper.map_from_target(E,!0),null!=this.radius&&"data"===this.distances.radius.units?(A=C-this.max_radius,O=C+this.max_radius,q=N-this.max_radius,F=N+this.max_radius):(T=j-this.max_size,z=j+this.max_size,d=this.renderer.xmapper.v_map_from_target([T,z],!0),A=d[0],O=d[1],f=[Math.min(A,O),Math.max(A,O)],A=f[0],O=f[1],P=E-this.max_size,S=E+this.max_size,m=this.renderer.ymapper.v_map_from_target([P,S],!0),q=m[0],F=m[1],g=[Math.min(q,F),Math.max(q,F)],q=g[0],F=g[1]),e=function(){var t,e,n,r;for(n=this.index.search([A,q,O,F]),r=[],t=0,e=n.length;e>t;t++)c=n[t],r.push(c[4].i);return r}.call(this),r=[],null!=this.radius&&"data"===this.distances.radius.units)for(i=0,u=e.length;u>i;i++)o=e[i],p=Math.pow(this.sradius[o],2),b=this.renderer.xmapper.map_to_target(C,!0),x=this.renderer.xmapper.map_to_target(this.x[o],!0),k=this.renderer.ymapper.map_to_target(N,!0),M=this.renderer.ymapper.map_to_target(this.y[o],!0),n=Math.pow(b-x,2)+Math.pow(k-M,2),p>=n&&r.push([o,n]);else for(v=this.renderer.plot_view.canvas.vx_to_sx(j),w=this.renderer.plot_view.canvas.vy_to_sy(E),a=0,h=e.length;h>a;a++)o=e[a],p=Math.pow(this.sradius[o],2),n=Math.pow(this.sx[o]-v,2)+Math.pow(this.sy[o]-w,2),p>=n&&r.push([o,n]);return r=s.chain(r).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value(),y=l.create_hit_test_result(),y["1d"].indices=r,y},e.prototype._hit_span=function(t){var e,n,r,o,i,s,a,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k;return r=[t.vx,t.vy],c=r[0],d=r[1],o=this.bounds(),v=o[0],k=o[1],h=l.create_hit_test_result(),"h"===t.direction?(x=k[0],w=k[1],null!=this.radius&&"data"===this.distances.radius.units?(p=c-this.max_radius,_=c+this.max_radius,i=this.renderer.xmapper.v_map_from_target([p,_]),g=i[0],y=i[1]):(n=this.max_size/2,p=c-n,_=c+n,s=this.renderer.xmapper.v_map_from_target([p,_],!0),g=s[0],y=s[1])):(g=v[0],y=v[1],null!=this.radius&&"data"===this.distances.radius.units?(f=d-this.max_radius,m=d+this.max_radius,a=this.renderer.ymapper.v_map_from_target([f,m]),x=a[0],w=a[1]):(n=this.max_size/2,f=d-n,m=d+n,u=this.renderer.ymapper.v_map_from_target([f,m],!0),x=u[0],w=u[1])),e=function(){var t,e,n,r;for(n=this.index.search([g,x,y,w]),r=[],t=0,e=n.length;e>t;t++)b=n[t],r.push(b[4].i);return r}.call(this),h["1d"].indices=e,h},e.prototype._hit_rect=function(t){var e,n,r,o,i,s,a,u;return e=this.renderer.xmapper.v_map_from_target([t.vx0,t.vx1],!0),i=e[0],s=e[1],n=this.renderer.ymapper.v_map_from_target([t.vy0,t.vy1],!0),a=n[0],u=n[1],r=l.create_hit_test_result(),r["1d"].indices=function(){var t,e,n,r;for(n=this.index.search([i,a,s,u]),r=[],t=0,e=n.length;e>t;t++)o=n[t],r.push(o[4].i);return r}.call(this),r},e.prototype._hit_poly=function(t){var e,n,r,o,i,a,u,h,c,p,_,d,f;for(a=[s.clone(t.vx),s.clone(t.vy)],d=a[0],f=a[1],p=this.renderer.plot_view.canvas.v_vx_to_sx(d),_=this.renderer.plot_view.canvas.v_vy_to_sy(f),e=function(){c=[];for(var t=0,e=this.sx.length;e>=0?e>t:t>e;e>=0?t++:t--)c.push(t);return c}.apply(this),n=[],r=i=0,u=e.length;u>=0?u>i:i>u;r=u>=0?++i:--i)o=e[r],l.point_in_poly(this.sx[r],this.sy[r],p,_)&&n.push(o);return h=l.create_hit_test_result(),h["1d"].indices=n,h},e.prototype.draw_legend=function(t,e,n,r,o){var i,s,a,l,u,h,c;return l=null!=(a=this.get_reference_point())?a:0,s=[l],h={},h[l]=(e+n)/2,c={},c[l]=(r+o)/2,u={},u[l]=.2*Math.min(Math.abs(n-e),Math.abs(o-r)),i={sx:h,sy:c,sradius:u},this._render(t,s,i)},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=o,e.prototype.type="Circle",e.prototype.distances=["?radius","?size"],e.prototype.fields=["radius_dimension:string"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{size:{units:"screen",value:4},angle:{units:"rad",value:0},radius:null,radius_dimension:"x"})},e}(i.Model),e.exports={Model:r,View:o}},{"../../common/hittest":"common/hittest","./bokehgl":"models/glyphs/bokehgl","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/gear":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=t("underscore"),a=t("./glyph"),i=t("gear_utils"),r=t("../../util/bezier"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){return this.smodule=this.sdist(this.renderer.xmapper,this.x,this.module,"edge")},e.prototype._render=function(t,e,n){var r,o,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E;for(M=n.sx,j=n.sy,k=n.smodule,o=n.angle,T=n.teeth,d=n.pressure_angle,w=n.shaft_size,l=n.internal,h=0,p=e.length;p>h;h++)if(a=e[h],!isNaN(M[a]+j[a]+o[a]+k[a]+T[a]+d[a]+w[a]+l[a])){for(_=k[a]*T[a]/2,s=l[a]?i.create_internal_gear_tooth:i.create_gear_tooth,b=s(k[a],T[a],d[a]),f=b.slice(0,3),r=f[0],z=f[1],E=f[2],v=b.slice(3),t.save(),t.translate(M[a],j[a]),t.rotate(o[a]),t.beginPath(),y=2*Math.PI/T[a],t.moveTo(z,E),u=c=0,m=T[a];m>=0?m>c:c>m;u=m>=0?++c:--c)this._render_seq(t,v),t.rotate(y);t.closePath(),l[a]?(g=_+2.75*k[a],t.moveTo(g,0),t.arc(0,0,g,0,2*Math.PI,!0)):w[a]>0&&(x=_*w[a],t.moveTo(x,0),t.arc(0,0,x,0,2*Math.PI,!0)),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,a),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,a),t.stroke()),t.restore()}},e.prototype._render_seq=function(t,e){var n,o,i,s,a,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A;for(u=0;u<e.length;)switch(l.isString(e[u])&&(n=e[u],u+=1),n){case"M":f=e.slice(u,u+2),S=f[0],A=f[1],t.moveTo(S,A),m=[S,A],_=m[0],d=m[1],u+=2;break;case"L":y=e.slice(u,u+2),S=y[0],A=y[1],t.lineTo(S,A),v=[S,A],_=v[0],d=v[1],u+=2;break;case"C":b=e.slice(u,u+6),o=b[0],s=b[1],i=b[2],a=b[3],S=b[4],A=b[5],t.bezierCurveTo(o,s,i,a,S,A),x=[S,A],_=x[0],d=x[1],u+=6;break;case"Q":w=e.slice(u,u+4),o=w[0],s=w[1],S=w[2],A=w[3],t.quadraticCurveTo(o,s,S,A),k=[S,A],_=k[0],d=k[1],u+=4;break;case"A":for(M=e.slice(u,u+7),T=M[0],z=M[1],C=M[2],c=M[3],P=M[4],S=M[5],A=M[6],E=r.arc_to_bezier(_,d,T,z,-C,c,1-P,S,A),h=0,p=E.length;p>h;h++)j=E[h],o=j[0],s=j[1],i=j[2],a=j[3],S=j[4],A=j[5],t.bezierCurveTo(o,s,i,a,S,A);g=[S,A],_=g[0],d=g[1],u+=7;break;default:throw new Error("unexpected command: "+n)}},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_area_legend(t,e,n,r,o)},e}(a.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=s,e.prototype.type="Gear",e.prototype.angles=["angle"],e.prototype.fields=["module","internal:bool","pressure_angle","shaft_size","teeth"],e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{angle:0,pressure_angle:20,shaft_size:.3,internal:!1})},e}(a.Model),e.exports={Model:o,View:s}},{"../../util/bezier":"util/bezier","./glyph":"models/glyphs/glyph",gear_utils:"gear_utils",underscore:"underscore"}],"models/glyphs/glyph":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m=function(t,e){function n(){this.constructor=t}for(var r in e)g.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},g={}.hasOwnProperty;l=t("underscore"),d=t("rbush"),h=t("../../common/bbox"),c=t("../../common/logging").logger,u=t("../../common/mathutils").arrayMax,a=t("../../model"),o=t("../../common/continuum_view"),_=t("../../common/properties"),r=t("../mappers/categorical_mapper"),p=t("proj4"),f=p.defs("GOOGLE"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return m(e,t),e.prototype.initialize=function(t){var n,r,o,i,s;e.__super__.initialize.call(this,t),this.model.glyph_view=this,this.renderer=t.renderer,null!=(null!=(i=this.renderer)?i.plot_view:void 0)&&(n=this.renderer.plot_view.canvas_view.ctx,null!=n.glcanvas&&this._init_gl(n.glcanvas.gl)),s=_.factories;for(o in s)r=s[o],this[o]={},this[o]=l.extend(this[o],r(this.model));return this.warned={},this},e.prototype.render=function(t,e,n){if(this.mget("visible")){if(t.beginPath(),null!=this.glglyph&&this._render_gl(t,e,n))return;return this._render(t,e,n)}},e.prototype._render_gl=function(t,e,n){var r,o,i,s,a,l,u;return l=u=1,i=this.renderer.map_to_screen([0*l,1*l,2*l],[0*u,1*u,2*u]),r=i[0],o=i[1],l=100/Math.min(Math.max(Math.abs(r[1]-r[0]),1e-12),1e12),u=100/Math.min(Math.max(Math.abs(o[1]-o[0]),1e-12),1e12),s=this.renderer.map_to_screen([0*l,1*l,2*l],[0*u,1*u,2*u]),r=s[0],o=s[1],Math.abs(r[1]-r[0]-(r[2]-r[1]))>1e-6||Math.abs(o[1]-o[0]-(o[2]-o[1]))>1e-6?!1:(a={width:t.glcanvas.width,height:t.glcanvas.height,dx:r,dy:o,sx:(r[1]-r[0])/l,sy:(o[1]-o[0])/u},this.glglyph.draw(e,n,a),!0)},e.prototype.map_data=function(){var t,e,n,r,o,i,s,a,u,h,c,p,_,d,f,m,g;for(o=this.model.coords,e=0,r=o.length;r>e;e++)if(i=o[e],m=i[0],g=i[1],_="s"+m,f="s"+g,l.isArray(null!=(s=this[m])?s[0]:void 0))for(a=[[],[]],this[_]=a[0],this[f]=a[1],t=n=0,u=this[m].length;u>=0?u>n:n>u;t=u>=0?++n:--n)h=this.renderer.map_to_screen(this[m][t],this[g][t]),p=h[0],d=h[1],this[_].push(p),this[f].push(d);else c=this.renderer.map_to_screen(this[m],this[g]),this[_]=c[0],this[f]=c[1];return this._map_data()},e.prototype.project_xy=function(t,e){var n,r,o,i,s,a,l,u;for(i=[],a=[],n=r=0,l=t.length;l>=0?l>r:r>l;n=l>=0?++r:--r)u=p(f,[t[n],e[n]]),o=u[0],s=u[1],i[n]=o,a[n]=s;return[i,a]},e.prototype.project_xsys=function(t,e){var n,r,o,i,s,a,l,u;for(i=[],a=[],n=r=0,l=t.length;l>=0?l>r:r>l;n=l>=0?++r:--r)u=this.project_xy(t[n],e[n]),o=u[0],s=u[1],i[n]=o,a[n]=s;return[i,a]},e.prototype.set_data=function(t){var e,n,r,o,i,s,a,l;r=this.coords;for(e in r)n=r[e],this[e]=n.array(t);this.renderer.plot_model.use_map&&(null!=this.x&&(o=this.project_xy(this.x,this.y),this.x=o[0],this.y=o[1]),null!=this.xs&&(i=this.project_xsys(this.xs,this.ys),this.xs=i[0],this.ys=i[1])),s=this.angles;for(e in s)n=s[e],this[e]=n.array(t);a=this.distances;for(e in a)n=a[e],this[e]=n.array(t),this["max_"+e]=u(this[e]);l=this.fields;for(e in l)n=l[e],this[e]=n.array(t);return null!=this.glglyph&&this.glglyph.set_data_changed(this.x.length),this._set_data(),this.index=this._index_data()},e.prototype.set_visuals=function(t){var e,n,r;r=this.visuals;for(e in r)n=r[e],n.warm_cache(t);return null!=this.glglyph?this.glglyph.set_visuals_changed():void 0},e.prototype.bounds=function(){var t;return null==this.index?h.empty():(t=this.index.data.bbox,this._bounds([[t[0],t[2]],[t[1],t[3]]]))},e.prototype.scx=function(t){return this.sx[t]},e.prototype.scy=function(t){return this.sy[t]},e.prototype._init_gl=function(){return!1},e.prototype._set_data=function(){return null},e.prototype._map_data=function(){return null},e.prototype._mask_data=function(t){return t},e.prototype._bounds=function(t){return t},e.prototype._xy_index=function(){var t,e,n,o,i,s,a,l,u;for(e=d(),o=[],a=this.renderer.xmapper instanceof r.Model?this.renderer.xmapper.v_map_to_target(this.x,!0):this.x,u=this.renderer.ymapper instanceof r.Model?this.renderer.ymapper.v_map_to_target(this.y,!0):this.y,t=n=0,i=a.length;i>=0?i>n:n>i;t=i>=0?++n:--n)s=a[t],!isNaN(s)&&isFinite(s)&&(l=u[t],!isNaN(l)&&isFinite(l)&&o.push([s,l,s,l,{i:t}]));return e.load(o),e},e.prototype.sdist=function(t,e,n,r,o){var i,s,a,u,h,c,p;return null==r&&(r="edge"),null==o&&(o=!1),l.isString(e[0])&&(e=t.v_map_to_target(e)),"center"===r?(s=function(){var t,e,r;for(r=[],t=0,e=n.length;e>t;t++)i=n[t],r.push(i/2);return r}(),u=function(){var t,n,r;for(r=[],a=t=0,n=e.length;n>=0?n>t:t>n;a=n>=0?++t:--t)r.push(e[a]-s[a]);return r}(),h=function(){var t,n,r;for(r=[],a=t=0,n=e.length;n>=0?n>t:t>n;a=n>=0?++t:--t)r.push(e[a]+s[a]);return r}()):(u=e,h=function(){var t,e,r;for(r=[],a=t=0,e=u.length;e>=0?e>t:t>e;a=e>=0?++t:--t)r.push(u[a]+n[a]);return r}()),c=t.v_map_to_target(u),p=t.v_map_to_target(h),o?function(){var t,e,n;for(n=[],a=t=0,e=c.length;e>=0?e>t:t>e;a=e>=0?++t:--t)n.push(Math.ceil(Math.abs(p[a]-c[a])));return n}():function(){var t,e,n;for(n=[],a=t=0,e=c.length;e>=0?e>t:t>e;a=e>=0?++t:--t)n.push(Math.abs(p[a]-c[a]));return n}()},e.prototype.hit_test=function(t){var e,n;return n=null,e="_hit_"+t.type,null!=this[e]?n=this[e](t):null==this.warned[t.type]&&(c.error("'"+t.type+"' selection not available for "+this.model.type),this.warned[t.type]=!0),n},e.prototype.get_reference_point=function(){var t;return t=this.mget("reference_point"),l.isNumber(t)?this.data[t]:t},e.prototype.draw_legend=function(t,e,n,r,o){return null},e.prototype._generic_line_legend=function(t,e,n,r,o){var i,s;return s=null!=(i=this.get_reference_point())?i:0,t.save(),t.beginPath(),t.moveTo(e,(r+o)/2),t.lineTo(n,(r+o)/2),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,s),t.stroke()),t.restore()},e.prototype._generic_area_legend=function(t,e,n,r,o){var i,s,a,l,u,h,c,p,_,d,f;return h=null!=(u=this.get_reference_point())?u:0,l=[h],f=Math.abs(n-e),s=.1*f,a=Math.abs(o-r),i=.1*a,c=e+s,p=n-s,_=r+i,d=o-i,this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,h),t.fillRect(c,_,p-c,d-_)),this.visuals.line.do_stroke?(t.beginPath(),t.rect(c,_,p-c,d-_),this.visuals.line.set_vectorize(t,h),t.stroke()):void 0},e}(o),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return m(e,t),e.prototype.visuals=["line","fill"],e.prototype.coords=[["x","y"]],e.prototype.distances=[],e.prototype.angles=[],e.prototype.fields=[],e.prototype.fill_defaults={fill_color:"gray",fill_alpha:1},e.prototype.line_defaults={line_color:"black",line_width:1,line_alpha:1,line_join:"miter",line_cap:"butt",line_dash:[],line_dash_offset:0},e.prototype.text_defaults={text_font:"helvetica",text_font_size:"12pt",text_font_style:"normal",text_color:"#444444",text_alpha:1,text_align:"left",text_baseline:"bottom"},e.prototype.defaults=function(){var t,n,r,o,i,s;for(s=l.extend({},e.__super__.defaults.call(this),{visible:!0}),i=this.visuals,n=0,r=i.length;r>n;n++){switch(o=i[n]){case"line":t=this.line_defaults;break;case"fill":t=this.fill_defaults;break;case"text":t=this.text_defaults;break;default:c.warn("unknown visual property type '"+o+"'");continue}s=l.extend(s,t)}return s},e}(a),e.exports={Model:i,View:s}},{"../../common/bbox":"common/bbox","../../common/continuum_view":"common/continuum_view","../../common/logging":"common/logging","../../common/mathutils":"common/mathutils","../../common/properties":"common/properties","../../model":"model","../mappers/categorical_mapper":"models/mappers/categorical_mapper",proj4:"proj4",rbush:"rbush",underscore:"underscore"}],"models/glyphs/image":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;l=t("underscore"),r=t("../glyphs/glyph"),a=t("../mappers/linear_color_mapper"),o=t("../../palettes/palettes").Greys9,s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._set_data=function(){var t,e,n,r,o,i,s,a,u,h,c;for((null==this.image_data||this.image_data.length!==this.image.length)&&(this.image_data=new Array(this.image.length)),(null==this.width||this.width.length!==this.image.length)&&(this.width=new Array(this.image.length)),(null==this.height||this.height.length!==this.image.length)&&(this.height=new Array(this.image.length)),c=[],i=u=0,h=this.image.length;h>=0?h>u:u>h;i=h>=0?++u:--u)null!=this.rows?(this.height[i]=this.rows[i],this.width[i]=this.cols[i]):(this.height[i]=this.image[i].length,this.width[i]=this.image[i][0].length),n=document.createElement("canvas"),n.width=this.width[i],n.height=this.height[i],o=n.getContext("2d"),s=o.getImageData(0,0,this.width[i],this.height[i]),r=this.mget("color_mapper"),a=null!=this.rows?this.image[i]:l.flatten(this.image[i]),
8 t=r.v_map_screen(a),e=new Uint8ClampedArray(t),s.data.set(e),o.putImageData(s,0,0),this.image_data[i]=n,this.max_dw=0,"data"===this.dw.units&&(this.max_dw=l.max(this.dw)),this.max_dh=0,"data"===this.dh.units&&(this.max_dh=l.max(this.dh)),c.push(this._xy_index());return c},e.prototype._map_data=function(){return this.sw=this.sdist(this.renderer.xmapper,this.x,this.dw,"edge",this.mget("dilate")),this.sh=this.sdist(this.renderer.ymapper,this.y,this.dh,"edge",this.mget("dilate"))},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;for(o=n.image_data,h=n.sx,c=n.sy,u=n.sw,l=n.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),i=0,s=e.length;s>i;i++)r=e[i],null!=o[r]&&(isNaN(h[r]+c[r]+u[r]+l[r])||(p=c[r],t.translate(0,p),t.scale(1,-1),t.translate(0,-p),t.drawImage(o[r],0|h[r],0|c[r],u[r],l[r]),t.translate(0,p),t.scale(1,-1),t.translate(0,-p)));return t.setImageSmoothingEnabled(a)},e.prototype.bounds=function(){var t;return t=this.index.data.bbox,[[t[0],t[2]+this.max_dw],[t[1],t[3]+this.max_dh]]},e}(r.View),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=s,e.prototype.type="Image",e.prototype.visuals=[],e.prototype.distances=["dw","dh"],e.prototype.fields=["image:array","?rows","?cols"],e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{dilate:!1,color_mapper:new a.Model({palette:o})})},e}(r.Model),e.exports={Model:i,View:s}},{"../../palettes/palettes":"palettes/palettes","../glyphs/glyph":"models/glyphs/glyph","../mappers/linear_color_mapper":"models/mappers/linear_color_mapper",underscore:"underscore"}],"models/glyphs/image_rgba":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._set_data=function(t,e){var n,r,o,i,a,l,u,h,c,p,_,d,f,m;for((null==this.image_data||this.image_data.length!==this.image.length)&&(this.image_data=new Array(this.image.length)),(null==this.width||this.width.length!==this.image.length)&&(this.width=new Array(this.image.length)),(null==this.height||this.height.length!==this.image.length)&&(this.height=new Array(this.image.length)),m=[],u=p=0,d=this.image.length;d>=0?d>p:p>d;u=d>=0?++p:--p)if(null==e||u===e){if(null!=this.rows?(this.height[u]=this.rows[u],this.width[u]=this.cols[u]):(this.height[u]=this.image[u].length,this.width[u]=this.image[u][0].length),o=document.createElement("canvas"),o.width=this.width[u],o.height=this.height[u],a=o.getContext("2d"),h=a.getImageData(0,0,this.width[u],this.height[u]),null!=this.rows)h.data.set(new Uint8ClampedArray(this.image[u]));else{for(l=s.flatten(this.image[u]),n=new ArrayBuffer(4*l.length),i=new Uint32Array(n),c=_=0,f=l.length;f>=0?f>_:_>f;c=f>=0?++_:--_)i[c]=l[c];r=new Uint8ClampedArray(n),h.data.set(r)}a.putImageData(h,0,0),this.image_data[u]=o,this.max_dw=0,"data"===this.dw.units&&(this.max_dw=s.max(this.dw)),this.max_dh=0,"data"===this.dh.units?m.push(this.max_dh=s.max(this.dh)):m.push(void 0)}return m},e.prototype._map_data=function(){return this.sw=this.sdist(this.renderer.xmapper,this.x,this.dw,"edge",this.mget("dilate")),this.sh=this.sdist(this.renderer.ymapper,this.y,this.dh,"edge",this.mget("dilate"))},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;for(o=n.image_data,h=n.sx,c=n.sy,u=n.sw,l=n.sh,a=t.getImageSmoothingEnabled(),t.setImageSmoothingEnabled(!1),i=0,s=e.length;s>i;i++)r=e[i],isNaN(h[r]+c[r]+u[r]+l[r])||(p=c[r],t.translate(0,p),t.scale(1,-1),t.translate(0,-p),t.drawImage(o[r],0|h[r],0|c[r],u[r],l[r]),t.translate(0,p),t.scale(1,-1),t.translate(0,-p));return t.setImageSmoothingEnabled(a)},e.prototype.bounds=function(){var t;return t=this.index.data.bbox,[[t[0],t[2]+this.max_dw],[t[1],t[3]+this.max_dh]]},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="ImageRGBA",e.prototype.visuals=[],e.prototype.distances=["dw","dh"],e.prototype.fields=["image:array","?rows","?cols"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{dilate:!1,rows:null,cols:null})},e}(r.Model),e.exports={Model:o,View:i}},{"./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/image_url":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),a=t("../../common/logging").logger,i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this.model,"change:global_alpha",this.renderer.request_render)},e.prototype._index_data=function(){},e.prototype._set_data=function(){var t,e,n,r,o,i,s;for((null==this.image||this.image.length!==this.url.length)&&(this.image=function(){var t,n,r,o;for(r=this.url,o=[],t=0,n=r.length;n>t;t++)e=r[t],o.push(null);return o}.call(this)),i=this.mget("retry_attempts"),s=this.mget("retry_timeout"),this.retries=function(){var t,n,r,o;for(r=this.url,o=[],t=0,n=r.length;n>t;t++)e=r[t],o.push(i);return o}.call(this),o=[],t=n=0,r=this.url.length;r>=0?r>n:n>r;t=r>=0?++n:--n)e=new Image,e.onerror=function(t){return function(e,n){return function(){return t.retries[e]>0?(a.trace("ImageURL failed to load "+t.url[e]+" image, retrying in "+s+" ms"),setTimeout(function(){return n.src=t.url[e]},s)):a.warn("ImageURL unable to load "+t.url[e]+" image after "+i+" retries"),t.retries[e]-=1}}}(this)(t,e),e.onload=function(t){return function(e,n){return function(){return t.image[n]=e,t.renderer.request_render()}}}(this)(e,t),o.push(e.src=this.url[t]);return o},e.prototype._map_data=function(){return this.sw=this.sdist(this.renderer.xmapper,this.x,this.w,"edge",this.mget("dilate")),this.sh=this.sdist(this.renderer.ymapper,this.y,this.h,"edge",this.mget("dilate"))},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d;for(d=n.url,s=n.image,p=n.sx,_=n.sy,c=n.sw,h=n.sh,r=n.angle,o=this.renderer.plot_view.frame,t.rect(o.get("left")+1,o.get("bottom")+1,o.get("width")-2,o.get("height")-2),t.clip(),u=[],a=0,l=e.length;l>a;a++)i=e[a],isNaN(p[i]+_[i]+r[i])||-1!==this.retries[i]&&null!=s[i]&&u.push(this._render_image(t,i,s[i],p,_,c,h,r));return u},e.prototype._final_sx_sy=function(t,e,n,r,o){switch(t){case"top_left":return[e,n];case"top_center":return[e-r/2,n];case"top_right":return[e-r,n];case"right_center":return[e-r,n-o/2];case"bottom_right":return[e-r,n-o];case"bottom_center":return[e-r/2,n-o];case"bottom_left":return[e,n-o];case"left_center":return[e,n-o/2];case"center":return[e-r/2,n-o/2]}},e.prototype._render_image=function(t,e,n,r,o,i,s,a){var l,u;return isNaN(i[e])&&(i[e]=n.width),isNaN(s[e])&&(s[e]=n.height),l=this.mget("anchor"),u=this._final_sx_sy(l,r[e],o[e],i[e],s[e]),r=u[0],o=u[1],t.save(),t.globalAlpha=this.mget("global_alpha"),a[e]?(t.translate(r,o),t.rotate(a[e]),t.drawImage(n,0,0,i[e],s[e]),t.rotate(-a[e]),t.translate(-r,-o)):t.drawImage(n,r,o,i[e],s[e]),t.restore()},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="ImageURL",e.prototype.visuals=[],e.prototype.distances=["w","h"],e.prototype.angles=["angle"],e.prototype.fields=["url:string"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{anchor:"top_left",angle:0,dilate:!1,retry_attempts:0,retry_timeout:0,global_alpha:1})},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/logging":"common/logging","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/line":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),l=t("../../common/hittest"),a=t("./bokehgl"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._init_gl=function(t){return this.glglyph=new a.LineGLGlyph(t,this)},e.prototype._index_data=function(){return this._xy_index()},e.prototype._render=function(t,e,n){var r,o,i,s,a,l;for(a=n.sx,l=n.sy,r=!1,this.visuals.line.set_value(t),i=0,s=e.length;s>i;i++)o=e[i],isFinite(a[o]+l[o])||!r?r?t.lineTo(a[o],l[o]):(t.beginPath(),t.moveTo(a[o],l[o]),r=!0):(t.stroke(),t.beginPath(),r=!1);return r?t.stroke():void 0},e.prototype._hit_point=function(t){var e,n,r,o,i,s,a,u,h,c,p;for(h=l.create_hit_test_result(),s={x:this.renderer.plot_view.canvas.vx_to_sx(t.vx),y:this.renderer.plot_view.canvas.vy_to_sy(t.vy)},c=9999,p=Math.max(2,this.visuals.line.width.value()/2),n=r=0,a=this.sx.length-1;a>=0?a>r:r>a;n=a>=0?++r:--r)u=[{x:this.sx[n],y:this.sy[n]},{x:this.sx[n+1],y:this.sy[n+1]}],o=u[0],i=u[1],e=l.dist_to_segment(s,o,i),p>e&&c>e&&(c=e,h["0d"].glyph=this.model,h["0d"].flag=!0,h["0d"].indices=[n]);return h},e.prototype._hit_span=function(t){var e,n,r,o,i,s,a,u,h;for(r=[t.vx,t.vy],u=r[0],h=r[1],i=l.create_hit_test_result(),"v"===t.direction?(s=this.renderer.ymapper.map_from_target(h),a=this.y):(s=this.renderer.xmapper.map_from_target(u),a=this.x),e=n=0,o=a.length-1;o>=0?o>n:n>o;e=o>=0?++n:--n)a[e]<=s&&s<=a[e+1]&&(i["0d"].glyph=this.model,i["0d"].flag=!0,i["0d"].indices.push(e));return i},e.prototype.get_interpolation_hit=function(t,e){var n,r,o,i,s,a,u,h,c,p,_,d,f,m,g,y,v,b,x;return n=[e.vx,e.vy],p=n[0],_=n[1],r=[this.x[t],this.y[t],this.x[t+1],this.y[t+1]],m=r[0],b=r[1],g=r[2],x=r[3],"point"===e.type?(o=this.renderer.ymapper.v_map_from_target([_-1,_+1]),y=o[0],v=o[1],i=this.renderer.xmapper.v_map_from_target([p-1,p+1]),d=i[0],f=i[1]):"v"===e.direction?(s=this.renderer.ymapper.v_map_from_target([_,_]),y=s[0],v=s[1],a=[m,g],d=a[0],f=a[1]):(u=this.renderer.xmapper.v_map_from_target([p,p]),d=u[0],f=u[1],h=[b,x],y=h[0],v=h[1]),c=l.check_2_segments_intersect(d,y,f,v,m,b,g,x),[c.x,c.y]},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_line_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=i,e.prototype.type="Line",e.prototype.visuals=["line"],e}(r.Model),e.exports={Model:o,View:i}},{"../../common/hittest":"common/hittest","./bokehgl":"models/glyphs/bokehgl","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/multi_line":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),a=t("rbush"),r=t("./glyph"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._index_data=function(){var t,e,n,r,o,i,l,u,h;for(e=a(),r=[],t=n=0,o=this.xs.length;o>=0?o>n:n>o;t=o>=0?++n:--n)l=function(){var e,n,r,o;for(r=this.xs[t],o=[],e=0,n=r.length;n>e;e++)i=r[e],s.isNaN(i)||o.push(i);return o}.call(this),h=function(){var e,n,r,o;for(r=this.ys[t],o=[],e=0,n=r.length;n>e;e++)u=r[e],s.isNaN(u)||o.push(u);return o}.call(this),0!==l.length&&r.push([s.min(l),s.min(h),s.max(l),s.max(h),{i:t}]);return e.load(r),e},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d;for(p=n.sxs,d=n.sys,h=[],i=0,a=e.length;a>i;i++){for(r=e[i],l=[p[r],d[r]],c=l[0],_=l[1],this.visuals.line.set_vectorize(t,r),o=s=0,u=c.length;u>=0?u>s:s>u;o=u>=0?++s:--s)0!==o?isNaN(c[o])||isNaN(_[o])?(t.stroke(),t.beginPath()):t.lineTo(c[o],_[o]):(t.beginPath(),t.moveTo(c[o],_[o]));h.push(t.stroke())}return h},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_line_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="MultiLine",e.prototype.visuals=["line"],e.prototype.coords=[["xs","ys"]],e}(r.Model),e.exports={Model:o,View:i}},{"./glyph":"models/glyphs/glyph",rbush:"rbush",underscore:"underscore"}],"models/glyphs/oval":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._set_data=function(){return this.max_w2=0,"data"===this.distances.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,"data"===this.distances.height.units?this.max_h2=this.max_height/2:void 0},e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){return"data"===this.distances.width.units?this.sw=this.sdist(this.renderer.xmapper,this.x,this.width,"center"):this.sw=this.width,"data"===this.distances.height.units?this.sh=this.sdist(this.renderer.ymapper,this.y,this.height,"center"):this.sh=this.height},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h;for(u=n.sx,h=n.sy,l=n.sw,a=n.sh,s=[],o=0,i=e.length;i>o;o++)r=e[o],isNaN(u[r]+h[r]+l[r]+a[r]+this.angle[r])||(t.translate(u[r],h[r]),t.rotate(this.angle[r]),t.beginPath(),t.moveTo(0,-a[r]/2),t.bezierCurveTo(l[r]/2,-a[r]/2,l[r]/2,a[r]/2,0,a[r]/2),t.bezierCurveTo(-l[r]/2,a[r]/2,-l[r]/2,-a[r]/2,0,-a[r]/2),t.closePath(),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,r),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,r),t.stroke()),t.rotate(-this.angle[r]),s.push(t.translate(-u[r],-h[r])));return s},e.prototype.draw_legend=function(t,e,n,r,o){var i,s,a,l,u,h,c,p,_,d;return u=null!=(l=this.get_reference_point())?l:0,a=[u],_={},_[u]=(e+n)/2,d={},d[u]=(r+o)/2,h=this.sw[u]/this.sh[u],i=.8*Math.min(Math.abs(n-e),Math.abs(o-r)),p={},c={},h>1?(p[u]=i,c[u]=i/h):(p[u]=i*h,c[u]=i),s={sx:_,sy:d,sw:p,sh:c},this._render(t,a,s)},e.prototype._bounds=function(t){return[[t[0][0]-this.max_w2,t[0][1]+this.max_w2],[t[1][0]-this.max_h2,t[1][1]+this.max_h2]]},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="Oval",e.prototype.distances=["width","height"],e.prototype.angles=["angle"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{angle:0})},e}(r.Model),e.exports={Model:o,View:i}},{"./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/patch":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u;if(l=n.sx,u=n.sy,this.visuals.fill.do_fill){for(this.visuals.fill.set_value(t),o=0,s=e.length;s>o;o++)r=e[o],0!==r?isNaN(l[r]+u[r])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(l[r],u[r]):(t.beginPath(),t.moveTo(l[r],u[r]));t.closePath(),t.fill()}if(this.visuals.line.do_stroke){for(this.visuals.line.set_value(t),i=0,a=e.length;a>i;i++)r=e[i],0!==r?isNaN(l[r]+u[r])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(l[r],u[r]):(t.beginPath(),t.moveTo(l[r],u[r]));return t.closePath(),t.stroke()}},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_area_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="Patch",e}(r.Model),e.exports={Model:o,View:i}},{"./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/patches":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),l=t("rbush"),a=t("../../common/hittest"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._build_discontinuous_object=function(t){var e,n,r,o,i,a,l,u,h;for(n={},r=o=0,h=t.length;h>=0?h>o:o>h;r=h>=0?++o:--o)for(n[r]=[],l=s.toArray(t[r]);l.length>0;)i=s.findLastIndex(l,function(t){return s.isNaN(t)}),i>=0?u=l.splice(i):(u=l,l=[]),e=function(){var t,e,n;for(n=[],t=0,e=u.length;e>t;t++)a=u[t],s.isNaN(a)||n.push(a);return n}(),n[r].push(e);return n},e.prototype._index_data=function(){var t,e,n,r,o,i,a,u,h,c,p,_;for(e=l(),i=[],c=this._build_discontinuous_object(this.xs),_=this._build_discontinuous_object(this.ys),t=r=0,a=this.xs.length;a>=0?a>r:r>a;t=a>=0?++r:--r)for(n=o=0,u=c[t].length;u>=0?u>o:o>u;n=u>=0?++o:--o)h=c[t][n],p=_[t][n],0!==h.length&&i.push([s.min(h),s.min(p),s.max(h),s.max(p),{i:t}]);return e.load(i),e},e.prototype._mask_data=function(t){var e,n,r,o,i,s,a,l,u;return s=this.renderer.plot_view.x_range,e=[s.get("min"),s.get("max")],o=e[0],i=e[1],u=this.renderer.plot_view.y_range,n=[u.get("min"),u.get("max")],a=n[0],l=n[1],function(){var t,e,n,s;for(n=this.index.search([o,a,i,l]),s=[],t=0,e=n.length;e>t;t++)r=n[t],s.push(r[4].i);return s}.call(this)},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m;for(d=n.sxs,m=n.sys,this.sxss=this._build_discontinuous_object(d),this.syss=this._build_discontinuous_object(m),p=[],i=0,a=e.length;a>i;i++){if(r=e[i],u=[d[r],m[r]],_=u[0],f=u[1],this.visuals.fill.do_fill){for(this.visuals.fill.set_vectorize(t,r),o=s=0,h=_.length;h>=0?h>s:s>h;o=h>=0?++s:--s)0!==o?isNaN(_[o]+f[o])?(t.closePath(),t.fill(),t.beginPath()):t.lineTo(_[o],f[o]):(t.beginPath(),t.moveTo(_[o],f[o]));t.closePath(),t.fill()}if(this.visuals.line.do_stroke){for(this.visuals.line.set_vectorize(t,r),o=l=0,c=_.length;c>=0?c>l:l>c;o=c>=0?++l:--l)0!==o?isNaN(_[o]+f[o])?(t.closePath(),t.stroke(),t.beginPath()):t.lineTo(_[o],f[o]):(t.beginPath(),t.moveTo(_[o],f[o]));t.closePath(),p.push(t.stroke())}else p.push(void 0)}return p},e.prototype._hit_point=function(t){var e,n,r,o,i,s,l,u,h,c,p,_,d,f,m,g,y,v,b;for(u=[t.vx,t.vy],g=u[0],y=u[1],_=this.renderer.plot_view.canvas.vx_to_sx(g),f=this.renderer.plot_view.canvas.vy_to_sy(y),v=this.renderer.xmapper.map_from_target(g,!0),b=this.renderer.ymapper.map_from_target(y,!0),e=function(){var t,e,n,r;for(n=this.index.search([v,b,v,b]),r=[],t=0,e=n.length;e>t;t++)v=n[t],r.push(v[4].i);return r}.call(this),n=[],r=s=0,h=e.length;h>=0?h>s:s>h;r=h>=0?++s:--s)for(o=e[r],d=this.sxss[o],m=this.syss[o],i=l=0,c=d.length;c>=0?c>l:l>c;i=c>=0?++l:--l)a.point_in_poly(_,f,d[i],m[i])&&n.push(o);return p=a.create_hit_test_result(),p["1d"].indices=n,p},e.prototype._get_snap_coord=function(t){var e,n,r,o;for(o=0,e=0,n=t.length;n>e;e++)r=t[e],o+=r;return o/t.length},e.prototype.scx=function(t,e,n){var r,o,i,s,l;if(1===this.sxss[t].length)return this._get_snap_coord(this.sxs[t]);for(s=this.sxss[t],l=this.syss[t],r=o=0,i=s.length;i>=0?i>o:o>i;r=i>=0?++o:--o)if(a.point_in_poly(e,n,s[r],l[r]))return this._get_snap_coord(s[r]);return null},e.prototype.scy=function(t,e,n){var r,o,i,s,l;if(1===this.syss[t].length)return this._get_snap_coord(this.sys[t]);for(s=this.sxss[t],l=this.syss[t],r=o=0,i=s.length;i>=0?i>o:o>i;r=i>=0?++o:--o)if(a.point_in_poly(e,n,s[r],l[r]))return this._get_snap_coord(l[r])},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_area_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=i,e.prototype.type="Patches",e.prototype.coords=[["xs","ys"]],e}(r.Model),e.exports={Model:o,View:i}},{"../../common/hittest":"common/hittest","./glyph":"models/glyphs/glyph",rbush:"rbush",underscore:"underscore"}],"models/glyphs/quad":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),l=t("rbush"),r=t("./glyph"),a=t("../../common/hittest"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._index_data=function(){var t,e,n,r,o;for(e=l(),r=[],t=n=0,o=this.left.length;o>=0?o>n:n>o;t=o>=0?++n:--n)isNaN(this.left[t]+this.right[t]+this.top[t]+this.bottom[t])||r.push([this.left[t],this.bottom[t],this.right[t],this.top[t],{i:t}]);return e.load(r),e},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h;for(l=n.sleft,u=n.sright,h=n.stop,a=n.sbottom,s=[],o=0,i=e.length;i>o;o++)r=e[o],isNaN(l[r]+h[r]+u[r]+a[r])||(this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,r),t.fillRect(l[r],h[r],u[r]-l[r],a[r]-h[r])),this.visuals.line.do_stroke?(t.beginPath(),t.rect(l[r],h[r],u[r]-l[r],a[r]-h[r]),this.visuals.line.set_vectorize(t,r),s.push(t.stroke())):s.push(void 0));return s},e.prototype._hit_point=function(t){var e,n,r,o,i,s,l;return n=[t.vx,t.vy],o=n[0],i=n[1],s=this.renderer.xmapper.map_from_target(o,!0),l=this.renderer.ymapper.map_from_target(i,!0),e=function(){var t,e,n,r;for(n=this.index.search([s,l,s,l]),r=[],t=0,e=n.length;e>t;t++)s=n[t],r.push(s[4].i);return r}.call(this),r=a.create_hit_test_result(),r["1d"].indices=e,r},e.prototype.scx=function(t){return(this.sleft[t]+this.sright[t])/2},e.prototype.scy=function(t){return(this.stop[t]+this.sbottom[t])/2},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_area_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=i,e.prototype.type="Quad",e.prototype.coords=[["right","bottom"],["left","top"]],e}(r.Model),e.exports={Model:o,View:i}},{"../../common/hittest":"common/hittest","./glyph":"models/glyphs/glyph",rbush:"rbush",underscore:"underscore"}],"models/glyphs/quadratic":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),l=t("rbush"),r=t("./glyph"),a=function(t,e,n){var r,o;return e===(t+n)/2?[t,n]:(o=(t-e)/(t-2*e+n),r=t*Math.pow(1-o,2)+2*e*(1-o)*o+n*Math.pow(o,2),[Math.min(t,n,r),Math.max(t,n,r)])},i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._index_data=function(){var t,e,n,r,o,i,s,u,h,c,p;for(e=l(),r=[],t=n=0,o=this.x0.length;o>=0?o>n:n>o;t=o>=0?++n:--n)isNaN(this.x0[t]+this.x1[t]+this.y0[t]+this.y1[t]+this.cx[t]+this.cy[t])||(i=a(this.x0[t],this.cx[t],this.x1[t]),u=i[0],h=i[1],s=a(this.y0[t],this.cy[t],this.y1[t]),c=s[0],p=s[1],r.push([u,c,h,p,{i:t}]));return e.load(r),e},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;if(u=n.sx0,c=n.sy0,h=n.sx1,p=n.sy1,a=n.scx,l=n.scy,this.visuals.line.do_stroke){for(s=[],o=0,i=e.length;i>o;o++)r=e[o],isNaN(u[r]+c[r]+h[r]+p[r]+a[r]+l[r])||(t.beginPath(),t.moveTo(u[r],c[r]),t.quadraticCurveTo(a[r],l[r],h[r],p[r]),this.visuals.line.set_vectorize(t,r),s.push(t.stroke()));return s}},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_line_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=i,e.prototype.type="Quadratic",e.prototype.visuals=["line"],e.prototype.coords=[["x0","y0"],["x1","y1"],["cx","cy"]],e}(r.Model),e.exports={Model:o,View:i}},{"./glyph":"models/glyphs/glyph",rbush:"rbush",underscore:"underscore"}],"models/glyphs/ray":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){return this.slength=this.sdist(this.renderer.xmapper,this.x,this.length)},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f;if(_=n.sx,d=n.sy,p=n.slength,r=n.angle,this.visuals.line.do_stroke){for(f=this.renderer.plot_view.frame.get("width"),o=this.renderer.plot_view.frame.get("height"),s=2*(f+o),i=a=0,h=p.length;h>=0?h>a:a>h;i=h>=0?++a:--a)0===p[i]&&(p[i]=s);for(c=[],l=0,u=e.length;u>l;l++)i=e[l],isNaN(_[i]+d[i]+r[i]+p[i])||(t.translate(_[i],d[i]),t.rotate(r[i]),t.beginPath(),t.moveTo(0,0),t.lineTo(p[i],0),this.visuals.line.set_vectorize(t,i),t.stroke(),t.rotate(-r[i]),c.push(t.translate(-_[i],-d[i])));return c}},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_line_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="Ray",e.prototype.visuals=["line"],e.prototype.distances=["length"],e.prototype.angles=["angle"],e}(r.Model),e.exports={Model:o,View:i}},{"./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/rect":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),a=t("../../common/hittest"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._set_data=function(){return this.max_w2=0,"data"===this.distances.width.units&&(this.max_w2=this.max_width/2),this.max_h2=0,"data"===this.distances.height.units?this.max_h2=this.max_height/2:void 0},e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){return"data"===this.distances.width.units?this.sw=this.sdist(this.renderer.xmapper,this.x,this.width,"center",this.mget("dilate")):this.sw=this.width,"data"===this.distances.height.units?this.sh=this.sdist(this.renderer.ymapper,this.y,this.height,"center",this.mget("dilate")):this.sh=this.height},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;if(c=n.sx,p=n.sy,h=n.sw,u=n.sh,r=n.angle,this.visuals.fill.do_fill)for(i=0,a=e.length;a>i;i++)o=e[i],isNaN(c[o]+p[o]+h[o]+u[o]+r[o])||(this.visuals.fill.set_vectorize(t,o),r[o]?(t.translate(c[o],p[o]),t.rotate(r[o]),t.fillRect(-h[o]/2,-u[o]/2,h[o],u[o]),t.rotate(-r[o]),t.translate(-c[o],-p[o])):t.fillRect(c[o]-h[o]/2,p[o]-u[o]/2,h[o],u[o]));if(this.visuals.line.do_stroke){for(t.beginPath(),s=0,l=e.length;l>s;s++)o=e[s],isNaN(c[o]+p[o]+h[o]+u[o]+r[o])||0!==h[o]&&0!==u[o]&&(r[o]?(t.translate(c[o],p[o]),t.rotate(r[o]),t.rect(-h[o]/2,-u[o]/2,h[o],u[o]),t.rotate(-r[o]),t.translate(-c[o],-p[o])):t.rect(c[o]-h[o]/2,p[o]-u[o]/2,h[o],u[o]),this.visuals.line.set_vectorize(t,o),t.stroke(),t.beginPath());return t.stroke()}},e.prototype._hit_rect=function(t){var e,n,r,o,i,s,l,u;return e=this.renderer.xmapper.v_map_from_target([t.vx0,t.vx1],!0),i=e[0],s=e[1],n=this.renderer.ymapper.v_map_from_target([t.vy0,t.vy1],!0),l=n[0],u=n[1],r=a.create_hit_test_result(),r["1d"].indices=function(){var t,e,n,r;for(n=this.index.search([i,l,s,u]),r=[],t=0,e=n.length;e>t;t++)o=n[t],r.push(o[4].i);return r}.call(this),r},e.prototype._hit_point=function(t){var e,n,r,o,i,s,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A;for(p=[t.vx,t.vy],b=p[0],k=p[1],z=this.renderer.xmapper.map_from_target(b,!0),S=this.renderer.ymapper.map_from_target(k,!0),"screen"===this.distances.width.units?(x=b-2*this.max_width,w=b+2*this.max_width,_=this.renderer.xmapper.v_map_from_target([x,w],!0),E=_[0],P=_[1]):(E=z-2*this.max_width,P=z+2*this.max_width),"screen"===this.distances.height.units?(M=k-2*this.max_height,j=k+2*this.max_height,d=this.renderer.ymapper.v_map_from_target([M,j],!0),C=d[0],A=d[1]):(C=S-2*this.max_height,A=S+2*this.max_height),o=[],f=function(){var t,e,n,r;for(n=this.index.search([E,C,P,A]),r=[],t=0,e=n.length;e>t;t++)u=n[t],r.push(u[4].i);return r}.call(this),s=0,l=f.length;l>s;s++)i=f[s],y=this.renderer.plot_view.canvas.vx_to_sx(b),v=this.renderer.plot_view.canvas.vy_to_sy(k),this.angle[i]&&(n=Math.sqrt(Math.pow(y-this.sx[i],2)+Math.pow(v-this.sy[i],2)),g=Math.sin(-this.angle[i]),e=Math.cos(-this.angle[i]),h=e*(y-this.sx[i])-g*(v-this.sy[i])+this.sx[i],c=g*(y-this.sx[i])+e*(v-this.sy[i])+this.sy[i],y=h,v=c),T=Math.abs(this.sx[i]-y)<=this.sw[i]/2,r=Math.abs(this.sy[i]-v)<=this.sh[i]/2,r&&T&&o.push(i);return m=a.create_hit_test_result(),m["1d"].indices=o,m},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_area_legend(t,e,n,r,o)},e.prototype._bounds=function(t){return[[t[0][0]-this.max_w2,t[0][1]+this.max_w2],[t[1][0]-this.max_h2,t[1][1]+this.max_h2]]},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="Rect",e.prototype.distances=["width","height"],e.prototype.angles=["angle"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{angle:0,dilate:!1})},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/hittest":"common/hittest","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/segment":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),a=t("rbush"),r=t("./glyph"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._index_data=function(){var t,e,n,r,o;for(e=a(),r=[],t=n=0,o=this.x0.length;o>=0?o>n:n>o;t=o>=0?++n:--n)isNaN(this.x0[t]+this.x1[t]+this.y0[t]+this.y1[t])||r.push([this.x0[t],this.y0[t],this.x1[t],this.y1[t],{i:t}]);return e.load(r),e},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h;if(a=n.sx0,u=n.sy0,l=n.sx1,h=n.sy1,this.visuals.line.do_stroke){for(s=[],o=0,i=e.length;i>o;o++)r=e[o],isNaN(a[r]+u[r]+l[r]+h[r])||(t.beginPath(),t.moveTo(a[r],u[r]),t.lineTo(l[r],h[r]),this.visuals.line.set_vectorize(t,r),s.push(t.stroke()));return s}},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_line_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="Segment",e.prototype.visuals=["line"],e.prototype.coords=[["x0","y0"],["x1","y1"]],e}(r.Model),e.exports={Model:o,View:i}},{"./glyph":"models/glyphs/glyph",rbush:"rbush",underscore:"underscore"}],"models/glyphs/text":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),r=t("./glyph"),a=t("../../common/properties"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.text_props=new a.Text({obj:this.model,prefix:""})},e.prototype._index_data=function(){return this._xy_index()},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;for(l=n.sx,u=n.sy,c=n.x_offset,p=n.y_offset,r=n.angle,h=n.text,a=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(l[o]+u[o]+c[o]+p[o]+r[o])||null==h[o]||(t.save(),t.translate(l[o]+c[o],u[o]+p[o]),t.rotate(r[o]),this.visuals.text.set_vectorize(t,o),t.fillText(h[o],0,0),a.push(t.restore()));return a},e.prototype.draw_legend=function(t,e,n,r,o){return t.save(),this.text_props.set_value(t),t.font=this.text_props.font_value(),t.font=t.font.replace(/\b[\d\.]+[\w]+\b/,"10pt"),
9 t.textAlign="right",t.textBaseline="middle",t.fillText("text",n,(r+o)/2),t.restore()},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="Text",e.prototype.visuals=["text"],e.prototype.angles=["angle"],e.prototype.fields=["text:string","x_offset","y_offset"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{angle:0,x_offset:0,y_offset:0,text:{field:"text"}})},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/properties":"common/properties","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/glyphs/wedge":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;s=t("underscore"),l=t("../../common/mathutils"),r=t("./glyph"),a=t("../../common/hittest"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype._index_data=function(){return this._xy_index()},e.prototype._map_data=function(){return"data"===this.distances.radius.units?this.sradius=this.sdist(this.renderer.xmapper,this.x,this.radius):this.sradius=this.radius},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;for(c=n.sx,p=n.sy,u=n.sradius,h=n.start_angle,o=n.end_angle,r=n.direction,l=[],s=0,a=e.length;a>s;s++)i=e[s],isNaN(c[i]+p[i]+u[i]+h[i]+o[i]+r[i])||(t.beginPath(),t.arc(c[i],p[i],u[i],h[i],o[i],r[i]),t.lineTo(c[i],p[i]),t.closePath(),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,i),t.fill()),this.visuals.line.do_stroke?(this.visuals.line.set_vectorize(t,i),l.push(t.stroke())):l.push(void 0));return l},e.prototype._hit_point=function(t){var e,n,r,o,i,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D,I;for(f=[t.vx,t.vy],z=f[0],S=f[1],O=this.renderer.xmapper.map_from_target(z,!0),F=this.renderer.ymapper.map_from_target(S,!0),"data"===this.distances.radius.units?(N=O-this.max_radius,q=O+this.max_radius,D=F-this.max_radius,I=F+this.max_radius):(E=z-this.max_radius,P=z+this.max_radius,m=this.renderer.xmapper.v_map_from_target([E,P],!0),N=m[0],q=m[1],C=S-this.max_radius,A=S+this.max_radius,g=this.renderer.ymapper.v_map_from_target([C,A],!0),D=g[0],I=g[1]),n=[],y=function(){var t,e,n,r;for(n=this.index.search([N,D,q,I]),r=[],t=0,e=n.length;e>t;t++)_=n[t],r.push(_[4].i);return r}.call(this),u=0,c=y.length;c>u;u++)i=y[u],d=Math.pow(this.sradius[i],2),w=this.renderer.xmapper.map_to_target(O,!0),k=this.renderer.xmapper.map_to_target(this.x[i],!0),j=this.renderer.ymapper.map_to_target(F,!0),T=this.renderer.ymapper.map_to_target(this.y[i],!0),r=Math.pow(w-k,2)+Math.pow(j-T,2),d>=r&&n.push([i,r]);for(o=[],h=0,p=n.length;p>h;h++)v=n[h],i=v[0],r=v[1],x=this.renderer.plot_view.canvas.vx_to_sx(z),M=this.renderer.plot_view.canvas.vy_to_sy(S),e=Math.atan2(M-this.sy[i],x-this.sx[i]),l.angle_between(-e,-this.start_angle[i],-this.end_angle[i],this.direction[i])&&o.push([i,r]);return b=a.create_hit_test_result(),b["1d"].indices=s.chain(o).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value(),b},e.prototype.draw_legend=function(t,e,n,r,o){return this._generic_area_legend(t,e,n,r,o)},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=i,e.prototype.type="Wedge",e.prototype.distances=["radius"],e.prototype.angles=["start_angle","end_angle"],e.prototype.fields=["direction:direction"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{direction:"anticlock"})},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/hittest":"common/hittest","../../common/mathutils":"common/mathutils","./glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/grids/grid":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),i=t("../renderers/guide_renderer"),s=t("../../common/plot_widget"),l=t("../../common/properties"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.grid_props=new l.Line({obj:this.model,prefix:"grid_"}),this.minor_grid_props=new l.Line({obj:this.model,prefix:"minor_grid_"}),this.band_props=new l.Fill({obj:this.model,prefix:"band_"}),this.x_range_name=this.mget("x_range_name"),this.y_range_name=this.mget("y_range_name")},e.prototype.render=function(){var t;return t=this.plot_view.canvas_view.ctx,t.save(),this._draw_regions(t),this._draw_minor_grids(t),this._draw_grids(t),t.restore()},e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change",this.request_render)},e.prototype._draw_regions=function(t){var e,n,r,o,i,s,a,l,u,h,c,p;if(this.band_props.do_fill)for(r=this.mget("grid_coords"),c=r[0],p=r[1],this.band_props.set_value(t),e=n=0,o=c.length-1;o>=0?o>n:n>o;e=o>=0?++n:--n)e%2===1&&(i=this.plot_view.map_to_screen(c[e],p[e],this.x_range_name,this.y_range_name),a=i[0],u=i[1],s=this.plot_view.map_to_screen(c[e+1],p[e+1],this.x_range_name,this.y_range_name),l=s[0],h=s[1],t.fillRect(a[0],u[0],l[1]-a[0],h[1]-u[0]),t.fill())},e.prototype._draw_grids=function(t){var e,n,r;if(this.grid_props.do_stroke)return e=this.mget("grid_coords"),n=e[0],r=e[1],this._draw_grid_helper(t,this.grid_props,n,r)},e.prototype._draw_minor_grids=function(t){var e,n,r;if(this.minor_grid_props.do_stroke)return e=this.mget("minor_grid_coords"),n=e[0],r=e[1],this._draw_grid_helper(t,this.minor_grid_props,n,r)},e.prototype._draw_grid_helper=function(t,e,n,r){var o,i,s,a,l,u,h,c;for(e.set_value(t),o=i=0,a=n.length;a>=0?a>i:i>a;o=a>=0?++i:--i){for(l=this.plot_view.map_to_screen(n[o],r[o],this.x_range_name,this.y_range_name),h=l[0],c=l[1],t.beginPath(),t.moveTo(Math.round(h[0]),Math.round(c[0])),o=s=1,u=h.length;u>=1?u>s:s>u;o=u>=1?++s:--s)t.lineTo(Math.round(h[o]),Math.round(c[o]));t.stroke()}},e}(s),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.default_view=o,e.prototype.type="Grid",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("computed_bounds",this._bounds,!1),this.add_dependencies("computed_bounds",this,["bounds"]),this.register_property("grid_coords",this._grid_coords,!1),this.add_dependencies("grid_coords",this,["computed_bounds","dimension","ticker"]),this.register_property("minor_grid_coords",this._minor_grid_coords,!1),this.add_dependencies("minor_grid_coords",this,["computed_bounds","dimension","ticker"]),this.register_property("ranges",this._ranges,!0)},e.prototype._ranges=function(){var t,e,n,r;return e=this.get("dimension"),n=(e+1)%2,t=this.get("plot").get("frame"),r=[t.get("x_ranges")[this.get("x_range_name")],t.get("y_ranges")[this.get("y_range_name")]],[r[e],r[n]]},e.prototype._bounds=function(){var t,e,n,r,o,i,s;return o=this.get("ranges"),n=o[0],t=o[1],s=this.get("bounds"),r=[n.get("min"),n.get("max")],a.isArray(s)?(i=Math.min(s[0],s[1]),e=Math.max(s[0],s[1]),i<r[0]?i=r[0]:i>r[1]&&(i=null),e>r[1]?e=r[1]:e<r[0]&&(e=null)):(i=r[0],e=r[1]),[i,e]},e.prototype._grid_coords=function(){return this._grid_coords_helper("major")},e.prototype._minor_grid_coords=function(){return this._grid_coords_helper("minor")},e.prototype._grid_coords_helper=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j;for(u=this.get("dimension"),c=(u+1)%2,v=this.get("ranges"),y=v[0],i=v[1],b=this.get("computed_bounds"),k=b[0],l=b[1],j=Math.min(k,l),l=Math.max(k,l),k=j,M=this.get("ticker").get_ticks(k,l,y,{})[t],m=y.get("min"),f=y.get("max"),r=i.get("min"),n=i.get("max"),o=[[],[]],h=p=0,x=M.length;x>=0?x>p:p>x;h=x>=0?++p:--p)if(M[h]!==m&&M[h]!==f){for(s=[],a=[],e=2,g=_=0,w=e;w>=0?w>_:_>w;g=w>=0?++_:--_)d=r+(n-r)/(e-1)*g,s.push(M[h]),a.push(d);o[u].push(s),o[c].push(a)}return o},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{x_range_name:"default",y_range_name:"default",level:"underlay",bounds:"auto",dimension:0,ticker:null,band_fill_color:null,band_fill_alpha:0,grid_line_color:"#cccccc",grid_line_width:1,grid_line_alpha:1,grid_line_join:"miter",grid_line_cap:"butt",grid_line_dash:[],grid_line_dash_offset:0,minor_grid_line_color:null,minor_grid_line_width:1,minor_grid_line_alpha:1,minor_grid_line_join:"miter",minor_grid_line_cap:"butt",minor_grid_line_dash:[],minor_grid_line_dash_offset:0})},e}(i.Model),e.exports={Model:r,View:o}},{"../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","../renderers/guide_renderer":"models/renderers/guide_renderer",underscore:"underscore"}],"models/layouts/basebox":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("./layout"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="BaseBox",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{width:null,height:null})},e}(o.Model),e.exports={Model:r}},{"./layout":"models/layouts/layout",underscore:"underscore"}],"models/layouts/grid_plot":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y=function(t,e){function n(){this.constructor=t}for(var r in e)v.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},v={}.hasOwnProperty,b=function(t,e){return function(){return t.apply(e,arguments)}};r=t("jquery"),d=t("underscore"),o=t("backbone"),f=t("../../common/build_views"),s=t("../../common/continuum_view"),i=t("../component"),c=t("../../common/has_props"),m=t("../../common/logging").logger,p=t("../../common/tool_manager"),g=t("../../common/plot_template"),_=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return y(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this,"do",this["do"]),this.listenTo(this,"change:active",this.active),null},e.prototype["do"]=function(){var t,e,n,r;for(n=this.attributes.tools,t=0,e=n.length;e>t;t++)r=n[t],r.trigger("do");return null},e.prototype.active=function(){var t,e,n,r;for(n=this.attributes.tools,t=0,e=n.length;e>t;t++)r=n[t],r.set("active",this.attributes.active);return null},e.prototype.attrs_and_props=function(){return this.attributes.tools[0].attrs_and_props()},e.prototype.get=function(t){return this.attributes.tools[0].get(t)},e.prototype.set=function(t,n){var r,o,i,s;for(e.__super__.set.call(this,t,n),t=d.omit(t,"tools"),i=this.attributes.tools,r=0,o=i.length;o>r;r++)s=i[r],s.set(t,n);return null},e}(o.Model),u=function(t){function e(){return this._active_change=b(this._active_change,this),e.__super__.constructor.apply(this,arguments)}return y(e,t),e.prototype._init_tools=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,f,m,g,y,v,b,x,w,k,M,j,T,z,E;for(i={},t={},n={},m=this.get("tool_managers"),r=0,u=m.length;u>r;r++){M=m[r],g=M.get("gestures");for(e in g){o=g[e],e in n||(n[e]={}),y=o.tools;for(s=0,h=y.length;h>s;s++)T=y[s],T.type in n[e]||(n[e][T.type]=[]),n[e][T.type].push(T)}for(v=M.get("inspectors"),a=0,c=v.length;c>a;a++)T=v[a],T.type in i||(i[T.type]=[]),i[T.type].push(T);for(b=M.get("actions"),l=0,p=b.length;p>l;l++)T=b[l],T.type in t||(t[T.type]=[]),t[T.type].push(T)}for(e in n){x=n[e];for(E in x)z=x[E],z.length===this.get("num_plots")&&(f=new _({tools:z}),this.get("gestures")[e].tools.push(f),this.listenTo(f,"change:active",d.bind(this._active_change,f)))}for(E in t)z=t[E],z.length===this.get("num_plots")&&(f=new _({tools:z}),j=this.get("actions"),j.push(f),this.set("actions",j));for(E in i)z=i[E],z.length===this.get("num_plots")&&(f=new _({tools:z}),j=this.get("inspectors"),j.push(f),this.set("inspectors",j));w=this.get("gestures"),k=[];for(e in w)o=w[e],z=o.tools,0!==z.length&&(o.tools=d.sortBy(z,function(t){return t.get("default_order")}),"pinch"!==e&&"scroll"!==e?k.push(o.tools[0].set("active",!0)):k.push(void 0));return k},e.prototype._active_change=function(t){var e,n,r;return n=t.get("event_type"),r=this.get("gestures"),e=r[n].active,null!=e&&e!==t&&(m.debug("GridToolManager: deactivating tool: "+e.type+" ("+e.id+") for event type '"+n+"'"),e.set("active",!1)),r[n].active=t,this.set("gestures",r),m.debug("GridToolManager: activating tool: "+t.type+" ("+t.id+") for event type '"+n+"'"),null},e.prototype.defaults=function(){return d.extend({},e.__super__.defaults.call(this),{tool_manangers:[]})},e}(p.Model),h=function(t){function e(){return this.layout_widths=b(this.layout_widths,this),this.layout_heights=b(this.layout_heights,this),this.setup_layout_properties=b(this.setup_layout_properties,this),e.__super__.constructor.apply(this,arguments)}return y(e,t),e.prototype.setup_layout_properties=function(){var t,e,n,r,o,i;for(this.register_property("layout_heights",this.layout_heights,!1),this.register_property("layout_widths",this.layout_widths,!1),n=this.get("viewstates"),r=[],t=0,e=n.length;e>t;t++)o=n[t],r.push(function(){var t,e,n;for(n=[],t=0,e=o.length;e>t;t++)i=o[t],this.add_dependencies("layout_heights",i,"height"),n.push(this.add_dependencies("layout_widths",i,"width"));return n}.call(this));return r},e.prototype.initialize=function(t,n){var r,o;return e.__super__.initialize.call(this,t,n),this.setup_layout_properties(),this.listenTo(this,"change:viewstates",this.setup_layout_properties),r=function(t){return function(){return d.reduce(t.get("layout_heights"),function(t,e){return t+e},0)}}(this),this.register_property("height",r,!1),this.add_dependencies("height",this,"layout_heights"),o=function(t){return function(){return d.reduce(t.get("layout_widths"),function(t,e){return t+e},0)}}(this),this.register_property("width",o,!1),this.add_dependencies("width",this,"layout_widths")},e.prototype.position_child_x=function(t,e){return t},e.prototype.position_child_y=function(t,e){return this.get("height")-t-e},e.prototype.maxdim=function(t,e){return 0===e.length?0:d.max(d.map(e,function(e){return null!=e?e.get(t):0}))},e.prototype.layout_heights=function(){var t,e;return e=function(){var e,n,r,o;for(r=this.get("viewstates"),o=[],e=0,n=r.length;n>e;e++)t=r[e],o.push(this.maxdim("height",t));return o}.call(this)},e.prototype.layout_widths=function(){var t,e,n,r,o,i;return o=this.get("viewstates")[0].length,n=function(){var t,e,n,s;for(n=d.range(o),s=[],t=0,e=n.length;e>t;t++)r=n[t],s.push(function(){var t,e,n,o;for(n=this.get("viewstates"),o=[],t=0,e=n.length;e>t;t++)i=n[t],o.push(i[r]);return o}.call(this));return s}.call(this),e=function(){var e,r,o;for(o=[],e=0,r=n.length;r>e;e++)t=n[e],o.push(this.maxdim("width",t));return o}.call(this)},e.prototype.defaults=function(){return d.extend({},e.__super__.defaults.call(this),{viewstates:[[]],border_space:0})},e}(c),l=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return y(e,t),e.prototype.className="",e.prototype.template=g,e.prototype.initialize=function(t){var n,r;return e.__super__.initialize.call(this,t),this.viewstate=new h,this.child_views={},this.build_children(),this.bind_bokeh_events(),this.$el.html(this.template()),n=this.mget("toolbar_location"),null!=n&&(r=".bk-plot-"+n,m.debug("attaching toolbar to "+r+" for plot "+this.model.id),this.tm_view=new p.View({model:this.mget("tool_manager"),el:this.$(r)})),this.render(),this},e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change:children",this.build_children),this.listenTo(this.model,"change",this.render),this.listenTo(this.viewstate,"change",this.render),this.listenTo(this.model,"destroy",this.remove)},e.prototype.build_children=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,m,g,y,v;for(t=[],p=this.mget("children"),e=0,i=p.length;i>e;e++)for(g=p[e],n=0,s=g.length;s>n;n++)c=g[n],null!=c&&(c.set("toolbar_location",null),t.push(c));for(f(this.child_views,t,{}),y=[],_=this.mget("children"),r=0,a=_.length;a>r;r++){for(g=_[r],v=[],o=0,l=g.length;l>o;o++)c=g[o],null!=c&&v.push(this.child_views[c.id].canvas);y.push(v)}for(this.viewstate.set("viewstates",y),d=this.mget("children"),m=[],h=0,u=d.length;u>h;h++)g=d[h],m.push(function(){var t,e,n;for(n=[],e=0,t=g.length;t>e;e++)c=g[e],null!=c&&n.push(this.listenTo(c.solver,"layout_update",this.render));return n}.call(this));return m},e.prototype.render=function(){var t,n,o,i,s,a,l,u,h,c,_,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A;for(e.__super__.render.call(this),v=d.values(this.child_views),a=0,c=v.length;c>a;a++)z=v[a],z.$el.detach();for(i=r("<div />"),this.$(".bk-plot-canvas-wrapper").empty(),this.$(".bk-plot-canvas-wrapper").append(i),M=this.mget("toolbar_location"),null!=M&&(j=".bk-plot-"+M,this.tm_view=new p.View({model:this.mget("tool_manager"),el:this.$(j)}),this.tm_view.render()),k=this.viewstate.get("layout_heights"),o=this.viewstate.get("layout_widths"),C=[0],d.reduceRight(k.slice(1),function(t,e){var n;return n=t+e,C.push(n),n},0),C.reverse(),P=[0],d.reduce(o.slice(0),function(t,e){var n;return n=t+e,P.push(n),n},0),g=[],h=null,b=this.mget("children"),x=l=0,_=b.length;_>l;x=++l)for(w=b[x],n=u=0,f=w.length;f>u;n=++u)m=w[n],null!=m&&(z=this.child_views[m.id],A=this.viewstate.position_child_y(C[x],z.canvas.get("height")),S=this.viewstate.position_child_x(P[n],z.canvas.get("width")),y=r("<div class='gp_plotwrapper'></div>"),y.attr("style","position: absolute; left:"+S+"px; top:"+A+"px"),y.append(z.$el),i.append(y));return t=function(t,e){return t+e},T=d.reduce(k,t,0),s=T,E=d.reduce(o,t,0),i.attr("style","position:relative; height:"+s+"px;width:"+E+"px")},e}(s),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return y(e,t),e.prototype.type="GridPlot",e.prototype.default_view=l,e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("tool_manager",function(){var t,e,n,r,o;for(t=[],o=d.flatten(this.get("children")),e=0,n=o.length;n>e;e++)r=o[e],null!=r&&t.push(r);return new u({tool_managers:function(){var e,n,o;for(o=[],e=0,n=t.length;n>e;e++)r=t[e],o.push(r.get("tool_manager"));return o}(),toolbar_location:this.get("toolbar_location"),num_plots:t.length})},!0)},e.prototype.defaults=function(){return d.extend({},e.__super__.defaults.call(this),{children:[[]],border_space:0,toolbar_location:"left",disabled:!1})},e}(i.Model),e.exports={Model:a,View:l}},{"../../common/build_views":"common/build_views","../../common/continuum_view":"common/continuum_view","../../common/has_props":"common/has_props","../../common/logging":"common/logging","../../common/plot_template":"common/plot_template","../../common/tool_manager":"common/tool_manager","../component":"models/component",backbone:"backbone",jquery:"jquery",underscore:"underscore"}],"models/layouts/hbox":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("underscore"),r=t("jquery"),u=t("../../common/build_views"),i=t("../../common/continuum_view"),o=t("./basebox"),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.tag="div",e.prototype.attributes={"class":"bk-hbox"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.views={},this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,e,n,o,i,s,a,l,h,p;e=this.model.children(),u(this.views,e),l=this.views;for(s in l)c.call(l,s)&&(h=l[s],h.$el.detach());for(this.$el.empty(),p=this.mget("width"),null!=p&&this.$el.css({width:p+"px"}),n=this.mget("height"),null!=n&&this.$el.css({height:n+"px"}),i=o=0,a=e.length;a>o;i=++o)t=e[i],this.$el.append(this.views[t.id].$el),i<e.length-1&&this.$el.append(r('<div class="bk-hbox-spacer"></div>'));return this},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="HBox",e.prototype.default_view=a,e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{children:[]})},e.prototype.children=function(){return this.get("children")},e}(o.Model),e.exports={Model:s,View:a}},{"../../common/build_views":"common/build_views","../../common/continuum_view":"common/continuum_view","./basebox":"models/layouts/basebox",jquery:"jquery",underscore:"underscore"}],"models/layouts/layout":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("../component"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="Layout",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{width:null,height:null})},e}(r.Model),e.exports={Model:o}},{"../component":"models/component",underscore:"underscore"}],"models/layouts/vbox":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("underscore"),r=t("jquery"),u=t("../../common/build_views"),i=t("../../common/continuum_view"),o=t("./basebox"),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.tag="div",e.prototype.attributes={"class":"bk-vbox"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.views={},this.render(),this.listenTo(this.model,"change",this.render)},e.prototype.render=function(){var t,e,n,o,i,s,a,l,h,p,_;e=this.model.children(),u(this.views,e),a=this.views;for(i in a)c.call(a,i)&&(p=a[i],p.$el.detach());for(this.$el.empty(),_=this.mget("width"),null!=_&&this.$el.css({width:_+"px"}),n=this.mget("height"),null!=n?(this.$el.css({height:n+"px"}),h=n/(2*e.length)):h=20,l=r("<div>").addClass("bk-vbox-spacer").css({height:h}),this.$el.append(r(l)),o=0,s=e.length;s>o;o++)t=e[o],this.$el.append(this.views[t.id].$el),this.$el.append(r(l));return this},e}(i),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="VBox",e.prototype.default_view=a,e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{children:[]})},e.prototype.children=function(){return this.get("children")},e}(o.Model),e.exports={Model:s,View:a}},{"../../common/build_views":"common/build_views","../../common/continuum_view":"common/continuum_view","./basebox":"models/layouts/basebox",jquery:"jquery",underscore:"underscore"}],"models/layouts/vboxform":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),l=t("../../common/build_views"),r=t("../../common/continuum_view"),o=t("./vbox"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.tagName="form",e.prototype.attributes={"class":"bk-widget-form",role:"form"},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.views={},this.render()},e.prototype.render=function(){var t,e,n,r,o,i,s;e=this.model.children(),l(this.views,e),i=this.views;for(r in i)h.call(i,r)&&(s=i[r],s.$el.detach());for(this.$el.empty(),n=0,o=e.length;o>n;n++)t=e[n],this.$el.append("<br/"),this.$el.append(this.views[t.id].$el);return this},e}(r),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="VBoxForm",e.prototype.default_view=s,e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{children:[]})},e.prototype.children=function(){return this.get("children")},e}(o.Model),e.exports={Model:i,View:s}},{"../../common/build_views":"common/build_views","../../common/continuum_view":"common/continuum_view","./vbox":"models/layouts/vbox",underscore:"underscore"}],"models/mappers/categorical_mapper":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("./linear_mapper"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.map_to_target=function(t,n){var r,o,s,a,l,u;return null==n&&(n=!1),i.isNumber(t)?n?t:e.__super__.map_to_target.call(this,t):(a=this.get("source_range"),o=a.get("factors"),t.indexOf(":")>=0?(l=t.split(":"),r=l[0],s=l[1],s=parseFloat(s),u=o.indexOf(r)+.5+a.get("offset")+s):u=o.indexOf(t)+1+a.get("offset"),n?u:e.__super__.map_to_target.call(this,u))},e.prototype.v_map_to_target=function(t,n){var r,o,s,a,l,u,h,c,p,_;if(null==n&&(n=!1),i.isNumber(t[0]))return n?t:e.__super__.v_map_to_target.call(this,t);for(u=this.get("source_range"),o=u.get("factors"),p=Array(t.length),s=a=0,h=t.length;h>=0?h>a:a>h;s=h>=0?++a:--a)_=t[s],_.indexOf(":")>=0?(c=_.split(":"),r=c[0],l=c[1],l=parseFloat(l),p[s]=o.indexOf(r)+.5+u.get("offset")+l):p[s]=o.indexOf(_)+1+u.get("offset");return n?p:e.__super__.v_map_to_target.call(this,p)},e.prototype.map_from_target=function(t,n){var r,o;return null==n&&(n=!1),t=e.__super__.map_from_target.call(this,t),n?t:(o=this.get("source_range"),r=o.get("factors"),r[Math.floor(t-.5-o.get("offset"))])},e.prototype.v_map_from_target=function(t,n){var r,o,i,s,a,l,u,h,c;for(null==n&&(n=!1),c=e.__super__.v_map_from_target.call(this,t),o=i=0,l=c.length;l>=0?l>i:i>l;o=l>=0?++i:--i)c[o]=c[o];if(n)return c;for(h=Array(c),a=this.get("source_range"),r=a.get("factors"),o=s=0,u=t.length;u>=0?u>s:s>u;o=u>=0?++s:--s)h[o]=r[Math.floor(c[o]-.5-a.get("offset"))];return h},e}(o.Model),e.exports={Model:r}},{"./linear_mapper":"models/mappers/linear_mapper",underscore:"underscore"}],"models/mappers/grid_mapper":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=t("../../model"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.map_to_target=function(t,e){var n,r;return n=this.get("domain_mapper").map_to_target(t),r=this.get("codomain_mapper").map_to_target(e),[n,r]},e.prototype.v_map_to_target=function(t,e){var n,r;return n=this.get("domain_mapper").v_map_to_target(t),r=this.get("codomain_mapper").v_map_to_target(e),[n,r]},e.prototype.map_from_target=function(t,e){var n,r;return n=this.get("domain_mapper").map_from_target(t),r=this.get("codomain_mapper").map_from_target(e),[n,r]},e.prototype.v_map_from_target=function(t,e){var n,r;return n=this.get("domain_mapper").v_map_from_target(t),r=this.get("codomain_mapper").v_map_from_target(e),[n,r]},e}(o),e.exports={Model:r}},{"../../model":"model"}],"models/mappers/linear_color_mapper":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("../../model"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.palette=this._build_palette(this.get("palette")),this.little_endian=this._is_little_endian(),null!=this.get("reserve_color")?(this.reserve_color=parseInt(this.get("reserve_color").slice(1),16),this.reserve_val=this.get("reserve_val")):void 0},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{high:null,low:null,palette:null,reserve_val:null,reserve_color:"#ffffff"})},e.prototype.v_map_screen=function(t){var e,n,r,o,s,a,l,u,h,c,p,_,d,f,m,g;if(n=new ArrayBuffer(4*t.length),r=new Uint32Array(n),h=null!=(p=this.get("low"))?p:i.min(t),s=null!=(_=this.get("high"))?_:i.max(t),e=this.palette.length-1,m=e/(s-h),c=-m*h,this.little_endian)for(a=l=0,d=t.length;d>=0?d>l:l>d;a=d>=0?++l:--l)o=t[a],o===this.reserve_val?g=this.reserve_color:(o>s&&(o=s),h>o&&(o=h),g=this.palette[Math.floor(o*m+c)]),r[a]=255<<24|(16711680&g)>>16|65280&g|(255&g)<<16;else for(a=u=0,f=t.length;f>=0?f>u:u>f;a=f>=0?++u:--u)o=t[a],o===this.reserve_val?g=this.reserve_color:(o>s&&(o=s),h>o&&(o=h),g=this.palette[Math.floor(o*m+c)]),r[a]=g<<8|255;return n},e.prototype._is_little_endian=function(){var t,e,n,r;return t=new ArrayBuffer(4),n=new Uint8ClampedArray(t),e=new Uint32Array(t),e[1]=168496141,r=!0,10===n[4]&&11===n[5]&&12===n[6]&&13===n[7]&&(r=!1),r},e.prototype._build_palette=function(t){var e,n,r,o,s;for(o=new Uint32Array(t.length+1),e=function(t){return i.isNumber(t)?t:parseInt(t.slice(1),16)},n=r=0,s=t.length;s>=0?s>r:r>s;n=s>=0?++r:--r)o[n]=e(t[n]);return o[o.length-1]=e(t[t.length-1]),o},e}(o),e.exports={Model:r}},{"../../model":"model",underscore:"underscore"}],"models/mappers/linear_mapper":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=t("../../model"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("mapper_state",this._mapper_state,!0),this.add_dependencies("mapper_state",this,["source_range","target_range"]),this.add_dependencies("mapper_state",this.get("source_range"),["start","end"]),this.add_dependencies("mapper_state",this.get("target_range"),["start","end"])},e.prototype.map_to_target=function(t){var e,n,r;return n=this.get("mapper_state"),r=n[0],e=n[1],r*t+e},e.prototype.v_map_to_target=function(t){var e,n,r,o,i,s,a,l;for(i=this.get("mapper_state"),a=i[0],o=i[1],s=new Float64Array(t.length),n=e=0,r=t.length;r>e;n=++e)l=t[n],s[n]=a*l+o;return s},e.prototype.map_from_target=function(t){var e,n,r;return n=this.get("mapper_state"),r=n[0],e=n[1],(t-e)/r},e.prototype.v_map_from_target=function(t){var e,n,r,o,i,s,a,l;for(i=this.get("mapper_state"),a=i[0],o=i[1],s=new Float64Array(t.length),n=e=0,r=t.length;r>e;n=++e)l=t[n],s[n]=(l-o)/a;return s},e.prototype._mapper_state=function(){var t,e,n,r,o,i;return r=this.get("source_range").get("start"),n=this.get("source_range").get("end"),i=this.get("target_range").get("start"),o=this.get("target_range").get("end"),e=(o-i)/(n-r),t=-(e*r)+i,[e,t]},e}(o),e.exports={Model:r}},{"../../model":"model"}],"models/mappers/log_mapper":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=t("../../model"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("mapper_state",this._mapper_state,!0),this.add_dependencies("mapper_state",this,["source_range","target_range"]),this.add_dependencies("mapper_state",this.get("source_range"),["start","end"]),this.add_dependencies("mapper_state",this.get("target_range"),["start","end"])},e.prototype.map_to_target=function(t){var e,n,r,o,i,s,a;return i=this.get("mapper_state"),a=i[0],o=i[1],n=i[2],e=i[3],s=0,0===n?r=0:(r=(Math.log(t)-e)/n,(isNaN(r)||!isFinite(r))&&(r=0)),s=r*a+o},e.prototype.v_map_to_target=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_;if(h=this.get("mapper_state"),
10 p=h[0],u=h[1],r=h[2],n=h[3],c=new Float64Array(t.length),0===r)o=t.map(function(t){return 0});else for(o=t.map(function(t){return(Math.log(t)-n)/r}),e=i=0,a=o.length;a>i;e=++i)_=o[e],(isNaN(o[e])||!isFinite(o[e]))&&(o[e]=0);for(e=s=0,l=t.length;l>s;e=++s)_=t[e],c[e]=o[e]*p+u;return c},e.prototype.map_from_target=function(t){var e,n,r,o,i,s;return i=this.get("mapper_state"),s=i[0],o=i[1],n=i[2],e=i[3],r=(t-o)/s,r=Math.exp(n*r+e)},e.prototype.v_map_from_target=function(t){var e,n,r,o,i,s,a,l,u,h,c;for(u=new Float64Array(t.length),l=this.get("mapper_state"),h=l[0],a=l[1],r=l[2],n=l[3],o=t.map(function(t){return(t-a)/h}),e=i=0,s=t.length;s>i;e=++i)c=t[e],u[e]=Math.exp(r*o[e]+n);return u},e.prototype._get_safe_scale=function(t,e){var n,r,o,i;return i=0>t?0:t,n=0>e?0:e,i===n&&(0===i?(o=[1,10],i=o[0],n=o[1]):(r=Math.log(i)/Math.log(10),i=Math.pow(10,Math.floor(r)),n=Math.ceil(r)!==Math.floor(r)?Math.pow(10,Math.ceil(r)):Math.pow(10,Math.ceil(r)+1))),[i,n]},e.prototype._mapper_state=function(){var t,e,n,r,o,i,s,a,l,u,h,c;return l=this.get("source_range").get("start"),a=this.get("source_range").get("end"),c=this.get("target_range").get("start"),h=this.get("target_range").get("end"),s=h-c,o=this._get_safe_scale(l,a),u=o[0],t=o[1],0===u?(n=Math.log(t),e=0):(n=Math.log(t)-Math.log(u),e=Math.log(u)),i=s,r=c,[i,r,n,e]},e}(o),e.exports={Model:r}},{"../../model":"model"}],"models/markers/asterisk":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./marker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p;for(c=n.sx,p=n.sy,h=n.size,r=n.angle,u=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(c[o]+p[o]+h[o]+r[o])||(a=h[o]/2,l=.65*a,t.beginPath(),t.translate(c[o],p[o]),r[o]&&t.rotate(r[o]),t.moveTo(0,a),t.lineTo(0,-a),t.moveTo(-a,0),t.lineTo(a,0),t.moveTo(-l,l),t.lineTo(l,-l),t.moveTo(-l,-l),t.lineTo(l,l),r[o]&&t.rotate(-r[o]),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),t.stroke()),u.push(t.translate(-c[o],-p[o])));return u},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="Asterisk",e.prototype.props=["line"],e}(i.Model),e.exports={Model:r,View:o}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/circle_cross":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./marker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(a=u[o]/2,t.beginPath(),t.translate(h[o],c[o]),t.arc(0,0,a,0,2*Math.PI,!1),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),r[o]&&t.rotate(r[o]),t.moveTo(0,a),t.lineTo(0,-a),t.moveTo(-a,0),t.lineTo(a,0),r[o]&&t.rotate(-r[o]),t.stroke()),l.push(t.translate(-h[o],-c[o])));return l},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="CircleCross",e}(i.Model),e.exports={Model:r,View:o}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/circle_x":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./marker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(a=u[o]/2,t.beginPath(),t.translate(h[o],c[o]),t.arc(0,0,a,0,2*Math.PI,!1),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),r[o]&&t.rotate(r[o]),t.moveTo(-a,a),t.lineTo(a,-a),t.moveTo(-a,-a),t.lineTo(a,a),r[o]&&t.rotate(-r[o]),t.stroke()),l.push(t.translate(-h[o],-c[o])));return l},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="CircleX",e}(i.Model),e.exports={Model:r,View:o}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/cross":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./marker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(a=u[o]/2,t.beginPath(),t.translate(h[o],c[o]),r[o]&&t.rotate(r[o]),t.moveTo(0,a),t.lineTo(0,-a),t.moveTo(-a,0),t.lineTo(a,0),r[o]&&t.rotate(-r[o]),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),r[o]&&t.rotate(r[o]),t.stroke(),r[o]&&t.rotate(-r[o])),l.push(t.translate(-h[o],-c[o])));return l},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="Cross",e.prototype.props=["line"],e}(i.Model),e.exports={Model:r,View:o}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/diamond":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./marker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(a=u[o]/2,t.beginPath(),t.translate(h[o],c[o]),r[o]&&t.rotate(r[o]),t.moveTo(0,a),t.lineTo(a/1.5,0),t.lineTo(0,-a),t.lineTo(-a/1.5,0),r[o]&&t.rotate(-r[o]),t.translate(-h[o],-c[o]),t.closePath(),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.do_stroke?(this.visuals.line.set_vectorize(t,o),l.push(t.stroke())):l.push(void 0));return l},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="Diamond",e}(i.Model),e.exports={Model:r,View:o}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/diamond_cross":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./marker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(a=u[o]/2,t.beginPath(),t.translate(h[o],c[o]),r[o]&&t.rotate(r[o]),t.moveTo(0,a),t.lineTo(a/1.5,0),t.lineTo(0,-a),t.lineTo(-a/1.5,0),r[o]&&t.rotate(-r[o]),t.closePath(),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),r[o]&&t.rotate(r[o]),t.moveTo(0,a),t.lineTo(0,-a),t.moveTo(-a/1.5,0),t.lineTo(a/1.5,0),r[o]&&t.rotate(-r[o]),t.stroke()),l.push(t.translate(-h[o],-c[o])));return l},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="DiamondCross",e}(i.Model),e.exports={Model:r,View:o}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/inverted_triangle":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),i=t("./marker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_;for(p=n.sx,_=n.sy,c=n.size,o=n.angle,h=[],a=0,l=e.length;l>a;a++)s=e[a],isNaN(p[s]+_[s]+c[s]+o[s])||(r=c[s]*Math.sqrt(3)/6,u=c[s]/2,i=c[s]*Math.sqrt(3)/2,t.beginPath(),t.translate(p[s],_[s]),o[s]&&t.rotate(o[s]),t.moveTo(-u,-r),t.lineTo(u,-r),t.lineTo(0,-r+i),o[s]&&t.rotate(-o[s]),t.translate(-p[s],-_[s]),t.closePath(),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,s),t.fill()),this.visuals.line.do_stroke?(this.visuals.line.set_vectorize(t,s),h.push(t.stroke())):h.push(void 0));return h},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=o,e.prototype.type="InvertedTriangle",e}(i.Model),e.exports={Model:r,View:o}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/marker":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),r=t("../glyphs/glyph"),a=t("../../common/hittest"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.draw_legend=function(t,e,n,r,o){var i,s,a,l,u,h,c,p;return u=null!=(l=this.get_reference_point())?l:0,a=[u],c={},c[u]=(e+n)/2,p={},p[u]=(r+o)/2,h={},h[u]=.4*Math.min(Math.abs(n-e),Math.abs(o-r)),i={},i[u]=0,s={sx:c,sy:p,size:h,angle:i},this._render(t,a,s)},e.prototype._index_data=function(){return this._xy_index()},e.prototype._mask_data=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f;return e=this.renderer.plot_view.frame.get("h_range"),a=e.get("start")-this.max_size,l=e.get("end")+this.max_size,n=this.renderer.xmapper.v_map_from_target([a,l],!0),p=n[0],_=n[1],r=[Math.min(p,_),Math.max(p,_)],p=r[0],_=r[1],s=this.renderer.plot_view.frame.get("v_range"),u=s.get("start")-this.max_size,h=s.get("end")+this.max_size,o=this.renderer.ymapper.v_map_from_target([u,h],!0),d=o[0],f=o[1],i=[Math.min(d,f),Math.max(d,f)],d=i[0],f=i[1],function(){var t,e,n,r;for(n=this.index.search([p,d,_,f]),r=[],t=0,e=n.length;e>t;t++)c=n[t],r.push(c[4].i);return r}.call(this)},e.prototype._hit_point=function(t){var e,n,r,o,i,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T;for(u=[t.vx,t.vy],m=u[0],v=u[1],d=this.renderer.plot_view.canvas.vx_to_sx(m),f=this.renderer.plot_view.canvas.vy_to_sy(v),g=m-this.max_size,y=m+this.max_size,h=this.renderer.xmapper.v_map_from_target([g,y],!0),k=h[0],M=h[1],b=v-this.max_size,x=v+this.max_size,c=this.renderer.ymapper.v_map_from_target([b,x],!0),j=c[0],T=c[1],e=function(){var t,e,n,r;for(n=this.index.search([k,j,M,T]),r=[],t=0,e=n.length;e>t;t++)w=n[t],r.push(w[4].i);return r}.call(this),r=[],i=0,l=e.length;l>i;i++)o=e[i],_=this.size[o]/2,n=Math.abs(this.sx[o]-d)+Math.abs(this.sy[o]-f),Math.abs(this.sx[o]-d)<=_&&Math.abs(this.sy[o]-f)<=_&&r.push([o,n]);return p=a.create_hit_test_result(),p["1d"].indices=s.chain(r).sortBy(function(t){return t[1]}).map(function(t){return t[0]}).value(),p},e.prototype._hit_rect=function(t){var e,n,r,o,i,s,l,u;return e=this.renderer.xmapper.v_map_from_target([t.vx0,t.vx1],!0),i=e[0],s=e[1],n=this.renderer.ymapper.v_map_from_target([t.vy0,t.vy1],!0),l=n[0],u=n[1],r=a.create_hit_test_result(),r["1d"].indices=function(){var t,e,n,r;for(n=this.index.search([i,l,s,u]),r=[],t=0,e=n.length;e>t;t++)o=n[t],r.push(o[4].i);return r}.call(this),r},e.prototype._hit_poly=function(t){var e,n,r,o,i,s,l,u,h,c,p,_,d;for(s=[t.vx,t.vy],_=s[0],d=s[1],c=this.renderer.plot_view.canvas.v_vx_to_sx(_),p=this.renderer.plot_view.canvas.v_vy_to_sy(d),e=function(){h=[];for(var t=0,e=this.sx.length;e>=0?e>t:t>e;e>=0?t++:t--)h.push(t);return h}.apply(this),n=[],r=i=0,l=e.length;l>=0?l>i:i>l;r=l>=0?++i:--i)o=e[r],a.point_in_poly(this.sx[r],this.sy[r],c,p)&&n.push(o);return u=a.create_hit_test_result(),u["1d"].indices=n,u},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.distances=["size"],e.prototype.angles=["angle"],e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{size:{units:"screen",value:4},angle:0})},e}(r.Model),e.exports={Model:o,View:i}},{"../../common/hittest":"common/hittest","../glyphs/glyph":"models/glyphs/glyph",underscore:"underscore"}],"models/markers/square":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),r=t("./marker"),a=t("../glyphs/bokehgl"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._init_gl=function(t){return this.glglyph=new a.SquareGLGlyph(t,this)},e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h;for(u=n.sx,h=n.sy,l=n.size,r=n.angle,a=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(u[o]+h[o]+l[o]+r[o])||(t.beginPath(),t.translate(u[o],h[o]),r[o]&&t.rotate(r[o]),t.rect(-l[o]/2,-l[o]/2,l[o],l[o]),r[o]&&t.rotate(-r[o]),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),t.stroke()),a.push(t.translate(-u[o],-h[o])));return a},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="Square",e}(r.Model),e.exports={Model:o,View:i}},{"../glyphs/bokehgl":"models/glyphs/bokehgl","./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/square_cross":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./marker"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(t.beginPath(),t.translate(h[o],c[o]),r[o]&&t.rotate(r[o]),t.rect(-u[o]/2,-u[o]/2,u[o],u[o]),r[o]&&t.rotate(-r[o]),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),a=u[o]/2,r[o]&&t.rotate(r[o]),t.moveTo(0,a),t.lineTo(0,-a),t.moveTo(-a,0),t.lineTo(a,0),r[o]&&t.rotate(-r[o]),t.stroke()),l.push(t.translate(-h[o],-c[o])));return l},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="SquareCross",e}(r.Model),e.exports={Model:o,View:i}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/square_x":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./marker"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(t.beginPath(),t.translate(h[o],c[o]),r[o]&&t.rotate(r[o]),t.rect(-u[o]/2,-u[o]/2,u[o],u[o]),r[o]&&t.rotate(-r[o]),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,o),t.fill()),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),t.stroke(),a=u[o]/2,r[o]&&t.rotate(r[o]),t.moveTo(-a,a),t.lineTo(a,-a),t.moveTo(-a,-a),t.lineTo(a,a),r[o]&&t.rotate(-r[o]),t.stroke()),l.push(t.translate(-h[o],-c[o])));return l},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="SquareX",e}(r.Model),e.exports={Model:o,View:i}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/triangle":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./marker"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_;for(p=n.sx,_=n.sy,c=n.size,o=n.angle,h=[],a=0,l=e.length;l>a;a++)s=e[a],isNaN(p[s]+_[s]+c[s]+o[s])||(r=c[s]*Math.sqrt(3)/6,u=c[s]/2,i=c[s]*Math.sqrt(3)/2,t.beginPath(),t.translate(p[s],_[s]),o[s]&&t.rotate(o[s]),t.moveTo(-u,r),t.lineTo(u,r),t.lineTo(0,r-i),o[s]&&t.rotate(-o[s]),t.translate(-p[s],-_[s]),t.closePath(),this.visuals.fill.do_fill&&(this.visuals.fill.set_vectorize(t,s),t.fill()),this.visuals.line.do_stroke?(this.visuals.line.set_vectorize(t,s),h.push(t.stroke())):h.push(void 0));return h},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="Triangle",e}(r.Model),e.exports={Model:o,View:i}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/markers/x":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./marker"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._render=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(h=n.sx,c=n.sy,u=n.size,r=n.angle,l=[],i=0,s=e.length;s>i;i++)o=e[i],isNaN(h[o]+c[o]+u[o]+r[o])||(a=u[o]/2,t.beginPath(),t.translate(h[o],c[o]),r[o]&&t.rotate(r[o]),t.moveTo(-a,a),t.lineTo(a,-a),t.moveTo(-a,-a),t.lineTo(a,a),r[o]&&t.rotate(-r[o]),this.visuals.line.do_stroke&&(this.visuals.line.set_vectorize(t,o),t.stroke()),l.push(t.translate(-h[o],-c[o])));return l},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="X",e.prototype.props=["line"],e}(r.Model),e.exports={Model:o,View:i}},{"./marker":"models/markers/marker",underscore:"underscore"}],"models/plots/gmap_plot":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){return function(){return t.apply(e,arguments)}},c=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;a=t("underscore"),s=t("../../common/solver"),i=t("./plot"),l=t("proj4"),u=l.defs("GOOGLE"),o=function(t){function e(){return this.setRanges=h(this.setRanges,this),this.getProjectedBounds=h(this.getProjectedBounds,this),this.getLatLngBounds=h(this.getLatLngBounds,this),e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,a.defaults(t,this.default_options)),this.zoom_count=0},e.prototype.getLatLngBounds=function(){var t,e,n,r,o,i,s;return e=this.map.getBounds(),n=e.getNorthEast(),t=e.getSouthWest(),o=t.lng(),r=n.lng(),s=t.lat(),i=n.lat(),[o,r,s,i]},e.prototype.getProjectedBounds=function(){var t,e,n,r,o,i,s,a,h,c,p;return o=this.getLatLngBounds(),h=o[0],a=o[1],p=o[2],c=o[3],i=l(u,[h,p]),e=i[0],r=i[1],s=l(u,[a,c]),t=s[0],n=s[1],[e,t,r,n]},e.prototype.setRanges=function(){var t,e,n,r,o;return o=this.getProjectedBounds(),e=o[0],t=o[1],r=o[2],n=o[3],this.x_range.set({start:e,end:t,silent:!0}),this.y_range.set({start:r,end:n,silent:!0})},e.prototype.update_range=function(t){var n,r,o,i,s,a,l,u;if(this.pause(),(null!=t.sdx||null!=t.sdy)&&(this.map.panBy(t.sdx,t.sdy),e.__super__.update_range.call(this,t)),null!=t.factor){if(10!==this.zoom_count)return void(this.zoom_count+=1);this.zoom_count=0,e.__super__.update_range.call(this,t),u=t.factor<0?-1:1,r=this.map.getZoom(),n=r+u,n>=2&&(this.map.setZoom(n),l=this.getProjectedBounds(),i=l[0],o=l[1],a=l[2],s=l[3],0>o-i&&this.map.setZoom(r)),this.setRanges()}return this.unpause()},e.prototype.bind_bokeh_events=function(){var t,n,r,o,i,s;return e.__super__.bind_bokeh_events.call(this),s=this.frame.get("width"),n=this.frame.get("height"),r=this.canvas.vx_to_sx(this.frame.get("left")),i=this.canvas.vy_to_sy(this.frame.get("top")),this.canvas_view.map_div.attr("style","top: "+i+"px; left: "+r+"px; position: absolute"),this.canvas_view.map_div.attr("style","width:"+s+"px;"),this.canvas_view.map_div.attr("style","height:"+n+"px;"),this.canvas_view.map_div.width(s+"px").height(n+"px"),this.initial_zoom=this.mget("map_options").zoom,t=function(t){return function(){var e,n,r,o;return r=window.google.maps,n={satellite:r.MapTypeId.SATELLITE,terrain:r.MapTypeId.TERRAIN,roadmap:r.MapTypeId.ROADMAP,hybrid:r.MapTypeId.HYBRID},o=t.mget("map_options"),e={center:new r.LatLng(o.lat,o.lng),zoom:o.zoom,disableDefaultUI:!0,mapTypeId:n[o.map_type]},null!=o.styles&&(e.styles=JSON.parse(o.styles)),t.map=new r.Map(t.canvas_view.map_div[0],e),r.event.addListenerOnce(t.map,"idle",t.setRanges)}}(this),null==window._bokeh_gmap_loads&&(window._bokeh_gmap_loads=[]),null!=window.google&&null!=window.google.maps?a.defer(t):null!=window._bokeh_gmap_callback?window._bokeh_gmap_loads.push(t):(window._bokeh_gmap_loads.push(t),window._bokeh_gmap_callback=function(){return a.each(window._bokeh_gmap_loads,a.defer)},o=document.createElement("script"),o.type="text/javascript",o.src="https://maps.googleapis.com/maps/api/js?v=3&callback=_bokeh_gmap_callback",document.body.appendChild(o))},e.prototype._map_hook=function(t,e){var n,r,o,i;return r=e[0],o=e[1],i=e[2],n=e[3],this.canvas_view.map_div.attr("style","top: "+o+"px; left: "+r+"px;"),this.canvas_view.map_div.width(i+"px").height(n+"px")},e.prototype._paint_empty=function(t,e){var n,r,o,i,s,a;return s=this.canvas.get("width"),i=this.canvas.get("height"),o=e[0],a=e[1],r=e[2],n=e[3],t.clearRect(0,0,s,i),t.beginPath(),t.moveTo(0,0),t.lineTo(0,i),t.lineTo(s,i),t.lineTo(s,0),t.lineTo(0,0),t.moveTo(o,a),t.lineTo(o+r,a),t.lineTo(o+r,a+n),t.lineTo(o,a+n),t.lineTo(o,a),t.closePath(),t.fillStyle=this.mget("border_fill"),t.fill()},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="GMapPlot",e.prototype.default_view=o,e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{map_options:null,disabled:!1})},e.prototype.initialize=function(t,n){return this.use_map=!0,e.__super__.initialize.call(this,t,n)},e}(i.Model),e.exports={Model:r,View:o}},{"../../common/solver":"common/solver","./plot":"models/plots/plot",proj4:"proj4",underscore:"underscore"}],"models/plots/plot":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O=function(t,e){return function(){return t.apply(e,arguments)}},N=function(t,e){function n(){this.constructor=t}for(var r in e)q.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},q={}.hasOwnProperty,F=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};M=t("underscore"),r=t("jquery"),o=t("backbone"),E=t("kiwi"),c=E.Expression,l=E.Constraint,g=E.Operator,h=g.Eq,f=g.Le,p=g.Ge,j=t("../../common/build_views"),i=t("../../common/canvas"),s=t("../../common/cartesian_frame"),u=t("../../common/continuum_view"),k=t("../../common/ui_events"),a=t("../component"),d=t("../../common/layout_box"),P=t("../../common/logging").logger,C=t("../../common/plot_utils"),b=t("../../common/solver"),w=t("../../common/tool_manager"),S=t("../../common/plot_template"),A=t("../../common/properties"),_=t("../renderers/glyph_renderer"),x=t("../../common/tool_events"),z=null,m=50,T=function(t){return function(t,e,n,r,o,i){var s,a,l,u;return t&&(l=Math.max(n,i),s=parseInt(l/o),i>s&&(s=i,l=parseInt(s*o))),e&&(a=Math.max(r,i),u=parseInt(a*o),i>u&&(u=i,a=parseInt(u/o))),e||t?e&&t?u>l?[l,s]:[u,a]:e?[u,a]:[l,s]:null}}(this),v=function(t){function e(){return this.resize_width_height=O(this.resize_width_height,this),this.resize=O(this.resize,this),this.remove=O(this.remove,this),this.request_render=O(this.request_render,this),e.__super__.constructor.apply(this,arguments)}return N(e,t),e.prototype.className="bk-plot",e.prototype.template=S,e.prototype.state={history:[],index:-1},e.prototype.view_options=function(){return M.extend({plot_model:this.model,plot_view:this},this.options)},e.prototype.pause=function(){return this.is_paused=!0},e.prototype.unpause=function(){return this.is_paused=!1,this.request_render()},e.prototype.request_render=function(){this.is_paused||this.throttled_render(!0)},e.prototype.remove=function(){var t,n,r,o;e.__super__.remove.call(this),n=this.tools,r=[];for(t in n)o=n[t],r.push(o.remove());return r},e.prototype.initialize=function(t){var n,o,i,s,a,l,u,h,c,p;for(e.__super__.initialize.call(this,t),this.pause(),this._initial_state_info={range:null,selection:{},dimensions:{width:this.mget("canvas").get("width"),height:this.mget("canvas").get("height")}},this.model.initialize_layout(this.model.solver),this.frame=this.mget("frame"),this.x_range=this.frame.get("x_ranges")["default"],this.y_range=this.frame.get("y_ranges")["default"],this.xmapper=this.frame.get("x_mappers")["default"],this.ymapper=this.frame.get("y_mappers")["default"],this.$el.html(this.template()),this.canvas=this.mget("canvas"),this.canvas_view=new this.canvas.default_view({model:this.canvas}),this.$(".bk-plot-canvas-wrapper").append(this.canvas_view.el),this.canvas_view.render(),(this.mget("webgl")||window.location.search.indexOf("webgl=1")>0)&&-1===window.location.search.indexOf("webgl=0")&&this.init_webgl(),this.throttled_render=C.throttle_animation(this.render,15),this.outline_props=new A.Line({obj:this.model,prefix:"outline_"}),this.title_props=new A.Text({obj:this.model,prefix:"title_"}),this.background_props=new A.Fill({obj:this.model,prefix:"background_"}),this.border_props=new A.Fill({obj:this.model,prefix:"border_"}),this.renderers={},this.tools={},this.levels={},a=C.LEVELS,o=0,i=a.length;i>o;o++)s=a[o],this.levels[s]={};this.build_levels(),this.bind_bokeh_events(),this.model.add_constraints(this.canvas.solver),this.listenTo(this.canvas.solver,"layout_update",this.request_render),this.ui_event_bus=new k({tool_manager:this.mget("tool_manager"),hit_area:this.canvas_view.$el}),l=this.tools;for(n in l)h=l[n],this.ui_event_bus.register_tool(h);return c=this.mget("toolbar_location"),null!=c&&(p=".bk-plot-"+c,P.debug("attaching toolbar to "+p+" for plot "+this.model.id),this.tm_view=new w.View({model:this.mget("tool_manager"),el:this.$(p)})),this.update_dataranges(),this.mget("responsive")&&(u=M.throttle(this.resize,100),r(window).on("resize",u),M.delay(this.resize,10)),this.unpause(),P.debug("PlotView initialized"),this},e.prototype.init_webgl=function(){var t,e;return t=z,null==t&&(z=t=document.createElement("canvas"),e={premultipliedAlpha:!0},t.gl=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)),null!=t.gl?this.canvas_view.ctx.glcanvas=t:P.warn("WebGL is not supported, falling back to 2D canvas.")},e.prototype.update_dataranges=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w;r=this.model.get("frame"),e={},d=this.renderers;for(s in d)b=d[s],t=null!=(f=b.glyph)&&"function"==typeof f.bounds?f.bounds():void 0,null!=t&&(e[s]=t);for(n=!1,o=!1,m=M.values(r.get("x_ranges")),i=0,l=m.length;l>i;i++)x=m[i],"function"==typeof x.update&&x.update(e,0,this.model.id),null!=x.get("follow")&&(n=!0),null!=x.get("bounds")&&(o=!0);for(g=M.values(r.get("y_ranges")),a=0,u=g.length;u>a;a++)w=g[a],"function"==typeof w.update&&w.update(e,1,this.model.id),null!=w.get("follow")&&(n=!0),null!=w.get("bounds")&&(o=!0);if(n&&o){for(P.warn("Follow enabled so bounds are unset."),y=M.values(r.get("x_ranges")),p=0,h=y.length;h>p;p++)x=y[p],x.set("bounds",null);for(v=M.values(r.get("y_ranges")),_=0,c=v.length;c>_;_++)w=v[_],w.set("bounds",null)}return this.range_update_timestamp=Date.now()},e.prototype.map_to_screen=function(t,e,n,r){return null==n&&(n="default"),null==r&&(r="default"),this.frame.map_to_screen(t,e,this.canvas,n,r)},e.prototype.push_state=function(t,e){var n,r;return n=(null!=(r=this.state.history[this.state.index])?r.info:void 0)||{},e=M.extend({},this._initial_state_info,n,e),this.state.history.slice(0,this.state.index+1),this.state.history.push({type:t,info:e}),this.state.index=this.state.history.length-1,this.trigger("state_changed")},e.prototype.clear_state=function(){return this.state={history:[],index:-1},this.trigger("state_changed")},e.prototype.can_undo=function(){return this.state.index>=0},e.prototype.can_redo=function(){return this.state.index<this.state.history.length-1},e.prototype.undo=function(){return this.can_undo()?(this.state.index-=1,this._do_state_change(this.state.index),this.trigger("state_changed")):void 0},e.prototype.redo=function(){return this.can_redo()?(this.state.index+=1,this._do_state_change(this.state.index),this.trigger("state_changed")):void 0},e.prototype._do_state_change=function(t){var e,n;return e=(null!=(n=this.state.history[t])?n.info:void 0)||this._initial_state_info,null!=e.range&&this.update_range(e.range),null!=e.selection&&this.update_selection(e.selection),null!=e.dimensions?this.update_dimensions(e.dimensions):void 0},e.prototype.update_dimensions=function(t){return this.canvas._set_dims([t.width,t.height])},e.prototype.reset_dimensions=function(){return this.update_dimensions({width:this.canvas.get("canvas_width"),height:this.canvas.get("canvas_height")})},e.prototype.get_selection=function(){var t,e,n,r,o,i;for(i=[],n=this.mget("renderers"),t=0,e=n.length;e>t;t++)r=n[t],r instanceof _.Model&&(o=r.get("data_source").get("selected"),i[r.id]=o);return i},e.prototype.update_selection=function(t){var e,n,r,o,i,s,a;for(o=this.mget("renderers"),a=[],n=0,r=o.length;r>n;n++)s=o[n],s instanceof _.Model&&(e=s.get("data_source"),null!=t?(i=s.id,F.call(t,i)>=0?a.push(e.set("selected",t[s.id])):a.push(void 0)):a.push(e.get("selection_manager").clear()));return a},e.prototype.reset_selection=function(){return this.update_selection(null)},e.prototype._update_single_range=function(t,e,n){var r,o,i,s;return s=t.get("start")>t.get("end")?!0:!1,null!=t.get("bounds")&&(o=t.get("bounds")[0],r=t.get("bounds")[1],s?(null!=o&&o>=e.end&&(e.end=o,null!=n&&(e.start=t.get("start"))),null!=r&&r<=e.start&&(e.start=r,null!=n&&(e.end=t.get("end")))):(null!=o&&o>=e.start&&(e.start=o,null!=n&&(e.end=t.get("end"))),null!=r&&r<=e.end&&(e.end=r,null!=n&&(e.start=t.get("start"))))),t.get("start")!==e.start||t.get("end")!==e.end?(t.have_updated_interactively=!0,t.set(e),null!=(i=t.get("callback"))?i.execute(t):void 0):void 0},e.prototype.update_range=function(t,e){var n,r,o,i,s,a;if(this.pause,null==t){r=this.frame.get("x_ranges");for(n in r)a=r[n],a.reset();o=this.frame.get("y_ranges");for(n in o)a=o[n],a.reset();this.update_dataranges()}else{i=this.frame.get("x_ranges");for(n in i)a=i[n],this._update_single_range(a,t.xrs[n],e);s=this.frame.get("y_ranges");for(n in s)a=s[n],this._update_single_range(a,t.yrs[n],e)}return this.unpause();
11 },e.prototype.reset_range=function(){return this.update_range(null)},e.prototype.build_levels=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_;for(l=M.keys(this.renderers),_=j(this.renderers,this.mget("renderers"),this.view_options()),u=M.difference(l,M.pluck(this.mget("renderers"),"id")),e=0,r=u.length;r>e;e++)t=u[e],delete this.levels.glyph[t];for(c=j(this.tools,this.mget("tools"),this.view_options()),n=0,o=_.length;o>n;n++)p=_[n],s=p.mget("level"),this.levels[s][p.model.id]=p,p.bind_bokeh_events();for(a=0,i=c.length;i>a;a++)h=c[a],s=h.mget("level"),this.levels[s][h.model.id]=h,h.bind_bokeh_events();return this},e.prototype.bind_bokeh_events=function(){var t,e,n,r;e=this.mget("frame").get("x_ranges");for(t in e)r=e[t],this.listenTo(r,"change",this.request_render);n=this.mget("frame").get("y_ranges");for(t in n)r=n[t],this.listenTo(r,"change",this.request_render);return this.listenTo(this.model,"change:renderers",this.build_levels),this.listenTo(this.model,"change:tool",this.build_levels),this.listenTo(this.model,"change",this.request_render),this.listenTo(this.model,"destroy",function(t){return function(){return t.remove()}}(this))},e.prototype.set_initial_range=function(){var t,e,n,r,o,i,s;t=!0,i={},n=this.frame.get("x_ranges");for(e in n){if(o=n[e],null==o.get("start")||null==o.get("end")||M.isNaN(o.get("start")+o.get("end"))){t=!1;break}i[e]={start:o.get("start"),end:o.get("end")}}if(t){s={},r=this.frame.get("y_ranges");for(e in r){if(o=r[e],null==o.get("start")||null==o.get("end")||M.isNaN(o.get("start")+o.get("end"))){t=!1;break}s[e]={start:o.get("start"),end:o.get("end")}}}return t?(this._initial_state_info.range=this.initial_range_info={xrs:i,yrs:s},P.debug("initial ranges set")):P.warn("could not set initial ranges")},e.prototype.render=function(t){var n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k;null==t&&(t=!1),P.trace("Plot.render(force_canvas="+t+")"),Date.now()-this.interactive_timestamp<this.mget("lod_interval")?(this.interactive=!0,c=this.mget("lod_timeout"),setTimeout(function(t){return function(){return t.interactive&&Date.now()-t.interactive_timestamp>c&&(t.interactive=!1),t.request_render()}}(this),c)):this.interactive=!1,k=this.mget("plot_width"),u=this.mget("plot_height"),(this.canvas.get("canvas_width")!==k||this.canvas.get("canvas_height")!==u)&&this.canvas._set_dims([k,u],v=!1),e.__super__.render.call(this),this.canvas_view.render(t),null!=this.tm_view&&this.tm_view.render(),r=this.canvas_view.ctx,s=this.model.get("frame"),n=this.model.get("canvas"),p=this.renderers;for(h in p)b=p[h],null!=b.model.update_layout&&b.model.update_layout(b,this.canvas.solver);_=this.renderers;for(h in _)if(b=_[h],null==this.range_update_timestamp||b.set_data_timestamp>this.range_update_timestamp){this.update_dataranges();break}return y=this.mget("title"),y&&(this.title_props.set_value(this.canvas_view.ctx),g=r.measureText(this.mget("title")).ascent+this.model.get("title_standoff"),g!==this.model.title_panel.get("height")&&this.model.title_panel.set("height",g)),this.model.get("frame").set("width",n.get("width")-1),this.model.get("frame").set("height",n.get("height")-1),this.canvas.solver.update_variables(!1),this.model.get("frame")._update_mappers(),a=[this.canvas.vx_to_sx(this.frame.get("left")),this.canvas.vy_to_sy(this.frame.get("top")),this.frame.get("width"),this.frame.get("height")],this._map_hook(r,a),this._paint_empty(r,a),r.glcanvas&&(r.glcanvas.width=this.canvas_view.canvas[0].width,r.glcanvas.height=this.canvas_view.canvas[0].height,l=r.glcanvas.gl,l.viewport(0,0,r.glcanvas.width,r.glcanvas.height),l.clearColor(0,0,0,0),l.clear(l.COLOR_BUFFER_BIT||l.DEPTH_BUFFER_BIT),l.enable(l.SCISSOR_TEST),i=r.glcanvas.height-(a[1]+a[3]),l.scissor(a[0],i,a[2],a[3]),l.enable(l.BLEND),l.blendFuncSeparate(l.SRC_ALPHA,l.ONE_MINUS_SRC_ALPHA,l.ONE_MINUS_DST_ALPHA,l.ONE)),this.outline_props.do_stroke&&(this.outline_props.set_value(r),r.strokeRect.apply(r,a)),this._render_levels(r,["image","underlay","glyph","annotation"],a),r.glcanvas&&(d=.5,o=0,r.drawImage(r.glcanvas,d,d,r.glcanvas.width,r.glcanvas.height,o,o,r.glcanvas.width,r.glcanvas.height),P.debug("drawing with WebGL")),this._render_levels(r,["overlay","tool"]),y&&(x=function(){switch(this.title_props.align.value()){case"left":return 0;case"center":return this.canvas.get("width")/2;case"right":return this.canvas.get("width")}}.call(this),w=this.model.title_panel.get("bottom")+this.model.get("title_standoff"),f=this.canvas.vx_to_sx(x),m=this.canvas.vy_to_sy(w),this.title_props.set_value(r),r.fillText(y,f,m)),null==this.initial_range_info?this.set_initial_range():void 0},e.prototype.resize=function(){return this.resize_width_height(!0,!1)},e.prototype.resize_width_height=function(t,e,n){var r,o,i,s,a;if(null==n&&(n=!0),this._re_resized=this._re_resized||0,!this.el.parentNode&&this._re_resized<14)return setTimeout(function(r){return function(){return r.resize_width_height(t,e,n)}}(this),Math.pow(2,this._re_resized)),void(this._re_resized+=1);if(i=this.el.clientWidth,o=this.el.parentNode.clientHeight-50,s=this.mget("min_size"),n===!1){if(t&&e)return this.canvas._set_dims([Math.max(s,i),Math.max(s,o)]);if(t)return this.canvas._set_dims([Math.max(s,i),this.canvas.get("height")]);if(e)return this.canvas._set_dims([this.canvas.get("width"),Math.max(s,o)])}else if(r=this.canvas.get("width")/this.canvas.get("height"),a=T(t,e,i,o,r,s),null!=a)return this.canvas._set_dims(a)},e.prototype._render_levels=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m;for(t.save(),null!=n&&(t.beginPath(),t.rect.apply(t,n),t.clip(),t.beginPath()),o={},p=this.mget("renderers"),r=i=0,a=p.length;a>i;r=++i)_=p[r],o[_.id]=r;for(m=function(t){return o[t.model.id]},s=0,l=e.length;l>s;s++)for(h=e[s],f=M.sortBy(M.values(this.levels[h]),m),c=0,u=f.length;u>c;c++)d=f[c],d.render();return t.restore()},e.prototype._map_hook=function(t,e){},e.prototype._paint_empty=function(t,e){return this.border_props.set_value(t),t.fillRect(0,0,this.canvas_view.mget("width"),this.canvas_view.mget("height")),t.clearRect.apply(t,e),this.background_props.set_value(t),t.fillRect.apply(t,e)},e}(u),y=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return N(e,t),e.prototype.type="Plot",e.prototype.default_view=v,e.prototype.initialize=function(t,n){var r,o,s,a,l,u,h,c,p,_,d;for(e.__super__.initialize.call(this,t,n),h=M.values(this.get("extra_x_ranges")).concat(this.get("x_range")),o=0,a=h.length;a>o;o++)_=h[o],_=this.resolve_ref(_),u=_.get("plots"),M.isArray(u)&&(u=u.concat(this),_.set("plots",u));for(c=M.values(this.get("extra_y_ranges")).concat(this.get("y_range")),s=0,l=c.length;l>s;s++)d=c[s],d=this.resolve_ref(d),u=d.get("plots"),M.isArray(u)&&(u=u.concat(this),d.set("plots",u));return r=new i.Model({map:null!=(p=this.use_map)?p:!1,canvas_width:this.get("plot_width"),canvas_height:this.get("plot_height"),hidpi:this.get("hidpi"),solver:new b}),this.set("canvas",r),this.solver=r.get("solver"),this.set("tool_manager",new w.Model({tools:this.get("tools"),toolbar_location:this.get("toolbar_location"),logo:this.get("logo")})),P.debug("Plot initialized")},e.prototype.initialize_layout=function(t){var e,n,r;return n=function(e){return function(n,r){var o,i,s,a,l;for(a=e.get(n),o=null,i=0,s=a.length;s>i;i++)if(l=a[i],l.get("name")===r){o=l;break}return null!=o?o.set("solver",t):(o=new d.Model({name:r,solver:t}),a.push(o),e.set(n,a)),o}}(this),e=this.get("canvas"),r=new s.Model({x_range:this.get("x_range"),extra_x_ranges:this.get("extra_x_ranges"),x_mapper_type:this.get("x_mapper_type"),y_range:this.get("y_range"),extra_y_ranges:this.get("extra_y_ranges"),y_mapper_type:this.get("y_mapper_type"),solver:t}),this.set("frame",r),this.title_panel=n("above","title_panel"),this.title_panel._anchor=this.title_panel._bottom},e.prototype.add_constraints=function(t){var e,n,r,o,i;return i=this.get("min_border_top"),n=this.get("min_border_bottom"),r=this.get("min_border_left"),o=this.get("min_border_right"),e=function(t){return function(e,n,r,o,i,s){var a,u,_,f,m,g,y,v,b,x,w,k;for(f=t.get("canvas"),g=t.get("frame"),a=new d.Model({solver:e}),u="_"+o[0],_="_"+o[1],e.add_constraint(new l(new c(a["_"+i],-n),p),E.Strength.strong),e.add_constraint(new l(new c(g[u],[-1,a[_]]),h)),e.add_constraint(new l(new c(a[u],[-1,f[u]]),h)),v=g,m=t.get(r),y=0,b=m.length;b>y;y++)w=m[y],(null!=(k=w.get("location"))?k:!0)?w.set("layout_location",r,{silent:!0}):w.set("layout_location",w.get("location"),{silent:!0}),null!=w.initialize_layout&&w.initialize_layout(e),e.add_constraint(new l(new c(v[u],[-1,w[_]]),h),E.Strength.strong),v=w;return x=new d.Model({solver:e}),e.add_constraint(new l(new c(v[u],[-1,x[_]]),h),E.Strength.strong),e.add_constraint(new l(new c(x[u],[-1,f[u]]),h),E.Strength.strong)}}(this),e(t,i,"above",["top","bottom"],"height",f),e(t,n,"below",["bottom","top"],"height",p),e(t,r,"left",["left","right"],"width",p),e(t,o,"right",["right","left"],"width",f)},e.prototype.add_renderers=function(t){var e;return e=this.get("renderers"),e=e.concat(t),this.set("renderers",e)},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["solver","canvas","tool_manager","frame","min_size"])},e.prototype.serializable_attributes=function(){var t;return t=e.__super__.serializable_attributes.call(this),"renderers"in t&&(t.renderers=M.filter(t.renderers,function(t){return t.serializable_in_document()})),t},e.prototype.defaults=function(){return M.extend({},e.__super__.defaults.call(this),{renderers:[],tools:[],tool_events:new x.Model,h_symmetry:!0,v_symmetry:!1,x_mapper_type:"auto",y_mapper_type:"auto",plot_width:600,plot_height:600,title:"",above:[],below:[],left:[],right:[],toolbar_location:"above",logo:"normal",lod_factor:10,lod_interval:300,lod_threshold:2e3,lod_timeout:500,webgl:!1,responsive:!1,min_size:120,hidpi:!0,title_standoff:8,x_range:null,extra_x_ranges:{},y_range:null,extra_y_ranges:{},background_fill_color:"#ffffff",background_fill_alpha:1,border_fill_color:"#ffffff",border_fill_alpha:1,min_border:m,min_border_top:m,min_border_left:m,min_border_bottom:m,min_border_right:m,title_text_font:"helvetica",title_text_font_size:"20pt",title_text_font_style:"normal",title_text_color:"#444444",title_text_alpha:1,title_text_align:"center",title_text_baseline:"alphabetic",outline_line_color:"#aaaaaa",outline_line_width:1,outline_line_alpha:1,outline_line_join:"miter",outline_line_cap:"butt",outline_line_dash:[],outline_line_dash_offset:0})},e}(a.Model),e.exports={get_size_for_available_space:T,Model:y,View:v}},{"../../common/build_views":"common/build_views","../../common/canvas":"common/canvas","../../common/cartesian_frame":"common/cartesian_frame","../../common/continuum_view":"common/continuum_view","../../common/layout_box":"common/layout_box","../../common/logging":"common/logging","../../common/plot_template":"common/plot_template","../../common/plot_utils":"common/plot_utils","../../common/properties":"common/properties","../../common/solver":"common/solver","../../common/tool_events":"common/tool_events","../../common/tool_manager":"common/tool_manager","../../common/ui_events":"common/ui_events","../component":"models/component","../renderers/glyph_renderer":"models/renderers/glyph_renderer",backbone:"backbone",jquery:"jquery",kiwi:"kiwi",underscore:"underscore"}],"models/ranges/data_range":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("./range"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="DataRange",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{names:[],renderers:[]})},e}(o.Model),e.exports={Model:r}},{"./range":"models/ranges/range",underscore:"underscore"}],"models/ranges/data_range1d":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;i=t("underscore"),s=t("../../common/bbox"),a=t("../../common/logging").logger,r=t("./data_range"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="DataRange1d",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("min",function(){return Math.min(this.get("start"),this.get("end"))},!0),this.add_dependencies("min",this,["start","end"]),this.register_property("max",function(){return Math.max(this.get("start"),this.get("end"))},!0),this.add_dependencies("max",this,["start","end"]),this.register_property("computed_renderers",function(){return this._compute_renderers()},!0),this.add_dependencies("computed_renderers",this,["plots","renderers","names"]),this.plot_bounds={},this.have_updated_interactively=!1,this._initial_start=this.get("start"),this._initial_end=this.get("end"),this._initial_range_padding=this.get("range_padding"),this._initial_follow=this.get("follow"),this._initial_follow_interval=this.get("follow_interval"),this._initial_default_span=this.get("default_span")},e.prototype._compute_renderers=function(){var t,e,n,r,o,i,s,l,u,h,c;if(i=this.get("names"),h=this.get("renderers"),0===h.length)for(u=this.get("plots"),e=0,r=u.length;r>e;e++)s=u[e],t=s.get("renderers"),c=function(){var e,n,r;for(r=[],e=0,n=t.length;n>e;e++)l=t[e],"GlyphRenderer"===l.type&&r.push(l);return r}(),h=h.concat(c);for(i.length>0&&(h=function(){var t,e,n;for(n=[],t=0,e=h.length;e>t;t++)l=h[t],i.indexOf(l.get("name"))>=0&&n.push(l);return n}()),a.debug("computed "+h.length+" renderers for DataRange1d "+this.id),n=0,o=h.length;o>n;n++)l=h[n],a.trace(" - "+l.type+" "+l.id);return h},e.prototype._compute_plot_bounds=function(t,e){var n,r,o,i;for(i=new s.empty,n=0,r=t.length;r>n;n++)o=t[n],null!=e[o.id]&&(i=s.extend(i,e[o.id]));return i},e.prototype._compute_min_max=function(t,e){var n,r,o,i,a,l;i=new s.empty;for(n in t)l=t[n],i=s.extend(i,l);return a=i[e],o=a[0],r=a[1],[o,r]},e.prototype._compute_range=function(t,e){var n,r,o,i,s,a,l,u,h,c;return s=this.get("range_padding"),null!=s&&s>0?(h=e===t?this.get("default_span"):(e-t)*(1+s),n=(e+t)/2,a=[n-h/2,n+h/2],c=a[0],r=a[1]):(l=[t,e],c=l[0],r=l[1]),i=1,this.get("flipped")&&(u=[r,c],c=u[0],r=u[1],i=-1),o=this.get("follow_interval"),null!=o&&Math.abs(c-r)>o&&("start"===this.get("follow")?r=c+i*o:"end"===this.get("follow")&&(c=r-i*o)),[c,r]},e.prototype.update=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_;if(!this.have_updated_interactively)return p=this.get("computed_renderers"),this.plot_bounds[n]=this._compute_plot_bounds(p,t),u=this._compute_min_max(this.plot_bounds,e),a=u[0],s=u[1],h=this._compute_range(a,s),_=h[0],i=h[1],null!=this._initial_start&&(_=this._initial_start),null!=this._initial_end&&(i=this._initial_end),c=[this.get("start"),this.get("end")],o=c[0],r=c[1],(_!==o||i!==r)&&(l={},_!==o&&(l.start=_),i!==r&&(l.end=i),this.set(l)),"auto"===this.get("bounds")?this.set("bounds",[_,i]):void 0},e.prototype.reset=function(){return this.have_updated_interactively=!1,this.set({range_padding:this._initial_range_padding,follow:this._initial_follow,follow_interval:this._initial_follow_interval,default_span:this._initial_default_span})},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["plots"])},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{start:null,end:null,range_padding:.1,flipped:!1,follow:null,follow_interval:null,default_span:2,plots:[],bounds:null})},e}(r.Model),e.exports={Model:o}},{"../../common/bbox":"common/bbox","../../common/logging":"common/logging","./data_range":"models/ranges/data_range",underscore:"underscore"}],"models/ranges/factor_range":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("./range"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="FactorRange",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),null!=this.get("bounds")&&"auto"!==this.get("bounds")?this.set("_bounds_as_factors",this.get("bounds")):this.set("_bounds_as_factors",this.get("factors")),this._init(),this.register_property("min",function(){return this.get("start")},!1),this.add_dependencies("min",this,["factors","offset"]),this.register_property("max",function(){return this.get("end")},!1),this.add_dependencies("max",this,["factors","offset"]),this.listenTo(this,"change:factors",this._update_factors),this.listenTo(this,"change:offset",this._init)},e.prototype.reset=function(){return this._init()},e.prototype._update_factors=function(){return this.set("_bounds_as_factors",this.get("factors")),this._init()},e.prototype._init=function(){var t,e,n;return e=this.get("factors"),null!=this.get("bounds")&&"auto"!==this.get("bounds")&&(e=this.get("_bounds_as_factors"),this.set("factors",e)),n=.5+this.get("offset"),t=e.length+n,this.set("start",n),this.set("end",t),null!=this.get("bounds")?this.set("bounds",[n,t]):void 0},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{offset:0,factors:[],bounds:null})},e}(o.Model),e.exports={Model:r}},{"./range":"models/ranges/range",underscore:"underscore"}],"models/ranges/range":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("../../model"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="Range",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{callback:null})},e.prototype.reset=function(){},e}(r),e.exports={Model:o}},{"../../model":"model",underscore:"underscore"}],"models/ranges/range1d":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("./range"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="Range1d",e.prototype._set_auto_bounds=function(){var t,e;return"auto"===this.get("bounds")?(e=Math.min(this._initial_start,this._initial_end),t=Math.max(this._initial_start,this._initial_end),this.set("bounds",[e,t])):void 0},e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("min",function(){return Math.min(this.get("start"),this.get("end"))},!0),this.add_dependencies("min",this,["start","end"]),this.register_property("max",function(){return Math.max(this.get("start"),this.get("end"))},!0),this.add_dependencies("max",this,["start","end"]),this._initial_start=this.get("start"),this._initial_end=this.get("end"),this._set_auto_bounds()},e.prototype.reset=function(){return this.set({start:this._initial_start,end:this._initial_end}),this._set_auto_bounds()},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{start:0,end:1,bounds:null})},e}(r.Model),e.exports={Model:o}},{"./range":"models/ranges/range",underscore:"underscore"}],"models/renderers/glyph_renderer":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("underscore"),u=t("../../common/logging").logger,a=t("./renderer"),i=t("../../common/plot_widget"),s=t("../sources/remote_data_source"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.initialize=function(t){var n,r,o,i;return e.__super__.initialize.call(this,t),this.glyph=this.build_glyph_view(this.mget("glyph")),i=this.mget("selection_glyph"),null==i&&(i=this.mget("glyph").clone(),i.set(this.model.selection_defaults,{silent:!0})),this.selection_glyph=this.build_glyph_view(i),o=this.mget("nonselection_glyph"),null==o&&(o=this.mget("glyph").clone(),o.set(this.model.nonselection_defaults,{silent:!0})),this.nonselection_glyph=this.build_glyph_view(o),r=this.mget("hover_glyph"),null!=r&&(this.hover_glyph=this.build_glyph_view(r)),n=this.mget("glyph").clone(),n.set(this.model.decimated_defaults,{silent:!0}),this.decimated_glyph=this.build_glyph_view(n),this.xmapper=this.plot_view.frame.get("x_mappers")[this.mget("x_range_name")],this.ymapper=this.plot_view.frame.get("y_mappers")[this.mget("y_range_name")],this.set_data(!1),this.mget("data_source")instanceof s.Model?this.mget("data_source").setup(this.plot_view,this.glyph):void 0},e.prototype.build_glyph_view=function(t){return new t.default_view({model:t,renderer:this})},e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change",this.request_render),this.listenTo(this.mget("data_source"),"change",this.set_data),this.listenTo(this.mget("data_source"),"stream",this.set_data),this.listenTo(this.mget("data_source"),"select",this.request_render),null!=this.hover_glyph&&this.listenTo(this.mget("data_source"),"inspect",this.request_render),this.listenTo(this.mget("glyph"),"propchange",function(){return this.glyph.set_visuals(this.mget("data_source")),this.request_render()})},e.prototype.have_selection_glyphs=function(){return null!=this.selection_glyph&&null!=this.nonselection_glyph},e.prototype.set_data=function(t,e){var n,r,o,i,s,a,l,h,c;for(null==t&&(t=!0),c=Date.now(),h=this.mget("data_source"),this.glyph.set_data(h,e),this.glyph.set_visuals(h),this.decimated_glyph.set_visuals(h),this.have_selection_glyphs()&&(this.selection_glyph.set_visuals(h),this.nonselection_glyph.set_visuals(h)),null!=this.hover_glyph&&this.hover_glyph.set_visuals(h),i=h.get_length(),null==i&&(i=1),this.all_indices=function(){l=[];for(var t=0;i>=0?i>t:t>i;i>=0?t++:t--)l.push(t);return l}.apply(this),s=this.plot_model.get("lod_factor"),this.decimated=[],r=o=0,a=Math.floor(this.all_indices.length/s);a>=0?a>o:o>a;r=a>=0?++o:--o)this.decimated.push(this.all_indices[r*s]);return n=Date.now()-c,u.debug(this.glyph.model.type+" GlyphRenderer ("+this.model.id+"): set_data finished in "+n+"ms"),this.set_data_timestamp=Date.now(),t?this.request_render():void 0},e.prototype.render=function(){var t,e,n,r,o,i,s,a,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z;if(k=Date.now(),s=this.glyph.glglyph,M=Date.now(),this.glyph.map_data(),e=Date.now()-k,j=Date.now(),c=s?this.all_indices:this.glyph._mask_data(this.all_indices),n=Date.now()-j,t=this.plot_view.canvas_view.ctx,t.save(),b=this.mget("data_source").get("selected"),b=b&&0!==b.length?b["0d"].glyph?c:b["1d"].indices.length>0?b["1d"].indices:b["2d"].indices.length>0?b["2d"].indices:[]:[],p=this.mget("data_source").get("inspected"),p=p&&0!==p.length?p["0d"].glyph?c:p["1d"].indices.length>0?p["1d"].indices:p["2d"].indices.length>0?p["2d"].indices:[]:[],g=this.plot_model.get("lod_threshold"),this.plot_view.interactive&&!s&&null!=g&&this.all_indices.length>g?(c=this.decimated,a=this.decimated_glyph,v=this.decimated_glyph,w=this.selection_glyph):(a=this.glyph,v=this.nonselection_glyph,w=this.selection_glyph),null!=this.hover_glyph&&p.length&&(c=l.without.bind(null,c).apply(null,p)),b.length&&this.have_selection_glyphs()){for(z=Date.now(),x={},_=0,f=b.length;f>_;_++)h=b[_],x[h]=!0;for(b=new Array,y=new Array,d=0,m=c.length;m>d;d++)h=c[d],null!=x[h]?b.push(h):y.push(h);o=Date.now()-z,T=Date.now(),v.render(t,y,this.glyph),w.render(t,b,this.glyph),null!=this.hover_glyph&&this.hover_glyph.render(t,p,this.glyph),r=Date.now()-T}else T=Date.now(),a.render(t,c,this.glyph),this.hover_glyph&&p.length&&this.hover_glyph.render(t,p,this.glyph),r=Date.now()-T;return this.last_dtrender=r,i=Date.now()-k,u.debug(this.glyph.model.type+" GlyphRenderer ("+this.model.id+"): render finished in "+i+"ms"),u.trace(" - map_data finished in : "+e+"ms"),null!=n&&u.trace(" - mask_data finished in : "+n+"ms"),null!=o&&u.trace(" - selection mask finished in : "+o+"ms"),u.trace(" - glyph renders finished in : "+r+"ms"),t.restore()},e.prototype.map_to_screen=function(t,e){return this.plot_view.map_to_screen(t,e,this.mget("x_range_name"),this.mget("y_range_name"))},e.prototype.draw_legend=function(t,e,n,r,o){return this.glyph.draw_legend(t,e,n,r,o)},e.prototype.hit_test=function(t){return this.glyph.hit_test(t)},e}(i),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.default_view=o,e.prototype.type="GlyphRenderer",e.prototype.selection_defaults={},e.prototype.decimated_defaults={fill_alpha:.3,line_alpha:.3,fill_color:"grey",line_color:"grey"},e.prototype.nonselection_defaults={fill_alpha:.2,line_alpha:.2},e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{x_range_name:"default",y_range_name:"default",data_source:null,level:"glyph",glyph:null,hover_glyph:null,nonselection_glyph:null,selection_glyph:null})},e}(a),e.exports={Model:r,View:o}},{"../../common/logging":"common/logging","../../common/plot_widget":"common/plot_widget","../sources/remote_data_source":"models/sources/remote_data_source","./renderer":"models/renderers/renderer",underscore:"underscore"}],"models/renderers/guide_renderer":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("./renderer"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="GuideRenderer",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{plot:null,level:"overlay"})},e}(o),e.exports={Model:r}},{"./renderer":"models/renderers/renderer",underscore:"underscore"}],"models/renderers/renderer":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;r=t("../../model"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type="Renderer",e}(r),e.exports=o},{"../../model":"model"}],"models/sources/ajax_data_source":[function(t,e,n){var r,o,i,s,a,l=function(t,e){return function(){return t.apply(e,arguments)}},u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;r=t("jquery"),s=t("underscore"),a=t("../../common/logging").logger,i=t("./remote_data_source"),o=function(t){function e(){return this.defaults=l(this.defaults,this),this.get_data=l(this.get_data,this),this.setup=l(this.setup,this),this.destroy=l(this.destroy,this),e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="AjaxDataSource",e.prototype.destroy=function(){return null!=this.interval?clearInterval(this.interval):void 0},e.prototype.setup=function(t,e){return this.pv=t,this.get_data(this.get("mode")),this.get("polling_interval")?this.interval=setInterval(this.get_data,this.get("polling_interval"),this.get("mode"),this.get("max_size"),this.get("if_modified")):void 0},e.prototype.get_data=function(t,e,n){return null==e&&(e=0),null==n&&(n=!1),r.ajax({dataType:"json",ifModified:n,url:this.get("data_url"),xhrField:{withCredentials:!0},method:this.get("method"),contentType:this.get("content_type"),headers:this.get("http_headers")}).done(function(n){return function(r){var o,i,s,l,u;if("replace"===t)n.set("data",r);else if("append"===t){for(l=n.get("data"),u=n.columns(),i=0,s=u.length;s>i;i++)o=u[i],r[o]=l[o].concat(r[o]).slice(-e);n.set("data",r)}else a.error("unsupported mode: "+t);return a.trace(r),null}}(this)).error(function(){return a.error(arguments)}),null},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{mode:"replace",data_url:null,content_type:"application/json",http_headers:{},max_size:null,method:"POST",if_modified:!1})},e}(i.Model),e.exports={Model:o}},{"../../common/logging":"common/logging","./remote_data_source":"models/sources/remote_data_source",jquery:"jquery",underscore:"underscore"}],"models/sources/blaze_data_source":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){return function(){return t.apply(e,arguments)}},c=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;r=t("jquery"),l=t("underscore"),o=t("backbone"),u=t("../../common/logging").logger,a=t("./remote_data_source"),i=function(t){function e(){return this.update=h(this.update,this),this.setup=h(this.setup,this),this.destroy=h(this.destroy,this),this.defaults=h(this.defaults,this),e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="BlazeDataSource",e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{expr:{},local:null,namespace:{}})},e.prototype.destroy=function(){return null!=this.interval?clearInterval(this.interval):void 0},e.prototype.setup=function(t,e){return this.pv=t,this.update(),this.get("polling_interval")?this.interval=setInterval(this.update,this.get("polling_interval")):void 0},e.prototype.update=function(){var t;return t=JSON.stringify({expr:this.get("expr"),namespace:this.get("namespace")}),r.ajax({dataType:"json",url:this.get("data_url"),data:t,xhrField:{withCredentials:!0},method:"POST",contentType:"application/json"}).done(function(t){return function(e){var n,r,o,i,s,a,u,h;for(r=l.zip.apply(l,e.data),o={},h=e.names,s=i=0,a=h.length;a>i;s=++i)n=h[s],o[n]=r[s];return u=l.clone(t.get("data")),l.extend(u,o),t.set("data",u),null}}(this))},e}(a.Model),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.model=i,e}(o.Collection),e.exports={Model:i,Collection:new s}},{"../../common/logging":"common/logging","./remote_data_source":"models/sources/remote_data_source",backbone:"backbone",jquery:"jquery",underscore:"underscore"}],"models/sources/column_data_source":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){return function(){return t.apply(e,arguments)}},h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;s=t("underscore"),o=t("./data_source"),l=t("../../common/logging").logger,i=t("../../common/selection_manager"),a=t("../../common/hittest"),r=function(t){function e(){return this.defaults=u(this.defaults,this),e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="ColumnDataSource",e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["selection_manager","inspected"])},e.prototype.get_column=function(t){var e;return null!=(e=this.get("data")[t])?e:null},e.prototype.get_length=function(){var t,e,n,r;return t=this.get("data"),0===s.keys(t).length?null:(n=s.uniq(function(){var n;n=[];for(e in t)r=t[e],n.push(r.length);return n}()),n.length>1&&l.debug("data source has columns of inconsistent lengths"),n[0])},e.prototype.columns=function(){return s.keys(this.get("data"))},e.prototype.stream=function(t,e){var n,r,o;n=this.get("data");for(r in t)o=t[r],n[r]=n[r].concat(t[r]),n[r].length>e&&(n[r]=n[r].slice(-e));return this.set("data",n,{silent:!0}),this.trigger("stream")},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{data:{},selection_manager:new i({
12 source:this}),column_names:[]})},e}(o.Model),e.exports={Model:r}},{"../../common/hittest":"common/hittest","../../common/logging":"common/logging","../../common/selection_manager":"common/selection_manager","./data_source":"models/sources/data_source",underscore:"underscore"}],"models/sources/data_source":[function(t,e,n){var r,o,i,s,a=function(t,e){return function(){return t.apply(e,arguments)}},l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;i=t("underscore"),o=t("../../model"),s=t("../../common/hittest"),r=function(t){function e(){return this.defaults=a(this.defaults,this),e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.type="DataSource",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{selected:s.create_hit_test_result(),callback:null})},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this,"change:selected",function(t){return function(){var e;return null!=(e=t.get("callback"))?e.execute(t):void 0}}(this))},e}(o),e.exports={Model:r}},{"../../common/hittest":"common/hittest","../../model":"model",underscore:"underscore"}],"models/sources/geojson_data_source":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;i=t("underscore"),s=t("../../common/logging").logger,r=t("./column_data_source"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="GeoJSONDataSource",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.geojson_to_column_data(),this.register_property("data",this.geojson_to_column_data,!0),this.add_dependencies("data",this,["geojson"])},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{geojson:null})},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["data"])},e.prototype._get_new_list_array=function(t){var e,n;return e=new Array(t),n=i.map(e,function(t){return[]})},e.prototype._get_new_nan_array=function(t){var e,n;return e=new Array(t),n=i.map(e,function(t){return NaN})},e.prototype.geojson_to_column_data=function(){var t,e,n,r,o,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q;if(u=JSON.parse(this.get("geojson")),"GeometryCollection"!==(P=u.type)&&"FeatureCollection"!==P)throw new Error("Bokeh only supports type GeometryCollection and FeatureCollection at top level");if("GeometryCollection"===u.type){if(null==u.geometries)throw new Error("No geometries found in GeometryCollection");if(0===u.geometries.length)throw new Error("geojson.geometries must have one or more items");_=u.geometries}if("FeatureCollection"===u.type){if(null==u.features)throw new Error("No features found in FeaturesCollection");if(0===u.features.length)throw new Error("geojson.features must have one or more items");_=u.features}for(n={x:this._get_new_nan_array(_.length),y:this._get_new_nan_array(_.length),z:this._get_new_nan_array(_.length),xs:this._get_new_list_array(_.length),ys:this._get_new_list_array(_.length),zs:this._get_new_list_array(_.length)},a=function(t,e){return t.concat([[NaN,NaN,NaN]]).concat(e)},c=f=0,g=_.length;g>f;c=++f){if(p=_[c],"Feature"===p.type){h=p.geometry;for(E in p.properties)n.hasOwnProperty(E)||(n[E]=this._get_new_nan_array(_.length)),n[E][c]=p.properties[E]}else h=p;switch(h.type){case"Point":e=h.coordinates,n.x[c]=e[0],n.y[c]=e[1],n.z[c]=null!=(S=e[2])?S:NaN;break;case"LineString":for(t=h.coordinates,d=m=0,y=t.length;y>m;d=++m)e=t[d],n.xs[c][d]=e[0],n.ys[c][d]=e[1],n.zs[c][d]=null!=(C=e[2])?C:NaN;break;case"Polygon":for(h.coordinates.length>1&&s.warn("Bokeh does not support Polygons with holes in, only exterior ring used."),r=h.coordinates[0],d=k=0,v=r.length;v>k;d=++k)e=r[d],n.xs[c][d]=e[0],n.ys[c][d]=e[1],n.zs[c][d]=null!=(A=e[2])?A:NaN;break;case"MultiPoint":s.warn("MultiPoint not supported in Bokeh");break;case"MultiLineString":for(l=i.reduce(h.coordinates,a),d=M=0,b=l.length;b>M;d=++M)e=l[d],n.xs[c][d]=e[0],n.ys[c][d]=e[1],n.zs[c][d]=null!=(O=e[2])?O:NaN;break;case"MultiPolygon":for(o=[],N=h.coordinates,j=0,x=N.length;x>j;j++)z=N[j],z.length>1&&s.warn("Bokeh does not support Polygons with holes in, only exterior ring used."),o.push(z[0]);for(l=i.reduce(o,a),d=T=0,w=l.length;w>T;d=++T)e=l[d],n.xs[c][d]=e[0],n.ys[c][d]=e[1],n.zs[c][d]=null!=(q=e[2])?q:NaN;break;default:throw new Error("Invalid type "+h.type)}}return n},e}(r.Model),e.exports={Model:o}},{"../../common/logging":"common/logging","./column_data_source":"models/sources/column_data_source",underscore:"underscore"}],"models/sources/remote_data_source":[function(t,e,n){var r,o,i,s=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;i=t("underscore"),r=t("./column_data_source"),o=function(t){function e(){return this.defaults=s(this.defaults,this),e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="RemoteDataSource",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{data:{},data_url:null,polling_interval:null})},e}(r.Model),e.exports={Model:o}},{"./column_data_source":"models/sources/column_data_source",underscore:"underscore"}],"models/tickers/adaptive_ticker":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;i=t("underscore"),o=t("./continuous_ticker"),s=t("./util").argmin,a=function(t,e,n){return Math.max(e,Math.min(n,t))},l=function(t,e){return null==e&&(e=Math.E),Math.log(t)/Math.log(e)},r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.type="AdaptiveTicker",e.prototype.initialize=function(t,n){var r,o;return e.__super__.initialize.call(this,t,n),r=i.last(this.get("mantissas"))/this.get("base"),o=i.first(this.get("mantissas"))*this.get("base"),this.extended_mantissas=i.flatten([r,this.get("mantissas"),o]),this.base_factor=0===this.get_min_interval()?1:this.get_min_interval()},e.prototype.get_interval=function(t,e,n){var r,o,i,u,h,c,p,_,d;return i=e-t,h=this.get_ideal_interval(t,e,n),d=Math.floor(l(h/this.base_factor,this.get("base"))),c=Math.pow(this.get("base"),d)*this.base_factor,p=h/c,o=this.extended_mantissas,u=o.map(function(t){return Math.abs(n-i/(t*c))}),r=o[s(u)],_=r*c,a(_,this.get_min_interval(),this.get_max_interval())},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{base:10,mantissas:[1,2,5],min_interval:0,max_interval:null})},e}(o.Model),e.exports={Model:r}},{"./continuous_ticker":"models/tickers/continuous_ticker","./util":"models/tickers/util",underscore:"underscore"}],"models/tickers/basic_ticker":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("./adaptive_ticker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="BasicTicker",e}(r.Model),e.exports={Model:o}},{"./adaptive_ticker":"models/tickers/adaptive_ticker",underscore:"underscore"}],"models/tickers/categorical_ticker":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;o=t("./ticker"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type="CategoricalTicker",e.prototype.get_ticks=function(t,e,n,r){var o,i,s,a,l,u,h;for(o=r.desired_n_ticks,u=[],i=n.get("factors"),s=l=0,h=i.length;h>=0?h>l:l>h;s=h>=0?++l:--l)a=s+n.get("offset"),a+1>t&&e>a+1&&u.push(i[s]);return{major:u,minor:[]}},e}(o.Model),e.exports={Model:r}},{"./ticker":"models/tickers/ticker"}],"models/tickers/composite_ticker":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;i=t("underscore"),o=t("./continuous_ticker"),s=t("./util").argmin,r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="CompositeTicker",e.prototype.initialize=function(t,n){var r;return e.__super__.initialize.call(this,t,n),r=this.get("tickers"),this.register_property("min_intervals",function(){return i.invoke(r,"get_min_interval")},!0),this.add_dependencies("min_intervals",this,["tickers"]),this.register_property("max_intervals",function(){return i.invoke(r,"get_max_interval")},!0),this.add_dependencies("max_intervals",this,["tickers"]),this.register_property("min_interval",function(){return i.first(this.get("min_intervals"))},!0),this.add_dependencies("min_interval",this,["min_intervals"]),this.register_property("max_interval",function(){return i.first(this.get("max_intervals"))},!0),this.add_dependencies("max_interval",this,["max_interval"])},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{tickers:[]})},e.prototype.get_best_ticker=function(t,e,n){var r,o,a,l,u,h,c,p;return l=e-t,h=this.get_ideal_interval(t,e,n),p=[i.sortedIndex(this.get("min_intervals"),h)-1,i.sortedIndex(this.get("max_intervals"),h)],c=[this.get("min_intervals")[p[0]],this.get("max_intervals")[p[1]]],u=c.map(function(t){return Math.abs(n-l/t)}),r=s(u),r===1/0?this.get("tickers")[0]:(a=p[r],o=this.get("tickers")[a])},e.prototype.get_interval=function(t,e,n){var r;return r=this.get_best_ticker(t,e,n),r.get_interval(t,e,n)},e.prototype.get_ticks_no_defaults=function(t,e,n){var r,o;return r=this.get_best_ticker(t,e,n),o=r.get_ticks_no_defaults(t,e,n)},e}(o.Model),e.exports={Model:r}},{"./continuous_ticker":"models/tickers/continuous_ticker","./util":"models/tickers/util",underscore:"underscore"}],"models/tickers/continuous_ticker":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),o=t("./ticker"),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="ContinuousTicker",e.prototype.get_interval=void 0,e.prototype.get_min_interval=function(){return this.get("min_interval")},e.prototype.get_max_interval=function(){var t;return null!=(t=this.get("max_interval"))?t:1/0},e.prototype.get_ideal_interval=function(t,e,n){var r;return r=e-t,r/n},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{num_minor_ticks:5,desired_num_ticks:6})},e}(o.Model),e.exports={Model:r}},{"./ticker":"models/tickers/ticker",underscore:"underscore"}],"models/tickers/datetime_ticker":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m=function(t,e){function n(){this.constructor=t}for(var r in e)g.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},g={}.hasOwnProperty;d=t("underscore"),r=t("./adaptive_ticker"),o=t("./composite_ticker"),s=t("./days_ticker"),a=t("./months_ticker"),_=t("./years_ticker"),f=t("./util"),u=f.ONE_MILLI,p=f.ONE_SECOND,h=f.ONE_MINUTE,l=f.ONE_HOUR,c=f.ONE_MONTH,i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return m(e,t),e.prototype.type="DatetimeTicker",e.prototype.defaults=function(){return d.extend({},e.__super__.defaults.call(this),{num_minor_ticks:0,tickers:[new r.Model({mantissas:[1,2,5],base:10,min_interval:0,max_interval:500*u,num_minor_ticks:0}),new r.Model({mantissas:[1,2,5,10,15,20,30],base:60,min_interval:p,max_interval:30*h,num_minor_ticks:0}),new r.Model({mantissas:[1,2,4,6,8,12],base:24,min_interval:l,max_interval:12*l,num_minor_ticks:0}),new s.Model({days:d.range(1,32)}),new s.Model({days:d.range(1,31,3)}),new s.Model({days:[1,8,15,22]}),new s.Model({days:[1,15]}),new a.Model({months:d.range(0,12,1)}),new a.Model({months:d.range(0,12,2)}),new a.Model({months:d.range(0,12,4)}),new a.Model({months:d.range(0,12,6)}),new _.Model({})]})},e}(o.Model),e.exports={Model:i}},{"./adaptive_ticker":"models/tickers/adaptive_ticker","./composite_ticker":"models/tickers/composite_ticker","./days_ticker":"models/tickers/days_ticker","./months_ticker":"models/tickers/months_ticker","./util":"models/tickers/util","./years_ticker":"models/tickers/years_ticker",underscore:"underscore"}],"models/tickers/days_ticker":[function(t,e,n){var r,o,i,s,a,l,u,h,c=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;s=t("underscore"),i=t("./single_interval_ticker"),h=t("./util"),a=h.copy_date,u=h.last_month_no_later_than,o=h.ONE_DAY,l=function(t,e){var n,r,o,i,s;for(s=u(new Date(t)),o=u(new Date(e)),i=a(o),o.setUTCMonth(o.getUTCMonth()+1),r=[],n=s;;)if(r.push(a(n)),n.setUTCMonth(n.getUTCMonth()+1),n>o)break;return r},r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="DaysTicker",e.prototype.initialize=function(t,n){var r,i;return t.num_minor_ticks=0,e.__super__.initialize.call(this,t,n),r=this.get("days"),i=r.length>1?(r[1]-r[0])*o:31*o,this.set("interval",i)},e.prototype.get_ticks_no_defaults=function(t,e,n){var r,o,i,u,h,c,p,_;return p=l(t,e),u=this.get("days"),h=function(t){return function(t,e){var n,r,o,i,s,l;for(n=[],s=0,l=u.length;l>s;s++)r=u[s],o=a(t),o.setUTCDate(r),i=new Date(o.getTime()+e/2),i.getUTCMonth()===t.getUTCMonth()&&n.push(o);return n}}(this),c=this.get("interval"),i=s.flatten(function(){var t,e,n;for(n=[],t=0,e=p.length;e>t;t++)o=p[t],n.push(h(o,c));return n}()),r=s.invoke(i,"getTime"),_=s.filter(r,function(n){return n>=t&&e>=n}),{major:_,minor:[]}},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{days:[]})},e}(i.Model),e.exports={Model:r}},{"./single_interval_ticker":"models/tickers/single_interval_ticker","./util":"models/tickers/util",underscore:"underscore"}],"models/tickers/fixed_ticker":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("./continuous_ticker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="FixedTicker",e.prototype.get_ticks_no_defaults=function(t,e,n){return{major:this.get("ticks"),minor:[]}},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{ticks:[]})},e}(r.Model),e.exports={Model:o}},{"./continuous_ticker":"models/tickers/continuous_ticker",underscore:"underscore"}],"models/tickers/log_ticker":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;i=t("underscore"),r=t("./adaptive_ticker"),s=function(t,e,n){var r,o;if(i.isUndefined(e)&&(e=t,t=0),i.isUndefined(n)&&(n=1),n>0&&t>=e||0>n&&e>=t)return[];for(o=[],r=t;n>0?e>r:r>e;)o.push(r),r+=n;return o},o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="LogTicker",e.prototype.get_ticks_no_defaults=function(t,e,n){var r,o,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F;if(P=this.get("num_minor_ticks"),z=[],0>=t&&(t=1),t>e&&(C=[e,t],t=C[0],e=C[1]),r=this.get("base"),k=Math.log(t)/Math.log(r),x=Math.log(e)/Math.log(r),w=x-k,2>w){if(c=this.get_interval(t,e,n),A=Math.floor(t/c),o=Math.ceil(e/c),u=i.isNaN(A)||i.isNaN(o)?[]:i.range(A,o+1),q=function(){var t,e,n;for(n=[],t=0,e=u.length;e>t;t++)l=u[t],0!==l&&n.push(l*c);return n}(),P>1){for(j=c/P,T=function(){var t,e,n;for(n=[],h=t=1,e=P;e>=1?e>=t:t>=e;h=e>=1?++t:--t)n.push(h*j);return n}(),p=0,f=T.length;f>p;p++)F=T[p],z.push(q[0]-F);for(_=0,m=q.length;m>_;_++)for(N=q[_],d=0,g=T.length;g>d;d++)F=T[d],z.push(N+F)}}else if(O=Math.ceil(k),a=Math.floor(x),c=Math.ceil((a-O)/9),q=s(O,a,c),(a-O)%c===0&&(q=q.concat([a])),q=q.map(function(t){return Math.pow(r,t)}),P>1){for(j=Math.pow(r,c)/P,T=function(){var t,e,n;for(n=[],h=t=1,e=P;e>=1?e>=t:t>=e;h=e>=1?++t:--t)n.push(h*j);return n}(),M=0,y=T.length;y>M;M++)F=T[M],z.push(q[0]/F);for(E=0,v=q.length;v>E;E++)for(N=q[E],S=0,b=T.length;b>S;S++)F=T[S],z.push(N*F)}return{major:q,minor:z}},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{mantissas:[1,5]})},e}(r.Model),e.exports={Model:o}},{"./adaptive_ticker":"models/tickers/adaptive_ticker",underscore:"underscore"}],"models/tickers/months_ticker":[function(t,e,n){var r,o,i,s,a,l,u,h,c=function(t,e){function n(){this.constructor=t}for(var r in e)p.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},p={}.hasOwnProperty;s=t("underscore"),i=t("./single_interval_ticker"),h=t("./util"),a=h.copy_date,u=h.last_year_no_later_than,o=h.ONE_MONTH,l=function(t,e){var n,r,o,i;for(i=u(new Date(t)),o=u(new Date(e)),o.setUTCFullYear(o.getUTCFullYear()+1),r=[],n=i;;)if(r.push(a(n)),n.setUTCFullYear(n.getUTCFullYear()+1),n>o)break;return r},r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return c(e,t),e.prototype.type="MonthsTicker",e.prototype.initialize=function(t,n){var r,i;return e.__super__.initialize.call(this,t,n),i=this.get("months"),r=i.length>1?(i[1]-i[0])*o:12*o,this.set("interval",r)},e.prototype.get_ticks_no_defaults=function(t,e,n){var r,o,i,u,h,c,p;return p=l(t,e),u=this.get("months"),h=function(t){return u.map(function(e){var n;return n=a(t),n.setUTCMonth(e),n})},i=s.flatten(function(){var t,e,n;for(n=[],t=0,e=p.length;e>t;t++)o=p[t],n.push(h(o));return n}()),r=s.invoke(i,"getTime"),c=s.filter(r,function(n){return n>=t&&e>=n}),{major:c,minor:[]}},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{months:[]})},e}(i.Model),e.exports={Model:r}},{"./single_interval_ticker":"models/tickers/single_interval_ticker","./util":"models/tickers/util",underscore:"underscore"}],"models/tickers/single_interval_ticker":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("./continuous_ticker"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="SingleIntervalTicker",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("min_interval",function(){return this.get("interval")},!0),this.add_dependencies("min_interval",this,["interval"]),this.register_property("max_interval",function(){return this.get("interval")},!0),this.add_dependencies("max_interval",this,["interval"])},e.prototype.get_interval=function(t,e,n){return this.get("interval")},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{interval:null})},e}(r.Model),e.exports={Model:o}},{"./continuous_ticker":"models/tickers/continuous_ticker",underscore:"underscore"}],"models/tickers/ticker":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;i=t("underscore"),r=t("../../model"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.type="Ticker",e.prototype.get_ticks=function(t,e,n,r){var o;return o=r.desired_n_ticks,this.get_ticks_no_defaults(t,e,this.get("desired_num_ticks"))},e.prototype.get_ticks_no_defaults=function(t,e,n){var r,o,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w;if(l=this.get_interval(t,e,n),v=Math.floor(t/l),r=Math.ceil(e/l),s=i.isNaN(v)||i.isNaN(r)?[]:i.range(v,r+1),x=function(){var t,e,n;for(n=[],t=0,e=s.length;e>t;t++)o=s[t],n.push(o*l);return n}(),y=this.get("num_minor_ticks"),g=[],y>1){for(f=l/y,m=function(){var t,e,n;for(n=[],a=t=1,e=y;e>=1?e>=t:t>=e;a=e>=1?++t:--t)n.push(a*f);return n}(),u=0,p=m.length;p>u;u++)w=m[u],g.push(x[0]-w);for(h=0,_=x.length;_>h;h++)for(b=x[h],c=0,d=m.length;d>c;c++)w=m[c],g.push(b+w)}return{major:x,minor:g}},e}(r),e.exports={Model:o}},{"../../model":"model",underscore:"underscore"}],"models/tickers/util":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d;h=t("underscore"),i=1,l=1e3,s=60*l,o=60*s,r=24*o,a=30*r,u=365*r,c=function(t){var e;return e=h.min(h.range(t.length),function(e){return t[e]})},p=function(t){return new Date(t.getTime())},_=function(t){return t=p(t),t.setUTCDate(1),t.setUTCHours(0),t.setUTCMinutes(0),t.setUTCSeconds(0),t.setUTCMilliseconds(0),t},d=function(t){return t=_(t),t.setUTCMonth(0),t},e.exports={argmin:c,copy_date:p,last_month_no_later_than:_,last_year_no_later_than:d,ONE_MILLI:i,ONE_SECOND:l,ONE_MINUTE:s,ONE_HOUR:o,ONE_DAY:r,ONE_MONTH:a,ONE_YEAR:u}},{underscore:"underscore"}],"models/tickers/years_ticker":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;a=t("underscore"),r=t("./basic_ticker"),i=t("./single_interval_ticker"),u=t("./util"),l=u.last_year_no_later_than,o=u.ONE_YEAR,s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.type="YearsTicker",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.set("interval",o),this.basic_ticker=new r.Model({num_minor_ticks:0})},e.prototype.get_ticks_no_defaults=function(t,e,n){var r,o,i,s,u,h;return i=l(new Date(t)).getUTCFullYear(),o=l(new Date(e)).getUTCFullYear(),h=this.basic_ticker.get_ticks_no_defaults(i,o,n).major,r=function(){var t,e,n;for(n=[],t=0,e=h.length;e>t;t++)u=h[t],n.push(Date.UTC(u,0,1));return n}(),s=a.filter(r,function(n){return n>=t&&e>=n}),{major:s,minor:[]}},e}(i.Model),e.exports={Model:s}},{"./basic_ticker":"models/tickers/basic_ticker","./single_interval_ticker":"models/tickers/single_interval_ticker","./util":"models/tickers/util",underscore:"underscore"}],"models/tiles/bbox_tile_source":[function(t,e,n){var r,o,i,s=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;i=t("underscore"),o=t("./mercator_tile_source"),r=function(t){function e(){return this.defaults=s(this.defaults,this),e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="BBoxTileSource",e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{use_latlon:!1})},e.prototype.get_image_url=function(t,e,n){var r,o,i,s,a,l,u;return r=this.string_lookup_replace(this.get("url"),this.get("extra_url_vars")),this.get("use_latlon")?(o=this.get_tile_geographic_bounds(t,e,n),a=o[0],u=o[1],s=o[2],l=o[3]):(i=this.get_tile_meter_bounds(t,e,n),a=i[0],u=i[1],s=i[2],l=i[3]),r.replace("{XMIN}",a).replace("{YMIN}",u).replace("{XMAX}",s).replace("{YMAX}",l)},e}(o),e.exports={Model:r}},{"./mercator_tile_source":"models/tiles/mercator_tile_source",underscore:"underscore"}],"models/tiles/dynamic_image_renderer":[function(t,e,n){var r,o,i,s,a,l,u,h,c=function(t,e){return function(){return t.apply(e,arguments)}},p=function(t,e){function n(){this.constructor=t}for(var r in e)_.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},_={}.hasOwnProperty;l=t("underscore"),a=t("../renderers/renderer"),s=t("../../common/plot_widget"),h=t("../../common/properties"),i=t("./image_pool"),u=t("../../common/logging").logger,o=function(t){function e(){return this._on_image_error=c(this._on_image_error,this),this._on_image_load=c(this._on_image_load,this),e.__super__.constructor.apply(this,arguments)}return p(e,t),e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change",this.request_render)},e.prototype.get_extent=function(){return[this.x_range.get("start"),this.y_range.get("start"),this.x_range.get("end"),this.y_range.get("end")]},e.prototype._set_data=function(){return this.map_plot=this.plot_view.model,this.map_canvas=this.plot_view.canvas_view.ctx,this.map_frame=this.plot_view.frame,this.x_range=this.map_plot.get("x_range"),this.x_mapper=this.map_frame.get("x_mappers")["default"],this.y_range=this.map_plot.get("y_range"),this.y_mapper=this.map_frame.get("y_mappers")["default"],this.lastImage=void 0,this.extent=this.get_extent()},e.prototype._map_data=function(){return this.initial_extent=this.get_extent()},e.prototype._on_image_load=function(t){var e;return e=t.target.image_data,e.img=t.target,e.loaded=!0,this.lastImage=e,this.get_extent().join(":")===e.cache_key?this.request_render():void 0},e.prototype._on_image_error=function(t){var e;return u.error("Error loading image: #{e.target.src}"),e=t.target.image_data,this.mget("image_source").remove_image(e)},e.prototype._create_image=function(t){var e;return e=new Image,e.onload=this._on_image_load,e.onerror=this._on_image_error,e.alt="",e.image_data={bounds:t,loaded:!1,cache_key:t.join(":")},this.mget("image_source").add_image(e.image_data),e.src=this.mget("image_source").get_image_url(t[0],t[1],t[2],t[3],Math.ceil(this.map_frame.get("height")),Math.ceil(this.map_frame.get("width"))),e},e.prototype.render=function(t,e,n){var r,o;return null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),r=this.get_extent(),this.render_timer&&clearTimeout(this.render_timer),o=this.mget("image_source").images[r.join(":")],null!=o&&o.loaded?void this._draw_image(r.join(":")):(null!=this.lastImage&&this._draw_image(this.lastImage.cache_key),null==o?this.render_timer=setTimeout(function(t){return function(){return t._create_image(r)}}(this),125):void 0)},e.prototype._draw_image=function(t){var e,n,r,o,i,s,a,l,u,h,c;return e=this.mget("image_source").images[t],null!=e?(this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.mget("alpha"),n=this.plot_view.frame.map_to_screen([e.bounds[0]],[e.bounds[3]],this.plot_view.canvas),l=n[0],c=n[1],r=this.plot_view.frame.map_to_screen([e.bounds[2]],[e.bounds[1]],this.plot_view.canvas),a=r[0],h=r[1],l=l[0],c=c[0],a=a[0],h=h[0],i=a-l,o=h-c,s=l,u=c,this.map_canvas.drawImage(e.img,s,u,i,o),this.map_canvas.restore()):void 0},e.prototype._set_rect=function(){var t,e,n,r,o;return n=this.plot_view.outline_props.width.value(),e=this.plot_view.canvas.vx_to_sx(this.map_frame.get("left"))+n/2,r=this.plot_view.canvas.vy_to_sy(this.map_frame.get("top"))+n/2,o=this.map_frame.get("width")-n,t=this.map_frame.get("height")-n,this.map_canvas.rect(e,r,o,t),this.map_canvas.clip()},e}(s),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return p(e,t),e.prototype.default_view=o,e.prototype.type="DynamicImageRenderer",e.prototype.visuals=[],e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{alpha:1,image_source:null,render_parents:!0,level:"underlay"})},e}(a),e.exports={Model:r,View:o}},{"../../common/logging":"common/logging","../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","../renderers/renderer":"models/renderers/renderer","./image_pool":"models/tiles/image_pool",underscore:"underscore"}],"models/tiles/image_pool":[function(t,e,n){var r;r=function(){function t(){this.images=[]}return t.prototype.pop=function(){var t;return t=this.images.pop(),null!=t?t:new Image},t.prototype.push=function(t){return this.images.length>50?void 0:t.constructor===Array?Array.prototype.push.apply(this.images,t):this.images.push(t)},t}(),e.exports=r},{}],"models/tiles/image_source":[function(t,e,n){var r,o,i,s,a=function(t,e){return function(){return t.apply(e,arguments)}},l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;i=t("underscore"),o=t("../../model"),s=t("../../common/logging").logger,r=function(t){function e(t){null==t&&(t={}),this.defaults=a(this.defaults,this),e.__super__.constructor.apply(this,arguments),this.images={},this.normalize_case()}return l(e,t),e.prototype.normalize_case=function(){"Note: should probably be refactored into subclasses.";var t;return t=this.get("url"),t=t.replace("{xmin}","{XMIN}"),t=t.replace("{ymin}","{YMIN}"),t=t.replace("{xmax}","{XMAX}"),t=t.replace("{ymax}","{YMAX}"),t=t.replace("{height}","{HEIGHT}"),t=t.replace("{width}","{WIDTH}"),this.set("url",t)},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{url:"",extra_url_vars:{}})},e.prototype.type="ImageSource",e.prototype.string_lookup_replace=function(t,e){var n,r,o;r=t;for(n in e)o=e[n],r=r.replace("{"+n+"}",o.toString());return r},e.prototype.add_image=function(t){return this.images[t.cache_key]=t},e.prototype.remove_image=function(t){return delete this.images[t.cache_key]},e.prototype.get_image_url=function(t,e,n,r,o,i){var s;return s=this.string_lookup_replace(this.get("url"),this.get("extra_url_vars")),s.replace("{XMIN}",t).replace("{YMIN}",e).replace("{XMAX}",n).replace("{YMAX}",r).replace("{WIDTH}",i).replace("{HEIGHT}",o)},e}(o),e.exports={Model:r}},{"../../common/logging":"common/logging","../../model":"model",underscore:"underscore"}],"models/tiles/mercator_tile_source":[function(t,e,n){var r,o,i,s=function(t,e){return function(){return t.apply(e,arguments)}},a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;i=t("underscore"),o=t("./tile_source"),r=function(t){function e(){return this.defaults=s(this.defaults,this),e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.type="MercatorTileSource",e.prototype.initialize=function(t){var n;return e.__super__.initialize.call(this,t),this._resolutions=function(){var t,e;for(e=[],n=t=0;30>=t;n=++t)e.push(this.get_resolution(n));return e}.call(this)},e.prototype._computed_initial_resolution=function(){return null!=this.get("initial_resolution")?this.get("initial_resolution"):2*Math.PI*6378137/this.get("tile_size")},e.prototype.is_valid_tile=function(t,e,n){return!this.get("wrap_around")&&(0>t||t>=Math.pow(2,n))?!1:0>e||e>=Math.pow(2,n)?!1:!0},e.prototype.retain_children=function(t){var e,n,r,o,i,s,a;o=t.quadkey,r=o.length,n=r+3,i=this.tiles,s=[];for(e in i)a=i[e],0===a.quadkey.indexOf(o)&&a.quadkey.length>r&&a.quadkey.length<=n?s.push(a.retain=!0):s.push(void 0);return s},e.prototype.retain_neighbors=function(t){var e,n,r,o,s,a,l,u,h,c,p,_,d;n=4,s=t.tile_coords,h=s[0],c=s[1],p=s[2],r=function(){var t,e,r,o;for(o=[],_=t=e=h-n,r=h+n;r>=e?r>=t:t>=r;_=r>=e?++t:--t)o.push(_);return o}(),o=function(){var t,e,r,o;for(o=[],d=t=e=c-n,r=c+n;r>=e?r>=t:t>=r;d=r>=e?++t:--t)o.push(d);return o}(),a=this.tiles,l=[];for(e in a)u=a[e],u.tile_coords[2]===p&&i.contains(r,u.tile_coords[0])&&i.contains(o,u.tile_coords[1])?l.push(u.retain=!0):l.push(void 0);return l},e.prototype.retain_parents=function(t){var e,n,r,o,i;n=t.quadkey,r=this.tiles,o=[];for(e in r)i=r[e],o.push(i.retain=0===n.indexOf(i.quadkey));
13 return o},e.prototype.children_by_tile_xyz=function(t,e,n){var r,o,i,s,a,l,u,h,c;for(c=this.calculate_world_x_by_tile_xyz(t,e,n),0!==c&&(l=this.normalize_xyz(t,e,n),t=l[0],e=l[1],n=l[2]),a=this.tile_xyz_to_quadkey(t,e,n),o=[],i=s=0;3>=s;i=s+=1)u=this.quadkey_to_tile_xyz(a+i.toString()),t=u[0],e=u[1],n=u[2],0!==c&&(h=this.denormalize_xyz(t,e,n,c),t=h[0],e=h[1],n=h[2]),r=this.get_tile_meter_bounds(t,e,n),null!=r&&o.push([t,e,n,r]);return o},e.prototype.parent_by_tile_xyz=function(t,e,n){var r,o;return o=this.tile_xyz_to_quadkey(t,e,n),r=o.substring(0,o.length-1),this.quadkey_to_tile_xyz(r)},e.prototype.get_resolution=function(t){return this._computed_initial_resolution()/Math.pow(2,t)},e.prototype.get_resolution_by_extent=function(t,e,n){var r,o;return r=(t[2]-t[0])/n,o=(t[3]-t[1])/e,[r,o]},e.prototype.get_level_by_extent=function(t,e,n){var r,o,i,s,a,l,u,h;for(u=(t[2]-t[0])/n,h=(t[3]-t[1])/e,l=Math.max(u,h),r=0,a=this._resolutions,o=0,i=a.length;i>o;o++){if(s=a[o],l>s){if(0===r)return 0;if(r>0)return r-1}r+=1}},e.prototype.get_closest_level_by_extent=function(t,e,n){var r,o,i,s,a;return s=(t[2]-t[0])/n,a=(t[3]-t[1])/e,o=Math.max(s,a),i=this._resolutions,r=this._resolutions.reduce(function(t,e){return Math.abs(e-o)<Math.abs(t-o)?e:t}),this._resolutions.indexOf(r)},e.prototype.snap_to_zoom=function(t,e,n,r){var o,i,s,a,l,u,h,c,p;return o=this._resolutions[r],i=n*o,s=e*o,u=t[0],p=t[1],l=t[2],c=t[3],a=(i-(l-u))/2,h=(s-(c-p))/2,[u-a,p-h,l+a,c+h]},e.prototype.tms_to_wmts=function(t,e,n){"Note this works both ways";return[t,Math.pow(2,n)-1-e,n]},e.prototype.wmts_to_tms=function(t,e,n){"Note this works both ways";return[t,Math.pow(2,n)-1-e,n]},e.prototype.pixels_to_meters=function(t,e,n){var r,o,i;return i=this.get_resolution(n),r=t*i-this.get("x_origin_offset"),o=e*i-this.get("y_origin_offset"),[r,o]},e.prototype.meters_to_pixels=function(t,e,n){var r,o,i;return i=this.get_resolution(n),r=(t+this.get("x_origin_offset"))/i,o=(e+this.get("y_origin_offset"))/i,[r,o]},e.prototype.pixels_to_tile=function(t,e){var n,r;return n=Math.ceil(t/parseFloat(this.get("tile_size"))),n=0===n?n:n-1,r=Math.max(Math.ceil(e/parseFloat(this.get("tile_size")))-1,0),[n,r]},e.prototype.pixels_to_raster=function(t,e,n){var r;return r=this.get("tile_size")<<n,[t,r-e]},e.prototype.meters_to_tile=function(t,e,n){var r,o,i;return i=this.meters_to_pixels(t,e,n),r=i[0],o=i[1],this.pixels_to_tile(r,o)},e.prototype.get_tile_meter_bounds=function(t,e,n){var r,o,i,s,a,l;return r=this.pixels_to_meters(t*this.get("tile_size"),e*this.get("tile_size"),n),s=r[0],l=r[1],o=this.pixels_to_meters((t+1)*this.get("tile_size"),(e+1)*this.get("tile_size"),n),i=o[0],a=o[1],null!=s&&null!=l&&null!=i&&null!=a?[s,l,i,a]:void 0},e.prototype.get_tile_geographic_bounds=function(t,e,n){var r,o,i,s,a,l;return r=this.get_tile_meter_bounds(t,e,n),l=this.utils.meters_extent_to_geographic(r),a=l[0],s=l[1],i=l[2],o=l[3],[a,s,i,o]},e.prototype.get_tiles_by_extent=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x;for(null==n&&(n=1),v=t[0],x=t[1],y=t[2],b=t[3],i=this.meters_to_tile(v,x,e),d=i[0],g=i[1],s=this.meters_to_tile(y,b,e),_=s[0],m=s[1],d-=n,g-=n,_+=n,m+=n,c=[],f=r=a=m,l=g;r>=l;f=r+=-1)for(p=o=u=d,h=_;h>=o;p=o+=1)this.is_valid_tile(p,f,e)&&c.push([p,f,e,this.get_tile_meter_bounds(p,f,e)]);return c=this.sort_tiles_from_center(c,[d,g,_,m])},e.prototype.quadkey_to_tile_xyz=function(t){"Computes tile x, y and z values based on quadKey.";var e,n,r,o,i,s,a,l;for(i=0,s=0,a=t.length,e=n=o=a;n>0;e=n+=-1)if(l=t.charAt(a-e),r=1<<e-1,"0"!==l)if("1"===l)i|=r;else if("2"===l)s|=r;else{if("3"!==l)throw new TypeError("Invalid Quadkey: "+t);i|=r,s|=r}return[i,s,a]},e.prototype.tile_xyz_to_quadkey=function(t,e,n){"Computes quadkey value based on tile x, y and z values.";var r,o,i,s,a,l;for(a="",o=i=l=n;i>0;o=i+=-1)r=0,s=1<<o-1,0!==(t&s)&&(r+=1),0!==(e&s)&&(r+=2),a+=r.toString();return a},e.prototype.children_by_tile_xyz=function(t,e,n){var r,o,i,s,a,l;for(a=this.tile_xyz_to_quadkey(t,e,n),o=[],i=s=0;3>=s;i=s+=1)l=this.quadkey_to_tile_xyz(a+i.toString()),t=l[0],e=l[1],n=l[2],r=this.get_tile_meter_bounds(t,e,n),null!=r&&o.push([t,e,n,r]);return o},e.prototype.parent_by_tile_xyz=function(t,e,n){var r,o;return o=this.tile_xyz_to_quadkey(t,e,n),r=o.substring(0,o.length-1),this.quadkey_to_tile_xyz(r)},e.prototype.get_closest_parent_by_tile_xyz=function(t,e,n){var r,o,i,s,a;for(a=this.calculate_world_x_by_tile_xyz(t,e,n),o=this.normalize_xyz(t,e,n),t=o[0],e=o[1],n=o[2],r=this.tile_xyz_to_quadkey(t,e,n);r.length>0;)if(r=r.substring(0,r.length-1),i=this.quadkey_to_tile_xyz(r),t=i[0],e=i[1],n=i[2],s=this.denormalize_xyz(t,e,n,a),t=s[0],e=s[1],n=s[2],this.tile_xyz_to_key(t,e,n)in this.tiles)return[t,e,n];return[0,0,0]},e.prototype.normalize_xyz=function(t,e,n){var r;return this.get("wrap_around")?(r=Math.pow(2,n),[(t%r+r)%r,e,n]):[t,e,n]},e.prototype.denormalize_xyz=function(t,e,n,r){return[t+r*Math.pow(2,n),e,n]},e.prototype.denormalize_meters=function(t,e,n,r){return[t+2*r*Math.PI*6378137,e]},e.prototype.calculate_world_x_by_tile_xyz=function(t,e,n){return Math.floor(t/Math.pow(2,n))},e.prototype.defaults=function(){return i.extend({},e.__super__.defaults.call(this),{x_origin_offset:20037508.34,y_origin_offset:20037508.34,initial_resolution:156543.03392804097,wrap_around:!0})},e}(o),e.exports=r},{"./tile_source":"models/tiles/tile_source",underscore:"underscore"}],"models/tiles/quadkey_tile_source":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;r=t("./mercator_tile_source"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type="QUADKEYTileSource",e.prototype.get_image_url=function(t,e,n){var r,o,i;return r=this.string_lookup_replace(this.get("url"),this.get("extra_url_vars")),i=this.tms_to_wmts(t,e,n),t=i[0],e=i[1],n=i[2],o=this.tile_xyz_to_quadkey(t,e,n),r.replace("{Q}",o)},e}(r),e.exports={Model:o}},{"./mercator_tile_source":"models/tiles/mercator_tile_source"}],"models/tiles/tile_renderer":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_=function(t,e){return function(){return t.apply(e,arguments)}},d=function(t,e){function n(){this.constructor=t}for(var r in e)f.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},f={}.hasOwnProperty,m=[].indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(e in this&&this[e]===t)return e;return-1};u=t("underscore"),r=t("jquery"),s=t("../renderers/renderer"),i=t("../../common/plot_widget"),c=t("../../common/properties"),p=t("./wmts_tile_source"),o=t("./image_pool"),h=t("../../common/logging").logger,l=function(t){function e(){return this._update=_(this._update,this),this._prefetch_tiles=_(this._prefetch_tiles,this),this._on_tile_error=_(this._on_tile_error,this),this._on_tile_cache_load=_(this._on_tile_cache_load,this),this._on_tile_load=_(this._on_tile_load,this),this._add_attribution=_(this._add_attribution,this),e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.initialize=function(t){return this.attributionEl=null,e.__super__.initialize.apply(this,arguments)},e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change",this.request_render)},e.prototype.get_extent=function(){return[this.x_range.get("start"),this.y_range.get("start"),this.x_range.get("end"),this.y_range.get("end")]},e.prototype._set_data=function(){return this.pool=new o,this.map_plot=this.plot_view.model,this.map_canvas=this.plot_view.canvas_view.ctx,this.map_frame=this.plot_view.frame,this.x_range=this.map_plot.get("x_range"),this.x_mapper=this.map_frame.get("x_mappers")["default"],this.y_range=this.map_plot.get("y_range"),this.y_mapper=this.map_frame.get("y_mappers")["default"],this.extent=this.get_extent(),this._last_height=void 0,this._last_width=void 0},e.prototype._add_attribution=function(){var t,e,n,o,i,s;return t=this.mget("tile_source").get("attribution"),u.isString(t)&&t.length>0?null!=this.attributionEl?this.attributionEl.html(t):(e=this.map_plot.get("outline_line_width"),n=this.map_plot.get("min_border_bottom")+e,s=this.map_frame.get("right")-this.map_frame.get("width"),o=this.map_frame.get("width")-e,this.attributionEl=r("<div>").html(t).addClass("bk-tile-attribution").css({position:"absolute",bottom:n+"px",right:s+"px","max-width":o+"px","background-color":"rgba(255,255,255,0.8)","font-size":"9pt","font-family":"sans-serif"}),i=this.plot_view.$el.find("div.bk-canvas-events"),this.attributionEl.appendTo(i)):void 0},e.prototype._map_data=function(){var t,e;return this.initial_extent=this.get_extent(),e=this.mget("tile_source").get_level_by_extent(this.initial_extent,this.map_frame.get("height"),this.map_frame.get("width")),t=this.mget("tile_source").snap_to_zoom(this.initial_extent,this.map_frame.get("height"),this.map_frame.get("width"),e),this.x_range.set("start",t[0]),this.y_range.set("start",t[1]),this.x_range.set("end",t[2]),this.y_range.set("end",t[3]),this._add_attribution()},e.prototype._on_tile_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.current=!0,e.loaded=!0,this.request_render()},e.prototype._on_tile_cache_load=function(t){var e;return e=t.target.tile_data,e.img=t.target,e.loaded=!0},e.prototype._on_tile_error=function(t){return""},e.prototype._create_tile=function(t,e,n,r,o){var i,s,a;return null==o&&(o=!1),i=this.mget("tile_source").normalize_xyz(t,e,n),a=this.pool.pop(),o?a.onload=this._on_tile_cache_load:a.onload=this._on_tile_load,a.onerror=this._on_tile_error,a.alt="",a.tile_data={tile_coords:[t,e,n],normalized_coords:i,quadkey:this.mget("tile_source").tile_xyz_to_quadkey(t,e,n),cache_key:this.mget("tile_source").tile_xyz_to_key(t,e,n),bounds:r,loaded:!1,x_coord:r[0],y_coord:r[3]},this.mget("tile_source").tiles[a.tile_data.cache_key]=a.tile_data,a.src=(s=this.mget("tile_source")).get_image_url.apply(s,i),a},e.prototype._enforce_aspect_ratio=function(){var t,e,n;return this._last_height!==this.map_frame.get("height")||this._last_width!==this.map_frame.get("width")?(t=this.get_extent(),n=this.mget("tile_source").get_level_by_extent(t,this.map_frame.get("height"),this.map_frame.get("width")),e=this.mget("tile_source").snap_to_zoom(t,this.map_frame.get("height"),this.map_frame.get("width"),n),this.x_range.set({start:e[0],end:e[2]}),this.y_range.set({start:e[1],end:e[3]}),this.extent=e,this._last_height=this.map_frame.get("height"),this._last_width=this.map_frame.get("width"),!0):!1},e.prototype.render=function(t,e,n){return null==this.map_initialized&&(this._set_data(),this._map_data(),this.map_initialized=!0),this._enforce_aspect_ratio()?void 0:(this._update(),null!=this.prefetch_timer&&clearTimeout(this.prefetch_timer),this.prefetch_timer=setTimeout(this._prefetch_tiles,500))},e.prototype._draw_tile=function(t){var e,n,r,o,i,s,a,l,u,h,c;return c=this.mget("tile_source").tiles[t],null!=c?(e=this.plot_view.frame.map_to_screen([c.bounds[0]],[c.bounds[3]],this.plot_view.canvas),a=e[0],h=e[1],n=this.plot_view.frame.map_to_screen([c.bounds[2]],[c.bounds[1]],this.plot_view.canvas),s=n[0],u=n[1],a=a[0],h=h[0],s=s[0],u=u[0],o=s-a,r=u-h,i=a,l=h,this.map_canvas.drawImage(c.img,i,l,o,r)):void 0},e.prototype._set_rect=function(){var t,e,n,r,o;return n=this.plot_view.outline_props.width.value(),e=this.plot_view.canvas.vx_to_sx(this.map_frame.get("left"))+n/2,r=this.plot_view.canvas.vy_to_sy(this.map_frame.get("top"))+n/2,o=this.map_frame.get("width")-n,t=this.map_frame.get("height")-n,this.map_canvas.rect(e,r,o,t),this.map_canvas.clip()},e.prototype._render_tiles=function(t){var e,n,r;for(this.map_canvas.save(),this._set_rect(),this.map_canvas.globalAlpha=this.mget("alpha"),e=0,n=t.length;n>e;e++)r=t[e],this._draw_tile(r);return this.map_canvas.restore()},e.prototype._prefetch_tiles=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v;for(_=this.mget("tile_source"),a=this.get_extent(),l=this.map_frame.get("height"),f=this.map_frame.get("width"),v=this.mget("tile_source").get_level_by_extent(a,l,f),d=this.mget("tile_source").get_tiles_by_extent(a,v),c=[],p=u=0,h=Math.min(10,d.length);h>=u;p=u+=1)m=p[0],g=p[1],y=p[2],t=p[3],r=this.mget("tile_source").children_by_tile_xyz(m,g,y),c.push(function(){var t,a,l;for(l=[],t=0,a=r.length;a>t;t++)e=r[t],o=e[0],i=e[1],s=e[2],n=e[3],_.tile_xyz_to_key(o,i,s)in _.tiles||l.push(this._create_tile(o,i,s,n,!0));return l}.call(this));return c},e.prototype._fetch_tiles=function(t){var e,n,r,o,i,s,a,l;for(o=[],n=0,r=t.length;r>n;n++)i=t[n],s=i[0],a=i[1],l=i[2],e=i[3],o.push(this._create_tile(s,a,l,e));return o},e.prototype._update=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D,I,R;for(A=this.mget("tile_source"),b=A.get("min_zoom"),v=A.get("max_zoom"),A.update(),u=this.get_extent(),R=this.extent[2]-this.extent[0]<u[2]-u[0],h=this.map_frame.get("height"),N=this.map_frame.get("width"),I=A.get_level_by_extent(u,h,N),P=!1,b>I?(u=this.extent,I=b,P=!0):I>v&&(u=this.extent,I=v,P=!0),P&&(this.x_range.set({x_range:{start:u[0],end:u[2]}}),this.y_range.set({start:u[1],end:u[3]}),this.extent=u),this.extent=u,O=A.get_tiles_by_extent(u,I),M=[],x=[],n=[],i=[],c=0,f=O.length;f>c;c++){if(S=O[c],q=S[0],F=S[1],D=S[2],t=S[3],d=A.tile_xyz_to_key(q,F,D),C=A.tiles[d],null!=C&&C.loaded===!0)n.push(d);else if(this.mget("render_parents")&&(E=A.get_closest_parent_by_tile_xyz(q,F,D),j=E[0],T=E[1],z=E[2],w=A.tile_xyz_to_key(j,T,z),k=A.tiles[w],null!=k&&k.loaded&&m.call(M,w)<0&&M.push(w),R))for(i=A.children_by_tile_xyz(q,F,D),p=0,g=i.length;g>p;p++)e=i[p],s=e[0],a=e[1],l=e[2],r=e[3],o=A.tile_xyz_to_key(s,a,l),o in A.tiles&&i.push(o);null==C&&x.push(S)}for(this._render_tiles(M),this._render_tiles(i),this._render_tiles(n),_=0,y=n.length;y>_;_++)S=n[_],A.tiles[S].current=!0;return null!=this.render_timer&&clearTimeout(this.render_timer),this.render_timer=setTimeout(function(t){return function(){return t._fetch_tiles(x)}}(this),65)},e}(i),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return d(e,t),e.prototype.default_view=l,e.prototype.type="TileRenderer",e.prototype.visuals=[],e.prototype.defaults=function(){return u.extend({},e.__super__.defaults.call(this),{alpha:1,x_range_name:"default",y_range_name:"default",tile_source:new p.Model,render_parents:!0,level:"underlay"})},e}(s),e.exports={Model:a,View:l}},{"../../common/logging":"common/logging","../../common/plot_widget":"common/plot_widget","../../common/properties":"common/properties","../renderers/renderer":"models/renderers/renderer","./image_pool":"models/tiles/image_pool","./wmts_tile_source":"models/tiles/wmts_tile_source",jquery:"jquery",underscore:"underscore"}],"models/tiles/tile_source":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){return function(){return t.apply(e,arguments)}},h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;s=t("underscore"),o=t("../../model"),r=t("./image_pool"),l=t("./tile_utils"),a=t("../../common/logging").logger,i=function(t){function e(t){null==t&&(t={}),this.defaults=u(this.defaults,this),e.__super__.constructor.apply(this,arguments),this.utils=new l.ProjectionUtils,this.pool=new r,this.tiles={},this.normalize_case()}return h(e,t),e.prototype.type="TileSource",e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.normalize_case()},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{url:"",tile_size:256,max_zoom:30,min_zoom:0,extra_url_vars:{},attribution:""})},e.prototype.string_lookup_replace=function(t,e){var n,r,o;r=t;for(n in e)o=e[n],r=r.replace("{"+n+"}",o.toString());return r},e.prototype.normalize_case=function(){"Note: should probably be refactored into subclasses.";var t;return t=this.get("url"),t=t.replace("{x}","{X}"),t=t.replace("{y}","{Y}"),t=t.replace("{z}","{Z}"),t=t.replace("{q}","{Q}"),t=t.replace("{xmin}","{XMIN}"),t=t.replace("{ymin}","{YMIN}"),t=t.replace("{xmax}","{XMAX}"),t=t.replace("{ymax}","{YMAX}"),this.set("url",t)},e.prototype.update=function(){var t,e,n,r;a.debug("TileSource: tile cache count: "+Object.keys(this.tiles).length),e=this.tiles,n=[];for(t in e)r=e[t],r.current=!1,n.push(r.retain=!1);return n},e.prototype.tile_xyz_to_key=function(t,e,n){var r;return r=t+":"+e+":"+n},e.prototype.key_to_tile_xyz=function(t){var e;return function(){var n,r,o,i;for(o=t.split(":"),i=[],n=0,r=o.length;r>n;n++)e=o[n],i.push(parseInt(e));return i}()},e.prototype.sort_tiles_from_center=function(t,e){var n,r,o,i,s,a;return i=e[0],a=e[1],o=e[2],s=e[3],n=(o-i)/2+i,r=(s-a)/2+a,t.sort(function(t,e){var o,i;return o=Math.sqrt(Math.pow(n-t[0],2)+Math.pow(r-t[1],2)),i=Math.sqrt(Math.pow(n-e[0],2)+Math.pow(r-e[1],2)),o-i}),t},e.prototype.prune_tiles=function(){var t,e,n,r,o;e=this.tiles;for(t in e)o=e[t],o.retain=o.current||o.tile_coords[2]<3,o.current&&(this.retain_neighbors(o),this.retain_children(o),this.retain_parents(o));n=this.tiles,r=[];for(t in n)o=n[t],o.retain?r.push(void 0):r.push(this.remove_tile(t));return r},e.prototype.remove_tile=function(t){var e;return e=this.tiles[t],null!=e?(this.pool.push(e.img),delete this.tiles[t]):void 0},e.prototype.get_image_url=function(t,e,n){var r;return r=this.string_lookup_replace(this.get("url"),this.get("extra_url_vars")),r.replace("{X}",t).replace("{Y}",e).replace("{Z}",n)},e.prototype.retain_neighbors=function(t){throw Error("Not Implemented")},e.prototype.retain_parents=function(t){throw Error("Not Implemented")},e.prototype.retain_children=function(t){throw Error("Not Implemented")},e.prototype.tile_xyz_to_quadkey=function(t,e,n){throw Error("Not Implemented")},e.prototype.quadkey_to_tile_xyz=function(t){throw Error("Not Implemented")},e}(o),e.exports=i},{"../../common/logging":"common/logging","../../model":"model","./image_pool":"models/tiles/image_pool","./tile_utils":"models/tiles/tile_utils",underscore:"underscore"}],"models/tiles/tile_utils":[function(t,e,n){var r,o,i,s;i=t("proj4"),o=i.defs("GOOGLE"),s=i.defs("WGS84"),r=function(){function t(){this.origin_shift=2*Math.PI*6378137/2}return t.prototype.geographic_to_meters=function(t,e){return i(s,o,[t,e])},t.prototype.meters_to_geographic=function(t,e){return i(o,s,[t,e])},t.prototype.geographic_extent_to_meters=function(t){var e,n,r,o,i,s;return o=t[0],s=t[1],r=t[2],i=t[3],e=this.geographic_to_meters(o,s),o=e[0],s=e[1],n=this.geographic_to_meters(r,i),r=n[0],i=n[1],[o,s,r,i]},t.prototype.meters_extent_to_geographic=function(t){var e,n,r,o,i,s;return o=t[0],s=t[1],r=t[2],i=t[3],e=this.meters_to_geographic(o,s),o=e[0],s=e[1],n=this.meters_to_geographic(r,i),r=n[0],i=n[1],[o,s,r,i]},t}(),e.exports={ProjectionUtils:r}},{proj4:"proj4"}],"models/tiles/tms_tile_source":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;r=t("./mercator_tile_source"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type="TMSTileSource",e.prototype.get_image_url=function(t,e,n){var r;return r=this.string_lookup_replace(this.get("url"),this.get("extra_url_vars")),r.replace("{X}",t).replace("{Y}",e).replace("{Z}",n)},e}(r),e.exports={Model:o}},{"./mercator_tile_source":"models/tiles/mercator_tile_source"}],"models/tiles/wmts_tile_source":[function(t,e,n){var r,o,i=function(t,e){function n(){this.constructor=t}for(var r in e)s.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},s={}.hasOwnProperty;r=t("./mercator_tile_source"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return i(e,t),e.prototype.type="WMTSTileSource",e.prototype.get_image_url=function(t,e,n){var r,o;return r=this.string_lookup_replace(this.get("url"),this.get("extra_url_vars")),o=this.tms_to_wmts(t,e,n),t=o[0],e=o[1],n=o[2],r.replace("{X}",t).replace("{Y}",e).replace("{Z}",n)},e}(r),e.exports={Model:o}},{"./mercator_tile_source":"models/tiles/mercator_tile_source"}],"models/tools/actions/action_tool":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("../button_tool"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._clicked=function(){return this.model.trigger("do")},e}(s.ButtonView),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this.model,"do",this["do"])},e}(s.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e}(s.Model),e.exports={Model:r,View:i,ButtonView:o}},{"../button_tool":"models/tools/button_tool"}],"models/tools/actions/help_tool":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./action_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype["do"]=function(){return window.open(this.mget("redirect"))},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="HelpTool",e.prototype.tool_name="Help",e.prototype.icon="bk-tool-icon-help",e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("tooltip",function(){return this.get("help_tooltip")})},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{help_tooltip:"Click the question mark to learn more about Bokeh plot tools.",redirect:"http://bokeh.pydata.org/en/latest/docs/user_guide/tools.html"})},e}(r.Model),e.exports={Model:o,View:i}},{"./action_tool":"models/tools/actions/action_tool",underscore:"underscore"}],"models/tools/actions/preview_save_tool":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("underscore"),r=t("jquery"),o=t("bootstrap/modal"),i=t("./action_tool"),u=t("./preview_save_tool_template"),a=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.className="bk-bs-modal",e.prototype.template=u,e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.render()},e.prototype.render=function(){return this.$el.empty(),this.$el.html(this.template()),this.$el.attr("tabindex","-1"),this.$el.on("hidden",function(t){return function(){return t.$el.modal("hide")}}(this)),this.$el.modal({show:!1})},e.prototype["do"]=function(){var t;return t=this.plot_view.canvas_view.canvas[0],this.$(".bk-bs-modal-body img").attr("src",t.toDataURL()),this.$el.modal("show")},e}(i.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.default_view=a,e.prototype.type="PreviewSaveTool",e.prototype.tool_name="Preview/Save",e.prototype.icon="bk-tool-icon-save",e}(i.Model),e.exports={Model:s,View:a}},{"./action_tool":"models/tools/actions/action_tool","./preview_save_tool_template":"models/tools/actions/preview_save_tool_template","bootstrap/modal":"bootstrap/modal",jquery:"jquery",underscore:"underscore"}],"models/tools/actions/preview_save_tool_template":[function(t,e,n){e.exports=function(t){t||(t={});var e,n=[],r=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){(function(){n.push('<div class="bk-bs-modal-dialog">\n <div class="bk-bs-modal-content">\n <div class="bk-bs-modal-header">\n <button type="button" class="bk-bs-close" data-bk-bs-dismiss="modal">&times;</button>\n <h4 class="bk-bs-modal-title">Image Preview (right click -> \'Save As\' to save PNG)</h4>\n </div>\n <div class="bk-bs-modal-body">\n <img style="max-height: 300px; max-width: 400px">\n </div>\n <div class="bk-bs-modal-footer">\n <button type="button" class="bk-bs-btn bk-bs-btn-primary" data-bk-bs-dismiss="modal">Close</button>\n </div>\n </div>\n</div>')}).call(this)}.call(t),t.safe=r,t.escape=o,n.join("")}},{}],"models/tools/actions/redo_tool":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;r=t("./action_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this.plot_view,"state_changed",function(t){return function(){return t.model.set("disabled",!t.plot_view.can_redo())}}(this))},e.prototype["do"]=function(){return this.plot_view.redo()},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.default_view=i,e.prototype.type="RedoTool",e.prototype.tool_name="Redo",e.prototype.icon="bk-tool-icon-redo",e.prototype.disabled=!0,e}(r.Model),e.exports={Model:o,View:i}},{"./action_tool":"models/tools/actions/action_tool"}],"models/tools/actions/reset_tool":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;r=t("./action_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype["do"]=function(){return this.plot_view.clear_state(),this.plot_view.reset_range(),this.plot_view.reset_selection(),this.plot_view.reset_dimensions()},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.default_view=i,e.prototype.type="ResetTool",e.prototype.tool_name="Reset",e.prototype.icon="bk-tool-icon-reset",e}(r.Model),e.exports={Model:o,View:i}},{"./action_tool":"models/tools/actions/action_tool"}],"models/tools/actions/undo_tool":[function(t,e,n){var r,o,i,s=function(t,e){function n(){this.constructor=t}for(var r in e)a.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},a={}.hasOwnProperty;r=t("./action_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this.plot_view,"state_changed",function(t){return function(){return t.model.set("disabled",!t.plot_view.can_undo())}}(this))},e.prototype["do"]=function(){return this.plot_view.undo()},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return s(e,t),e.prototype.default_view=i,e.prototype.type="UndoTool",e.prototype.tool_name="Undo",e.prototype.icon="bk-tool-icon-undo",e.prototype.disabled=!0,e}(r.Model),e.exports={Model:o,View:i}},{"./action_tool":"models/tools/actions/action_tool"}],"models/tools/button_tool":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("underscore"),r=t("backbone"),a=t("./tool"),u=t("./button_tool_template"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.tagName="li",e.prototype.template=u,e.prototype.events=function(){return"ontouchstart"in document?{"touchstart .bk-toolbar-button":"_clicked"}:{"click .bk-toolbar-button":"_clicked"}},e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.$el.html(this.template(this.model.attrs_and_props())),this.listenTo(this.model,"change:active",function(t){return function(){return t.render()}}(this)),this.listenTo(this.model,"change:disabled",function(t){return function(){return t.render()}}(this)),this.render()},e.prototype.render=function(){return this.$el.children("button").prop("disabled",this.model.get("disabled")).toggleClass("active",this.model.get("active")),this},e.prototype._clicked=function(t){},e}(r.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e}(a.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("tooltip",function(){return this.get("tool_name")})},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["icon","disabled"])},e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{active:!1,disabled:null!=this.disabled?this.disabled:!1,tool_name:this.tool_name,icon:this.icon})},e}(a.Model),e.exports={Model:o,View:s,ButtonView:i}},{"./button_tool_template":"models/tools/button_tool_template","./tool":"models/tools/tool",backbone:"backbone",underscore:"underscore"}],"models/tools/button_tool_template":[function(t,e,n){e.exports=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},o=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){(function(){n.push('<button type="button" class="bk-toolbar-button hover">\n <div class=\'bk-btn-icon '),n.push(r(this.icon)),n.push("' />\n <span class='tip'>"),n.push(r(this.tooltip)),n.push("</span>\n</button>\n")}).call(this)}.call(t),t.safe=o,t.escape=i,n.join("")}},{}],"models/tools/gestures/box_select_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;a=t("underscore"),s=t("./select_tool"),r=t("../../annotations/box_annotation"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this._baseboint=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],null},e.prototype._pan=function(t){var e,n,r,o,i,s,a,l,u;return n=this.plot_view.canvas,r=[n.sx_to_vx(t.bokeh.sx),n.sy_to_vy(t.bokeh.sy)],i=this.plot_model.get("frame"),o=this.mget("dimensions"),s=this.model._get_dim_limits(this._baseboint,r,i,o),l=s[0],u=s[1],this.mget("overlay").update({left:l[0],right:l[1],top:u[1],bottom:u[0]}),this.mget("select_every_mousemove")&&(e=null!=(a=t.srcEvent.shiftKey)?a:!1,this._select(l,u,!1,e)),null},e.prototype._pan_end=function(t){var e,n,r,o,i,s,a,l,u;return n=this.plot_view.canvas,r=[n.sx_to_vx(t.bokeh.sx),n.sy_to_vy(t.bokeh.sy)],i=this.plot_model.get("frame"),o=this.mget("dimensions"),s=this.model._get_dim_limits(this._baseboint,r,i,o),l=s[0],u=s[1],e=null!=(a=t.srcEvent.shiftKey)?a:!1,this._select(l,u,!0,e),this.mget("overlay").update({left:null,right:null,top:null,bottom:null}),this._baseboint=null,this.plot_view.push_state("box_select",{selection:this.plot_view.get_selection()}),null},e.prototype._select=function(t,e,n,r){var o,i,s,a,l,u,h,c,p,_,d;
14 for(c=t[0],p=t[1],_=e[0],d=e[1],null==r&&(r=!1),i={type:"rect",vx0:c,vx1:p,vy0:_,vy1:d},u=this.mget("renderers"),s=0,a=u.length;a>s;s++)l=u[s],o=l.get("data_source"),h=o.get("selection_manager"),h.select(this,this.plot_view.renderers[l.id],i,n,r);return null!=this.mget("callback")&&this._emit_callback(i),this._save_geometry(i,n,r),null},e.prototype._emit_callback=function(t){var e,n,r,o,i;r=this.mget("renderers")[0],e=this.plot_model.get("canvas"),n=this.plot_model.get("frame"),t.sx0=e.vx_to_sx(t.vx0),t.sx1=e.vx_to_sx(t.vx1),t.sy0=e.vy_to_sy(t.vy0),t.sy1=e.vy_to_sy(t.vy1),o=n.get("x_mappers")[r.get("x_range_name")],i=n.get("y_mappers")[r.get("y_range_name")],t.x0=o.map_from_target(t.vx0),t.x1=o.map_from_target(t.vx1),t.y0=i.map_from_target(t.vy0),t.y1=i.map_from_target(t.vy1),this.mget("callback").execute(this.model,{geometry:t})},e}(s.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="BoxSelectTool",e.prototype.tool_name="Box Select",e.prototype.icon="bk-tool-icon-box-select",e.prototype.event_type="pan",e.prototype.default_order=30,e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.get("overlay").set("silent_update",!0,{silent:!0}),this.register_property("tooltip",function(){return this._get_dim_tooltip(this.get("tool_name"),this._check_dims(this.get("dimensions"),"box select tool"))},!1),this.add_dependencies("tooltip",this,["dimensions"])},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{dimensions:["width","height"],select_every_mousemove:!1,callback:null,overlay:new r.Model({level:"overlay",render_mode:"css",top_units:"screen",left_units:"screen",bottom_units:"screen",right_units:"screen",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:2,line_dash:[4,4]})})},e}(s.Model),e.exports={Model:o,View:i}},{"../../annotations/box_annotation":"models/annotations/box_annotation","./select_tool":"models/tools/gestures/select_tool",underscore:"underscore"}],"models/tools/gestures/box_zoom_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;a=t("underscore"),s=t("./gesture_tool"),r=t("../../annotations/box_annotation"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this._baseboint=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],null},e.prototype._pan=function(t){var e,n,r,o,i,s,a;return e=this.plot_view.canvas,n=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],o=this.plot_model.get("frame"),r=this.mget("dimensions"),i=this.model._get_dim_limits(this._baseboint,n,o,r),s=i[0],a=i[1],this.mget("overlay").update({left:s[0],right:s[1],top:a[1],bottom:a[0]}),null},e.prototype._pan_end=function(t){var e,n,r,o,i,s,a;return e=this.plot_view.canvas,n=[e.sx_to_vx(t.bokeh.sx),e.sy_to_vy(t.bokeh.sy)],o=this.plot_model.get("frame"),r=this.mget("dimensions"),i=this.model._get_dim_limits(this._baseboint,n,o,r),s=i[0],a=i[1],this._update(s,a),this.mget("overlay").update({left:null,right:null,top:null,bottom:null}),this._baseboint=null,null},e.prototype._update=function(t,e){var n,r,o,i,s,a,l,u,h,c,p;if(!(Math.abs(t[1]-t[0])<=5||Math.abs(e[1]-e[0])<=5)){h={},i=this.plot_view.frame.get("x_mappers");for(o in i)r=i[o],s=r.v_map_from_target(t,!0),u=s[0],n=s[1],h[o]={start:u,end:n};c={},a=this.plot_view.frame.get("y_mappers");for(o in a)r=a[o],l=r.v_map_from_target(e,!0),u=l[0],n=l[1],c[o]={start:u,end:n};return p={xrs:h,yrs:c},this.plot_view.push_state("box_zoom",{range:p}),this.plot_view.update_range(p)}},e}(s.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="BoxZoomTool",e.prototype.tool_name="Box Zoom",e.prototype.icon="bk-tool-icon-box-zoom",e.prototype.event_type="pan",e.prototype.default_order=20,e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.get("overlay").set("silent_update",!0,{silent:!0}),this.register_property("tooltip",function(){return this._get_dim_tooltip(this.get("tool_name"),this._check_dims(this.get("dimensions"),"box zoom tool"))},!1),this.add_dependencies("tooltip",this,["dimensions"])},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{dimensions:["width","height"],overlay:new r.Model({level:"overlay",render_mode:"css",top_units:"screen",left_units:"screen",bottom_units:"screen",right_units:"screen",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:2,line_dash:[4,4]})})},e}(s.Model),e.exports={Model:o,View:i}},{"../../annotations/box_annotation":"models/annotations/box_annotation","./gesture_tool":"models/tools/gestures/gesture_tool",underscore:"underscore"}],"models/tools/gestures/gesture_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;a=t("underscore"),r=t("../button_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._clicked=function(){var t;return t=this.model.get("active"),this.model.set("active",!t)},e}(r.ButtonView),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["event_type","default_order"])},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{event_type:this.event_type,default_order:this.default_order})},e}(r.Model),e.exports={Model:o,View:s,ButtonView:i}},{"../button_tool":"models/tools/button_tool",underscore:"underscore"}],"models/tools/gestures/lasso_select_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;a=t("underscore"),s=t("./select_tool"),i=t("../../annotations/poly_annotation"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this.model,"change:active",this._active_change),this.data=null},e.prototype._active_change=function(){return this.mget("active")?void 0:this._clear_overlay()},e.prototype._keyup=function(t){return 13===t.keyCode?this._clear_overlay():void 0},e.prototype._pan_start=function(t){var e,n,r;return e=this.plot_view.canvas,n=e.sx_to_vx(t.bokeh.sx),r=e.sy_to_vy(t.bokeh.sy),this.data={vx:[n],vy:[r]},null},e.prototype._pan=function(t){var e,n,r,o,i,s;return n=this.plot_view.canvas,i=n.sx_to_vx(t.bokeh.sx),s=n.sy_to_vy(t.bokeh.sy),this.data.vx.push(i),this.data.vy.push(s),r=this.mget("overlay"),r.update({xs:this.data.vx,ys:this.data.vy}),this.mget("select_every_mousemove")?(e=null!=(o=t.srcEvent.shiftKey)?o:!1,this._select(this.data.vx,this.data.vy,!1,e)):void 0},e.prototype._pan_end=function(t){var e,n;return this._clear_overlay(),e=null!=(n=t.srcEvent.shiftKey)?n:!1,this._select(this.data.vx,this.data.vy,!0,e),this.plot_view.push_state("lasso_select",{selection:this.plot_view.get_selection()})},e.prototype._clear_overlay=function(){return this.mget("overlay").update({xs:[],ys:[]})},e.prototype._select=function(t,e,n,r){var o,i,s,a,l,u,h;for(i={type:"poly",vx:t,vy:e},u=this.mget("renderers"),s=0,a=u.length;a>s;s++)l=u[s],o=l.get("data_source"),h=o.get("selection_manager"),h.select(this,this.plot_view.renderers[l.id],i,n,r);return this._save_geometry(i,n,r),null},e}(s.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=o,e.prototype.type="LassoSelectTool",e.prototype.tool_name="Lasso Select",e.prototype.icon="bk-tool-icon-lasso-select",e.prototype.event_type="pan",e.prototype.default_order=12,e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.get("overlay").set("silent_update",!0,{silent:!0})},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{select_every_mousemove:!0,overlay:new i.Model({xs_units:"screen",ys_units:"screen",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:2,line_dash:[4,4]})})},e}(s.Model),e.exports={Model:r,View:o}},{"../../annotations/poly_annotation":"models/annotations/poly_annotation","./select_tool":"models/tools/gestures/select_tool",underscore:"underscore"}],"models/tools/gestures/pan_tool":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./gesture_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._pan_start=function(t){var e,n,r,o,i,s;return this.last_dx=0,this.last_dy=0,e=this.plot_view.canvas,n=this.plot_view.frame,i=e.sx_to_vx(t.bokeh.sx),s=e.sy_to_vy(t.bokeh.sy),n.contains(i,s)||(r=n.get("h_range"),o=n.get("v_range"),(i<r.get("start")||i>r.get("end"))&&(this.v_axis_only=!0),(s<o.get("start")||s>o.get("end"))&&(this.h_axis_only=!0)),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan=function(t){return this._update(t.deltaX,-t.deltaY),this.plot_view.interactive_timestamp=Date.now()},e.prototype._pan_end=function(t){return this.h_axis_only=!1,this.v_axis_only=!1,null!=this.pan_info?this.plot_view.push_state("pan",{range:this.pan_info}):void 0},e.prototype._update=function(t,e){var n,r,o,i,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P;o=this.plot_view.frame,h=t-this.last_dx,c=e-this.last_dy,i=s.clone(o.get("h_range")),w=i.get("start")-h,x=i.get("end")-h,z=s.clone(o.get("v_range")),T=z.get("start")-c,j=z.get("end")-c,n=this.mget("dimensions"),n.indexOf("width")>-1&&!this.v_axis_only?(v=w,b=x,m=-h):(v=i.get("start"),b=i.get("end"),m=0),n.indexOf("height")>-1&&!this.h_axis_only?(k=T,M=j,g=c):(k=z.get("start"),M=z.get("end"),g=0),this.last_dx=t,this.last_dy=e,E={},p=o.get("x_mappers");for(u in p)l=p[u],_=l.v_map_from_target([v,b],!0),y=_[0],r=_[1],E[u]={start:y,end:r};P={},d=o.get("y_mappers");for(u in d)l=d[u],f=l.v_map_from_target([k,M],!0),y=f[0],r=f[1],P[u]={start:y,end:r};return this.pan_info={xrs:E,yrs:P,sdx:m,sdy:g},this.plot_view.update_range(this.pan_info,a=!0),null},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="PanTool",e.prototype.tool_name="Pan",e.prototype.icon="bk-tool-icon-pan",e.prototype.event_type="pan",e.prototype.default_order=10,e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("tooltip",function(){return this._get_dim_tooltip("Pan",this._check_dims(this.get("dimensions"),"pan tool"))},!1),this.add_dependencies("tooltip",this,["dimensions"])},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["level","default_order","event_type"])},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{dimensions:["width","height"]})},e}(r.Model),e.exports={Model:o,View:i}},{"./gesture_tool":"models/tools/gestures/gesture_tool",underscore:"underscore"}],"models/tools/gestures/poly_select_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;a=t("underscore"),s=t("./select_tool"),r=t("../../annotations/poly_annotation"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.initialize=function(t){return e.__super__.initialize.call(this,t),this.listenTo(this.model,"change:active",this._active_change),this.data=null},e.prototype._active_change=function(){return this.mget("active")?void 0:this._clear_data()},e.prototype._keyup=function(t){return 13===t.keyCode?this._clear_data():void 0},e.prototype._doubletap=function(t){var e,n;return e=null!=(n=t.srcEvent.shiftKey)?n:!1,this._select(this.data.vx,this.data.vy,!0,e),this._clear_data()},e.prototype._clear_data=function(){return this.data=null,this.mget("overlay").update({xs:[],ys:[]})},e.prototype._tap=function(t){var e,n,r,o,i;return e=this.plot_view.canvas,o=e.sx_to_vx(t.bokeh.sx),i=e.sy_to_vy(t.bokeh.sy),null==this.data?(this.data={vx:[o],vy:[i]},null):(this.data.vx.push(o),this.data.vy.push(i),r=this.mget("overlay"),n={},n.vx=a.clone(this.data.vx),n.vy=a.clone(this.data.vy),r.update({xs:this.data.vx,ys:this.data.vy}))},e.prototype._select=function(t,e,n,r){var o,i,s,a,l,u,h;for(i={type:"poly",vx:t,vy:e},u=this.mget("renderers"),s=0,a=u.length;a>s;s++)l=u[s],o=l.get("data_source"),h=o.get("selection_manager"),h.select(this,this.plot_view.renderers[l.id],i,n,r);return this._save_geometry(i,n,r),this.plot_view.push_state("poly_select",{selection:this.plot_view.get_selection()}),null},e}(s.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="PolySelectTool",e.prototype.tool_name="Poly Select",e.prototype.icon="bk-tool-icon-polygon-select",e.prototype.event_type="tap",e.prototype.default_order=11,e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{overlay:new r.Model({xs_units:"screen",ys_units:"screen",fill_color:"lightgrey",fill_alpha:.5,line_color:"black",line_alpha:1,line_width:2,line_dash:[4,4]})})},e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.get("overlay").set("silent_update",!0,{silent:!0})},e}(s.Model),e.exports={Model:o,View:i}},{"../../annotations/poly_annotation":"models/annotations/poly_annotation","./select_tool":"models/tools/gestures/select_tool",underscore:"underscore"}],"models/tools/gestures/resize_tool":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./gesture_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.className="bk-resize-popup",e.prototype.initialize=function(t){var n;return e.__super__.initialize.call(this,t),n=this.plot_view.$el.find("div.bk-canvas-wrapper"),this.$el.appendTo(n),this.$el.hide(),this.active=!1,null},e.prototype.activate=function(){return this.active=!0,this.render(),null},e.prototype.deactivate=function(){return this.active=!1,this.render(),null},e.prototype.render=function(t){var e,n,r,o;return this.active?(e=this.plot_view.canvas,n=this.plot_view.frame,r=e.vx_to_sx(n.get("h_range").get("end")-40),o=e.vy_to_sy(n.get("v_range").get("start")+40),this.$el.attr("style","position:absolute; top:"+o+"px; left:"+r+"px;"),this.$el.show()):this.$el.hide(),this},e.prototype._pan_start=function(t){var e;return e=this.plot_view.canvas,this.ch=e.get("height"),this.cw=e.get("width"),this.plot_view.interactive_timestamp=Date.now(),null},e.prototype._pan=function(t){return this._update(t.deltaX,t.deltaY),this.plot_view.interactive_timestamp=Date.now(),null},e.prototype._pan_end=function(t){return this.plot_view.push_state("resize",{dimensions:{width:this.plot_view.canvas.get("width"),height:this.plot_view.canvas.get("height")}})},e.prototype._update=function(t,e){var n;return this.plot_view.pause(),n=this.plot_view.canvas,n._set_dims([this.cw+t,this.ch+e]),this.plot_view.unpause(),null},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="ResizeTool",e.prototype.tool_name="Resize",e.prototype.icon="bk-tool-icon-resize",e.prototype.event_type="pan",e.prototype.default_order=40,e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["data"])},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{level:"overlay",data:{}})},e}(r.Model),e.exports={Model:o,View:i}},{"./gesture_tool":"models/tools/gestures/gesture_tool",underscore:"underscore"}],"models/tools/gestures/select_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),a=t("../../../common/logging").logger,r=t("./gesture_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._keyup=function(t){var e,n,r,o,i,s,a;if(27===t.keyCode){for(i=this.mget("renderers"),s=[],n=0,r=i.length;r>n;n++)o=i[n],e=o.get("data_source"),a=e.get("selection_manager"),s.push(a.clear());return s}},e.prototype._save_geometry=function(t,e,n){var r,o,i,l,u,h,c,p;if(r=s.clone(t),c=this.plot_view.frame.get("x_mappers")["default"],p=this.plot_view.frame.get("y_mappers")["default"],"point"===r.type)r.x=c.map_from_target(r.vx),r.y=p.map_from_target(r.vy);else if("rect"===r.type)r.x0=c.map_from_target(r.vx0),r.y0=p.map_from_target(r.vy0),r.x1=c.map_from_target(r.vx1),r.y1=p.map_from_target(r.vy1);else if("poly"===r.type)for(r.x=new Array(r.vx.length),r.y=new Array(r.vy.length),i=l=0,u=r.vx.length;u>=0?u>l:l>u;i=u>=0?++l:--l)r.x[i]=c.map_from_target(r.vx[i]),r.y[i]=p.map_from_target(r.vy[i]);else a.debug("Unrecognized selection geometry type: '"+r.type+"'");return e&&(h=this.plot_model.get("tool_events"),n?(o=h.get("geometries"),o.push(r)):o=[r],h.set("geometries",o)),null},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.initialize=function(t,n){var r,o,i,s,l,u;for(e.__super__.initialize.call(this,t,n),s=this.get("names"),u=this.get("renderers"),0===u.length&&(r=this.get("plot").get("renderers"),u=function(){var t,e,n;for(n=[],t=0,e=r.length;e>t;t++)l=r[t],"GlyphRenderer"===l.type&&n.push(l);return n}()),s.length>0&&(u=function(){var t,e,n;for(n=[],t=0,e=u.length;e>t;t++)l=u[t],s.indexOf(l.get("name"))>=0&&n.push(l);return n}()),this.set("renderers",u),a.debug("setting "+u.length+" renderers for "+this.type+" "+this.id),o=0,i=u.length;i>o;o++)l=u[o],a.debug(" - "+l.type+" "+l.id);return null},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["multi_select_modifier"])},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{renderers:[],names:[],multi_select_modifier:"shift"})},e}(r.Model),e.exports={Model:o,View:i}},{"../../../common/logging":"common/logging","./gesture_tool":"models/tools/gestures/gesture_tool",underscore:"underscore"}],"models/tools/gestures/tap_tool":[function(t,e,n){var r,o,i,s,a=function(t,e){function n(){this.constructor=t}for(var r in e)l.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},l={}.hasOwnProperty;s=t("underscore"),r=t("./select_tool"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype._tap=function(t){var e,n,r,o,i;return n=this.plot_view.canvas,o=n.sx_to_vx(t.bokeh.sx),i=n.sy_to_vy(t.bokeh.sy),e=null!=(r=t.srcEvent.shiftKey)?r:!1,this._select(o,i,!0,e)},e.prototype._select=function(t,e,n,r){var o,i,s,a,l,u,h,c;for(s={type:"point",vx:t,vy:e},o=this.mget("callback"),h=this.mget("renderers"),a=0,l=h.length;l>a;a++)u=h[a],i=u.get("data_source"),c=i.get("selection_manager"),c.select(this,this.plot_view.renderers[u.id],s,n,r),null!=o&&o.execute(i);return this._save_geometry(s,n,r),this.plot_view.push_state("tap",{selection:this.plot_view.get_selection()}),null},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return a(e,t),e.prototype.default_view=i,e.prototype.type="TapTool",e.prototype.tool_name="Tap",e.prototype.icon="bk-tool-icon-tap-select",e.prototype.event_type="tap",e.prototype.default_order=10,e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{callback:null})},e}(r.Model),e.exports={Model:o,View:i}},{"./select_tool":"models/tools/gestures/select_tool",underscore:"underscore"}],"models/tools/gestures/wheel_zoom_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;s=t("underscore"),r=t("./gesture_tool"),("undefined"==typeof a||null===a)&&(a={}),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._pinch=function(t){var e;return e=t.scale>=1?20*(t.scale-1):-20/t.scale,t.bokeh.delta=e,this._scroll(t)},e.prototype._scroll=function(t){var e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C;i=this.plot_model.get("frame"),a=i.get("h_range"),w=i.get("v_range"),k=this.plot_view.canvas.sx_to_vx(t.bokeh.sx),T=this.plot_view.canvas.sy_to_vy(t.bokeh.sy),(k<a.get("start")||k>a.get("end"))&&(x=!0),(T<w.get("start")||T>w.get("end"))&&(s=!0),u=navigator.userAgent.toLowerCase().indexOf("firefox")>-1?20:1,e=null!=(null!=(c=t.originalEvent)?c.deltaY:void 0)?-t.originalEvent.deltaY*u:t.bokeh.delta,o=this.mget("speed")*e,o>.9?o=.9:-.9>o&&(o=-.9),j=a.get("start"),M=a.get("end"),E=w.get("start"),z=w.get("end"),n=this.mget("dimensions"),n.indexOf("width")>-1&&!x?(g=j-(j-k)*o,y=M-(M-k)*o):(g=j,y=M),n.indexOf("height")>-1&&!s?(v=E-(E-T)*o,b=z-(z-T)*o):(v=E,b=z),P={},p=i.get("x_mappers");for(h in p)l=p[h],_=l.v_map_from_target([g,y],!0),m=_[0],r=_[1],P[h]={start:m,end:r};S={},d=i.get("y_mappers");for(h in d)l=d[h],f=l.v_map_from_target([v,b],!0),m=f[0],r=f[1],S[h]={start:m,end:r};return C={xrs:P,yrs:S,factor:o},this.plot_view.push_state("wheel_zoom",{range:C}),this.plot_view.update_range(C),this.plot_view.interactive_timestamp=Date.now(),null},e}(r.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=i,e.prototype.type="WheelZoomTool",e.prototype.tool_name="Wheel Zoom",e.prototype.icon="bk-tool-icon-wheel-zoom",e.prototype.event_type="ontouchstart"in window.document?"pinch":"scroll",e.prototype.default_order=10,e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n),this.register_property("tooltip",function(){return this._get_dim_tooltip(this.get("tool_name"),this._check_dims(this.get("dimensions"),"wheel zoom tool"))},!1),this.add_dependencies("tooltip",this,["dimensions"])},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["speed"])},e.prototype.defaults=function(){return s.extend({},e.__super__.defaults.call(this),{dimensions:["width","height"],speed:1/600})},e}(r.Model),e.exports={Model:o,View:i}},{"./gesture_tool":"models/tools/gestures/gesture_tool",underscore:"underscore"}],"models/tools/inspectors/crosshair_tool":[function(t,e,n){var r,o,i,s,a,l=function(t,e){function n(){this.constructor=t}for(var r in e)u.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},u={}.hasOwnProperty;a=t("underscore"),s=t("../../annotations/span"),i=t("./inspect_tool"),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype._move=function(t){var e,n,r,o,i,s,a,l,u,h;if(this.mget("active")){for(r=this.plot_model.get("frame"),e=this.plot_model.get("canvas"),u=e.sx_to_vx(t.bokeh.sx),h=e.sy_to_vy(t.bokeh.sy),s=this.mget("dimensions"),a=[],o=0,i=s.length;i>o;o++)n=s[o],l=this.mget("spans")[n],r.contains(u,h)?"width"===n?a.push(l.set("computed_location",h)):a.push(l.set("computed_location",u)):a.push(l.unset("computed_location"));return a}},e.prototype._move_exit=function(t){var e,n,r,o,i,s;for(o=this.mget("dimensions"),i=[],n=0,r=o.length;r>n;n++)e=o[n],s=this.mget("spans")[e],i.push(s.unset("computed_location"));return i},e}(i.View),r=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return l(e,t),e.prototype.default_view=o,e.prototype.type="CrosshairTool",e.prototype.tool_name="Crosshair",e.prototype.initialize=function(t,n){var r;return e.__super__.initialize.call(this,t,n),this.register_property("tooltip",function(){return this._get_dim_tooltip("Crosshair",this._check_dims(this.get("dimensions"),"crosshair tool"))},!1),this.add_dependencies("tooltip",this,["dimensions"]),this.set("spans",{width:new s.Model({for_hover:!0,dimension:"width",render_mode:this.get("render_mode"),location_units:this.get("location_units"),line_color:this.get("line_color"),line_width:this.get("line_width"),line_alpha:this.get("line_alpha")}),height:new s.Model({for_hover:!0,dimension:"height",render_mode:this.get("render_mode"),location_units:this.get("location_units"),line_color:this.get("line_color"),line_width:this.get("line_width"),line_alpha:this.get("line_alpha")})}),r=this.get("plot").get("renderers"),r.push(this.get("spans").width),r.push(this.get("spans").height),this.get("plot").set("renderers",r)},e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["location_units","render_mode","spans"])},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{dimensions:["width","height"],location_units:"screen",render_mode:"css",line_color:"black",line_width:1,line_alpha:1})},e}(i.Model),e.exports={Model:r,View:o}},{"../../annotations/span":"models/annotations/span","./inspect_tool":"models/tools/inspectors/inspect_tool",underscore:"underscore"}],"models/tools/inspectors/hover_tool":[function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_=function(t,e){function n(){this.constructor=t}for(var r in e)d.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},d={}.hasOwnProperty;u=t("underscore"),r=t("jquery"),p=t("../../../common/logging").logger,a=t("../../annotations/tooltip"),l=t("../../../util/util"),s=t("./inspect_tool"),c=t("../../../common/hittest"),h=function(t){var e,n,r,o,i;return"#"===t.substr(0,1)?t:(n=/(.*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t),o=parseInt(n[2]),r=parseInt(n[3]),e=parseInt(n[4]),i=e|r<<8|o<<16,n[1]+"#"+i.toString(16))},i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return _(e,t),e.prototype.bind_bokeh_events=function(){var t,e,n,r;for(r=this.mget("computed_renderers"),t=0,e=r.length;e>t;t++)n=r[t],this.listenTo(n.get("data_source"),"inspect",this._update);return this.plot_view.canvas_view.canvas_wrapper.css("cursor","crosshair")},e.prototype._move=function(t){var e,n,r,o,i,s;if(this.mget("active")){if(e=this.plot_view.canvas,i=e.sx_to_vx(t.bokeh.sx),s=e.sy_to_vy(t.bokeh.sy),this.plot_view.frame.contains(i,s))return this._inspect(i,s);n=this.mget("ttmodels");for(r in n)o=n[r],o.clear()}},e.prototype._move_exit=function(){var t,e,n,r;t=this.mget("ttmodels"),e=[];for(n in t)r=t[n],e.push(r.clear());return e},e.prototype._inspect=function(t,e,n){var r,o,i,s,a,l,u,h;for(r={type:"point",vx:t,vy:e},"mouse"===this.mget("mode")?r.type="point":(r.type="span","vline"===this.mget("mode")?r.direction="h":r.direction="v"),o=[],i=[],u=this.mget("computed_renderers"),s=0,a=u.length;a>s;s++)l=u[s],h=l.get("data_source").get("selection_manager"),h.inspect(this,this.plot_view.renderers[l.id],r,{geometry:r});null!=this.mget("callback")&&this._emit_callback(r)},e.prototype._update=function(t,e,n,r,o){var i,s,a,l,u,h,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D,I,R,B,L,G,U,$,V,H,Y,W;if(m=o.geometry,L=null!=(M=this.mget("ttmodels")[n.model.id])?M:null,null!=L&&(L.clear(),j=[t["1d"].indices,t["2d"].indices],y=j[0],v=j[1],null!==t["0d"].glyph||0!==y.length||0!==v.length)){for(U=m.vx,$=m.vy,i=this.plot_model.get("canvas"),f=this.plot_model.get("frame"),R=i.vx_to_sx(U),B=i.vy_to_sy($),H=f.get("x_mappers")[n.mget("x_range_name")],W=f.get("y_mappers")[n.mget("y_range_name")],V=H.map_from_target(U),Y=W.map_from_target($),z=t["0d"].indices,b=0,w=z.length;w>b;b++)g=z[b],h=n.glyph.x[g+1],p=n.glyph.y[g+1],"interp"===this.mget("line_policy")?(E=n.glyph.get_interpolation_hit(g,m),h=E[0],p=E[1],q=H.map_to_target(h),F=W.map_to_target(p)):"prev"===this.mget("line_policy")?(q=i.sx_to_vx(n.glyph.sx[g]),F=i.sy_to_vy(n.glyph.sy[g])):"next"===this.mget("line_policy")?(q=i.sx_to_vx(n.glyph.sx[g+1]),F=i.sy_to_vy(n.glyph.sy[g+1])):"nearest"===this.mget("line_policy")?(s=n.glyph.sx[g],a=n.glyph.sy[g],_=c.dist_2_pts(s,a,R,B),l=n.glyph.sx[g+1],u=n.glyph.sy[g+1],d=c.dist_2_pts(l,u,R,B),d>_?(P=[s,a],D=P[0],I=P[1]):(S=[l,u],D=S[0],I=S[1],g+=1),h=n.glyph.x[g],p=n.glyph.y[g],q=i.sx_to_vx(D),F=i.sy_to_vy(I)):(C=[U,$],q=C[0],F=C[1]),G={index:g,x:V,y:Y,vx:U,vy:$,sx:R,sy:B,data_x:h,data_y:p,rx:q,ry:F},L.add(q,F,this._render_tooltips(r,g,G));for(A=t["1d"].indices,x=0,k=A.length;k>x;x++)g=A[x],h=null!=(O=n.glyph.x)?O[g]:void 0,p=null!=(N=n.glyph.y)?N[g]:void 0,"snap_to_data"===this.mget("point_policy")?(q=i.sx_to_vx(n.glyph.scx(g,R,B)),F=i.sy_to_vy(n.glyph.scy(g,R,B))):(T=[U,$],q=T[0],F=T[1]),G={index:g,x:V,y:Y,vx:U,vy:$,sx:R,sy:B,data_x:h,data_y:p},L.add(q,F,this._render_tooltips(r,g,G));return null}},e.prototype._emit_callback=function(t){var e,n,r,o,i,s;o=this.mget("computed_renderers")[0],r=this.plot_view.renderers[o.id].hit_test(t),e=this.plot_model.get("canvas"),n=this.plot_model.get("frame"),t.sx=e.vx_to_sx(t.vx),t.sy=e.vy_to_sy(t.vy),i=n.get("x_mappers")[o.get("x_range_name")],s=n.get("y_mappers")[o.get("y_range_name")],t.x=i.map_from_target(t.vx),t.y=s.map_from_target(t.vy),this.mget("callback").execute(this.model,{index:r,geometry:t})},e.prototype._render_tooltips=function(t,e,n){var o,i,s,a,c,p,_,d,f,m,g,y,v,b,x,w,k,M;if(k=this.mget("tooltips"),u.isString(k))return r("<div>").html(l.replace_placeholders(k,t,e,n));for(x=r("<table></table>"),c=0,_=k.length;_>c;c++){if(m=k[c],p=m[0],M=m[1],y=r("<tr></tr>"),y.append(r("<td class='bk-tooltip-row-label'>").text(p+": ")),w=r("<td class='bk-tooltip-row-value'></td>"),M.indexOf("$color")>=0){if(g=M.match(/\$color(\[.*\])?:(\w*)/),d=g[0],f=g[1],o=g[2],s=t.get_column(o),null==s){v=r("<span>").text(o+" unknown"),w.append(v);continue}if(a=(null!=f?f.indexOf("hex"):void 0)>=0,b=(null!=f?f.indexOf("swatch"):void 0)>=0,i=s[e],null==i){v=r("<span>(null)</span>"),w.append(v);continue}a&&(i=h(i)),v=r("<span>").text(i),w.append(v),b&&(v=r("<span class='bk-tooltip-color-block'> </span>"),v.css({backgroundColor:i})),w.append(v)}else M=M.replace("$~","$data_"),M=l.replace_placeholders(M,t,e,n),w.append(r("<span>").html(M));y.append(w),x.append(y)}return x},e}(s.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return _(e,t),e.prototype.default_view=i,e.prototype.type="HoverTool",e.prototype.tool_name="Hover Tool",e.prototype.icon="bk-tool-icon-hover",e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["ttmodels","computed_renderers"])},e.prototype.initialize=function(t,n){return e.__super__.initialize.call(this,t,n)},e.prototype.initialize=function(t,n){var r,o,i,s,l,h,c,_,d,f,m,g;for(e.__super__.initialize.call(this,t,n),h=this.get("names"),d=this.get("renderers"),0===d.length&&(r=this.get("plot").get("renderers"),d=function(){var t,e,n;for(n=[],t=0,e=r.length;e>t;t++)c=r[t],"GlyphRenderer"===c.type&&n.push(c);
15 return n}()),h.length>0&&(d=function(){var t,e,n;for(n=[],t=0,e=d.length;e>t;t++)c=d[t],h.indexOf(c.get("name"))>=0&&n.push(c);return n}()),this.set("computed_renderers",d),p.debug("setting "+d.length+" computed renderers for "+this.type+" "+this.id),o=0,s=d.length;s>o;o++)c=d[o],p.debug(" - "+c.type+" "+c.id);if(g={},d=this.get("plot").get("renderers"),m=this.get("tooltips"),null!=m)for(_=this.get("computed_renderers"),i=0,l=_.length;l>i;i++)c=_[i],f=new a.Model,f.set("custom",u.isString(m)),g[c.id]=f,d.push(f);this.set("ttmodels",g),this.get("plot").set("renderers",d)},e.prototype.defaults=function(){return u.extend({},e.__super__.defaults.call(this),{tooltips:[["index","$index"],["data (x, y)","($x, $y)"],["canvas (x, y)","($sx, $sy)"]],renderers:[],names:[],mode:"mouse",point_policy:"snap_to_data",line_policy:"prev",callback:null})},e}(s.Model),e.exports={Model:o,View:i}},{"../../../common/hittest":"common/hittest","../../../common/logging":"common/logging","../../../util/util":"util/util","../../annotations/tooltip":"models/annotations/tooltip","./inspect_tool":"models/tools/inspectors/inspect_tool",jquery:"jquery",underscore:"underscore"}],"models/tools/inspectors/inspect_tool":[function(t,e,n){var r,o,i,s,a,l,u,h=function(t,e){function n(){this.constructor=t}for(var r in e)c.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},c={}.hasOwnProperty;l=t("underscore"),r=t("backbone"),a=t("../tool"),u=t("./inspect_tool_list_item_template"),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.className="bk-toolbar-inspector",e.prototype.template=u,e.prototype.events={'click [type="checkbox"]':"_clicked"},e.prototype.initialize=function(t){return this.listenTo(this.model,"change:active",this.render),this.render()},e.prototype.render=function(){return this.$el.html(this.template(this.model.attrs_and_props())),this},e.prototype._clicked=function(t){var e;return e=this.model.get("active"),this.model.set("active",!e)},e}(r.View),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e}(a.View),o=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return h(e,t),e.prototype.event_type="move",e.prototype.nonserializable_attribute_names=function(){var t;return t=l.without(e.__super__.nonserializable_attribute_names.call(this),"active"),t.concat(["event_type","inner_only"])},e.prototype.bind_bokeh_events=function(){return e.__super__.bind_bokeh_events.call(this),this.listenTo(events,"move",this._inspect)},e.prototype._inspect=function(t,e,n){},e.prototype._exit_inner=function(){},e.prototype._exit_outer=function(){},e.prototype.defaults=function(){return l.extend({},e.__super__.defaults.call(this),{inner_only:!0,active:!0,event_type:"move"})},e}(a.Model),e.exports={Model:o,View:s,ListItemView:i}},{"../tool":"models/tools/tool","./inspect_tool_list_item_template":"models/tools/inspectors/inspect_tool_list_item_template",backbone:"backbone",underscore:"underscore"}],"models/tools/inspectors/inspect_tool_list_item_template":[function(t,e,n){e.exports=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?i(t):""},o=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){(function(){n.push('<input type="checkbox" '),this.active&&n.push("checked"),n.push(">"),n.push(r(this.tool_name)),n.push("</input>\n")}).call(this)}.call(t),t.safe=o,t.escape=i,n.join("")}},{}],"models/tools/tool":[function(t,e,n){var r,o,i,s,a,l,u=function(t,e){function n(){this.constructor=t}for(var r in e)h.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t},h={}.hasOwnProperty;a=t("underscore"),r=t("../../model"),l=t("../../common/logging").logger,o=t("../../common/plot_widget"),s=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.bind_bokeh_events=function(){return this.listenTo(this.model,"change:active",function(t){return function(){return t.mget("active")?t.activate():t.deactivate()}}(this))},e.prototype.activate=function(){},e.prototype.deactivate=function(){},e}(o),i=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return u(e,t),e.prototype.nonserializable_attribute_names=function(){return e.__super__.nonserializable_attribute_names.call(this).concat(["active","level","tool_name"])},e.prototype._check_dims=function(t,e){var n,r,o;return r=[!1,!1],o=r[0],n=r[1],0===t.length?l.warn(e+" given empty dimensions"):1===t.length?"width"!==t[0]&&"height"!==t[0]&&l.warn(e+" given unrecognized dimensions: "+t):2===t.length?(t.indexOf("width")<0||t.indexOf("height")<0)&&l.warn(e+" given unrecognized dimensions: "+t):l.warn(e+" given more than two dimensions: "+t),t.indexOf("width")>=0&&(o=!0),t.indexOf("height")>=0&&(n=!0),[o,n]},e.prototype._get_dim_tooltip=function(t,e){var n,r;return r=e[0],n=e[1],r&&!n?t+" (x-axis)":n&&!r?t+" (y-axis)":t},e.prototype._get_dim_limits=function(t,e,n,r){var o,i,s,l,u,h,c,p;return s=t[0],h=t[1],l=e[0],c=e[1],o=n.get("h_range"),r.indexOf("width")>=0?(u=[a.min([s,l]),a.max([s,l])],u=[a.max([u[0],o.get("min")]),a.min([u[1],o.get("max")])]):u=[o.get("min"),o.get("max")],i=n.get("v_range"),r.indexOf("height")>=0?(p=[a.min([h,c]),a.max([h,c])],p=[a.max([p[0],i.get("min")]),a.min([p[1],i.get("max")])]):p=[i.get("min"),i.get("max")],[u,p]},e.prototype.defaults=function(){return a.extend({},e.__super__.defaults.call(this),{plot:null,tool_name:this.tool_name,level:"overlay"})},e}(r),e.exports={Model:i,View:s}},{"../../common/logging":"common/logging","../../common/plot_widget":"common/plot_widget","../../model":"model",underscore:"underscore"}],"palettes/palettes":[function(t,e,n){e.exports={YlGn3:[3253076,11394446,16252089],YlGn4:[2327619,7915129,12773017,16777164],YlGn5:[26679,3253076,7915129,12773017,16777164],YlGn6:[26679,3253076,7915129,11394446,14282915,16777164],YlGn7:[23090,2327619,4303709,7915129,11394446,14282915,16777164],YlGn8:[23090,2327619,4303709,7915129,11394446,14282915,16252089,16777189],YlGn9:[17705,26679,2327619,4303709,7915129,11394446,14282915,16252089,16777189],YlGnBu3:[2916280,8375739,15595697],YlGnBu4:[2252456,4306628,10607284,16777164],YlGnBu5:[2438292,2916280,4306628,10607284,16777164],YlGnBu6:[2438292,2916280,4306628,8375739,13101492,16777164],YlGnBu7:[797828,2252456,1937856,4306628,8375739,13101492,16777164],YlGnBu8:[797828,2252456,1937856,4306628,8375739,13101492,15595697,16777177],YlGnBu9:[531800,2438292,2252456,1937856,4306628,8375739,13101492,15595697,16777177],GnBu3:[4432586,11066805,14742491],GnBu4:[2854078,8113348,12248252,15792616],GnBu5:[551084,4432586,8113348,12248252,15792616],GnBu6:[551084,4432586,8113348,11066805,13429701,15792616],GnBu7:[546974,2854078,5157843,8113348,11066805,13429701,15792616],GnBu8:[546974,2854078,5157843,8113348,11066805,13429701,14742491,16252144],GnBu9:[540801,551084,2854078,5157843,8113348,11066805,13429701,14742491,16252144],BuGn3:[2925151,10082505,15070713],BuGn4:[2329413,6734500,11723490,15595771],BuGn5:[27948,2925151,6734500,11723490,15595771],BuGn6:[27948,2925151,6734500,10082505,13429990,15595771],BuGn7:[22564,2329413,4304502,6734500,10082505,13429990,15595771],BuGn8:[22564,2329413,4304502,6734500,10082505,13429990,15070713,16252157],BuGn9:[17435,27948,2329413,4304502,6734500,10082505,13429990,15070713,16252157],PuBuGn3:[1872025,10927579,15524592],PuBuGn4:[164234,6793679,12437985,16183287],PuBuGn5:[93273,1872025,6793679,12437985,16183287],PuBuGn6:[93273,1872025,6793679,10927579,13685222,16183287],PuBuGn7:[91216,164234,3576e3,6793679,10927579,13685222,16183287],PuBuGn8:[91216,164234,3576e3,6793679,10927579,13685222,15524592,16775163],PuBuGn9:[83510,93273,164234,3576e3,6793679,10927579,13685222,15524592,16775163],PuBu3:[2854078,10927579,15525874],PuBu4:[356528,7645647,12437985,15855350],PuBu5:[285325,2854078,7645647,12437985,15855350],PuBu6:[285325,2854078,7645647,10927579,13685222,15855350],PuBu7:[216699,356528,3576e3,7645647,10927579,13685222,15855350],PuBu8:[216699,356528,3576e3,7645647,10927579,13685222,15525874,16775163],PuBu9:[145496,285325,356528,3576e3,7645647,10927579,13685222,15525874,16775163],BuPu3:[8935079,10403034,14740724],BuPu4:[8929693,9213638,11783651,15595771],BuPu5:[8458108,8935079,9213638,11783651,15595771],BuPu6:[8458108,8935079,9213638,10403034,12571622,15595771],BuPu7:[7209323,8929693,9202609,9213638,10403034,12571622,15595771],BuPu8:[7209323,8929693,9202609,9213638,10403034,12571622,14740724,16252157],BuPu9:[5046347,8458108,8929693,9202609,9213638,10403034,12571622,14740724,16252157],RdPu3:[12917642,16424885,16638173],RdPu4:[11403646,16214177,16495801,16706530],RdPu5:[7995767,12917642,16214177,16495801,16706530],RdPu6:[7995767,12917642,16214177,16424885,16565696,16706530],RdPu7:[7995767,11403646,14496919,16214177,16424885,16565696,16706530],RdPu8:[7995767,11403646,14496919,16214177,16424885,16565696,16638173,16775155],RdPu9:[4784234,7995767,11403646,14496919,16214177,16424885,16565696,16638173,16775155],PuRd3:[14490743,13210823,15196655],PuRd4:[13505110,14640560,14136792,15855350],PuRd5:[9961539,14490743,14640560,14136792,15855350],PuRd6:[9961539,14490743,14640560,13210823,13941210,15855350],PuRd7:[9502783,13505110,15149450,14640560,13210823,13941210,15855350],PuRd8:[9502783,13505110,15149450,14640560,13210823,13941210,15196655,16250105],PuRd9:[6750239,9961539,13505110,15149450,14640560,13210823,13941210,15196655,16250105],OrRd3:[14895667,16628612,16705736],OrRd4:[14102559,16551257,16632970,16707801],OrRd5:[11730944,14895667,16551257,16632970,16707801],OrRd6:[11730944,14895667,16551257,16628612,16635038,16707801],OrRd7:[10027008,14102559,15689032,16551257,16628612,16635038,16707801],OrRd8:[10027008,14102559,15689032,16551257,16628612,16635038,16705736,16775148],OrRd9:[8323072,11730944,14102559,15689032,16551257,16628612,16635038,16705736,16775148],YlOrRd3:[15743776,16691788,16772512],YlOrRd4:[14883356,16616764,16698460,16777138],YlOrRd5:[12386342,15743776,16616764,16698460,16777138],YlOrRd6:[12386342,15743776,16616764,16691788,16701814,16777138],YlOrRd7:[11599910,14883356,16535082,16616764,16691788,16701814,16777138],YlOrRd8:[11599910,14883356,16535082,16616764,16691788,16701814,16772512,16777164],YlOrRd9:[8388646,12386342,14883356,16535082,16616764,16691788,16701814,16772512,16777164],YlOrBr3:[14245646,16696399,16775100],YlOrBr4:[13388802,16685353,16701838,16777172],YlOrBr5:[10040324,14245646,16685353,16701838,16777172],YlOrBr6:[10040324,14245646,16685353,16696399,16704401,16777172],YlOrBr7:[9186564,13388802,15495188,16685353,16696399,16704401,16777172],YlOrBr8:[9186564,13388802,15495188,16685353,16696399,16704401,16775100,16777189],YlOrBr9:[6694150,10040324,13388802,15495188,16685353,16696399,16704401,16775100,16777189],Purples3:[7695281,12369372,15724021],Purples4:[6967715,10394312,13355490,15921399],Purples5:[5515151,7695281,10394312,13355490,15921399],Purples6:[5515151,7695281,10394312,12369372,14342891,15921399],Purples7:[4854918,6967715,8420794,10394312,12369372,14342891,15921399],Purples8:[4854918,6967715,8420794,10394312,12369372,14342891,15724021,16579581],Purples9:[4128893,5515151,6967715,8420794,10394312,12369372,14342891,15724021,16579581],Blues3:[3244733,10406625,14609399],Blues4:[2191797,7057110,12441575,15725567],Blues5:[545180,3244733,7057110,12441575,15725567],Blues6:[545180,3244733,7057110,10406625,13032431,15725567],Blues7:[542100,2191797,4362950,7057110,10406625,13032431,15725567],Blues8:[542100,2191797,4362950,7057110,10406625,13032431,14609399,16251903],Blues9:[536683,545180,2191797,4362950,7057110,10406625,13032431,14609399,16251903],Greens3:[3253076,10607003,15070688],Greens4:[2329413,7652470,12248243,15595753],Greens5:[27948,3253076,7652470,12248243,15595753],Greens6:[27948,3253076,7652470,10607003,13101504,15595753],Greens7:[23090,2329413,4303709,7652470,10607003,13101504,15595753],Greens8:[23090,2329413,4303709,7652470,10607003,13101504,15070688,16252149],Greens9:[17435,27948,2329413,4303709,7652470,10607003,13101504,15070688,16252149],Oranges3:[15095053,16625259,16705230],Oranges4:[14239489,16616764,16629381,16707038],Oranges5:[10892803,15095053,16616764,16629381,16707038],Oranges6:[10892803,15095053,16616764,16625259,16634018,16707038],Oranges7:[9186564,14239745,15821075,16616764,16625259,16634018,16707038],Oranges8:[9186564,14239745,15821075,16616764,16625259,16634018,16705230,16774635],Oranges9:[8333060,10892803,14239745,15821075,16616764,16625259,16634018,16705230,16774635],Reds3:[14560550,16552562,16703698],Reds4:[13309981,16476746,16559761,16704985],Reds5:[10817301,14560550,16476746,16559761,16704985],Reds6:[10817301,14560550,16476746,16552562,16563105,16704985],Reds7:[10027021,13309981,15678252,16476746,16552562,16563105,16704985],Reds8:[10027021,13309981,15678252,16476746,16552562,16563105,16703698,16774640],Reds9:[6750221,10817301,13309981,15678252,16476746,16552562,16563105,16703698,16774640],Greys3:[6513507,12434877,15790320],Greys4:[5395026,9868950,13421772,16250871],Greys5:[2434341,6513507,9868950,13421772,16250871],Greys6:[2434341,6513507,9868950,12434877,14277081,16250871],Greys7:[2434341,5395026,7566195,9868950,12434877,14277081,16250871],Greys8:[2434341,5395026,7566195,9868950,12434877,14277081,15790320,16777215],Greys9:[0,2434341,5395026,7566195,9868950,12434877,14277081,15790320,16777215],PuOr3:[10063555,16250871,15835968],PuOr4:[6175897,11709394,16627811,15098113],PuOr5:[6175897,11709394,16250871,16627811,15098113],PuOr6:[5515144,10063555,14211819,16703670,15835968,11753478],PuOr7:[5515144,10063555,14211819,16250871,16703670,15835968,11753478],PuOr8:[5515144,8418220,11709394,14211819,16703670,16627811,14713364,11753478],PuOr9:[5515144,8418220,11709394,14211819,16250871,16703670,16627811,14713364,11753478],PuOr10:[2949195,5515144,8418220,11709394,14211819,16703670,16627811,14713364,11753478,8338184],PuOr11:[2949195,5515144,8418220,11709394,14211819,16250871,16703670,16627811,14713364,11753478,8338184],BrBG3:[5944492,16119285,14201701],BrBG4:[99697,8441281,14664317,10903834],BrBG5:[99697,8441281,16119285,14664317,10903834],BrBG6:[91742,5944492,13101797,16181443,14201701,9195786],BrBG7:[91742,5944492,13101797,16119285,16181443,14201701,9195786],BrBG8:[91742,3512207,8441281,13101797,16181443,14664317,12550445,9195786],BrBG9:[91742,3512207,8441281,13101797,16119285,16181443,14664317,12550445,9195786],BrBG10:[15408,91742,3512207,8441281,13101797,16181443,14664317,12550445,9195786,5517317],BrBG11:[15408,91742,3512207,8441281,13101797,16119285,16181443,14664317,12550445,9195786,5517317],PRGn3:[8372091,16250871,11505091],PRGn4:[34871,10935200,12756431,8073876],PRGn5:[34871,10935200,16250871,12756431,8073876],PRGn6:[1800247,8372091,14282963,15193320,11505091,7744131],PRGn7:[1800247,8372091,14282963,16250871,15193320,11505091,7744131],PRGn8:[1800247,5942881,10935200,14282963,15193320,12756431,10055851,7744131],PRGn9:[1800247,5942881,10935200,14282963,16250871,15193320,12756431,10055851,7744131],PRGn10:[17435,1800247,5942881,10935200,14282963,15193320,12756431,10055851,7744131,4194379],PRGn11:[17435,1800247,5942881,10935200,14282963,16250871,15193320,12756431,10055851,7744131,4194379],PiYG3:[10606442,16250871,15311817],PiYG4:[5090342,12116358,15840986,13638795],PiYG5:[5090342,12116358,16250871,15840986,13638795],PiYG6:[5083681,10606442,15136208,16638191,15311817,12917629],PiYG7:[5083681,10606442,15136208,16250871,16638191,15311817,12917629],PiYG8:[5083681,8371265,12116358,15136208,16638191,15840986,14579630,12917629],PiYG9:[5083681,8371265,12116358,15136208,16250871,16638191,15840986,14579630,12917629],PiYG10:[2581529,5083681,8371265,12116358,15136208,16638191,15840986,14579630,12917629,9306450],PiYG11:[2581529,5083681,8371265,12116358,15136208,16250871,16638191,15840986,14579630,12917629,9306450],RdBu3:[6793679,16250871,15698530],RdBu4:[356784,9618910,16033154,13238304],RdBu5:[356784,9618910,16250871,16033154,13238304],RdBu6:[2188972,6793679,13755888,16636871,15698530,11671595],RdBu7:[2188972,6793679,13755888,16250871,16636871,15698530,11671595],RdBu8:[2188972,4428739,9618910,13755888,16636871,16033154,14049357,11671595],RdBu9:[2188972,4428739,9618910,13755888,16250871,16636871,16033154,14049357,11671595],RdBu10:[340065,2188972,4428739,9618910,13755888,16636871,16033154,14049357,11671595,6750239],RdBu11:[340065,2188972,4428739,9618910,13755888,16250871,16636871,16033154,14049357,11671595,6750239],RdGy3:[10066329,16777215,15698530],RdGy4:[4210752,12237498,16033154,13238304],RdGy5:[4210752,12237498,16777215,16033154,13238304],RdGy6:[5066061,10066329,14737632,16636871,15698530,11671595],RdGy7:[5066061,10066329,14737632,16777215,16636871,15698530,11671595],RdGy8:[5066061,8882055,12237498,14737632,16636871,16033154,14049357,11671595],RdGy9:[5066061,8882055,12237498,14737632,16777215,16636871,16033154,14049357,11671595],RdGy10:[1710618,5066061,8882055,12237498,14737632,16636871,16033154,14049357,11671595,6750239],RdGy11:[1710618,5066061,8882055,12237498,14737632,16777215,16636871,16033154,14049357,11671595,6750239],RdYlBu3:[9551835,16777151,16551257],RdYlBu4:[2915254,11262441,16625249,14096668],RdYlBu5:[2915254,11262441,16777151,16625249,14096668],RdYlBu6:[4552116,9551835,14742520,16703632,16551257,14102567],RdYlBu7:[4552116,9551835,14742520,16777151,16703632,16551257,14102567],RdYlBu8:[4552116,7646673,11262441,14742520,16703632,16625249,16018755,14102567],RdYlBu9:[4552116,7646673,11262441,14742520,16777151,16703632,16625249,16018755,14102567],RdYlBu10:[3225237,4552116,7646673,11262441,14742520,16703632,16625249,16018755,14102567,10813478],RdYlBu11:[3225237,4552116,7646673,11262441,14742520,16777151,16703632,16625249,16018755,14102567,10813478],Spectral3:[10081684,16777151,16551257],Spectral4:[2851770,11263396,16625249,14096668],Spectral5:[2851770,11263396,16777151,16625249,14096668],Spectral6:[3311805,10081684,15136152,16703627,16551257,13975119],Spectral7:[3311805,10081684,15136152,16777151,16703627,16551257,13975119],Spectral8:[3311805,6734501,11263396,15136152,16703627,16625249,16018755,13975119],Spectral9:[3311805,6734501,11263396,15136152,16777151,16703627,16625249,16018755,13975119],Spectral10:[6180770,3311805,6734501,11263396,15136152,16703627,16625249,16018755,13975119,10355010],Spectral11:[6180770,3311805,6734501,11263396,15136152,16777151,16703627,16625249,16018755,13975119,10355010],RdYlGn3:[9555808,16777151,16551257],RdYlGn4:[1742401,10934634,16625249,14096668],RdYlGn5:[1742401,10934634,16777151,16625249,14096668],RdYlGn6:[1742928,9555808,14282635,16703627,16551257,14102567],RdYlGn7:[1742928,9555808,14282635,16777151,16703627,16551257,14102567],RdYlGn8:[1742928,6733155,10934634,14282635,16703627,16625249,16018755,14102567],RdYlGn9:[1742928,6733155,10934634,14282635,16777151,16703627,16625249,16018755,14102567],RdYlGn10:[26679,1742928,6733155,10934634,14282635,16703627,16625249,16018755,14102567,10813478],RdYlGn11:[26679,1742928,6733155,10934634,14282635,16777151,16703627,16625249,16018755,14102567,10813478]}},{}],"util/bezier":[function(t,e,n){var r,o;o=function(t,e,n,r,o,i,s,a){var l,u,h,c,p,_,d,f,m,g,y,v;return l=a*o,u=-s*i,h=s*o,c=a*i,_=.5*(r-n),p=8/3*Math.sin(.5*_)*Math.sin(.5*_)/Math.sin(_),d=t+Math.cos(n)-p*Math.sin(n),g=e+Math.sin(n)+p*Math.cos(n),m=t+Math.cos(r),v=e+Math.sin(r),f=m+p*Math.sin(r),y=v-p*Math.cos(r),[l*d+u*g,h*d+c*g,l*f+u*y,h*f+c*y,l*m+u*v,h*m+c*v]},r=function(t,e,n,r,i,s,a,l,u){var h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D,I;return z=i*(Math.PI/180),T=Math.sin(z),d=Math.cos(z),x=Math.abs(n),w=Math.abs(r),y=d*(t-l)*.5+T*(e-u)*.5,v=d*(e-u)*.5-T*(t-l)*.5,g=y*y/(x*x)+v*v/(w*w),g>1&&(g=Math.sqrt(g),x*=g,w*=g),h=d/x,c=T/x,p=-T/w,_=d/w,O=h*t+c*e,F=p*t+_*e,N=h*l+c*u,D=p*l+_*u,f=(N-O)*(N-O)+(D-F)*(D-F),j=1/f-.25,0>j&&(j=0),M=Math.sqrt(j),a===s&&(M=-M),q=.5*(O+N)-M*(D-F),I=.5*(F+D)+M*(N-O),E=Math.atan2(F-I,O-q),P=Math.atan2(D-I,N-q),A=P-E,0>A&&1===a?A+=2*Math.PI:A>0&&0===a&&(A-=2*Math.PI),k=Math.ceil(Math.abs(A/(.5*Math.PI+.001))),b=function(){var t,e,n;for(n=[],m=t=0,e=k;e>=0?e>t:t>e;m=e>=0?++t:--t)S=E+m*A/k,C=E+(m+1)*A/k,n.push(o(q,I,S,C,x,w,T,d));return n}()},e.exports={arc_to_bezier:r,segment_to_bezier:o}},{}],"util/util":[function(t,e,n){var r,o,i,s,a,l;i=t("underscore"),o=t("sprintf"),r=t("numeral"),s=function(t){var e;return i.isNumber(t)?(e=function(){switch(!1){case Math.floor(t)!==t:return"%d";case!(Math.abs(t)>.1&&Math.abs(t)<1e3):return"%0.3f";default:return"%0.3e"}}(),o.sprintf(e,t)):""+t},l=function(t,e,n,o){return null==o&&(o={}),t=t.replace(/(^|[^\$])\$(\w+)/g,function(t){return function(t,e,n){return e+"@$"+n}}(this)),t=t.replace(/(^|[^@])@(?:(\$?\w+)|{([^{}]+)})(?:{([^{}]+)})?/g,function(t){return function(t,a,l,u,h){var c,p,_;return l=null!=u?u:l,_="$"===l[0]?o[l.substring(1)]:null!=(c=e.get_column(l))?c[n]:void 0,p=null==_?"???":null!=h?r.format(_,h):s(_),""+a+i.escape(p)}}(this))},a=function(t){var e;return e=t.get("selected"),e["0d"].glyph?e["0d"].indices:e["1d"].indices.length>0?e["1d"].indices:e["2d"].indices.length>0?e["2d"].indices:[]},e.exports={replace_placeholders:l,get_indices:a}},{numeral:"numeral",sprintf:"sprintf",underscore:"underscore"}],backbone:[function(e,n,r){(function(n){
16 // (c) 2010-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
17 // Backbone may be freely distributed under the MIT license.
18 !function(o){var i="object"==typeof self&&self.self==self&&self||"object"==typeof n&&n.global==n&&n;if("function"==typeof t&&t.amd)t(["underscore","jquery","exports"],function(t,e,n){i.Backbone=o(i,n,t,e)});else if("undefined"!=typeof r){var s,a=e("underscore");try{s=e("jquery")}catch(l){}o(i,r,a,s)}else i.Backbone=o(i,{},i._,i.jQuery||i.Zepto||i.ender||i.$)}(function(t,e,n,r){var o=t.Backbone,i=Array.prototype.slice;e.VERSION="1.2.3",e.$=r,e.noConflict=function(){return t.Backbone=o,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=function(t,e,r){switch(t){case 1:return function(){return n[e](this[r])};case 2:return function(t){return n[e](this[r],t)};case 3:return function(t,o){return n[e](this[r],l(t,this),o)};case 4:return function(t,o,i){return n[e](this[r],l(t,this),o,i)};default:return function(){var t=i.call(arguments);return t.unshift(this[r]),n[e].apply(n,t)}}},a=function(t,e,r){n.each(e,function(e,o){n[o]&&(t.prototype[o]=s(e,o,r))})},l=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?u(t):n.isString(t)?function(e){return e.get(t)}:t},u=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}},h=e.Events={},c=/\s+/,p=function(t,e,r,o,i){var s,a=0;if(r&&"object"==typeof r){void 0!==o&&"context"in i&&void 0===i.context&&(i.context=o);for(s=n.keys(r);a<s.length;a++)e=p(t,e,s[a],r[s[a]],i)}else if(r&&c.test(r))for(s=r.split(c);a<s.length;a++)e=t(e,s[a],o,i);else e=t(e,r,o,i);return e};h.on=function(t,e,n){return _(this,t,e,n)};var _=function(t,e,n,r,o){if(t._events=p(d,t._events||{},e,n,{context:r,ctx:t,listening:o}),o){var i=t._listeners||(t._listeners={});i[o.id]=o}return t};h.listenTo=function(t,e,r){if(!t)return this;var o=t._listenId||(t._listenId=n.uniqueId("l")),i=this._listeningTo||(this._listeningTo={}),s=i[o];if(!s){var a=this._listenId||(this._listenId=n.uniqueId("l"));s=i[o]={obj:t,objId:o,id:a,listeningTo:i,count:0}}return _(t,e,r,this,s),this};var d=function(t,e,n,r){if(n){var o=t[e]||(t[e]=[]),i=r.context,s=r.ctx,a=r.listening;a&&a.count++,o.push({callback:n,context:i,ctx:i||s,listening:a})}return t};h.off=function(t,e,n){return this._events?(this._events=p(f,this._events,t,e,{context:n,listeners:this._listeners}),this):this},h.stopListening=function(t,e,r){var o=this._listeningTo;if(!o)return this;for(var i=t?[t._listenId]:n.keys(o),s=0;s<i.length;s++){var a=o[i[s]];if(!a)break;a.obj.off(e,r,this)}return n.isEmpty(o)&&(this._listeningTo=void 0),this};var f=function(t,e,r,o){if(t){var i,s=0,a=o.context,l=o.listeners;if(e||r||a){for(var u=e?[e]:n.keys(t);s<u.length;s++){e=u[s];var h=t[e];if(!h)break;for(var c=[],p=0;p<h.length;p++){var _=h[p];r&&r!==_.callback&&r!==_.callback._callback||a&&a!==_.context?c.push(_):(i=_.listening,i&&0===--i.count&&(delete l[i.id],delete i.listeningTo[i.objId]))}c.length?t[e]=c:delete t[e]}return n.size(t)?t:void 0}for(var d=n.keys(l);s<d.length;s++)i=l[d[s]],delete l[i.id],delete i.listeningTo[i.objId]}};h.once=function(t,e,r){var o=p(m,{},t,e,n.bind(this.off,this));return this.on(o,void 0,r)},h.listenToOnce=function(t,e,r){var o=p(m,{},e,r,n.bind(this.stopListening,this,t));return this.listenTo(t,o)};var m=function(t,e,r,o){if(r){var i=t[e]=n.once(function(){o(e,i),r.apply(this,arguments)});i._callback=r}return t};h.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),r=0;e>r;r++)n[r]=arguments[r+1];return p(g,this._events,t,void 0,n),this};var g=function(t,e,n,r){if(t){var o=t[e],i=t.all;o&&i&&(i=i.slice()),o&&y(o,r),i&&y(i,[e].concat(r))}return t},y=function(t,e){var n,r=-1,o=t.length,i=e[0],s=e[1],a=e[2];switch(e.length){case 0:for(;++r<o;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<o;)(n=t[r]).callback.call(n.ctx,i);return;case 2:for(;++r<o;)(n=t[r]).callback.call(n.ctx,i,s);return;case 3:for(;++r<o;)(n=t[r]).callback.call(n.ctx,i,s,a);return;default:for(;++r<o;)(n=t[r]).callback.apply(n.ctx,e);return}};h.bind=h.on,h.unbind=h.off,n.extend(e,h);var v=e.Model=function(t,e){var r=t||{};e||(e={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(r=this.parse(r,e)||{}),r=n.defaults({},r,n.result(this,"defaults")),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(v.prototype,h,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,r){if(null==t)return this;var o;if("object"==typeof t?(o=t,r=e):(o={})[t]=e,r||(r={}),!this._validate(o,r))return!1;var i=r.unset,s=r.silent,a=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var u=this.attributes,h=this.changed,c=this._previousAttributes;for(var p in o)e=o[p],n.isEqual(u[p],e)||a.push(p),n.isEqual(c[p],e)?delete h[p]:h[p]=e,i?delete u[p]:u[p]=e;if(this.id=this.get(this.idAttribute),!s){a.length&&(this._pending=r);for(var _=0;_<a.length;_++)this.trigger("change:"+a[_],this,u[a[_]],r)}if(l)return this;if(!s)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger("change",this,r);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?n.clone(this.changed):!1;var e=this._changing?this._previousAttributes:this.attributes,r={};for(var o in t){var i=t[o];n.isEqual(e[o],i)||(r[o]=i)}return n.size(r)?r:!1},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,r=t.success;return t.success=function(n){var o=t.parse?e.parse(n,t):n;return e.set(o,t)?(r&&r.call(t.context,e,n,t),void e.trigger("sync",e,n,t)):!1},L(this,t),this.sync("read",this,t)},save:function(t,e,r){var o;null==t||"object"==typeof t?(o=t,r=e):(o={})[t]=e,r=n.extend({validate:!0,parse:!0},r);var i=r.wait;if(o&&!i){if(!this.set(o,r))return!1}else if(!this._validate(o,r))return!1;var s=this,a=r.success,l=this.attributes;r.success=function(t){s.attributes=l;var e=r.parse?s.parse(t,r):t;return i&&(e=n.extend({},o,e)),e&&!s.set(e,r)?!1:(a&&a.call(r.context,s,t,r),void s.trigger("sync",s,t,r))},L(this,r),o&&i&&(this.attributes=n.extend({},l,o));var u=this.isNew()?"create":r.patch?"patch":"update";"patch"!==u||r.attrs||(r.attrs=o);var h=this.sync(u,this,r);return this.attributes=l,h},destroy:function(t){t=t?n.clone(t):{};var e=this,r=t.success,o=t.wait,i=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){o&&i(),r&&r.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var s=!1;return this.isNew()?n.defer(t.success):(L(this,t),s=this.sync("delete",this,t)),o||i(),s},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||B();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.defaults({validate:!0},t))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;return r?(this.trigger("invalid",this,r,n.extend(e,{validationError:r})),!1):!0}});var b={keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1};a(v,b,"attributes");var x=e.Collection=function(t,e){e||(e={}),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},w={add:!0,remove:!0,merge:!0},k={add:!0,remove:!1},M=function(t,e,n){n=Math.min(Math.max(n,0),t.length);for(var r=Array(t.length-n),o=e.length,i=0;i<r.length;i++)r[i]=t[i+n];for(i=0;o>i;i++)t[i+n]=e[i];for(i=0;i<r.length;i++)t[i+o+n]=r[i]};n.extend(x.prototype,h,{model:v,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,k))},remove:function(t,e){e=n.extend({},e);var r=!n.isArray(t);t=r?[t]:n.clone(t);var o=this._removeModels(t,e);return!e.silent&&o&&this.trigger("update",this,e),r?o[0]:o},set:function(t,e){if(null!=t){e=n.defaults({},e,w),e.parse&&!this._isModel(t)&&(t=this.parse(t,e));var r=!n.isArray(t);t=r?[t]:t.slice();var o=e.at;null!=o&&(o=+o),0>o&&(o+=this.length+1);for(var i,s=[],a=[],l=[],u={},h=e.add,c=e.merge,p=e.remove,_=!1,d=this.comparator&&null==o&&e.sort!==!1,f=n.isString(this.comparator)?this.comparator:null,m=0;m<t.length;m++){i=t[m];var g=this.get(i);if(g){if(c&&i!==g){var y=this._isModel(i)?i.attributes:i;e.parse&&(y=g.parse(y,e)),g.set(y,e),d&&!_&&(_=g.hasChanged(f))}u[g.cid]||(u[g.cid]=!0,s.push(g)),t[m]=g}else h&&(i=t[m]=this._prepareModel(i,e),i&&(a.push(i),this._addReference(i,e),u[i.cid]=!0,s.push(i)))}if(p){for(m=0;m<this.length;m++)i=this.models[m],u[i.cid]||l.push(i);l.length&&this._removeModels(l,e)}var v=!1,b=!d&&h&&p;if(s.length&&b?(v=this.length!=s.length||n.some(this.models,function(t,e){return t!==s[e]}),this.models.length=0,M(this.models,s,0),this.length=this.models.length):a.length&&(d&&(_=!0),M(this.models,a,null==o?this.length:o),this.length=this.models.length),_&&this.sort({silent:!0}),!e.silent){for(m=0;m<a.length;m++)null!=o&&(e.index=o+m),i=a[m],i.trigger("add",i,this,e);(_||v)&&this.trigger("sort",this,e),(a.length||l.length)&&this.trigger("update",this,e)}return r?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return i.apply(this.models,arguments)},get:function(t){if(null!=t){var e=this.modelId(this._isModel(t)?t.attributes:t);return this._byId[t]||this._byId[e]||this._byId[t.cid]}},at:function(t){return 0>t&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw new Error("Cannot sort a set without a comparator");t||(t={});var r=e.length;return n.isFunction(e)&&(e=n.bind(e,this)),1===r||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return n.invoke(this.models,"get",t)},fetch:function(t){t=n.extend({parse:!0},t);var e=t.success,r=this;return t.success=function(n){var o=t.reset?"reset":"set";r[o](n,t),e&&e.call(t.context,r,n,t),r.trigger("sync",r,n,t)},L(this,t),this.sync("read",this,t)},create:function(t,e){e=e?n.clone(e):{};var r=e.wait;if(t=this._prepareModel(t,e),!t)return!1;r||this.add(t,e);var o=this,i=e.success;return e.success=function(t,e,n){r&&o.add(t,n),i&&i.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t){return t[this.model.prototype.idAttribute||"id"]},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(this._isModel(t))return t.collection||(t.collection=this),t;e=e?n.clone(e):{},e.collection=this;var r=new this.model(t,e);return r.validationError?(this.trigger("invalid",this,r.validationError,e),!1):r},_removeModels:function(t,e){for(var n=[],r=0;r<t.length;r++){var o=this.get(t[r]);if(o){var i=this.indexOf(o);this.models.splice(i,1),this.length--,e.silent||(e.index=i,o.trigger("remove",o,this,e)),n.push(o),this._removeReference(o,e)}}return n.length?n:!1},_isModel:function(t){return t instanceof v},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){if("add"!==t&&"remove"!==t||n===this){if("destroy"===t&&this.remove(e,r),"change"===t){var o=this.modelId(e.previousAttributes()),i=this.modelId(e.attributes);o!==i&&(null!=o&&delete this._byId[o],null!=i&&(this._byId[i]=e))}this.trigger.apply(this,arguments)}}});var j={forEach:3,each:3,map:3,collect:3,reduce:4,foldl:4,inject:4,reduceRight:4,foldr:4,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3};a(x,j,"models");var T=e.View=function(t){this.cid=n.uniqueId("view"),n.extend(this,n.pick(t,E)),this._ensureElement(),this.initialize.apply(this,arguments)},z=/^(\S+)\s*(.*)$/,E=["model","collection","el","id","attributes","className","tagName","events"];n.extend(T.prototype,h,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;this.undelegateEvents();for(var e in t){var r=t[e];if(n.isFunction(r)||(r=this[r]),r){var o=e.match(z);this.delegate(o[1],o[2],n.bind(r,this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t["class"]=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}}),e.sync=function(t,r,o){var i=P[t];n.defaults(o||(o={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var s={type:i,dataType:"json"};if(o.url||(s.url=n.result(r,"url")||B()),null!=o.data||!r||"create"!==t&&"update"!==t&&"patch"!==t||(s.contentType="application/json",s.data=JSON.stringify(o.attrs||r.toJSON(o))),o.emulateJSON&&(s.contentType="application/x-www-form-urlencoded",s.data=s.data?{model:s.data}:{}),o.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){s.type="POST",o.emulateJSON&&(s.data._method=i);var a=o.beforeSend;o.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",i),a?a.apply(this,arguments):void 0}}"GET"===s.type||o.emulateJSON||(s.processData=!1);var l=o.error;o.error=function(t,e,n){o.textStatus=e,o.errorThrown=n,l&&l.call(o.context,t,e,n)};var u=o.xhr=e.ajax(n.extend(s,o));return r.trigger("request",r,u,o),u};var P={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var S=e.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},C=/\((.*?)\)/g,A=/(\(\?)?:\w+/g,O=/\*\w+/g,N=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(S.prototype,h,{initialize:function(){},route:function(t,r,o){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(r)&&(o=r,r=""),o||(o=this[r]);var i=this;return e.history.route(t,function(n){var s=i._extractParameters(t,n);i.execute(o,s,r)!==!1&&(i.trigger.apply(i,["route:"+r].concat(s)),i.trigger("route",r,s),e.history.trigger("route",i,r,s))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(N,"\\$&").replace(C,"(?:$1)?").replace(A,function(t,e){return e?t:"([^/?]+)"}).replace(O,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return n.map(r,function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null})}});var q=e.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},F=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,I=/#.*$/;q.started=!1,n.extend(q.prototype,h,{interval:50,atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:function(){var t=this.decodeFragment(this.location.pathname),e=t.slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(F,"")},start:function(t){if(q.started)throw new Error("Backbone.history has already been started");if(q.started=!0,this.options=n.extend({root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(D,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;var r=document.body,o=r.insertBefore(this.iframe,r.firstChild).contentWindow;o.document.open(),o.document.close(),o.location.hash="#"+this.fragment}var i=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};return this._usePushState?i("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?i("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),q.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment?!1:(this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!q.started)return!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;(""===t||"?"===t.charAt(0))&&(n=n.slice(0,-1)||"/");var r=n+t;if(t=this.decodeFragment(t.replace(I,"")),this.fragment!==t){if(this.fragment=t,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var o=this.iframe.contentWindow;e.replace||(o.document.open(),o.document.close()),this._updateHash(o.location,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new q;var R=function(t,e){var r,o=this;r=t&&n.has(t,"constructor")?t.constructor:function(){return o.apply(this,arguments)},n.extend(r,o,e);var i=function(){this.constructor=r};return i.prototype=o.prototype,r.prototype=new i,t&&n.extend(r.prototype,t),r.__super__=o.prototype,r};v.extend=x.extend=S.extend=T.extend=q.extend=R;var B=function(){throw new Error('A "url" property or function must be specified')},L=function(t,e){var n=e.error;e.error=function(r){n&&n.call(e.context,t,r,e),t.trigger("error",t,r,e)}};return e})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{jquery:"jquery",underscore:"underscore"}],_process:[function(t,e,n){function r(){h=!1,a.length?u=a.concat(u):c=-1,u.length&&o()}function o(){if(!h){var t=setTimeout(r);h=!0;for(var e=u.length;e;){for(a=u,u=[];++c<e;)a&&a[c].run();c=-1,e=u.length}a=null,h=!1,clearTimeout(t)}}function i(t,e){this.fun=t,this.array=e}function s(){}var a,l=e.exports={},u=[],h=!1,c=-1;l.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new i(t,e)),1!==u.length||h||setTimeout(o,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={},l.on=s,l.addListener=s,l.once=s,l.off=s,l.removeListener=s,l.removeAllListeners=s,l.emit=s,l.binding=function(t){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(t){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],"es6-promise":[function(e,n,r){(function(r,o){/*!
19 * @overview es6-promise - a tiny implementation of Promises/A+.
20 * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
21 * @license Licensed under MIT license
22 * See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
23 * @version 3.0.2
24 */
25 (function(){"use strict";function i(t){return"function"==typeof t||"object"==typeof t&&null!==t}function s(t){return"function"==typeof t}function a(t){return"object"==typeof t&&null!==t}function l(t){H=t}function u(t){J=t}function h(){return function(){r.nextTick(f)}}function c(){return function(){V(f)}}function p(){var t=0,e=new Z(f),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function _(){var t=new MessageChannel;return t.port1.onmessage=f,function(){t.port2.postMessage(0)}}function d(){return function(){setTimeout(f,1)}}function f(){for(var t=0;X>t;t+=2){var e=nt[t],n=nt[t+1];e(n),nt[t]=void 0,nt[t+1]=void 0}X=0}function m(){try{var t=e,n=t("vertx");return V=n.runOnLoop||n.runOnContext,c()}catch(r){return d()}}function g(){}function y(){return new TypeError("You cannot resolve a promise with itself")}function v(){return new TypeError("A promises callback cannot return that same promise.")}function b(t){try{return t.then}catch(e){return st.error=e,st}}function x(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function w(t,e,n){J(function(t){var r=!1,o=x(n,e,function(n){r||(r=!0,e!==n?j(t,n):z(t,n))},function(e){r||(r=!0,E(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,E(t,o))},t)}function k(t,e){e._state===ot?z(t,e._result):e._state===it?E(t,e._result):P(e,void 0,function(e){j(t,e)},function(e){E(t,e)})}function M(t,e){if(e.constructor===t.constructor)k(t,e);else{var n=b(e);n===st?E(t,st.error):void 0===n?z(t,e):s(n)?w(t,e,n):z(t,e)}}function j(t,e){t===e?E(t,y()):i(e)?M(t,e):z(t,e)}function T(t){t._onerror&&t._onerror(t._result),S(t)}function z(t,e){t._state===rt&&(t._result=e,t._state=ot,0!==t._subscribers.length&&J(S,t))}function E(t,e){t._state===rt&&(t._state=it,t._result=e,J(T,t))}function P(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+ot]=n,o[i+it]=r,0===i&&t._state&&J(S,t)}function S(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r,o,i=t._result,s=0;s<e.length;s+=3)r=e[s],o=e[s+n],r?O(n,r,o,i):o(i);t._subscribers.length=0}}function C(){this.error=null}function A(t,e){try{return t(e)}catch(n){return at.error=n,at}}function O(t,e,n,r){var o,i,a,l,u=s(n);if(u){if(o=A(n,r),o===at?(l=!0,i=o.error,o=null):a=!0,e===o)return void E(e,v())}else o=r,a=!0;e._state!==rt||(u&&a?j(e,o):l?E(e,i):t===ot?z(e,o):t===it&&E(e,o))}function N(t,e){try{e(function(e){j(t,e)},function(e){E(t,e)})}catch(n){E(t,n)}}function q(t,e){var n=this;n._instanceConstructor=t,n.promise=new t(g),n._validateInput(e)?(n._input=e,n.length=e.length,n._remaining=e.length,n._init(),0===n.length?z(n.promise,n._result):(n.length=n.length||0,n._enumerate(),0===n._remaining&&z(n.promise,n._result))):E(n.promise,n._validationError())}function F(t){return new lt(this,t).promise}function D(t){function e(t){j(o,t)}function n(t){E(o,t)}var r=this,o=new r(g);if(!W(t))return E(o,new TypeError("You must pass an array to race.")),o;for(var i=t.length,s=0;o._state===rt&&i>s;s++)P(r.resolve(t[s]),void 0,e,n);return o}function I(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(g);return j(n,t),n}function R(t){var e=this,n=new e(g);return E(n,t),n}function B(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function L(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function G(t){this._id=_t++,this._state=void 0,this._result=void 0,this._subscribers=[],g!==t&&(s(t)||B(),this instanceof G||L(),N(this,t))}function U(){var t;if("undefined"!=typeof o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(t.Promise=dt)}var $;$=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var V,H,Y,W=$,X=0,J=({}.toString,function(t,e){nt[X]=t,nt[X+1]=e,X+=2,2===X&&(H?H(f):Y())}),Q="undefined"!=typeof window?window:void 0,K=Q||{},Z=K.MutationObserver||K.WebKitMutationObserver,tt="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,nt=new Array(1e3);Y=tt?h():Z?p():et?_():void 0===Q&&"function"==typeof e?m():d();var rt=void 0,ot=1,it=2,st=new C,at=new C;q.prototype._validateInput=function(t){return W(t)},q.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},q.prototype._init=function(){this._result=new Array(this.length)};var lt=q;q.prototype._enumerate=function(){for(var t=this,e=t.length,n=t.promise,r=t._input,o=0;n._state===rt&&e>o;o++)t._eachEntry(r[o],o)},q.prototype._eachEntry=function(t,e){var n=this,r=n._instanceConstructor;a(t)?t.constructor===r&&t._state!==rt?(t._onerror=null,n._settledAt(t._state,e,t._result)):n._willSettleAt(r.resolve(t),e):(n._remaining--,n._result[e]=t)},q.prototype._settledAt=function(t,e,n){var r=this,o=r.promise;o._state===rt&&(r._remaining--,t===it?E(o,n):r._result[e]=n),0===r._remaining&&z(o,r._result)},q.prototype._willSettleAt=function(t,e){var n=this;P(t,void 0,function(t){n._settledAt(ot,e,t)},function(t){n._settledAt(it,e,t)})};var ut=F,ht=D,ct=I,pt=R,_t=0,dt=G;G.all=ut,G.race=ht,G.resolve=ct,G.reject=pt,G._setScheduler=l,G._setAsap=u,G._asap=J,G.prototype={constructor:G,then:function(t,e){var n=this,r=n._state;if(r===ot&&!t||r===it&&!e)return this;var o=new this.constructor(g),i=n._result;if(r){var s=arguments[r-1];J(function(){O(r,o,s,i)})}else P(n,o,t,e);return o},"catch":function(t){return this.then(null,t)}};var ft=U,mt={Promise:dt,polyfill:ft};"function"==typeof t&&t.amd?t(function(){return mt}):"undefined"!=typeof n&&n.exports?n.exports=mt:"undefined"!=typeof this&&(this.ES6Promise=mt),ft()}).call(this)}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:"_process"}],"hammerjs/hammer":[function(e,n,r){/*! Hammer.JS - v2.0.6 - 2015-12-23
26 * http://hammerjs.github.io/
27 *
28 * Copyright (c) 2015 Jorik Tangelder;
29 * Licensed under the license */
30 !function(e,r,o,i){"use strict";function s(t,e,n){return setTimeout(c(t,n),e)}function a(t,e,n){return Array.isArray(t)?(l(t,n[e],n),!0):!1}function l(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==i)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function u(t,n,r){var o="DEPRECATED METHOD: "+n+"\n"+r+" AT \n";return function(){var n=new Error("get-stack-trace"),r=n&&n.stack?n.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",i=e.console&&(e.console.warn||e.console.log);return i&&i.call(e.console,o,r),t.apply(this,arguments)}}function h(t,e,n){var r,o=e.prototype;r=t.prototype=Object.create(o),r.constructor=t,r._super=o,n&&ut(r,n)}function c(t,e){return function(){return t.apply(e,arguments)}}function p(t,e){return typeof t==pt?t.apply(e?e[0]||i:i,e):t}function _(t,e){return t===i?e:t}function d(t,e,n){l(y(e),function(e){t.addEventListener(e,n,!1)})}function f(t,e,n){l(y(e),function(e){t.removeEventListener(e,n,!1)})}function m(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function g(t,e){return t.indexOf(e)>-1}function y(t){return t.trim().split(/\s+/g)}function v(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function b(t){return Array.prototype.slice.call(t,0)}function x(t,e,n){for(var r=[],o=[],i=0;i<t.length;){var s=e?t[i][e]:t[i];v(o,s)<0&&r.push(t[i]),o[i]=s,i++}return n&&(r=e?r.sort(function(t,n){return t[e]>n[e]}):r.sort()),r}function w(t,e){for(var n,r,o=e[0].toUpperCase()+e.slice(1),s=0;s<ht.length;){if(n=ht[s],r=n?n+o:e,r in t)return r;s++}return i}function k(){return yt++}function M(t){var n=t.ownerDocument||t;return n.defaultView||n.parentWindow||e}function j(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){p(t.options.enable,[t])&&n.handler(e)},this.init()}function T(t){var e,n=t.options.inputClass;return new(e=n?n:xt?B:wt?U:bt?V:R)(t,z)}function z(t,e,n){var r=n.pointers.length,o=n.changedPointers.length,i=e&Et&&r-o===0,s=e&(St|Ct)&&r-o===0;n.isFirst=!!i,n.isFinal=!!s,i&&(t.session={}),n.eventType=e,E(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function E(t,e){var n=t.session,r=e.pointers,o=r.length;n.firstInput||(n.firstInput=C(e)),o>1&&!n.firstMultiple?n.firstMultiple=C(e):1===o&&(n.firstMultiple=!1);var i=n.firstInput,s=n.firstMultiple,a=s?s.center:i.center,l=e.center=A(r);e.timeStamp=ft(),e.deltaTime=e.timeStamp-i.timeStamp,e.angle=F(a,l),e.distance=q(a,l),P(n,e),e.offsetDirection=N(e.deltaX,e.deltaY);var u=O(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=u.x,e.overallVelocityY=u.y,e.overallVelocity=dt(u.x)>dt(u.y)?u.x:u.y,e.scale=s?I(s.pointers,r):1,e.rotation=s?D(s.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,S(n,e);var h=t.element;m(e.srcEvent.target,h)&&(h=e.srcEvent.target),e.target=h}function P(t,e){var n=e.center,r=t.offsetDelta||{},o=t.prevDelta||{},i=t.prevInput||{};(e.eventType===Et||i.eventType===St)&&(o=t.prevDelta={x:i.deltaX||0,y:i.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y}),e.deltaX=o.x+(n.x-r.x),e.deltaY=o.y+(n.y-r.y)}function S(t,e){var n,r,o,s,a=t.lastInterval||e,l=e.timeStamp-a.timeStamp;if(e.eventType!=Ct&&(l>zt||a.velocity===i)){var u=e.deltaX-a.deltaX,h=e.deltaY-a.deltaY,c=O(l,u,h);r=c.x,o=c.y,n=dt(c.x)>dt(c.y)?c.x:c.y,s=N(u,h),t.lastInterval=e}else n=a.velocity,r=a.velocityX,o=a.velocityY,s=a.direction;e.velocity=n,e.velocityX=r,e.velocityY=o,e.direction=s}function C(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:_t(t.pointers[n].clientX),clientY:_t(t.pointers[n].clientY)},n++;return{timeStamp:ft(),pointers:e,center:A(e),deltaX:t.deltaX,deltaY:t.deltaY}}function A(t){var e=t.length;if(1===e)return{x:_t(t[0].clientX),y:_t(t[0].clientY)};for(var n=0,r=0,o=0;e>o;)n+=t[o].clientX,r+=t[o].clientY,o++;return{x:_t(n/e),y:_t(r/e)}}function O(t,e,n){return{x:e/t||0,y:n/t||0}}function N(t,e){return t===e?At:dt(t)>=dt(e)?0>t?Ot:Nt:0>e?qt:Ft}function q(t,e,n){n||(n=Bt);var r=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return Math.sqrt(r*r+o*o)}function F(t,e,n){n||(n=Bt);var r=e[n[0]]-t[n[0]],o=e[n[1]]-t[n[1]];return 180*Math.atan2(o,r)/Math.PI}function D(t,e){return F(e[1],e[0],Lt)+F(t[1],t[0],Lt)}function I(t,e){return q(e[0],e[1],Lt)/q(t[0],t[1],Lt)}function R(){this.evEl=Ut,this.evWin=$t,this.allow=!0,this.pressed=!1,j.apply(this,arguments)}function B(){this.evEl=Yt,this.evWin=Wt,j.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function L(){this.evTarget=Jt,this.evWin=Qt,this.started=!1,j.apply(this,arguments)}function G(t,e){var n=b(t.touches),r=b(t.changedTouches);return e&(St|Ct)&&(n=x(n.concat(r),"identifier",!0)),[n,r]}function U(){this.evTarget=Zt,this.targetIds={},j.apply(this,arguments)}function $(t,e){var n=b(t.touches),r=this.targetIds;if(e&(Et|Pt)&&1===n.length)return r[n[0].identifier]=!0,[n,n];var o,i,s=b(t.changedTouches),a=[],l=this.target;if(i=n.filter(function(t){return m(t.target,l)}),e===Et)for(o=0;o<i.length;)r[i[o].identifier]=!0,o++;for(o=0;o<s.length;)r[s[o].identifier]&&a.push(s[o]),e&(St|Ct)&&delete r[s[o].identifier],o++;return a.length?[x(i.concat(a),"identifier",!0),a]:void 0}function V(){j.apply(this,arguments);var t=c(this.handler,this);this.touch=new U(this.manager,t),this.mouse=new R(this.manager,t)}function H(t,e){this.manager=t,this.set(e)}function Y(t){if(g(t,ie))return ie;var e=g(t,se),n=g(t,ae);return e&&n?ie:e||n?e?se:ae:g(t,oe)?oe:re}function W(t){this.options=ut({},this.defaults,t||{}),this.id=k(),this.manager=null,this.options.enable=_(this.options.enable,!0),this.state=le,this.simultaneous={},this.requireFail=[]}function X(t){return t&_e?"cancel":t&ce?"end":t&he?"move":t&ue?"start":""}function J(t){return t==Ft?"down":t==qt?"up":t==Ot?"left":t==Nt?"right":""}function Q(t,e){var n=e.manager;return n?n.get(t):t}function K(){W.apply(this,arguments)}function Z(){K.apply(this,arguments),this.pX=null,this.pY=null}function tt(){K.apply(this,arguments)}function et(){W.apply(this,arguments),this._timer=null,this._input=null}function nt(){K.apply(this,arguments)}function rt(){K.apply(this,arguments)}function ot(){W.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function it(t,e){return e=e||{},e.recognizers=_(e.recognizers,it.defaults.preset),new st(t,e)}function st(t,e){this.options=ut({},it.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.element=t,this.input=T(this),this.touchAction=new H(this,this.options.touchAction),at(this,!0),l(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function at(t,e){var n=t.element;n.style&&l(t.options.cssProps,function(t,r){n.style[w(n.style,r)]=e?t:""})}function lt(t,e){var n=r.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}var ut,ht=["","webkit","Moz","MS","ms","o"],ct=r.createElement("div"),pt="function",_t=Math.round,dt=Math.abs,ft=Date.now;ut="function"!=typeof Object.assign?function(t){if(t===i||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==i&&null!==r)for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])}return e}:Object.assign;var mt=u(function(t,e,n){for(var r=Object.keys(e),o=0;o<r.length;)(!n||n&&t[r[o]]===i)&&(t[r[o]]=e[r[o]]),o++;return t},"extend","Use `assign`."),gt=u(function(t,e){return mt(t,e,!0)},"merge","Use `assign`."),yt=1,vt=/mobile|tablet|ip(ad|hone|od)|android/i,bt="ontouchstart"in e,xt=w(e,"PointerEvent")!==i,wt=bt&&vt.test(navigator.userAgent),kt="touch",Mt="pen",jt="mouse",Tt="kinect",zt=25,Et=1,Pt=2,St=4,Ct=8,At=1,Ot=2,Nt=4,qt=8,Ft=16,Dt=Ot|Nt,It=qt|Ft,Rt=Dt|It,Bt=["x","y"],Lt=["clientX","clientY"];j.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(M(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(M(this.element),this.evWin,this.domHandler)}};var Gt={mousedown:Et,mousemove:Pt,mouseup:St},Ut="mousedown",$t="mousemove mouseup";h(R,j,{handler:function(t){var e=Gt[t.type];e&Et&&0===t.button&&(this.pressed=!0),e&Pt&&1!==t.which&&(e=St),this.pressed&&this.allow&&(e&St&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:jt,srcEvent:t}))}});var Vt={pointerdown:Et,pointermove:Pt,pointerup:St,pointercancel:Ct,pointerout:Ct},Ht={2:kt,3:Mt,4:jt,5:Tt},Yt="pointerdown",Wt="pointermove pointerup pointercancel";e.MSPointerEvent&&!e.PointerEvent&&(Yt="MSPointerDown",Wt="MSPointerMove MSPointerUp MSPointerCancel"),h(B,j,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),o=Vt[r],i=Ht[t.pointerType]||t.pointerType,s=i==kt,a=v(e,t.pointerId,"pointerId");o&Et&&(0===t.button||s)?0>a&&(e.push(t),a=e.length-1):o&(St|Ct)&&(n=!0),0>a||(e[a]=t,this.callback(this.manager,o,{pointers:e,changedPointers:[t],pointerType:i,srcEvent:t}),n&&e.splice(a,1))}});var Xt={touchstart:Et,touchmove:Pt,touchend:St,touchcancel:Ct},Jt="touchstart",Qt="touchstart touchmove touchend touchcancel";h(L,j,{handler:function(t){var e=Xt[t.type];if(e===Et&&(this.started=!0),this.started){var n=G.call(this,t,e);e&(St|Ct)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:kt,srcEvent:t})}}});var Kt={touchstart:Et,touchmove:Pt,touchend:St,touchcancel:Ct},Zt="touchstart touchmove touchend touchcancel";h(U,j,{handler:function(t){var e=Kt[t.type],n=$.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:kt,srcEvent:t})}}),h(V,j,{handler:function(t,e,n){var r=n.pointerType==kt,o=n.pointerType==jt;if(r)this.mouse.allow=!1;else if(o&&!this.mouse.allow)return;e&(St|Ct)&&(this.mouse.allow=!0),this.callback(t,e,n)},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var te=w(ct.style,"touchAction"),ee=te!==i,ne="compute",re="auto",oe="manipulation",ie="none",se="pan-x",ae="pan-y";H.prototype={set:function(t){t==ne&&(t=this.compute()),ee&&this.manager.element.style&&(this.manager.element.style[te]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return l(this.manager.recognizers,function(e){p(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Y(t.join(" "))},preventDefaults:function(t){if(!ee){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)return void e.preventDefault();var r=this.actions,o=g(r,ie),i=g(r,ae),s=g(r,se);if(o){var a=1===t.pointers.length,l=t.distance<2,u=t.deltaTime<250;if(a&&l&&u)return}if(!s||!i)return o||i&&n&Dt||s&&n&It?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var le=1,ue=2,he=4,ce=8,pe=ce,_e=16,de=32;W.prototype={defaults:{},set:function(t){return ut(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(a(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=Q(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return a(t,"dropRecognizeWith",this)?this:(t=Q(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(a(t,"requireFailure",this))return this;var e=this.requireFail;return t=Q(t,this),-1===v(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(a(t,"dropRequireFailure",this))return this;t=Q(t,this);var e=v(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){n.manager.emit(e,t)}var n=this,r=this.state;ce>r&&e(n.options.event+X(r)),e(n.options.event),t.additionalEvent&&e(t.additionalEvent),r>=ce&&e(n.options.event+X(r))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=de)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(de|le)))return!1;t++}return!0},recognize:function(t){var e=ut({},t);return p(this.options.enable,[this,e])?(this.state&(pe|_e|de)&&(this.state=le),this.state=this.process(e),void(this.state&(ue|he|ce|_e)&&this.tryEmit(e))):(this.reset(),void(this.state=de))},process:function(t){},getTouchAction:function(){},reset:function(){}},h(K,W,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=e&(ue|he),o=this.attrTest(t);return r&&(n&Ct||!o)?e|_e:r||o?n&St?e|ce:e&ue?e|he:ue:de}}),h(Z,K,{defaults:{event:"pan",threshold:10,pointers:1,direction:Rt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Dt&&e.push(ae),t&It&&e.push(se),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,o=t.direction,i=t.deltaX,s=t.deltaY;return o&e.direction||(e.direction&Dt?(o=0===i?At:0>i?Ot:Nt,n=i!=this.pX,r=Math.abs(t.deltaX)):(o=0===s?At:0>s?qt:Ft,n=s!=this.pY,r=Math.abs(t.deltaY))),t.direction=o,n&&r>e.threshold&&o&e.direction},attrTest:function(t){return K.prototype.attrTest.call(this,t)&&(this.state&ue||!(this.state&ue)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=J(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(tt,K,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[ie]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ue)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(et,W,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[re]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime>e.time;if(this._input=t,!r||!n||t.eventType&(St|Ct)&&!o)this.reset();else if(t.eventType&Et)this.reset(),this._timer=s(function(){this.state=pe,this.tryEmit()},e.time,this);else if(t.eventType&St)return pe;return de},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===pe&&(t&&t.eventType&St?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=ft(),this.manager.emit(this.options.event,this._input)))}}),h(nt,K,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[ie]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ue)}}),h(rt,K,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Dt|It,pointers:1},getTouchAction:function(){return Z.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return n&(Dt|It)?e=t.overallVelocity:n&Dt?e=t.overallVelocityX:n&It&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&dt(e)>this.options.velocity&&t.eventType&St},emit:function(t){var e=J(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(ot,W,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[oe]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,o=t.deltaTime<e.time;if(this.reset(),t.eventType&Et&&0===this.count)return this.failTimeout();if(r&&o&&n){if(t.eventType!=St)return this.failTimeout();var i=this.pTime?t.timeStamp-this.pTime<e.interval:!0,a=!this.pCenter||q(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,a&&i?this.count+=1:this.count=1,this._input=t;var l=this.count%e.taps;if(0===l)return this.hasRequireFailures()?(this._timer=s(function(){this.state=pe,this.tryEmit()},e.interval,this),ue):pe}return de},failTimeout:function(){return this._timer=s(function(){this.state=de},this.options.interval,this),de},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==pe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),it.VERSION="2.0.6",it.defaults={domEvents:!1,touchAction:ne,enable:!0,inputTarget:null,inputClass:null,preset:[[nt,{enable:!1}],[tt,{enable:!1},["rotate"]],[rt,{direction:Dt}],[Z,{direction:Dt},["swipe"]],[ot],[ot,{event:"doubletap",taps:2},["tap"]],[et]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var fe=1,me=2;st.prototype={set:function(t){return ut(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?me:fe},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var n,r=this.recognizers,o=e.curRecognizer;(!o||o&&o.state&pe)&&(o=e.curRecognizer=null);for(var i=0;i<r.length;)n=r[i],e.stopped===me||o&&n!=o&&!n.canRecognizeWith(o)?n.reset():n.recognize(t),!o&&n.state&(ue|he|ce)&&(o=e.curRecognizer=n),i++}},get:function(t){if(t instanceof W)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(a(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(a(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=v(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){var n=this.handlers;return l(y(t),function(t){n[t]=n[t]||[],n[t].push(e)}),this},off:function(t,e){var n=this.handlers;return l(y(t),function(t){e?n[t]&&n[t].splice(v(n[t],e),1):delete n[t]}),this},emit:function(t,e){this.options.domEvents&&lt(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&at(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},ut(it,{INPUT_START:Et,INPUT_MOVE:Pt,INPUT_END:St,INPUT_CANCEL:Ct,STATE_POSSIBLE:le,STATE_BEGAN:ue,STATE_CHANGED:he,STATE_ENDED:ce,STATE_RECOGNIZED:pe,STATE_CANCELLED:_e,STATE_FAILED:de,DIRECTION_NONE:At,DIRECTION_LEFT:Ot,DIRECTION_RIGHT:Nt,DIRECTION_UP:qt,DIRECTION_DOWN:Ft,DIRECTION_HORIZONTAL:Dt,DIRECTION_VERTICAL:It,DIRECTION_ALL:Rt,Manager:st,Input:j,TouchAction:H,TouchInput:U,MouseInput:R,PointerEventInput:B,TouchMouseInput:V,SingleTouchInput:L,Recognizer:W,AttrRecognizer:K,Tap:ot,Pan:Z,Swipe:rt,Pinch:tt,Rotate:nt,Press:et,on:d,off:f,each:l,merge:gt,extend:mt,assign:ut,inherit:h,bindFn:c,prefixed:w});var ge="undefined"!=typeof e?e:"undefined"!=typeof self?self:{};ge.Hammer=it,"function"==typeof t&&t.amd?t(function(){return it}):"undefined"!=typeof n&&n.exports?n.exports=it:e[o]=it}(window,document,"Hammer")},{}],"jquery-mousewheel":[function(e,n,r){/*!
31 * jQuery Mousewheel 3.1.13
32 *
33 * Copyright jQuery Foundation and other contributors
34 * Released under the MIT license
35 * http://jquery.org/license
36 */
37 !function(e){"function"==typeof t&&t.amd?t(["jquery"],e):"object"==typeof r?n.exports=e:e(jQuery)}(function(t){function e(e){var s=e||window.event,a=l.call(arguments,1),u=0,c=0,p=0,_=0,d=0,f=0;if(e=t.event.fix(s),e.type="mousewheel","detail"in s&&(p=-1*s.detail),"wheelDelta"in s&&(p=s.wheelDelta),"wheelDeltaY"in s&&(p=s.wheelDeltaY),"wheelDeltaX"in s&&(c=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(c=-1*p,p=0),u=0===p?c:p,"deltaY"in s&&(p=-1*s.deltaY,u=p),"deltaX"in s&&(c=s.deltaX,0===p&&(u=-1*c)),0!==p||0!==c){if(1===s.deltaMode){var m=t.data(this,"mousewheel-line-height");u*=m,p*=m,c*=m}else if(2===s.deltaMode){var g=t.data(this,"mousewheel-page-height");u*=g,p*=g,c*=g}if(_=Math.max(Math.abs(p),Math.abs(c)),(!i||i>_)&&(i=_,r(s,_)&&(i/=40)),r(s,_)&&(u/=40,c/=40,p/=40),u=Math[u>=1?"floor":"ceil"](u/i),c=Math[c>=1?"floor":"ceil"](c/i),p=Math[p>=1?"floor":"ceil"](p/i),h.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();d=e.clientX-y.left,f=e.clientY-y.top}return e.deltaX=c,e.deltaY=p,e.deltaFactor=i,e.offsetX=d,e.offsetY=f,e.deltaMode=0,a.unshift(e,u,c,p),o&&clearTimeout(o),o=setTimeout(n,200),(t.event.dispatch||t.event.handle).apply(this,a)}}function n(){i=null}function r(t,e){return h.settings.adjustOldDeltas&&"mousewheel"===t.type&&e%120===0}var o,i,s=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],a="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],l=Array.prototype.slice;if(t.event.fixHooks)for(var u=s.length;u;)t.event.fixHooks[s[--u]]=t.event.mouseHooks;var h=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var n=a.length;n;)this.addEventListener(a[--n],e,!1);else this.onmousewheel=e;t.data(this,"mousewheel-line-height",h.getLineHeight(this)),t.data(this,"mousewheel-page-height",h.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var n=a.length;n;)this.removeEventListener(a[--n],e,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(e){var n=t(e),r=n["offsetParent"in t.fn?"offsetParent":"parent"]();return r.length||(r=t("body")),parseInt(r.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(e){return t(e).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})})},{}],jquery:[function(e,n,r){/*!
38 * jQuery JavaScript Library v2.2.0
39 * http://jquery.com/
40 *
41 * Includes Sizzle.js
42 * http://sizzlejs.com/
43 *
44 * Copyright jQuery Foundation and other contributors
45 * Released under the MIT license
46 * http://jquery.org/license
47 *
48 * Date: 2016-01-08T20:02Z
49 */
50 !function(t,e){"object"==typeof n&&"object"==typeof n.exports?n.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(e,n){function r(t){var e=!!t&&"length"in t&&t.length,n=st.type(t);return"function"===n||st.isWindow(t)?!1:"array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t}function o(t,e,n){if(st.isFunction(e))return st.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return st.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(mt.test(e))return st.filter(e,t,n);e=st.filter(e,t)}return st.grep(t,function(t){return tt.call(e,t)>-1!==n})}function i(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function s(t){var e={};return st.each(t.match(wt)||[],function(t,n){e[n]=!0}),e}function a(){J.removeEventListener("DOMContentLoaded",a),e.removeEventListener("load",a),st.ready()}function l(){this.expando=st.expando+l.uid++}function u(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(Pt,"-$&").toLowerCase(),n=t.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Et.test(n)?st.parseJSON(n):n}catch(o){}zt.set(t,e,n)}else n=void 0;return n}function h(t,e,n,r){var o,i=1,s=20,a=r?function(){return r.cur()}:function(){return st.css(t,e,"")},l=a(),u=n&&n[3]||(st.cssNumber[e]?"":"px"),h=(st.cssNumber[e]||"px"!==u&&+l)&&Ct.exec(st.css(t,e));if(h&&h[3]!==u){u=u||h[3],n=n||[],h=+l||1;do i=i||".5",h/=i,st.style(t,e,h+u);while(i!==(i=a()/l)&&1!==i&&--s)}return n&&(h=+h||+l||0,o=n[1]?h+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=h,r.end=o)),o}function c(t,e){var n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[];return void 0===e||e&&st.nodeName(t,e)?st.merge([t],n):n}function p(t,e){for(var n=0,r=t.length;r>n;n++)Tt.set(t[n],"globalEval",!e||Tt.get(e[n],"globalEval"))}function _(t,e,n,r,o){for(var i,s,a,l,u,h,_=e.createDocumentFragment(),d=[],f=0,m=t.length;m>f;f++)if(i=t[f],i||0===i)if("object"===st.type(i))st.merge(d,i.nodeType?[i]:i);else if(It.test(i)){for(s=s||_.appendChild(e.createElement("div")),a=(qt.exec(i)||["",""])[1].toLowerCase(),l=Dt[a]||Dt._default,s.innerHTML=l[1]+st.htmlPrefilter(i)+l[2],h=l[0];h--;)s=s.lastChild;st.merge(d,s.childNodes),s=_.firstChild,s.textContent=""}else d.push(e.createTextNode(i));for(_.textContent="",f=0;i=d[f++];)if(r&&st.inArray(i,r)>-1)o&&o.push(i);else if(u=st.contains(i.ownerDocument,i),s=c(_.appendChild(i),"script"),u&&p(s),n)for(h=0;i=s[h++];)Ft.test(i.type||"")&&n.push(i);return _}function d(){return!0}function f(){return!1}function m(){try{return J.activeElement}catch(t){}}function g(t,e,n,r,o,i){var s,a;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=void 0);for(a in e)g(t,a,n,r,e[a],i);return t}if(null==r&&null==o?(o=n,r=n=void 0):null==o&&("string"==typeof n?(o=r,r=void 0):(o=r,r=n,n=void 0)),o===!1)o=f;else if(!o)return this;return 1===i&&(s=o,o=function(t){return st().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=st.guid++)),t.each(function(){st.event.add(this,e,o,r,n)})}function y(t,e){return st.nodeName(t,"table")&&st.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t:t}function v(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function b(t){var e=Vt.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function x(t,e){var n,r,o,i,s,a,l,u;if(1===e.nodeType){if(Tt.hasData(t)&&(i=Tt.access(t),s=Tt.set(e,i),u=i.events)){delete s.handle,s.events={};for(o in u)for(n=0,r=u[o].length;r>n;n++)st.event.add(e,o,u[o][n])}zt.hasData(t)&&(a=zt.access(t),l=st.extend({},a),zt.set(e,l))}}function w(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Nt.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function k(t,e,n,r){e=K.apply([],e);var o,i,s,a,l,u,h=0,p=t.length,d=p-1,f=e[0],m=st.isFunction(f);if(m||p>1&&"string"==typeof f&&!ot.checkClone&&$t.test(f))return t.each(function(o){var i=t.eq(o);m&&(e[0]=f.call(this,o,i.html())),k(i,e,n,r)});if(p&&(o=_(e,t[0].ownerDocument,!1,t,r),i=o.firstChild,1===o.childNodes.length&&(o=i),i||r)){for(s=st.map(c(o,"script"),v),a=s.length;p>h;h++)l=o,h!==d&&(l=st.clone(l,!0,!0),a&&st.merge(s,c(l,"script"))),n.call(t[h],l,h);if(a)for(u=s[s.length-1].ownerDocument,st.map(s,b),h=0;a>h;h++)l=s[h],Ft.test(l.type||"")&&!Tt.access(l,"globalEval")&&st.contains(u,l)&&(l.src?st._evalUrl&&st._evalUrl(l.src):st.globalEval(l.textContent.replace(Ht,"")))}return t}function M(t,e,n){for(var r,o=e?st.filter(e,t):t,i=0;null!=(r=o[i]);i++)n||1!==r.nodeType||st.cleanData(c(r)),r.parentNode&&(n&&st.contains(r.ownerDocument,r)&&p(c(r,"script")),r.parentNode.removeChild(r));return t}function j(t,e){var n=st(e.createElement(t)).appendTo(e.body),r=st.css(n[0],"display");return n.detach(),r}function T(t){var e=J,n=Wt[t];return n||(n=j(t,e),"none"!==n&&n||(Yt=(Yt||st("<iframe frameborder='0' width='0' height='0'/>")).appendTo(e.documentElement),e=Yt[0].contentDocument,e.write(),e.close(),n=j(t,e),Yt.detach()),Wt[t]=n),n}function z(t,e,n){var r,o,i,s,a=t.style;return n=n||Qt(t),n&&(s=n.getPropertyValue(e)||n[e],""!==s||st.contains(t.ownerDocument,t)||(s=st.style(t,e)),!ot.pixelMarginRight()&&Jt.test(s)&&Xt.test(e)&&(r=a.width,o=a.minWidth,i=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=o,a.maxWidth=i)),void 0!==s?s+"":s}function E(t,e){return{get:function(){return t()?void delete this.get:(this.get=e).apply(this,arguments)}}}function P(t){if(t in oe)return t;for(var e=t[0].toUpperCase()+t.slice(1),n=re.length;n--;)if(t=re[n]+e,t in oe)return t}function S(t,e,n){var r=Ct.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function C(t,e,n,r,o){for(var i=n===(r?"border":"content")?4:"width"===e?1:0,s=0;4>i;i+=2)"margin"===n&&(s+=st.css(t,n+At[i],!0,o)),r?("content"===n&&(s-=st.css(t,"padding"+At[i],!0,o)),"margin"!==n&&(s-=st.css(t,"border"+At[i]+"Width",!0,o))):(s+=st.css(t,"padding"+At[i],!0,o),"padding"!==n&&(s+=st.css(t,"border"+At[i]+"Width",!0,o)));return s}function A(t,n,r){var o=!0,i="width"===n?t.offsetWidth:t.offsetHeight,s=Qt(t),a="border-box"===st.css(t,"boxSizing",!1,s);if(J.msFullscreenElement&&e.top!==e&&t.getClientRects().length&&(i=Math.round(100*t.getBoundingClientRect()[n])),0>=i||null==i){if(i=z(t,n,s),(0>i||null==i)&&(i=t.style[n]),Jt.test(i))return i;o=a&&(ot.boxSizingReliable()||i===t.style[n]),i=parseFloat(i)||0}return i+C(t,n,r||(a?"border":"content"),o,s)+"px"}function O(t,e){for(var n,r,o,i=[],s=0,a=t.length;a>s;s++)r=t[s],r.style&&(i[s]=Tt.get(r,"olddisplay"),n=r.style.display,e?(i[s]||"none"!==n||(r.style.display=""),""===r.style.display&&Ot(r)&&(i[s]=Tt.access(r,"olddisplay",T(r.nodeName)))):(o=Ot(r),"none"===n&&o||Tt.set(r,"olddisplay",o?n:st.css(r,"display"))));for(s=0;a>s;s++)r=t[s],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?i[s]||"":"none"));return t}function N(t,e,n,r,o){return new N.prototype.init(t,e,n,r,o)}function q(){return e.setTimeout(function(){ie=void 0}),ie=st.now()}function F(t,e){var n,r=0,o={height:t};for(e=e?1:0;4>r;r+=2-e)n=At[r],o["margin"+n]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function D(t,e,n){for(var r,o=(B.tweeners[e]||[]).concat(B.tweeners["*"]),i=0,s=o.length;s>i;i++)if(r=o[i].call(n,e,t))return r}function I(t,e,n){var r,o,i,s,a,l,u,h,c=this,p={},_=t.style,d=t.nodeType&&Ot(t),f=Tt.get(t,"fxshow");n.queue||(a=st._queueHooks(t,"fx"),null==a.unqueued&&(a.unqueued=0,l=a.empty.fire,a.empty.fire=function(){a.unqueued||l()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,st.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[_.overflow,_.overflowX,_.overflowY],u=st.css(t,"display"),h="none"===u?Tt.get(t,"olddisplay")||T(t.nodeName):u,"inline"===h&&"none"===st.css(t,"float")&&(_.display="inline-block")),n.overflow&&(_.overflow="hidden",c.always(function(){_.overflow=n.overflow[0],_.overflowX=n.overflow[1],_.overflowY=n.overflow[2]}));for(r in e)if(o=e[r],ae.exec(o)){if(delete e[r],i=i||"toggle"===o,o===(d?"hide":"show")){if("show"!==o||!f||void 0===f[r])continue;d=!0}p[r]=f&&f[r]||st.style(t,r)}else u=void 0;if(st.isEmptyObject(p))"inline"===("none"===u?T(t.nodeName):u)&&(_.display=u);else{f?"hidden"in f&&(d=f.hidden):f=Tt.access(t,"fxshow",{}),i&&(f.hidden=!d),d?st(t).show():c.done(function(){st(t).hide()}),c.done(function(){var e;Tt.remove(t,"fxshow");for(e in p)st.style(t,e,p[e])});for(r in p)s=D(d?f[r]:0,r,c),r in f||(f[r]=s.start,d&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}}function R(t,e){var n,r,o,i,s;for(n in t)if(r=st.camelCase(n),o=e[r],i=t[n],st.isArray(i)&&(o=i[1],i=t[n]=i[0]),n!==r&&(t[r]=i,delete t[n]),s=st.cssHooks[r],s&&"expand"in s){i=s.expand(i),delete t[r];for(n in i)n in t||(t[n]=i[n],e[n]=o)}else e[r]=o}function B(t,e,n){var r,o,i=0,s=B.prefilters.length,a=st.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=ie||q(),n=Math.max(0,u.startTime+u.duration-e),r=n/u.duration||0,i=1-r,s=0,l=u.tweens.length;l>s;s++)u.tweens[s].run(i);return a.notifyWith(t,[u,i,n]),1>i&&l?n:(a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:st.extend({},e),opts:st.extend(!0,{specialEasing:{},easing:st.easing._default},n),originalProperties:e,originalOptions:n,startTime:ie||q(),duration:n.duration,tweens:[],createTween:function(e,n){var r=st.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(r),r},stop:function(e){var n=0,r=e?u.tweens.length:0;if(o)return this;for(o=!0;r>n;n++)u.tweens[n].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),h=u.props;for(R(h,u.opts.specialEasing);s>i;i++)if(r=B.prefilters[i].call(u,t,h,u.opts))return st.isFunction(r.stop)&&(st._queueHooks(u.elem,u.opts.queue).stop=st.proxy(r.stop,r)),r;return st.map(h,D,u),st.isFunction(u.opts.start)&&u.opts.start.call(t,u),st.fx.timer(st.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function L(t){return t.getAttribute&&t.getAttribute("class")||""}function G(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,o=0,i=e.toLowerCase().match(wt)||[];if(st.isFunction(n))for(;r=i[o++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function U(t,e,n,r){function o(a){var l;return i[a]=!0,st.each(t[a]||[],function(t,a){var u=a(e,n,r);return"string"!=typeof u||s||i[u]?s?!(l=u):void 0:(e.dataTypes.unshift(u),o(u),!1)}),l}var i={},s=t===Te;return o(e.dataTypes[0])||!i["*"]&&o("*")}function $(t,e){var n,r,o=st.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:r||(r={}))[n]=e[n]);return r&&st.extend(!0,t,r),t}function V(t,e,n){for(var r,o,i,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(o in a)if(a[o]&&a[o].test(r)){l.unshift(o);break}if(l[0]in n)i=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){i=o;break}s||(s=o)}i=i||s}return i?(i!==l[0]&&l.unshift(i),n[i]):void 0}function H(t,e,n,r){var o,i,s,a,l,u={},h=t.dataTypes.slice();if(h[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(i=h.shift();i;)if(t.responseFields[i]&&(n[t.responseFields[i]]=e),!l&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=i,i=h.shift())if("*"===i)i=l;else if("*"!==l&&l!==i){if(s=u[l+" "+i]||u["* "+i],!s)for(o in u)if(a=o.split(" "),a[1]===i&&(s=u[l+" "+a[0]]||u["* "+a[0]])){s===!0?s=u[o]:u[o]!==!0&&(i=a[0],h.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(c){return{state:"parsererror",error:s?c:"No conversion from "+l+" to "+i}}}return{state:"success",data:e}}function Y(t,e,n,r){var o;if(st.isArray(e))st.each(e,function(e,o){n||Se.test(t)?r(t,o):Y(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,r)});else if(n||"object"!==st.type(e))r(t,e);else for(o in e)Y(t+"["+o+"]",e[o],n,r)}function W(t){return st.isWindow(t)?t:9===t.nodeType&&t.defaultView}var X=[],J=e.document,Q=X.slice,K=X.concat,Z=X.push,tt=X.indexOf,et={},nt=et.toString,rt=et.hasOwnProperty,ot={},it="2.2.0",st=function(t,e){return new st.fn.init(t,e)},at=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,lt=/^-ms-/,ut=/-([\da-z])/gi,ht=function(t,e){return e.toUpperCase()};st.fn=st.prototype={jquery:it,constructor:st,selector:"",length:0,toArray:function(){return Q.call(this)},get:function(t){return null!=t?0>t?this[t+this.length]:this[t]:Q.call(this)},pushStack:function(t){var e=st.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t){return st.each(this,t)},map:function(t){return this.pushStack(st.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return this.pushStack(Q.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:Z,sort:X.sort,splice:X.splice},st.extend=st.fn.extend=function(){var t,e,n,r,o,i,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||st.isFunction(s)||(s={}),a===l&&(s=this,a--);l>a;a++)if(null!=(t=arguments[a]))for(e in t)n=s[e],r=t[e],s!==r&&(u&&r&&(st.isPlainObject(r)||(o=st.isArray(r)))?(o?(o=!1,i=n&&st.isArray(n)?n:[]):i=n&&st.isPlainObject(n)?n:{},s[e]=st.extend(u,i,r)):void 0!==r&&(s[e]=r));return s},st.extend({expando:"jQuery"+(it+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isFunction:function(t){return"function"===st.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){var e=t&&t.toString();return!st.isArray(t)&&e-parseFloat(e)+1>=0},isPlainObject:function(t){return"object"!==st.type(t)||t.nodeType||st.isWindow(t)?!1:t.constructor&&!rt.call(t.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?et[nt.call(t)]||"object":typeof t},globalEval:function(t){var e,n=eval;t=st.trim(t),t&&(1===t.indexOf("use strict")?(e=J.createElement("script"),e.text=t,J.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(lt,"ms-").replace(ut,ht)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var n,o=0;if(r(t))for(n=t.length;n>o&&e.call(t[o],o,t[o])!==!1;o++);else for(o in t)if(e.call(t[o],o,t[o])===!1)break;return t},trim:function(t){return null==t?"":(t+"").replace(at,"")},makeArray:function(t,e){var n=e||[];return null!=t&&(r(Object(t))?st.merge(n,"string"==typeof t?[t]:t):Z.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:tt.call(e,t,n)},merge:function(t,e){for(var n=+e.length,r=0,o=t.length;n>r;r++)t[o++]=e[r];return t.length=o,t},grep:function(t,e,n){for(var r,o=[],i=0,s=t.length,a=!n;s>i;i++)r=!e(t[i],i),r!==a&&o.push(t[i]);return o},map:function(t,e,n){var o,i,s=0,a=[];if(r(t))for(o=t.length;o>s;s++)i=e(t[s],s,n),null!=i&&a.push(i);else for(s in t)i=e(t[s],s,n),null!=i&&a.push(i);return K.apply([],a)},guid:1,proxy:function(t,e){var n,r,o;return"string"==typeof e&&(n=t[e],e=t,t=n),st.isFunction(t)?(r=Q.call(arguments,2),o=function(){return t.apply(e||this,r.concat(Q.call(arguments)))},o.guid=t.guid=t.guid||st.guid++,o):void 0},now:Date.now,support:ot}),"function"==typeof Symbol&&(st.fn[Symbol.iterator]=X[Symbol.iterator]),st.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){et["[object "+e+"]"]=e.toLowerCase()});var ct=/*!
51 * Sizzle CSS Selector Engine v2.2.1
52 * http://sizzlejs.com/
53 *
54 * Copyright jQuery Foundation and other contributors
55 * Released under the MIT license
56 * http://jquery.org/license
57 *
58 * Date: 2015-10-17
59 */
60 function(t){function e(t,e,n,r){var o,i,s,a,l,u,c,_,d=e&&e.ownerDocument,f=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==f&&9!==f&&11!==f)return n;if(!r&&((e?e.ownerDocument||e:B)!==A&&C(e),e=e||A,N)){if(11!==f&&(u=gt.exec(t)))if(o=u[1]){if(9===f){if(!(s=e.getElementById(o)))return n;if(s.id===o)return n.push(s),n}else if(d&&(s=d.getElementById(o))&&I(e,s)&&s.id===o)return n.push(s),n}else{if(u[2])return K.apply(n,e.getElementsByTagName(t)),n;if((o=u[3])&&x.getElementsByClassName&&e.getElementsByClassName)return K.apply(n,e.getElementsByClassName(o)),n}if(x.qsa&&!V[t+" "]&&(!q||!q.test(t))){if(1!==f)d=e,_=t;else if("object"!==e.nodeName.toLowerCase()){for((a=e.getAttribute("id"))?a=a.replace(vt,"\\$&"):e.setAttribute("id",a=R),c=j(t),i=c.length,l=pt.test(a)?"#"+a:"[id='"+a+"']";i--;)c[i]=l+" "+p(c[i]);_=c.join(","),d=yt.test(t)&&h(e.parentNode)||e}if(_)try{return K.apply(n,d.querySelectorAll(_)),n}catch(m){}finally{a===R&&e.removeAttribute("id")}}}return z(t.replace(at,"$1"),e,n,r)}function n(){function t(n,r){return e.push(n+" ")>w.cacheLength&&delete t[e.shift()],t[n+" "]=r}var e=[];return t}function r(t){return t[R]=!0,t}function o(t){var e=A.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function i(t,e){for(var n=t.split("|"),r=n.length;r--;)w.attrHandle[n[r]]=e}function s(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Y)-(~t.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function u(t){return r(function(e){return e=+e,r(function(n,r){for(var o,i=t([],n.length,e),s=i.length;s--;)n[o=i[s]]&&(n[o]=!(r[o]=n[o]))})})}function h(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function c(){}function p(t){for(var e=0,n=t.length,r="";n>e;e++)r+=t[e].value;return r}function _(t,e,n){var r=e.dir,o=n&&"parentNode"===r,i=G++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i)}:function(e,n,s){var a,l,u,h=[L,i];if(s){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,s))return!0}else for(;e=e[r];)if(1===e.nodeType||o){if(u=e[R]||(e[R]={}),l=u[e.uniqueID]||(u[e.uniqueID]={}),(a=l[r])&&a[0]===L&&a[1]===i)return h[2]=a[2];if(l[r]=h,h[2]=t(e,n,s))return!0}}}function d(t){return t.length>1?function(e,n,r){for(var o=t.length;o--;)if(!t[o](e,n,r))return!1;return!0}:t[0]}function f(t,n,r){for(var o=0,i=n.length;i>o;o++)e(t,n[o],r);return r}function m(t,e,n,r,o){for(var i,s=[],a=0,l=t.length,u=null!=e;l>a;a++)(i=t[a])&&(!n||n(i,r,o))&&(s.push(i),u&&e.push(a));return s}function g(t,e,n,o,i,s){return o&&!o[R]&&(o=g(o)),i&&!i[R]&&(i=g(i,s)),r(function(r,s,a,l){var u,h,c,p=[],_=[],d=s.length,g=r||f(e||"*",a.nodeType?[a]:a,[]),y=!t||!r&&e?g:m(g,p,t,a,l),v=n?i||(r?t:d||o)?[]:s:y;if(n&&n(y,v,a,l),o)for(u=m(v,_),o(u,[],a,l),h=u.length;h--;)(c=u[h])&&(v[_[h]]=!(y[_[h]]=c));if(r){if(i||t){if(i){for(u=[],h=v.length;h--;)(c=v[h])&&u.push(y[h]=c);i(null,v=[],u,l)}for(h=v.length;h--;)(c=v[h])&&(u=i?tt(r,c):p[h])>-1&&(r[u]=!(s[u]=c))}}else v=m(v===s?v.splice(d,v.length):v),i?i(null,s,v,l):K.apply(s,v)})}function y(t){for(var e,n,r,o=t.length,i=w.relative[t[0].type],s=i||w.relative[" "],a=i?1:0,l=_(function(t){return t===e},s,!0),u=_(function(t){return tt(e,t)>-1},s,!0),h=[function(t,n,r){var o=!i&&(r||n!==E)||((e=n).nodeType?l(t,n,r):u(t,n,r));return e=null,o}];o>a;a++)if(n=w.relative[t[a].type])h=[_(d(h),n)];else{if(n=w.filter[t[a].type].apply(null,t[a].matches),n[R]){for(r=++a;o>r&&!w.relative[t[r].type];r++);return g(a>1&&d(h),a>1&&p(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),n,r>a&&y(t.slice(a,r)),o>r&&y(t=t.slice(r)),o>r&&p(t))}h.push(n)}return d(h)}function v(t,n){var o=n.length>0,i=t.length>0,s=function(r,s,a,l,u){var h,c,p,_=0,d="0",f=r&&[],g=[],y=E,v=r||i&&w.find.TAG("*",u),b=L+=null==y?1:Math.random()||.1,x=v.length;for(u&&(E=s===A||s||u);d!==x&&null!=(h=v[d]);d++){if(i&&h){for(c=0,s||h.ownerDocument===A||(C(h),a=!N);p=t[c++];)if(p(h,s||A,a)){l.push(h);break}u&&(L=b)}o&&((h=!p&&h)&&_--,r&&f.push(h))}if(_+=d,o&&d!==_){for(c=0;p=n[c++];)p(f,g,s,a);if(r){if(_>0)for(;d--;)f[d]||g[d]||(g[d]=J.call(l));g=m(g)}K.apply(l,g),u&&!r&&g.length>0&&_+n.length>1&&e.uniqueSort(l)}return u&&(L=b,E=y),f};return o?r(s):s}var b,x,w,k,M,j,T,z,E,P,S,C,A,O,N,q,F,D,I,R="sizzle"+1*new Date,B=t.document,L=0,G=0,U=n(),$=n(),V=n(),H=function(t,e){return t===e&&(S=!0),0},Y=1<<31,W={}.hasOwnProperty,X=[],J=X.pop,Q=X.push,K=X.push,Z=X.slice,tt=function(t,e){for(var n=0,r=t.length;r>n;n++)if(t[n]===e)return n;return-1},et="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",nt="[\\x20\\t\\r\\n\\f]",rt="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot="\\["+nt+"*("+rt+")(?:"+nt+"*([*^$|!~]?=)"+nt+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+rt+"))|)"+nt+"*\\]",it=":("+rt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ot+")*)|.*)\\)|)",st=new RegExp(nt+"+","g"),at=new RegExp("^"+nt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+nt+"+$","g"),lt=new RegExp("^"+nt+"*,"+nt+"*"),ut=new RegExp("^"+nt+"*([>+~]|"+nt+")"+nt+"*"),ht=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),ct=new RegExp(it),pt=new RegExp("^"+rt+"$"),_t={ID:new RegExp("^#("+rt+")"),CLASS:new RegExp("^\\.("+rt+")"),TAG:new RegExp("^("+rt+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+it),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},dt=/^(?:input|select|textarea|button)$/i,ft=/^h\d$/i,mt=/^[^{]+\{\s*\[native \w/,gt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,vt=/'|\\/g,bt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),xt=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},wt=function(){C()};try{K.apply(X=Z.call(B.childNodes),B.childNodes),X[B.childNodes.length].nodeType}catch(kt){K={apply:X.length?function(t,e){Q.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}x=e.support={},M=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},C=e.setDocument=function(t){var e,n,r=t?t.ownerDocument||t:B;return r!==A&&9===r.nodeType&&r.documentElement?(A=r,O=A.documentElement,N=!M(A),(n=A.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",wt,!1):n.attachEvent&&n.attachEvent("onunload",wt)),x.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),x.getElementsByTagName=o(function(t){return t.appendChild(A.createComment("")),!t.getElementsByTagName("*").length}),x.getElementsByClassName=mt.test(A.getElementsByClassName),x.getById=o(function(t){return O.appendChild(t).id=R,!A.getElementsByName||!A.getElementsByName(R).length}),x.getById?(w.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&N){var n=e.getElementById(t);return n?[n]:[]}},w.filter.ID=function(t){var e=t.replace(bt,xt);return function(t){return t.getAttribute("id")===e}}):(delete w.find.ID,w.filter.ID=function(t){var e=t.replace(bt,xt);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),w.find.TAG=x.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):x.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,r=[],o=0,i=e.getElementsByTagName(t);if("*"===t){for(;n=i[o++];)1===n.nodeType&&r.push(n);return r}return i},w.find.CLASS=x.getElementsByClassName&&function(t,e){return"undefined"!=typeof e.getElementsByClassName&&N?e.getElementsByClassName(t):void 0},F=[],q=[],(x.qsa=mt.test(A.querySelectorAll))&&(o(function(t){O.appendChild(t).innerHTML="<a id='"+R+"'></a><select id='"+R+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||q.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+R+"-]").length||q.push("~="),t.querySelectorAll(":checked").length||q.push(":checked"),t.querySelectorAll("a#"+R+"+*").length||q.push(".#.+[+~]")}),o(function(t){var e=A.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&q.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),q.push(",.*:")})),(x.matchesSelector=mt.test(D=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&o(function(t){x.disconnectedMatch=D.call(t,"div"),D.call(t,"[s!='']:x"),F.push("!=",it)}),q=q.length&&new RegExp(q.join("|")),F=F.length&&new RegExp(F.join("|")),e=mt.test(O.compareDocumentPosition),I=e||mt.test(O.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},H=e?function(t,e){if(t===e)return S=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n?n:(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1,1&n||!x.sortDetached&&e.compareDocumentPosition(t)===n?t===A||t.ownerDocument===B&&I(B,t)?-1:e===A||e.ownerDocument===B&&I(B,e)?1:P?tt(P,t)-tt(P,e):0:4&n?-1:1)}:function(t,e){if(t===e)return S=!0,0;var n,r=0,o=t.parentNode,i=e.parentNode,a=[t],l=[e];if(!o||!i)return t===A?-1:e===A?1:o?-1:i?1:P?tt(P,t)-tt(P,e):0;if(o===i)return s(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[r]===l[r];)r++;return r?s(a[r],l[r]):a[r]===B?-1:l[r]===B?1:0},A):A},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==A&&C(t),n=n.replace(ht,"='$1']"),x.matchesSelector&&N&&!V[n+" "]&&(!F||!F.test(n))&&(!q||!q.test(n)))try{var r=D.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(o){}return e(n,A,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==A&&C(t),I(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==A&&C(t);var n=w.attrHandle[e.toLowerCase()],r=n&&W.call(w.attrHandle,e.toLowerCase())?n(t,e,!N):void 0;return void 0!==r?r:x.attributes||!N?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],r=0,o=0;if(S=!x.detectDuplicates,P=!x.sortStable&&t.slice(0),t.sort(H),S){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)t.splice(n[r],1)}return P=null,t},k=e.getText=function(t){var e,n="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=k(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[r++];)n+=k(e);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:_t,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(bt,xt),t[3]=(t[3]||t[4]||t[5]||"").replace(bt,xt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return _t.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&ct.test(n)&&(e=j(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(bt,xt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=U[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&U(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(o){var i=e.attr(o,t);return null==i?"!="===n:n?(i+="","="===n?i===r:"!="===n?i!==r:"^="===n?r&&0===i.indexOf(r):"*="===n?r&&i.indexOf(r)>-1:"$="===n?r&&i.slice(-r.length)===r:"~="===n?(" "+i.replace(st," ")+" ").indexOf(r)>-1:"|="===n?i===r||i.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(t,e,n,r,o){var i="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var u,h,c,p,_,d,f=i!==s?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),y=!l&&!a,v=!1;if(m){if(i){for(;f;){for(p=e;p=p[f];)if(a?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;d=f="only"===t&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&y){for(p=m,c=p[R]||(p[R]={}),h=c[p.uniqueID]||(c[p.uniqueID]={}),u=h[t]||[],_=u[0]===L&&u[1],v=_&&u[2],p=_&&m.childNodes[_];p=++_&&p&&p[f]||(v=_=0)||d.pop();)if(1===p.nodeType&&++v&&p===e){h[t]=[L,_,v];break}}else if(y&&(p=e,c=p[R]||(p[R]={}),h=c[p.uniqueID]||(c[p.uniqueID]={}),u=h[t]||[],_=u[0]===L&&u[1],v=_),v===!1)for(;(p=++_&&p&&p[f]||(v=_=0)||d.pop())&&((a?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++v||(y&&(c=p[R]||(p[R]={}),h=c[p.uniqueID]||(c[p.uniqueID]={}),h[t]=[L,v]),p!==e)););return v-=o,v===r||v%r===0&&v/r>=0}}},PSEUDO:function(t,n){var o,i=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return i[R]?i(n):i.length>1?(o=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(t,e){for(var r,o=i(t,n),s=o.length;s--;)r=tt(t,o[s]),t[r]=!(e[r]=o[s])}):function(t){return i(t,0,o)}):i}},pseudos:{not:r(function(t){var e=[],n=[],o=T(t.replace(at,"$1"));return o[R]?r(function(t,e,n,r){for(var i,s=o(t,null,r,[]),a=t.length;a--;)(i=s[a])&&(t[a]=!(e[a]=i))}):function(t,r,i){return e[0]=t,o(e,null,i,n),e[0]=null,!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(t){return t=t.replace(bt,xt),function(e){return(e.textContent||e.innerText||k(e)).indexOf(t)>-1}}),lang:r(function(t){return pt.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(bt,xt).toLowerCase(),function(e){var n;do if(n=N?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===O},focus:function(t){return t===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!w.pseudos.empty(t)},header:function(t){return ft.test(t.nodeName)},input:function(t){return dt.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:u(function(){return[0]}),last:u(function(t,e){return[e-1]}),eq:u(function(t,e,n){return[0>n?n+e:n]}),even:u(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:u(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:u(function(t,e,n){for(var r=0>n?n+e:n;--r>=0;)t.push(r);return t}),gt:u(function(t,e,n){for(var r=0>n?n+e:n;++r<e;)t.push(r);return t})}},w.pseudos.nth=w.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[b]=a(b);for(b in{submit:!0,reset:!0})w.pseudos[b]=l(b);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,j=e.tokenize=function(t,n){var r,o,i,s,a,l,u,h=$[t+" "];if(h)return n?0:h.slice(0);for(a=t,l=[],u=w.preFilter;a;){(!r||(o=lt.exec(a)))&&(o&&(a=a.slice(o[0].length)||a),l.push(i=[])),r=!1,(o=ut.exec(a))&&(r=o.shift(),i.push({value:r,type:o[0].replace(at," ")}),a=a.slice(r.length));for(s in w.filter)!(o=_t[s].exec(a))||u[s]&&!(o=u[s](o))||(r=o.shift(),i.push({value:r,type:s,matches:o}),a=a.slice(r.length));if(!r)break}return n?a.length:a?e.error(t):$(t,l).slice(0)},T=e.compile=function(t,e){var n,r=[],o=[],i=V[t+" "];if(!i){for(e||(e=j(t)),n=e.length;n--;)i=y(e[n]),i[R]?r.push(i):o.push(i);i=V(t,v(o,r)),i.selector=t}return i},z=e.select=function(t,e,n,r){var o,i,s,a,l,u="function"==typeof t&&t,c=!r&&j(t=u.selector||t);if(n=n||[],1===c.length){if(i=c[0]=c[0].slice(0),i.length>2&&"ID"===(s=i[0]).type&&x.getById&&9===e.nodeType&&N&&w.relative[i[1].type]){if(e=(w.find.ID(s.matches[0].replace(bt,xt),e)||[])[0],!e)return n;u&&(e=e.parentNode),t=t.slice(i.shift().value.length)}for(o=_t.needsContext.test(t)?0:i.length;o--&&(s=i[o],!w.relative[a=s.type]);)if((l=w.find[a])&&(r=l(s.matches[0].replace(bt,xt),yt.test(i[0].type)&&h(e.parentNode)||e))){if(i.splice(o,1),t=r.length&&p(i),!t)return K.apply(n,r),n;break}}return(u||T(t,c))(r,e,!N,n,!e||yt.test(t)&&h(e.parentNode)||e),n},x.sortStable=R.split("").sort(H).join("")===R,x.detectDuplicates=!!S,C(),x.sortDetached=o(function(t){return 1&t.compareDocumentPosition(A.createElement("div"))}),o(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||i("type|href|height|width",function(t,e,n){return n?void 0:t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),x.attributes&&o(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||i("value",function(t,e,n){return n||"input"!==t.nodeName.toLowerCase()?void 0:t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||i(et,function(t,e,n){var r;return n?void 0:t[e]===!0?e.toLowerCase():(r=t.getAttributeNode(e))&&r.specified?r.value:null}),e}(e);st.find=ct,st.expr=ct.selectors,st.expr[":"]=st.expr.pseudos,st.uniqueSort=st.unique=ct.uniqueSort,st.text=ct.getText,st.isXMLDoc=ct.isXML,st.contains=ct.contains;var pt=function(t,e,n){for(var r=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&st(t).is(n))break;r.push(t)}return r},_t=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},dt=st.expr.match.needsContext,ft=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,mt=/^.[^:#\[\.,]*$/;st.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?st.find.matchesSelector(r,t)?[r]:[]:st.find.matches(t,st.grep(e,function(t){return 1===t.nodeType}))},st.fn.extend({find:function(t){var e,n=this.length,r=[],o=this;if("string"!=typeof t)return this.pushStack(st(t).filter(function(){for(e=0;n>e;e++)if(st.contains(o[e],this))return!0}));for(e=0;n>e;e++)st.find(t,o[e],r);return r=this.pushStack(n>1?st.unique(r):r),r.selector=this.selector?this.selector+" "+t:t,r},filter:function(t){return this.pushStack(o(this,t||[],!1))},not:function(t){return this.pushStack(o(this,t||[],!0))},is:function(t){return!!o(this,"string"==typeof t&&dt.test(t)?st(t):t||[],!1).length}});var gt,yt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,vt=st.fn.init=function(t,e,n){var r,o;if(!t)return this;if(n=n||gt,"string"==typeof t){if(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:yt.exec(t),!r||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof st?e[0]:e,st.merge(this,st.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:J,!0)),ft.test(r[1])&&st.isPlainObject(e))for(r in e)st.isFunction(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return o=J.getElementById(r[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=J,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):st.isFunction(t)?void 0!==n.ready?n.ready(t):t(st):(void 0!==t.selector&&(this.selector=t.selector,this.context=t.context),st.makeArray(t,this))};vt.prototype=st.fn,gt=st(J);var bt=/^(?:parents|prev(?:Until|All))/,xt={children:!0,contents:!0,next:!0,prev:!0};st.fn.extend({has:function(t){var e=st(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(st.contains(this,e[t]))return!0})},closest:function(t,e){for(var n,r=0,o=this.length,i=[],s=dt.test(t)||"string"!=typeof t?st(t,e||this.context):0;o>r;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&st.find.matchesSelector(n,t))){i.push(n);break}return this.pushStack(i.length>1?st.uniqueSort(i):i)},index:function(t){return t?"string"==typeof t?tt.call(st(t),this[0]):tt.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(st.uniqueSort(st.merge(this.get(),st(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),st.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return pt(t,"parentNode")},parentsUntil:function(t,e,n){return pt(t,"parentNode",n)},next:function(t){return i(t,"nextSibling")},prev:function(t){return i(t,"previousSibling")},nextAll:function(t){return pt(t,"nextSibling")},prevAll:function(t){return pt(t,"previousSibling")},nextUntil:function(t,e,n){return pt(t,"nextSibling",n)},prevUntil:function(t,e,n){return pt(t,"previousSibling",n)},siblings:function(t){return _t((t.parentNode||{}).firstChild,t)},children:function(t){return _t(t.firstChild)},contents:function(t){return t.contentDocument||st.merge([],t.childNodes)}},function(t,e){st.fn[t]=function(n,r){var o=st.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(o=st.filter(r,o)),this.length>1&&(xt[t]||st.uniqueSort(o),bt.test(t)&&o.reverse()),this.pushStack(o)}});var wt=/\S+/g;st.Callbacks=function(t){t="string"==typeof t?s(t):st.extend({},t);var e,n,r,o,i=[],a=[],l=-1,u=function(){for(o=t.once,r=e=!0;a.length;l=-1)for(n=a.shift();++l<i.length;)i[l].apply(n[0],n[1])===!1&&t.stopOnFalse&&(l=i.length,n=!1);t.memory||(n=!1),e=!1,o&&(i=n?[]:"")},h={add:function(){return i&&(n&&!e&&(l=i.length-1,a.push(n)),function r(e){st.each(e,function(e,n){st.isFunction(n)?t.unique&&h.has(n)||i.push(n):n&&n.length&&"string"!==st.type(n)&&r(n)})}(arguments),n&&!e&&u()),this},remove:function(){return st.each(arguments,function(t,e){for(var n;(n=st.inArray(e,i,n))>-1;)i.splice(n,1),l>=n&&l--}),this},has:function(t){return t?st.inArray(t,i)>-1:i.length>0},empty:function(){return i&&(i=[]),this},disable:function(){return o=a=[],i=n="",this},disabled:function(){return!i},lock:function(){return o=a=[],n||(i=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=n||[],n=[t,n.slice?n.slice():n],a.push(n),e||u()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!r}};return h},st.extend({Deferred:function(t){var e=[["resolve","done",st.Callbacks("once memory"),"resolved"],["reject","fail",st.Callbacks("once memory"),"rejected"],["notify","progress",st.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return st.Deferred(function(n){st.each(e,function(e,i){var s=st.isFunction(t[e])&&t[e];o[i[1]](function(){var t=s&&s.apply(this,arguments);t&&st.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this===r?n.promise():this,s?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?st.extend(t,r):r}},o={};return r.pipe=r.then,st.each(e,function(t,i){var s=i[2],a=i[3];r[i[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),o[i[0]]=function(){return o[i[0]+"With"](this===o?r:this,arguments),this},o[i[0]+"With"]=s.fireWith}),r.promise(o),t&&t.call(o,o),o},when:function(t){var e,n,r,o=0,i=Q.call(arguments),s=i.length,a=1!==s||t&&st.isFunction(t.promise)?s:0,l=1===a?t:st.Deferred(),u=function(t,n,r){return function(o){n[t]=this,r[t]=arguments.length>1?Q.call(arguments):o,r===e?l.notifyWith(n,r):--a||l.resolveWith(n,r)}};if(s>1)for(e=new Array(s),n=new Array(s),r=new Array(s);s>o;o++)i[o]&&st.isFunction(i[o].promise)?i[o].promise().progress(u(o,n,e)).done(u(o,r,i)).fail(l.reject):--a;return a||l.resolveWith(r,i),l.promise()}});var kt;st.fn.ready=function(t){return st.ready.promise().done(t),this},st.extend({isReady:!1,readyWait:1,holdReady:function(t){t?st.readyWait++:st.ready(!0)},ready:function(t){(t===!0?--st.readyWait:st.isReady)||(st.isReady=!0,t!==!0&&--st.readyWait>0||(kt.resolveWith(J,[st]),st.fn.triggerHandler&&(st(J).triggerHandler("ready"),st(J).off("ready"))))}}),st.ready.promise=function(t){return kt||(kt=st.Deferred(),"complete"===J.readyState||"loading"!==J.readyState&&!J.documentElement.doScroll?e.setTimeout(st.ready):(J.addEventListener("DOMContentLoaded",a),e.addEventListener("load",a))),kt.promise(t)},st.ready.promise();var Mt=function(t,e,n,r,o,i,s){var a=0,l=t.length,u=null==n;if("object"===st.type(n)){o=!0;for(a in n)Mt(t,e,a,n[a],!0,i,s)}else if(void 0!==r&&(o=!0,st.isFunction(r)||(s=!0),u&&(s?(e.call(t,r),e=null):(u=e,e=function(t,e,n){return u.call(st(t),n)})),e))for(;l>a;a++)e(t[a],n,s?r:r.call(t[a],a,e(t[a],n)));return o?t:u?e.call(t):l?e(t[0],n):i},jt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};l.uid=1,l.prototype={register:function(t,e){var n=e||{};return t.nodeType?t[this.expando]=n:Object.defineProperty(t,this.expando,{value:n,writable:!0,configurable:!0}),t[this.expando]},cache:function(t){if(!jt(t))return{};var e=t[this.expando];return e||(e={},jt(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,o=this.cache(t);if("string"==typeof e)o[e]=n;else for(r in e)o[r]=e[r];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][e]},access:function(t,e,n){var r;return void 0===e||e&&"string"==typeof e&&void 0===n?(r=this.get(t,e),void 0!==r?r:this.get(t,st.camelCase(e))):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r,o,i=t[this.expando];if(void 0!==i){if(void 0===e)this.register(t);else{st.isArray(e)?r=e.concat(e.map(st.camelCase)):(o=st.camelCase(e),e in i?r=[e,o]:(r=o,r=r in i?[r]:r.match(wt)||[])),n=r.length;for(;n--;)delete i[r[n]]}(void 0===e||st.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!st.isEmptyObject(e)}};var Tt=new l,zt=new l,Et=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Pt=/[A-Z]/g;st.extend({hasData:function(t){return zt.hasData(t)||Tt.hasData(t)},data:function(t,e,n){return zt.access(t,e,n)},removeData:function(t,e){zt.remove(t,e)},_data:function(t,e,n){return Tt.access(t,e,n)},_removeData:function(t,e){Tt.remove(t,e)}}),st.fn.extend({data:function(t,e){var n,r,o,i=this[0],s=i&&i.attributes;if(void 0===t){if(this.length&&(o=zt.get(i),1===i.nodeType&&!Tt.get(i,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(r=s[n].name,0===r.indexOf("data-")&&(r=st.camelCase(r.slice(5)),u(i,r,o[r])));Tt.set(i,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){zt.set(this,t)}):Mt(this,function(e){var n,r;if(i&&void 0===e){if(n=zt.get(i,t)||zt.get(i,t.replace(Pt,"-$&").toLowerCase()),void 0!==n)return n;if(r=st.camelCase(t),n=zt.get(i,r),void 0!==n)return n;if(n=u(i,r,void 0),void 0!==n)return n}else r=st.camelCase(t),this.each(function(){var n=zt.get(this,r);zt.set(this,r,e),t.indexOf("-")>-1&&void 0!==n&&zt.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){zt.remove(this,t)})}}),st.extend({queue:function(t,e,n){var r;return t?(e=(e||"fx")+"queue",r=Tt.get(t,e),n&&(!r||st.isArray(n)?r=Tt.access(t,e,st.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=st.queue(t,e),r=n.length,o=n.shift(),i=st._queueHooks(t,e),s=function(){st.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),r--),o&&("fx"===e&&n.unshift("inprogress"),delete i.stop,o.call(t,s,i)),!r&&i&&i.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Tt.get(t,n)||Tt.access(t,n,{empty:st.Callbacks("once memory").add(function(){Tt.remove(t,[e+"queue",n])})})}}),st.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?st.queue(this[0],t):void 0===e?this:this.each(function(){var n=st.queue(this,t,e);st._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&st.dequeue(this,t)})},dequeue:function(t){return this.each(function(){st.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,o=st.Deferred(),i=this,s=this.length,a=function(){--r||o.resolveWith(i,[i])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)n=Tt.get(i[s],t+"queueHooks"),n&&n.empty&&(r++,n.empty.add(a));return a(),o.promise(e)}});var St=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Ct=new RegExp("^(?:([+-])=|)("+St+")([a-z%]*)$","i"),At=["Top","Right","Bottom","Left"],Ot=function(t,e){return t=e||t,"none"===st.css(t,"display")||!st.contains(t.ownerDocument,t)},Nt=/^(?:checkbox|radio)$/i,qt=/<([\w:-]+)/,Ft=/^$|\/(?:java|ecma)script/i,Dt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Dt.optgroup=Dt.option,Dt.tbody=Dt.tfoot=Dt.colgroup=Dt.caption=Dt.thead,Dt.th=Dt.td;var It=/<|&#?\w+;/;!function(){var t=J.createDocumentFragment(),e=t.appendChild(J.createElement("div")),n=J.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),ot.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,e.innerHTML="<textarea>x</textarea>",ot.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue}();var Rt=/^key/,Bt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Lt=/^([^.]*)(?:\.(.+)|)/;st.event={global:{},add:function(t,e,n,r,o){var i,s,a,l,u,h,c,p,_,d,f,m=Tt.get(t);if(m)for(n.handler&&(i=n,n=i.handler,o=i.selector),n.guid||(n.guid=st.guid++),(l=m.events)||(l=m.events={}),(s=m.handle)||(s=m.handle=function(e){return"undefined"!=typeof st&&st.event.triggered!==e.type?st.event.dispatch.apply(t,arguments):void 0}),e=(e||"").match(wt)||[""],u=e.length;u--;)a=Lt.exec(e[u])||[],_=f=a[1],d=(a[2]||"").split(".").sort(),_&&(c=st.event.special[_]||{},_=(o?c.delegateType:c.bindType)||_,c=st.event.special[_]||{},h=st.extend({type:_,origType:f,data:r,handler:n,guid:n.guid,selector:o,needsContext:o&&st.expr.match.needsContext.test(o),namespace:d.join(".")},i),(p=l[_])||(p=l[_]=[],p.delegateCount=0,c.setup&&c.setup.call(t,r,d,s)!==!1||t.addEventListener&&t.addEventListener(_,s)),c.add&&(c.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,h):p.push(h),st.event.global[_]=!0)},remove:function(t,e,n,r,o){var i,s,a,l,u,h,c,p,_,d,f,m=Tt.hasData(t)&&Tt.get(t);if(m&&(l=m.events)){for(e=(e||"").match(wt)||[""],u=e.length;u--;)if(a=Lt.exec(e[u])||[],_=f=a[1],d=(a[2]||"").split(".").sort(),_){for(c=st.event.special[_]||{},_=(r?c.delegateType:c.bindType)||_,p=l[_]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=i=p.length;i--;)h=p[i],!o&&f!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||r&&r!==h.selector&&("**"!==r||!h.selector)||(p.splice(i,1),
61 h.selector&&p.delegateCount--,c.remove&&c.remove.call(t,h));s&&!p.length&&(c.teardown&&c.teardown.call(t,d,m.handle)!==!1||st.removeEvent(t,_,m.handle),delete l[_])}else for(_ in l)st.event.remove(t,_+e[u],n,r,!0);st.isEmptyObject(l)&&Tt.remove(t,"handle events")}},dispatch:function(t){t=st.event.fix(t);var e,n,r,o,i,s=[],a=Q.call(arguments),l=(Tt.get(this,"events")||{})[t.type]||[],u=st.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,t)!==!1){for(s=st.event.handlers.call(this,t,l),e=0;(o=s[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,n=0;(i=o.handlers[n++])&&!t.isImmediatePropagationStopped();)(!t.rnamespace||t.rnamespace.test(i.namespace))&&(t.handleObj=i,t.data=i.data,r=((st.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,a),void 0!==r&&(t.result=r)===!1&&(t.preventDefault(),t.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,r,o,i,s=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==t.type)){for(r=[],n=0;a>n;n++)i=e[n],o=i.selector+" ",void 0===r[o]&&(r[o]=i.needsContext?st(o,this).index(l)>-1:st.find(o,this,null,[l]).length),r[o]&&r.push(i);r.length&&s.push({elem:l,handlers:r})}return a<e.length&&s.push({elem:this,handlers:e.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,e){var n,r,o,i=e.button;return null==t.pageX&&null!=e.clientX&&(n=t.target.ownerDocument||J,r=n.documentElement,o=n.body,t.pageX=e.clientX+(r&&r.scrollLeft||o&&o.scrollLeft||0)-(r&&r.clientLeft||o&&o.clientLeft||0),t.pageY=e.clientY+(r&&r.scrollTop||o&&o.scrollTop||0)-(r&&r.clientTop||o&&o.clientTop||0)),t.which||void 0===i||(t.which=1&i?1:2&i?3:4&i?2:0),t}},fix:function(t){if(t[st.expando])return t;var e,n,r,o=t.type,i=t,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=Bt.test(o)?this.mouseHooks:Rt.test(o)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,t=new st.Event(i),e=r.length;e--;)n=r[e],t[n]=i[n];return t.target||(t.target=J),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,i):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==m()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===m()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&st.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return st.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},st.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},st.Event=function(t,e){return this instanceof st.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&t.returnValue===!1?d:f):this.type=t,e&&st.extend(this,e),this.timeStamp=t&&t.timeStamp||st.now(),void(this[st.expando]=!0)):new st.Event(t,e)},st.Event.prototype={constructor:st.Event,isDefaultPrevented:f,isPropagationStopped:f,isImmediatePropagationStopped:f,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=d,t&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=d,t&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=d,t&&t.stopImmediatePropagation(),this.stopPropagation()}},st.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){st.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,o=t.relatedTarget,i=t.handleObj;return(!o||o!==r&&!st.contains(r,o))&&(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}}),st.fn.extend({on:function(t,e,n,r){return g(this,t,e,n,r)},one:function(t,e,n,r){return g(this,t,e,n,r,1)},off:function(t,e,n){var r,o;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,st(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return(e===!1||"function"==typeof e)&&(n=e,e=void 0),n===!1&&(n=f),this.each(function(){st.event.remove(this,t,n,e)})}});var Gt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ut=/<script|<style|<link/i,$t=/checked\s*(?:[^=]|=\s*.checked.)/i,Vt=/^true\/(.*)/,Ht=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;st.extend({htmlPrefilter:function(t){return t.replace(Gt,"<$1></$2>")},clone:function(t,e,n){var r,o,i,s,a=t.cloneNode(!0),l=st.contains(t.ownerDocument,t);if(!(ot.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||st.isXMLDoc(t)))for(s=c(a),i=c(t),r=0,o=i.length;o>r;r++)w(i[r],s[r]);if(e)if(n)for(i=i||c(t),s=s||c(a),r=0,o=i.length;o>r;r++)x(i[r],s[r]);else x(t,a);return s=c(a,"script"),s.length>0&&p(s,!l&&c(t,"script")),a},cleanData:function(t){for(var e,n,r,o=st.event.special,i=0;void 0!==(n=t[i]);i++)if(jt(n)){if(e=n[Tt.expando]){if(e.events)for(r in e.events)o[r]?st.event.remove(n,r):st.removeEvent(n,r,e.handle);n[Tt.expando]=void 0}n[zt.expando]&&(n[zt.expando]=void 0)}}}),st.fn.extend({domManip:k,detach:function(t){return M(this,t,!0)},remove:function(t){return M(this,t)},text:function(t){return Mt(this,function(t){return void 0===t?st.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=t)})},null,t,arguments.length)},append:function(){return k(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.appendChild(t)}})},prepend:function(){return k(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=y(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return k(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return k(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(st.cleanData(c(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return st.clone(this,t,e)})},html:function(t){return Mt(this,function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ut.test(t)&&!Dt[(qt.exec(t)||["",""])[1].toLowerCase()]){t=st.htmlPrefilter(t);try{for(;r>n;n++)e=this[n]||{},1===e.nodeType&&(st.cleanData(c(e,!1)),e.innerHTML=t);e=0}catch(o){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return k(this,arguments,function(e){var n=this.parentNode;st.inArray(this,t)<0&&(st.cleanData(c(this)),n&&n.replaceChild(e,this))},t)}}),st.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){st.fn[t]=function(t){for(var n,r=[],o=st(t),i=o.length-1,s=0;i>=s;s++)n=s===i?this:this.clone(!0),st(o[s])[e](n),Z.apply(r,n.get());return this.pushStack(r)}});var Yt,Wt={HTML:"block",BODY:"block"},Xt=/^margin/,Jt=new RegExp("^("+St+")(?!px)[a-z%]+$","i"),Qt=function(t){var n=t.ownerDocument.defaultView;return n.opener||(n=e),n.getComputedStyle(t)},Kt=function(t,e,n,r){var o,i,s={};for(i in e)s[i]=t.style[i],t.style[i]=e[i];o=n.apply(t,r||[]);for(i in e)t.style[i]=s[i];return o},Zt=J.documentElement;!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Zt.appendChild(s);var t=e.getComputedStyle(a);n="1%"!==t.top,i="2px"===t.marginLeft,r="4px"===t.width,a.style.marginRight="50%",o="4px"===t.marginRight,Zt.removeChild(s)}var n,r,o,i,s=J.createElement("div"),a=J.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",ot.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),st.extend(ot,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==r&&t(),r},pixelMarginRight:function(){return null==r&&t(),o},reliableMarginLeft:function(){return null==r&&t(),i},reliableMarginRight:function(){var t,n=a.appendChild(J.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",Zt.appendChild(s),t=!parseFloat(e.getComputedStyle(n).marginRight),Zt.removeChild(s),a.removeChild(n),t}}))}();var te=/^(none|table(?!-c[ea]).+)/,ee={position:"absolute",visibility:"hidden",display:"block"},ne={letterSpacing:"0",fontWeight:"400"},re=["Webkit","O","Moz","ms"],oe=J.createElement("div").style;st.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=z(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,i,s,a=st.camelCase(e),l=t.style;return e=st.cssProps[a]||(st.cssProps[a]=P(a)||a),s=st.cssHooks[e]||st.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(o=s.get(t,!1,r))?o:l[e]:(i=typeof n,"string"===i&&(o=Ct.exec(n))&&o[1]&&(n=h(t,e,o),i="number"),null!=n&&n===n&&("number"===i&&(n+=o&&o[3]||(st.cssNumber[a]?"":"px")),ot.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(l[e]=n)),void 0)}},css:function(t,e,n,r){var o,i,s,a=st.camelCase(e);return e=st.cssProps[a]||(st.cssProps[a]=P(a)||a),s=st.cssHooks[e]||st.cssHooks[a],s&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=z(t,e,r)),"normal"===o&&e in ne&&(o=ne[e]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),st.each(["height","width"],function(t,e){st.cssHooks[e]={get:function(t,n,r){return n?te.test(st.css(t,"display"))&&0===t.offsetWidth?Kt(t,ee,function(){return A(t,e,r)}):A(t,e,r):void 0},set:function(t,n,r){var o,i=r&&Qt(t),s=r&&C(t,e,r,"border-box"===st.css(t,"boxSizing",!1,i),i);return s&&(o=Ct.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=st.css(t,e)),S(t,n,s)}}}),st.cssHooks.marginLeft=E(ot.reliableMarginLeft,function(t,e){return e?(parseFloat(z(t,"marginLeft"))||t.getBoundingClientRect().left-Kt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px":void 0}),st.cssHooks.marginRight=E(ot.reliableMarginRight,function(t,e){return e?Kt(t,{display:"inline-block"},z,[t,"marginRight"]):void 0}),st.each({margin:"",padding:"",border:"Width"},function(t,e){st.cssHooks[t+e]={expand:function(n){for(var r=0,o={},i="string"==typeof n?n.split(" "):[n];4>r;r++)o[t+At[r]+e]=i[r]||i[r-2]||i[0];return o}},Xt.test(t)||(st.cssHooks[t+e].set=S)}),st.fn.extend({css:function(t,e){return Mt(this,function(t,e,n){var r,o,i={},s=0;if(st.isArray(e)){for(r=Qt(t),o=e.length;o>s;s++)i[e[s]]=st.css(t,e[s],!1,r);return i}return void 0!==n?st.style(t,e,n):st.css(t,e)},t,e,arguments.length>1)},show:function(){return O(this,!0)},hide:function(){return O(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ot(this)?st(this).show():st(this).hide()})}}),st.Tween=N,N.prototype={constructor:N,init:function(t,e,n,r,o,i){this.elem=t,this.prop=n,this.easing=o||st.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=i||(st.cssNumber[n]?"":"px")},cur:function(){var t=N.propHooks[this.prop];return t&&t.get?t.get(this):N.propHooks._default.get(this)},run:function(t){var e,n=N.propHooks[this.prop];return this.options.duration?this.pos=e=st.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):N.propHooks._default.set(this),this}},N.prototype.init.prototype=N.prototype,N.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=st.css(t.elem,t.prop,""),e&&"auto"!==e?e:0)},set:function(t){st.fx.step[t.prop]?st.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[st.cssProps[t.prop]]&&!st.cssHooks[t.prop]?t.elem[t.prop]=t.now:st.style(t.elem,t.prop,t.now+t.unit)}}},N.propHooks.scrollTop=N.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},st.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},st.fx=N.prototype.init,st.fx.step={};var ie,se,ae=/^(?:toggle|show|hide)$/,le=/queueHooks$/;st.Animation=st.extend(B,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return h(n.elem,t,Ct.exec(e),n),n}]},tweener:function(t,e){st.isFunction(t)?(e=t,t=["*"]):t=t.match(wt);for(var n,r=0,o=t.length;o>r;r++)n=t[r],B.tweeners[n]=B.tweeners[n]||[],B.tweeners[n].unshift(e)},prefilters:[I],prefilter:function(t,e){e?B.prefilters.unshift(t):B.prefilters.push(t)}}),st.speed=function(t,e,n){var r=t&&"object"==typeof t?st.extend({},t):{complete:n||!n&&e||st.isFunction(t)&&t,duration:t,easing:n&&e||e&&!st.isFunction(e)&&e};return r.duration=st.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in st.fx.speeds?st.fx.speeds[r.duration]:st.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){st.isFunction(r.old)&&r.old.call(this),r.queue&&st.dequeue(this,r.queue)},r},st.fn.extend({fadeTo:function(t,e,n,r){return this.filter(Ot).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var o=st.isEmptyObject(t),i=st.speed(e,n,r),s=function(){var e=B(this,st.extend({},t),i);(o||Tt.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||i.queue===!1?this.each(s):this.queue(i.queue,s)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",i=st.timers,s=Tt.get(this);if(o)s[o]&&s[o].stop&&r(s[o]);else for(o in s)s[o]&&s[o].stop&&le.test(o)&&r(s[o]);for(o=i.length;o--;)i[o].elem!==this||null!=t&&i[o].queue!==t||(i[o].anim.stop(n),e=!1,i.splice(o,1));(e||!n)&&st.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=Tt.get(this),r=n[t+"queue"],o=n[t+"queueHooks"],i=st.timers,s=r?r.length:0;for(n.finish=!0,st.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===t&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;s>e;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),st.each(["toggle","show","hide"],function(t,e){var n=st.fn[e];st.fn[e]=function(t,r,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(F(e,!0),t,r,o)}}),st.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){st.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),st.timers=[],st.fx.tick=function(){var t,e=0,n=st.timers;for(ie=st.now();e<n.length;e++)t=n[e],t()||n[e]!==t||n.splice(e--,1);n.length||st.fx.stop(),ie=void 0},st.fx.timer=function(t){st.timers.push(t),t()?st.fx.start():st.timers.pop()},st.fx.interval=13,st.fx.start=function(){se||(se=e.setInterval(st.fx.tick,st.fx.interval))},st.fx.stop=function(){e.clearInterval(se),se=null},st.fx.speeds={slow:600,fast:200,_default:400},st.fn.delay=function(t,n){return t=st.fx?st.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,r){var o=e.setTimeout(n,t);r.stop=function(){e.clearTimeout(o)}})},function(){var t=J.createElement("input"),e=J.createElement("select"),n=e.appendChild(J.createElement("option"));t.type="checkbox",ot.checkOn=""!==t.value,ot.optSelected=n.selected,e.disabled=!0,ot.optDisabled=!n.disabled,t=J.createElement("input"),t.value="t",t.type="radio",ot.radioValue="t"===t.value}();var ue,he=st.expr.attrHandle;st.fn.extend({attr:function(t,e){return Mt(this,st.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){st.removeAttr(this,t)})}}),st.extend({attr:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return"undefined"==typeof t.getAttribute?st.prop(t,e,n):(1===i&&st.isXMLDoc(t)||(e=e.toLowerCase(),o=st.attrHooks[e]||(st.expr.match.bool.test(e)?ue:void 0)),void 0!==n?null===n?void st.removeAttr(t,e):o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(r=o.get(t,e))?r:(r=st.find.attr(t,e),null==r?void 0:r))},attrHooks:{type:{set:function(t,e){if(!ot.radioValue&&"radio"===e&&st.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r,o=0,i=e&&e.match(wt);if(i&&1===t.nodeType)for(;n=i[o++];)r=st.propFix[n]||n,st.expr.match.bool.test(n)&&(t[r]=!1),t.removeAttribute(n)}}),ue={set:function(t,e,n){return e===!1?st.removeAttr(t,n):t.setAttribute(n,n),n}},st.each(st.expr.match.bool.source.match(/\w+/g),function(t,e){var n=he[e]||st.find.attr;he[e]=function(t,e,r){var o,i;return r||(i=he[e],he[e]=o,o=null!=n(t,e,r)?e.toLowerCase():null,he[e]=i),o}});var ce=/^(?:input|select|textarea|button)$/i,pe=/^(?:a|area)$/i;st.fn.extend({prop:function(t,e){return Mt(this,st.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[st.propFix[t]||t]})}}),st.extend({prop:function(t,e,n){var r,o,i=t.nodeType;if(3!==i&&8!==i&&2!==i)return 1===i&&st.isXMLDoc(t)||(e=st.propFix[e]||e,o=st.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(r=o.set(t,n,e))?r:t[e]=n:o&&"get"in o&&null!==(r=o.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=st.find.attr(t,"tabindex");return e?parseInt(e,10):ce.test(t.nodeName)||pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ot.optSelected||(st.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),st.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){st.propFix[this.toLowerCase()]=this});var _e=/[\t\r\n\f]/g;st.fn.extend({addClass:function(t){var e,n,r,o,i,s,a,l=0;if(st.isFunction(t))return this.each(function(e){st(this).addClass(t.call(this,e,L(this)))});if("string"==typeof t&&t)for(e=t.match(wt)||[];n=this[l++];)if(o=L(n),r=1===n.nodeType&&(" "+o+" ").replace(_e," ")){for(s=0;i=e[s++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");a=st.trim(r),o!==a&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,r,o,i,s,a,l=0;if(st.isFunction(t))return this.each(function(e){st(this).removeClass(t.call(this,e,L(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(wt)||[];n=this[l++];)if(o=L(n),r=1===n.nodeType&&(" "+o+" ").replace(_e," ")){for(s=0;i=e[s++];)for(;r.indexOf(" "+i+" ")>-1;)r=r.replace(" "+i+" "," ");a=st.trim(r),o!==a&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):st.isFunction(t)?this.each(function(n){st(this).toggleClass(t.call(this,n,L(this),e),e)}):this.each(function(){var e,r,o,i;if("string"===n)for(r=0,o=st(this),i=t.match(wt)||[];e=i[r++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else(void 0===t||"boolean"===n)&&(e=L(this),e&&Tt.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||t===!1?"":Tt.get(this,"__className__")||""))})},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+L(n)+" ").replace(_e," ").indexOf(e)>-1)return!0;return!1}});var de=/\r/g;st.fn.extend({val:function(t){var e,n,r,o=this[0];{if(arguments.length)return r=st.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(o=r?t.call(this,n,st(this).val()):t,null==o?o="":"number"==typeof o?o+="":st.isArray(o)&&(o=st.map(o,function(t){return null==t?"":t+""})),e=st.valHooks[this.type]||st.valHooks[this.nodeName.toLowerCase()],e&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))});if(o)return e=st.valHooks[o.type]||st.valHooks[o.nodeName.toLowerCase()],e&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(de,""):null==n?"":n)}}}),st.extend({valHooks:{option:{get:function(t){return st.trim(t.value)}},select:{get:function(t){for(var e,n,r=t.options,o=t.selectedIndex,i="select-one"===t.type||0>o,s=i?null:[],a=i?o+1:r.length,l=0>o?a:i?o:0;a>l;l++)if(n=r[l],(n.selected||l===o)&&(ot.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!st.nodeName(n.parentNode,"optgroup"))){if(e=st(n).val(),i)return e;s.push(e)}return s},set:function(t,e){for(var n,r,o=t.options,i=st.makeArray(e),s=o.length;s--;)r=o[s],(r.selected=st.inArray(st.valHooks.option.get(r),i)>-1)&&(n=!0);return n||(t.selectedIndex=-1),i}}}}),st.each(["radio","checkbox"],function(){st.valHooks[this]={set:function(t,e){return st.isArray(e)?t.checked=st.inArray(st(t).val(),e)>-1:void 0}},ot.checkOn||(st.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var fe=/^(?:focusinfocus|focusoutblur)$/;st.extend(st.event,{trigger:function(t,n,r,o){var i,s,a,l,u,h,c,p=[r||J],_=rt.call(t,"type")?t.type:t,d=rt.call(t,"namespace")?t.namespace.split("."):[];if(s=a=r=r||J,3!==r.nodeType&&8!==r.nodeType&&!fe.test(_+st.event.triggered)&&(_.indexOf(".")>-1&&(d=_.split("."),_=d.shift(),d.sort()),u=_.indexOf(":")<0&&"on"+_,t=t[st.expando]?t:new st.Event(_,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:st.makeArray(n,[t]),c=st.event.special[_]||{},o||!c.trigger||c.trigger.apply(r,n)!==!1)){if(!o&&!c.noBubble&&!st.isWindow(r)){for(l=c.delegateType||_,fe.test(l+_)||(s=s.parentNode);s;s=s.parentNode)p.push(s),a=s;a===(r.ownerDocument||J)&&p.push(a.defaultView||a.parentWindow||e)}for(i=0;(s=p[i++])&&!t.isPropagationStopped();)t.type=i>1?l:c.bindType||_,h=(Tt.get(s,"events")||{})[t.type]&&Tt.get(s,"handle"),h&&h.apply(s,n),h=u&&s[u],h&&h.apply&&jt(s)&&(t.result=h.apply(s,n),t.result===!1&&t.preventDefault());return t.type=_,o||t.isDefaultPrevented()||c._default&&c._default.apply(p.pop(),n)!==!1||!jt(r)||u&&st.isFunction(r[_])&&!st.isWindow(r)&&(a=r[u],a&&(r[u]=null),st.event.triggered=_,r[_](),st.event.triggered=void 0,a&&(r[u]=a)),t.result}},simulate:function(t,e,n){var r=st.extend(new st.Event,n,{type:t,isSimulated:!0});st.event.trigger(r,null,e),r.isDefaultPrevented()&&n.preventDefault()}}),st.fn.extend({trigger:function(t,e){return this.each(function(){st.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?st.event.trigger(t,e,n,!0):void 0}}),st.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){st.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),st.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),ot.focusin="onfocusin"in e,ot.focusin||st.each({focus:"focusin",blur:"focusout"},function(t,e){var n=function(t){st.event.simulate(e,t.target,st.event.fix(t))};st.event.special[e]={setup:function(){var r=this.ownerDocument||this,o=Tt.access(r,e);o||r.addEventListener(t,n,!0),Tt.access(r,e,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this,o=Tt.access(r,e)-1;o?Tt.access(r,e,o):(r.removeEventListener(t,n,!0),Tt.remove(r,e))}}});var me=e.location,ge=st.now(),ye=/\?/;st.parseJSON=function(t){return JSON.parse(t+"")},st.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(r){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&st.error("Invalid XML: "+t),n};var ve=/#.*$/,be=/([?&])_=[^&]*/,xe=/^(.*?):[ \t]*([^\r\n]*)$/gm,we=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,ke=/^(?:GET|HEAD)$/,Me=/^\/\//,je={},Te={},ze="*/".concat("*"),Ee=J.createElement("a");Ee.href=me.href,st.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:me.href,type:"GET",isLocal:we.test(me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ze,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":st.parseJSON,"text xml":st.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?$($(t,st.ajaxSettings),e):$(st.ajaxSettings,t)},ajaxPrefilter:G(je),ajaxTransport:G(Te),ajax:function(t,n){function r(t,n,r,a){var u,c,y,v,x,k=n;2!==b&&(b=2,l&&e.clearTimeout(l),o=void 0,s=a||"",w.readyState=t>0?4:0,u=t>=200&&300>t||304===t,r&&(v=V(p,w,r)),v=H(p,v,w,u),u?(p.ifModified&&(x=w.getResponseHeader("Last-Modified"),x&&(st.lastModified[i]=x),x=w.getResponseHeader("etag"),x&&(st.etag[i]=x)),204===t||"HEAD"===p.type?k="nocontent":304===t?k="notmodified":(k=v.state,c=v.data,y=v.error,u=!y)):(y=k,(t||!k)&&(k="error",0>t&&(t=0))),w.status=t,w.statusText=(n||k)+"",u?f.resolveWith(_,[c,k,w]):f.rejectWith(_,[w,k,y]),w.statusCode(g),g=void 0,h&&d.trigger(u?"ajaxSuccess":"ajaxError",[w,p,u?c:y]),m.fireWith(_,[w,k]),h&&(d.trigger("ajaxComplete",[w,p]),--st.active||st.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,i,s,a,l,u,h,c,p=st.ajaxSetup({},n),_=p.context||p,d=p.context&&(_.nodeType||_.jquery)?st(_):st.event,f=st.Deferred(),m=st.Callbacks("once memory"),g=p.statusCode||{},y={},v={},b=0,x="canceled",w={readyState:0,getResponseHeader:function(t){var e;if(2===b){if(!a)for(a={};e=xe.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return b||(t=v[n]=v[n]||t,y[t]=e),this},overrideMimeType:function(t){return b||(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>b)for(e in t)g[e]=[g[e],t[e]];else w.always(t[w.status]);return this},abort:function(t){var e=t||x;return o&&o.abort(e),r(0,e),this}};if(f.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((t||p.url||me.href)+"").replace(ve,"").replace(Me,me.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=st.trim(p.dataType||"*").toLowerCase().match(wt)||[""],null==p.crossDomain){u=J.createElement("a");try{u.href=p.url,u.href=u.href,p.crossDomain=Ee.protocol+"//"+Ee.host!=u.protocol+"//"+u.host}catch(k){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=st.param(p.data,p.traditional)),U(je,p,n,w),2===b)return w;h=st.event&&p.global,h&&0===st.active++&&st.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!ke.test(p.type),i=p.url,p.hasContent||(p.data&&(i=p.url+=(ye.test(i)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=be.test(i)?i.replace(be,"$1_="+ge++):i+(ye.test(i)?"&":"?")+"_="+ge++)),p.ifModified&&(st.lastModified[i]&&w.setRequestHeader("If-Modified-Since",st.lastModified[i]),st.etag[i]&&w.setRequestHeader("If-None-Match",st.etag[i])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+ze+"; q=0.01":""):p.accepts["*"]);for(c in p.headers)w.setRequestHeader(c,p.headers[c]);if(p.beforeSend&&(p.beforeSend.call(_,w,p)===!1||2===b))return w.abort();x="abort";for(c in{success:1,error:1,complete:1})w[c](p[c]);if(o=U(Te,p,n,w)){if(w.readyState=1,h&&d.trigger("ajaxSend",[w,p]),2===b)return w;p.async&&p.timeout>0&&(l=e.setTimeout(function(){w.abort("timeout")},p.timeout));try{b=1,o.send(y,r)}catch(k){if(!(2>b))throw k;r(-1,k)}}else r(-1,"No Transport");return w},getJSON:function(t,e,n){return st.get(t,e,n,"json")},getScript:function(t,e){return st.get(t,void 0,e,"script")}}),st.each(["get","post"],function(t,e){st[e]=function(t,n,r,o){return st.isFunction(n)&&(o=o||r,r=n,n=void 0),st.ajax(st.extend({url:t,type:e,dataType:o,data:n,success:r},st.isPlainObject(t)&&t))}}),st._evalUrl=function(t){return st.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},st.fn.extend({wrapAll:function(t){var e;return st.isFunction(t)?this.each(function(e){st(this).wrapAll(t.call(this,e))}):(this[0]&&(e=st(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return st.isFunction(t)?this.each(function(e){st(this).wrapInner(t.call(this,e))}):this.each(function(){var e=st(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=st.isFunction(t);return this.each(function(n){st(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){st.nodeName(this,"body")||st(this).replaceWith(this.childNodes)}).end()}}),st.expr.filters.hidden=function(t){return!st.expr.filters.visible(t)},st.expr.filters.visible=function(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0};var Pe=/%20/g,Se=/\[\]$/,Ce=/\r?\n/g,Ae=/^(?:submit|button|image|reset|file)$/i,Oe=/^(?:input|select|textarea|keygen)/i;st.param=function(t,e){var n,r=[],o=function(t,e){e=st.isFunction(e)?e():null==e?"":e,r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(void 0===e&&(e=st.ajaxSettings&&st.ajaxSettings.traditional),st.isArray(t)||t.jquery&&!st.isPlainObject(t))st.each(t,function(){o(this.name,this.value)});else for(n in t)Y(n,t[n],e,o);return r.join("&").replace(Pe,"+")},st.fn.extend({serialize:function(){return st.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=st.prop(this,"elements");return t?st.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!st(this).is(":disabled")&&Oe.test(this.nodeName)&&!Ae.test(t)&&(this.checked||!Nt.test(t))}).map(function(t,e){var n=st(this).val();return null==n?null:st.isArray(n)?st.map(n,function(t){return{name:e.name,value:t.replace(Ce,"\r\n")}}):{name:e.name,value:n.replace(Ce,"\r\n")}}).get()}}),st.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Ne={0:200,1223:204},qe=st.ajaxSettings.xhr();ot.cors=!!qe&&"withCredentials"in qe,ot.ajax=qe=!!qe,st.ajaxTransport(function(t){var n,r;return ot.cors||qe&&!t.crossDomain?{send:function(o,i){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(s in o)a.setRequestHeader(s,o[s]);n=function(t){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,
62 "abort"===t?a.abort():"error"===t?"number"!=typeof a.status?i(0,"error"):i(a.status,a.statusText):i(Ne[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&r()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(l){if(n)throw l}},abort:function(){n&&n()}}:void 0}),st.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return st.globalEval(t),t}}}),st.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),st.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,o){e=st("<script>").prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),J.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Fe=[],De=/(=)\?(?=&|$)|\?\?/;st.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Fe.pop()||st.expando+"_"+ge++;return this[t]=!0,t}}),st.ajaxPrefilter("json jsonp",function(t,n,r){var o,i,s,a=t.jsonp!==!1&&(De.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&De.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(o=t.jsonpCallback=st.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(De,"$1"+o):t.jsonp!==!1&&(t.url+=(ye.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||st.error(o+" was not called"),s[0]},t.dataTypes[0]="json",i=e[o],e[o]=function(){s=arguments},r.always(function(){void 0===i?st(e).removeProp(o):e[o]=i,t[o]&&(t.jsonpCallback=n.jsonpCallback,Fe.push(o)),s&&st.isFunction(i)&&i(s[0]),s=i=void 0}),"script"):void 0}),ot.createHTMLDocument=function(){var t=J.implementation.createHTMLDocument("").body;return t.innerHTML="<form></form><form></form>",2===t.childNodes.length}(),st.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||(ot.createHTMLDocument?J.implementation.createHTMLDocument(""):J);var r=ft.exec(t),o=!n&&[];return r?[e.createElement(r[1])]:(r=_([t],e,o),o&&o.length&&st(o).remove(),st.merge([],r.childNodes))};var Ie=st.fn.load;st.fn.load=function(t,e,n){if("string"!=typeof t&&Ie)return Ie.apply(this,arguments);var r,o,i,s=this,a=t.indexOf(" ");return a>-1&&(r=st.trim(t.slice(a)),t=t.slice(0,a)),st.isFunction(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&st.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){i=arguments,s.html(r?st("<div>").append(st.parseHTML(t)).find(r):t)}).always(n&&function(t,e){s.each(function(){n.apply(s,i||[t.responseText,e,t])})}),this},st.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){st.fn[e]=function(t){return this.on(e,t)}}),st.expr.filters.animated=function(t){return st.grep(st.timers,function(e){return t===e.elem}).length},st.offset={setOffset:function(t,e,n){var r,o,i,s,a,l,u,h=st.css(t,"position"),c=st(t),p={};"static"===h&&(t.style.position="relative"),a=c.offset(),i=st.css(t,"top"),l=st.css(t,"left"),u=("absolute"===h||"fixed"===h)&&(i+l).indexOf("auto")>-1,u?(r=c.position(),s=r.top,o=r.left):(s=parseFloat(i)||0,o=parseFloat(l)||0),st.isFunction(e)&&(e=e.call(t,n,st.extend({},a))),null!=e.top&&(p.top=e.top-a.top+s),null!=e.left&&(p.left=e.left-a.left+o),"using"in e?e.using.call(t,p):c.css(p)}},st.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){st.offset.setOffset(this,t,e)});var e,n,r=this[0],o={top:0,left:0},i=r&&r.ownerDocument;if(i)return e=i.documentElement,st.contains(e,r)?(o=r.getBoundingClientRect(),n=W(i),{top:o.top+n.pageYOffset-e.clientTop,left:o.left+n.pageXOffset-e.clientLeft}):o},position:function(){if(this[0]){var t,e,n=this[0],r={top:0,left:0};return"fixed"===st.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),st.nodeName(t[0],"html")||(r=t.offset()),r.top+=st.css(t[0],"borderTopWidth",!0)-t.scrollTop(),r.left+=st.css(t[0],"borderLeftWidth",!0)-t.scrollLeft()),{top:e.top-r.top-st.css(n,"marginTop",!0),left:e.left-r.left-st.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===st.css(t,"position");)t=t.offsetParent;return t||Zt})}}),st.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;st.fn[t]=function(r){return Mt(this,function(t,r,o){var i=W(t);return void 0===o?i?i[e]:t[r]:void(i?i.scrollTo(n?i.pageXOffset:o,n?o:i.pageYOffset):t[r]=o)},t,r,arguments.length)}}),st.each(["top","left"],function(t,e){st.cssHooks[e]=E(ot.pixelPosition,function(t,n){return n?(n=z(t,e),Jt.test(n)?st(t).position()[e]+"px":n):void 0})}),st.each({Height:"height",Width:"width"},function(t,e){st.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,r){st.fn[r]=function(r,o){var i=arguments.length&&(n||"boolean"!=typeof r),s=n||(r===!0||o===!0?"margin":"border");return Mt(this,function(e,n,r){var o;return st.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===r?st.css(e,n,s):st.style(e,n,r,s)},e,i?r:void 0,i,null)}})}),st.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},size:function(){return this.length}}),st.fn.andSelf=st.fn.addBack,"function"==typeof t&&t.amd&&t("jquery",[],function(){return st});var Re=e.jQuery,Be=e.$;return st.noConflict=function(t){return e.$===st&&(e.$=Be),t&&e.jQuery===st&&(e.jQuery=Re),st},n||(e.jQuery=e.$=st),st})},{}],jsnlog:[function(t,e,n){function r(t){if(!t)return r.__;Array.prototype.reduce||(Array.prototype.reduce=function(t,e){for(var n=e,r=0;r<this.length;r++)n=t(n,this[r],r,this);return n});var e="",n=("."+t).split(".").reduce(function(t,n,o,i){e?e+="."+n:e=n;var s=t["__"+e];return void 0===s&&(r.Logger.prototype=t,s=new r.Logger(e),t["__"+e]=s),s},r.__);return n}var r,o=this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);n.prototype=e.prototype,t.prototype=new n};!function(t){function e(t,e,n){return void 0!==e[t]?null===e[t]?void delete n[t]:void(n[t]=e[t]):void 0}function n(e){if(null!=t.enabled&&!t.enabled)return!1;if(null!=t.maxMessages&&t.maxMessages<1)return!1;try{if(e.userAgentRegex&&!new RegExp(e.userAgentRegex).test(navigator.userAgent))return!1}catch(n){}try{if(e.ipRegex&&t.clientIP&&!new RegExp(e.ipRegex).test(t.clientIP))return!1}catch(n){}return!0}function r(t,e){try{if(t.disallow&&new RegExp(t.disallow).test(e))return!1}catch(n){}return!0}function i(t){return"function"==typeof t?t instanceof RegExp?t.toString():t():t}function s(t){var e,n=i(t);switch(typeof n){case"string":return new v(n,null,n);case"number":return e=n.toString(),new v(e,null,e);case"boolean":return e=n.toString(),new v(e,null,e);case"undefined":return new v("undefined",null,"undefined");case"object":return n instanceof RegExp||n instanceof String||n instanceof Number||n instanceof Boolean?(e=n.toString(),new v(e,null,e)):new v(null,n,JSON.stringify(n));default:return new v("unknown",null,"unknown")}}function a(t){return e("enabled",t,this),e("maxMessages",t,this),e("defaultAjaxUrl",t,this),e("clientIP",t,this),e("requestId",t,this),e("defaultBeforeSend",t,this),this}function l(){return-2147483648}function u(){return 1e3}function h(){return 2e3}function c(){return 3e3}function p(){return 4e3}function _(){return 5e3}function d(){return 6e3}function f(){return 2147483647}function m(t){return 1e3>=t?"trace":2e3>=t?"debug":3e3>=t?"info":4e3>=t?"warn":5e3>=t?"error":"fatal"}function g(t){return new k(t)}function y(t){return new M(t)}t.enabled,t.maxMessages,t.defaultAjaxUrl,t.clientIP,t.defaultBeforeSend,t.requestId="";var v=function(){function t(t,e,n){this.msg=t,this.meta=e,this.finalString=n}return t}();t.setOptions=a,t.getAllLevel=l,t.getTraceLevel=u,t.getDebugLevel=h,t.getInfoLevel=c,t.getWarnLevel=p,t.getErrorLevel=_,t.getFatalLevel=d,t.getOffLevel=f;var b=function(){function t(t,e){this.inner=e,this.name="JL.Exception",this.message=s(t).finalString}return t}();t.Exception=b,b.prototype=new Error;var x=function(){function t(t,e,n,r){this.l=t,this.m=e,this.n=n,this.t=r}return t}();t.LogItem=x;var w=function(){function o(e,n){this.appenderName=e,this.sendLogItems=n,this.level=t.getTraceLevel(),this.sendWithBufferLevel=2147483647,this.storeInBufferLevel=-2147483648,this.bufferSize=0,this.batchSize=1,this.buffer=[],this.batchBuffer=[]}return o.prototype.setOptions=function(t){return e("level",t,this),e("ipRegex",t,this),e("userAgentRegex",t,this),e("disallow",t,this),e("sendWithBufferLevel",t,this),e("storeInBufferLevel",t,this),e("bufferSize",t,this),e("batchSize",t,this),this.bufferSize<this.buffer.length&&(this.buffer.length=this.bufferSize),this},o.prototype.log=function(t,e,o,i,s,a,l){var u;if(n(this)&&r(this,a)&&!(s<this.storeInBufferLevel))return u=new x(s,a,l,(new Date).getTime()),s<this.level?void(this.bufferSize>0&&(this.buffer.push(u),this.buffer.length>this.bufferSize&&this.buffer.shift())):(s<this.sendWithBufferLevel?this.batchBuffer.push(u):(this.buffer.length&&(this.batchBuffer=this.batchBuffer.concat(this.buffer),this.buffer.length=0),this.batchBuffer.push(u)),this.batchBuffer.length>=this.batchSize?void this.sendBatch():void 0)},o.prototype.sendBatch=function(){0!=this.batchBuffer.length&&(null!=t.maxMessages&&t.maxMessages<1||(null!=t.maxMessages&&(t.maxMessages-=this.batchBuffer.length),this.sendLogItems(this.batchBuffer),this.batchBuffer.length=0))},o}();t.Appender=w;var k=function(n){function r(t){n.call(this,t,r.prototype.sendLogItemsAjax)}return o(r,n),r.prototype.setOptions=function(t){return e("url",t,this),e("beforeSend",t,this),n.prototype.setOptions.call(this,t),this},r.prototype.sendLogItemsAjax=function(e){try{var n="/jsnlog.logger";null!=t.defaultAjaxUrl&&(n=t.defaultAjaxUrl),this.url&&(n=this.url);var r=JSON.stringify({r:t.requestId,lg:e}),o=this.getXhr(n);"function"==typeof this.beforeSend?this.beforeSend.call(this,o):"function"==typeof t.defaultBeforeSend&&t.defaultBeforeSend.call(this,o),o.send(r)}catch(i){}},r.prototype.getXhr=function(e){var n=new XMLHttpRequest;if(!("withCredentials"in n)&&"undefined"!=typeof XDomainRequest){var r=new XDomainRequest;return r.open("POST",e),r}return n.open("POST",e),n.setRequestHeader("Content-Type","application/json"),n.setRequestHeader("JSNLog-RequestId",t.requestId),n},r}(w);t.AjaxAppender=k;var M=function(e){function n(t){e.call(this,t,n.prototype.sendLogItemsConsole)}return o(n,e),n.prototype.clog=function(t){console.log(t)},n.prototype.cerror=function(t){console.error?console.error(t):this.clog(t)},n.prototype.cwarn=function(t){console.warn?console.warn(t):this.clog(t)},n.prototype.cinfo=function(t){console.info?console.info(t):this.clog(t)},n.prototype.cdebug=function(t){console.debug?console.debug(t):this.cinfo(t)},n.prototype.sendLogItemsConsole=function(e){try{if(!console)return;var n;for(n=0;n<e.length;++n){var r=e[n],o=r.n+": "+r.m;"undefined"==typeof window&&(o=new Date(r.t)+" | "+o),r.l<=t.getDebugLevel()?this.cdebug(o):r.l<=t.getInfoLevel()?this.cinfo(o):r.l<=t.getWarnLevel()?this.cwarn(o):this.cerror(o)}}catch(i){}},n}(w);t.ConsoleAppender=M;var j=function(){function t(t){this.loggerName=t,this.seenRegexes=[]}return t.prototype.setOptions=function(t){return e("level",t,this),e("userAgentRegex",t,this),e("disallow",t,this),e("ipRegex",t,this),e("appenders",t,this),e("onceOnly",t,this),this.seenRegexes=[],this},t.prototype.buildExceptionObject=function(t){var e={};return t.stack?e.stack=t.stack:e.e=t,t.message&&(e.message=t.message),t.name&&(e.name=t.name),t.data&&(e.data=t.data),t.inner&&(e.inner=this.buildExceptionObject(t.inner)),e},t.prototype.log=function(t,e,o){var a,l,u=0;if(!this.appenders)return this;if(t>=this.level&&n(this)&&(o?(l=this.buildExceptionObject(o),l.logData=i(e)):l=e,a=s(l),r(this,a.finalString))){if(this.onceOnly)for(u=this.onceOnly.length-1;u>=0;){if(new RegExp(this.onceOnly[u]).test(a.finalString)){if(this.seenRegexes[u])return this;this.seenRegexes[u]=!0}u--}for(a.meta=a.meta||{},a.meta.loggerName=this.loggerName,u=this.appenders.length-1;u>=0;)this.appenders[u].log(m(t),a.msg,a.meta,function(){},t,a.finalString,this.loggerName),u--}return this},t.prototype.trace=function(t){return this.log(u(),t)},t.prototype.debug=function(t){return this.log(h(),t)},t.prototype.info=function(t){return this.log(c(),t)},t.prototype.warn=function(t){return this.log(p(),t)},t.prototype.error=function(t){return this.log(_(),t)},t.prototype.fatal=function(t){return this.log(d(),t)},t.prototype.fatalException=function(t,e){return this.log(d(),t,e)},t}();t.Logger=j,t.createAjaxAppender=g,t.createConsoleAppender=y;var T=new k("");"undefined"==typeof window&&(T=new M("")),t.__=new t.Logger(""),t.__.setOptions({level:t.getDebugLevel(),appenders:[T]})}(r||(r={}));var n;"undefined"!=typeof n&&(n.JL=r);var i;"function"==typeof i&&i.amd&&i("jsnlog",[],function(){return r}),"function"==typeof __jsnlog_configure&&__jsnlog_configure(r)},{}],"proj4/lib/Point":[function(t,e,n){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&"undefined"==typeof e){var o=t.split(",");this.x=parseFloat(o[0],10),this.y=parseFloat(o[1],10),this.z=parseFloat(o[2],10)||0}else this.x=t,this.y=e,this.z=n||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}var o=t("mgrs");r.fromMGRS=function(t){return new r(o.toPoint(t))},r.prototype.toMGRS=function(t){return o.forward([this.x,this.y],t)},e.exports=r},{mgrs:"proj4/node_modules/mgrs/mgrs"}],"proj4/lib/Proj":[function(t,e,n){function r(t,e){if(!(this instanceof r))return new r(t);e=e||function(t){if(t)throw t};var n=o(t);if("object"!=typeof n)return void e(t);var s=a(n),l=r.projections.get(s.projName);l?(i(this,s),i(this,l),this.init(),e(null,this)):e(t)}var o=t("./parseCode"),i=t("./extend"),s=t("./projections"),a=t("./deriveConstants");r.projections=s,r.projections.start(),e.exports=r},{"./deriveConstants":"proj4/lib/deriveConstants","./extend":"proj4/lib/extend","./parseCode":"proj4/lib/parseCode","./projections":"proj4/lib/projections"}],"proj4/lib/adjust_axis":[function(t,e,n){e.exports=function(t,e,n){var r,o,i,s=n.x,a=n.y,l=n.z||0;for(i=0;3>i;i++)if(!e||2!==i||void 0!==n.z)switch(0===i?(r=s,o="x"):1===i?(r=a,o="y"):(r=l,o="z"),t.axis[i]){case"e":n[o]=r;break;case"w":n[o]=-r;break;case"n":n[o]=r;break;case"s":n[o]=-r;break;case"u":void 0!==n[o]&&(n.z=r);break;case"d":void 0!==n[o]&&(n.z=-r);break;default:return null}return n}},{}],"proj4/lib/common/adjust_lat":[function(t,e,n){var r=Math.PI/2,o=t("./sign");e.exports=function(t){return Math.abs(t)<r?t:t-o(t)*Math.PI}},{"./sign":"proj4/lib/common/sign"}],"proj4/lib/common/adjust_lon":[function(t,e,n){var r=2*Math.PI,o=3.14159265359,i=t("./sign");e.exports=function(t){return Math.abs(t)<=o?t:t-i(t)*r}},{"./sign":"proj4/lib/common/sign"}],"proj4/lib/common/asinz":[function(t,e,n){e.exports=function(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}},{}],"proj4/lib/common/e0fn":[function(t,e,n){e.exports=function(t){return 1-.25*t*(1+t/16*(3+1.25*t))}},{}],"proj4/lib/common/e1fn":[function(t,e,n){e.exports=function(t){return.375*t*(1+.25*t*(1+.46875*t))}},{}],"proj4/lib/common/e2fn":[function(t,e,n){e.exports=function(t){return.05859375*t*t*(1+.75*t)}},{}],"proj4/lib/common/e3fn":[function(t,e,n){e.exports=function(t){return t*t*t*(35/3072)}},{}],"proj4/lib/common/gN":[function(t,e,n){e.exports=function(t,e,n){var r=e*n;return t/Math.sqrt(1-r*r)}},{}],"proj4/lib/common/imlfn":[function(t,e,n){e.exports=function(t,e,n,r,o){var i,s;i=t/e;for(var a=0;15>a;a++)if(s=(t-(e*i-n*Math.sin(2*i)+r*Math.sin(4*i)-o*Math.sin(6*i)))/(e-2*n*Math.cos(2*i)+4*r*Math.cos(4*i)-6*o*Math.cos(6*i)),i+=s,Math.abs(s)<=1e-10)return i;return NaN}},{}],"proj4/lib/common/iqsfnz":[function(t,e,n){var r=Math.PI/2;e.exports=function(t,e){var n=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-n)<1e-6)return 0>e?-1*r:r;for(var o,i,s,a,l=Math.asin(.5*e),u=0;30>u;u++)if(i=Math.sin(l),s=Math.cos(l),a=t*i,o=Math.pow(1-a*a,2)/(2*s)*(e/(1-t*t)-i/(1-a*a)+.5/t*Math.log((1-a)/(1+a))),l+=o,Math.abs(o)<=1e-10)return l;return NaN}},{}],"proj4/lib/common/mlfn":[function(t,e,n){e.exports=function(t,e,n,r,o){return t*o-e*Math.sin(2*o)+n*Math.sin(4*o)-r*Math.sin(6*o)}},{}],"proj4/lib/common/msfnz":[function(t,e,n){e.exports=function(t,e,n){var r=t*e;return n/Math.sqrt(1-r*r)}},{}],"proj4/lib/common/phi2z":[function(t,e,n){var r=Math.PI/2;e.exports=function(t,e){for(var n,o,i=.5*t,s=r-2*Math.atan(e),a=0;15>=a;a++)if(n=t*Math.sin(s),o=r-2*Math.atan(e*Math.pow((1-n)/(1+n),i))-s,s+=o,Math.abs(o)<=1e-10)return s;return-9999}},{}],"proj4/lib/common/pj_enfn":[function(t,e,n){var r=1,o=.25,i=.046875,s=.01953125,a=.01068115234375,l=.75,u=.46875,h=.013020833333333334,c=.007120768229166667,p=.3645833333333333,_=.005696614583333333,d=.3076171875;e.exports=function(t){var e=[];e[0]=r-t*(o+t*(i+t*(s+t*a))),e[1]=t*(l-t*(i+t*(s+t*a)));var n=t*t;return e[2]=n*(u-t*(h+t*c)),n*=t,e[3]=n*(p-t*_),e[4]=n*t*d,e}},{}],"proj4/lib/common/pj_inv_mlfn":[function(t,e,n){var r=t("./pj_mlfn"),o=1e-10,i=20;e.exports=function(t,e,n){for(var s=1/(1-e),a=t,l=i;l;--l){var u=Math.sin(a),h=1-e*u*u;if(h=(r(a,u,Math.cos(a),n)-t)*(h*Math.sqrt(h))*s,a-=h,Math.abs(h)<o)return a}return a}},{"./pj_mlfn":"proj4/lib/common/pj_mlfn"}],"proj4/lib/common/pj_mlfn":[function(t,e,n){e.exports=function(t,e,n,r){return n*=e,e*=e,r[0]*t-n*(r[1]+e*(r[2]+e*(r[3]+e*r[4])))}},{}],"proj4/lib/common/qsfnz":[function(t,e,n){e.exports=function(t,e){var n;return t>1e-7?(n=t*e,(1-t*t)*(e/(1-n*n)-.5/t*Math.log((1-n)/(1+n)))):2*e}},{}],"proj4/lib/common/sign":[function(t,e,n){e.exports=function(t){return 0>t?-1:1}},{}],"proj4/lib/common/srat":[function(t,e,n){e.exports=function(t,e){return Math.pow((1-t)/(1+t),e)}},{}],"proj4/lib/common/toPoint":[function(t,e,n){e.exports=function(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}},{}],"proj4/lib/common/tsfnz":[function(t,e,n){var r=Math.PI/2;e.exports=function(t,e,n){var o=t*n,i=.5*t;return o=Math.pow((1-o)/(1+o),i),Math.tan(.5*(r-e))/o}},{}],"proj4/lib/constants/Datum":[function(t,e,n){n.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},n.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},n.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},n.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},n.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},n.potsdam={towgs84:"606.0,23.0,413.0",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},n.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},n.hermannskogel={towgs84:"653.0,-212.0,449.0",ellipse:"bessel",datumName:"Hermannskogel"},n.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},n.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},n.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},n.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},n.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},n.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},n.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},n.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"}},{}],"proj4/lib/constants/Ellipsoid":[function(t,e,n){n.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},n.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},n.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},n.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},n.airy={a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},n.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},n.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},n.mod_airy={a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},n.andrae={a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},n.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},n.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},n.bessel={a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},n.bess_nam={a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},n.clrk66={a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},n.clrk80={a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},n.clrk58={a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},n.CPM={a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},n.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},n.engelis={a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},n.evrst30={a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},n.evrst48={a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},n.evrst56={a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},n.evrst69={a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},n.evrstSS={a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},n.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},n.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},n.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},n.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},n.hough={a:6378270,rf:297,ellipseName:"Hough"},n.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},n.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},n.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},n.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},n.new_intl={a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},n.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},n.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},n.SEasia={a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},n.walbeck={a:6376896,b:6355834.8467,ellipseName:"Walbeck"},n.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},n.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},n.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"},n.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"},n.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},{}],"proj4/lib/constants/PrimeMeridian":[function(t,e,n){n.greenwich=0,n.lisbon=-9.131906111111,n.paris=2.337229166667,n.bogota=-74.080916666667,n.madrid=-3.687938888889,n.rome=12.452333333333,n.bern=7.439583333333,n.jakarta=106.807719444444,n.ferro=-17.666666666667,n.brussels=4.367975,n.stockholm=18.058277777778,n.athens=23.7163375,n.oslo=10.722916666667},{}],"proj4/lib/constants/units":[function(t,e,n){n.ft={to_meter:.3048},n["us-ft"]={to_meter:1200/3937}},{}],"proj4/lib/core":[function(t,e,n){function r(t,e,n){var r;return Array.isArray(n)?(r=a(t,e,n),3===n.length?[r.x,r.y,r.z]:[r.x,r.y]):a(t,e,n)}function o(t){return t instanceof s?t:t.oProj?t.oProj:s(t)}function i(t,e,n){t=o(t);var i,s=!1;return"undefined"==typeof e?(e=t,t=l,s=!0):("undefined"!=typeof e.x||Array.isArray(e))&&(n=e,e=t,t=l,s=!0),e=o(e),n?r(t,e,n):(i={forward:function(n){return r(t,e,n)},inverse:function(n){return r(e,t,n)}},s&&(i.oProj=e),i)}var s=t("./Proj"),a=t("./transform"),l=s("WGS84");e.exports=i},{"./Proj":"proj4/lib/Proj","./transform":"proj4/lib/transform"}],"proj4/lib/datum":[function(t,e,n){var r=Math.PI/2,o=1,i=2,s=3,a=4,l=5,u=484813681109536e-20,h=1.0026,c=.3826834323650898,p=function(t){return this instanceof p?(this.datum_type=a,void(t&&(t.datumCode&&"none"===t.datumCode&&(this.datum_type=l),t.datum_params&&(this.datum_params=t.datum_params.map(parseFloat),(0!==this.datum_params[0]||0!==this.datum_params[1]||0!==this.datum_params[2])&&(this.datum_type=o),this.datum_params.length>3&&(0!==this.datum_params[3]||0!==this.datum_params[4]||0!==this.datum_params[5]||0!==this.datum_params[6])&&(this.datum_type=i,this.datum_params[3]*=u,this.datum_params[4]*=u,this.datum_params[5]*=u,this.datum_params[6]=this.datum_params[6]/1e6+1)),this.datum_type=t.grids?s:this.datum_type,this.a=t.a,this.b=t.b,this.es=t.es,this.ep2=t.ep2,this.datum_type===s&&(this.grids=t.grids)))):new p(t)};p.prototype={compare_datums:function(t){return this.datum_type!==t.datum_type?!1:this.a!==t.a||Math.abs(this.es-t.es)>5e-11?!1:this.datum_type===o?this.datum_params[0]===t.datum_params[0]&&this.datum_params[1]===t.datum_params[1]&&this.datum_params[2]===t.datum_params[2]:this.datum_type===i?this.datum_params[0]===t.datum_params[0]&&this.datum_params[1]===t.datum_params[1]&&this.datum_params[2]===t.datum_params[2]&&this.datum_params[3]===t.datum_params[3]&&this.datum_params[4]===t.datum_params[4]&&this.datum_params[5]===t.datum_params[5]&&this.datum_params[6]===t.datum_params[6]:this.datum_type===s||t.datum_type===s?this.nadgrids===t.nadgrids:!0},geodetic_to_geocentric:function(t){var e,n,o,i,s,a,l,u=t.x,h=t.y,c=t.z?t.z:0,p=0;if(-r>h&&h>-1.001*r)h=-r;else if(h>r&&1.001*r>h)h=r;else if(-r>h||h>r)return null;return u>Math.PI&&(u-=2*Math.PI),s=Math.sin(h),l=Math.cos(h),a=s*s,i=this.a/Math.sqrt(1-this.es*a),e=(i+c)*l*Math.cos(u),n=(i+c)*l*Math.sin(u),o=(i*(1-this.es)+c)*s,t.x=e,t.y=n,t.z=o,p},geocentric_to_geodetic:function(t){var e,n,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v=1e-12,b=v*v,x=30,w=t.x,k=t.y,M=t.z?t.z:0;if(d=!1,e=Math.sqrt(w*w+k*k),n=Math.sqrt(w*w+k*k+M*M),e/this.a<v){if(d=!0,m=0,n/this.a<v)return g=r,void(y=-this.b)}else m=Math.atan2(k,w);o=M/n,i=e/n,s=1/Math.sqrt(1-this.es*(2-this.es)*i*i),u=i*(1-this.es)*s,h=o*s,f=0;do f++,l=this.a/Math.sqrt(1-this.es*h*h),y=e*u+M*h-l*(1-this.es*h*h),a=this.es*l/(l+y),s=1/Math.sqrt(1-a*(2-a)*i*i),c=i*(1-a)*s,p=o*s,_=p*u-c*h,u=c,h=p;while(_*_>b&&x>f);return g=Math.atan(p/Math.abs(c)),t.x=m,t.y=g,t.z=y,t},geocentric_to_geodetic_noniter:function(t){var e,n,o,i,s,a,l,u,p,_,d,f,m,g,y,v,b,x=t.x,w=t.y,k=t.z?t.z:0;if(x=parseFloat(x),w=parseFloat(w),k=parseFloat(k),b=!1,0!==x)e=Math.atan2(w,x);else if(w>0)e=r;else if(0>w)e=-r;else if(b=!0,e=0,k>0)n=r;else{if(!(0>k))return n=r,void(o=-this.b);n=-r}return s=x*x+w*w,i=Math.sqrt(s),a=k*h,u=Math.sqrt(a*a+s),_=a/u,f=i/u,d=_*_*_,l=k+this.b*this.ep2*d,v=i-this.a*this.es*f*f*f,p=Math.sqrt(l*l+v*v),m=l/p,g=v/p,y=this.a/Math.sqrt(1-this.es*m*m),o=g>=c?i/g-y:-c>=g?i/-g-y:k/m+y*(this.es-1),b===!1&&(n=Math.atan(m/g)),t.x=e,t.y=n,t.z=o,t},geocentric_to_wgs84:function(t){if(this.datum_type===o)t.x+=this.datum_params[0],t.y+=this.datum_params[1],t.z+=this.datum_params[2];else if(this.datum_type===i){var e=this.datum_params[0],n=this.datum_params[1],r=this.datum_params[2],s=this.datum_params[3],a=this.datum_params[4],l=this.datum_params[5],u=this.datum_params[6],h=u*(t.x-l*t.y+a*t.z)+e,c=u*(l*t.x+t.y-s*t.z)+n,p=u*(-a*t.x+s*t.y+t.z)+r;t.x=h,t.y=c,t.z=p}},geocentric_from_wgs84:function(t){if(this.datum_type===o)t.x-=this.datum_params[0],t.y-=this.datum_params[1],t.z-=this.datum_params[2];else if(this.datum_type===i){var e=this.datum_params[0],n=this.datum_params[1],r=this.datum_params[2],s=this.datum_params[3],a=this.datum_params[4],l=this.datum_params[5],u=this.datum_params[6],h=(t.x-e)/u,c=(t.y-n)/u,p=(t.z-r)/u;t.x=h+l*c-a*p,t.y=-l*h+c+s*p,t.z=a*h-s*c+p}}},e.exports=p},{}],"proj4/lib/datum_transform":[function(t,e,n){var r=1,o=2,i=3,s=5,a=6378137,l=.006694379990141316;e.exports=function(t,e,n){function u(t){return t===r||t===o}var h,c,p;if(t.compare_datums(e))return n;if(t.datum_type===s||e.datum_type===s)return n;var _=t.a,d=t.es,f=e.a,m=e.es,g=t.datum_type;if(g===i)if(0===this.apply_gridshift(t,0,n))t.a=a,t.es=l;else{if(!t.datum_params)return t.a=_,t.es=t.es,n;for(h=1,c=0,p=t.datum_params.length;p>c;c++)h*=t.datum_params[c];if(0===h)return t.a=_,t.es=t.es,n;g=t.datum_params.length>3?o:r}return e.datum_type===i&&(e.a=a,e.es=l),(t.es!==e.es||t.a!==e.a||u(g)||u(e.datum_type))&&(t.geodetic_to_geocentric(n),u(t.datum_type)&&t.geocentric_to_wgs84(n),u(e.datum_type)&&e.geocentric_from_wgs84(n),e.geocentric_to_geodetic(n)),e.datum_type===i&&this.apply_gridshift(e,1,n),t.a=_,t.es=d,e.a=f,e.es=m,n}},{}],"proj4/lib/defs":[function(t,e,n){function r(t){var e=this;if(2===arguments.length){var n=arguments[1];"string"==typeof n?"+"===n.charAt(0)?r[t]=i(arguments[1]):r[t]=s(arguments[1]):r[t]=n}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){Array.isArray(t)?r.apply(e,t):r(t)});if("string"==typeof t){if(t in r)return r[t]}else"EPSG"in t?r["EPSG:"+t.EPSG]=t:"ESRI"in t?r["ESRI:"+t.ESRI]=t:"IAU2000"in t?r["IAU2000:"+t.IAU2000]=t:console.log(t);return}}var o=t("./global"),i=t("./projString"),s=t("./wkt");o(r),e.exports=r},{"./global":"proj4/lib/global","./projString":"proj4/lib/projString","./wkt":"proj4/lib/wkt"}],"proj4/lib/deriveConstants":[function(t,e,n){var r=t("./constants/Datum"),o=t("./constants/Ellipsoid"),i=t("./extend"),s=t("./datum"),a=1e-10,l=.16666666666666666,u=.04722222222222222,h=.022156084656084655;e.exports=function(t){if(t.datumCode&&"none"!==t.datumCode){var e=r[t.datumCode];e&&(t.datum_params=e.towgs84?e.towgs84.split(","):null,t.ellps=e.ellipse,t.datumName=e.datumName?e.datumName:t.datumCode)}if(!t.a){var n=o[t.ellps]?o[t.ellps]:o.WGS84;i(t,n)}return t.rf&&!t.b&&(t.b=(1-1/t.rf)*t.a),(0===t.rf||Math.abs(t.a-t.b)<a)&&(t.sphere=!0,t.b=t.a),t.a2=t.a*t.a,t.b2=t.b*t.b,t.es=(t.a2-t.b2)/t.a2,t.e=Math.sqrt(t.es),t.R_A&&(t.a*=1-t.es*(l+t.es*(u+t.es*h)),t.a2=t.a*t.a,t.b2=t.b*t.b,t.es=0),t.ep2=(t.a2-t.b2)/t.b2,t.k0||(t.k0=1),t.axis||(t.axis="enu"),t.datum||(t.datum=s(t)),t}},{"./constants/Datum":"proj4/lib/constants/Datum","./constants/Ellipsoid":"proj4/lib/constants/Ellipsoid","./datum":"proj4/lib/datum","./extend":"proj4/lib/extend"}],"proj4/lib/extend":[function(t,e,n){e.exports=function(t,e){t=t||{};var n,r;if(!e)return t;for(r in e)n=e[r],void 0!==n&&(t[r]=n);return t}},{}],"proj4/lib/global":[function(t,e,n){e.exports=function(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}},{}],"proj4/lib/includedProjections":[function(t,e,n){var r=[t("./projections/tmerc"),t("./projections/utm"),t("./projections/sterea"),t("./projections/stere"),t("./projections/somerc"),t("./projections/omerc"),t("./projections/lcc"),t("./projections/krovak"),t("./projections/cass"),t("./projections/laea"),t("./projections/aea"),t("./projections/gnom"),t("./projections/cea"),t("./projections/eqc"),t("./projections/poly"),t("./projections/nzmg"),t("./projections/mill"),t("./projections/sinu"),t("./projections/moll"),t("./projections/eqdc"),t("./projections/vandg"),t("./projections/aeqd")];e.exports=function(t){r.forEach(function(e){t.Proj.projections.add(e)})}},{"./projections/aea":"proj4/lib/projections/aea",
63 "./projections/aeqd":"proj4/lib/projections/aeqd","./projections/cass":"proj4/lib/projections/cass","./projections/cea":"proj4/lib/projections/cea","./projections/eqc":"proj4/lib/projections/eqc","./projections/eqdc":"proj4/lib/projections/eqdc","./projections/gnom":"proj4/lib/projections/gnom","./projections/krovak":"proj4/lib/projections/krovak","./projections/laea":"proj4/lib/projections/laea","./projections/lcc":"proj4/lib/projections/lcc","./projections/mill":"proj4/lib/projections/mill","./projections/moll":"proj4/lib/projections/moll","./projections/nzmg":"proj4/lib/projections/nzmg","./projections/omerc":"proj4/lib/projections/omerc","./projections/poly":"proj4/lib/projections/poly","./projections/sinu":"proj4/lib/projections/sinu","./projections/somerc":"proj4/lib/projections/somerc","./projections/stere":"proj4/lib/projections/stere","./projections/sterea":"proj4/lib/projections/sterea","./projections/tmerc":"proj4/lib/projections/tmerc","./projections/utm":"proj4/lib/projections/utm","./projections/vandg":"proj4/lib/projections/vandg"}],proj4:[function(t,e,n){var r=t("./core");r.defaultDatum="WGS84",r.Proj=t("./Proj"),r.WGS84=new r.Proj("WGS84"),r.Point=t("./Point"),r.toPoint=t("./common/toPoint"),r.defs=t("./defs"),r.transform=t("./transform"),r.mgrs=t("mgrs"),r.version=t("../package.json").version,t("./includedProjections")(r),e.exports=r},{"../package.json":"proj4/package.json","./Point":"proj4/lib/Point","./Proj":"proj4/lib/Proj","./common/toPoint":"proj4/lib/common/toPoint","./core":"proj4/lib/core","./defs":"proj4/lib/defs","./includedProjections":"proj4/lib/includedProjections","./transform":"proj4/lib/transform",mgrs:"proj4/node_modules/mgrs/mgrs"}],"proj4/lib/parseCode":[function(t,e,n){function r(t){return"string"==typeof t}function o(t){return t in l}function i(t){var e=["GEOGCS","GEOCCS","PROJCS","LOCAL_CS"];return e.reduce(function(e,n){return e+1+t.indexOf(n)},0)}function s(t){return"+"===t[0]}function a(t){return r(t)?o(t)?l[t]:i(t)?u(t):s(t)?h(t):void 0:t}var l=t("./defs"),u=t("./wkt"),h=t("./projString");e.exports=a},{"./defs":"proj4/lib/defs","./projString":"proj4/lib/projString","./wkt":"proj4/lib/wkt"}],"proj4/lib/projString":[function(t,e,n){var r=.017453292519943295,o=t("./constants/PrimeMeridian"),i=t("./constants/units");e.exports=function(t){var e={},n={};t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).forEach(function(t){var e=t.split("=");e.push(!0),n[e[0].toLowerCase()]=e[1]});var s,a,l,u={proj:"projName",datum:"datumCode",rf:function(t){e.rf=parseFloat(t)},lat_0:function(t){e.lat0=t*r},lat_1:function(t){e.lat1=t*r},lat_2:function(t){e.lat2=t*r},lat_ts:function(t){e.lat_ts=t*r},lon_0:function(t){e.long0=t*r},lon_1:function(t){e.long1=t*r},lon_2:function(t){e.long2=t*r},alpha:function(t){e.alpha=parseFloat(t)*r},lonc:function(t){e.longc=t*r},x_0:function(t){e.x0=parseFloat(t)},y_0:function(t){e.y0=parseFloat(t)},k_0:function(t){e.k0=parseFloat(t)},k:function(t){e.k0=parseFloat(t)},a:function(t){e.a=parseFloat(t)},b:function(t){e.b=parseFloat(t)},r_a:function(){e.R_A=!0},zone:function(t){e.zone=parseInt(t,10)},south:function(){e.utmSouth=!0},towgs84:function(t){e.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){e.to_meter=parseFloat(t)},units:function(t){e.units=t,i[t]&&(e.to_meter=i[t].to_meter)},from_greenwich:function(t){e.from_greenwich=t*r},pm:function(t){e.from_greenwich=(o[t]?o[t]:parseFloat(t))*r},nadgrids:function(t){"@null"===t?e.datumCode="none":e.nadgrids=t},axis:function(t){var n="ewnsud";3===t.length&&-1!==n.indexOf(t.substr(0,1))&&-1!==n.indexOf(t.substr(1,1))&&-1!==n.indexOf(t.substr(2,1))&&(e.axis=t)}};for(s in n)a=n[s],s in u?(l=u[s],"function"==typeof l?l(a):e[l]=a):e[s]=a;return"string"==typeof e.datumCode&&"WGS84"!==e.datumCode&&(e.datumCode=e.datumCode.toLowerCase()),e}},{"./constants/PrimeMeridian":"proj4/lib/constants/PrimeMeridian","./constants/units":"proj4/lib/constants/units"}],"proj4/lib/projections":[function(t,e,n){function r(t,e){var n=s.length;return t.names?(s[n]=t,t.names.forEach(function(t){i[t.toLowerCase()]=n}),this):(console.log(e),!0)}var o=[t("./projections/merc"),t("./projections/longlat")],i={},s=[];n.add=r,n.get=function(t){if(!t)return!1;var e=t.toLowerCase();return"undefined"!=typeof i[e]&&s[i[e]]?s[i[e]]:void 0},n.start=function(){o.forEach(r)}},{"./projections/longlat":"proj4/lib/projections/longlat","./projections/merc":"proj4/lib/projections/merc"}],"proj4/lib/projections/aea":[function(t,e,n){var r=1e-10,o=t("../common/msfnz"),i=t("../common/qsfnz"),s=t("../common/adjust_lon"),a=t("../common/asinz");n.init=function(){Math.abs(this.lat1+this.lat2)<r||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=o(this.e3,this.sin_po,this.cos_po),this.qs1=i(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=o(this.e3,this.sin_po,this.cos_po),this.qs2=i(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=i(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>r?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},n.forward=function(t){var e=t.x,n=t.y;this.sin_phi=Math.sin(n),this.cos_phi=Math.cos(n);var r=i(this.e3,this.sin_phi,this.cos_phi),o=this.a*Math.sqrt(this.c-this.ns0*r)/this.ns0,a=this.ns0*s(e-this.long0),l=o*Math.sin(a)+this.x0,u=this.rh-o*Math.cos(a)+this.y0;return t.x=l,t.y=u,t},n.inverse=function(t){var e,n,r,o,i,a;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),r=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),r=-1),o=0,0!==e&&(o=Math.atan2(r*t.x,r*t.y)),r=e*this.ns0/this.a,this.sphere?a=Math.asin((this.c-r*r)/(2*this.ns0)):(n=(this.c-r*r)/this.ns0,a=this.phi1z(this.e3,n)),i=s(o/this.ns0+this.long0),t.x=i,t.y=a,t},n.phi1z=function(t,e){var n,o,i,s,l,u=a(.5*e);if(r>t)return u;for(var h=t*t,c=1;25>=c;c++)if(n=Math.sin(u),o=Math.cos(u),i=t*n,s=1-i*i,l=.5*s*s/o*(e/(1-h)-n/s+.5/t*Math.log((1-i)/(1+i))),u+=l,Math.abs(l)<=1e-7)return u;return null},n.names=["Albers_Conic_Equal_Area","Albers","aea"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/asinz":"proj4/lib/common/asinz","../common/msfnz":"proj4/lib/common/msfnz","../common/qsfnz":"proj4/lib/common/qsfnz"}],"proj4/lib/projections/aeqd":[function(t,e,n){var r=t("../common/adjust_lon"),o=Math.PI/2,i=1e-10,s=t("../common/mlfn"),a=t("../common/e0fn"),l=t("../common/e1fn"),u=t("../common/e2fn"),h=t("../common/e3fn"),c=t("../common/gN"),p=t("../common/asinz"),_=t("../common/imlfn");n.init=function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)},n.forward=function(t){var e,n,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O=t.x,N=t.y,q=Math.sin(t.y),F=Math.cos(t.y),D=r(O-this.long0);return this.sphere?Math.abs(this.sin_p12-1)<=i?(t.x=this.x0+this.a*(o-N)*Math.sin(D),t.y=this.y0-this.a*(o-N)*Math.cos(D),t):Math.abs(this.sin_p12+1)<=i?(t.x=this.x0+this.a*(o+N)*Math.sin(D),t.y=this.y0+this.a*(o+N)*Math.cos(D),t):(z=this.sin_p12*q+this.cos_p12*F*Math.cos(D),j=Math.acos(z),T=j/Math.sin(j),t.x=this.x0+this.a*T*F*Math.sin(D),t.y=this.y0+this.a*T*(this.cos_p12*q-this.sin_p12*F*Math.cos(D)),t):(e=a(this.es),n=l(this.es),p=u(this.es),_=h(this.es),Math.abs(this.sin_p12-1)<=i?(d=this.a*s(e,n,p,_,o),f=this.a*s(e,n,p,_,N),t.x=this.x0+(d-f)*Math.sin(D),t.y=this.y0-(d-f)*Math.cos(D),t):Math.abs(this.sin_p12+1)<=i?(d=this.a*s(e,n,p,_,o),f=this.a*s(e,n,p,_,N),t.x=this.x0+(d+f)*Math.sin(D),t.y=this.y0+(d+f)*Math.cos(D),t):(m=q/F,g=c(this.a,this.e,this.sin_p12),y=c(this.a,this.e,q),v=Math.atan((1-this.es)*m+this.es*g*this.sin_p12/(y*F)),b=Math.atan2(Math.sin(D),this.cos_p12*Math.tan(v)-this.sin_p12*Math.cos(D)),E=0===b?Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):Math.abs(Math.abs(b)-Math.PI)<=i?-Math.asin(this.cos_p12*Math.sin(v)-this.sin_p12*Math.cos(v)):Math.asin(Math.sin(D)*Math.cos(v)/Math.sin(b)),x=this.e*this.sin_p12/Math.sqrt(1-this.es),w=this.e*this.cos_p12*Math.cos(b)/Math.sqrt(1-this.es),k=x*w,M=w*w,P=E*E,S=P*E,C=S*E,A=C*E,j=g*E*(1-P*M*(1-M)/6+S/8*k*(1-2*M)+C/120*(M*(4-7*M)-3*x*x*(1-7*M))-A/48*k),t.x=this.x0+j*Math.sin(b),t.y=this.y0+j*Math.cos(b),t))},n.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,n,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E,P,S,C,A,O,N;if(this.sphere){if(e=Math.sqrt(t.x*t.x+t.y*t.y),e>2*o*this.a)return;return n=e/this.a,d=Math.sin(n),f=Math.cos(n),m=this.long0,Math.abs(e)<=i?g=this.lat0:(g=p(f*this.sin_p12+t.y*d*this.cos_p12/e),y=Math.abs(this.lat0)-o,m=r(Math.abs(y)<=i?this.lat0>=0?this.long0+Math.atan2(t.x,-t.y):this.long0-Math.atan2(-t.x,t.y):this.long0+Math.atan2(t.x*d,e*this.cos_p12*f-t.y*this.sin_p12*d))),t.x=m,t.y=g,t}return v=a(this.es),b=l(this.es),x=u(this.es),w=h(this.es),Math.abs(this.sin_p12-1)<=i?(k=this.a*s(v,b,x,w,o),e=Math.sqrt(t.x*t.x+t.y*t.y),M=k-e,g=_(M/this.a,v,b,x,w),m=r(this.long0+Math.atan2(t.x,-1*t.y)),t.x=m,t.y=g,t):Math.abs(this.sin_p12+1)<=i?(k=this.a*s(v,b,x,w,o),e=Math.sqrt(t.x*t.x+t.y*t.y),M=e-k,g=_(M/this.a,v,b,x,w),m=r(this.long0+Math.atan2(t.x,t.y)),t.x=m,t.y=g,t):(e=Math.sqrt(t.x*t.x+t.y*t.y),z=Math.atan2(t.x,t.y),j=c(this.a,this.e,this.sin_p12),E=Math.cos(z),P=this.e*this.cos_p12*E,S=-P*P/(1-this.es),C=3*this.es*(1-S)*this.sin_p12*this.cos_p12*E/(1-this.es),A=e/j,O=A-S*(1+S)*Math.pow(A,3)/6-C*(1+3*S)*Math.pow(A,4)/24,N=1-S*O*O/2-A*O*O*O/6,T=Math.asin(this.sin_p12*Math.cos(O)+this.cos_p12*Math.sin(O)*E),m=r(this.long0+Math.asin(Math.sin(z)*Math.sin(O)/Math.cos(T))),g=Math.atan((1-this.es*N*this.sin_p12/Math.sin(T))*Math.tan(T)/(1-this.es)),t.x=m,t.y=g,t)},n.names=["Azimuthal_Equidistant","aeqd"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/asinz":"proj4/lib/common/asinz","../common/e0fn":"proj4/lib/common/e0fn","../common/e1fn":"proj4/lib/common/e1fn","../common/e2fn":"proj4/lib/common/e2fn","../common/e3fn":"proj4/lib/common/e3fn","../common/gN":"proj4/lib/common/gN","../common/imlfn":"proj4/lib/common/imlfn","../common/mlfn":"proj4/lib/common/mlfn"}],"proj4/lib/projections/cass":[function(t,e,n){var r=t("../common/mlfn"),o=t("../common/e0fn"),i=t("../common/e1fn"),s=t("../common/e2fn"),a=t("../common/e3fn"),l=t("../common/gN"),u=t("../common/adjust_lon"),h=t("../common/adjust_lat"),c=t("../common/imlfn"),p=Math.PI/2,_=1e-10;n.init=function(){this.sphere||(this.e0=o(this.es),this.e1=i(this.es),this.e2=s(this.es),this.e3=a(this.es),this.ml0=this.a*r(this.e0,this.e1,this.e2,this.e3,this.lat0))},n.forward=function(t){var e,n,o=t.x,i=t.y;if(o=u(o-this.long0),this.sphere)e=this.a*Math.asin(Math.cos(i)*Math.sin(o)),n=this.a*(Math.atan2(Math.tan(i),Math.cos(o))-this.lat0);else{var s=Math.sin(i),a=Math.cos(i),h=l(this.a,this.e,s),c=Math.tan(i)*Math.tan(i),p=o*Math.cos(i),_=p*p,d=this.es*a*a/(1-this.es),f=this.a*r(this.e0,this.e1,this.e2,this.e3,i);e=h*p*(1-_*c*(1/6-(8-c+8*d)*_/120)),n=f-this.ml0+h*s/a*_*(.5+(5-c+6*d)*_/24)}return t.x=e+this.x0,t.y=n+this.y0,t},n.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,n,r=t.x/this.a,o=t.y/this.a;if(this.sphere){var i=o+this.lat0;e=Math.asin(Math.sin(i)*Math.cos(r)),n=Math.atan2(Math.tan(r),Math.cos(i))}else{var s=this.ml0/this.a+o,a=c(s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(a)-p)<=_)return t.x=this.long0,t.y=p,0>o&&(t.y*=-1),t;var d=l(this.a,this.e,Math.sin(a)),f=d*d*d/this.a/this.a*(1-this.es),m=Math.pow(Math.tan(a),2),g=r*this.a/d,y=g*g;e=a-d*Math.tan(a)/f*g*g*(.5-(1+3*m)*g*g/24),n=g*(1-y*(m/3+(1+3*m)*m*y/15))/Math.cos(a)}return t.x=u(n+this.long0),t.y=h(e),t},n.names=["Cassini","Cassini_Soldner","cass"]},{"../common/adjust_lat":"proj4/lib/common/adjust_lat","../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/e0fn":"proj4/lib/common/e0fn","../common/e1fn":"proj4/lib/common/e1fn","../common/e2fn":"proj4/lib/common/e2fn","../common/e3fn":"proj4/lib/common/e3fn","../common/gN":"proj4/lib/common/gN","../common/imlfn":"proj4/lib/common/imlfn","../common/mlfn":"proj4/lib/common/mlfn"}],"proj4/lib/projections/cea":[function(t,e,n){var r=t("../common/adjust_lon"),o=t("../common/qsfnz"),i=t("../common/msfnz"),s=t("../common/iqsfnz");n.init=function(){this.sphere||(this.k0=i(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},n.forward=function(t){var e,n,i=t.x,s=t.y,a=r(i-this.long0);if(this.sphere)e=this.x0+this.a*a*Math.cos(this.lat_ts),n=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts);else{var l=o(this.e,Math.sin(s));e=this.x0+this.a*this.k0*a,n=this.y0+this.a*l*.5/this.k0}return t.x=e,t.y=n,t},n.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,n;return this.sphere?(e=r(this.long0+t.x/this.a/Math.cos(this.lat_ts)),n=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(n=s(this.e,2*t.y*this.k0/this.a),e=r(this.long0+t.x/(this.a*this.k0))),t.x=e,t.y=n,t},n.names=["cea"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/iqsfnz":"proj4/lib/common/iqsfnz","../common/msfnz":"proj4/lib/common/msfnz","../common/qsfnz":"proj4/lib/common/qsfnz"}],"proj4/lib/projections/eqc":[function(t,e,n){var r=t("../common/adjust_lon"),o=t("../common/adjust_lat");n.init=function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},n.forward=function(t){var e=t.x,n=t.y,i=r(e-this.long0),s=o(n-this.lat0);return t.x=this.x0+this.a*i*this.rc,t.y=this.y0+this.a*s,t},n.inverse=function(t){var e=t.x,n=t.y;return t.x=r(this.long0+(e-this.x0)/(this.a*this.rc)),t.y=o(this.lat0+(n-this.y0)/this.a),t},n.names=["Equirectangular","Equidistant_Cylindrical","eqc"]},{"../common/adjust_lat":"proj4/lib/common/adjust_lat","../common/adjust_lon":"proj4/lib/common/adjust_lon"}],"proj4/lib/projections/eqdc":[function(t,e,n){var r=t("../common/e0fn"),o=t("../common/e1fn"),i=t("../common/e2fn"),s=t("../common/e3fn"),a=t("../common/msfnz"),l=t("../common/mlfn"),u=t("../common/adjust_lon"),h=t("../common/adjust_lat"),c=t("../common/imlfn"),p=1e-10;n.init=function(){Math.abs(this.lat1+this.lat2)<p||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=r(this.es),this.e1=o(this.es),this.e2=i(this.es),this.e3=s(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=a(this.e,this.sinphi,this.cosphi),this.ml1=l(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<p?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=a(this.e,this.sinphi,this.cosphi),this.ml2=l(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=l(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},n.forward=function(t){var e,n=t.x,r=t.y;if(this.sphere)e=this.a*(this.g-r);else{var o=l(this.e0,this.e1,this.e2,this.e3,r);e=this.a*(this.g-o)}var i=this.ns*u(n-this.long0),s=this.x0+e*Math.sin(i),a=this.y0+this.rh-e*Math.cos(i);return t.x=s,t.y=a,t},n.inverse=function(t){t.x-=this.x0,t.y=this.rh-t.y+this.y0;var e,n,r,o;this.ns>=0?(n=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(n=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var i=0;if(0!==n&&(i=Math.atan2(e*t.x,e*t.y)),this.sphere)return o=u(this.long0+i/this.ns),r=h(this.g-n/this.a),t.x=o,t.y=r,t;var s=this.g-n/this.a;return r=c(s,this.e0,this.e1,this.e2,this.e3),o=u(this.long0+i/this.ns),t.x=o,t.y=r,t},n.names=["Equidistant_Conic","eqdc"]},{"../common/adjust_lat":"proj4/lib/common/adjust_lat","../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/e0fn":"proj4/lib/common/e0fn","../common/e1fn":"proj4/lib/common/e1fn","../common/e2fn":"proj4/lib/common/e2fn","../common/e3fn":"proj4/lib/common/e3fn","../common/imlfn":"proj4/lib/common/imlfn","../common/mlfn":"proj4/lib/common/mlfn","../common/msfnz":"proj4/lib/common/msfnz"}],"proj4/lib/projections/gauss":[function(t,e,n){var r=Math.PI/4,o=t("../common/srat"),i=Math.PI/2,s=20;n.init=function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+r)/(Math.pow(Math.tan(.5*this.lat0+r),this.C)*o(this.e*t,this.ratexp))},n.forward=function(t){var e=t.x,n=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*n+r),this.C)*o(this.e*Math.sin(n),this.ratexp))-i,t.x=this.C*e,t},n.inverse=function(t){for(var e=1e-14,n=t.x/this.C,a=t.y,l=Math.pow(Math.tan(.5*a+r)/this.K,1/this.C),u=s;u>0&&(a=2*Math.atan(l*o(this.e*Math.sin(t.y),-.5*this.e))-i,!(Math.abs(a-t.y)<e));--u)t.y=a;return u?(t.x=n,t.y=a,t):null},n.names=["gauss"]},{"../common/srat":"proj4/lib/common/srat"}],"proj4/lib/projections/gnom":[function(t,e,n){var r=t("../common/adjust_lon"),o=1e-10,i=t("../common/asinz");n.init=function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},n.forward=function(t){var e,n,i,s,a,l,u,h,c=t.x,p=t.y;return i=r(c-this.long0),e=Math.sin(p),n=Math.cos(p),s=Math.cos(i),l=this.sin_p14*e+this.cos_p14*n*s,a=1,l>0||Math.abs(l)<=o?(u=this.x0+this.a*a*n*Math.sin(i)/l,h=this.y0+this.a*a*(this.cos_p14*e-this.sin_p14*n*s)/l):(u=this.x0+this.infinity_dist*n*Math.sin(i),h=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*n*s)),t.x=u,t.y=h,t},n.inverse=function(t){var e,n,o,s,a,l;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(s=Math.atan2(e,this.rc),n=Math.sin(s),o=Math.cos(s),l=i(o*this.sin_p14+t.y*n*this.cos_p14/e),a=Math.atan2(t.x*n,e*this.cos_p14*o-t.y*this.sin_p14*n),a=r(this.long0+a)):(l=this.phic0,a=0),t.x=a,t.y=l,t},n.names=["gnom"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/asinz":"proj4/lib/common/asinz"}],"proj4/lib/projections/krovak":[function(t,e,n){var r=t("../common/adjust_lon");n.init=function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},n.forward=function(t){var e,n,o,i,s,a,l,u=t.x,h=t.y,c=r(u-this.long0);return e=Math.pow((1+this.e*Math.sin(h))/(1-this.e*Math.sin(h)),this.alfa*this.e/2),n=2*(Math.atan(this.k*Math.pow(Math.tan(h/2+this.s45),this.alfa)/e)-this.s45),o=-c*this.alfa,i=Math.asin(Math.cos(this.ad)*Math.sin(n)+Math.sin(this.ad)*Math.cos(n)*Math.cos(o)),s=Math.asin(Math.cos(n)*Math.sin(o)/Math.cos(i)),a=this.n*s,l=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(i/2+this.s45),this.n),t.y=l*Math.cos(a)/1,t.x=l*Math.sin(a)/1,this.czech||(t.y*=-1,t.x*=-1),t},n.inverse=function(t){var e,n,r,o,i,s,a,l,u=t.x;t.x=t.y,t.y=u,this.czech||(t.y*=-1,t.x*=-1),s=Math.sqrt(t.x*t.x+t.y*t.y),i=Math.atan2(t.y,t.x),o=i/Math.sin(this.s0),r=2*(Math.atan(Math.pow(this.ro0/s,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(r)-Math.sin(this.ad)*Math.cos(r)*Math.cos(o)),n=Math.asin(Math.cos(r)*Math.sin(o)/Math.cos(e)),t.x=this.long0-n/this.alfa,a=e,l=0;var h=0;do t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(a))/(1-this.e*Math.sin(a)),this.e/2))-this.s45),Math.abs(a-t.y)<1e-10&&(l=1),a=t.y,h+=1;while(0===l&&15>h);return h>=15?null:t},n.names=["Krovak","krovak"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon"}],"proj4/lib/projections/laea":[function(t,e,n){var r=Math.PI/2,o=Math.PI/4,i=1e-10,s=t("../common/qsfnz"),a=t("../common/adjust_lon");n.S_POLE=1,n.N_POLE=2,n.EQUIT=3,n.OBLIQ=4,n.init=function(){var t=Math.abs(this.lat0);if(Math.abs(t-r)<i?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(t)<i?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var e;switch(this.qp=s(this.e,1),this.mmf=.5/(1-this.es),this.apa=this.authset(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),e=Math.sin(this.lat0),this.sinb1=s(this.e,e)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*e*e)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},n.forward=function(t){var e,n,l,u,h,c,p,_,d,f,m=t.x,g=t.y;if(m=a(m-this.long0),this.sphere){if(h=Math.sin(g),f=Math.cos(g),l=Math.cos(m),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(n=this.mode===this.EQUIT?1+f*l:1+this.sinph0*h+this.cosph0*f*l,i>=n)return null;n=Math.sqrt(2/n),e=n*f*Math.sin(m),n*=this.mode===this.EQUIT?h:this.cosph0*h-this.sinph0*f*l}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(l=-l),Math.abs(g+this.phi0)<i)return null;n=o-.5*g,n=2*(this.mode===this.S_POLE?Math.cos(n):Math.sin(n)),e=n*Math.sin(m),n*=l}}else{switch(p=0,_=0,d=0,l=Math.cos(m),u=Math.sin(m),h=Math.sin(g),c=s(this.e,h),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(p=c/this.qp,_=Math.sqrt(1-p*p)),this.mode){case this.OBLIQ:d=1+this.sinb1*p+this.cosb1*_*l;break;case this.EQUIT:d=1+_*l;break;case this.N_POLE:d=r+g,c=this.qp-c;break;case this.S_POLE:d=g-r,c=this.qp+c}if(Math.abs(d)<i)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:d=Math.sqrt(2/d),n=this.mode===this.OBLIQ?this.ymf*d*(this.cosb1*p-this.sinb1*_*l):(d=Math.sqrt(2/(1+_*l)))*p*this.ymf,e=this.xmf*d*_*u;break;case this.N_POLE:case this.S_POLE:c>=0?(e=(d=Math.sqrt(c))*u,n=l*(this.mode===this.S_POLE?d:-d)):e=n=0}}return t.x=this.a*e+this.x0,t.y=this.a*n+this.y0,t},n.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,n,o,s,l,u,h,c=t.x/this.a,p=t.y/this.a;if(this.sphere){var _,d=0,f=0;if(_=Math.sqrt(c*c+p*p),n=.5*_,n>1)return null;switch(n=2*Math.asin(n),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(f=Math.sin(n),d=Math.cos(n)),this.mode){case this.EQUIT:n=Math.abs(_)<=i?0:Math.asin(p*f/_),c*=f,p=d*_;break;case this.OBLIQ:n=Math.abs(_)<=i?this.phi0:Math.asin(d*this.sinph0+p*f*this.cosph0/_),c*=f*this.cosph0,p=(d-Math.sin(n)*this.sinph0)*_;break;case this.N_POLE:p=-p,n=r-n;break;case this.S_POLE:n-=r}e=0!==p||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(c,p):0}else{if(h=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,p*=this.dd,u=Math.sqrt(c*c+p*p),i>u)return t.x=0,t.y=this.phi0,t;s=2*Math.asin(.5*u/this.rq),o=Math.cos(s),c*=s=Math.sin(s),this.mode===this.OBLIQ?(h=o*this.sinb1+p*s*this.cosb1/u,l=this.qp*h,p=u*this.cosb1*o-p*this.sinb1*s):(h=p*s/u,l=this.qp*h,p=u*o)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),l=c*c+p*p,!l)return t.x=0,t.y=this.phi0,t;h=1-l/this.qp,this.mode===this.S_POLE&&(h=-h)}e=Math.atan2(c,p),n=this.authlat(Math.asin(h),this.apa)}return t.x=a(this.long0+e),t.y=n,t},n.P00=.3333333333333333,n.P01=.17222222222222222,n.P02=.10257936507936508,n.P10=.06388888888888888,n.P11=.0664021164021164,n.P20=.016415012942191543,n.authset=function(t){var e,n=[];return n[0]=t*this.P00,e=t*t,n[0]+=e*this.P01,n[1]=e*this.P10,e*=t,n[0]+=e*this.P02,n[1]+=e*this.P11,n[2]=e*this.P20,n},n.authlat=function(t,e){var n=t+t;return t+e[0]*Math.sin(n)+e[1]*Math.sin(n+n)+e[2]*Math.sin(n+n+n)},n.names=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/qsfnz":"proj4/lib/common/qsfnz"}],"proj4/lib/projections/lcc":[function(t,e,n){var r=1e-10,o=t("../common/msfnz"),i=t("../common/tsfnz"),s=Math.PI/2,a=t("../common/sign"),l=t("../common/adjust_lon"),u=t("../common/phi2z");n.init=function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<r)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),n=Math.cos(this.lat1),s=o(this.e,e,n),a=i(this.e,this.lat1,e),l=Math.sin(this.lat2),u=Math.cos(this.lat2),h=o(this.e,l,u),c=i(this.e,this.lat2,l),p=i(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>r?this.ns=Math.log(s/h)/Math.log(a/c):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=s/(this.ns*Math.pow(a,this.ns)),this.rh=this.a*this.f0*Math.pow(p,this.ns),this.title||(this.title="Lambert Conformal Conic")}},n.forward=function(t){var e=t.x,n=t.y;Math.abs(2*Math.abs(n)-Math.PI)<=r&&(n=a(n)*(s-2*r));var o,u,h=Math.abs(Math.abs(n)-s);if(h>r)o=i(this.e,n,Math.sin(n)),u=this.a*this.f0*Math.pow(o,this.ns);else{if(h=n*this.ns,0>=h)return null;u=0}var c=this.ns*l(e-this.long0);return t.x=this.k0*(u*Math.sin(c))+this.x0,t.y=this.k0*(this.rh-u*Math.cos(c))+this.y0,t},n.inverse=function(t){var e,n,r,o,i,a=(t.x-this.x0)/this.k0,h=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(a*a+h*h),n=1):(e=-Math.sqrt(a*a+h*h),n=-1);var c=0;if(0!==e&&(c=Math.atan2(n*a,n*h)),0!==e||this.ns>0){if(n=1/this.ns,r=Math.pow(e/(this.a*this.f0),n),o=u(this.e,r),-9999===o)return null}else o=-s;return i=l(c/this.ns+this.long0),t.x=i,t.y=o,t},n.names=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_2SP","lcc"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/msfnz":"proj4/lib/common/msfnz","../common/phi2z":"proj4/lib/common/phi2z","../common/sign":"proj4/lib/common/sign","../common/tsfnz":"proj4/lib/common/tsfnz"}],"proj4/lib/projections/longlat":[function(t,e,n){function r(t){return t}n.init=function(){},n.forward=r,n.inverse=r,n.names=["longlat","identity"]},{}],"proj4/lib/projections/merc":[function(t,e,n){var r=t("../common/msfnz"),o=Math.PI/2,i=1e-10,s=57.29577951308232,a=t("../common/adjust_lon"),l=Math.PI/4,u=t("../common/tsfnz"),h=t("../common/phi2z");n.init=function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=r(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},n.forward=function(t){var e=t.x,n=t.y;if(n*s>90&&-90>n*s&&e*s>180&&-180>e*s)return null;var r,h;if(Math.abs(Math.abs(n)-o)<=i)return null;if(this.sphere)r=this.x0+this.a*this.k0*a(e-this.long0),h=this.y0+this.a*this.k0*Math.log(Math.tan(l+.5*n));else{var c=Math.sin(n),p=u(this.e,n,c);r=this.x0+this.a*this.k0*a(e-this.long0),h=this.y0-this.a*this.k0*Math.log(p)}return t.x=r,t.y=h,t},n.inverse=function(t){var e,n,r=t.x-this.x0,i=t.y-this.y0;if(this.sphere)n=o-2*Math.atan(Math.exp(-i/(this.a*this.k0)));else{var s=Math.exp(-i/(this.a*this.k0));if(n=h(this.e,s),-9999===n)return null}return e=a(this.long0+r/(this.a*this.k0)),t.x=e,t.y=n,t},n.names=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/msfnz":"proj4/lib/common/msfnz","../common/phi2z":"proj4/lib/common/phi2z","../common/tsfnz":"proj4/lib/common/tsfnz"}],"proj4/lib/projections/mill":[function(t,e,n){var r=t("../common/adjust_lon");n.init=function(){},n.forward=function(t){var e=t.x,n=t.y,o=r(e-this.long0),i=this.x0+this.a*o,s=this.y0+this.a*Math.log(Math.tan(Math.PI/4+n/2.5))*1.25;return t.x=i,t.y=s,t},n.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e=r(this.long0+t.x/this.a),n=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=n,t},n.names=["Miller_Cylindrical","mill"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon"}],"proj4/lib/projections/moll":[function(t,e,n){var r=t("../common/adjust_lon"),o=1e-10;n.init=function(){},n.forward=function(t){for(var e=t.x,n=t.y,i=r(e-this.long0),s=n,a=Math.PI*Math.sin(n),l=0;!0;l++){var u=-(s+Math.sin(s)-a)/(1+Math.cos(s));if(s+=u,Math.abs(u)<o)break}s/=2,Math.PI/2-Math.abs(n)<o&&(i=0);var h=.900316316158*this.a*i*Math.cos(s)+this.x0,c=1.4142135623731*this.a*Math.sin(s)+this.y0;return t.x=h,t.y=c,t},n.inverse=function(t){var e,n;t.x-=this.x0,t.y-=this.y0,n=t.y/(1.4142135623731*this.a),Math.abs(n)>.999999999999&&(n=.999999999999),e=Math.asin(n);var o=r(this.long0+t.x/(.900316316158*this.a*Math.cos(e)));o<-Math.PI&&(o=-Math.PI),o>Math.PI&&(o=Math.PI),n=(2*e+Math.sin(2*e))/Math.PI,Math.abs(n)>1&&(n=1);var i=Math.asin(n);return t.x=o,t.y=i,t},n.names=["Mollweide","moll"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon"}],"proj4/lib/projections/nzmg":[function(t,e,n){var r=484813681109536e-20;n.iterations=1,n.init=function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},n.forward=function(t){var e,n=t.x,o=t.y,i=o-this.lat0,s=n-this.long0,a=i/r*1e-5,l=s,u=1,h=0;for(e=1;10>=e;e++)u*=a,h+=this.A[e]*u;var c,p,_=h,d=l,f=1,m=0,g=0,y=0;for(e=1;6>=e;e++)c=f*_-m*d,p=m*_+f*d,f=c,m=p,g=g+this.B_re[e]*f-this.B_im[e]*m,y=y+this.B_im[e]*f+this.B_re[e]*m;return t.x=y*this.a+this.x0,t.y=g*this.a+this.y0,t},n.inverse=function(t){var e,n,o,i=t.x,s=t.y,a=i-this.x0,l=s-this.y0,u=l/this.a,h=a/this.a,c=1,p=0,_=0,d=0;for(e=1;6>=e;e++)n=c*u-p*h,o=p*u+c*h,c=n,p=o,_=_+this.C_re[e]*c-this.C_im[e]*p,d=d+this.C_im[e]*c+this.C_re[e]*p;for(var f=0;f<this.iterations;f++){var m,g,y=_,v=d,b=u,x=h;for(e=2;6>=e;e++)m=y*_-v*d,g=v*_+y*d,y=m,v=g,b+=(e-1)*(this.B_re[e]*y-this.B_im[e]*v),x+=(e-1)*(this.B_im[e]*y+this.B_re[e]*v);y=1,v=0;var w=this.B_re[1],k=this.B_im[1];for(e=2;6>=e;e++)m=y*_-v*d,g=v*_+y*d,y=m,v=g,w+=e*(this.B_re[e]*y-this.B_im[e]*v),k+=e*(this.B_im[e]*y+this.B_re[e]*v);var M=w*w+k*k;_=(b*w+x*k)/M,d=(x*w-b*k)/M}var j=_,T=d,z=1,E=0;for(e=1;9>=e;e++)z*=j,E+=this.D[e]*z;var P=this.lat0+E*r*1e5,S=this.long0+T;return t.x=S,t.y=P,t},n.names=["New_Zealand_Map_Grid","nzmg"]},{}],"proj4/lib/projections/omerc":[function(t,e,n){var r=t("../common/tsfnz"),o=t("../common/adjust_lon"),i=t("../common/phi2z"),s=Math.PI/2,a=Math.PI/4,l=1e-10;n.init=function(){this.no_off=this.no_off||!1,this.no_rot=this.no_rot||!1,isNaN(this.k0)&&(this.k0=1);var t=Math.sin(this.lat0),e=Math.cos(this.lat0),n=this.e*t;this.bl=Math.sqrt(1+this.es/(1-this.es)*Math.pow(e,4)),this.al=this.a*this.bl*this.k0*Math.sqrt(1-this.es)/(1-n*n);var i=r(this.e,this.lat0,t),s=this.bl/e*Math.sqrt((1-this.es)/(1-n*n));1>s*s&&(s=1);var a,l;
64 if(isNaN(this.longc)){var u=r(this.e,this.lat1,Math.sin(this.lat1)),h=r(this.e,this.lat2,Math.sin(this.lat2));this.lat0>=0?this.el=(s+Math.sqrt(s*s-1))*Math.pow(i,this.bl):this.el=(s-Math.sqrt(s*s-1))*Math.pow(i,this.bl);var c=Math.pow(u,this.bl),p=Math.pow(h,this.bl);a=this.el/c,l=.5*(a-1/a);var _=(this.el*this.el-p*c)/(this.el*this.el+p*c),d=(p-c)/(p+c),f=o(this.long1-this.long2);this.long0=.5*(this.long1+this.long2)-Math.atan(_*Math.tan(.5*this.bl*f)/d)/this.bl,this.long0=o(this.long0);var m=o(this.long1-this.long0);this.gamma0=Math.atan(Math.sin(this.bl*m)/l),this.alpha=Math.asin(s*Math.sin(this.gamma0))}else a=this.lat0>=0?s+Math.sqrt(s*s-1):s-Math.sqrt(s*s-1),this.el=a*Math.pow(i,this.bl),l=.5*(a-1/a),this.gamma0=Math.asin(Math.sin(this.alpha)/s),this.long0=this.longc-Math.asin(l*Math.tan(this.gamma0))/this.bl;this.no_off?this.uc=0:this.lat0>=0?this.uc=this.al/this.bl*Math.atan2(Math.sqrt(s*s-1),Math.cos(this.alpha)):this.uc=-1*this.al/this.bl*Math.atan2(Math.sqrt(s*s-1),Math.cos(this.alpha))},n.forward=function(t){var e,n,i,u=t.x,h=t.y,c=o(u-this.long0);if(Math.abs(Math.abs(h)-s)<=l)i=h>0?-1:1,n=this.al/this.bl*Math.log(Math.tan(a+i*this.gamma0*.5)),e=-1*i*s*this.al/this.bl;else{var p=r(this.e,h,Math.sin(h)),_=this.el/Math.pow(p,this.bl),d=.5*(_-1/_),f=.5*(_+1/_),m=Math.sin(this.bl*c),g=(d*Math.sin(this.gamma0)-m*Math.cos(this.gamma0))/f;n=Math.abs(Math.abs(g)-1)<=l?Number.POSITIVE_INFINITY:.5*this.al*Math.log((1-g)/(1+g))/this.bl,e=Math.abs(Math.cos(this.bl*c))<=l?this.al*this.bl*c:this.al*Math.atan2(d*Math.cos(this.gamma0)+m*Math.sin(this.gamma0),Math.cos(this.bl*c))/this.bl}return this.no_rot?(t.x=this.x0+e,t.y=this.y0+n):(e-=this.uc,t.x=this.x0+n*Math.cos(this.alpha)+e*Math.sin(this.alpha),t.y=this.y0+e*Math.cos(this.alpha)-n*Math.sin(this.alpha)),t},n.inverse=function(t){var e,n;this.no_rot?(n=t.y-this.y0,e=t.x-this.x0):(n=(t.x-this.x0)*Math.cos(this.alpha)-(t.y-this.y0)*Math.sin(this.alpha),e=(t.y-this.y0)*Math.cos(this.alpha)+(t.x-this.x0)*Math.sin(this.alpha),e+=this.uc);var r=Math.exp(-1*this.bl*n/this.al),a=.5*(r-1/r),u=.5*(r+1/r),h=Math.sin(this.bl*e/this.al),c=(h*Math.cos(this.gamma0)+a*Math.sin(this.gamma0))/u,p=Math.pow(this.el/Math.sqrt((1+c)/(1-c)),1/this.bl);return Math.abs(c-1)<l?(t.x=this.long0,t.y=s):Math.abs(c+1)<l?(t.x=this.long0,t.y=-1*s):(t.y=i(this.e,p),t.x=o(this.long0-Math.atan2(a*Math.cos(this.gamma0)-h*Math.sin(this.gamma0),Math.cos(this.bl*e/this.al))/this.bl)),t},n.names=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","omerc"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/phi2z":"proj4/lib/common/phi2z","../common/tsfnz":"proj4/lib/common/tsfnz"}],"proj4/lib/projections/poly":[function(t,e,n){var r=t("../common/e0fn"),o=t("../common/e1fn"),i=t("../common/e2fn"),s=t("../common/e3fn"),a=t("../common/adjust_lon"),l=t("../common/adjust_lat"),u=t("../common/mlfn"),h=1e-10,c=t("../common/gN"),p=20;n.init=function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=r(this.es),this.e1=o(this.es),this.e2=i(this.es),this.e3=s(this.es),this.ml0=this.a*u(this.e0,this.e1,this.e2,this.e3,this.lat0)},n.forward=function(t){var e,n,r,o=t.x,i=t.y,s=a(o-this.long0);if(r=s*Math.sin(i),this.sphere)Math.abs(i)<=h?(e=this.a*s,n=-1*this.a*this.lat0):(e=this.a*Math.sin(r)/Math.tan(i),n=this.a*(l(i-this.lat0)+(1-Math.cos(r))/Math.tan(i)));else if(Math.abs(i)<=h)e=this.a*s,n=-1*this.ml0;else{var p=c(this.a,this.e,Math.sin(i))/Math.tan(i);e=p*Math.sin(r),n=this.a*u(this.e0,this.e1,this.e2,this.e3,i)-this.ml0+p*(1-Math.cos(r))}return t.x=e+this.x0,t.y=n+this.y0,t},n.inverse=function(t){var e,n,r,o,i,s,l,c,_;if(r=t.x-this.x0,o=t.y-this.y0,this.sphere)if(Math.abs(o+this.a*this.lat0)<=h)e=a(r/this.a+this.long0),n=0;else{s=this.lat0+o/this.a,l=r*r/this.a/this.a+s*s,c=s;var d;for(i=p;i;--i)if(d=Math.tan(c),_=-1*(s*(c*d+1)-c-.5*(c*c+l)*d)/((c-s)/d-1),c+=_,Math.abs(_)<=h){n=c;break}e=a(this.long0+Math.asin(r*Math.tan(c)/this.a)/Math.sin(n))}else if(Math.abs(o+this.ml0)<=h)n=0,e=a(this.long0+r/this.a);else{s=(this.ml0+o)/this.a,l=r*r/this.a/this.a+s*s,c=s;var f,m,g,y,v;for(i=p;i;--i)if(v=this.e*Math.sin(c),f=Math.sqrt(1-v*v)*Math.tan(c),m=this.a*u(this.e0,this.e1,this.e2,this.e3,c),g=this.e0-2*this.e1*Math.cos(2*c)+4*this.e2*Math.cos(4*c)-6*this.e3*Math.cos(6*c),y=m/this.a,_=(s*(f*y+1)-y-.5*f*(y*y+l))/(this.es*Math.sin(2*c)*(y*y+l-2*s*y)/(4*f)+(s-y)*(f*g-2/Math.sin(2*c))-g),c-=_,Math.abs(_)<=h){n=c;break}f=Math.sqrt(1-this.es*Math.pow(Math.sin(n),2))*Math.tan(n),e=a(this.long0+Math.asin(r*f/this.a)/Math.sin(n))}return t.x=e,t.y=n,t},n.names=["Polyconic","poly"]},{"../common/adjust_lat":"proj4/lib/common/adjust_lat","../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/e0fn":"proj4/lib/common/e0fn","../common/e1fn":"proj4/lib/common/e1fn","../common/e2fn":"proj4/lib/common/e2fn","../common/e3fn":"proj4/lib/common/e3fn","../common/gN":"proj4/lib/common/gN","../common/mlfn":"proj4/lib/common/mlfn"}],"proj4/lib/projections/sinu":[function(t,e,n){var r=t("../common/adjust_lon"),o=t("../common/adjust_lat"),i=t("../common/pj_enfn"),s=20,a=t("../common/pj_mlfn"),l=t("../common/pj_inv_mlfn"),u=Math.PI/2,h=1e-10,c=t("../common/asinz");n.init=function(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=i(this.es)},n.forward=function(t){var e,n,o=t.x,i=t.y;if(o=r(o-this.long0),this.sphere){if(this.m)for(var l=this.n*Math.sin(i),u=s;u;--u){var c=(this.m*i+Math.sin(i)-l)/(this.m+Math.cos(i));if(i-=c,Math.abs(c)<h)break}else i=1!==this.n?Math.asin(this.n*Math.sin(i)):i;e=this.a*this.C_x*o*(this.m+Math.cos(i)),n=this.a*this.C_y*i}else{var p=Math.sin(i),_=Math.cos(i);n=this.a*a(i,p,_,this.en),e=this.a*o*_/Math.sqrt(1-this.es*p*p)}return t.x=e,t.y=n,t},n.inverse=function(t){var e,n,i,s;return t.x-=this.x0,i=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,i/=this.C_x*(this.m+Math.cos(e)),this.m?e=c((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=c(Math.sin(e)/this.n)),i=r(i+this.long0),e=o(e)):(e=l(t.y/this.a,this.es,this.en),s=Math.abs(e),u>s?(s=Math.sin(e),n=this.long0+t.x*Math.sqrt(1-this.es*s*s)/(this.a*Math.cos(e)),i=r(n)):u>s-h&&(i=this.long0)),t.x=i,t.y=e,t},n.names=["Sinusoidal","sinu"]},{"../common/adjust_lat":"proj4/lib/common/adjust_lat","../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/asinz":"proj4/lib/common/asinz","../common/pj_enfn":"proj4/lib/common/pj_enfn","../common/pj_inv_mlfn":"proj4/lib/common/pj_inv_mlfn","../common/pj_mlfn":"proj4/lib/common/pj_mlfn"}],"proj4/lib/projections/somerc":[function(t,e,n){n.init=function(){var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),n=this.a,r=this.rf,o=1/r,i=2*o-Math.pow(o,2),s=this.e=Math.sqrt(i);this.R=this.k0*n*Math.sqrt(1-i)/(1-i*Math.pow(e,2)),this.alpha=Math.sqrt(1+i/(1-i)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var a=Math.log(Math.tan(Math.PI/4+this.b0/2)),l=Math.log(Math.tan(Math.PI/4+t/2)),u=Math.log((1+s*e)/(1-s*e));this.K=a-this.alpha*l+this.alpha*s/2*u},n.forward=function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),n=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),r=-this.alpha*(e+n)+this.K,o=2*(Math.atan(Math.exp(r))-Math.PI/4),i=this.alpha*(t.x-this.lambda0),s=Math.atan(Math.sin(i)/(Math.sin(this.b0)*Math.tan(o)+Math.cos(this.b0)*Math.cos(i))),a=Math.asin(Math.cos(this.b0)*Math.sin(o)-Math.sin(this.b0)*Math.cos(o)*Math.cos(i));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*s+this.x0,t},n.inverse=function(t){for(var e=t.x-this.x0,n=t.y-this.y0,r=e/this.R,o=2*(Math.atan(Math.exp(n/this.R))-Math.PI/4),i=Math.asin(Math.cos(this.b0)*Math.sin(o)+Math.sin(this.b0)*Math.cos(o)*Math.cos(r)),s=Math.atan(Math.sin(r)/(Math.cos(this.b0)*Math.cos(r)-Math.sin(this.b0)*Math.tan(o))),a=this.lambda0+s/this.alpha,l=0,u=i,h=-1e3,c=0;Math.abs(u-h)>1e-7;){if(++c>20)return;l=1/this.alpha*(Math.log(Math.tan(Math.PI/4+i/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(u))/2)),h=u,u=2*Math.atan(Math.exp(l))-Math.PI/2}return t.x=a,t.y=u,t},n.names=["somerc"]},{}],"proj4/lib/projections/stere":[function(t,e,n){var r=Math.PI/2,o=1e-10,i=t("../common/sign"),s=t("../common/msfnz"),a=t("../common/tsfnz"),l=t("../common/phi2z"),u=t("../common/adjust_lon");n.ssfn_=function(t,e,n){return e*=n,Math.tan(.5*(r+t))*Math.pow((1-e)/(1+e),.5*n)},n.init=function(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=o&&(this.k0=.5*(1+i(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=o&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),1===this.k0&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=o&&(this.k0=.5*this.cons*s(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/a(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=s(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-r,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},n.forward=function(t){var e,n,i,s,l,h,c=t.x,p=t.y,_=Math.sin(p),d=Math.cos(p),f=u(c-this.long0);return Math.abs(Math.abs(c-this.long0)-Math.PI)<=o&&Math.abs(p+this.lat0)<=o?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*_+this.coslat0*d*Math.cos(f)),t.x=this.a*e*d*Math.sin(f)+this.x0,t.y=this.a*e*(this.coslat0*_-this.sinlat0*d*Math.cos(f))+this.y0,t):(n=2*Math.atan(this.ssfn_(p,_,this.e))-r,s=Math.cos(n),i=Math.sin(n),Math.abs(this.coslat0)<=o?(l=a(this.e,p*this.con,this.con*_),h=2*this.a*this.k0*l/this.cons,t.x=this.x0+h*Math.sin(c-this.long0),t.y=this.y0-this.con*h*Math.cos(c-this.long0),t):(Math.abs(this.sinlat0)<o?(e=2*this.a*this.k0/(1+s*Math.cos(f)),t.y=e*i):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*i+this.cosX0*s*Math.cos(f))),t.y=e*(this.cosX0*i-this.sinX0*s*Math.cos(f))+this.y0),t.x=e*s*Math.sin(f)+this.x0,t))},n.inverse=function(t){t.x-=this.x0,t.y-=this.y0;var e,n,i,s,a,h=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var c=2*Math.atan(h/(.5*this.a*this.k0));return e=this.long0,n=this.lat0,o>=h?(t.x=e,t.y=n,t):(n=Math.asin(Math.cos(c)*this.sinlat0+t.y*Math.sin(c)*this.coslat0/h),e=u(Math.abs(this.coslat0)<o?this.lat0>0?this.long0+Math.atan2(t.x,-1*t.y):this.long0+Math.atan2(t.x,t.y):this.long0+Math.atan2(t.x*Math.sin(c),h*this.coslat0*Math.cos(c)-t.y*this.sinlat0*Math.sin(c))),t.x=e,t.y=n,t)}if(Math.abs(this.coslat0)<=o){if(o>=h)return n=this.lat0,e=this.long0,t.x=e,t.y=n,t;t.x*=this.con,t.y*=this.con,i=h*this.cons/(2*this.a*this.k0),n=this.con*l(this.e,i),e=this.con*u(this.con*this.long0+Math.atan2(t.x,-1*t.y))}else s=2*Math.atan(h*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o>=h?a=this.X0:(a=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/h),e=u(this.long0+Math.atan2(t.x*Math.sin(s),h*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)))),n=-1*l(this.e,Math.tan(.5*(r+a)));return t.x=e,t.y=n,t},n.names=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/msfnz":"proj4/lib/common/msfnz","../common/phi2z":"proj4/lib/common/phi2z","../common/sign":"proj4/lib/common/sign","../common/tsfnz":"proj4/lib/common/tsfnz"}],"proj4/lib/projections/sterea":[function(t,e,n){var r=t("./gauss"),o=t("../common/adjust_lon");n.init=function(){r.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},n.forward=function(t){var e,n,i,s;return t.x=o(t.x-this.long0),r.forward.apply(this,[t]),e=Math.sin(t.y),n=Math.cos(t.y),i=Math.cos(t.x),s=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*n*i),t.x=s*n*Math.sin(t.x),t.y=s*(this.cosc0*e-this.sinc0*n*i),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},n.inverse=function(t){var e,n,i,s,a;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,a=Math.sqrt(t.x*t.x+t.y*t.y)){var l=2*Math.atan2(a,this.R2);e=Math.sin(l),n=Math.cos(l),s=Math.asin(n*this.sinc0+t.y*e*this.cosc0/a),i=Math.atan2(t.x*e,a*this.cosc0*n-t.y*this.sinc0*e)}else s=this.phic0,i=0;return t.x=i,t.y=s,r.inverse.apply(this,[t]),t.x=o(t.x+this.long0),t},n.names=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","./gauss":"proj4/lib/projections/gauss"}],"proj4/lib/projections/tmerc":[function(t,e,n){var r=t("../common/e0fn"),o=t("../common/e1fn"),i=t("../common/e2fn"),s=t("../common/e3fn"),a=t("../common/mlfn"),l=t("../common/adjust_lon"),u=Math.PI/2,h=1e-10,c=t("../common/sign"),p=t("../common/asinz");n.init=function(){this.e0=r(this.es),this.e1=o(this.es),this.e2=i(this.es),this.e3=s(this.es),this.ml0=this.a*a(this.e0,this.e1,this.e2,this.e3,this.lat0)},n.forward=function(t){var e,n,r,o=t.x,i=t.y,s=l(o-this.long0),u=Math.sin(i),h=Math.cos(i);if(this.sphere){var c=h*Math.sin(s);if(Math.abs(Math.abs(c)-1)<1e-10)return 93;n=.5*this.a*this.k0*Math.log((1+c)/(1-c)),e=Math.acos(h*Math.cos(s)/Math.sqrt(1-c*c)),0>i&&(e=-e),r=this.a*this.k0*(e-this.lat0)}else{var p=h*s,_=Math.pow(p,2),d=this.ep2*Math.pow(h,2),f=Math.tan(i),m=Math.pow(f,2);e=1-this.es*Math.pow(u,2);var g=this.a/Math.sqrt(e),y=this.a*a(this.e0,this.e1,this.e2,this.e3,i);n=this.k0*g*p*(1+_/6*(1-m+d+_/20*(5-18*m+Math.pow(m,2)+72*d-58*this.ep2)))+this.x0,r=this.k0*(y-this.ml0+g*f*(_*(.5+_/24*(5-m+9*d+4*Math.pow(d,2)+_/30*(61-58*m+Math.pow(m,2)+600*d-330*this.ep2)))))+this.y0}return t.x=n,t.y=r,t},n.inverse=function(t){var e,n,r,o,i,s,a=6;if(this.sphere){var _=Math.exp(t.x/(this.a*this.k0)),d=.5*(_-1/_),f=this.lat0+t.y/(this.a*this.k0),m=Math.cos(f);e=Math.sqrt((1-m*m)/(1+d*d)),i=p(e),0>f&&(i=-i),s=0===d&&0===m?this.long0:l(Math.atan2(d,m)+this.long0)}else{var g=t.x-this.x0,y=t.y-this.y0;for(e=(this.ml0+y/this.k0)/this.a,n=e,o=0;!0&&(r=(e+this.e1*Math.sin(2*n)-this.e2*Math.sin(4*n)+this.e3*Math.sin(6*n))/this.e0-n,n+=r,!(Math.abs(r)<=h));o++)if(o>=a)return 95;if(Math.abs(n)<u){var v=Math.sin(n),b=Math.cos(n),x=Math.tan(n),w=this.ep2*Math.pow(b,2),k=Math.pow(w,2),M=Math.pow(x,2),j=Math.pow(M,2);e=1-this.es*Math.pow(v,2);var T=this.a/Math.sqrt(e),z=T*(1-this.es)/e,E=g/(T*this.k0),P=Math.pow(E,2);i=n-T*x*P/z*(.5-P/24*(5+3*M+10*w-4*k-9*this.ep2-P/30*(61+90*M+298*w+45*j-252*this.ep2-3*k))),s=l(this.long0+E*(1-P/6*(1+2*M+w-P/20*(5-2*w+28*M-3*k+8*this.ep2+24*j)))/b)}else i=u*c(y),s=this.long0}return t.x=s,t.y=i,t},n.names=["Transverse_Mercator","Transverse Mercator","tmerc"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/asinz":"proj4/lib/common/asinz","../common/e0fn":"proj4/lib/common/e0fn","../common/e1fn":"proj4/lib/common/e1fn","../common/e2fn":"proj4/lib/common/e2fn","../common/e3fn":"proj4/lib/common/e3fn","../common/mlfn":"proj4/lib/common/mlfn","../common/sign":"proj4/lib/common/sign"}],"proj4/lib/projections/utm":[function(t,e,n){var r=.017453292519943295,o=t("./tmerc");n.dependsOn="tmerc",n.init=function(){this.zone&&(this.lat0=0,this.long0=(6*Math.abs(this.zone)-183)*r,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,o.init.apply(this),this.forward=o.forward,this.inverse=o.inverse)},n.names=["Universal Transverse Mercator System","utm"]},{"./tmerc":"proj4/lib/projections/tmerc"}],"proj4/lib/projections/vandg":[function(t,e,n){var r=t("../common/adjust_lon"),o=Math.PI/2,i=1e-10,s=t("../common/asinz");n.init=function(){this.R=this.a},n.forward=function(t){var e,n,a=t.x,l=t.y,u=r(a-this.long0);Math.abs(l)<=i&&(e=this.x0+this.R*u,n=this.y0);var h=s(2*Math.abs(l/Math.PI));(Math.abs(u)<=i||Math.abs(Math.abs(l)-o)<=i)&&(e=this.x0,n=l>=0?this.y0+Math.PI*this.R*Math.tan(.5*h):this.y0+Math.PI*this.R*-Math.tan(.5*h));var c=.5*Math.abs(Math.PI/u-u/Math.PI),p=c*c,_=Math.sin(h),d=Math.cos(h),f=d/(_+d-1),m=f*f,g=f*(2/_-1),y=g*g,v=Math.PI*this.R*(c*(f-y)+Math.sqrt(p*(f-y)*(f-y)-(y+p)*(m-y)))/(y+p);0>u&&(v=-v),e=this.x0+v;var b=p+f;return v=Math.PI*this.R*(g*b-c*Math.sqrt((y+p)*(p+1)-b*b))/(y+p),n=l>=0?this.y0+v:this.y0-v,t.x=e,t.y=n,t},n.inverse=function(t){var e,n,o,s,a,l,u,h,c,p,_,d,f;return t.x-=this.x0,t.y-=this.y0,_=Math.PI*this.R,o=t.x/_,s=t.y/_,a=o*o+s*s,l=-Math.abs(s)*(1+a),u=l-2*s*s+o*o,h=-2*l+1+2*s*s+a*a,f=s*s/h+(2*u*u*u/h/h/h-9*l*u/h/h)/27,c=(l-u*u/3/h)/h,p=2*Math.sqrt(-c/3),_=3*f/c/p,Math.abs(_)>1&&(_=_>=0?1:-1),d=Math.acos(_)/3,n=t.y>=0?(-p*Math.cos(d+Math.PI/3)-u/3/h)*Math.PI:-(-p*Math.cos(d+Math.PI/3)-u/3/h)*Math.PI,e=Math.abs(o)<i?this.long0:r(this.long0+Math.PI*(a-1+Math.sqrt(1+2*(o*o-s*s)+a*a))/2/o),t.x=e,t.y=n,t},n.names=["Van_der_Grinten_I","VanDerGrinten","vandg"]},{"../common/adjust_lon":"proj4/lib/common/adjust_lon","../common/asinz":"proj4/lib/common/asinz"}],"proj4/lib/transform":[function(t,e,n){var r=.017453292519943295,o=57.29577951308232,i=1,s=2,a=t("./datum_transform"),l=t("./adjust_axis"),u=t("./Proj"),h=t("./common/toPoint");e.exports=function c(t,e,n){function p(t,e){return(t.datum.datum_type===i||t.datum.datum_type===s)&&"WGS84"!==e.datumCode}var _;return Array.isArray(n)&&(n=h(n)),t.datum&&e.datum&&(p(t,e)||p(e,t))&&(_=new u("WGS84"),c(t,_,n),t=_),"enu"!==t.axis&&l(t,!1,n),"longlat"===t.projName?(n.x*=r,n.y*=r):(t.to_meter&&(n.x*=t.to_meter,n.y*=t.to_meter),t.inverse(n)),t.from_greenwich&&(n.x+=t.from_greenwich),n=a(t.datum,e.datum,n),e.from_greenwich&&(n.x-=e.from_greenwich),"longlat"===e.projName?(n.x*=o,n.y*=o):(e.forward(n),e.to_meter&&(n.x/=e.to_meter,n.y/=e.to_meter)),"enu"!==e.axis&&l(e,!0,n),n}},{"./Proj":"proj4/lib/Proj","./adjust_axis":"proj4/lib/adjust_axis","./common/toPoint":"proj4/lib/common/toPoint","./datum_transform":"proj4/lib/datum_transform"}],"proj4/lib/wkt":[function(t,e,n){function r(t,e,n){t[e]=n.map(function(t){var e={};return o(t,e),e}).reduce(function(t,e){return u(t,e)},{})}function o(t,e){var n;return Array.isArray(t)?(n=t.shift(),"PARAMETER"===n&&(n=t.shift()),1===t.length?Array.isArray(t[0])?(e[n]={},o(t[0],e[n])):e[n]=t[0]:t.length?"TOWGS84"===n?e[n]=t:(e[n]={},["UNIT","PRIMEM","VERT_DATUM"].indexOf(n)>-1?(e[n]={name:t[0].toLowerCase(),convert:t[1]},3===t.length&&(e[n].auth=t[2])):"SPHEROID"===n?(e[n]={name:t[0],a:t[1],rf:t[2]},4===t.length&&(e[n].auth=t[3])):["GEOGCS","GEOCCS","DATUM","VERT_CS","COMPD_CS","LOCAL_CS","FITTED_CS","LOCAL_DATUM"].indexOf(n)>-1?(t[0]=["name",t[0]],r(e,n,t)):t.every(function(t){return Array.isArray(t)})?r(e,n,t):o(t,e[n])):e[n]=!0,void 0):void(e[t]=!0)}function i(t,e){var n=e[0],r=e[1];!(n in t)&&r in t&&(t[n]=t[r],3===e.length&&(t[n]=e[2](t[n])))}function s(t){return t*l}function a(t){function e(e){var n=t.to_meter||1;return parseFloat(e,10)*n}"GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=parseFloat(t.UNIT.convert,10)*t.DATUM.SPHEROID.a):t.to_meter=parseFloat(t.UNIT.convert,10))),t.GEOGCS&&(t.GEOGCS.DATUM?t.datumCode=t.GEOGCS.DATUM.name.toLowerCase():t.datumCode=t.GEOGCS.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),("new_zealand_geodetic_datum_1949"===t.datumCode||"new_zealand_1949"===t.datumCode)&&(t.datumCode="nzgd49"),"wgs_1984"===t.datumCode&&("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"_ferro"===t.datumCode.slice(-6)&&(t.datumCode=t.datumCode.slice(0,-6)),"_jakarta"===t.datumCode.slice(-8)&&(t.datumCode=t.datumCode.slice(0,-8)),~t.datumCode.indexOf("belge")&&(t.datumCode="rnb72"),t.GEOGCS.DATUM&&t.GEOGCS.DATUM.SPHEROID&&(t.ellps=t.GEOGCS.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=t.GEOGCS.DATUM.SPHEROID.a,t.rf=parseFloat(t.GEOGCS.DATUM.SPHEROID.rf,10)),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36")),t.b&&!isFinite(t.b)&&(t.b=t.a);var n=function(e){return i(t,e)},r=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_2","Standard_Parallel_2"],["false_easting","False_Easting"],["false_northing","False_Northing"],["central_meridian","Central_Meridian"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",s],["longitude_of_center","Longitude_Of_Center"],["longc","longitude_of_center",s],["x0","false_easting",e],["y0","false_northing",e],["long0","central_meridian",s],["lat0","latitude_of_origin",s],["lat0","standard_parallel_1",s],["lat1","standard_parallel_1",s],["lat2","standard_parallel_2",s],["alpha","azimuth",s],["srsCode","name"]];r.forEach(n),t.long0||!t.longc||"Albers_Conic_Equal_Area"!==t.projName&&"Lambert_Azimuthal_Equal_Area"!==t.projName||(t.long0=t.longc),t.lat_ts||!t.lat1||"Stereographic_South_Pole"!==t.projName&&"Polar Stereographic (variant B)"!==t.projName||(t.lat0=s(t.lat1>0?90:-90),t.lat_ts=t.lat1)}var l=.017453292519943295,u=t("./extend");e.exports=function(t,e){var n=JSON.parse((","+t).replace(/\s*\,\s*([A-Z_0-9]+?)(\[)/g,',["$1",').slice(1).replace(/\s*\,\s*([A-Z_0-9]+?)\]/g,',"$1"]').replace(/,\["VERTCS".+/,"")),r=n.shift(),i=n.shift();n.unshift(["name",i]),n.unshift(["type",r]),n.unshift("output");var s={};return o(n,s),a(s.output),u(e,s.output)}},{"./extend":"proj4/lib/extend"}],"proj4/node_modules/mgrs/mgrs":[function(t,e,n){function r(t){return t*(Math.PI/180)}function o(t){return 180*(t/Math.PI)}function i(t){var e,n,o,i,s,l,u,h,c,p=t.lat,_=t.lon,d=6378137,f=.00669438,m=.9996,g=r(p),y=r(_);c=Math.floor((_+180)/6)+1,180===_&&(c=60),p>=56&&64>p&&_>=3&&12>_&&(c=32),p>=72&&84>p&&(_>=0&&9>_?c=31:_>=9&&21>_?c=33:_>=21&&33>_?c=35:_>=33&&42>_&&(c=37)),e=6*(c-1)-180+3,h=r(e),n=f/(1-f),o=d/Math.sqrt(1-f*Math.sin(g)*Math.sin(g)),i=Math.tan(g)*Math.tan(g),s=n*Math.cos(g)*Math.cos(g),l=Math.cos(g)*(y-h),u=d*((1-f/4-3*f*f/64-5*f*f*f/256)*g-(3*f/8+3*f*f/32+45*f*f*f/1024)*Math.sin(2*g)+(15*f*f/256+45*f*f*f/1024)*Math.sin(4*g)-35*f*f*f/3072*Math.sin(6*g));var v=m*o*(l+(1-i+s)*l*l*l/6+(5-18*i+i*i+72*s-58*n)*l*l*l*l*l/120)+5e5,b=m*(u+o*Math.tan(g)*(l*l/2+(5-i+9*s+4*s*s)*l*l*l*l/24+(61-58*i+i*i+600*s-330*n)*l*l*l*l*l*l/720));return 0>p&&(b+=1e7),{northing:Math.round(b),easting:Math.round(v),zoneNumber:c,zoneLetter:a(p)}}function s(t){var e=t.northing,n=t.easting,r=t.zoneLetter,i=t.zoneNumber;if(0>i||i>60)return null;var a,l,u,h,c,p,_,d,f,m,g=.9996,y=6378137,v=.00669438,b=(1-Math.sqrt(1-v))/(1+Math.sqrt(1-v)),x=n-5e5,w=e;"N">r&&(w-=1e7),d=6*(i-1)-180+3,a=v/(1-v),_=w/g,f=_/(y*(1-v/4-3*v*v/64-5*v*v*v/256)),m=f+(3*b/2-27*b*b*b/32)*Math.sin(2*f)+(21*b*b/16-55*b*b*b*b/32)*Math.sin(4*f)+151*b*b*b/96*Math.sin(6*f),l=y/Math.sqrt(1-v*Math.sin(m)*Math.sin(m)),u=Math.tan(m)*Math.tan(m),h=a*Math.cos(m)*Math.cos(m),c=y*(1-v)/Math.pow(1-v*Math.sin(m)*Math.sin(m),1.5),p=x/(l*g);var k=m-l*Math.tan(m)/c*(p*p/2-(5+3*u+10*h-4*h*h-9*a)*p*p*p*p/24+(61+90*u+298*h+45*u*u-252*a-3*h*h)*p*p*p*p*p*p/720);k=o(k);var M=(p-(1+2*u+h)*p*p*p/6+(5-2*h+28*u-3*h*h+8*a+24*u*u)*p*p*p*p*p/120)/Math.cos(m);M=d+o(M);var j;if(t.accuracy){var T=s({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});j={top:T.lat,right:T.lon,bottom:k,left:M}}else j={lat:k,lon:M};return j}function a(t){var e="Z";return 84>=t&&t>=72?e="X":72>t&&t>=64?e="W":64>t&&t>=56?e="V":56>t&&t>=48?e="U":48>t&&t>=40?e="T":40>t&&t>=32?e="S":32>t&&t>=24?e="R":24>t&&t>=16?e="Q":16>t&&t>=8?e="P":8>t&&t>=0?e="N":0>t&&t>=-8?e="M":-8>t&&t>=-16?e="L":-16>t&&t>=-24?e="K":-24>t&&t>=-32?e="J":-32>t&&t>=-40?e="H":-40>t&&t>=-48?e="G":-48>t&&t>=-56?e="F":-56>t&&t>=-64?e="E":-64>t&&t>=-72?e="D":-72>t&&t>=-80&&(e="C"),e}function l(t,e){var n="00000"+t.easting,r="00000"+t.northing;return t.zoneNumber+t.zoneLetter+u(t.easting,t.northing,t.zoneNumber)+n.substr(n.length-5,e)+r.substr(r.length-5,e)}function u(t,e,n){var r=h(n),o=Math.floor(t/1e5),i=Math.floor(e/1e5)%20;return c(o,i,r)}function h(t){var e=t%m;return 0===e&&(e=m),e}function c(t,e,n){var r=n-1,o=g.charCodeAt(r),i=y.charCodeAt(r),s=o+t-1,a=i+e,l=!1;s>k&&(s=s-k+v-1,l=!0),(s===b||b>o&&s>b||(s>b||b>o)&&l)&&s++,(s===x||x>o&&s>x||(s>x||x>o)&&l)&&(s++,s===b&&s++),s>k&&(s=s-k+v-1),a>w?(a=a-w+v-1,l=!0):l=!1,(a===b||b>i&&a>b||(a>b||b>i)&&l)&&a++,(a===x||x>i&&a>x||(a>x||x>i)&&l)&&(a++,a===b&&a++),a>w&&(a=a-w+v-1);var u=String.fromCharCode(s)+String.fromCharCode(a);return u}function p(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,n=t.length,r=null,o="",i=0;!/[A-Z]/.test(e=t.charAt(i));){if(i>=2)throw"MGRSPoint bad conversion from: "+t;o+=e,i++}var s=parseInt(o,10);if(0===i||i+3>n)throw"MGRSPoint bad conversion from: "+t;var a=t.charAt(i++);if("A">=a||"B"===a||"Y"===a||a>="Z"||"I"===a||"O"===a)throw"MGRSPoint zone letter "+a+" not handled: "+t;r=t.substring(i,i+=2);for(var l=h(s),u=_(r.charAt(0),l),c=d(r.charAt(1),l);c<f(a);)c+=2e6;var p=n-i;if(p%2!==0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var m,g,y,v,b,x=p/2,w=0,k=0;return x>0&&(m=1e5/Math.pow(10,x),g=t.substring(i,i+x),w=parseFloat(g)*m,y=t.substring(i+x),k=parseFloat(y)*m),v=w+u,b=k+c,{easting:v,northing:b,zoneLetter:a,zoneNumber:s,accuracy:m}}function _(t,e){for(var n=g.charCodeAt(e-1),r=1e5,o=!1;n!==t.charCodeAt(0);){if(n++,n===b&&n++,n===x&&n++,n>k){if(o)throw"Bad character: "+t;n=v,o=!0}r+=1e5}return r}function d(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var n=y.charCodeAt(e-1),r=0,o=!1;n!==t.charCodeAt(0);){if(n++,n===b&&n++,n===x&&n++,n>w){if(o)throw"Bad character: "+t;n=v,o=!0}r+=1e5}return r}function f(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}var m=6,g="AJSAJS",y="AFAFAF",v=65,b=73,x=79,w=86,k=90;n.forward=function(t,e){return e=e||5,l(i({lat:t[1],lon:t[0]}),e)},n.inverse=function(t){var e=s(p(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},n.toPoint=function(t){var e=s(p(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}},{}],"proj4/package.json":[function(t,e,n){e.exports={name:"proj4",version:"2.3.12",description:"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.",main:"lib/index.js",directories:{test:"test",doc:"docs"},scripts:{test:"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},repository:{type:"git",url:"git://github.com/proj4js/proj4js.git"},author:"",license:"MIT",jam:{main:"dist/proj4.js",include:["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},devDependencies:{"grunt-cli":"~0.1.13",grunt:"~0.4.2","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0",chai:"~1.8.1",mocha:"~1.17.1","grunt-mocha-phantomjs":"~0.4.0",browserify:"~3.24.5","grunt-browserify":"~1.3.0","grunt-contrib-uglify":"~0.3.2",curl:"git://github.com/cujojs/curl.git",istanbul:"~0.2.4",tin:"~0.4.0"},dependencies:{mgrs:"~0.0.2"},contributors:[{name:"Mike Adair",email:"madair@dmsolutions.ca"},{name:"Richard Greenwood",email:"rich@greenwoodmap.com"},{name:"Calvin Metcalf",email:"calvin.metcalf@gmail.com"},{name:"Richard Marsden",url:"http://www.winwaed.com"},{name:"T. Mittan"},{name:"D. Steinwand"},{name:"S. Nelson"}],gitHead:"cd07cad5c6a5b6ed82b59a21356848979eafe22c",bugs:{url:"https://github.com/proj4js/proj4js/issues"},homepage:"https://github.com/proj4js/proj4js#readme",_id:"proj4@2.3.12",_shasum:"96b9ed2a810dad6e62f1e32b4dad37c276b427a2",_from:"proj4@>=2.3.10 <3.0.0",_npmVersion:"2.11.3",_nodeVersion:"0.12.7",_npmUser:{name:"ahocevar",email:"andreas.hocevar@gmail.com"},dist:{shasum:"96b9ed2a810dad6e62f1e32b4dad37c276b427a2",tarball:"http://registry.npmjs.org/proj4/-/proj4-2.3.12.tgz"},maintainers:[{name:"cwmma",email:"calvin.metcalf@gmail.com"},{name:"ahocevar",email:"andreas.hocevar@gmail.com"}],_resolved:"https://registry.npmjs.org/proj4/-/proj4-2.3.12.tgz"}},{}],rbush:[function(e,n,r){/*
65 (c) 2015, Vladimir Agafonkin
66 RBush, a JavaScript library for high-performance 2D spatial indexing of points and rectangles.
67 https://github.com/mourner/rbush
68 */
69 !function(){"use strict";function e(t,n){return this instanceof e?(this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),n&&this._initFormat(n),void this.clear()):new e(t,n)}function r(t,e){t.bbox=o(t,0,t.children.length,e)}function o(t,e,n,r){for(var o,a=i(),l=e;n>l;l++)o=t.children[l],s(a,t.leaf?r(o):o.bbox);return a}function i(){return[1/0,1/0,-(1/0),-(1/0)]}function s(t,e){return t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t}function a(t,e){return t.bbox[0]-e.bbox[0]}function l(t,e){return t.bbox[1]-e.bbox[1]}function u(t){return(t[2]-t[0])*(t[3]-t[1])}function h(t){return t[2]-t[0]+(t[3]-t[1])}function c(t,e){return(Math.max(e[2],t[2])-Math.min(e[0],t[0]))*(Math.max(e[3],t[3])-Math.min(e[1],t[1]))}function p(t,e){var n=Math.max(t[0],e[0]),r=Math.max(t[1],e[1]),o=Math.min(t[2],e[2]),i=Math.min(t[3],e[3]);return Math.max(0,o-n)*Math.max(0,i-r)}function _(t,e){return t[0]<=e[0]&&t[1]<=e[1]&&e[2]<=t[2]&&e[3]<=t[3]}function d(t,e){return e[0]<=t[2]&&e[1]<=t[3]&&e[2]>=t[0]&&e[3]>=t[1]}function f(t,e,n,r,o){for(var i,s=[e,n];s.length;)n=s.pop(),e=s.pop(),r>=n-e||(i=e+Math.ceil((n-e)/r/2)*r,m(t,e,n,i,o),s.push(e,i,i,n))}function m(t,e,n,r,o){for(var i,s,a,l,u,h,c,p,_;n>e;){for(n-e>600&&(i=n-e+1,s=r-e+1,a=Math.log(i),l=.5*Math.exp(2*a/3),u=.5*Math.sqrt(a*l*(i-l)/i)*(0>s-i/2?-1:1),h=Math.max(e,Math.floor(r-s*l/i+u)),c=Math.min(n,Math.floor(r+(i-s)*l/i+u)),m(t,h,c,r,o)),p=t[r],s=e,_=n,g(t,e,r),o(t[n],p)>0&&g(t,e,n);_>s;){for(g(t,s,_),s++,_--;o(t[s],p)<0;)s++;for(;o(t[_],p)>0;)_--}0===o(t[e],p)?g(t,e,_):(_++,g(t,_,n)),r>=_&&(e=_+1),_>=r&&(n=_-1)}}function g(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}e.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],r=this.toBBox;if(!d(t,e.bbox))return n;for(var o,i,s,a,l=[];e;){for(o=0,i=e.children.length;i>o;o++)s=e.children[o],a=e.leaf?r(s):s.bbox,d(t,a)&&(e.leaf?n.push(s):_(t,a)?this._all(s,n):l.push(s));e=l.pop()}return n},collides:function(t){var e=this.data,n=this.toBBox;if(!d(t,e.bbox))return!1;for(var r,o,i,s,a=[];e;){for(r=0,o=e.children.length;o>r;r++)if(i=e.children[r],s=e.leaf?n(i):i.bbox,d(t,s)){if(e.leaf||_(t,s))return!0;a.push(i)}e=a.pop()}return!1},load:function(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(var e=0,n=t.length;n>e;e++)this.insert(t[e]);return this}var r=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===r.height)this._splitRoot(this.data,r);else{if(this.data.height<r.height){var o=this.data;this.data=r,r=o}this._insert(r,this.data.height-r.height-1,!0)}else this.data=r;return this},insert:function(t){return t&&this._insert(t,this.data.height-1),this},clear:function(){return this.data={children:[],height:1,bbox:i(),leaf:!0},this},remove:function(t){if(!t)return this;for(var e,n,r,o,i=this.data,s=this.toBBox(t),a=[],l=[];i||a.length;){if(i||(i=a.pop(),n=a[a.length-1],e=l.pop(),o=!0),i.leaf&&(r=i.children.indexOf(t),-1!==r))return i.children.splice(r,1),a.push(i),this._condense(a),this;o||i.leaf||!_(i.bbox,s)?n?(e++,i=n.children[e],o=!1):i=null:(a.push(i),l.push(e),e=0,n=i,i=i.children[0])}return this},toBBox:function(t){return t},compareMinX:function(t,e){return t[0]-e[0]},compareMinY:function(t,e){return t[1]-e[1]},toJSON:function(){return this.data},fromJSON:function(t){return this.data=t,this},_all:function(t,e){for(var n=[];t;)t.leaf?e.push.apply(e,t.children):n.push.apply(n,t.children),t=n.pop();return e},_build:function(t,e,n,o){var i,s=n-e+1,a=this._maxEntries;if(a>=s)return i={children:t.slice(e,n+1),height:1,bbox:null,leaf:!0},r(i,this.toBBox),i;o||(o=Math.ceil(Math.log(s)/Math.log(a)),a=Math.ceil(s/Math.pow(a,o-1))),i={children:[],height:o,bbox:null,leaf:!1};var l,u,h,c,p=Math.ceil(s/a),_=p*Math.ceil(Math.sqrt(a));for(f(t,e,n,_,this.compareMinX),l=e;n>=l;l+=_)for(h=Math.min(l+_-1,n),f(t,l,h,p,this.compareMinY),u=l;h>=u;u+=p)c=Math.min(u+p-1,h),i.children.push(this._build(t,u,c,o-1));return r(i,this.toBBox),i},_chooseSubtree:function(t,e,n,r){for(var o,i,s,a,l,h,p,_;;){if(r.push(e),e.leaf||r.length-1===n)break;for(p=_=1/0,o=0,i=e.children.length;i>o;o++)s=e.children[o],l=u(s.bbox),h=c(t,s.bbox)-l,_>h?(_=h,p=p>l?l:p,a=s):h===_&&p>l&&(p=l,a=s);e=a}return e},_insert:function(t,e,n){var r=this.toBBox,o=n?t.bbox:r(t),i=[],a=this._chooseSubtree(o,this.data,e,i);for(a.children.push(t),s(a.bbox,o);e>=0&&i[e].children.length>this._maxEntries;)this._split(i,e),e--;this._adjustParentBBoxes(o,i,e)},_split:function(t,e){var n=t[e],o=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,o);var s=this._chooseSplitIndex(n,i,o),a={children:n.children.splice(s,n.children.length-s),height:n.height,bbox:null,leaf:!1};n.leaf&&(a.leaf=!0),r(n,this.toBBox),r(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data={children:[t,e],height:t.height+1,bbox:null,leaf:!1},r(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var r,i,s,a,l,h,c,_;for(h=c=1/0,r=e;n-e>=r;r++)i=o(t,0,r,this.toBBox),s=o(t,r,n,this.toBBox),a=p(i,s),l=u(i)+u(s),h>a?(h=a,_=r,c=c>l?l:c):a===h&&c>l&&(c=l,_=r);return _},_chooseSplitAxis:function(t,e,n){var r=t.leaf?this.compareMinX:a,o=t.leaf?this.compareMinY:l,i=this._allDistMargin(t,e,n,r),s=this._allDistMargin(t,e,n,o);s>i&&t.children.sort(r)},_allDistMargin:function(t,e,n,r){t.children.sort(r);var i,a,l=this.toBBox,u=o(t,0,e,l),c=o(t,n-e,n,l),p=h(u)+h(c);for(i=e;n-e>i;i++)a=t.children[i],s(u,t.leaf?l(a):a.bbox),p+=h(u);for(i=n-e-1;i>=e;i--)a=t.children[i],s(c,t.leaf?l(a):a.bbox),p+=h(c);return p},_adjustParentBBoxes:function(t,e,n){for(var r=n;r>=0;r--)s(e[r].bbox,t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children,e.splice(e.indexOf(t[n]),1)):this.clear():r(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return [a"+t.join(", a")+"];")}},"function"==typeof t&&t.amd?t("rbush",function(){return e}):"undefined"!=typeof n?n.exports=e:"undefined"!=typeof self?self.rbush=e:window.rbush=e}()},{}],sprintf:[function(t,e,n){/**
70 sprintf() for JavaScript 0.7-beta1
71 http://www.diveintojavascript.com/projects/javascript-sprintf
72
73 Copyright (c) Alexandru Marasteanu <alexaholic [at) gmail (dot] com>
74 All rights reserved.
75
76 Redistribution and use in source and binary forms, with or without
77 modification, are permitted provided that the following conditions are met:
78 * Redistributions of source code must retain the above copyright
79 notice, this list of conditions and the following disclaimer.
80 * Redistributions in binary form must reproduce the above copyright
81 notice, this list of conditions and the following disclaimer in the
82 documentation and/or other materials provided with the distribution.
83 * Neither the name of sprintf() for JavaScript nor the
84 names of its contributors may be used to endorse or promote products
85 derived from this software without specific prior written permission.
86
87 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
88 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
89 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
90 DISCLAIMED. IN NO EVENT SHALL Alexandru Marasteanu BE LIABLE FOR ANY
91 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
92 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
93 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
94 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
95 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
96 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
97
98
99 Changelog:
100 2010.11.07 - 0.7-beta1-node
101 - converted it to a node.js compatible module
102
103 2010.09.06 - 0.7-beta1
104 - features: vsprintf, support for named placeholders
105 - enhancements: format cache, reduced global namespace pollution
106
107 2010.05.22 - 0.6:
108 - reverted to 0.4 and fixed the bug regarding the sign of the number 0
109 Note:
110 Thanks to Raphael Pigulla <raph (at] n3rd [dot) org> (http://www.n3rd.org/)
111 who warned me about a bug in 0.5, I discovered that the last update was
112 a regress. I appologize for that.
113
114 2010.05.09 - 0.5:
115 - bug fix: 0 is now preceeded with a + sign
116 - bug fix: the sign was not at the right position on padded results (Kamal Abdali)
117 - switched from GPL to BSD license
118
119 2007.10.21 - 0.4:
120 - unit test and patch (David Baird)
121
122 2007.09.17 - 0.3:
123 - bug fix: no longer throws exception on empty paramenters (Hans Pufal)
124
125 2007.09.11 - 0.2:
126 - feature: added argument swapping
127
128 2007.04.03 - 0.1:
129 - initial release
130 **/
131 var r=function(){function t(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function e(t,e){for(var n=[];e>0;n[--e]=t);return n.join("")}var n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.object_stringify=function(t,e,r,o){var i="";if(null!=t)switch(typeof t){case"function":return"[Function"+(t.name?": "+t.name:"")+"]";case"object":if(t instanceof Error)return"["+t.toString()+"]";if(e>=r)return"[Object]";if(o&&(o=o.slice(0),o.push(t)),null!=t.length){i+="[";var s=[];for(var a in t)o&&o.indexOf(t[a])>=0?s.push("[Circular]"):s.push(n.object_stringify(t[a],e+1,r,o));i+=s.join(", ")+"]"}else{if("getMonth"in t)return"Date("+t+")";i+="{";var s=[];for(var l in t)t.hasOwnProperty(l)&&(o&&o.indexOf(t[l])>=0?s.push(l+": [Circular]"):s.push(l+": "+n.object_stringify(t[l],e+1,r,o)));i+=s.join(", ")+"}"}return i;case"string":return'"'+t+'"'}return""+t},n.format=function(o,i){var s,a,l,u,h,c,p,_=1,d=o.length,f="",m=[];for(a=0;d>a;a++)if(f=t(o[a]),"string"===f)m.push(o[a]);else if("array"===f){if(u=o[a],u[2])for(s=i[_],l=0;l<u[2].length;l++){if(!s.hasOwnProperty(u[2][l]))throw new Error(r('[sprintf] property "%s" does not exist',u[2][l]));s=s[u[2][l]]}else s=u[1]?i[u[1]]:i[_++];if(/[^sO]/.test(u[8])&&"number"!=t(s))throw new Error(r('[sprintf] expecting number but found %s "'+s+'"',t(s)));switch(u[8]){case"b":s=s.toString(2);break;case"c":s=String.fromCharCode(s);break;case"d":s=parseInt(s,10);break;case"e":s=u[7]?s.toExponential(u[7]):s.toExponential();break;case"f":s=u[7]?parseFloat(s).toFixed(u[7]):parseFloat(s);break;case"O":s=n.object_stringify(s,0,parseInt(u[7])||5);break;case"o":s=s.toString(8);break;case"s":s=(s=String(s))&&u[7]?s.substring(0,u[7]):s;break;case"u":s=Math.abs(s);break;case"x":s=s.toString(16);break;case"X":s=s.toString(16).toUpperCase()}s=/[def]/.test(u[8])&&u[3]&&s>=0?"+"+s:s,c=u[4]?"0"==u[4]?"0":u[4].charAt(1):" ",p=u[6]-String(s).length,h=u[6]?e(c,p):"",m.push(u[5]?s+h:h+s)}return m.join("")},n.cache={},n.parse=function(t){for(var e=t,n=[],r=[],o=0;e;){if(null!==(n=/^[^\x25]+/.exec(e)))r.push(n[0]);else if(null!==(n=/^\x25{2}/.exec(e)))r.push("%");else{if(null===(n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosOuxX])/.exec(e)))throw new Error("[sprintf] "+e);if(n[2]){o|=1;var i=[],s=n[2],a=[];if(null===(a=/^([a-z_][a-z_\d]*)/i.exec(s)))throw new Error("[sprintf] "+s);for(i.push(a[1]);""!==(s=s.substring(a[0].length));)if(null!==(a=/^\.([a-z_][a-z_\d]*)/i.exec(s)))i.push(a[1]);else{if(null===(a=/^\[(\d+)\]/.exec(s)))throw new Error("[sprintf] "+s);i.push(a[1])}n[2]=i}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push(n)}e=e.substring(n[0].length)}return r},n}(),o=function(t,e){var n=e.slice();return n.unshift(t),r.apply(null,n)};e.exports=r,r.sprintf=r,r.vsprintf=o},{}],"timezone/index":[function(e,n,r){!function(e){"object"==typeof n&&n.exports?n.exports=e():"function"==typeof t?t(e):this.tz=e()}(function(){function t(t,e,n){var r,o=e.day[1];do r=new Date(Date.UTC(n,e.month,Math.abs(o++)));while(e.day[0]<7&&r.getUTCDay()!=e.day[0]);return r={clock:e.clock,sort:r.getTime(),rule:e,save:6e4*e.save,offset:t.offset},r[r.clock]=r.sort+6e4*e.time,r.posix?r.wallclock=r[r.clock]+(t.offset+e.saved):r.posix=r[r.clock]-(t.offset+e.saved),r}function e(e,n,r){var o,i,s,a,l,u,h,c=e[e.zone],p=[],_=new Date(r).getUTCFullYear(),d=1;for(o=1,i=c.length;i>o&&!(c[o][n]<=r);o++);if(s=c[o],s.rules){for(u=e[s.rules],h=_+1;h>=_-d;--h)for(o=0,i=u.length;i>o;o++)u[o].from<=h&&h<=u[o].to?p.push(t(s,u[o],h)):u[o].to<h&&1==d&&(d=h-u[o].to);for(p.sort(function(t,e){return t.sort-e.sort}),o=0,i=p.length;i>o;o++)r>=p[o][n]&&p[o][p[o].clock]>s[p[o].clock]&&(a=p[o])}return a&&((l=/^(.*)\/(.*)$/.exec(s.format))?a.abbrev=l[a.save?2:1]:a.abbrev=s.format.replace(/%s/,a.rule.letter)),a||s}function n(t,n){return"UTC"==t.zone?n:(t.entry=e(t,"posix",n),n+t.entry.offset+t.entry.save)}function r(t,n){if("UTC"==t.zone)return n;var r,o;return t.entry=r=e(t,"wallclock",n),o=n-r.wallclock,o>0&&o<r.save?null:n-r.offset-r.save}function o(t,e,o){var i,s=+(o[1]+1),a=o[2]*s,l=u.indexOf(o[3].toLowerCase());if(l>9)e+=a*c[l-10];else{if(i=new Date(n(t,e)),7>l)for(;a;)i.setUTCDate(i.getUTCDate()+s),i.getUTCDay()==l&&(a-=s);else 7==l?i.setUTCFullYear(i.getUTCFullYear()+a):8==l?i.setUTCMonth(i.getUTCMonth()+a):i.setUTCDate(i.getUTCDate()+a);null==(e=r(t,i.getTime()))&&(e=r(t,i.getTime()+864e5*s)-864e5*s)}return e}function i(t){if(!t.length)return"0.0.38";var e,i,s,a,l,u=Object.create(this),c=[];for(e=0;e<t.length;e++)if(a=t[e],Array.isArray(a))e||isNaN(a[1])?a.splice.apply(t,[e--,1].concat(a)):l=a;else if(isNaN(a)){if(s=typeof a,"string"==s)~a.indexOf("%")?u.format=a:e||"*"!=a?!e&&(s=/^(\d{4})-(\d{2})-(\d{2})(?:[T\s](\d{2}):(\d{2})(?::(\d{2})(?:\.(\d+))?)?(Z|(([+-])(\d{2}(:\d{2}){0,2})))?)?$/.exec(a))?(l=[],l.push.apply(l,s.slice(1,8)),s[9]?(l.push(s[10]+1),l.push.apply(l,s[11].split(/:/))):s[8]&&l.push(1)):/^\w{2,3}_\w{2}$/.test(a)?u.locale=a:(s=h.exec(a))?c.push(s):u.zone=a:l=a;else if("function"==s){if(s=a.call(u))return s}else if(/^\w{2,3}_\w{2}$/.test(a.name))u[a.name]=a;else if(a.zones){for(s in a.zones)u[s]=a.zones[s];for(s in a.rules)u[s]=a.rules[s]}}else e||(l=a);if(u[u.locale]||delete u.locale,u[u.zone]||delete u.zone,null!=l){if("*"==l)l=u.clock();else if(Array.isArray(l)){for(i=!l[7],e=0;11>e;e++)l[e]=+(l[e]||0);--l[1],l=Date.UTC.apply(Date.UTC,l.slice(0,8))+-l[7]*(36e5*l[8]+6e4*l[9]+1e3*l[10])}else l=Math.floor(l);if(!isNaN(l)){if(i&&(l=r(u,l)),null==l)return l;for(e=0,i=c.length;i>e;e++)l=o(u,l,c[e]);return u.format?(s=new Date(n(u,l)),u.format.replace(/%([-0_^]?)(:{0,3})(\d*)(.)/g,function(t,e,n,r,o){var i,a,h="0";if(i=u[o]){for(t=String(i.call(u,s,l,e,n.length)),"_"==(e||i.style)&&(h=" "),a="-"==e?0:i.pad||0;t.length<a;)t=h+t;for(a="-"==e?0:r||i.pad;t.length<a;)t=h+t;"N"==o&&a<t.length&&(t=t.slice(0,a)),"^"==e&&(t=t.toUpperCase())}return t})):l}}return function(){return u.convert(arguments)}}function s(t,e){var n,r,o;return r=new Date(Date.UTC(t.getUTCFullYear(),0)),n=Math.floor((t.getTime()-r.getTime())/864e5),r.getUTCDay()==e?o=0:(o=7-r.getUTCDay()+e,8==o&&(o=1)),n>=o?Math.floor((n-o)/7)+1:0}function a(t){var e,n,r;return n=t.getUTCFullYear(),e=new Date(Date.UTC(n,0)).getUTCDay(),r=s(t,1)+(e>1&&4>=e?1:0),r?53!=r||4==e||3==e&&29==new Date(n,1,29).getDate()?[r,t.getUTCFullYear()]:[1,t.getUTCFullYear()+1]:(n=t.getUTCFullYear()-1,e=new Date(Date.UTC(n,0)).getUTCDay(),r=4==e||3==e&&29==new Date(n,1,29).getDate()?53:52,[r,t.getUTCFullYear()-1])}var l={clock:function(){return+new Date},zone:"UTC",entry:{abbrev:"UTC",offset:0,save:0},UTC:1,z:function(t,e,n,r){var o,i,s=this.entry.offset+this.entry.save,a=Math.abs(s/1e3),l=[],u=3600;for(o=0;3>o;o++)l.push(("0"+Math.floor(a/u)).slice(-2)),a%=u,u/=60;return"^"!=n||s?("^"==n&&(r=3),3==r?(i=l.join(":"),i=i.replace(/:00$/,""),"^"!=n&&(i=i.replace(/:00$/,""))):r?(i=l.slice(0,r+1).join(":"),"^"==n&&(i=i.replace(/:00$/,""))):i=l.slice(0,2).join(""),i=(0>s?"-":"+")+i,i=i.replace(/([-+])(0)/,{_:" $1","-":"$1"}[n]||"$1$2")):"Z"},"%":function(t){return"%"},n:function(t){return"\n"},t:function(t){return" "},U:function(t){return s(t,0)},W:function(t){return s(t,1)},V:function(t){return a(t)[0]},G:function(t){return a(t)[1]},g:function(t){return a(t)[1]%100},j:function(t){return Math.floor((t.getTime()-Date.UTC(t.getUTCFullYear(),0))/864e5)+1},s:function(t){return Math.floor(t.getTime()/1e3)},C:function(t){return Math.floor(t.getUTCFullYear()/100)},N:function(t){return t.getTime()%1e3*1e6},m:function(t){return t.getUTCMonth()+1},Y:function(t){return t.getUTCFullYear()},y:function(t){return t.getUTCFullYear()%100},H:function(t){return t.getUTCHours()},M:function(t){return t.getUTCMinutes()},S:function(t){return t.getUTCSeconds()},e:function(t){return t.getUTCDate()},d:function(t){return t.getUTCDate()},u:function(t){return t.getUTCDay()||7},w:function(t){return t.getUTCDay()},l:function(t){return t.getUTCHours()%12||12},I:function(t){return t.getUTCHours()%12||12},k:function(t){return t.getUTCHours()},Z:function(t){return this.entry.abbrev},a:function(t){return this[this.locale].day.abbrev[t.getUTCDay()]},A:function(t){return this[this.locale].day.full[t.getUTCDay()]},h:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},b:function(t){return this[this.locale].month.abbrev[t.getUTCMonth()]},B:function(t){return this[this.locale].month.full[t.getUTCMonth()]},P:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)].toLowerCase()},p:function(t){return this[this.locale].meridiem[Math.floor(t.getUTCHours()/12)]},R:function(t,e){return this.convert([e,"%H:%M"])},T:function(t,e){return this.convert([e,"%H:%M:%S"])},D:function(t,e){return this.convert([e,"%m/%d/%y"])},F:function(t,e){return this.convert([e,"%Y-%m-%d"])},x:function(t,e){return this.convert([e,this[this.locale].date])},r:function(t,e){return this.convert([e,this[this.locale].time12||"%I:%M:%S"])},X:function(t,e){return this.convert([e,this[this.locale].time24])},c:function(t,e){return this.convert([e,this[this.locale].dateTime])},convert:i,locale:"en_US",en_US:{date:"%m/%d/%Y",time24:"%I:%M:%S %p",time12:"%I:%M:%S %p",dateTime:"%a %d %b %Y %I:%M:%S %p %Z",meridiem:["AM","PM"],month:{abbrev:"Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec".split("|"),full:"January|February|March|April|May|June|July|August|September|October|November|December".split("|")},day:{abbrev:"Sun|Mon|Tue|Wed|Thu|Fri|Sat".split("|"),full:"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday".split("|")}}},u="Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|year|month|day|hour|minute|second|millisecond",h=new RegExp("^\\s*([+-])(\\d+)\\s+("+u+")s?\\s*$","i"),c=[36e5,6e4,1e3,1];return u=u.toLowerCase().split("|"),"delmHMSUWVgCIky".replace(/./g,function(t){l[t].pad=2}),l.N.pad=9,l.j.pad=3,l.k.style="_",l.l.style="_",l.e.style="_",function(){return l.convert(arguments)}})},{}],underscore:[function(e,n,r){
132 // (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
133 // Underscore may be freely distributed under the MIT license.
134 (function(){function e(t){function e(e,n,r,o,i,s){for(;i>=0&&s>i;i+=t){var a=o?o[i]:i;r=n(r,e[a],a,e)}return r}return function(n,r,o,i){r=w(r,i,4);var s=!P(n)&&x.keys(n),a=(s||n).length,l=t>0?0:a-1;return arguments.length<3&&(o=n[s?s[l]:l],l+=t),e(n,r,o,s,l,a)}}function o(t){return function(e,n,r){n=k(n,r);for(var o=E(e),i=t>0?0:o-1;i>=0&&o>i;i+=t)if(n(e[i],i,e))return i;return-1}}function i(t,e,n){return function(r,o,i){var s=0,a=E(r);if("number"==typeof i)t>0?s=i>=0?i:Math.max(i+a,s):a=i>=0?Math.min(i+1,a):i+a+1;else if(n&&i&&a)return i=n(r,o),r[i]===o?i:-1;if(o!==o)return i=e(_.call(r,s,a),x.isNaN),i>=0?i+s:-1;for(i=t>0?s:a-1;i>=0&&a>i;i+=t)if(r[i]===o)return i;return-1}}function s(t,e){var n=N.length,r=t.constructor,o=x.isFunction(r)&&r.prototype||h,i="constructor";for(x.has(t,i)&&!x.contains(e,i)&&e.push(i);n--;)i=N[n],i in t&&t[i]!==o[i]&&!x.contains(e,i)&&e.push(i)}var a=this,l=a._,u=Array.prototype,h=Object.prototype,c=Function.prototype,p=u.push,_=u.slice,d=h.toString,f=h.hasOwnProperty,m=Array.isArray,g=Object.keys,y=c.bind,v=Object.create,b=function(){},x=function(t){return t instanceof x?t:this instanceof x?void(this._wrapped=t):new x(t)};"undefined"!=typeof r?("undefined"!=typeof n&&n.exports&&(r=n.exports=x),r._=x):a._=x,x.VERSION="1.8.3";var w=function(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)};case 4:return function(n,r,o,i){return t.call(e,n,r,o,i)}}return function(){return t.apply(e,arguments)}},k=function(t,e,n){return null==t?x.identity:x.isFunction(t)?w(t,e,n):x.isObject(t)?x.matcher(t):x.property(t)};x.iteratee=function(t,e){return k(t,e,1/0)};var M=function(t,e){return function(n){var r=arguments.length;if(2>r||null==n)return n;for(var o=1;r>o;o++)for(var i=arguments[o],s=t(i),a=s.length,l=0;a>l;l++){var u=s[l];e&&void 0!==n[u]||(n[u]=i[u])}return n}},j=function(t){if(!x.isObject(t))return{};if(v)return v(t);b.prototype=t;var e=new b;return b.prototype=null,e},T=function(t){return function(e){return null==e?void 0:e[t]}},z=Math.pow(2,53)-1,E=T("length"),P=function(t){var e=E(t);return"number"==typeof e&&e>=0&&z>=e};x.each=x.forEach=function(t,e,n){e=w(e,n);var r,o;if(P(t))for(r=0,o=t.length;o>r;r++)e(t[r],r,t);else{var i=x.keys(t);for(r=0,o=i.length;o>r;r++)e(t[i[r]],i[r],t)}return t},x.map=x.collect=function(t,e,n){e=k(e,n);for(var r=!P(t)&&x.keys(t),o=(r||t).length,i=Array(o),s=0;o>s;s++){var a=r?r[s]:s;i[s]=e(t[a],a,t)}return i},x.reduce=x.foldl=x.inject=e(1),x.reduceRight=x.foldr=e(-1),x.find=x.detect=function(t,e,n){var r;return r=P(t)?x.findIndex(t,e,n):x.findKey(t,e,n),void 0!==r&&-1!==r?t[r]:void 0},x.filter=x.select=function(t,e,n){var r=[];return e=k(e,n),x.each(t,function(t,n,o){e(t,n,o)&&r.push(t)}),r},x.reject=function(t,e,n){return x.filter(t,x.negate(k(e)),n)},x.every=x.all=function(t,e,n){e=k(e,n);for(var r=!P(t)&&x.keys(t),o=(r||t).length,i=0;o>i;i++){var s=r?r[i]:i;if(!e(t[s],s,t))return!1}return!0},x.some=x.any=function(t,e,n){e=k(e,n);for(var r=!P(t)&&x.keys(t),o=(r||t).length,i=0;o>i;i++){var s=r?r[i]:i;if(e(t[s],s,t))return!0}return!1},x.contains=x.includes=x.include=function(t,e,n,r){return P(t)||(t=x.values(t)),("number"!=typeof n||r)&&(n=0),x.indexOf(t,e,n)>=0},x.invoke=function(t,e){var n=_.call(arguments,2),r=x.isFunction(e);return x.map(t,function(t){var o=r?e:t[e];return null==o?o:o.apply(t,n)})},x.pluck=function(t,e){return x.map(t,x.property(e))},x.where=function(t,e){return x.filter(t,x.matcher(e))},x.findWhere=function(t,e){return x.find(t,x.matcher(e))},x.max=function(t,e,n){var r,o,i=-(1/0),s=-(1/0);if(null==e&&null!=t){t=P(t)?t:x.values(t);for(var a=0,l=t.length;l>a;a++)r=t[a],r>i&&(i=r)}else e=k(e,n),x.each(t,function(t,n,r){o=e(t,n,r),(o>s||o===-(1/0)&&i===-(1/0))&&(i=t,s=o)});return i},x.min=function(t,e,n){var r,o,i=1/0,s=1/0;if(null==e&&null!=t){t=P(t)?t:x.values(t);for(var a=0,l=t.length;l>a;a++)r=t[a],i>r&&(i=r)}else e=k(e,n),x.each(t,function(t,n,r){o=e(t,n,r),(s>o||o===1/0&&i===1/0)&&(i=t,s=o)});return i},x.shuffle=function(t){for(var e,n=P(t)?t:x.values(t),r=n.length,o=Array(r),i=0;r>i;i++)e=x.random(0,i),e!==i&&(o[i]=o[e]),o[e]=n[i];return o},x.sample=function(t,e,n){return null==e||n?(P(t)||(t=x.values(t)),t[x.random(t.length-1)]):x.shuffle(t).slice(0,Math.max(0,e))},x.sortBy=function(t,e,n){return e=k(e,n),x.pluck(x.map(t,function(t,n,r){return{value:t,index:n,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index-e.index}),"value")};var S=function(t){return function(e,n,r){var o={};return n=k(n,r),x.each(e,function(r,i){var s=n(r,i,e);t(o,r,s)}),o}};x.groupBy=S(function(t,e,n){x.has(t,n)?t[n].push(e):t[n]=[e]}),x.indexBy=S(function(t,e,n){t[n]=e}),x.countBy=S(function(t,e,n){x.has(t,n)?t[n]++:t[n]=1}),x.toArray=function(t){return t?x.isArray(t)?_.call(t):P(t)?x.map(t,x.identity):x.values(t):[]},x.size=function(t){return null==t?0:P(t)?t.length:x.keys(t).length},x.partition=function(t,e,n){e=k(e,n);var r=[],o=[];return x.each(t,function(t,n,i){(e(t,n,i)?r:o).push(t)}),[r,o]},x.first=x.head=x.take=function(t,e,n){return null!=t?null==e||n?t[0]:x.initial(t,t.length-e):void 0},x.initial=function(t,e,n){return _.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))},x.last=function(t,e,n){return null!=t?null==e||n?t[t.length-1]:x.rest(t,Math.max(0,t.length-e)):void 0},x.rest=x.tail=x.drop=function(t,e,n){return _.call(t,null==e||n?1:e)},x.compact=function(t){return x.filter(t,x.identity)};var C=function(t,e,n,r){for(var o=[],i=0,s=r||0,a=E(t);a>s;s++){var l=t[s];if(P(l)&&(x.isArray(l)||x.isArguments(l))){e||(l=C(l,e,n));var u=0,h=l.length;for(o.length+=h;h>u;)o[i++]=l[u++]}else n||(o[i++]=l)}return o};x.flatten=function(t,e){return C(t,e,!1)},x.without=function(t){return x.difference(t,_.call(arguments,1))},x.uniq=x.unique=function(t,e,n,r){x.isBoolean(e)||(r=n,n=e,e=!1),null!=n&&(n=k(n,r));for(var o=[],i=[],s=0,a=E(t);a>s;s++){var l=t[s],u=n?n(l,s,t):l;e?(s&&i===u||o.push(l),i=u):n?x.contains(i,u)||(i.push(u),o.push(l)):x.contains(o,l)||o.push(l)}return o},x.union=function(){return x.uniq(C(arguments,!0,!0))},x.intersection=function(t){for(var e=[],n=arguments.length,r=0,o=E(t);o>r;r++){var i=t[r];if(!x.contains(e,i)){for(var s=1;n>s&&x.contains(arguments[s],i);s++);s===n&&e.push(i)}}return e},x.difference=function(t){var e=C(arguments,!0,!0,1);return x.filter(t,function(t){return!x.contains(e,t)})},x.zip=function(){return x.unzip(arguments)},x.unzip=function(t){for(var e=t&&x.max(t,E).length||0,n=Array(e),r=0;e>r;r++)n[r]=x.pluck(t,r);return n},x.object=function(t,e){for(var n={},r=0,o=E(t);o>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},x.findIndex=o(1),x.findLastIndex=o(-1),x.sortedIndex=function(t,e,n,r){n=k(n,r,1);for(var o=n(e),i=0,s=E(t);s>i;){var a=Math.floor((i+s)/2);n(t[a])<o?i=a+1:s=a}return i},x.indexOf=i(1,x.findIndex,x.sortedIndex),x.lastIndexOf=i(-1,x.findLastIndex),x.range=function(t,e,n){null==e&&(e=t||0,t=0),n=n||1;for(var r=Math.max(Math.ceil((e-t)/n),0),o=Array(r),i=0;r>i;i++,t+=n)o[i]=t;return o};var A=function(t,e,n,r,o){if(!(r instanceof e))return t.apply(n,o);var i=j(t.prototype),s=t.apply(i,o);return x.isObject(s)?s:i};x.bind=function(t,e){if(y&&t.bind===y)return y.apply(t,_.call(arguments,1));if(!x.isFunction(t))throw new TypeError("Bind must be called on a function");var n=_.call(arguments,2),r=function(){return A(t,r,e,this,n.concat(_.call(arguments)))};return r},x.partial=function(t){var e=_.call(arguments,1),n=function(){for(var r=0,o=e.length,i=Array(o),s=0;o>s;s++)i[s]=e[s]===x?arguments[r++]:e[s];for(;r<arguments.length;)i.push(arguments[r++]);return A(t,n,this,this,i)};return n},x.bindAll=function(t){var e,n,r=arguments.length;if(1>=r)throw new Error("bindAll must be passed function names");for(e=1;r>e;e++)n=arguments[e],t[n]=x.bind(t[n],t);return t},x.memoize=function(t,e){var n=function(r){var o=n.cache,i=""+(e?e.apply(this,arguments):r);return x.has(o,i)||(o[i]=t.apply(this,arguments)),o[i]};return n.cache={},n},x.delay=function(t,e){var n=_.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},x.defer=x.partial(x.delay,x,1),x.throttle=function(t,e,n){var r,o,i,s=null,a=0;n||(n={});var l=function(){a=n.leading===!1?0:x.now(),s=null,i=t.apply(r,o),s||(r=o=null)};return function(){var u=x.now();a||n.leading!==!1||(a=u);var h=e-(u-a);return r=this,o=arguments,0>=h||h>e?(s&&(clearTimeout(s),s=null),a=u,i=t.apply(r,o),s||(r=o=null)):s||n.trailing===!1||(s=setTimeout(l,h)),i}},x.debounce=function(t,e,n){var r,o,i,s,a,l=function(){var u=x.now()-s;e>u&&u>=0?r=setTimeout(l,e-u):(r=null,n||(a=t.apply(i,o),r||(i=o=null)))};return function(){i=this,o=arguments,s=x.now();var u=n&&!r;return r||(r=setTimeout(l,e)),u&&(a=t.apply(i,o),i=o=null),a}},x.wrap=function(t,e){return x.partial(e,t)},x.negate=function(t){return function(){return!t.apply(this,arguments)}},x.compose=function(){var t=arguments,e=t.length-1;return function(){for(var n=e,r=t[e].apply(this,arguments);n--;)r=t[n].call(this,r);return r}},x.after=function(t,e){return function(){return--t<1?e.apply(this,arguments):void 0}},x.before=function(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),1>=t&&(e=null),n}},x.once=x.partial(x.before,2);var O=!{toString:null}.propertyIsEnumerable("toString"),N=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];x.keys=function(t){if(!x.isObject(t))return[];if(g)return g(t);var e=[];for(var n in t)x.has(t,n)&&e.push(n);return O&&s(t,e),e},x.allKeys=function(t){if(!x.isObject(t))return[];var e=[];for(var n in t)e.push(n);return O&&s(t,e),e},x.values=function(t){for(var e=x.keys(t),n=e.length,r=Array(n),o=0;n>o;o++)r[o]=t[e[o]];return r},x.mapObject=function(t,e,n){e=k(e,n);for(var r,o=x.keys(t),i=o.length,s={},a=0;i>a;a++)r=o[a],s[r]=e(t[r],r,t);return s},x.pairs=function(t){for(var e=x.keys(t),n=e.length,r=Array(n),o=0;n>o;o++)r[o]=[e[o],t[e[o]]];return r},x.invert=function(t){for(var e={},n=x.keys(t),r=0,o=n.length;o>r;r++)e[t[n[r]]]=n[r];return e},x.functions=x.methods=function(t){var e=[];for(var n in t)x.isFunction(t[n])&&e.push(n);return e.sort()},x.extend=M(x.allKeys),x.extendOwn=x.assign=M(x.keys),x.findKey=function(t,e,n){e=k(e,n);for(var r,o=x.keys(t),i=0,s=o.length;s>i;i++)if(r=o[i],e(t[r],r,t))return r},x.pick=function(t,e,n){var r,o,i={},s=t;if(null==s)return i;x.isFunction(e)?(o=x.allKeys(s),r=w(e,n)):(o=C(arguments,!1,!1,1),r=function(t,e,n){return e in n},s=Object(s));for(var a=0,l=o.length;l>a;a++){var u=o[a],h=s[u];r(h,u,s)&&(i[u]=h)}return i},x.omit=function(t,e,n){if(x.isFunction(e))e=x.negate(e);else{var r=x.map(C(arguments,!1,!1,1),String);e=function(t,e){return!x.contains(r,e)}}return x.pick(t,e,n)},x.defaults=M(x.allKeys,!0),x.create=function(t,e){var n=j(t);return e&&x.extendOwn(n,e),n},x.clone=function(t){return x.isObject(t)?x.isArray(t)?t.slice():x.extend({},t):t},x.tap=function(t,e){return e(t),t},x.isMatch=function(t,e){var n=x.keys(e),r=n.length;if(null==t)return!r;for(var o=Object(t),i=0;r>i;i++){var s=n[i];if(e[s]!==o[s]||!(s in o))return!1}return!0};var q=function(t,e,n,r){if(t===e)return 0!==t||1/t===1/e;if(null==t||null==e)return t===e;t instanceof x&&(t=t._wrapped),e instanceof x&&(e=e._wrapped);var o=d.call(t);if(o!==d.call(e))return!1;switch(o){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!==+t?+e!==+e:0===+t?1/+t===1/e:+t===+e;case"[object Date]":case"[object Boolean]":return+t===+e}var i="[object Array]"===o;if(!i){if("object"!=typeof t||"object"!=typeof e)return!1;var s=t.constructor,a=e.constructor;if(s!==a&&!(x.isFunction(s)&&s instanceof s&&x.isFunction(a)&&a instanceof a)&&"constructor"in t&&"constructor"in e)return!1}n=n||[],r=r||[];for(var l=n.length;l--;)if(n[l]===t)return r[l]===e;if(n.push(t),r.push(e),i){if(l=t.length,l!==e.length)return!1;for(;l--;)if(!q(t[l],e[l],n,r))return!1}else{var u,h=x.keys(t);if(l=h.length,x.keys(e).length!==l)return!1;for(;l--;)if(u=h[l],!x.has(e,u)||!q(t[u],e[u],n,r))return!1}return n.pop(),r.pop(),!0};x.isEqual=function(t,e){return q(t,e)},x.isEmpty=function(t){return null==t?!0:P(t)&&(x.isArray(t)||x.isString(t)||x.isArguments(t))?0===t.length:0===x.keys(t).length},x.isElement=function(t){return!(!t||1!==t.nodeType)},x.isArray=m||function(t){return"[object Array]"===d.call(t)},x.isObject=function(t){var e=typeof t;return"function"===e||"object"===e&&!!t},x.each(["Arguments","Function","String","Number","Date","RegExp","Error"],function(t){x["is"+t]=function(e){return d.call(e)==="[object "+t+"]"}}),x.isArguments(arguments)||(x.isArguments=function(t){return x.has(t,"callee")}),"function"!=typeof/./&&"object"!=typeof Int8Array&&(x.isFunction=function(t){return"function"==typeof t||!1}),x.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},x.isNaN=function(t){return x.isNumber(t)&&t!==+t},x.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"===d.call(t)},x.isNull=function(t){return null===t},x.isUndefined=function(t){return void 0===t},x.has=function(t,e){return null!=t&&f.call(t,e)},x.noConflict=function(){return a._=l,this},x.identity=function(t){return t},x.constant=function(t){return function(){return t}},x.noop=function(){},x.property=T,x.propertyOf=function(t){return null==t?function(){}:function(e){return t[e]}},x.matcher=x.matches=function(t){return t=x.extendOwn({},t),function(e){return x.isMatch(e,t)}},x.times=function(t,e,n){var r=Array(Math.max(0,t));e=w(e,n,1);for(var o=0;t>o;o++)r[o]=e(o);return r},x.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))},x.now=Date.now||function(){return(new Date).getTime()};var F={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},D=x.invert(F),I=function(t){var e=function(e){return t[e]},n="(?:"+x.keys(t).join("|")+")",r=RegExp(n),o=RegExp(n,"g");return function(t){return t=null==t?"":""+t,r.test(t)?t.replace(o,e):t}};x.escape=I(F),x.unescape=I(D),x.result=function(t,e,n){var r=null==t?void 0:t[e];return void 0===r&&(r=n),x.isFunction(r)?r.call(t):r};var R=0;x.uniqueId=function(t){var e=++R+"";return t?t+e:e},x.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var B=/(.)^/,L={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},G=/\\|'|\r|\n|\u2028|\u2029/g,U=function(t){return"\\"+L[t]};x.template=function(t,e,n){!e&&n&&(e=n),e=x.defaults({},e,x.templateSettings);var r=RegExp([(e.escape||B).source,(e.interpolate||B).source,(e.evaluate||B).source].join("|")+"|$","g"),o=0,i="__p+='";t.replace(r,function(e,n,r,s,a){return i+=t.slice(o,a).replace(G,U),o=a+e.length,n?i+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?i+="'+\n((__t=("+r+"))==null?'':__t)+\n'":s&&(i+="';\n"+s+"\n__p+='"),e}),i+="';\n",e.variable||(i="with(obj||{}){\n"+i+"}\n"),i="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+i+"return __p;\n";try{var s=new Function(e.variable||"obj","_",i)}catch(a){throw a.source=i,a}var l=function(t){return s.call(this,t,x)},u=e.variable||"obj";return l.source="function("+u+"){\n"+i+"}",l},x.chain=function(t){var e=x(t);return e._chain=!0,e};var $=function(t,e){return t._chain?x(e).chain():e};x.mixin=function(t){x.each(x.functions(t),function(e){var n=x[e]=t[e];x.prototype[e]=function(){var t=[this._wrapped];return p.apply(t,arguments),$(this,n.apply(x,t))}})},x.mixin(x),x.each(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=u[t];x.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0],$(this,n)}}),x.each(["concat","join","slice"],function(t){var e=u[t];x.prototype[t]=function(){return $(this,e.apply(this._wrapped,arguments))}}),x.prototype.value=function(){return this._wrapped},x.prototype.valueOf=x.prototype.toJSON=x.prototype.value,x.prototype.toString=function(){return""+this._wrapped},"function"==typeof t&&t.amd&&t("underscore",[],function(){return x})}).call(this)},{}],"bootstrap/dropdown":[function(t,e,n){function r(t){i(s).remove(),i(a).each(function(){var e=o(i(this)),n={relatedTarget:this};e.hasClass("bk-bs-open")&&(e.trigger(t=i.Event("hide.bk-bs.dropdown",n)),t.isDefaultPrevented()||e.removeClass("bk-bs-open").trigger("hidden.bk-bs.dropdown",n))})}function o(t){var e=t.attr("data-bk-bs-target");e||(e=t.attr("href"),e=e&&/#[A-Za-z]/.test(e)&&e.replace(/.*(?=#[^\s]*$)/,""));var n=e&&i(e);return n&&n.length?n:t.parent()}var i=t("jquery"),s=".bk-bs-dropdown-backdrop",a="[data-bk-bs-toggle=dropdown]",l=function(t){i(t).on("click.bk-bs.dropdown",this.toggle)};l.prototype.toggle=function(t){var e=i(this);if(!e.is(".bk-bs-disabled, :disabled")){var n=o(e),s=n.hasClass("bk-bs-open");if(r(),!s){"ontouchstart"in document.documentElement&&!n.closest(".bk-bs-navbar-nav").length&&i('<div class="bk-bs-dropdown-backdrop"/>').insertAfter(i(this)).on("click",r);var a={relatedTarget:this};if(n.trigger(t=i.Event("show.bk-bs.dropdown",a)),t.isDefaultPrevented())return;n.toggleClass("bk-bs-open").trigger("shown.bk-bs.dropdown",a),e.focus()}return!1}},l.prototype.keydown=function(t){if(/(38|40|27)/.test(t.keyCode)){var e=i(this);if(t.preventDefault(),t.stopPropagation(),!e.is(".bk-bs-disabled, :disabled")){var n=o(e),r=n.hasClass("bk-bs-open");if(!r||r&&27==t.keyCode)return 27==t.which&&n.find(a).focus(),e.click();var s=" li:not(.bk-bs-divider):visible a",l=n.find("[role=menu]"+s+", [role=listbox]"+s);if(l.length){var u=l.index(l.filter(":focus"));38==t.keyCode&&u>0&&u--,40==t.keyCode&&u<l.length-1&&u++,~u||(u=0),l.eq(u).focus()}}}};var u=i.fn.dropdown;i.fn.dropdown=function(t){return this.each(function(){var e=i(this),n=e.data("bk-bs.dropdown");n||e.data("bk-bs.dropdown",n=new l(this)),"string"==typeof t&&n[t].call(e)})},i.fn.dropdown.Constructor=l,i.fn.dropdown.noConflict=function(){return i.fn.dropdown=u,this},i(document).on("click.bk-bs.dropdown.data-api",r).on("click.bk-bs.dropdown.data-api",".bk-bs-dropdown form",function(t){t.stopPropagation()}).on("click.bk-bs.dropdown.data-api",a,l.prototype.toggle).on("keydown.bk-bs.dropdown.data-api",a+", [role=menu], [role=listbox]",l.prototype.keydown)},{jquery:"jquery"}],"bootstrap/modal":[function(t,e,n){var r=t("jquery"),o=function(t,e){this.options=e,this.$element=r(t),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(".bk-bs-modal-content").load(this.options.remote,r.proxy(function(){this.$element.trigger("loaded.bk-bs.modal")},this))};o.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},o.prototype.toggle=function(t){return this[this.isShown?"hide":"show"](t)},o.prototype.show=function(t){var e=this,n=r.Event("show.bk-bs.modal",{relatedTarget:t});this.$element.trigger(n),this.isShown||n.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on("click.dismiss.bk-bs.modal",'[data-bk-bs-dismiss="modal"]',r.proxy(this.hide,this)),this.backdrop(function(){var n=r.support.transition&&e.$element.hasClass("bk-bs-fade");e.$element.parent().length||e.$element.appendTo(document.body),e.$element.show().scrollTop(0),n&&e.$element[0].offsetWidth,e.$element.addClass("bk-bs-in").attr("aria-hidden",!1),e.enforceFocus();var o=r.Event("shown.bk-bs.modal",{relatedTarget:t});n?e.$element.find(".bk-bs-modal-dialog").one(r.support.transition.end,function(){e.$element.focus().trigger(o)}).emulateTransitionEnd(300):e.$element.focus().trigger(o)}))},o.prototype.hide=function(t){t&&t.preventDefault(),t=r.Event("hide.bk-bs.modal"),this.$element.trigger(t),this.isShown&&!t.isDefaultPrevented()&&(this.isShown=!1,this.escape(),r(document).off("focusin.bk-bs.modal"),this.$element.removeClass("bk-bs-in").attr("aria-hidden",!0).off("click.dismiss.bk-bs.modal"),r.support.transition&&this.$element.hasClass("bk-bs-fade")?this.$element.one(r.support.transition.end,r.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},o.prototype.enforceFocus=function(){r(document).off("focusin.bk-bs.modal").on("focusin.bk-bs.modal",r.proxy(function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.focus()},this))},o.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bk-bs.modal",r.proxy(function(t){27==t.which&&this.hide()},this)):this.isShown||this.$element.off("keyup.dismiss.bk-bs.modal")},o.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop(function(){t.removeBackdrop(),t.$element.trigger("hidden.bk-bs.modal")})},o.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},o.prototype.backdrop=function(t){var e=this.$element.hasClass("bk-bs-fade")?"bk-bs-fade":"";if(this.isShown&&this.options.backdrop){var n=r.support.transition&&e;if(this.$backdrop=r('<div class="bk-bs-modal-backdrop '+e+'" />').appendTo(document.body),this.$element.on("click.dismiss.bk-bs.modal",r.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),n&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("bk-bs-in"),!t)return;n?this.$backdrop.one(r.support.transition.end,t).emulateTransitionEnd(150):t()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("bk-bs-in"),r.support.transition&&this.$element.hasClass("bk-bs-fade")?this.$backdrop.one(r.support.transition.end,t).emulateTransitionEnd(150):t()):t&&t()};var i=r.fn.modal;r.fn.modal=function(t,e){return this.each(function(){var n=r(this),i=n.data("bk-bs.modal"),s=r.extend({},o.DEFAULTS,n.data(),"object"==typeof t&&t);i||n.data("bk-bs.modal",i=new o(this,s)),"string"==typeof t?i[t](e):s.show&&i.show(e)})},r.fn.modal.Constructor=o,r.fn.modal.noConflict=function(){return r.fn.modal=i,this},r(document).on("click.bk-bs.modal.data-api",'[data-bk-bs-toggle="modal"]',function(t){var e=r(this),n=e.attr("href"),o=r(e.attr("data-bk-bs-target")||n&&n.replace(/.*(?=#[^\s]+$)/,"")),i=o.data("bk-bs.modal")?"toggle":r.extend({remote:!/#/.test(n)&&n},o.data(),e.data());e.is("a")&&t.preventDefault(),o.modal(i,this).one("hide",function(){e.is(":visible")&&e.focus()})}),r(document).on("show.bk-bs.modal",".bk-bs-modal",function(){r(document.body).addClass("bk-bs-modal-open")}).on("hidden.bk-bs.modal",".bk-bs-modal",function(){r(document.body).removeClass("bk-bs-modal-open")})},{jquery:"jquery"}],gear_utils:[function(t,e,n){var r,o,i;!function(){"use strict";r=function(t,e,n,r,o,i){function s(t,e){var n,r=50,o=0;for(n=1;r>=n;n++)o+=e(Math.cos(m*(n-.5)/r))*Math.cos(m*t*(n-.5)/r);return 2*o/r}function a(t,e){var n,r,o,i,a=[],l=[],u=[[],[]];for(n=0;t+1>n;n++)u[0][n]=0,u[1][n]=0;for(u[0][0]=1,u[1][1]=1,o=1;t+1>o;o++){for(u[o+1]=[0],r=0;r<u[o].length-1;r++)u[o+1][r+1]=2*u[o][r];for(r=0;r<u[o-1].length;r++)u[o+1][r]-=u[o-1][r]}for(o=0;t>=o;o++)l[o]=s(o,e),a[o]=0;for(o=0;t>=o;o++)for(i=0;t>=i;i++)a[i]+=l[o]*u[o][i];return a[0]-=s(0,e)/2,a}function l(t){var e=2*t-1,n=e*(p-_)/2+(_+p)/2;return v*(Math.cos(n)+n*Math.sin(n))}function u(t){var e=2*t-1,n=e*(p-_)/2+(_+p)/2;return v*(Math.sin(n)-n*Math.cos(n))}function h(t,e){var n,r=1;for(n=t-e+1;t>=n;n++)r*=n;for(n=1;e>=n;n++)r/=n;return r}function c(t,e){var n,r,o=a(x,e);for(n=0,r=0;t>=r;r++)n+=h(t,r)*o[r]/h(x,r);return n}var p,_,d,f,m=Math.PI,g=t*e/2,y=n||20,v=g*Math.cos(y*m/180),b=g+t,x=r||3,w=Math.sqrt(b*b-v*v)/v,k=i||1,M=.01,j=[];for(void 0!==o&&k>o&&(M=o),p=Math.sqrt(k)*w,_=Math.sqrt(M)*w,d=0;x>=d;d++)f={},f.x=c(d,l),f.y=c(d,u),j.push(f);return j},o=function(t,e,n){function o(t,e){return Math.sqrt(e*e-t*t)/t-Math.acos(t/e)}function i(t,e){var n=Math.sin(e),r=Math.cos(e);return{x:t.x*r-t.y*n,y:t.x*n+t.y*r}}function s(t,e){return{x:t*Math.cos(e),y:t*Math.sin(e)}}var a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k=t,M=e,j=n||20,T=k,z=1.25*k,E=z-T,P=M*k/2,S=P*Math.cos(j*Math.PI/180),C=P+T,A=P-z,O=1.5*E,N=2*Math.PI/M,q=o(S,P),F=q,D=Math.atan(O/(O+A));for(a=Math.sqrt((A+O)*(A+O)-O*O),a>S&&(a=A+E),a>S&&(F-=o(S,a)),l=1,u=.01,a>S&&(u=(a*a-S*S)/(C*C-S*S)),h=u+(l-u)/4,c=r(k,M,j,3,u,h),p=r(k,M,j,3,h,l),_=c.concat(p.slice(1)),d=[],x=0;x<_.length;x++)b=i(_[x],-q-N/4),_[x]=b,d[x]={x:b.x,y:-b.y};return f=s(a,-N/4-F),m={x:f.x,y:-f.y},y=s(A,N/4+F+D),v=s(A,3*N/4-F-D),g=i(f,N),w=[],w.push("M",f.x,f.y),S>a&&w.push("L",_[0].x,_[0].y),w.push("C",_[1].x,_[1].y,_[2].x,_[2].y,_[3].x,_[3].y,_[4].x,_[4].y,_[5].x,_[5].y,_[6].x,_[6].y),w.push("A",C,C,0,0,0,d[6].x,d[6].y),w.push("C",d[5].x,d[5].y,d[4].x,d[4].y,d[3].x,d[3].y,d[2].x,d[2].y,d[1].x,d[1].y,d[0].x,d[0].y),S>a&&w.push("L",m.x,m.y),v.y>y.y&&(w.push("A",O,O,0,0,1,y.x,y.y),w.push("A",A,A,0,0,0,v.x,v.y)),w.push("A",O,O,0,0,1,g.x,g.y),w},i=function(t,e,n){function o(t,e){return Math.sqrt(e*e-t*t)/t-Math.acos(t/e)}function i(t,e){var n=Math.sin(e),r=Math.cos(e);return{x:t.x*r-t.y*n,y:t.x*n+t.y*r}}function s(t,e){return{x:t*Math.cos(e),y:t*Math.sin(e)}}var a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M,j,T,z,E=t,P=e,S=n||20,C=.6*E,A=1.25*E,O=P*E/2,N=O*Math.cos(S*Math.PI/180),q=O-C,F=O+A,D=.25*E,I=F-D,R=1.5*D;for(a=2*Math.PI/P,l=o(N,O),u=l,q>N&&(u-=o(N,q)),h=o(N,I)-l,c=1.414*D/I,p=1,_=.01,q>N&&(_=(q*q-N*N)/(I*I-N*N)),d=_+(p-_)/4,f=r(E,P,S,3,_,d),m=r(E,P,S,3,d,p),y=f.concat(m.slice(1)),g=[],b=0;b<y.length;b++)v=i(y[b],a/4-l),y[b]=v,g[b]={x:v.x,y:-v.y};return w={x:g[6].x,y:g[6].y},M=s(q,-a/4+u),j={x:M.x,y:-M.y},T=s(F,a/4+h+c),z=s(F,3*a/4-h-c),k=i(w,a),x=[],x.push("M",g[6].x,g[6].y),x.push("C",g[5].x,g[5].y,g[4].x,g[4].y,g[3].x,g[3].y,g[2].x,g[2].y,g[1].x,g[1].y,g[0].x,g[0].y),N>q&&x.push("L",M.x,M.y),x.push("A",q,q,0,0,0,j.x,j.y),N>q&&x.push("L",y[0].x,y[0].y),x.push("C",y[1].x,y[1].y,y[2].x,y[2].y,y[3].x,y[3].y,y[4].x,y[4].y,y[5].x,y[5].y,y[6].x,y[6].y),T.y<z.y&&(x.push("A",R,R,0,0,0,T.x,T.y),x.push("A",F,F,0,0,0,z.x,z.y)),x.push("A",R,R,0,0,0,k.x,k.y),x}}(),e.exports={create_gear_tooth:o,create_internal_gear_tooth:i}},{}],gloo2:[function(e,n,r){!function(e,o){"function"==typeof t&&t.amd?t([],o):"undefined"!=typeof r?(n.exports=o(),"undefined"==typeof window&&(e.gloo2=n.exports)):e.gloo2=o()}(this,function(){var t,e,n,r,o,i,s;return s=function(t,e){var n,r,o,i,s,a,l,u;for(e=void 0===e?"periodic check":e,l=[];;){if(s=t.getError(),s==t.NO_ERROR||l&&s==l[l.length-1])break;(l.append||l.push).apply(l,[s])}if(l.length){for(u="",n=l,"object"!=typeof n||Array.isArray(n)||(n=Object.keys(n)),o=n.length,r=0;o>r;r+=1)i=n[r],u+=i;throw a=new Error("RuntimeError:"+("OpenGL got errors ("+e+"): "+u)),a.name="RuntimeError",a}},e=function(){this.__init__&&this.__init__.apply(this,arguments)},e.prototype._base_class=Object,e.prototype.__init__=function(t){if(this._gl=t,this._handle=null,this._create(),null===this._handle)throw"AssertionError: this._handle !== null"},e.prototype._create=function(){var t;throw t=new Error("NotImplementedError:"),t.name="NotImplementedError",t},r=function(){this.__init__&&this.__init__.apply(this,arguments)},r.prototype=Object.create(e.prototype),r.prototype._base_class=e.prototype,r.prototype.UTYPEMAP={"float":"uniform1fv",vec2:"uniform2fv",vec3:"uniform3fv",vec4:"uniform4fv","int":"uniform1iv",ivec2:"uniform2iv",ivec3:"uniform3iv",ivec4:"uniform4iv",bool:"uniform1iv",bvec2:"uniform2iv",bvec3:"uniform3iv",bvec4:"uniform4iv",mat2:"uniformMatrix2fv",mat3:"uniformMatrix3fv",mat4:"uniformMatrix4fv",sampler1D:"uniform1i",sampler2D:"uniform1i",sampler3D:"uniform1i"},r.prototype.ATYPEMAP={"float":"vertexAttrib1f",vec2:"vertexAttrib2f",vec3:"vertexAttrib3f",vec4:"vertexAttrib4f"},r.prototype.ATYPEINFO={"float":[1,5126],vec2:[2,5126],vec3:[3,5126],vec4:[4,5126]},r.prototype._create=function(){this._handle=this._gl.createProgram(),this._handles=[],this._unset_variables=[],this._validated=!1,this._samplers={},this._attributes={},this._known_invalid=[]},r.prototype["delete"]=function(){this._gl.deleteProgram(this._handle)},r.prototype.activate=function(){this._gl.useProgram(this._handle)},r.prototype.deactivate=function(){this._gl.useProgram(0)},r.prototype.set_shaders=function(t,e){var n,r,o,i,s,a,l,u,h,c,p,_,d;for(l=this._gl,this._linked=!1,d=l.createShader(l.VERTEX_SHADER),a=l.createShader(l.FRAGMENT_SHADER),p=[[t,d,"vertex"],[e,a,"fragment"]],h=0;2>h;h+=1)if(r=p[h],n=r[0],u=r[1],_=r[2],l.shaderSource(u,n),l.compileShader(u),c=l.getShaderParameter(u,l.COMPILE_STATUS),!c)throw s=l.getShaderInfoLog(u),i=new Error("RuntimeError:"+("errors in "+_+" shader:\n"+s)),i.name="RuntimeError",i;if(l.attachShader(this._handle,d),l.attachShader(this._handle,a),l.linkProgram(this._handle),!l.getProgramParameter(this._handle,l.LINK_STATUS))throw o=new Error("RuntimeError:Program link error:\n"+l.getProgramInfoLog(this._handle)),o.name="RuntimeError",o;l.detachShader(this._handle,d),l.detachShader(this._handle,a),l.deleteShader(d),l.deleteShader(a),this._unset_variables=this._get_active_attributes_and_uniforms(),this._handles={},this._known_invalid=[],this._linked=!0},r.prototype._get_active_attributes_and_uniforms=function(){var t,e,n,r,o,i,s,a,l,u,h,c,p,_,d,f,m,g,y,v,b,x,w,k,M;for(m=this._gl,x=new RegExp("(\\w+)\\s*(\\[(\\d+)\\])\\s*"),o=m.getProgramParameter(this._handle,m.ACTIVE_UNIFORMS),e=m.getProgramParameter(this._handle,m.ACTIVE_ATTRIBUTES),t=[],w=[],c=[[t,e,m.getActiveAttrib],[w,o,m.getActiveUniform]],"object"!=typeof c||Array.isArray(c)||(c=Object.keys(c)),_=c.length,p=0;_>p;p+=1)for(M=c[p],h=M,n=h[0],r=h[1],f=h[2],g=0;r>g;g+=1)if(y=f.call(m,this._handle,g),b=y.name,v=b.match(x))for(b=v.group(0),g=0;g<y.size;g+=1)(n.append||n.push).apply(n,[[""+b+"["+g+"]",y.type]]);else(n.append||n.push).apply(n,[[b,y.type]]);for(M=[],d=t,"object"!=typeof d||Array.isArray(d)||(d=Object.keys(d)),s=d.length,i=0;s>i;i+=1)k=d[i],(M.append||M.push).apply(M,[k[0]]);for(a=w,"object"!=typeof a||Array.isArray(a)||(a=Object.keys(a)),u=a.length,l=0;u>l;l+=1)k=a[l],(M.append||M.push).apply(M,[k[0]]);return M},r.prototype.set_texture=function(t,e){var n,r,o,i,s,a,l;if(!this._linked)throw s=new Error("RuntimeError:Cannot set uniform when program has no code"),s.name="RuntimeError",s;if(a="function"==typeof(n=this._handles).get?n.get(t,-1):n[t]||-1,0>a){if(((r=this._known_invalid).indexOf?r:Object.keys(r)).indexOf(t)>=0)return;if(a=this._gl.getUniformLocation(this._handle,t),((o=this._unset_variables).indexOf?o:Object.keys(o)).indexOf(t)>=0&&(this._unset_variables.remove||function(t){this.splice(this.indexOf(t),1)}).apply(this._unset_variables,[t]),this._handles[t]=a,0>a)return(this._known_invalid.append||this._known_invalid.push).apply(this._known_invalid,[t]),void console.log("Variable "+t+" is not an active uniform")}this.activate(),l=Object.keys(this._samplers).length,((i=this._samplers).indexOf?i:Object.keys(i)).indexOf(t)>=0&&(l=this._samplers[t][this._samplers[t].length-1]),this._samplers[t]=[e._target,e._handle,l],this._gl.uniform1i(a,l)},r.prototype.set_uniform=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_;if(!this._linked)throw u=new Error("RuntimeError:Cannot set uniform when program has no code"),u.name="RuntimeError",u;if(c="function"==typeof(o=this._handles).get?o.get(t,-1):o[t]||-1,r=1,0>c){if(((i=this._known_invalid).indexOf?i:Object.keys(i)).indexOf(t)>=0)return;if(c=this._gl.getUniformLocation(this._handle,t),((s=this._unset_variables).indexOf?s:Object.keys(s)).indexOf(t)>=0&&(this._unset_variables.remove||function(t){this.splice(this.indexOf(t),1)}).apply(this._unset_variables,[t]),0!=e.indexOf("mat")&&(r=Math.floor(n.length/this.ATYPEINFO[e][0])),r>1)for(p=0;r>p;p+=1)((a=this._unset_variables).indexOf?a:Object.keys(a)).indexOf(""+t+"["+p+"]")>=0&&(_=""+t+"["+p+"]",((l=this._unset_variables).indexOf?l:Object.keys(l)).indexOf(_)>=0&&(this._unset_variables.remove||function(t){this.splice(this.indexOf(t),1)}).apply(this._unset_variables,[_]));if(this._handles[t]=c,0>c)return this._known_invalid.add(t),void logger.info("Variable "+t+" is not an active uniform")}h=this.UTYPEMAP[e],this.activate(),this._gl[h](c,n)},r.prototype.set_attribute=function(t,e,n,r){var o,i,s,a,l,u,h,c,p,_,d,f,m,g;if(r=void 0===r?null:r,
135 !this._linked)throw h=new Error("RuntimeError:Cannot set attribute when program has no code"),h.name="RuntimeError",h;if(_="function"==typeof(i=this._handles).get?i.get(t,-1):i[t]||-1,0>_){if(((s=this._known_invalid).indexOf?s:Object.keys(s)).indexOf(t)>=0)return;if(_=this._gl.getAttribLocation(this._handle,t),((a=this._unset_variables).indexOf?a:Object.keys(a)).indexOf(t)>=0&&(this._unset_variables.remove||function(t){this.splice(this.indexOf(t),1)}).apply(this._unset_variables,[t]),this._handles[t]=_,0>_){if((this._known_invalid.append||this._known_invalid.push).apply(this._known_invalid,[t]),n&&0!=n[0]&&n[2]>0)return;return void console.log("Variable "+t+" is not an active attribute")}}this.activate(),null===n?(c=this.ATYPEMAP[e],this._attributes[t]=[0,_,c,r]):(l=n,g=l[0],m=l[1],d=l[2],u=this.ATYPEINFO[e],f=u[0],p=u[1],c="vertexAttribPointer",o=[f,p,this._gl.FALSE,m,d],this._attributes[t]=[g._handle,_,c,o])},r.prototype._pre_draw=function(){var t,e,n,r,o,i,s,a,l,u,h,c;this.activate(),r=this._samplers;for(c in r)r.hasOwnProperty(c)&&(c=r[c],n=c,l=n[0],a=n[1],u=n[2],this._gl.activeTexture(this._gl.TEXTURE0+u),this._gl.bindTexture(l,a));i=this._attributes;for(c in i)i.hasOwnProperty(c)&&(c=i[c],o=c,h=o[0],e=o[1],s=o[2],t=o[3],h?(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,h),this._gl.enableVertexAttribArray(e),this._gl[s].apply(this._gl,[e].concat(t))):(this._gl.bindBuffer(this._gl.ARRAY_BUFFER,null),this._gl.disableVertexAttribArray(e),this._gl[s].apply(this._gl,[e].concat(t))));this._validated||(this._validated=!0,this._validate())},r.prototype._validate=function(){var t;if(this._unset_variables.length&&console.log("Program has unset variables: "+this._unset_variables),this._gl.validateProgram(this._handle),!this._gl.getProgramParameter(this._handle,this._gl.VALIDATE_STATUS))throw console.log(this._gl.getProgramInfoLog(this._handle)),t=new Error("RuntimeError:Program validation error"),t.name="RuntimeError",t},r.prototype.draw=function(t,e){var r,o,i,a,l,u;if(!this._linked)throw a=new Error("RuntimeError:Cannot draw program if code has not been set"),a.name="RuntimeError",a;s(this._gl,"before draw"),e instanceof n?(this._pre_draw(),e.activate(),r=e._buffer_size/2,u=this._gl.UNSIGNED_SHORT,this._gl.drawElements(t,r,u,0),e.deactivate()):(o=e,l=o[0],r=o[1],r&&(this._pre_draw(),this._gl.drawArrays(t,l,r))),i=this._gl.getError(),s(this._gl,"after draw")},t=function(){this.__init__&&this.__init__.apply(this,arguments)},t.prototype=Object.create(e.prototype),t.prototype._base_class=e.prototype,t.prototype._target=null,t.prototype._usage=35048,t.prototype._create=function(){this._handle=this._gl.createBuffer(),this._buffer_size=0},t.prototype["delete"]=function(){this._gl.deleteBuffer(this._handle)},t.prototype.activate=function(){this._gl.bindBuffer(this._target,this._handle)},t.prototype.deactivate=function(){this._gl.bindBuffer(this._target,null)},t.prototype.set_size=function(t){t!=this._buffer_size&&(this.activate(),this._gl.bufferData(this._target,t,this._usage),this._buffer_size=t)},t.prototype.set_data=function(t,e){var n;this.activate(),n=e.length*e.BYTES_PER_ELEMENT,this._gl.bufferSubData(this._target,t,e)},i=function(){this.__init__&&this.__init__.apply(this,arguments)},i.prototype=Object.create(t.prototype),i.prototype._base_class=t.prototype,i.prototype._target=34962,n=function(){this.__init__&&this.__init__.apply(this,arguments)},n.prototype=Object.create(t.prototype),n.prototype._base_class=t.prototype,n.prototype._target=34963,o=function(){this.__init__&&this.__init__.apply(this,arguments)},o.prototype=Object.create(e.prototype),o.prototype._base_class=e.prototype,o.prototype._target=3553,o.prototype._types={Int8Array:5120,Uint8Array:5121,Int16Array:5122,Uint16Array:5123,Int32Array:5124,Int32Array:5125,Float32Array:5126},o.prototype._create=function(){this._handle=this._gl.createTexture(),this._shape_format=null},o.prototype["delete"]=function(){this._gl.deleteTexture(this._handle)},o.prototype.activate=function(){this._gl.bindTexture(this._target,this._handle)},o.prototype.deactivate=function(){this._gl.bindTexture(this._target,0)},o.prototype._get_alignment=function(t){var e,n,r,o,i;for(n=[4,8,2,1],r=n,"object"!=typeof r||Array.isArray(r)||(r=Object.keys(r)),i=r.length,o=0;i>o;o+=1)if(e=r[o],t%e==0)return e},o.prototype.set_wrapping=function(t,e){this.activate(),this._gl.texParameterf(this._target,this._gl.TEXTURE_WRAP_S,t),this._gl.texParameterf(this._target,this._gl.TEXTURE_WRAP_T,e)},o.prototype.set_interpolation=function(t,e){this.activate(),this._gl.texParameterf(this._target,this._gl.TEXTURE_MIN_FILTER,t),this._gl.texParameterf(this._target,this._gl.TEXTURE_MAG_FILTER,e)},o.prototype.set_size=function(t,e){var n,r,o;n=t,r=n[0],o=n[1],[r,o,e]!=this._shape_format&&(this._shape_format=[r,o,e],this.activate(),this._gl.texImage2D(this._target,0,e,o,r,0,e,this._gl.UNSIGNED_BYTE,null))},o.prototype.set_data=function(t,e,n){var r,o,i,s,a,l,u,h,c,p,_;if(this.activate(),l=this._shape_format[2],o=e,h=o[0],c=o[1],i=t,_=i[0],p=i[1],u="function"==typeof(s=this._types).get?s.get(n.constructor.name,null):s[n.constructor.name]||null,null===u)throw a=new Error("ValueError:"+("Type "+n.constructor.name+" not allowed for texture")),a.name="ValueError",a;r=this._get_alignment(e[e.length-2]*e[e.length-1]),4!=r&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,r),this._gl.texSubImage2D(this._target,0,p,_,c,h,l,u,n),4!=r&&this._gl.pixelStorei(this._gl.UNPACK_ALIGNMENT,4)},{Buffer:t,GlooObject:e,IndexBuffer:n,Program:r,Texture2D:o,VertexBuffer:i,check_error:s}})},{}],kiwi:[function(t,e,n){/*-----------------------------------------------------------------------------
136 | Copyright (c) 2014, Nucleic Development Team.
137 |
138 | Distributed under the terms of the Modified BSD License.
139 |
140 | The full license is in the file COPYING.txt, distributed with this software.
141 |----------------------------------------------------------------------------*/
142 var r;!function(t){function e(t){return t instanceof Array?new l(t):t.__iter__()}function n(t){return t instanceof Array?new u(t):t.__reversed__()}function r(t){return t.__next__()}function o(t){if(t instanceof Array)return t.slice();for(var e,n=[],r=t.__iter__();void 0!==(e=r.__next__());)n.push(e);return n}function i(t,e){if(t instanceof Array){for(var n=0,r=t.length;r>n;++n)if(e(t[n])===!1)return}else for(var o,i=t.__iter__();void 0!==(o=i.__next__());)if(e(o)===!1)return}function s(t,e){var n=[];if(t instanceof Array)for(var r=0,o=t.length;o>r;++r)n.push(e(t[r]));else for(var i,s=t.__iter__();void 0!==(i=s.__next__());)n.push(e(i));return n}function a(t,e){var n,r=[];if(t instanceof Array)for(var o=0,i=t.length;i>o;++o)n=t[o],e(n)&&r.push(n);else for(var s=t.__iter__();void 0!==(n=s.__next__());)e(n)&&r.push(n);return r}var l=function(){function t(t,e){"undefined"==typeof e&&(e=0),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[this._index++]},t.prototype.__iter__=function(){return this},t}();t.ArrayIterator=l;var u=function(){function t(t,e){"undefined"==typeof e&&(e=t.length),this._array=t,this._index=Math.max(0,Math.min(e,t.length))}return t.prototype.__next__=function(){return this._array[--this._index]},t.prototype.__iter__=function(){return this},t}();t.ReverseArrayIterator=u,t.iter=e,t.reversed=n,t.next=r,t.asArray=o,t.forEach=i,t.map=s,t.filter=a}(r||(r={}));/*-----------------------------------------------------------------------------
143 | Copyright (c) 2014, Nucleic Development Team.
144 |
145 | Distributed under the terms of the Modified BSD License.
146 |
147 | The full license is in the file COPYING.txt, distributed with this software.
148 |----------------------------------------------------------------------------*/
149 var r;!function(t){var e=function(){function t(t,e){this.first=t,this.second=e}return t.prototype.copy=function(){return new t(this.first,this.second)},t}();t.Pair=e}(r||(r={}));/*-----------------------------------------------------------------------------
150 | Copyright (c) 2014, Nucleic Development Team.
151 |
152 | Distributed under the terms of the Modified BSD License.
153 |
154 | The full license is in the file COPYING.txt, distributed with this software.
155 |----------------------------------------------------------------------------*/
156 var r;!function(t){function e(t,e,n){for(var r,o,i=0,s=t.length;s>0;)r=s>>1,o=i+r,n(t[o],e)<0?(i=o+1,s-=r+1):s=r;return i}function n(t,n,r){var o=e(t,n,r);if(o===t.length)return-1;var i=t[o];return 0!==r(i,n)?-1:o}function r(t,n,r){var o=e(t,n,r);if(o!==t.length){var i=t[o];if(0===r(i,n))return i}}function o(e,n){var r=t.asArray(e),o=r.length;if(1>=o)return r;r.sort(n);for(var i=[r[0]],s=1,a=0;o>s;++s){var l=r[s];0!==n(i[a],l)&&(i.push(l),++a)}return i}function i(t,e,n){for(var r=0,o=0,i=t.length,s=e.length;i>r&&s>o;){var a=n(t[r],e[o]);if(0>a)++r;else{if(!(a>0))return!1;++o}}return!0}function s(t,e,n){var r=t.length,o=e.length;if(r>o)return!1;for(var i=0,s=0;r>i&&o>s;){var a=n(t[i],e[s]);if(0>a)return!1;a>0?++s:(++i,++s)}return r>i?!1:!0}function a(t,e,n){for(var r=0,o=0,i=t.length,s=e.length,a=[];i>r&&s>o;){var l=t[r],u=e[o],h=n(l,u);0>h?(a.push(l),++r):h>0?(a.push(u),++o):(a.push(l),++r,++o)}for(;i>r;)a.push(t[r]),++r;for(;s>o;)a.push(e[o]),++o;return a}function l(t,e,n){for(var r=0,o=0,i=t.length,s=e.length,a=[];i>r&&s>o;){var l=t[r],u=e[o],h=n(l,u);0>h?++r:h>0?++o:(a.push(l),++r,++o)}return a}function u(t,e,n){for(var r=0,o=0,i=t.length,s=e.length,a=[];i>r&&s>o;){var l=t[r],u=e[o],h=n(l,u);0>h?(a.push(l),++r):h>0?++o:(++r,++o)}for(;i>r;)a.push(t[r]),++r;return a}function h(t,e,n){for(var r=0,o=0,i=t.length,s=e.length,a=[];i>r&&s>o;){var l=t[r],u=e[o],h=n(l,u);0>h?(a.push(l),++r):h>0?(a.push(u),++o):(++r,++o)}for(;i>r;)a.push(t[r]),++r;for(;s>o;)a.push(e[o]),++o;return a}t.lowerBound=e,t.binarySearch=n,t.binaryFind=r,t.asSet=o,t.setIsDisjoint=i,t.setIsSubset=s,t.setUnion=a,t.setIntersection=l,t.setDifference=u,t.setSymmetricDifference=h}(r||(r={}));/*-----------------------------------------------------------------------------
157 | Copyright (c) 2014, Nucleic Development Team.
158 |
159 | Distributed under the terms of the Modified BSD License.
160 |
161 | The full license is in the file COPYING.txt, distributed with this software.
162 |----------------------------------------------------------------------------*/
163 var r;!function(t){var e=function(){function e(){this._array=[]}return e.prototype.size=function(){return this._array.length},e.prototype.empty=function(){return 0===this._array.length},e.prototype.itemAt=function(t){return this._array[t]},e.prototype.takeAt=function(t){return this._array.splice(t,1)[0]},e.prototype.clear=function(){this._array=[]},e.prototype.swap=function(t){var e=this._array;this._array=t._array,t._array=e},e.prototype.__iter__=function(){return t.iter(this._array)},e.prototype.__reversed__=function(){return t.reversed(this._array)},e}();t.ArrayBase=e}(r||(r={}));/*-----------------------------------------------------------------------------
164 | Copyright (c) 2014, Nucleic Development Team.
165 |
166 | Distributed under the terms of the Modified BSD License.
167 |
168 | The full license is in the file COPYING.txt, distributed with this software.
169 |----------------------------------------------------------------------------*/
170 var r,o=this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);n.prototype=e.prototype,t.prototype=new n};!function(t){function e(t){return function(e,n){return t(e.first,n)}}function n(t,e,n){for(var r=0,o=0,i=t.length,s=e.length,a=[];i>r&&s>o;){var l=t[r],u=e[o],h=n(l.first,u.first);0>h?(a.push(l.copy()),++r):h>0?(a.push(u.copy()),++o):(a.push(u.copy()),++r,++o)}for(;i>r;)a.push(t[r].copy()),++r;for(;s>o;)a.push(e[o].copy()),++o;return a}var r=function(r){function i(t){r.call(this),this._compare=t,this._wrapped=e(t)}return o(i,r),i.prototype.comparitor=function(){return this._compare},i.prototype.indexOf=function(e){return t.binarySearch(this._array,e,this._wrapped)},i.prototype.contains=function(e){return t.binarySearch(this._array,e,this._wrapped)>=0},i.prototype.find=function(e){return t.binaryFind(this._array,e,this._wrapped)},i.prototype.setDefault=function(e,n){var r=this._array,o=t.lowerBound(r,e,this._wrapped);if(o===r.length){var i=new t.Pair(e,n());return r.push(i),i}var s=r[o];if(0!==this._compare(s.first,e)){var i=new t.Pair(e,n());return r.splice(o,0,i),i}return s},i.prototype.insert=function(e,n){var r=this._array,o=t.lowerBound(r,e,this._wrapped);if(o===r.length){var i=new t.Pair(e,n);return r.push(i),i}var s=r[o];if(0!==this._compare(s.first,e)){var i=new t.Pair(e,n);return r.splice(o,0,i),i}return s.second=n,s},i.prototype.update=function(e){var r=this;if(e instanceof i){var o=e;this._array=n(this._array,o._array,this._compare)}else t.forEach(e,function(t){r.insert(t.first,t.second)})},i.prototype.erase=function(e){var n=this._array,r=t.binarySearch(n,e,this._wrapped);return 0>r?void 0:n.splice(r,1)[0]},i.prototype.copy=function(){for(var t=new i(this._compare),e=t._array,n=this._array,r=0,o=n.length;o>r;++r)e.push(n[r].copy());return t},i}(t.ArrayBase);t.AssociativeArray=r}(r||(r={}));/*-----------------------------------------------------------------------------
171 | Copyright (c) 2014, Nucleic Development Team.
172 |
173 | Distributed under the terms of the Modified BSD License.
174 |
175 | The full license is in the file COPYING.txt, distributed with this software.
176 |----------------------------------------------------------------------------*/
177 var r;!function(t){function e(e,r){return e instanceof n?e._array:t.asSet(e,r)}var n=function(n){function r(t){n.call(this),this._compare=t}return o(r,n),r.prototype.comparitor=function(){return this._compare},r.prototype.indexOf=function(e){return t.binarySearch(this._array,e,this._compare)},r.prototype.contains=function(e){return t.binarySearch(this._array,e,this._compare)>=0},r.prototype.insert=function(e){var n=this._array,r=t.lowerBound(n,e,this._compare);return r===n.length?(n.push(e),!0):0!==this._compare(n[r],e)?(n.splice(r,0,e),!0):!1},r.prototype.erase=function(e){var n=this._array,r=t.binarySearch(n,e,this._compare);return 0>r?!1:(n.splice(r,1),!0)},r.prototype.copy=function(){var t=new r(this._compare);return t._array=this._array.slice(),t},r.prototype.isDisjoint=function(n){var r=this._compare,o=e(n,r);return t.setIsDisjoint(this._array,o,r)},r.prototype.isSubset=function(n){var r=this._compare,o=e(n,r);return t.setIsSubset(this._array,o,r)},r.prototype.isSuperset=function(n){var r=this._compare,o=e(n,r);return t.setIsSubset(o,this._array,r)},r.prototype.union=function(n){var o=this._compare,i=new r(o),s=e(n,o);return i._array=t.setUnion(this._array,s,o),i},r.prototype.intersection=function(n){var o=this._compare,i=new r(o),s=e(n,o);return i._array=t.setIntersection(this._array,s,o),i},r.prototype.difference=function(n){var o=this._compare,i=new r(o),s=e(n,o);return i._array=t.setDifference(this._array,s,o),i},r.prototype.symmetricDifference=function(n){var o=this._compare,i=new r(o),s=e(n,o);return i._array=t.setSymmetricDifference(this._array,s,o),i},r.prototype.unionUpdate=function(n){var r=this._compare,o=e(n,r);this._array=t.setUnion(this._array,o,r)},r.prototype.intersectionUpdate=function(n){var r=this._compare,o=e(n,r);this._array=t.setIntersection(this._array,o,r)},r.prototype.differenceUpdate=function(n){var r=this._compare,o=e(n,r);this._array=t.setDifference(this._array,o,r)},r.prototype.symmetricDifferenceUpdate=function(n){var r=this._compare,o=e(n,r);this._array=t.setSymmetricDifference(this._array,o,r)},r}(t.ArrayBase);t.UniqueArray=n}(r||(r={}));/*-----------------------------------------------------------------------------
178 | Copyright (c) 2014, Nucleic Development Team.
179 |
180 | Distributed under the terms of the Modified BSD License.
181 |
182 | The full license is in the file COPYING.txt, distributed with this software.
183 |----------------------------------------------------------------------------*/
184 /*-----------------------------------------------------------------------------
185 | Copyright (c) 2014, Nucleic Development Team.
186 |
187 | Distributed under the terms of the Modified BSD License.
188 |
189 | The full license is in the file COPYING.txt, distributed with this software.
190 |----------------------------------------------------------------------------*/
191 var i;!function(t){!function(t){t[t.Le=0]="Le",t[t.Ge=1]="Ge",t[t.Eq=2]="Eq"}(t.Operator||(t.Operator={}));var e=(t.Operator,function(){function e(e,r,o){"undefined"==typeof o&&(o=t.Strength.required),this._id=n++,this._operator=r,this._expression=e,this._strength=t.Strength.clip(o)}return e.Compare=function(t,e){return t.id()-e.id()},e.prototype.id=function(){return this._id},e.prototype.expression=function(){return this._expression},e.prototype.op=function(){return this._operator},e.prototype.strength=function(){return this._strength},e}());t.Constraint=e;var n=0}(i||(i={}));/*-----------------------------------------------------------------------------
192 | Copyright (c) 2014, Nucleic Development Team.
193 |
194 | Distributed under the terms of the Modified BSD License.
195 |
196 | The full license is in the file COPYING.txt, distributed with this software.
197 |----------------------------------------------------------------------------*/
198 var i;!function(t){function e(t){return new r.AssociativeArray(t)}t.createMap=e}(i||(i={}));/*-----------------------------------------------------------------------------
199 | Copyright (c) 2014, Nucleic Development Team.
200 |
201 | Distributed under the terms of the Modified BSD License.
202 |
203 | The full license is in the file COPYING.txt, distributed with this software.
204 |----------------------------------------------------------------------------*/
205 var i;!function(t){var e=function(){function t(t){"undefined"==typeof t&&(t=""),this._value=0,this._context=null,this._id=n++,this._name=t}return t.Compare=function(t,e){return t.id()-e.id()},t.prototype.id=function(){return this._id},t.prototype.name=function(){return this._name},t.prototype.setName=function(t){this._name=t},t.prototype.context=function(){return this._context},t.prototype.setContext=function(t){this._context=t},t.prototype.value=function(){return this._value},t.prototype.setValue=function(t){this._value=t},t}();t.Variable=e;var n=0}(i||(i={}));/*-----------------------------------------------------------------------------
206 | Copyright (c) 2014, Nucleic Development Team.
207 |
208 | Distributed under the terms of the Modified BSD License.
209 |
210 | The full license is in the file COPYING.txt, distributed with this software.
211 |----------------------------------------------------------------------------*/
212 var i;!function(t){function e(e){for(var n=0,r=function(){return 0},o=t.createMap(t.Variable.Compare),i=0,s=e.length;s>i;++i){var a=e[i];if("number"==typeof a)n+=a;else if(a instanceof t.Variable)o.setDefault(a,r).second+=1;else{if(!(a instanceof Array))throw new Error("invalid Expression argument: "+a);if(2!==a.length)throw new Error("array must have length 2");var l=a[0],u=a[1];if("number"!=typeof l)throw new Error("array item 0 must be a number");if(!(u instanceof t.Variable))throw new Error("array item 1 must be a variable");o.setDefault(u,r).second+=l}}return{terms:o,constant:n}}var n=function(){function t(){var t=e(arguments);this._terms=t.terms,this._constant=t.constant}return t.prototype.terms=function(){return this._terms},t.prototype.constant=function(){return this._constant},t.prototype.value=function(){var t=this._constant;return r.forEach(this._terms,function(e){t+=e.first.value()*e.second}),t},t}();t.Expression=n}(i||(i={}));/*-----------------------------------------------------------------------------
213 | Copyright (c) 2014, Nucleic Development Team.
214 |
215 | Distributed under the terms of the Modified BSD License.
216 |
217 | The full license is in the file COPYING.txt, distributed with this software.
218 |----------------------------------------------------------------------------*/
219 var i;!function(t){!function(t){function e(t,e,n,r){"undefined"==typeof r&&(r=1);var o=0;return o+=1e6*Math.max(0,Math.min(1e3,t*r)),o+=1e3*Math.max(0,Math.min(1e3,e*r)),o+=Math.max(0,Math.min(1e3,n*r))}function n(e){return Math.max(0,Math.min(t.required,e))}t.create=e,t.required=e(1e3,1e3,1e3),t.strong=e(1,0,0),t.medium=e(0,1,0),t.weak=e(0,0,1),t.clip=n}(t.Strength||(t.Strength={}));t.Strength}(i||(i={}));/*-----------------------------------------------------------------------------
220 | Copyright (c) 2014, Nucleic Development Team.
221 |
222 | Distributed under the terms of the Modified BSD License.
223 |
224 | The full license is in the file COPYING.txt, distributed with this software.
225 |----------------------------------------------------------------------------*/
226 var i;!function(t){function e(t){var e=1e-8;return 0>t?e>-t:e>t}function n(){return t.createMap(t.Constraint.Compare)}function r(){return t.createMap(l.Compare)}function o(){return t.createMap(t.Variable.Compare)}function i(){return t.createMap(t.Variable.Compare)}var s=function(){function s(){this._cnMap=n(),this._rowMap=r(),this._varMap=o(),this._editMap=i(),this._infeasibleRows=[],this._objective=new h,this._artificial=null,this._idTick=0}return s.prototype.addConstraint=function(t){var n=this._cnMap.find(t);if(void 0!==n)throw new Error("duplicate constraint");var r=this._createRow(t),o=r.row,i=r.tag,s=this._chooseSubject(o,i);if(0===s.type()&&o.allDummies()){if(!e(o.constant()))throw new Error("unsatifiable constraint");s=i.marker}if(0===s.type()){if(!this._addWithArtificialVariable(o))throw new Error("unsatisfiable constraint")}else o.solveFor(s),this._substitute(s,o),this._rowMap.insert(s,o);this._cnMap.insert(t,i),this._optimize(this._objective)},s.prototype.removeConstraint=function(t){var e=this._cnMap.erase(t);if(void 0===e)throw new Error("unknown constraint");this._removeConstraintEffects(t,e.second);var n=e.second.marker,r=this._rowMap.erase(n);if(void 0===r){var o=this._getMarkerLeavingSymbol(n);if(0===o.type())throw new Error("failed to find leaving row");r=this._rowMap.erase(o),r.second.solveForEx(o,n),this._substitute(n,r.second)}this._optimize(this._objective)},s.prototype.hasConstraint=function(t){return this._cnMap.contains(t)},s.prototype.addEditVariable=function(e,n){var r=this._editMap.find(e);if(void 0!==r)throw new Error("duplicate edit variable");if(n=t.Strength.clip(n),n===t.Strength.required)throw new Error("bad required strength");var o=new t.Expression(e),i=new t.Constraint(o,2,n);this.addConstraint(i);var s=this._cnMap.find(i).second,a={tag:s,constraint:i,constant:0};this._editMap.insert(e,a)},s.prototype.removeEditVariable=function(t){var e=this._editMap.erase(t);if(void 0===e)throw new Error("unknown edit variable");this.removeConstraint(e.second.constraint)},s.prototype.hasEditVariable=function(t){return this._editMap.contains(t)},s.prototype.suggestValue=function(t,e){var n=this._editMap.find(t);if(void 0===n)throw new Error("unknown edit variable");var r=this._rowMap,o=n.second,i=e-o.constant;o.constant=e;var s=o.tag.marker,a=r.find(s);if(void 0!==a)return a.second.add(-i)<0&&this._infeasibleRows.push(s),void this._dualOptimize();var l=o.tag.other,a=r.find(l);if(void 0!==a)return a.second.add(i)<0&&this._infeasibleRows.push(l),void this._dualOptimize();for(var u=0,h=r.size();h>u;++u){var a=r.itemAt(u),c=a.second,p=c.coefficientFor(s);0!==p&&c.add(i*p)<0&&1!==a.first.type()&&this._infeasibleRows.push(a.first)}this._dualOptimize()},s.prototype.updateVariables=function(){for(var t=this._varMap,e=this._rowMap,n=0,r=t.size();r>n;++n){var o=t.itemAt(n),i=e.find(o.second);void 0!==i?o.first.setValue(i.second.constant()):o.first.setValue(0)}},s.prototype._getVarSymbol=function(t){var e=this,n=function(){return e._makeSymbol(1)};return this._varMap.setDefault(t,n).second},s.prototype._createRow=function(n){for(var r=n.expression(),o=new h(r.constant()),i=r.terms(),s=0,a=i.size();a>s;++s){var l=i.itemAt(s);if(!e(l.second)){var c=this._getVarSymbol(l.first),p=this._rowMap.find(c);void 0!==p?o.insertRow(p.second,l.second):o.insertSymbol(c,l.second)}}var _=this._objective,d=n.strength(),f={marker:u,other:u};switch(n.op()){case 0:case 1:var m=0===n.op()?1:-1,g=this._makeSymbol(2);if(f.marker=g,o.insertSymbol(g,m),d<t.Strength.required){var y=this._makeSymbol(3);f.other=y,o.insertSymbol(y,-m),_.insertSymbol(y,d)}break;case 2:if(d<t.Strength.required){var v=this._makeSymbol(3),b=this._makeSymbol(3);f.marker=v,f.other=b,o.insertSymbol(v,-1),o.insertSymbol(b,1),_.insertSymbol(v,d),_.insertSymbol(b,d)}else{var x=this._makeSymbol(4);f.marker=x,o.insertSymbol(x)}}return o.constant()<0&&o.reverseSign(),{row:o,tag:f}},s.prototype._chooseSubject=function(t,e){for(var n=t.cells(),r=0,o=n.size();o>r;++r){var i=n.itemAt(r);if(1===i.first.type())return i.first}var s=e.marker.type();return(2===s||3===s)&&t.coefficientFor(e.marker)<0?e.marker:(s=e.other.type(),(2===s||3===s)&&t.coefficientFor(e.other)<0?e.other:u)},s.prototype._addWithArtificialVariable=function(t){var n=this._makeSymbol(2);this._rowMap.insert(n,t.copy()),this._artificial=t.copy(),this._optimize(this._artificial);var r=e(this._artificial.constant());this._artificial=null;var o=this._rowMap.erase(n);if(void 0!==o){var i=o.second;if(i.isConstant())return r;var s=this._anyPivotableSymbol(i);if(0===s.type())return!1;i.solveForEx(n,s),this._substitute(s,i),this._rowMap.insert(s,i)}for(var a=this._rowMap,l=0,u=a.size();u>l;++l)a.itemAt(l).second.removeSymbol(n);return this._objective.removeSymbol(n),r},s.prototype._substitute=function(t,e){for(var n=this._rowMap,r=0,o=n.size();o>r;++r){var i=n.itemAt(r);i.second.substitute(t,e),i.second.constant()<0&&1!==i.first.type()&&this._infeasibleRows.push(i.first)}this._objective.substitute(t,e),this._artificial&&this._artificial.substitute(t,e)},s.prototype._optimize=function(t){for(;;){var e=this._getEnteringSymbol(t);if(0===e.type())return;var n=this._getLeavingSymbol(e);if(0===n.type())throw new Error("the objective is unbounded");var r=this._rowMap.erase(n).second;r.solveForEx(n,e),this._substitute(e,r),this._rowMap.insert(e,r)}},s.prototype._dualOptimize=function(){for(var t=this._rowMap,e=this._infeasibleRows;0!==e.length;){var n=e.pop(),r=t.find(n);if(void 0!==r&&r.second.constant()<0){var o=this._getDualEnteringSymbol(r.second);if(0===o.type())throw new Error("dual optimize failed");var i=r.second;t.erase(n),i.solveForEx(n,o),this._substitute(o,i),t.insert(o,i)}}},s.prototype._getEnteringSymbol=function(t){for(var e=t.cells(),n=0,r=e.size();r>n;++n){var o=e.itemAt(n),i=o.first;if(o.second<0&&4!==i.type())return i}return u},s.prototype._getDualEnteringSymbol=function(t){for(var e=Number.MAX_VALUE,n=u,r=t.cells(),o=0,i=r.size();i>o;++o){var s=r.itemAt(o),a=s.first,l=s.second;if(l>0&&4!==a.type()){var h=this._objective.coefficientFor(a),c=h/l;e>c&&(e=c,n=a)}}return n},s.prototype._getLeavingSymbol=function(t){for(var e=Number.MAX_VALUE,n=u,r=this._rowMap,o=0,i=r.size();i>o;++o){var s=r.itemAt(o),a=s.first;if(1!==a.type()){var l=s.second,h=l.coefficientFor(t);if(0>h){var c=-l.constant()/h;e>c&&(e=c,n=a)}}}return n},s.prototype._getMarkerLeavingSymbol=function(t){for(var e=Number.MAX_VALUE,n=e,r=e,o=u,i=o,s=o,a=o,l=this._rowMap,h=0,c=l.size();c>h;++h){var p=l.itemAt(h),_=p.second,d=_.coefficientFor(t);if(0!==d){var f=p.first;if(1===f.type())a=f;else if(0>d){var m=-_.constant()/d;n>m&&(n=m,i=f)}else{var m=_.constant()/d;r>m&&(r=m,s=f)}}}return i!==o?i:s!==o?s:a},s.prototype._removeConstraintEffects=function(t,e){3===e.marker.type()&&this._removeMarkerEffects(e.marker,t.strength()),3===e.other.type()&&this._removeMarkerEffects(e.other,t.strength())},s.prototype._removeMarkerEffects=function(t,e){var n=this._rowMap.find(t);void 0!==n?this._objective.insertRow(n.second,-e):this._objective.insertSymbol(t,-e)},s.prototype._anyPivotableSymbol=function(t){for(var e=t.cells(),n=0,r=e.size();r>n;++n){var o=e.itemAt(n),i=o.first.type();if(2===i||3===i)return o.first}return u},s.prototype._makeSymbol=function(t){return new l(t,this._idTick++)},s}();t.Solver=s;var a;!function(t){t[t.Invalid=0]="Invalid",t[t.External=1]="External",t[t.Slack=2]="Slack",t[t.Error=3]="Error",t[t.Dummy=4]="Dummy"}(a||(a={}));var l=function(){function t(t,e){this._id=e,this._type=t}return t.Compare=function(t,e){return t.id()-e.id()},t.prototype.id=function(){return this._id},t.prototype.type=function(){return this._type},t}(),u=new l(0,-1),h=function(){function n(e){"undefined"==typeof e&&(e=0),this._cellMap=t.createMap(l.Compare),this._constant=e}return n.prototype.cells=function(){return this._cellMap},n.prototype.constant=function(){return this._constant},n.prototype.isConstant=function(){return this._cellMap.empty()},n.prototype.allDummies=function(){for(var t=this._cellMap,e=0,n=t.size();n>e;++e){var r=t.itemAt(e);if(4!==r.first.type())return!1}return!0},n.prototype.copy=function(){var t=new n(this._constant);return t._cellMap=this._cellMap.copy(),t},n.prototype.add=function(t){return this._constant+=t},n.prototype.insertSymbol=function(t,n){"undefined"==typeof n&&(n=1);var r=this._cellMap.setDefault(t,function(){return 0});e(r.second+=n)&&this._cellMap.erase(t)},n.prototype.insertRow=function(t,e){"undefined"==typeof e&&(e=1),this._constant+=t._constant*e;for(var n=t._cellMap,r=0,o=n.size();o>r;++r){var i=n.itemAt(r);this.insertSymbol(i.first,i.second*e)}},n.prototype.removeSymbol=function(t){this._cellMap.erase(t)},n.prototype.reverseSign=function(){this._constant=-this._constant;for(var t=this._cellMap,e=0,n=t.size();n>e;++e){var r=t.itemAt(e);r.second=-r.second}},n.prototype.solveFor=function(t){var e=this._cellMap,n=e.erase(t),r=-1/n.second;this._constant*=r;for(var o=0,i=e.size();i>o;++o)e.itemAt(o).second*=r},n.prototype.solveForEx=function(t,e){this.insertSymbol(t,-1),this.solveFor(e)},n.prototype.coefficientFor=function(t){var e=this._cellMap.find(t);return void 0!==e?e.second:0},n.prototype.substitute=function(t,e){var n=this._cellMap.erase(t);void 0!==n&&this.insertRow(e,n.second)},n}()}(i||(i={})),/*-----------------------------------------------------------------------------
227 | Copyright (c) 2014, Nucleic Development Team.
228 |
229 | Distributed under the terms of the Modified BSD License.
230 |
231 | The full license is in the file COPYING.txt, distributed with this software.
232 |----------------------------------------------------------------------------*/
233 e.exports=i},{}],numeral:[function(t,e,n){function r(t,e,n,r){var o,i,s=Math.pow(10,e);return i=(n(t*s)/s).toFixed(e),r&&(o=new RegExp("0{1,"+r+"}$"),i=i.replace(o,"")),i}function o(t,e,n,r){var o;return o=e.indexOf("$")>-1?i(t,e,n,r):e.indexOf("%")>-1?s(t,e,n,r):e.indexOf(":")>-1?a(t,e,n):l(t,e,n,r)}function i(t,e,n,r){var o,i,s=e.indexOf("$"),a=e.indexOf("("),u=e.indexOf("-"),h="";return e.indexOf(" $")>-1?(h=" ",e=e.replace(" $","")):e.indexOf("$ ")>-1?(h=" ",e=e.replace("$ ","")):e=e.replace("$",""),i=l(t,e,n,r),1>=s?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),o=1,(a>s||u>s)&&(o=0),i.splice(o,0,n.currency.symbol+h),i=i.join("")):i=n.currency.symbol+h+i:i.indexOf(")")>-1?(i=i.split(""),i.splice(-1,0,h+n.currency.symbol),i=i.join("")):i=i+h+n.currency.symbol,i}function s(t,e,n,r){var o,i="",t=100*t;return e.indexOf(" %")>-1?(i=" ",e=e.replace(" %","")):e=e.replace("%",""),o=l(t,e,n,r),o.indexOf(")")>-1?(o=o.split(""),o.splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o}function a(t,e){var n=Math.floor(t/60/60),r=Math.floor((t-60*n*60)/60),o=Math.round(t-60*n*60-60*r);return n+":"+(10>r?"0"+r:r)+":"+(10>o?"0"+o:o)}function l(t,e,n,o){var i,s,a,l,u,h,c=!1,p=!1,_=!1,d="",f=!1,m=!1,g=!1,y=!1,v=!1,b="",x="",w=Math.abs(t),k=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],M="",j=!1;if(e.indexOf("(")>-1?(c=!0,e=e.slice(1,-1)):e.indexOf("+")>-1&&(p=!0,e=e.replace(/\+/g,"")),e.indexOf("a")>-1&&(f=e.indexOf("aK")>=0,m=e.indexOf("aM")>=0,g=e.indexOf("aB")>=0,y=e.indexOf("aT")>=0,v=f||m||g||y,e.indexOf(" a")>-1?(d=" ",e=e.replace(" a","")):e=e.replace("a",""),w>=Math.pow(10,12)&&!v||y?(d+=n.abbreviations.trillion,t/=Math.pow(10,12)):w<Math.pow(10,12)&&w>=Math.pow(10,9)&&!v||g?(d+=n.abbreviations.billion,t/=Math.pow(10,9)):w<Math.pow(10,9)&&w>=Math.pow(10,6)&&!v||m?(d+=n.abbreviations.million,t/=Math.pow(10,6)):(w<Math.pow(10,6)&&w>=Math.pow(10,3)&&!v||f)&&(d+=n.abbreviations.thousand,t/=Math.pow(10,3))),e.indexOf("b")>-1)for(e.indexOf(" b")>-1?(b=" ",e=e.replace(" b","")):e=e.replace("b",""),a=0;a<=k.length;a++)if(i=Math.pow(1024,a),s=Math.pow(1024,a+1),t>=i&&s>t){b+=k[a],i>0&&(t/=i);break}return e.indexOf("o")>-1&&(e.indexOf(" o")>-1?(x=" ",e=e.replace(" o","")):e=e.replace("o",""),x+=n.ordinal(t)),e.indexOf("[.]")>-1&&(_=!0,e=e.replace("[.]",".")),l=t.toString().split(".")[0],u=e.split(".")[1],h=e.indexOf(","),u?(u.indexOf("[")>-1?(u=u.replace("]",""),u=u.split("["),M=r(t,u[0].length+u[1].length,o,u[1].length)):M=r(t,u.length,o),l=M.split(".")[0],M=M.split(".")[1].length?n.delimiters.decimal+M.split(".")[1]:"",_&&0===Number(M.slice(1))&&(M="")):l=r(t,null,o),l.indexOf("-")>-1&&(l=l.slice(1),j=!0),h>-1&&(l=l.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+n.delimiters.thousands)),0===e.indexOf(".")&&(l=""),(c&&j?"(":"")+(!c&&j?"-":"")+(!j&&p?"+":"")+l+M+(x?x:"")+(d?d:"")+(b?b:"")+(c&&j?")":"")}function u(t,e){p[t]=e}function h(t,e,n,r){return o(Number(t),c.isString(e)?e:_,c.isString(n)?p[n]:p[d],c.isUndefined(r)?Math.round:r)}/*!
234 * numeral.js
235 * version : 1.5.3
236 * author : Adam Draper
237 * license : MIT
238 * http://adamwdraper.github.com/Numeral-js/
239 */
240 var c=t("underscore"),p={},_="0,0",d="en";u("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(t){var e=t%10;return 1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},currency:{symbol:"$"}}),e.exports={format:h}},{underscore:"underscore"}]},{},["main"])}();/*
241 Copyright (c) 2012, Continuum Analytics, Inc.
242 All rights reserved.
243
244 Redistribution and use in source and binary forms, with or without modification,
245 are permitted provided that the following conditions are met:
246
247 Redistributions of source code must retain the above copyright notice,
248 this list of conditions and the following disclaimer.
249
250 Redistributions in binary form must reproduce the above copyright notice,
251 this list of conditions and the following disclaimer in the documentation
252 and/or other materials provided with the distribution.
253
254 Neither the name of Continuum Analytics nor the names of any contributors
255 may be used to endorse or promote products derived from this software
256 without specific prior written permission.
257
258 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
259 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
260 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
261 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
262 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
263 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
264 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
265 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
266 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
267 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
268 THE POSSIBILITY OF SUCH DAMAGE.
269 */
@@ -0,0 +1,13
1 /*! jQuery UI - v1.11.4 - 2016-01-20
2 * http://jqueryui.com
3 * Includes: core.js, widget.js, mouse.js, position.js, draggable.js, droppable.js, resizable.js, selectable.js, sortable.js, accordion.js, autocomplete.js, button.js, datepicker.js, dialog.js, menu.js, progressbar.js, selectmenu.js, slider.js, spinner.js, tabs.js, tooltip.js, effect.js, effect-blind.js, effect-bounce.js, effect-clip.js, effect-drop.js, effect-explode.js, effect-fade.js, effect-fold.js, effect-highlight.js, effect-puff.js, effect-pulsate.js, effect-scale.js, effect-shake.js, effect-size.js, effect-slide.js, effect-transfer.js
4 * Copyright jQuery Foundation and other contributors; Licensed MIT */
5
6 (function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function s(e){for(var t,i;e.length&&e[0]!==document;){if(t=e.css("position"),("absolute"===t||"relative"===t||"fixed"===t)&&(i=parseInt(e.css("zIndex"),10),!isNaN(i)&&0!==i))return i;e=e.parent()}return 0}function n(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},e.extend(this._defaults,this.regional[""]),this.regional.en=e.extend(!0,{},this.regional[""]),this.regional["en-US"]=e.extend(!0,{},this.regional.en),this.dpDiv=a(e("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function a(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.delegate(i,"mouseout",function(){e(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",o)}function o(){e.datepicker._isDisabledDatepicker(v.inline?v.dpDiv.parent()[0]:v.input[0])||(e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),e(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&e(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&e(this).addClass("ui-datepicker-next-hover"))}function r(t,i){e.extend(t,i);for(var s in i)null==i[s]&&(t[s]=i[s]);return t}function h(e){return function(){var t=this.element.val();e.apply(this,arguments),this._refresh(),t!==this.element.val()&&this._trigger("change")}}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var l=0,u=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,n=u.call(arguments,1),a=0,o=n.length;o>a;a++)for(i in n[a])s=n[a][i],n[a].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(n){var a="string"==typeof n,o=u.call(arguments,1),r=this;return a?this.each(function(){var i,a=e.data(this,s);return"instance"===n?(r=a,!1):a?e.isFunction(a[n])&&"_"!==n.charAt(0)?(i=a[n].apply(a,o),i!==a&&void 0!==i?(r=i&&i.jquery?r.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+n+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+n+"'")}):(o.length&&(n=e.widget.extend.apply(null,[n].concat(o))),this.each(function(){var t=e.data(this,s);t?(t.option(n||{}),t._init&&t._init()):e.data(this,s,new i(n,this))})),r}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=l++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget;var d=!1;e(document).mouseup(function(){d=!1}),e.widget("ui.mouse",{version:"1.11.4",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):void 0}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!d){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var i=this,s=1===t.which,n="string"==typeof this.options.cancel&&t.target.nodeName?e(t.target).closest(this.options.cancel).length:!1;return s&&!n&&this._mouseCapture(t)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){i.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(t)!==!1,!this._mouseStarted)?(t.preventDefault(),!0):(!0===e.data(t.target,this.widgetName+".preventClickEvent")&&e.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return i._mouseMove(e)},this._mouseUpDelegate=function(e){return i._mouseUp(e)},this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),d=!0,!0)):!0}},_mouseMove:function(t){if(this._mouseMoved){if(e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button)return this._mouseUp(t);if(!t.which)return this._mouseUp(t)}return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),d=!1,!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),T={};return b=s(_),_[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?y.left+=m:"center"===n.at[0]&&(y.left+=m/2),"bottom"===n.at[1]?y.top+=g:"center"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),D=d+f+i(this,"marginRight")+w.width,S=c+b+i(this,"marginBottom")+w.height,M=e.extend({},y),C=t(T.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?M.left-=d:"center"===n.my[0]&&(M.left-=d/2),"bottom"===n.my[1]?M.top-=c:"center"===n.my[1]&&(M.top-=c/2),M.left+=C[0],M.top+=C[1],a||(M.left=h(M.left),M.top=h(M.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](M,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+C[0],p[1]+C[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-M.left,i=t+m-d,s=v.top-M.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:M.left,top:M.top,width:d,height:c},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(M,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.draggable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){return(this.helper||this.element).is(".ui-draggable-dragging")?(this.destroyOnClear=!0,void 0):(this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._removeHandleClassName(),this._mouseDestroy(),void 0)},_mouseCapture:function(t){var i=this.options;return this._blurActiveElement(t),this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0):!1)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=e(this);return e("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=this.document[0];if(this.handleElement.is(t.target))try{i.activeElement&&"body"!==i.activeElement.nodeName.toLowerCase()&&e(i.activeElement).blur()}catch(s){}},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return"fixed"===e(this).css("position")}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._normalizeRightBottom(),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.focus(),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper),n=s?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return n.parents("body").length||n.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s&&n[0]===this.element[0]&&this._setPositionRelative(),n[0]===this.element[0]||/(fixed|absolute)/.test(n.css("position"))||n.css("position","absolute"),n},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==i&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options,a=this.document[0];return this.relativeContainer=null,n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):"document"===n.containment?(this.containment=[0,0,e(a).width()-this.helperProportions.width-this.margins.left,(e(a).height()||a.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],void 0):n.containment.constructor===Array?(this.containment=n.containment,void 0):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t=/(scroll|auto)/.test(i.css("overflow")),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=i),void 0):(this.containment=null,void 0)},_convertPositionTo:function(e,t){t||(t=this.position);var i="absolute"===e?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(e,t){var i,s,n,a,o=this.options,r=this._isRootNode(this.scrollParent[0]),h=e.pageX,l=e.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,e.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),e.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),e.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),e.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(h=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}
7 },_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_normalizeRightBottom:function(){"y"!==this.options.axis&&"auto"!==this.helper.css("right")&&(this.helper.width(this.helper.width()),this.helper.css("right","auto")),"x"!==this.options.axis&&"auto"!==this.helper.css("bottom")&&(this.helper.height(this.helper.height()),this.helper.css("bottom","auto"))},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),s.offset=this.positionAbs),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,s){var n=e.extend({},i,{item:s.element});s.sortables=[],e(s.options.connectToSortable).each(function(){var i=e(this).sortable("instance");i&&!i.options.disabled&&(s.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,n))})},stop:function(t,i,s){var n=e.extend({},i,{item:s.element});s.cancelHelperRemoval=!1,e.each(s.sortables,function(){var e=this;e.isOver?(e.isOver=0,s.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,n))})},drag:function(t,i,s){e.each(s.sortables,function(){var n=!1,a=this;a.positionAbs=s.positionAbs,a.helperProportions=s.helperProportions,a.offset.click=s.offset.click,a._intersectsWith(a.containerCache)&&(n=!0,e.each(s.sortables,function(){return this.positionAbs=s.positionAbs,this.helperProportions=s.helperProportions,this.offset.click=s.offset.click,this!==a&&this._intersectsWith(this.containerCache)&&e.contains(a.element[0],this.element[0])&&(n=!1),n})),n?(a.isOver||(a.isOver=1,s._parent=i.helper.parent(),a.currentItem=i.helper.appendTo(a.element).data("ui-sortable-item",!0),a.options._helper=a.options.helper,a.options.helper=function(){return i.helper[0]},t.target=a.currentItem[0],a._mouseCapture(t,!0),a._mouseStart(t,!0,!0),a.offset.click.top=s.offset.click.top,a.offset.click.left=s.offset.click.left,a.offset.parent.left-=s.offset.parent.left-a.offset.parent.left,a.offset.parent.top-=s.offset.parent.top-a.offset.parent.top,s._trigger("toSortable",t),s.dropped=a.element,e.each(s.sortables,function(){this.refreshPositions()}),s.currentItem=s.element,a.fromOutside=s),a.currentItem&&(a._mouseDrag(t),i.position=a.position)):a.isOver&&(a.isOver=0,a.cancelHelperRemoval=!0,a.options._revert=a.options.revert,a.options.revert=!1,a._trigger("out",t,a._uiHash(a)),a._mouseStop(t,!0),a.options.revert=a.options._revert,a.options.helper=a.options._helper,a.placeholder&&a.placeholder.remove(),i.helper.appendTo(s._parent),s._refreshOffsets(t),i.position=s._generatePosition(t,!0),s._trigger("fromSortable",t),s.dropped=!1,e.each(s.sortables,function(){this.refreshPositions()}))})}}),e.ui.plugin.add("draggable","cursor",{start:function(t,i,s){var n=e("body"),a=s.options;n.css("cursor")&&(a._cursor=n.css("cursor")),n.css("cursor",a.cursor)},stop:function(t,i,s){var n=s.options;n._cursor&&e("body").css("cursor",n._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("opacity")&&(a._opacity=n.css("opacity")),n.css("opacity",a.opacity)},stop:function(t,i,s){var n=s.options;n._opacity&&e(i.helper).css("opacity",n._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(e,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,s){var n=s.options,a=!1,o=s.scrollParentNotHidden[0],r=s.document[0];o!==r&&"HTML"!==o.tagName?(n.axis&&"x"===n.axis||(s.overflowOffset.top+o.offsetHeight-t.pageY<n.scrollSensitivity?o.scrollTop=a=o.scrollTop+n.scrollSpeed:t.pageY-s.overflowOffset.top<n.scrollSensitivity&&(o.scrollTop=a=o.scrollTop-n.scrollSpeed)),n.axis&&"y"===n.axis||(s.overflowOffset.left+o.offsetWidth-t.pageX<n.scrollSensitivity?o.scrollLeft=a=o.scrollLeft+n.scrollSpeed:t.pageX-s.overflowOffset.left<n.scrollSensitivity&&(o.scrollLeft=a=o.scrollLeft-n.scrollSpeed))):(n.axis&&"x"===n.axis||(t.pageY-e(r).scrollTop()<n.scrollSensitivity?a=e(r).scrollTop(e(r).scrollTop()-n.scrollSpeed):e(window).height()-(t.pageY-e(r).scrollTop())<n.scrollSensitivity&&(a=e(r).scrollTop(e(r).scrollTop()+n.scrollSpeed))),n.axis&&"y"===n.axis||(t.pageX-e(r).scrollLeft()<n.scrollSensitivity?a=e(r).scrollLeft(e(r).scrollLeft()-n.scrollSpeed):e(window).width()-(t.pageX-e(r).scrollLeft())<n.scrollSensitivity&&(a=e(r).scrollLeft(e(r).scrollLeft()+n.scrollSpeed)))),a!==!1&&e.ui.ddmanager&&!n.dropBehaviour&&e.ui.ddmanager.prepareOffsets(s,t)}}),e.ui.plugin.add("draggable","snap",{start:function(t,i,s){var n=s.options;s.snapElements=[],e(n.snap.constructor!==String?n.snap.items||":data(ui-draggable)":n.snap).each(function(){var t=e(this),i=t.offset();this!==s.element[0]&&s.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left:i.left})})},drag:function(t,i,s){var n,a,o,r,h,l,u,d,c,p,f=s.options,m=f.snapTolerance,g=i.offset.left,v=g+s.helperProportions.width,y=i.offset.top,b=y+s.helperProportions.height;for(c=s.snapElements.length-1;c>=0;c--)h=s.snapElements[c].left-s.margins.left,l=h+s.snapElements[c].width,u=s.snapElements[c].top-s.margins.top,d=u+s.snapElements[c].height,h-m>v||g>l+m||u-m>b||y>d+m||!e.contains(s.snapElements[c].item.ownerDocument,s.snapElements[c].item)?(s.snapElements[c].snapping&&s.options.snap.release&&s.options.snap.release.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(n=m>=Math.abs(u-b),a=m>=Math.abs(d-y),o=m>=Math.abs(h-v),r=m>=Math.abs(l-g),n&&(i.position.top=s._convertPositionTo("relative",{top:u-s.helperProportions.height,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h-s.helperProportions.width}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l}).left)),p=n||a||o||r,"outer"!==f.snapMode&&(n=m>=Math.abs(u-y),a=m>=Math.abs(d-b),o=m>=Math.abs(h-g),r=m>=Math.abs(l-v),n&&(i.position.top=s._convertPositionTo("relative",{top:u,left:0}).top),a&&(i.position.top=s._convertPositionTo("relative",{top:d-s.helperProportions.height,left:0}).top),o&&(i.position.left=s._convertPositionTo("relative",{top:0,left:h}).left),r&&(i.position.left=s._convertPositionTo("relative",{top:0,left:l-s.helperProportions.width}).left)),!s.snapElements[c].snapping&&(n||a||o||r||p)&&s.options.snap.snap&&s.options.snap.snap.call(s.element,t,e.extend(s._uiHash(),{snapItem:s.snapElements[c].item})),s.snapElements[c].snapping=n||a||o||r||p)}}),e.ui.plugin.add("draggable","stack",{start:function(t,i,s){var n,a=s.options,o=e.makeArray(e(a.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});o.length&&(n=parseInt(e(o[0]).css("zIndex"),10)||0,e(o).each(function(t){e(this).css("zIndex",n+t)}),this.css("zIndex",n+o.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i,s){var n=e(i.helper),a=s.options;n.css("zIndex")&&(a._zIndex=n.css("zIndex")),n.css("zIndex",a.zIndex)},stop:function(t,i,s){var n=s.options;n._zIndex&&e(i.helper).css("zIndex",n._zIndex)}}),e.ui.draggable,e.widget("ui.droppable",{version:"1.11.4",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t,i=this.options,s=i.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(s)?s:function(e){return e.is(s)},this.proportions=function(){return arguments.length?(t=arguments[0],void 0):t?t:t={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}},this._addToManager(i.scope),i.addClasses&&this.element.addClass("ui-droppable")},_addToManager:function(t){e.ui.ddmanager.droppables[t]=e.ui.ddmanager.droppables[t]||[],e.ui.ddmanager.droppables[t].push(this)},_splice:function(e){for(var t=0;e.length>t;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var t=e.ui.ddmanager.droppables[this.options.scope];this._splice(t),this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){if("accept"===t)this.accept=e.isFunction(i)?i:function(e){return e.is(i)};else if("scope"===t){var s=e.ui.ddmanager.droppables[this.options.scope];this._splice(s),this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=e(this).droppable("instance");return i.options.greedy&&!i.options.disabled&&i.options.scope===s.options.scope&&i.accept.call(i.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(i,{offset:i.element.offset()}),i.options.tolerance,t)?(n=!0,!1):void 0}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(){function e(e,t,i){return e>=t&&t+i>e}return function(t,i,s,n){if(!i.offset)return!1;var a=(t.positionAbs||t.position.absolute).left+t.margins.left,o=(t.positionAbs||t.position.absolute).top+t.margins.top,r=a+t.helperProportions.width,h=o+t.helperProportions.height,l=i.offset.left,u=i.offset.top,d=l+i.proportions().width,c=u+i.proportions().height;switch(s){case"fit":return a>=l&&d>=r&&o>=u&&c>=h;case"intersect":return a+t.helperProportions.width/2>l&&d>r-t.helperProportions.width/2&&o+t.helperProportions.height/2>u&&c>h-t.helperProportions.height/2;case"pointer":return e(n.pageY,u,i.proportions().height)&&e(n.pageX,l,i.proportions().width);case"touch":return(o>=u&&c>=o||h>=u&&c>=h||u>o&&h>c)&&(a>=l&&d>=a||r>=l&&d>=r||l>a&&r>d);default:return!1}}}(),e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions().height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions({width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight}))}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance,i)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance,i),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e(this).droppable("instance").options.scope===n}),a.length&&(s=e(a[0]).droppable("instance"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}},e.ui.droppable,e.widget("ui.resizable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseInt(e,10)||0},_isNumber:function(e){return!isNaN(parseInt(e,10))},_hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",n=!1;return t[s]>0?!0:(t[s]=1,n=t[s]>0,t[s]=0,n)},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=e(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String?this.handles[i]=this.element.children(this.handles[i]).first().show():(this.handles[i].jquery||this.handles[i].nodeType)&&(this.handles[i]=e(this.handles[i]),this._on(this.handles[i],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),this._handles=this._handles.add(this.handles[i])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(t){var i,s,n,a=this.options,o=this.element;return this.resizing=!0,this._renderProxy(),i=this._num(this.helper.css("left")),s=this._num(this.helper.css("top")),a.containment&&(i+=e(a.containment).scrollLeft()||0,s+=e(a.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:i,top:s},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:o.width(),height:o.height()},this.originalSize=this._helper?{width:o.outerWidth(),height:o.outerHeight()}:{width:o.width(),height:o.height()},this.sizeDiff={width:o.outerWidth()-o.width(),height:o.outerHeight()-o.height()},this.originalPosition={left:i,top:s},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof a.aspectRatio?a.aspectRatio:this.originalSize.width/this.originalSize.height||1,n=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===n?this.axis+"-resize":n),o.addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var i,s,n=this.originalMousePosition,a=this.axis,o=t.pageX-n.left||0,r=t.pageY-n.top||0,h=this._change[a];return this._updatePrevProperties(),h?(i=h.apply(this,[t,o,r]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),s=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(s)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&this._hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,i,s,n,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,s=a.minWidth/this.aspectRatio,i=a.maxHeight*this.aspectRatio,n=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),s>a.minHeight&&(a.minHeight=s),a.maxWidth>i&&(a.maxWidth=i),a.maxHeight>n&&(a.maxHeight=n)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,i=this.size,s=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===s&&(e.left=t.left+(i.width-e.width),e.top=null),"nw"===s&&(e.top=t.top+(i.height-e.height),e.left=t.left+(i.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,i=this.axis,s=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,n=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,r=this.originalPosition.left+this.originalSize.width,h=this.position.top+this.size.height,l=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),s&&(e.width=t.maxWidth),n&&(e.height=t.maxHeight),a&&l&&(e.left=r-t.minWidth),s&&l&&(e.left=r-t.maxWidth),o&&u&&(e.top=h-t.minHeight),n&&u&&(e.top=h-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,i=[],s=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],n=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];4>t;t++)i[t]=parseInt(s[t],10)||0,i[t]+=parseInt(n[t],10)||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,i=this.helper||this.element;this._proportionallyResizeElements.length>t;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).resizable("instance"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&i._hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var t,i,s,n,a,o,r,h=e(this).resizable("instance"),l=h.options,u=h.element,d=l.containment,c=d instanceof e?d.get(0):/parent/.test(d)?u.parent().get(0):d;c&&(h.containerElement=e(c),/document/.test(d)||d===document?(h.containerOffset={left:0,top:0},h.containerPosition={left:0,top:0},h.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(t=e(c),i=[],e(["Top","Right","Left","Bottom"]).each(function(e,s){i[e]=h._num(t.css("padding"+s))}),h.containerOffset=t.offset(),h.containerPosition=t.position(),h.containerSize={height:t.innerHeight()-i[3],width:t.innerWidth()-i[1]},s=h.containerOffset,n=h.containerSize.height,a=h.containerSize.width,o=h._hasScroll(c,"left")?c.scrollWidth:a,r=h._hasScroll(c)?c.scrollHeight:n,h.parentData={element:c,left:s.left,top:s.top,width:o,height:r}))},resize:function(t){var i,s,n,a,o=e(this).resizable("instance"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,d={top:0,left:0},c=o.containerElement,p=!0;c[0]!==document&&/static/.test(c.css("position"))&&(d=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-d.left),u&&(o.size.height=o.size.width/o.aspectRatio,p=!1),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio,p=!1),o.position.top=o._helper?h.top:0),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),i=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-d.left:o.offset.left-h.left)),s=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-d.top:o.offset.top-h.top)),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio,p=!1)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio,p=!1)),p||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=e(this).resizable("instance"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).resizable("instance"),i=t.options;e(i.alsoResize).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})},resize:function(t,i){var s=e(this).resizable("instance"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0};e(n.alsoResize).each(function(){var t=e(this),s=e(this).data("ui-resizable-alsoresize"),n={},a=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(a,function(e,t){var i=(s[t]||0)+(r[t]||0);i&&i>=0&&(n[t]=i||null)}),t.css(n)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).resizable("instance"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t,i=e(this).resizable("instance"),s=i.options,n=i.size,a=i.originalSize,o=i.originalPosition,r=i.axis,h="number"==typeof s.grid?[s.grid,s.grid]:s.grid,l=h[0]||1,u=h[1]||1,d=Math.round((n.width-a.width)/l)*l,c=Math.round((n.height-a.height)/u)*u,p=a.width+d,f=a.height+c,m=s.maxWidth&&p>s.maxWidth,g=s.maxHeight&&f>s.maxHeight,v=s.minWidth&&s.minWidth>p,y=s.minHeight&&s.minHeight>f;s.grid=h,v&&(p+=l),y&&(f+=u),m&&(p-=l),g&&(f-=u),/^(se|s|e)$/.test(r)?(i.size.width=p,i.size.height=f):/^(ne)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.top=o.top-c):/^(sw)$/.test(r)?(i.size.width=p,i.size.height=f,i.position.left=o.left-d):((0>=f-u||0>=p-l)&&(t=i._getPaddingPlusBorderDimensions(this)),f-u>0?(i.size.height=f,i.position.top=o.top-c):(f=u-t.height,i.size.height=f,i.position.top=o.top+a.height-f),p-l>0?(i.size.width=p,i.position.left=o.left-d):(p=l-t.width,i.size.width=p,i.position.left=o.left+a.width-p))}}),e.ui.resizable,e.widget("ui.selectable",e.ui.mouse,{version:"1.11.4",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;
8 this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):void 0}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),e.widget("ui.sortable",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&t+i>e},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle"),e.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle"),this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(t),e(t.target).parents().each(function(){return e.data(this,a.widgetName+"-item")===a?(s=e(this),!1):void 0}),e.data(t.target,a.widgetName+"-item")===a&&(s=e(t.target)),s?!this.options.handle||i||(e(this.options.handle,s).find("*").addBack().each(function(){this===t.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(t,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=e("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(t),!0},_mouseDrag:function(t){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:t.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:t.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(t.pageY-this.document.scrollTop()<o.scrollSensitivity?r=this.document.scrollTop(this.document.scrollTop()-o.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<o.scrollSensitivity&&(r=this.document.scrollTop(this.document.scrollTop()+o.scrollSpeed)),t.pageX-this.document.scrollLeft()<o.scrollSensitivity?r=this.document.scrollLeft(this.document.scrollLeft()-o.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<o.scrollSensitivity&&(r=this.document.scrollLeft(this.document.scrollLeft()+o.scrollSpeed))),r!==!1&&e.ui.ddmanager&&!o.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!e.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!e.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(t)})}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each(function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))}),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each(function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")}),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=e.left,o=a+e.width,r=e.top,h=r+e.height,l=this.offset.click.top,u=this.offset.click.left,d="x"===this.options.axis||s+l>r&&h>s+l,c="y"===this.options.axis||t+u>a&&o>t+u,p=d&&c;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:t+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(e){var t="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width),s=t&&i,n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return s?this.floating?a&&"right"===a||"down"===n?2:1:n&&("down"===n?2:1):!1},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection();return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){function i(){r.push(this)}var s,n,a,o,r=[],h=[],l=this._connectWith();if(l&&t)for(s=l.length-1;s>=0;s--)for(a=e(l[s],this.document[0]),n=a.length-1;n>=0;n--)o=e.data(a[n],this.widgetFullName),o&&o!==this&&!o.options.disabled&&h.push([e.isFunction(o.options.items)?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);for(h.push([e.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),s=h.length-1;s>=0;s--)h[s][0].each(i);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,function(e){for(var i=0;t.length>i;i++)if(t[i]===e.item[0])return!1;return!0})},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,u=this.items,d=[[e.isFunction(this.options.items)?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],c=this._connectWith();if(c&&this.ready)for(i=c.length-1;i>=0;i--)for(n=e(c[i],this.document[0]),s=n.length-1;s>=0;s--)a=e.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(d.push([e.isFunction(a.options.items)?a.options.items.call(a.element[0],t,{item:this.currentItem}):e(a.options.items,a.element),a]),this.containers.push(a));for(i=d.length-1;i>=0;i--)for(o=d[i][1],r=d[i][0],s=0,l=r.length;l>s;s++)h=e(r[s]),h.data(this.widgetName+"-item",o),u.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(t){this.floating=this.items.length?"x"===this.options.axis||this._isFloating(this.items[0].item):!1,this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(t){t=t||this;var i,s=t.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=t.currentItem[0].nodeName.toLowerCase(),n=e("<"+s+">",t.document[0]).addClass(i||t.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(n)):"tr"===s?t._createTrPlaceholder(t.currentItem,n):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(s.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),s.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each(function(){e("<td>&#160;</td>",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)})},_contactContainers:function(t){var i,s,n,a,o,r,h,l,u,d,c=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(c&&e.contains(this.containers[i].element[0],c.element[0]))continue;c=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(c)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,a=null,u=c.floating||this._isFloating(this.currentItem),o=u?"left":"top",r=u?"width":"height",d=u?"clientX":"clientY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(h=this.items[s].item.offset()[o],l=!1,t[d]-h>this.items[s][r]/2&&(l=!0),n>Math.abs(t[d]-h)&&(n=Math.abs(t[d]-h),a=this.items[s],this.direction=l?"up":"down"));if(!a&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1),void 0;a?this._rearrange(t,a,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||e("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.width():this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,a=t.pageX,o=t.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(e,t){function i(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}this.reverting=!1;var s,n=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(s in this._storedCSS)("auto"===this._storedCSS[s]||"static"===this._storedCSS[s])&&(this._storedCSS[s]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!t&&n.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||n.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(n.push(function(e){this._trigger("remove",e,this._uiHash())}),n.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),n.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),s=this.containers.length-1;s>=0;s--)t||n.push(i("deactivate",this,this.containers[s])),this.containers[s].containerCache.over&&(n.push(i("out",this,this.containers[s])),this.containers[s].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(s=0;n.length>s;s++)n[s].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){e.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}}),e.widget("ui.accordion",{version:"1.11.4",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var t=this.options;this.prevShow=this.prevHide=e(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),t.collapsible||t.active!==!1&&null!=t.active||(t.active=0),this._processPanels(),0>t.active&&(t.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():e()}},_createIcons:function(){var t=this.options.icons;t&&(e("<span>").addClass("ui-accordion-header-icon ui-icon "+t.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(t.header).addClass(t.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").css("display","").removeAttr("role").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||this.options.active!==!1||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons()),"disabled"===e&&(this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!t)),void 0)},_keydown:function(t){if(!t.altKey&&!t.ctrlKey){var i=e.ui.keyCode,s=this.headers.length,n=this.headers.index(t.target),a=!1;switch(t.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(t);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(e(t.target).attr("tabIndex",-1),e(a).attr("tabIndex",0),a.focus(),t.preventDefault())}},_panelKeyDown:function(t){t.keyCode===e.ui.keyCode.UP&&t.ctrlKey&&e(t.currentTarget).prev().focus()},refresh:function(){var t=this.options;this._processPanels(),t.active===!1&&t.collapsible===!0||!this.headers.length?(t.active=!1,this.active=e()):t.active===!1?this._activate(0):this.active.length&&!e.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(t.active=!1,this.active=e()):this._activate(Math.max(0,t.active-1)):t.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-state-default ui-corner-all"),this.panels=this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide(),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))
9 },_refresh:function(){var t,i=this.options,s=i.heightStyle,n=this.element.parent();this.active=this._findActive(i.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(){var t=e(this),i=t.uniqueId().attr("id"),s=t.next(),n=s.uniqueId().attr("id");t.attr("aria-controls",n),s.attr("aria-labelledby",i)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(i.event),"fill"===s?(t=n.height(),this.element.siblings(":visible").each(function(){var i=e(this),s=i.css("position");"absolute"!==s&&"fixed"!==s&&(t-=i.outerHeight(!0))}),this.headers.each(function(){t-=e(this).outerHeight(!0)}),this.headers.next().each(function(){e(this).height(Math.max(0,t-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===s&&(t=0,this.headers.next().each(function(){t=Math.max(t,e(this).css("height","").height())}).height(t))},_activate:function(t){var i=this._findActive(t)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return"number"==typeof t?this.headers.eq(t):e()},_setupEvents:function(t){var i={keydown:"_keydown"};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?e():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?e():n,newPanel:r};t.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",t,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?e():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(t){var i=t.newPanel,s=this.prevShow.length?this.prevShow:t.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,t):(s.hide(),i.show(),this._toggleComplete(t)),s.attr({"aria-hidden":"true"}),s.prev().attr({"aria-selected":"false","aria-expanded":"false"}),i.length&&s.length?s.prev().attr({tabIndex:-1,"aria-expanded":"false"}):i.length&&this.headers.filter(function(){return 0===parseInt(e(this).attr("tabIndex"),10)}).attr("tabIndex",-1),i.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,t,i){var s,n,a,o=this,r=0,h=e.css("box-sizing"),l=e.length&&(!t.length||e.index()<t.index()),u=this.options.animate||{},d=l&&u.down||u,c=function(){o._toggleComplete(i)};return"number"==typeof d&&(a=d),"string"==typeof d&&(n=d),n=n||d.easing||u.easing,a=a||d.duration||u.duration,t.length?e.length?(s=e.show().outerHeight(),t.animate(this.hideProps,{duration:a,easing:n,step:function(e,t){t.now=Math.round(e)}}),e.hide().animate(this.showProps,{duration:a,easing:n,complete:c,step:function(e,i){i.now=Math.round(e),"height"!==i.prop?"content-box"===h&&(r+=i.now):"content"!==o.options.heightStyle&&(i.now=Math.round(s-t.outerHeight()-r),r=0)}}),void 0):t.animate(this.hideProps,a,n,c):e.animate(this.showProps,a,n,c)},_toggleComplete:function(e){var t=e.oldPanel;t.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete;var c,p="ui-button ui-widget ui-state-default ui-corner-all",f="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",m=function(){var t=e(this);setTimeout(function(){t.find(":ui-button").button("refresh")},1)},g=function(t){var i=t.name,s=t.form,n=e([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?e(s).find("[name='"+i+"'][type=radio]"):e("[name='"+i+"'][type=radio]",t.ownerDocument).filter(function(){return!this.form})),n};e.widget("ui.button",{version:"1.11.4",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,m),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var t=this,i=this.options,s="checkbox"===this.type||"radio"===this.type,n=s?"":"ui-state-active";null===i.label&&(i.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(p).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){i.disabled||this===c&&e(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){i.disabled||e(this).removeClass(n)}).bind("click"+this.eventNamespace,function(e){i.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),this._on({focus:function(){this.buttonElement.addClass("ui-state-focus")},blur:function(){this.buttonElement.removeClass("ui-state-focus")}}),s&&this.element.bind("change"+this.eventNamespace,function(){t.refresh()}),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return i.disabled?!1:void 0}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(i.disabled)return!1;e(this).addClass("ui-state-active"),t.buttonElement.attr("aria-pressed","true");var s=t.element[0];g(s).not(s).map(function(){return e(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return i.disabled?!1:(e(this).addClass("ui-state-active"),c=this,t.document.one("mouseup",function(){c=null}),void 0)}).bind("mouseup"+this.eventNamespace,function(){return i.disabled?!1:(e(this).removeClass("ui-state-active"),void 0)}).bind("keydown"+this.eventNamespace,function(t){return i.disabled?!1:((t.keyCode===e.ui.keyCode.SPACE||t.keyCode===e.ui.keyCode.ENTER)&&e(this).addClass("ui-state-active"),void 0)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){e(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(t){t.keyCode===e.ui.keyCode.SPACE&&e(this).click()})),this._setOption("disabled",i.disabled),this._resetButton()},_determineButtonType:function(){var e,t,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(e=this.element.parents().last(),t="label[for='"+this.element.attr("id")+"']",this.buttonElement=e.find(t),this.buttonElement.length||(e=e.length?e.siblings():this.element.siblings(),this.buttonElement=e.filter(t),this.buttonElement.length||(this.buttonElement=e.find(t))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(p+" ui-state-active "+f).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(e,t){return this._super(e,t),"disabled"===e?(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),t&&("checkbox"===this.type||"radio"===this.type?this.buttonElement.removeClass("ui-state-focus"):this.buttonElement.removeClass("ui-state-focus ui-state-active")),void 0):(this._resetButton(),void 0)},refresh:function(){var t=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOption("disabled",t),"radio"===this.type?g(this.element[0]).each(function(){e(this).is(":checked")?e(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):e(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),void 0;var t=this.buttonElement.removeClass(f),i=e("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(t.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&t.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&t.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||t.attr("title",e.trim(i)))):a.push("ui-button-text-only"),t.addClass(a.join(" "))}}),e.widget("ui.buttonset",{version:"1.11.4",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,t){"disabled"===e&&this.buttons.button("option",e,t),this._super(e,t)},refresh:function(){var t="rtl"===this.element.css("direction"),i=this.element.find(this.options.items),s=i.filter(":ui-button");i.not(":ui-button").button(),s.button("refresh"),this.buttons=i.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(t?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(t?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return e(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}}),e.ui.button,e.extend(e.ui,{datepicker:{version:"1.11.4"}});var v;e.extend(n.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return r(this._defaults,e||{}),this},_attachDatepicker:function(t,i){var s,n,a;s=t.nodeName.toLowerCase(),n="div"===s||"span"===s,t.id||(this.uuid+=1,t.id="dp"+this.uuid),a=this._newInst(e(t),n),a.settings=e.extend({},i||{}),"input"===s?this._connectDatepicker(t,a):n&&this._inlineDatepicker(t,a)},_newInst:function(t,i){var s=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:s,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?a(e("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,i){var s=e(t);i.append=e([]),i.trigger=e([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),e.data(t,"datepicker",i),i.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,i){var s,n,a,o=this._get(i,"appendText"),r=this._get(i,"isRTL");i.append&&i.append.remove(),o&&(i.append=e("<span class='"+this._appendClass+"'>"+o+"</span>"),t[r?"before":"after"](i.append)),t.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&t.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=e(this._get(i,"buttonImageOnly")?e("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):e("<button type='button'></button>").addClass(this._triggerClass).html(a?e("<img/>").attr({src:a,alt:n,title:n}):n)),t[r?"before":"after"](i.trigger),i.trigger.click(function(){return e.datepicker._datepickerShowing&&e.datepicker._lastInput===t[0]?e.datepicker._hideDatepicker():e.datepicker._datepickerShowing&&e.datepicker._lastInput!==t[0]?(e.datepicker._hideDatepicker(),e.datepicker._showDatepicker(t[0])):e.datepicker._showDatepicker(t[0]),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,i,s,n,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=0,s=0,n=0;e.length>n;n++)e[n].length>i&&(i=e[n].length,s=n);return s},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(t,i){var s=e(t);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),e.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,s,n,a){var o,h,l,u,d,c=this._dialogInst;return c||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=e("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),e("body").append(this._dialogInput),c=this._dialogInst=this._newInst(this._dialogInput,!1),c.settings={},e.data(this._dialogInput[0],"datepicker",c)),r(c.settings,n||{}),i=i&&i.constructor===Date?this._formatDate(c,i):i,this._dialogInput.val(i),this._pos=a?a.length?a:[a.pageX,a.pageY]:null,this._pos||(h=document.documentElement.clientWidth,l=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+u,l/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),c.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),e.blockUI&&e.blockUI(this.dpDiv),e.data(this._dialogInput[0],"datepicker",c),this
10 },_destroyDatepicker:function(t){var i,s=e(t),n=e.data(t,"datepicker");s.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),e.removeData(t,"datepicker"),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty(),v===n&&(v=null))},_enableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var i,s,n=e(t),a=e.data(t,"datepicker");n.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),"input"===i?(t.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=e.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;this._disabledInputs.length>t;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(t){try{return e.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,i,s){var n,a,o,h,l=this._getInst(t);return 2===arguments.length&&"string"==typeof i?"defaults"===i?e.extend({},e.datepicker._defaults):l?"all"===i?e.extend({},l.settings):this._get(l,i):null:(n=i||{},"string"==typeof i&&(n={},n[i]=s),l&&(this._curInst===l&&this._hideDatepicker(),a=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),r(l.settings,n),null!==o&&void 0!==n.dateFormat&&void 0===n.minDate&&(l.settings.minDate=this._formatDate(l,o)),null!==h&&void 0!==n.dateFormat&&void 0===n.maxDate&&(l.settings.maxDate=this._formatDate(l,h)),"disabled"in n&&(n.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(e(t),l),this._autoSize(l),this._setDate(l,a),this._updateAlternate(l),this._updateDatepicker(l)),void 0)},_changeDatepicker:function(e,t,i){this._optionDatepicker(e,t,i)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var i=this._getInst(e);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(e,t){var i=this._getInst(e);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var i,s,n,a=e.datepicker._getInst(t.target),o=!0,r=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,e.datepicker._datepickerShowing)switch(t.keyCode){case 9:e.datepicker._hideDatepicker(),o=!1;break;case 13:return n=e("td."+e.datepicker._dayOverClass+":not(."+e.datepicker._currentClass+")",a.dpDiv),n[0]&&e.datepicker._selectDay(t.target,a.selectedMonth,a.selectedYear,n[0]),i=e.datepicker._get(a,"onSelect"),i?(s=e.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):e.datepicker._hideDatepicker(),!1;case 27:e.datepicker._hideDatepicker();break;case 33:e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 34:e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&e.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&e.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?-e.datepicker._get(a,"stepBigMonths"):-e.datepicker._get(a,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,r?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&e.datepicker._adjustDate(t.target,t.ctrlKey?+e.datepicker._get(a,"stepBigMonths"):+e.datepicker._get(a,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&e.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?e.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,s,n=e.datepicker._getInst(t.target);return e.datepicker._get(n,"constrainInput")?(i=e.datepicker._possibleChars(e.datepicker._get(n,"dateFormat")),s=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||" ">s||!i||i.indexOf(s)>-1):void 0},_doKeyUp:function(t){var i,s=e.datepicker._getInst(t.target);if(s.input.val()!==s.lastVal)try{i=e.datepicker.parseDate(e.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,e.datepicker._getFormatConfig(s)),i&&(e.datepicker._setDateFromField(s),e.datepicker._updateAlternate(s),e.datepicker._updateDatepicker(s))}catch(n){}return!0},_showDatepicker:function(t){if(t=t.target||t,"input"!==t.nodeName.toLowerCase()&&(t=e("input",t.parentNode)[0]),!e.datepicker._isDisabledDatepicker(t)&&e.datepicker._lastInput!==t){var i,n,a,o,h,l,u;i=e.datepicker._getInst(t),e.datepicker._curInst&&e.datepicker._curInst!==i&&(e.datepicker._curInst.dpDiv.stop(!0,!0),i&&e.datepicker._datepickerShowing&&e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])),n=e.datepicker._get(i,"beforeShow"),a=n?n.apply(t,[t,i]):{},a!==!1&&(r(i.settings,a),i.lastVal=null,e.datepicker._lastInput=t,e.datepicker._setDateFromField(i),e.datepicker._inDialog&&(t.value=""),e.datepicker._pos||(e.datepicker._pos=e.datepicker._findPos(t),e.datepicker._pos[1]+=t.offsetHeight),o=!1,e(t).parents().each(function(){return o|="fixed"===e(this).css("position"),!o}),h={left:e.datepicker._pos[0],top:e.datepicker._pos[1]},e.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),e.datepicker._updateDatepicker(i),h=e.datepicker._checkOffset(i,h,o),i.dpDiv.css({position:e.datepicker._inDialog&&e.blockUI?"static":o?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"}),i.inline||(l=e.datepicker._get(i,"showAnim"),u=e.datepicker._get(i,"duration"),i.dpDiv.css("z-index",s(e(t))+1),e.datepicker._datepickerShowing=!0,e.effects&&e.effects.effect[l]?i.dpDiv.show(l,e.datepicker._get(i,"showOptions"),u):i.dpDiv[l||"show"](l?u:null),e.datepicker._shouldFocusInput(i)&&i.input.focus(),e.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4,v=t,t.dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var i,s=this._getNumberOfMonths(t),n=s[1],a=17,r=t.dpDiv.find("."+this._dayOverClass+" a");r.length>0&&o.apply(r.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&t.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",a*n+"em"),t.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(t)&&t.input.focus(),t.yearshtml&&(i=t.yearshtml,setTimeout(function(){i===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year:first").replaceWith(t.yearshtml),i=t.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(t,i,s){var n=t.dpDiv.outerWidth(),a=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,r=t.input?t.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:e(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:e(document).scrollTop());return i.left-=this._get(t,"isRTL")?n-o:0,i.left-=s&&i.left===t.input.offset().left?e(document).scrollLeft():0,i.top-=s&&i.top===t.input.offset().top+r?e(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+r):0),i},_findPos:function(t){for(var i,s=this._getInst(t),n=this._get(s,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||e.expr.filters.hidden(t));)t=t[n?"previousSibling":"nextSibling"];return i=e(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var i,s,n,a,o=this._curInst;!o||t&&o!==e.data(t,"datepicker")||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){e.datepicker._tidyDialog(o)},e.effects&&(e.effects.effect[i]||e.effects[i])?o.dpDiv.hide(i,e.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),e.blockUI&&(e.unblockUI(),e("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(e.datepicker._curInst){var i=e(t.target),s=e.datepicker._getInst(i[0]);(i[0].id!==e.datepicker._mainDivId&&0===i.parents("#"+e.datepicker._mainDivId).length&&!i.hasClass(e.datepicker.markerClassName)&&!i.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&(!e.datepicker._inDialog||!e.blockUI)||i.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==s)&&e.datepicker._hideDatepicker()}},_adjustDate:function(t,i,s){var n=e(t),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(t){var i,s=e(t),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(t,i,s){var n=e(t),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(t,i,s,n){var a,o=e(t);e(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||(a=this._getInst(o[0]),a.selectedDay=a.currentDay=e("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(t,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(t){var i=e(t);this._selectDate(i,"")},_selectDate:function(t,i){var s,n=e(t),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(t){var i,s,n,a=this._get(t,"altField");a&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),s=this._getDate(t),n=this.formatDate(i,s,this._getFormatConfig(t)),e(a).each(function(){e(this).val(n)}))},noWeekends:function(e){var t=e.getDay();return[t>0&&6>t,""]},iso8601Week:function(e){var t,i=new Date(e.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),t=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((t-i)/864e5)/7)+1},parseDate:function(t,i,s){if(null==t||null==i)throw"Invalid arguments";if(i="object"==typeof i?""+i:i+"",""===i)return null;var n,a,o,r,h=0,l=(s?s.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),d=(s?s.dayNamesShort:null)||this._defaults.dayNamesShort,c=(s?s.dayNames:null)||this._defaults.dayNames,p=(s?s.monthNamesShort:null)||this._defaults.monthNamesShort,f=(s?s.monthNames:null)||this._defaults.monthNames,m=-1,g=-1,v=-1,y=-1,b=!1,_=function(e){var i=t.length>n+1&&t.charAt(n+1)===e;return i&&n++,i},x=function(e){var t=_(e),s="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,n="y"===e?s:1,a=RegExp("^\\d{"+n+","+s+"}"),o=i.substring(h).match(a);if(!o)throw"Missing number at position "+h;return h+=o[0].length,parseInt(o[0],10)},w=function(t,s,n){var a=-1,o=e.map(_(t)?n:s,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(e.each(o,function(e,t){var s=t[1];return i.substr(h,s.length).toLowerCase()===s.toLowerCase()?(a=t[0],h+=s.length,!1):void 0}),-1!==a)return a+1;throw"Unknown name at position "+h},k=function(){if(i.charAt(h)!==t.charAt(n))throw"Unexpected literal at position "+h;h++};for(n=0;t.length>n;n++)if(b)"'"!==t.charAt(n)||_("'")?k():b=!1;else switch(t.charAt(n)){case"d":v=x("d");break;case"D":w("D",d,c);break;case"o":y=x("o");break;case"m":g=x("m");break;case"M":g=w("M",p,f);break;case"y":m=x("y");break;case"@":r=new Date(x("@")),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"!":r=new Date((x("!")-this._ticksTo1970)/1e4),m=r.getFullYear(),g=r.getMonth()+1,v=r.getDate();break;case"'":_("'")?k():b=!0;break;default:k()}if(i.length>h&&(o=i.substr(h),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===m?m=(new Date).getFullYear():100>m&&(m+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=m?0:-100)),y>-1)for(g=1,v=y;;){if(a=this._getDaysInMonth(m,g-1),a>=v)break;g++,v-=a}if(r=this._daylightSavingAdjust(new Date(m,g-1,v)),r.getFullYear()!==m||r.getMonth()+1!==g||r.getDate()!==v)throw"Invalid date";return r},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(e,t,i){if(!t)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,o=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,r=(i?i.monthNames:null)||this._defaults.monthNames,h=function(t){var i=e.length>s+1&&e.charAt(s+1)===t;return i&&s++,i},l=function(e,t,i){var s=""+t;if(h(e))for(;i>s.length;)s="0"+s;return s},u=function(e,t,i,s){return h(e)?s[t]:i[t]},d="",c=!1;if(t)for(s=0;e.length>s;s++)if(c)"'"!==e.charAt(s)||h("'")?d+=e.charAt(s):c=!1;else switch(e.charAt(s)){case"d":d+=l("d",t.getDate(),2);break;case"D":d+=u("D",t.getDay(),n,a);break;case"o":d+=l("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":d+=l("m",t.getMonth()+1,2);break;case"M":d+=u("M",t.getMonth(),o,r);break;case"y":d+=h("y")?t.getFullYear():(10>t.getYear()%100?"0":"")+t.getYear()%100;break;case"@":d+=t.getTime();break;case"!":d+=1e4*t.getTime()+this._ticksTo1970;break;case"'":h("'")?d+="'":c=!0;break;default:d+=e.charAt(s)}return d},_possibleChars:function(e){var t,i="",s=!1,n=function(i){var s=e.length>t+1&&e.charAt(t+1)===i;return s&&t++,s};for(t=0;e.length>t;t++)if(s)"'"!==e.charAt(t)||n("'")?i+=e.charAt(t):s=!1;else switch(e.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=e.charAt(t)}return i},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var i=this._get(e,"dateFormat"),s=e.lastVal=e.input?e.input.val():null,n=this._getDefaultDate(e),a=n,o=this._getFormatConfig(e);try{a=this.parseDate(i,s,o)||n}catch(r){s=t?"":s}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=s?a.getDate():0,e.currentMonth=s?a.getMonth():0,e.currentYear=s?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(t,i,s){var n=function(e){var t=new Date;return t.setDate(t.getDate()+e),t},a=function(i){try{return e.datepicker.parseDate(e.datepicker._get(t,"dateFormat"),i,e.datepicker._getFormatConfig(t))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?e.datepicker._getDate(t):null)||new Date,a=n.getFullYear(),o=n.getMonth(),r=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":r+=parseInt(l[1],10);break;case"w":case"W":r+=7*parseInt(l[1],10);break;case"m":case"M":o+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o));break;case"y":case"Y":a+=parseInt(l[1],10),r=Math.min(r,e.datepicker._getDaysInMonth(a,o))}l=h.exec(i)}return new Date(a,o,r)},o=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return o=o&&"Invalid Date"==""+o?s:o,o&&(o.setHours(0),o.setMinutes(0),o.setSeconds(0),o.setMilliseconds(0)),this._daylightSavingAdjust(o)},_daylightSavingAdjust:function(e){return e?(e.setHours(e.getHours()>12?e.getHours()+2:0),e):null},_setDate:function(e,t,i){var s=!t,n=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),n===e.selectedMonth&&a===e.selectedYear||i||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(s?"":this._formatDate(e))},_getDate:function(e){var t=!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return t},_attachHandlers:function(t){var i=this._get(t,"stepMonths"),s="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){e.datepicker._adjustDate(s,-i,"M")},next:function(){e.datepicker._adjustDate(s,+i,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(s)},selectDay:function(){return e.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return e.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return e.datepicker._selectMonthYear(s,this,"Y"),!1}};e(this).bind(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,i,s,n,a,o,r,h,l,u,d,c,p,f,m,g,v,y,b,_,x,w,k,T,D,S,M,C,N,A,P,I,H,z,F,E,O,j,W,L=new Date,R=this._daylightSavingAdjust(new Date(L.getFullYear(),L.getMonth(),L.getDate())),Y=this._get(e,"isRTL"),B=this._get(e,"showButtonPanel"),J=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),K=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),U=this._get(e,"stepMonths"),Q=1!==K[0]||1!==K[1],G=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),$=this._getMinMaxDate(e,"max"),Z=e.drawMonth-V,et=e.drawYear;if(0>Z&&(Z+=12,et--),$)for(t=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-K[0]*K[1]+1,$.getDate())),t=X&&X>t?X:t;this._daylightSavingAdjust(new Date(et,Z,1))>t;)Z--,0>Z&&(Z=11,et--);for(e.drawMonth=Z,e.drawYear=et,i=this._get(e,"prevText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(et,Z-U,1)),this._getFormatConfig(e)):i,s=this._canAdjustMonth(e,-1,et,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(e,"nextText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(et,Z+U,1)),this._getFormatConfig(e)):n,a=this._canAdjustMonth(e,1,et,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",o=this._get(e,"currentText"),r=this._get(e,"gotoCurrent")&&e.currentDay?G:R,o=q?this.formatDate(o,r,this._getFormatConfig(e)):o,h=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(e,r)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(Y?"":h)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,d=this._get(e,"showWeek"),c=this._get(e,"dayNames"),p=this._get(e,"dayNamesMin"),f=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),v=this._get(e,"showOtherMonths"),y=this._get(e,"selectOtherMonths"),b=this._getDefaultDate(e),_="",w=0;K[0]>w;w++){for(k="",this.maxRows=4,T=0;K[1]>T;T++){if(D=this._daylightSavingAdjust(new Date(et,Z,e.selectedDay)),S=" ui-corner-all",M="",Q){if(M+="<div class='ui-datepicker-group",K[1]>1)switch(T){case 0:M+=" ui-datepicker-group-first",S=" ui-corner-"+(Y?"right":"left");break;case K[1]-1:M+=" ui-datepicker-group-last",S=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",S=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+S+"'>"+(/all|left/.test(S)&&0===w?Y?a:s:"")+(/all|right/.test(S)&&0===w?Y?s:a:"")+this._generateMonthYearHeader(e,Z,et,X,$,w>0||T>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",C=d?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+u)%7,C+="<th scope='col'"+((x+u+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+c[N]+"'>"+p[N]+"</span></th>";for(M+=C+"</tr></thead><tbody>",A=this._getDaysInMonth(et,Z),et===e.selectedYear&&Z===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,A)),P=(this._getFirstDayOfMonth(et,Z)-u+7)%7,I=Math.ceil((P+A)/7),H=Q?this.maxRows>I?this.maxRows:I:I,this.maxRows=H,z=this._daylightSavingAdjust(new Date(et,Z,1-P)),F=0;H>F;F++){for(M+="<tr>",E=d?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(z)+"</td>":"",x=0;7>x;x++)O=g?g.apply(e.input?e.input[0]:null,[z]):[!0,""],j=z.getMonth()!==Z,W=j&&!y||!O[0]||X&&X>z||$&&z>$,E+="<td class='"+((x+u+6)%7>=5?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(z.getTime()===D.getTime()&&Z===e.selectedMonth&&e._keyEvent||b.getTime()===z.getTime()&&b.getTime()===D.getTime()?" "+this._dayOverClass:"")+(W?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!v?"":" "+O[1]+(z.getTime()===G.getTime()?" "+this._currentClass:"")+(z.getTime()===R.getTime()?" ui-datepicker-today":""))+"'"+(j&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(W?"":" data-handler='selectDay' data-event='click' data-month='"+z.getMonth()+"' data-year='"+z.getFullYear()+"'")+">"+(j&&!v?"&#xa0;":W?"<span class='ui-state-default'>"+z.getDate()+"</span>":"<a class='ui-state-default"+(z.getTime()===R.getTime()?" ui-state-highlight":"")+(z.getTime()===G.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#'>"+z.getDate()+"</a>")+"</td>",z.setDate(z.getDate()+1),z=this._daylightSavingAdjust(z);M+=E+"</tr>"}Z++,Z>11&&(Z=0,et++),M+="</tbody></table>"+(Q?"</div>"+(K[0]>0&&T===K[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),k+=M}_+=k}return _+=l,e._keyEvent=!1,_},_generateMonthYearHeader:function(e,t,i,s,n,a,o,r){var h,l,u,d,c,p,f,m,g=this._get(e,"changeMonth"),v=this._get(e,"changeYear"),y=this._get(e,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",_="";if(a||!g)_+="<span class='ui-datepicker-month'>"+o[t]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,_+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;12>u;u++)(!h||u>=s.getMonth())&&(!l||n.getMonth()>=u)&&(_+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+r[u]+"</option>");_+="</select>"}if(y||(b+=_+(!a&&g&&v?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(d=this._get(e,"yearRange").split(":"),c=(new Date).getFullYear(),p=function(e){var t=e.match(/c[+\-].*/)?i+parseInt(e.substring(1),10):e.match(/[+\-].*/)?c+parseInt(e,10):parseInt(e,10);return isNaN(t)?c:t},f=p(d[0]),m=Math.max(f,p(d[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)e.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";e.yearshtml+="</select>",b+=e.yearshtml,e.yearshtml=null}return b+=this._get(e,"yearSuffix"),y&&(b+=(!a&&g&&v?"":"&#xa0;")+_),b+="</div>"},_adjustInstDate:function(e,t,i){var s=e.drawYear+("Y"===i?t:0),n=e.drawMonth+("M"===i?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(s,n))+("D"===i?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(s,n,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(e)},_restrictMinMax:function(e,t){var i=this._getMinMaxDate(e,"min"),s=this._getMinMaxDate(e,"max"),n=i&&i>t?i:t;return s&&n>s?s:n},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,i,s){var n=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(i,s+(0>t?t:n[0]*n[1]),1));return 0>t&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var i,s,n=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,r=null,h=this._get(e,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),o=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(o+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||t.getTime()>=n.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!r||r>=t.getFullYear())},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,i,s){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var n=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(s,i,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),n,this._getFormatConfig(e))}}),e.fn.datepicker=function(t){if(!this.length)return this;e.datepicker.initialized||(e(document).mousedown(e.datepicker._checkExternalClick),e.datepicker.initialized=!0),0===e("#"+e.datepicker._mainDivId).length&&e("body").append(e.datepicker.dpDiv);var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof t?e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this].concat(i)):e.datepicker._attachDatepicker(this,t)}):e.datepicker["_"+t+"Datepicker"].apply(e.datepicker,[this[0]].concat(i))},e.datepicker=new n,e.datepicker.initialized=!1,e.datepicker.uuid=(new Date).getTime(),e.datepicker.version="1.11.4",e.datepicker,e.widget("ui.dialog",{version:"1.11.4",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"Close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var i=e(this).css(t).offset().top;0>i&&e(this).css("top",t.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&e.fn.draggable&&this._makeDraggable(),this.options.resizable&&e.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;return t&&(t.jquery||t.nodeType)?e(t):this.document.find(t||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),e=t.parent.children().eq(t.index),e.length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:e.noop,enable:e.noop,close:function(t){var i,s=this;if(this._isOpen&&this._trigger("beforeClose",t)!==!1){if(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),!this.opener.filter(":focusable").focus().length)try{i=this.document[0].activeElement,i&&"body"!==i.nodeName.toLowerCase()&&e(i).blur()}catch(n){}this._hide(this.uiDialog,this.options.hide,function(){s._trigger("close",t)})}},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,i){var s=!1,n=this.uiDialog.siblings(".ui-front:visible").map(function(){return+e(this).css("z-index")}).get(),a=Math.max.apply(null,n);return a>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",a+1),s=!0),s&&!i&&this._trigger("focus",t),s},open:function(){var t=this;
11 return this._isOpen?(this._moveToTop()&&this._focusTabbable(),void 0):(this._isOpen=!0,this.opener=e(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"),void 0)},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).focus()},_keepFocus:function(t){function i(){var t=this.document[0].activeElement,i=this.uiDialog[0]===t||e.contains(this.uiDialog[0],t);i||this._focusTabbable()}t.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=e("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===e.ui.keyCode.ESCAPE)return t.preventDefault(),this.close(t),void 0;if(t.keyCode===e.ui.keyCode.TAB&&!t.isDefaultPrevented()){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");t.target!==n[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==s[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){n.focus()}),t.preventDefault()):(this._delay(function(){s.focus()}),t.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=e("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(t){e(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=e("<button type='button'></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),t=e("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(t),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(e){this.options.title||e.html("&#160;"),e.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=e("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=e("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var t=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),e.isEmptyObject(i)||e.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),void 0):(e.each(i,function(i,s){var n,a;s=e.isFunction(s)?{click:s,text:i}:s,s=e.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(t.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,e("<button></button>",s).button(a).appendTo(t.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),void 0)},_makeDraggable:function(){function t(e){return{position:e.position,offset:e.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){e(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,t(n))},drag:function(e,s){i._trigger("drag",e,t(s))},stop:function(n,a){var o=a.offset.left-i.document.scrollLeft(),r=a.offset.top-i.document.scrollTop();s.position={my:"left top",at:"left"+(o>=0?"+":"")+o+" "+"top"+(r>=0?"+":"")+r,of:i.window},e(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,t(a))}})},_makeResizable:function(){function t(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){e(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,t(n))},resize:function(e,s){i._trigger("resize",e,t(s))},stop:function(n,a){var o=i.uiDialog.offset(),r=o.left-i.document.scrollLeft(),h=o.top-i.document.scrollTop();s.height=i.uiDialog.height(),s.width=i.uiDialog.width(),s.position={my:"left top",at:"left"+(r>=0?"+":"")+r+" "+"top"+(h>=0?"+":"")+h,of:i.window},e(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,t(a))}}).css("position",a)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=e(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),i=e.inArray(this,t);-1!==i&&t.splice(i,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};e.each(t,function(e,t){i._setOption(e,t),e in i.sizeRelatedOptions&&(s=!0),e in i.resizableRelatedOptions&&(n[e]=t)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(e,t){var i,s,n=this.uiDialog;"dialogClass"===e&&n.removeClass(this.options.dialogClass).addClass(t),"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:""+t}),"draggable"===e&&(i=n.is(":data(ui-draggable)"),i&&!t&&n.draggable("destroy"),!i&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&(s=n.is(":data(ui-resizable)"),s&&!t&&n.resizable("destroy"),s&&"string"==typeof t&&n.resizable("option","handles",t),s||t===!1||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),e=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),t=Math.max(0,s.minHeight-e),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-e):"none","auto"===s.height?this.element.css({minHeight:t,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=e(this);return e("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return e(t.target).closest(".ui-dialog").length?!0:!!e(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=e("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):this.document.unbind("focusin").removeData("ui-dialog-overlays"),this.overlay.remove(),this.overlay=null}}}),e.widget("ui.progressbar",{version:"1.11.4",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=e("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(e){return void 0===e?this.options.value:(this.options.value=this._constrainedValue(e),this._refreshValue(),void 0)},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=e===!1,"number"!=typeof e&&(e=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var t=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||t>this.min).toggleClass("ui-corner-right",t===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=e("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":t}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==t&&(this.oldValue=t,this._trigger("change")),t===this.options.max&&this._trigger("complete")}}),e.widget("ui.selectmenu",{version:"1.11.4",defaultElement:"<select>",options:{appendTo:null,disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:null,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this.options.disabled&&this.disable()},_drawButton:function(){var t=this;this.label=e("label[for='"+this.ids.element+"']").attr("for",this.ids.button),this._on(this.label,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=e("<span>",{"class":"ui-selectmenu-button ui-widget ui-state-default ui-corner-all",tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true"}).insertAfter(this.element),e("<span>",{"class":"ui-icon "+this.options.icons.button}).prependTo(this.button),this.buttonText=e("<span>",{"class":"ui-selectmenu-text"}).appendTo(this.button),this._setText(this.buttonText,this.element.find("option:selected").text()),this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t.menuItems||t._refreshMenu()}),this._hoverable(this.button),this._focusable(this.button)},_drawMenu:function(){var t=this;this.menu=e("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=e("<div>",{"class":"ui-selectmenu-menu ui-front"}).append(this.menu).appendTo(this._appendTo()),this.menuInstance=this.menu.menu({role:"listbox",select:function(e,i){e.preventDefault(),t._setSelection(),t._select(i.item.data("ui-selectmenu-item"),e)},focus:function(e,i){var s=i.item.data("ui-selectmenu-item");null!=t.focusIndex&&s.index!==t.focusIndex&&(t._trigger("focus",e,{item:s}),t.isOpen||t._select(s,e)),t.focusIndex=s.index,t.button.attr("aria-activedescendant",t.menuItems.eq(s.index).attr("id"))}}).menu("instance"),this.menu.addClass("ui-corner-bottom").removeClass("ui-corner-all"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this._setText(this.buttonText,this._getSelectedItem().text()),this.options.width||this._resizeButton()},_refreshMenu:function(){this.menu.empty();var e,t=this.element.find("option");t.length&&(this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup"),e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this.menuItems?(this.menu.find(".ui-state-focus").removeClass("ui-state-focus"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e))},_position:function(){this.menuWrap.position(e.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderMenu:function(t,i){var s=this,n="";e.each(i,function(i,a){a.optgroup!==n&&(e("<li>",{"class":"ui-selectmenu-optgroup ui-menu-divider"+(a.element.parent("optgroup").prop("disabled")?" ui-state-disabled":""),text:a.optgroup}).appendTo(t),n=a.optgroup),s._renderItemData(t,a)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(t,i){var s=e("<li>");return i.disabled&&s.addClass("ui-state-disabled"),this._setText(s,i.label),s.appendTo(t)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var i,s,n=".ui-menu-item";this.isOpen?i=this.menuItems.eq(this.focusIndex):(i=this.menuItems.eq(this.element[0].selectedIndex),n+=":not(.ui-state-disabled)"),s="first"===e||"last"===e?i["first"===e?"prevAll":"nextAll"](n).eq(-1):i[e+"All"](n).eq(0),s.length&&this.menuInstance.focus(t,s)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex)},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?(e=window.getSelection(),e.removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(t){this.isOpen&&(e(t.target).closest(".ui-selectmenu-menu, #"+this.ids.button).length||this.close(t))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection(),e.rangeCount&&(this.range=e.getRangeAt(0))):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(t){var i=!0;switch(t.keyCode){case e.ui.keyCode.TAB:case e.ui.keyCode.ESCAPE:this.close(t),i=!1;break;case e.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(t);break;case e.ui.keyCode.UP:t.altKey?this._toggle(t):this._move("prev",t);break;case e.ui.keyCode.DOWN:t.altKey?this._toggle(t):this._move("next",t);break;case e.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(t):this._toggle(t);break;case e.ui.keyCode.LEFT:this._move("prev",t);break;case e.ui.keyCode.RIGHT:this._move("next",t);break;case e.ui.keyCode.HOME:case e.ui.keyCode.PAGE_UP:this._move("first",t);break;case e.ui.keyCode.END:case e.ui.keyCode.PAGE_DOWN:this._move("last",t);break;default:this.menu.trigger(t),i=!1}i&&t.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex);t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var i=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this._setText(this.buttonText,e.label),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==i&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){"icons"===e&&this.button.find("span.ui-icon").removeClass(this.options.icons.button).addClass(t.button),this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"disabled"===e&&(this.menuInstance.option("disabled",t),this.button.toggleClass("ui-state-disabled",t).attr("aria-disabled",t),this.element.prop("disabled",t),t?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)),"width"===e&&this._resizeButton()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_toggleAttr:function(){this.button.toggleClass("ui-corner-top",this.isOpen).toggleClass("ui-corner-all",!this.isOpen).attr("aria-expanded",this.isOpen),this.menuWrap.toggleClass("ui-selectmenu-open",this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;e||(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){return{disabled:this.element.prop("disabled")}},_parseOptions:function(t){var i=[];t.each(function(t,s){var n=e(s),a=n.parent("optgroup");i.push({element:n,index:t,value:n.val(),label:n.text(),optgroup:a.attr("label")||"",disabled:a.prop("disabled")||n.prop("disabled")})}),this.items=i},_destroy:function(){this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.label.attr("for",this.ids.element)}}),e.widget("ui.slider",e.ui.mouse,{version:"1.11.4",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<span class='ui-slider-handle ui-state-default ui-corner-all' tabindex='0'></span>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),t=n.length;i>t;t++)o.push(a);this.handles=n.add(e(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(t){e(this).data("ui-slider-handle-index",t)})},_createRange:function(){var t=this.options,i="";t.range?(t.range===!0&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:e.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=e("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===t.range||"max"===t.range?" ui-slider-range-"+t.range:""))):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(t){var i,s,n,a,o,r,h,l,u=this,d=this.options;return d.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:t.pageX,y:t.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var i=Math.abs(s-u.values(t));(n>i||n===i&&(t===u._lastChangedValue||u.values(t)===d.min))&&(n=i,a=e(this),o=t)}),r=this._start(t,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!e(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:t.pageX-h.left-a.width()/2,top:t.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},i=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,i),!1},_mouseStop:function(e){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,i,s,n,a;return"horizontal"===this.orientation?(t=this.elementSize.width,i=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,i=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/t,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(e,t){var i={handle:this.handles[t],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("start",e,i)},_slide:function(e,t,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(t?0:1),2===this.options.values.length&&this.options.range===!0&&(0===t&&i>s||1===t&&s>i)&&(i=s),i!==this.values(t)&&(n=this.values(),n[t]=i,a=this._trigger("slide",e,{handle:this.handles[t],value:i,values:n}),s=this.values(t?0:1),a!==!1&&this.values(t,i))):i!==this.value()&&(a=this._trigger("slide",e,{handle:this.handles[t],value:i}),a!==!1&&this.value(i))},_stop:function(e,t){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._trigger("stop",e,i)},_change:function(e,t){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[t],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(t),i.values=this.values()),this._lastChangedValue=t,this._trigger("change",e,i)}},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),this._change(null,0),void 0):this._value()},values:function(t,i){var s,n,a;if(arguments.length>1)return this.options.values[t]=this._trimAlignValue(i),this._refreshValue(),this._change(null,t),void 0;if(!arguments.length)return this._values();if(!e.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(t):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(t,i){var s,n=0;switch("range"===t&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),e.isArray(this.options.values)&&(n=this.options.values.length),"disabled"===t&&this.element.toggleClass("ui-state-disabled",!!i),this._super(t,i),t){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue(),this.handles.css("horizontal"===i?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,i,s;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(e){if(this._valueMin()>=e)return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=this.options.step>0?this.options.step:1,i=(e-this._valueMin())%t,s=e-i;return 2*Math.abs(i)>=t&&(s+=i>0?t:-t),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),i=this.options.step,s=Math.floor(+(e-t).toFixed(this._precision())/i)*i;e=s+t,this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshValue:function(){var t,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",e(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-t+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-t+"%"},{queue:!1,duration:r.animate}))),t=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(t){var i,s,n,a,o=e(t.target).data("ui-slider-handle-index");switch(t.keyCode){case e.ui.keyCode.HOME:case e.ui.keyCode.END:case e.ui.keyCode.PAGE_UP:case e.ui.keyCode.PAGE_DOWN:case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,e(t.target).addClass("ui-state-active"),i=this._start(t,o),i===!1))return}switch(a=this.options.step,s=n=this.options.values&&this.options.values.length?this.values(o):this.value(),t.keyCode){case e.ui.keyCode.HOME:n=this._valueMin();break;case e.ui.keyCode.END:n=this._valueMax();break;case e.ui.keyCode.PAGE_UP:n=this._trimAlignValue(s+(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(s-(this._valueMax()-this._valueMin())/this.numPages);break;case e.ui.keyCode.UP:case e.ui.keyCode.RIGHT:if(s===this._valueMax())return;n=this._trimAlignValue(s+a);break;case e.ui.keyCode.DOWN:case e.ui.keyCode.LEFT:if(s===this._valueMin())return;n=this._trimAlignValue(s-a)}this._slide(t,o,n)},keyup:function(t){var i=e(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,i),this._change(t,i),e(t.target).removeClass("ui-state-active"))}}}),e.widget("ui.spinner",{version:"1.11.4",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var t={},i=this.element;return e.each(["min","max","step"],function(e,s){var n=i.attr(s);void 0!==n&&n.length&&(t[s]=n)}),t},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e),void 0)},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((t>0?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(t){function i(){var e=this.element[0]===this.document[0].activeElement;e||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),t.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(t)!==!1&&this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(t){return e(t.currentTarget).hasClass("ui-state-active")?this._start(t)===!1?!1:(this._repeat(null,e(t.currentTarget).hasClass("ui-spinner-up")?1:-1,t),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var e=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=e.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*e.height())&&e.height()>0&&e.height(e.height()),this.options.disabled&&this.disable()
12 },_keydown:function(t){var i=this.options,s=e.ui.keyCode;switch(t.keyCode){case s.UP:return this._repeat(null,1,t),!0;case s.DOWN:return this._repeat(null,-1,t),!0;case s.PAGE_UP:return this._repeat(null,i.page,t),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,t),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(e){return this.spinning||this._trigger("start",e)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(e,t,i){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,i)},e),this._spin(t*this.options.step,i)},_spin:function(e,t){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+e*this._increment(this.counter)),this.spinning&&this._trigger("spin",t,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(t){var i=this.options.incremental;return i?e.isFunction(i)?i(t):Math.floor(t*t*t/5e4-t*t/500+17*t/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=""+e,i=t.indexOf(".");return-1===i?0:t.length-i-1},_adjustValue:function(e){var t,i,s=this.options;return t=null!==s.min?s.min:0,i=e-t,i=Math.round(i/s.step)*s.step,e=t+i,e=parseFloat(e.toFixed(this._precision())),null!==s.max&&e>s.max?s.max:null!==s.min&&s.min>e?s.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){if("culture"===e||"numberFormat"===e){var i=this._parse(this.element.val());return this.options[e]=t,this.element.val(this._format(i)),void 0}("max"===e||"min"===e||"step"===e)&&"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(t.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(t.down)),this._super(e,t),"disabled"===e&&(this.widget().toggleClass("ui-state-disabled",!!t),this.element.prop("disabled",!!t),this.buttons.button(t?"disable":"enable"))},_setOptions:h(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null===e?!1:e===this._adjustValue(e)},_value:function(e,t){var i;""!==e&&(i=this._parse(e),null!==i&&(t||(i=this._adjustValue(i)),e=this._format(i))),this.element.val(e),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:h(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:h(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:h(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:h(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){return arguments.length?(h(this._value).call(this,e),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}),e.widget("ui.tabs",{version:"1.11.4",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:function(){var e=/#.*$/;return function(t){var i,s;t=t.cloneNode(!1),i=t.href.replace(e,""),s=location.href.replace(e,"");try{i=decodeURIComponent(i)}catch(n){}try{s=decodeURIComponent(s)}catch(n){}return t.hash.length>1&&i===s}}(),_create:function(){var t=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible),this._processTabs(),i.active=this._initialActive(),e.isArray(i.disabled)&&(i.disabled=e.unique(i.disabled.concat(e.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):e(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var t=this.options.active,i=this.options.collapsible,s=location.hash.substring(1);return null===t&&(s&&this.tabs.each(function(i,n){return e(n).attr("aria-controls")===s?(t=i,!1):void 0}),null===t&&(t=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===t||-1===t)&&(t=this.tabs.length?0:!1)),t!==!1&&(t=this.tabs.index(this.tabs.eq(t)),-1===t&&(t=i?!1:0)),!i&&t===!1&&this.anchors.length&&(t=0),t},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):e()}},_tabKeydown:function(t){var i=e(this.document[0].activeElement).closest("li"),s=this.tabs.index(i),n=!0;if(!this._handlePageNav(t)){switch(t.keyCode){case e.ui.keyCode.RIGHT:case e.ui.keyCode.DOWN:s++;break;case e.ui.keyCode.UP:case e.ui.keyCode.LEFT:n=!1,s--;break;case e.ui.keyCode.END:s=this.anchors.length-1;break;case e.ui.keyCode.HOME:s=0;break;case e.ui.keyCode.SPACE:return t.preventDefault(),clearTimeout(this.activating),this._activate(s),void 0;case e.ui.keyCode.ENTER:return t.preventDefault(),clearTimeout(this.activating),this._activate(s===this.options.active?!1:s),void 0;default:return}t.preventDefault(),clearTimeout(this.activating),s=this._focusNextTab(s,n),t.ctrlKey||t.metaKey||(i.attr("aria-selected","false"),this.tabs.eq(s).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",s)},this.delay))}},_panelKeydown:function(t){this._handlePageNav(t)||t.ctrlKey&&t.keyCode===e.ui.keyCode.UP&&(t.preventDefault(),this.active.focus())},_handlePageNav:function(t){return t.altKey&&t.keyCode===e.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):t.altKey&&t.keyCode===e.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(t,i){function s(){return t>n&&(t=0),0>t&&(t=n),t}for(var n=this.tabs.length-1;-1!==e.inArray(s(),this.options.disabled);)t=i?t+1:t-1;return t},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).focus(),e},_setOption:function(e,t){return"active"===e?(this._activate(t),void 0):"disabled"===e?(this._setupDisabled(t),void 0):(this._super(e,t),"collapsible"===e&&(this.element.toggleClass("ui-tabs-collapsible",t),t||this.options.active!==!1||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t),void 0)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var t=this.options,i=this.tablist.children(":has(a[href])");t.disabled=e.map(i.filter(".ui-state-disabled"),function(e){return i.index(e)}),this._processTabs(),t.active!==!1&&this.anchors.length?this.active.length&&!e.contains(this.tablist[0],this.active[0])?this.tabs.length===t.disabled.length?(t.active=!1,this.active=e()):this._activate(this._findNextTab(Math.max(0,t.active-1),!1)):t.active=this.tabs.index(this.active):(t.active=!1,this.active=e()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var t=this,i=this.tabs,s=this.anchors,n=this.panels;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist").delegate("> li","mousedown"+this.eventNamespace,function(t){e(this).is(".ui-state-disabled")&&t.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){e(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return e("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=e(),this.anchors.each(function(i,s){var n,a,o,r=e(s).uniqueId().attr("id"),h=e(s).closest("li"),l=h.attr("aria-controls");t._isLocal(s)?(n=s.hash,o=n.substring(1),a=t.element.find(t._sanitizeSelector(n))):(o=h.attr("aria-controls")||e({}).uniqueId()[0].id,n="#"+o,a=t.element.find(n),a.length||(a=t._createPanel(o),a.insertAfter(t.panels[i-1]||t.tablist)),a.attr("aria-live","polite")),a.length&&(t.panels=t.panels.add(a)),l&&h.data("ui-tabs-aria-controls",l),h.attr({"aria-controls":o,"aria-labelledby":r}),a.attr("aria-labelledby",r)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel"),i&&(this._off(i.not(this.tabs)),this._off(s.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol,ul").eq(0)},_createPanel:function(t){return e("<div>").attr("id",t).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(t){e.isArray(t)&&(t.length?t.length===this.anchors.length&&(t=!0):t=!1);for(var i,s=0;i=this.tabs[s];s++)t===!0||-1!==e.inArray(s,t)?e(i).addClass("ui-state-disabled").attr("aria-disabled","true"):e(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=t},_setupEvents:function(t){var i={};t&&e.each(t.split(" "),function(e,t){i[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(t){var i,s=this.element.parent();"fill"===t?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var t=e(this),s=t.css("position");"absolute"!==s&&"fixed"!==s&&(i-=t.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=e(this).outerHeight(!0)}),this.panels.each(function(){e(this).height(Math.max(0,i-e(this).innerHeight()+e(this).height()))}).css("overflow","auto")):"auto"===t&&(i=0,this.panels.each(function(){i=Math.max(i,e(this).height("").height())}).height(i))},_eventHandler:function(t){var i=this.options,s=this.active,n=e(t.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?e():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):e(),u={oldTab:s,oldPanel:l,newTab:r?e():a,newPanel:h};t.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",t,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?e():a,this.xhr&&this.xhr.abort(),l.length||h.length||e.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),t),this._toggle(t,u))},_toggle:function(t,i){function s(){a.running=!1,a._trigger("activate",t,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr("aria-hidden","true"),i.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===e(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr("aria-hidden","false"),i.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(t){var i,s=this._findActive(t);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:e.noop}))},_findActive:function(t){return t===!1?e():this.tabs.eq(t)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+e+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tablist.unbind(this.eventNamespace),this.tabs.add(this.panels).each(function(){e.data(this,"ui-tabs-destroy")?e(this).remove():e(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var t=e(this),i=t.data("ui-tabs-aria-controls");i?t.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):t.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(t){var i=this.options.disabled;i!==!1&&(void 0===t?i=!1:(t=this._getIndex(t),i=e.isArray(i)?e.map(i,function(e){return e!==t?e:null}):e.map(this.tabs,function(e,i){return i!==t?i:null})),this._setupDisabled(i))},disable:function(t){var i=this.options.disabled;if(i!==!0){if(void 0===t)i=!0;else{if(t=this._getIndex(t),-1!==e.inArray(t,i))return;i=e.isArray(i)?e.merge([t],i).sort():[t]}this._setupDisabled(i)}},load:function(t,i){t=this._getIndex(t);var s=this,n=this.tabs.eq(t),a=n.find(".ui-tabs-anchor"),o=this._getPanelForTab(n),r={tab:n,panel:o},h=function(e,t){"abort"===t&&s.panels.stop(!1,!0),n.removeClass("ui-tabs-loading"),o.removeAttr("aria-busy"),e===s.xhr&&delete s.xhr};this._isLocal(a[0])||(this.xhr=e.ajax(this._ajaxSettings(a,i,r)),this.xhr&&"canceled"!==this.xhr.statusText&&(n.addClass("ui-tabs-loading"),o.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){o.html(e),s._trigger("load",i,r),h(n,t)},1)}).fail(function(e,t){setTimeout(function(){h(e,t)},1)})))},_ajaxSettings:function(t,i,s){var n=this;return{url:t.attr("href"),beforeSend:function(t,a){return n._trigger("beforeLoad",i,e.extend({jqXHR:t,ajaxSettings:a},s))}}},_getPanelForTab:function(t){var i=e(t).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}}),e.widget("ui.tooltip",{version:"1.11.4",options:{content:function(){var t=e(this).attr("title")||"";return e("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_addDescribedBy:function(t,i){var s=(t.attr("aria-describedby")||"").split(/\s+/);s.push(i),t.data("ui-tooltip-id",i).attr("aria-describedby",e.trim(s.join(" ")))},_removeDescribedBy:function(t){var i=t.data("ui-tooltip-id"),s=(t.attr("aria-describedby")||"").split(/\s+/),n=e.inArray(i,s);-1!==n&&s.splice(n,1),t.removeData("ui-tooltip-id"),s=e.trim(s.join(" ")),s?t.attr("aria-describedby",s):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable(),this.liveRegion=e("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body)},_setOption:function(t,i){var s=this;return"disabled"===t?(this[i?"_disable":"_enable"](),this.options[t]=i,void 0):(this._super(t,i),"content"===t&&e.each(this.tooltips,function(e,t){s._updateContent(t.element)}),void 0)},_disable:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur");n.target=n.currentTarget=s.element[0],t.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.is("[title]")&&t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var t=e(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))})},open:function(t){var i=this,s=e(t?t.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&s.parents().each(function(){var t,s=e(this);s.data("ui-tooltip-open")&&(t=e.Event("blur"),t.target=t.currentTarget=this,i.close(t,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._registerCloseHandlers(t,s),this._updateContent(s,t))},_updateContent:function(e,t){var i,s=this.options.content,n=this,a=t?t.type:null;return"string"==typeof s?this._open(t,e,s):(i=s.call(e[0],function(i){n._delay(function(){e.data("ui-tooltip-open")&&(t&&(t.type=a),this._open(t,e,i))})}),i&&this._open(t,e,i),void 0)},_open:function(t,i,s){function n(e){l.of=e,o.is(":hidden")||o.position(l)}var a,o,r,h,l=e.extend({},this.options.position);if(s){if(a=this._find(i))return a.tooltip.find(".ui-tooltip-content").html(s),void 0;i.is("[title]")&&(t&&"mouseover"===t.type?i.attr("title",""):i.removeAttr("title")),a=this._tooltip(i),o=a.tooltip,this._addDescribedBy(i,o.attr("id")),o.find(".ui-tooltip-content").html(s),this.liveRegion.children().hide(),s.clone?(h=s.clone(),h.removeAttr("id").find("[id]").removeAttr("id")):h=s,e("<div>").html(h).appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:n}),n(t)):o.position(e.extend({of:i},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(r=this.delayedShow=setInterval(function(){o.is(":visible")&&(n(l.of),clearInterval(r))},e.fx.interval)),this._trigger("open",t,{tooltip:o})}},_registerCloseHandlers:function(t,i){var s={keyup:function(t){if(t.keyCode===e.ui.keyCode.ESCAPE){var s=e.Event(t);s.currentTarget=i[0],this.close(s,!0)}}};i[0]!==this.element[0]&&(s.remove=function(){this._removeTooltip(this._find(i).tooltip)}),t&&"mouseover"!==t.type||(s.mouseleave="close"),t&&"focusin"!==t.type||(s.focusout="close"),this._on(!0,i,s)},close:function(t){var i,s=this,n=e(t?t.currentTarget:this.element),a=this._find(n);return a?(i=a.tooltip,a.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&!n.attr("title")&&n.attr("title",n.data("ui-tooltip-title")),this._removeDescribedBy(n),a.hiding=!0,i.stop(!0),this._hide(i,this.options.hide,function(){s._removeTooltip(e(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&e.each(this.parents,function(t,i){e(i.element).attr("title",i.title),delete s.parents[t]}),a.closing=!0,this._trigger("close",t,{tooltip:i}),a.hiding||(a.closing=!1)),void 0):(n.removeData("ui-tooltip-open"),void 0)},_tooltip:function(t){var i=e("<div>").attr("role","tooltip").addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||"")),s=i.uniqueId().attr("id");return e("<div>").addClass("ui-tooltip-content").appendTo(i),i.appendTo(this.document[0].body),this.tooltips[s]={element:t,tooltip:i}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_destroy:function(){var t=this;e.each(this.tooltips,function(i,s){var n=e.Event("blur"),a=s.element;n.target=n.currentTarget=a[0],t.close(n,!0),e("#"+i).remove(),a.data("ui-tooltip-title")&&(a.attr("title")||a.attr("title",a.data("ui-tooltip-title")),a.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}});var y="ui-effects-",b=e;e.effects={effect:{}},function(e,t){function i(e,t,i){var s=d[t.type]||{};return null==e?i||!t.def?null:t.def:(e=s.floor?~~e:parseFloat(e),isNaN(e)?t.def:s.mod?(e+s.mod)%s.mod:0>e?0:e>s.max?s.max:e)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(e,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[u[l].cache]=o[u[l].cache],n=s._rgba=o._rgba,!1):t}),n.length?("0,0,0,0"===n.join()&&e.extend(n,a.transparent),s):a[i]}function n(e,t,i){return i=(i+1)%1,1>6*i?e+6*(t-e)*i:1>2*i?t:2>3*i?e+6*(t-e)*(2/3-i):e}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],l=e.Color=function(t,i,s,n){return new e.Color.fn.parse(t,i,s,n)},u={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},d={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},c=l.support={},p=e("<p>")[0],f=e.each;p.style.cssText="background-color:rgba(1,1,1,.5)",c.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(u,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),l.fn=e.extend(l.prototype,{parse:function(n,o,r,h){if(n===t)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=e(n).css(o),o=t);var d=this,c=e.type(n),p=this._rgba=[];return o!==t&&(n=[n,o,r,h],c="array"),"string"===c?this.parse(s(n)||a._default):"array"===c?(f(u.rgba.props,function(e,t){p[t.idx]=i(n[t.idx],t)}),this):"object"===c?(n instanceof l?f(u,function(e,t){n[t.cache]&&(d[t.cache]=n[t.cache].slice())}):f(u,function(t,s){var a=s.cache;f(s.props,function(e,t){if(!d[a]&&s.to){if("alpha"===e||null==n[e])return;d[a]=s.to(d._rgba)}d[a][t.idx]=i(n[e],t,!0)}),d[a]&&0>e.inArray(null,d[a].slice(0,3))&&(d[a][3]=1,s.from&&(d._rgba=s.from(d[a])))}),this):t},is:function(e){var i=l(e),s=!0,n=this;return f(u,function(e,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(e,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:t})),s}),s},_space:function(){var e=[],t=this;return f(u,function(i,s){t[s.cache]&&e.push(i)}),e.pop()},transition:function(e,t){var s=l(e),n=s._space(),a=u[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(e,n){var a=n.idx,o=r[a],l=s[a],u=d[n.type]||{};null!==l&&(null===o?h[a]=l:(u.mod&&(l-o>u.mod/2?o+=u.mod:o-l>u.mod/2&&(o-=u.mod)),h[a]=i((l-o)*t+o,n)))}),this[n](h)},blend:function(t){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(t)._rgba;return l(e.map(i,function(e,t){return(1-s)*n[t]+s*e}))},toRgbaString:function(){var t="rgba(",i=e.map(this._rgba,function(e,t){return null==e?t>2?1:0:e});return 1===i[3]&&(i.pop(),t="rgb("),t+i.join()+")"},toHslaString:function(){var t="hsla(",i=e.map(this.hsla(),function(e,t){return null==e&&(e=t>2?1:0),t&&3>t&&(e=Math.round(100*e)+"%"),e});return 1===i[3]&&(i.pop(),t="hsl("),t+i.join()+")"},toHexString:function(t){var i=this._rgba.slice(),s=i.pop();return t&&i.push(~~(255*s)),"#"+e.map(i,function(e){return e=(e||0).toString(16),1===e.length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,u.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,i,s=e[0]/255,n=e[1]/255,a=e[2]/255,o=e[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,u=r+h,d=.5*u;return t=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=d?l/u:l/(2-u),[Math.round(t)%360,i,d,null==o?1:o]},u.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,i=e[1],s=e[2],a=e[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,t+1/3)),Math.round(255*n(r,o,t)),Math.round(255*n(r,o,t-1/3)),a]},f(u,function(s,n){var a=n.props,o=n.cache,h=n.to,u=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===t)return this[o].slice();var n,r=e.type(s),d="array"===r||"object"===r?s:arguments,c=this[o].slice();return f(a,function(e,t){var s=d["object"===r?e:t.idx];null==s&&(s=c[t.idx]),c[t.idx]=i(s,t)}),u?(n=l(u(c)),n[o]=c,n):l(c)},f(a,function(t,i){l.fn[t]||(l.fn[t]=function(n){var a,o=e.type(n),h="alpha"===t?this._hsla?"hsla":"rgba":s,l=this[h](),u=l[i.idx];return"undefined"===o?u:("function"===o&&(n=n.call(this,u),o=e.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=u+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(t){var i=t.split(" ");f(i,function(t,i){e.cssHooks[i]={set:function(t,n){var a,o,r="";if("transparent"!==n&&("string"!==e.type(n)||(a=s(n)))){if(n=l(a||n),!c.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?t.parentNode:t;(""===r||"transparent"===r)&&o&&o.style;)try{r=e.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{t.style[i]=n}catch(h){}}},e.fx.step[i]=function(t){t.colorInit||(t.start=l(t.elem,i),t.end=l(t.end),t.colorInit=!0),e.cssHooks[i].set(t.elem,t.start.transition(t.end,t.pos))}})},l.hook(o),e.cssHooks.borderColor={expand:function(e){var t={};return f(["Top","Right","Bottom","Left"],function(i,s){t["border"+s+"Color"]=e}),t}},a=e.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(b),function(){function t(t){var i,s,n=t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,null):t.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[e.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function i(t,i){var s,a,o={};for(s in i)a=i[s],t[s]!==a&&(n[s]||(e.fx.step[s]||!isNaN(parseFloat(a)))&&(o[s]=a));return o}var s=["add","remove","toggle"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};e.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(t,i){e.fx.step[i]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(b.style(e.elem,i,e.end),e.setAttr=!0)}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e.effects.animateClass=function(n,a,o,r){var h=e.speed(a,o,r);return this.queue(function(){var a,o=e(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var i=e(this);return{el:i,start:t(this)}}),a=function(){e.each(s,function(e,t){n[t]&&o[t+"Class"](n[t])})},a(),l=l.map(function(){return this.end=t(this.el[0]),this.diff=i(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var t=this,i=e.Deferred(),s=e.extend({},h,{queue:!1,complete:function(){i.resolve(t)}});return this.el.animate(this.diff,s),i.promise()}),e.when.apply(e,l.get()).done(function(){a(),e.each(arguments,function(){var t=this.el;e.each(this.diff,function(e){t.css(e,"")})}),h.complete.call(o[0])})})},e.fn.extend({addClass:function(t){return function(i,s,n,a){return s?e.effects.animateClass.call(this,{add:i},s,n,a):t.apply(this,arguments)}}(e.fn.addClass),removeClass:function(t){return function(i,s,n,a){return arguments.length>1?e.effects.animateClass.call(this,{remove:i},s,n,a):t.apply(this,arguments)}}(e.fn.removeClass),toggleClass:function(t){return function(i,s,n,a,o){return"boolean"==typeof s||void 0===s?n?e.effects.animateClass.call(this,s?{add:i}:{remove:i},n,a,o):t.apply(this,arguments):e.effects.animateClass.call(this,{toggle:i},s,n,a)}}(e.fn.toggleClass),switchClass:function(t,i,s,n,a){return e.effects.animateClass.call(this,{add:i,remove:t},s,n,a)}})}(),function(){function t(t,i,s,n){return e.isPlainObject(t)&&(i=t,t=t.effect),t={effect:t},null==i&&(i={}),e.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||e.fx.speeds[i])&&(n=s,s=i,i={}),e.isFunction(s)&&(n=s,s=null),i&&e.extend(t,i),s=s||i.duration,t.duration=e.fx.off?0:"number"==typeof s?s:s in e.fx.speeds?e.fx.speeds[s]:e.fx.speeds._default,t.complete=n||i.complete,t}function i(t){return!t||"number"==typeof t||e.fx.speeds[t]?!0:"string"!=typeof t||e.effects.effect[t]?e.isFunction(t)?!0:"object"!=typeof t||t.effect?!1:!0:!0}e.extend(e.effects,{version:"1.11.4",save:function(e,t){for(var i=0;t.length>i;i++)null!==t[i]&&e.data(y+t[i],e[0].style[t[i]])},restore:function(e,t){var i,s;for(s=0;t.length>s;s++)null!==t[s]&&(i=e.data(y+t[s]),void 0===i&&(i=""),e.css(t[s],i))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},getBaseline:function(e,t){var i,s;switch(e[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=e[0]/t.height}switch(e[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=e[1]/t.width}return{x:s,y:i}},createWrapper:function(t){if(t.parent().is(".ui-effects-wrapper"))return t.parent();var i={width:t.outerWidth(!0),height:t.outerHeight(!0),"float":t.css("float")},s=e("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:t.width(),height:t.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return t.wrap(s),(t[0]===a||e.contains(t[0],a))&&e(a).focus(),s=t.parent(),"static"===t.css("position")?(s.css({position:"relative"}),t.css({position:"relative"})):(e.extend(i,{position:t.css("position"),zIndex:t.css("z-index")}),e.each(["top","left","bottom","right"],function(e,s){i[s]=t.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),t.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),t.css(n),s.css(i).show()},removeWrapper:function(t){var i=document.activeElement;
13 return t.parent().is(".ui-effects-wrapper")&&(t.parent().replaceWith(t),(t[0]===i||e.contains(t[0],i))&&e(i).focus()),t},setTransition:function(t,i,s,n){return n=n||{},e.each(i,function(e,i){var a=t.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),e.fn.extend({effect:function(){function i(t){function i(){e.isFunction(a)&&a.call(n[0]),e.isFunction(t)&&t()}var n=e(this),a=s.complete,r=s.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),i()):o.call(n[0],s,i)}var s=t.apply(this,arguments),n=s.mode,a=s.queue,o=e.effects.effect[s.effect];return e.fx.off||!o?n?this[n](s.duration,s.complete):this.each(function(){s.complete&&s.complete.call(this)}):a===!1?this.each(i):this.queue(a||"fx",i)},show:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="show",this.effect.call(this,n)}}(e.fn.show),hide:function(e){return function(s){if(i(s))return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="hide",this.effect.call(this,n)}}(e.fn.hide),toggle:function(e){return function(s){if(i(s)||"boolean"==typeof s)return e.apply(this,arguments);var n=t.apply(this,arguments);return n.mode="toggle",this.effect.call(this,n)}}(e.fn.toggle),cssUnit:function(t){var i=this.css(t),s=[];return e.each(["em","px","%","pt"],function(e,t){i.indexOf(t)>0&&(s=[parseFloat(i),t])}),s}})}(),function(){var t={};e.each(["Quad","Cubic","Quart","Quint","Expo"],function(e,i){t[i]=function(t){return Math.pow(t,e+2)}}),e.extend(t,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,i=4;((t=Math.pow(2,--i))-1)/11>e;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}}),e.each(t,function(t,i){e.easing["easeIn"+t]=i,e.easing["easeOut"+t]=function(e){return 1-i(1-e)},e.easing["easeInOut"+t]=function(e){return.5>e?i(2*e)/2:1-i(-2*e+2)/2}})}(),e.effects,e.effects.effect.blind=function(t,i){var s,n,a,o=e(this),r=/up|down|vertical/,h=/up|left|vertical|horizontal/,l=["position","top","bottom","left","right","height","width"],u=e.effects.setMode(o,t.mode||"hide"),d=t.direction||"up",c=r.test(d),p=c?"height":"width",f=c?"top":"left",m=h.test(d),g={},v="show"===u;o.parent().is(".ui-effects-wrapper")?e.effects.save(o.parent(),l):e.effects.save(o,l),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n=s[p](),a=parseFloat(s.css(f))||0,g[p]=v?n:0,m||(o.css(c?"bottom":"right",0).css(c?"top":"left","auto").css({position:"absolute"}),g[f]=v?a:n+a),v&&(s.css(p,0),m||s.css(f,a+n)),s.animate(g,{duration:t.duration,easing:t.easing,queue:!1,complete:function(){"hide"===u&&o.hide(),e.effects.restore(o,l),e.effects.removeWrapper(o),i()}})},e.effects.effect.bounce=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"effect"),l="hide"===h,u="show"===h,d=t.direction||"up",c=t.distance,p=t.times||5,f=2*p+(u||l?1:0),m=t.duration/f,g=t.easing,v="up"===d||"down"===d?"top":"left",y="up"===d||"left"===d,b=o.queue(),_=b.length;for((u||l)&&r.push("opacity"),e.effects.save(o,r),o.show(),e.effects.createWrapper(o),c||(c=o["top"===v?"outerHeight":"outerWidth"]()/3),u&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,y?2*-c:2*c).animate(a,m,g)),l&&(c/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g).animate(a,m,g),c=l?2*c:c/2;l&&(n={opacity:0},n[v]=(y?"-=":"+=")+c,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}),_>1&&b.splice.apply(b,[1,0].concat(b.splice(_,f+1))),o.dequeue()},e.effects.effect.clip=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","height","width"],h=e.effects.setMode(o,t.mode||"hide"),l="show"===h,u=t.direction||"vertical",d="vertical"===u,c=d?"height":"width",p=d?"top":"left",f={};e.effects.save(o,r),o.show(),s=e.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[c](),l&&(n.css(c,0),n.css(p,a/2)),f[c]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){l||o.hide(),e.effects.restore(o,r),e.effects.removeWrapper(o),i()}})},e.effects.effect.drop=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","opacity","height","width"],o=e.effects.setMode(n,t.mode||"hide"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h?"pos":"neg",d={opacity:r?1:0};e.effects.save(n,a),n.show(),e.effects.createWrapper(n),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===u?-s:s),d[l]=(r?"pos"===u?"+=":"-=":"pos"===u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.explode=function(t,i){function s(){b.push(this),b.length===d*c&&n()}function n(){p.css({visibility:"visible"}),e(b).remove(),m||p.hide(),i()}var a,o,r,h,l,u,d=t.pieces?Math.round(Math.sqrt(t.pieces)):3,c=d,p=e(this),f=e.effects.setMode(p,t.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/c),y=Math.ceil(p.outerHeight()/d),b=[];for(a=0;d>a;a++)for(h=g.top+a*y,u=a-(d-1)/2,o=0;c>o;o++)r=g.left+o*v,l=o-(c-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*y}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:y,left:r+(m?l*v:0),top:h+(m?u*y:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:u*y),opacity:m?1:0},t.duration||500,t.easing,s)},e.effects.effect.fade=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:t.duration,easing:t.easing,complete:i})},e.effects.effect.fold=function(t,i){var s,n,a=e(this),o=["position","top","bottom","left","right","height","width"],r=e.effects.setMode(a,t.mode||"hide"),h="show"===r,l="hide"===r,u=t.size||15,d=/([0-9]+)%/.exec(u),c=!!t.horizFirst,p=h!==c,f=p?["width","height"]:["height","width"],m=t.duration/2,g={},v={};e.effects.save(a,o),a.show(),s=e.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],d&&(u=parseInt(d[1],10)/100*n[l?0:1]),h&&s.css(c?{height:0,width:u}:{height:u,width:0}),g[f[0]]=h?n[0]:u,v[f[1]]=h?n[1]:0,s.animate(g,m,t.easing).animate(v,m,t.easing,function(){l&&a.hide(),e.effects.restore(a,o),e.effects.removeWrapper(a),i()})},e.effects.effect.highlight=function(t,i){var s=e(this),n=["backgroundImage","backgroundColor","opacity"],a=e.effects.setMode(s,t.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),e.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:t.color||"#ffff99"}).animate(o,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===a&&s.hide(),e.effects.restore(s,n),i()}})},e.effects.effect.size=function(t,i){var s,n,a,o=e(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],u=["fontSize"],d=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=e.effects.setMode(o,t.mode||"effect"),f=t.restore||"effect"!==p,m=t.scale||"both",g=t.origin||["middle","center"],v=o.css("position"),y=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===t.mode&&"show"===p?(o.from=t.to||b,o.to=t.from||s):(o.from=t.from||("show"===p?b:s),o.to=t.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(y=y.concat(d),o.from=e.effects.setTransition(o,d,a.from.y,o.from),o.to=e.effects.setTransition(o,d,a.to.y,o.to)),a.from.x!==a.to.x&&(y=y.concat(c),o.from=e.effects.setTransition(o,c,a.from.x,o.from),o.to=e.effects.setTransition(o,c,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(y=y.concat(u).concat(l),o.from=e.effects.setTransition(o,u,a.from.y,o.from),o.to=e.effects.setTransition(o,u,a.to.y,o.to)),e.effects.save(o,y),o.show(),e.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=e.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(d=d.concat(["marginTop","marginBottom"]).concat(u),c=c.concat(["marginLeft","marginRight"]),l=r.concat(d).concat(c),o.find("*[width]").each(function(){var i=e(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&e.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=e.effects.setTransition(i,d,a.from.y,i.from),i.to=e.effects.setTransition(i,d,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=e.effects.setTransition(i,c,a.from.x,i.from),i.to=e.effects.setTransition(i,c,a.to.x,i.to)),i.css(i.from),i.animate(i.to,t.duration,t.easing,function(){f&&e.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),e.effects.restore(o,y),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):e.each(["top","left"],function(e,t){o.css(t,function(t,i){var s=parseInt(i,10),n=e?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),e.effects.removeWrapper(o),i()}})},e.effects.effect.scale=function(t,i){var s=e(this),n=e.extend(!0,{},t),a=e.effects.setMode(s,t.mode||"effect"),o=parseInt(t.percent,10)||(0===parseInt(t.percent,10)?0:"hide"===a?0:100),r=t.direction||"both",h=t.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},u={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=t.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*u.y,width:l.width*u.x,outerHeight:l.outerHeight*u.y,outerWidth:l.outerWidth*u.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},e.effects.effect.puff=function(t,i){var s=e(this),n=e.effects.setMode(s,t.mode||"hide"),a="hide"===n,o=parseInt(t.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};e.extend(t,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(t)},e.effects.effect.pulsate=function(t,i){var s,n=e(this),a=e.effects.setMode(n,t.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(t.times||5)+(h?1:0),u=t.duration/l,d=0,c=n.queue(),p=c.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),d=1),s=1;l>s;s++)n.animate({opacity:d},u,t.easing),d=1-d;n.animate({opacity:d},u,t.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&c.splice.apply(c,[1,0].concat(c.splice(p,l+1))),n.dequeue()},e.effects.effect.shake=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","height","width"],o=e.effects.setMode(n,t.mode||"effect"),r=t.direction||"left",h=t.distance||20,l=t.times||3,u=2*l+1,d=Math.round(t.duration/u),c="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),y=v.length;for(e.effects.save(n,a),n.show(),e.effects.createWrapper(n),f[c]=(p?"-=":"+=")+h,m[c]=(p?"+=":"-=")+2*h,g[c]=(p?"-=":"+=")+2*h,n.animate(f,d,t.easing),s=1;l>s;s++)n.animate(m,d,t.easing).animate(g,d,t.easing);n.animate(m,d,t.easing).animate(f,d/2,t.easing).queue(function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}),y>1&&v.splice.apply(v,[1,0].concat(v.splice(y,u+1))),n.dequeue()},e.effects.effect.slide=function(t,i){var s,n=e(this),a=["position","top","bottom","left","right","width","height"],o=e.effects.setMode(n,t.mode||"show"),r="show"===o,h=t.direction||"left",l="up"===h||"down"===h?"top":"left",u="up"===h||"left"===h,d={};e.effects.save(n,a),n.show(),s=t.distance||n["top"===l?"outerHeight":"outerWidth"](!0),e.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,u?isNaN(s)?"-"+s:-s:s),d[l]=(r?u?"+=":"-=":u?"-=":"+=")+s,n.animate(d,{queue:!1,duration:t.duration,easing:t.easing,complete:function(){"hide"===o&&n.hide(),e.effects.restore(n,a),e.effects.removeWrapper(n),i()}})},e.effects.effect.transfer=function(t,i){var s=e(this),n=e(t.to),a="fixed"===n.css("position"),o=e("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),u={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},d=s.offset(),c=e("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(t.className).css({top:d.top-r,left:d.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(u,t.duration,t.easing,function(){c.remove(),i()})}}); No newline at end of file
@@ -0,0 +1,1
1 {% extends "dev_conf_edit.html" %}
@@ -0,0 +1,27
1 {% extends "dev_conf.html" %}
2 {% load static %}
3 {% load bootstrap3 %}
4 {% load main_tags %}
5
6 {% block extra-head %}
7 <link href="http://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css" rel="stylesheet" type="text/css">
8 {% endblock %}
9
10 {% block content %}
11
12
13
14 <div id="div_plot">{{div}}</div>
15
16
17
18 {% endblock %}
19
20 {% block extra-js%}
21
22 <script src="{% static 'js/jquery-ui.min.js' %}"></script>
23 <script src="{% static 'js/bokeh-0.11.1.min.js' %}"></script>
24
25 {{script}}
26
27 {% endblock %} No newline at end of file
This diff has been collapsed as it changes many lines, (926 lines changed) Show them Hide them
@@ -0,0 +1,926
1 import ast
2 import json
3 import numpy as np
4 import matplotlib.pyplot as plt
5 from matplotlib import cm
6
7 class Pulse_Design_Racp:
8 """A class to define the .racp output from Pulse Design """
9 def __init__(self):
10 self.header = {'version': '1103', 'data':[]}
11 self.radar_param = {'header': '*****Radar Controller Parameters**********', 'data':[]}
12 self.system_param1 = {'header': '******System Parameters*******************', 'data':[]}
13 self.system_param2 = {'header': '******System Parameters*******************', 'data':[]}
14 self.process_param = {'header': '******Process Parameters******************', 'data':[]}
15 self.xml = None
16
17 self.header_fields = [
18 {'name': 'EXPERIMENT TYPE', 'xml': 'Experiment/Process/Signal_pre_processing/Type_of_experiment'},
19 {'name': 'EXPERIMENT NAME', 'xml': 'Experiment', 'xml_attr_value':'name'}]
20 self.radar_param_fields = [
21 {'name': 'IPP', 'xml': 'Experiment/Controller/IPP/Width'},
22 {'name': 'NTX', 'xml': 'Experiment/Controller/NTX'},
23 {'name': 'TXA', 'xml': 'Experiment/Controller/Transmitters/TX', 'xml_attr':'id', 'xml_attr_find':'txa', 'xml_sub_pattern':'Width'},
24 {'name': 'TXB', 'xml': 'Experiment/Controller/Transmitters/TX', 'xml_attr':'id', 'xml_attr_find':'txb', 'xml_sub_pattern':'Width'},
25 {'name': '***', 'xml':'', 'type':'pulse_enable'},
26 {'name': '***', 'xml':'', 'type': 'Line4'},
27 {'name': '***', 'xml':'', 'type': 'Line5'},
28 {'name': '***', 'xml':'', 'type': 'Line6'},
29 {'name': '***', 'xml':'', 'type':'txb_delays_info'},
30 {'name': '***', 'xml':'', 'type': 'Line7'},
31 {'name': 'SAMPLING REFERENCE', 'xml':'Experiment/Controller/Ctl_Setting/Sampling_reference'},
32 {'name': 'RELOJ', 'xml':'Experiment/Controller/Clock/Clock_final'},
33 {'name': 'CLOCK DIVIDER', 'xml':'Experiment/Controller/Clock/Clock_div', 'hide':['1']},
34 {'name': 'TR_BEFORE', 'xml':'Experiment/Controller/Spc_Setting/Time_before'},
35 {'name': 'TR_AFTER', 'xml':'Experiment/Controller/Spc_Setting/Time_after'},
36 {'name': 'WINDOW IN LINE 5&6', 'xml':'', 'value':'NO'},
37 {'name': 'SYNCHRO DELAY', 'xml':'Experiment/Controller/Spc_Setting/Sync_delay', 'hide':['0']}]
38 self.system_param1_fields = [
39 {'name': 'Number of Cards', 'xml':'Experiment/Process/JARS/Number_of_cards', 'hide':['0']},
40 {'name': '***', 'xml':'', 'type':'cards_info'},
41 {'name': '***', 'xml':'', 'type':'channels_info'},
42 {'name': 'RAW DATA DIRECTORY', 'xml':'Experiment/Process/Data_storage/Directory'},
43 {'name': 'CREATE DIRECTORY PER DAY', 'xml':'Experiment/Process/Data_storage/Directory_per_day', 'type':'checkbox_YES_NO'},
44 {'name': 'INCLUDE EXPNAME IN DIRECTORY', 'xml':'Experiment/Process/Data_storage/Expname_in_directory', 'type':'checkbox_YES_NO'}]
45 self.system_param2_fields = [
46 {'name': 'ADC Resolution', 'xml':'', 'value':'12'}, # Default is 8, JARS is 12
47 {'name': 'PCI DIO BusWidth', 'xml':'', 'value':'32'}, # Default for JARS
48 {'name': 'RAW DATA BLOCKS', 'xml':'Experiment/Process/Data_arrangement/Data_blocks'}]
49 self.process_param_fields = [
50 {'name': 'DATATYPE', 'xml': 'Experiment/Process/Signal_pre_processing/Type_of_data'},
51 {'name': 'DATA ARRANGE', 'xml':'', 'value':'CONTIGUOUS_CH'}, #TODO
52 {'name': 'COHERENT INTEGRATION STRIDE', 'xml':'Experiment/Process/Signal_pre_processing/Integration_stride'},
53 {'name': '------------------', 'xml':'', 'type':'separator'},
54 {'name': 'ACQUIRED PROFILES', 'xml':'Experiment/Process/Data_arrangement/Acquired_profiles'},
55 {'name': 'PROFILES PER BLOCK', 'xml':'Experiment/Process/Data_arrangement/Profiles_per_block'},
56 {'name': '------------------', 'xml':'', 'type':'separator'},
57 {'name': 'BEGIN ON START', 'xml':'Experiment/Process/Schedule/Begin_on_Start', 'type': 'checkbox_YES_NO'},
58 {'name': 'BEGIN_TIME', 'xml':'Experiment/Process/Schedule/Start', 'hide':['']},
59 {'name': 'END_TIME', 'xml':'Experiment/Process/Schedule/End', 'hide':['']},
60 {'name': 'VIEW RAW DATA', 'xml':'Experiment/Process/Data_arrangement/View_raw_data', 'type': 'checkbox_YES_NO'},
61 {'name': 'REFRESH RATE', 'xml':'', 'value':'1'}, #TODO
62 {'name': '------------------', 'xml':'', 'type':'separator'},
63 {'name': 'SEND STATUS TO FTP', 'xml':'', 'type':'checkbox_YES_NO', 'value':'NO'}, #TODO
64 {'name': 'FTP SERVER', 'xml':'', 'hide':[None, '']}, #TODO
65 {'name': 'FTP USER', 'xml':'', 'hide':[None, '']}, #TODO
66 {'name': 'FTP PASSWD', 'xml':'', 'hide':[None, '']}, #TODO
67 {'name': 'FTP DIR', 'xml':'', 'hide':[None, '']}, #TODO
68 {'name': 'FTP FILE', 'xml':'', 'hide':[None, '']}, #TODO
69 {'name': 'FTP INTERVAL', 'xml':'', 'hide':[None, '']}, #TODO
70 {'name': 'SAVE STATUS AND BLOCK', 'xml':'', 'type':'checkbox_YES_NO', 'value':'NO'}, #TODO
71 {'name': 'GENERATE RTI', 'xml':'', 'type':'checkbox_YES_NO', 'value':'NO'}, #TODO
72 {'name': 'SEND RTI AND BLOCK', 'xml':'Process_acquired_profiles', 'type':'checkbox_YES_NO'}, #TODO
73 {'name': 'FTP INTERVAL', 'xml':'', 'value':'60'}, #TODO
74 {'name': '------------------', 'xml':'', 'type':'separator'},
75 {'name': 'COMPORT CONFIG', 'xml':'', 'value':'Com1 CBR_9600 TWOSTOPBITS NOPARITY'}, #TODO
76 {'name': 'JAM CONFIGURE FILE', 'xml':'', 'value':''}, #TODO
77 {'name': 'ACQUISITION SYSTEM', 'xml':'', 'value':'JARS'}, #TODO
78 {'name': '******************', 'xml':'', 'type':'acq_system_config_params'},
79 {'name': 'SAVE DATA', 'xml':'', 'value':'YES'}, #TODO
80 {'name': '******************', 'xml':'', 'type':'rc_seq_config_params'},
81 {'name': 'RC_STOP_SEQUENCE', 'xml':'', 'value':'255,0,255,8'},
82 {'name': 'RC_START_SEQUENCE', 'xml':'', 'value':'255,24'}]
83
84 def get_field_value(self, field, user_value):
85 if 'type' in field and field['type'] == 'checkbox_YES_NO': # Check for existence of value
86 if (user_value is None) or (user_value == 'None'):
87 user_value = 'NO'
88 elif user_value == 'on':
89 user_value = 'YES'
90 if 'value' in field and not(user_value): # Replace by default value
91 user_value = field['value']
92 if 'extra' in field and field['extra'] == 'upper': # Uppercase values
93 user_value = user_value.upper()
94 return str(user_value)
95
96 def load_xml(self, xml):
97 self.xml = xml
98 for field in self.header_fields:
99 self.add_line_output(self.header['data'], field)
100 for field in self.radar_param_fields:
101 self.add_line_output(self.radar_param['data'], field)
102 for field in self.system_param1_fields:
103 self.add_line_output(self.system_param1['data'], field)
104 for field in self.system_param2_fields:
105 self.add_line_output(self.system_param2['data'], field)
106 for field in self.process_param_fields:
107 self.add_line_output(self.process_param['data'], field)
108
109
110
111 def add_line_output(self, text_array, param_field):
112 name = param_field['name']
113 xml_l = param_field['xml']
114 acq_number_of_cards = int(self.xml.find('Experiment/Process/JARS/Number_of_cards').text)
115 acq_channels_per_card = int(self.xml.find('Experiment/Process/JARS/Channels_per_card').text)
116 number_of_acq_channels = acq_number_of_cards * acq_channels_per_card
117
118 if 'xml_attr' in param_field and 'xml_attr_find' in param_field:
119 sub_pattern = False
120 if 'xml_sub_pattern' in param_field:
121 sub_pattern = param_field['xml_sub_pattern']
122 element = self.xml.find_by_attribute_value(xml_l, param_field['xml_attr'], param_field['xml_attr_find'],sub_pattern)
123 else:
124 element = self.xml.find(xml_l)
125
126 if 'xml_attr_value' in param_field:
127 value = element.get(param_field['xml_attr_value'])
128 else:
129 value = ''
130 if xml_l == '' and 'value' in param_field:
131 value = param_field['value']
132 elif hasattr(element, 'text'):
133 value = element.text
134
135 if 'type' in param_field and param_field['type'] == 'separator': # Check for existence of value
136 text_array.append('------------------------------------------')
137 return
138 if 'type' in param_field and param_field['type'] == 'acq_system_config_params': # Get Acquisition System Parameters and add them
139 text_array.append("************JARS CONFIGURATION PARAMETERS************")
140 if self.xml.find('Experiment/Process/JARS/Filter').text:
141 # Notice that we need to use backslashes for the filter path
142 text_array.append("Jars_Filter="+self.xml.find('Experiment/Process/JARS/Filter_dir').text +'\\'+ self.xml.find('Experiment/Process/JARS/Filter').text)
143 else:
144 text_array.append("Jars_Filter=")
145 text_array.append("JARS_Collection_Mode="+self.xml.find('Experiment/Process/JARS/JARS_Collection_Mode').text)
146 text_array.append("SAVE_DATA=YES")
147 text_array.append("*****************************************************")
148 return
149 if 'type' in param_field and param_field['type'] == 'rc_seq_config_params': # Get Acquisition System Parameters and add them
150 text_array.append("****************RC SEQUENCES******************")
151 return
152 if 'type' in param_field:
153 if param_field['type'] == 'pulse_enable':
154 txa_enable = self.xml.find_by_attribute_value('Experiment/Controller/Transmitters/TX', 'id', 'txa', 'Pulses')
155 if txa_enable.text is not None:
156 text_array.append('Pulse selection_TXA='+txa_enable.text)
157 txb_enable = self.xml.find_by_attribute_value('Experiment/Controller/Transmitters/TX', 'id', 'txb', 'Pulses')
158 if txb_enable.text is not None:
159 text_array.append('Pulse selection_TXB='+txb_enable.text)
160 tr_enable = self.xml.find('Experiment/Controller/IPP/Pulses')
161 if tr_enable.text is not None:
162 text_array.append('Pulse selection_TR='+tr_enable.text)
163 return
164 elif param_field['type'] == 'Line4' or param_field['type'] == 'Line5' or param_field['type'] == 'Line6' or param_field['type'] == 'Line7':
165 code_name = 'Code_A'
166 line_number = '4'
167 line_parenthesis = ''
168 line_prepend = ''
169
170 if param_field['type'] == 'Line5':
171 code_name = 'Code_B'
172 line_number = '5'
173 line_parenthesis = ' (Line 5)'
174 line_prepend = 'L5_'
175 elif param_field['type'] == 'Line6':
176 code_name = 'Code_C'
177 line_number = '6'
178 line_parenthesis = ' (Line 6)'
179 line_prepend = 'L6_'
180 elif param_field['type'] == 'Line7':
181 code_name = 'Code_D'
182 line_number = '7'
183 line_parenthesis = ' (Line 7)'
184 line_prepend = 'L7_'
185
186 code_channel = self.xml.find_by_attribute_value('Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Mode').text
187 if code_channel == 'FLIP':
188 value = self.xml.find_by_attribute_value('Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Flip').text
189 flip_name = 'L'+line_number+'_FLIP' + line_parenthesis
190 if param_field['type'] == 'Line5':
191 flip_name = 'FLIP1'
192 elif param_field['type'] == 'Line6':
193 flip_name = 'FLIP2'
194 text_array.append(flip_name + '='+value)
195 elif code_channel == 'CODE':
196 code_data = self.xml.find_by_attribute_value('Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Code')
197 Code_reference = code_data.find('Code_reference').text
198 Code_select = code_data.find('Code_select').text
199 Code_number = code_data.find('Code_number').text
200 Code_bits = code_data.find('Code_bits').text
201 custom_codes = get_custom_code_data(Code_select, int(Code_number), int(Code_bits))
202 text_array.append('Code Type' + line_parenthesis + '='+Code_select)
203 text_array.append('Number of Codes' + line_parenthesis + '='+Code_number)
204 text_array.append('Code Width' + line_parenthesis + '='+Code_bits)
205 for zero_idx, custom_code in enumerate(custom_codes):
206 text_array.append(line_prepend+'COD('+str(zero_idx)+')='+custom_code)
207 # Calculate Codes
208 text_array.append('L'+line_number+'_REFERENCE='+Code_reference.upper())
209 elif code_channel == 'Sampling':
210 sampling_name = 'Sampling Windows (Line ' + line_number + ')'
211 prepend = 'L'+line_number+'_'
212 if param_field['type'] == 'Line7':
213 sampling_name = 'Sampling Windows'
214 prepend = ''
215 sampling_data = self.xml.find_by_attribute_value('Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Sampling')
216 Code_reference = sampling_data.find('Code_reference').text.upper()
217 samples = sampling_data.find('Samples')
218 text_array.append(sampling_name+'='+str(len(samples)))
219 for zero_idx, sample in enumerate(samples):
220 text_array.append(prepend+'H0('+str(zero_idx)+')='+sample.find('FH').text)
221 text_array.append(prepend+'NSA('+str(zero_idx)+')='+sample.find('NSA').text)
222 text_array.append(prepend+'DH('+str(zero_idx)+')='+sample.find('DH').text)
223 text_array.append('L'+line_number+'_REFERENCE='+Code_reference.upper())
224 elif code_channel == 'Synchro':
225 text_array.append('Line'+line_number+'=Synchro')
226 elif code_channel == 'Portion_Spec':
227 portion_data = self.xml.find_by_attribute_value('Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'PortionSpec')
228 periodic = portion_data.find('Periodic').text
229 portions = portion_data.find('Portions')
230 text_array.append('L'+line_number+' Number Of Portions='+str(len(portions)))
231 for zero_idx, portion in enumerate(portions):
232 text_array.append('PORTION_BEGIN('+str(zero_idx)+')='+portion.find('Begin_units').text)
233 text_array.append('PORTION_END('+str(zero_idx)+')='+portion.find('End_units').text)
234 if periodic == '1':
235 text_array.append('L'+line_number+' Portions IPP Periodic=YES')
236 else:
237 text_array.append('L'+line_number+' Portions IPP Periodic=NO')
238 return
239 elif param_field['type'] == 'txb_delays_info':
240 txb_delays = self.xml.find_by_attribute_value('Experiment/Controller/Transmitters/TX', 'id', 'txb', 'Delays')
241 text_array.append("Number of Taus="+str(len(txb_delays)))
242 for zero_index, txb_delay in enumerate(txb_delays):
243 text_array.append('TAU('+str(zero_index)+')='+str(txb_delay.text))
244 return
245 elif param_field['type'] == 'cards_info': # Get Cards info
246 if not(acq_number_of_cards == '0'):
247 for card in range(acq_number_of_cards):
248 name = 'Card('+str(card)+')'
249 text_array.append(name + "=" + str(card))
250 return
251 elif param_field['type'] == 'channels_info': # Get Channel info
252 text_array.append("Number of Channels="+str(number_of_acq_channels))
253 if not(number_of_acq_channels == '0'):
254 acq_channels = self.xml.find('Experiment/Process/Acq_channel_selection')
255 enabled_channels = []
256 channel_names =[]
257 for acq_channel in acq_channels:
258 acq_channel_number = acq_channel.get('id')
259 acq_channel_name = acq_channel.find('Name').text
260 enabled = False
261 if hasattr(acq_channel.find('Enabled'), 'text'):
262 enabled = acq_channel.find('Enabled').text
263 if enabled == 'on':
264 text_array.append("Channel("+acq_channel_number+")=" + str(int(acq_channel_number)+1))
265 enabled_channels.append(acq_channel_number)
266 channel_names.append(acq_channel_name)
267 text_array.append("Antennas_Names="+str(len(enabled_channels)))
268 for index, channel in enumerate(enabled_channels):
269 text_array.append("AntennaName(" + str(int(channel)+1) + ")="+str(channel_names[index]))
270 return
271 if 'hide' in param_field and value in param_field['hide']: # Check to see if value should be written
272 return
273 text_array.append(name + "=" + self.get_field_value(param_field, value))
274
275 def convert_to_racp(self):
276 output = []
277 # HEADER
278 for line in self.header['data']:
279 output.append(line)
280 output.append('HEADER VERSION='+self.header['version'])
281 # RADAR PARAMETERS
282 output.append(self.radar_param['header'])
283 for line in self.radar_param['data']:
284 output.append(line)
285 # SYSTEM PARAMETERS
286 output.append(self.system_param1['header'])
287 for line in self.system_param1['data']:
288 output.append(line)
289 output.append(self.system_param2['header'])
290 for line in self.system_param2['data']:
291 output.append(line)
292 # PROCESS PARAMETERS
293 output.append(self.process_param['header'])
294 for line in self.process_param['data']:
295 output.append(line)
296
297 racp_content = "\n".join([str(x) for x in output])
298 return racp_content
299
300 def reduce_code_bits(code_bits, bits_per_code):
301 return code_bits[:bits_per_code]
302
303 def zeropad_code_bits(code_bits, custom_bits_per_code):
304 return code_bits.ljust(custom_bits_per_code, "0")
305
306
307 def get_custom_code_data(codename, number_of_codes, bits_per_code):
308 import json
309 import copy
310 json_data=open('../js/pulse_code_values.json')
311 PD_pulse_codes = json.load(json_data)
312 selected_code = copy.copy(PD_pulse_codes[codename])
313
314 modified_binary_codes = []
315 for i in range (number_of_codes):
316 if (i >= selected_code['number_of_codes']):
317 # We just repeat the first code.
318 modified_binary_codes.append(selected_code['binary_codes'][0])
319 else:
320 modified_binary_codes.append(selected_code['binary_codes'][i])
321 # Now adjust the width
322 if (bits_per_code <= selected_code['bits_per_code']):
323 modified_binary_codes = [reduce_code_bits(x, bits_per_code) for x in modified_binary_codes]
324 else: # Zero pad to the right
325 modified_binary_codes = [zeropad_code_bits(x, bits_per_code) for x in modified_binary_codes]
326 return modified_binary_codes
327
328 class Pulse_Design_Mixed_Racp:
329 """A class to define the .racp output from Pulse Design """
330 def __init__(self, number_of_experiments):
331 self.header = {'version': '1103'}
332 self.radar_param = {'header': '*****Radar Controller Parameters**********'}
333 self.system_param1 = {'header': '******System Parameters*******************'}
334 self.system_param2 = {'header': '******System Parameters*******************'}
335 self.process_param = {'header': '******Process Parameters******************'}
336 self.xml = None
337 self.number_of_experiments = number_of_experiments
338 self.header_fields = {}
339 self.radar_param_fields = {}
340 self.system_param1_fields = {}
341 self.system_param2_fields = {}
342 self.process_param_fields = {}
343
344 for i in range(self.number_of_experiments):
345 self.header['data_experiment_number_'+str(i)] = []
346 self.radar_param['data_experiment_number_'+str(i)] = []
347 self.system_param1['data_experiment_number_'+str(i)] = []
348 self.system_param2['data_experiment_number_'+str(i)] = []
349 self.process_param['data_experiment_number_'+str(i)] = []
350
351 self.header_fields['indices_experiment_number_'+str(i)] = []
352 self.radar_param_fields['indices_experiment_number_'+str(i)] = []
353 self.system_param1_fields['indices_experiment_number_'+str(i)] = []
354 self.system_param2_fields['indices_experiment_number_'+str(i)] = []
355 self.process_param_fields['indices_experiment_number_'+str(i)] = []
356
357 self.header_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'EXPERIMENT TYPE', 'xml': 'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Signal_pre_processing/Type_of_experiment'})
358 self.header_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'EXPERIMENT NAME', 'xml': 'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment', 'xml_attr_value':'name'})
359 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'IPP', 'xml': 'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/IPP/Width'})
360 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'NTX', 'xml': 'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/NTX'})
361 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'TXA', 'xml': 'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Transmitters/TX', 'xml_attr':'id', 'xml_attr_find':'txa', 'xml_sub_pattern':'Width'})
362 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'TXB', 'xml': 'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Transmitters/TX', 'xml_attr':'id', 'xml_attr_find':'txb', 'xml_sub_pattern':'Width'})
363 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type':'pulse_enable'})
364 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type': 'Line4'})
365 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type': 'Line5'})
366 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type': 'Line6'})
367 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type':'txb_delays_info'})
368 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type': 'Line7'})
369 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'SAMPLING REFERENCE', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Ctl_Setting/Sampling_reference'})
370 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'RELOJ', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Clock/Clock_final'})
371 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'CLOCK DIVIDER', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Clock/Clock_div', 'hide':['1']})
372 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'TR_BEFORE', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Spc_Setting/Time_before'})
373 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'TR_AFTER', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Spc_Setting/Time_after'})
374 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'WINDOW IN LINE 5&6', 'xml':'', 'value':'NO'})
375 self.radar_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'SYNCHRO DELAY', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Controller/Spc_Setting/Sync_delay', 'hide':['0']})
376 self.system_param1_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'Number of Cards', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/JARS/Number_of_cards', 'hide':['0']})
377 self.system_param1_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type':'cards_info'})
378 self.system_param1_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '***', 'xml':'', 'type':'channels_info'})
379 self.system_param1_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'RAW DATA DIRECTORY', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Data_storage/Directory'})
380 self.system_param1_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'CREATE DIRECTORY PER DAY', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Data_storage/Directory_per_day', 'type':'checkbox_YES_NO'})
381 self.system_param1_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'INCLUDE EXPNAME IN DIRECTORY', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Data_storage/Expname_in_directory', 'type':'checkbox_YES_NO'})
382 self.system_param2_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'ADC Resolution', 'xml':'', 'value':'12'})# Default is 8, JARS is 12
383 self.system_param2_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'PCI DIO BusWidth', 'xml':'', 'value':'32'}) # Default for JARS
384 self.system_param2_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'RAW DATA BLOCKS', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Data_arrangement/Data_blocks'})
385 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'DATATYPE', 'xml': 'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Signal_pre_processing/Type_of_data'})
386 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'DATA ARRANGE', 'xml':'', 'value':'CONTIGUOUS_CH'})
387 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'COHERENT INTEGRATION STRIDE', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Signal_pre_processing/Integration_stride'})
388 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '------------------', 'xml':'', 'type':'separator'})
389 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'ACQUIRED PROFILES', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Data_arrangement/Acquired_profiles'})
390 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'PROFILES PER BLOCK', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Data_arrangement/Profiles_per_block'})
391 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '------------------', 'xml':'', 'type':'separator'})
392 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'BEGIN ON START', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Schedule/Begin_on_Start', 'type': 'checkbox_YES_NO'})
393 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'BEGIN_TIME', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Schedule/Start', 'hide':['']})
394 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'END_TIME', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Schedule/End', 'hide':['']})
395 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'VIEW RAW DATA', 'xml':'Experiments/List/Experiment['+str(i)+']/XML_contents/Pulse_Design/Experiment/Process/Data_arrangement/View_raw_data', 'type': 'checkbox_YES_NO'})
396 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'REFRESH RATE', 'xml':'', 'value':'1'})
397 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '------------------', 'xml':'', 'type':'separator'})
398 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'SEND STATUS TO FTP', 'xml':'', 'type':'checkbox_YES_NO', 'value':'NO'})
399 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'FTP SERVER', 'xml':'', 'hide':[None, '']})
400 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'FTP USER', 'xml':'', 'hide':[None, '']})
401 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'FTP PASSWD', 'xml':'', 'hide':[None, '']})
402 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'FTP DIR', 'xml':'', 'hide':[None, '']})
403 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'FTP FILE', 'xml':'', 'hide':[None, '']})
404 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'FTP INTERVAL', 'xml':'', 'hide':[None, '']})
405 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'SAVE STATUS AND BLOCK', 'xml':'', 'type':'checkbox_YES_NO', 'value':'NO'})
406 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'GENERATE RTI', 'xml':'', 'type':'checkbox_YES_NO', 'value':'NO'})
407 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'SEND RTI AND BLOCK', 'xml':'Process_acquired_profiles', 'type':'checkbox_YES_NO'})
408 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'FTP INTERVAL', 'xml':'', 'value':'60'})
409 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '------------------', 'xml':'', 'type':'separator'})
410 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'COMPORT CONFIG', 'xml':'', 'value':'Com1 CBR_9600 TWOSTOPBITS NOPARITY'})
411 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'JAM CONFIGURE FILE', 'xml':'', 'value':''})
412 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'ACQUISITION SYSTEM', 'xml':'', 'value':'JARS'})
413 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '******************', 'xml':'', 'type':'acq_system_config_params'})
414 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'SAVE DATA', 'xml':'', 'value':'YES'})
415 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': '******************', 'xml':'', 'type':'rc_seq_config_params'})
416 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'RC_STOP_SEQUENCE', 'xml':'', 'value':'255,0,255,8'})
417 self.process_param_fields['indices_experiment_number_'+str(i)].append({'number_experiment': i,'name': 'RC_START_SEQUENCE', 'xml':'', 'value':'255,24'})
418 def get_field_value(self, field, user_value):
419 if 'type' in field and field['type'] == 'checkbox_YES_NO': # Check for existence of value
420 if (user_value is None) or (user_value == 'None'):
421 user_value = 'NO'
422 elif user_value == 'on':
423 user_value = 'YES'
424 if 'value' in field and not(user_value): # Replace by default value
425 user_value = field['value']
426 if 'extra' in field and field['extra'] == 'upper': # Uppercase values
427 user_value = user_value.upper()
428 return str(user_value)
429
430 def load_xml(self, xml):
431 self.xml = xml
432 for i in range(self.number_of_experiments):
433 for field in self.header_fields['indices_experiment_number_'+str(i)]:
434 self.add_line_output(self.header['data_experiment_number_'+str(i)], field)
435 for field in self.radar_param_fields['indices_experiment_number_'+str(i)]:
436 self.add_line_output(self.radar_param['data_experiment_number_'+str(i)], field)
437 for field in self.system_param1_fields['indices_experiment_number_'+str(i)]:
438 self.add_line_output(self.system_param1['data_experiment_number_'+str(i)], field)
439 for field in self.system_param2_fields['indices_experiment_number_'+str(i)]:
440 self.add_line_output(self.system_param2['data_experiment_number_'+str(i)], field)
441 for field in self.process_param_fields['indices_experiment_number_'+str(i)]:
442 self.add_line_output(self.process_param['data_experiment_number_'+str(i)], field)
443
444
445
446 def add_line_output(self, text_array, param_field):
447
448
449 name = param_field['name']
450 xml_l = param_field['xml']
451 id = str(param_field['number_experiment'])
452 acq_number_of_cards = int(self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Process/JARS/Number_of_cards').text)
453 acq_channels_per_card = int(self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Process/JARS/Channels_per_card').text)
454 number_of_acq_channels = acq_number_of_cards * acq_channels_per_card
455
456
457
458 if 'xml_attr' in param_field and 'xml_attr_find' in param_field:
459 sub_pattern = False
460 if 'xml_sub_pattern' in param_field:
461 sub_pattern = param_field['xml_sub_pattern']
462 element = self.xml.find_by_attribute_value(xml_l, param_field['xml_attr'], param_field['xml_attr_find'],sub_pattern)
463 else:
464 element = self.xml.find(xml_l)
465
466 if 'xml_attr_value' in param_field:
467 value = element.get(param_field['xml_attr_value'])
468 else:
469 value = ''
470 if xml_l == '' and 'value' in param_field:
471 value = param_field['value']
472 elif hasattr(element, 'text'):
473 value = element.text
474
475 if 'type' in param_field and param_field['type'] == 'separator': # Check for existence of value
476 text_array.append('------------------------------------------')
477 return
478 if 'type' in param_field and param_field['type'] == 'acq_system_config_params': # Get Acquisition System Parameters and add them
479 text_array.append("************JARS CONFIGURATION PARAMETERS************")
480 if self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Process/JARS/Filter').text:
481 # Notice that we need to use backslashes for the filter path
482 text_array.append("Jars_Filter="+self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Process/JARS/Filter_dir').text +'\\'+ self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Process/JARS/Filter').text)
483 else:
484 text_array.append("Jars_Filter=")
485 text_array.append("JARS_Collection_Mode="+self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Process/JARS/JARS_Collection_Mode').text)
486 text_array.append("SAVE_DATA=YES")
487 text_array.append("*****************************************************")
488 return
489 if 'type' in param_field and param_field['type'] == 'rc_seq_config_params': # Get Acquisition System Parameters and add them
490 text_array.append("****************RC SEQUENCES******************")
491 return
492 ##{'name': '***', 'xml':'', 'type':'pulse_enable'},
493 if 'type' in param_field:
494 if param_field['type'] == 'pulse_enable':
495 txa_enable = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Transmitters/TX', 'id', 'txa', 'Pulses')
496 if txa_enable.text is not None:
497 text_array.append('Pulse selection_TXA='+txa_enable.text)
498 txb_enable = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Transmitters/TX', 'id', 'txb', 'Pulses')
499 if txb_enable.text is not None:
500 text_array.append('Pulse selection_TXB='+txb_enable.text)
501 tr_enable = self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/IPP/Pulses')
502 if tr_enable.text is not None:
503 text_array.append('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Pulse selection_TR='+tr_enable.text)
504 return
505 elif param_field['type'] == 'Line4' or param_field['type'] == 'Line5' or param_field['type'] == 'Line6' or param_field['type'] == 'Line7':
506 code_name = 'Code_A'
507 line_number = '4'
508 line_parenthesis = ''
509 line_prepend = ''
510
511 if param_field['type'] == 'Line5':
512 code_name = 'Code_B'
513 line_number = '5'
514 line_parenthesis = ' (Line 5)'
515 line_prepend = 'L5_'
516 elif param_field['type'] == 'Line6':
517 code_name = 'Code_C'
518 line_number = '6'
519 line_parenthesis = ' (Line 6)'
520 line_prepend = 'L6_'
521 elif param_field['type'] == 'Line7':
522 code_name = 'Code_D'
523 line_number = '7'
524 line_parenthesis = ' (Line 7)'
525 line_prepend = 'L7_'
526
527 code_channel = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Mode').text
528 if code_channel == 'FLIP':
529 value = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Flip').text
530 flip_name = 'L'+line_number+'_FLIP' + line_parenthesis
531 if param_field['type'] == 'Line5':
532 flip_name = 'FLIP1'
533 elif param_field['type'] == 'Line6':
534 flip_name = 'FLIP2'
535 text_array.append(flip_name + '='+value)
536 elif code_channel == 'CODE':
537 code_data = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Code')
538 Code_reference = code_data.find('Code_reference').text
539 Code_select = code_data.find('Code_select').text
540 Code_number = code_data.find('Code_number').text
541 Code_bits = code_data.find('Code_bits').text
542 custom_codes = get_custom_code_data(Code_select, int(Code_number), int(Code_bits))
543 text_array.append('Code Type' + line_parenthesis + '='+Code_select)
544 text_array.append('Number of Codes' + line_parenthesis + '='+Code_number)
545 text_array.append('Code Width' + line_parenthesis + '='+Code_bits)
546 for zero_idx, custom_code in enumerate(custom_codes):
547 text_array.append(line_prepend+'COD('+str(zero_idx)+')='+custom_code)
548 # Calculate Codes
549 text_array.append('L'+line_number+'_REFERENCE='+Code_reference.upper())
550 elif code_channel == 'Sampling':
551 sampling_name = 'Sampling Windows (Line ' + line_number + ')'
552 prepend = 'L'+line_number+'_'
553 if param_field['type'] == 'Line7':
554 sampling_name = 'Sampling Windows'
555 prepend = ''
556 sampling_data = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'Sampling')
557 Code_reference = sampling_data.find('Code_reference').text.upper()
558 samples = sampling_data.find('Samples')
559 text_array.append(sampling_name+'='+str(len(samples)))
560 for zero_idx, sample in enumerate(samples):
561 text_array.append(prepend+'H0('+str(zero_idx)+')='+sample.find('FH').text)
562 text_array.append(prepend+'NSA('+str(zero_idx)+')='+sample.find('NSA').text)
563 text_array.append(prepend+'DH('+str(zero_idx)+')='+sample.find('DH').text)
564 text_array.append('L'+line_number+'_REFERENCE='+Code_reference.upper())
565 elif code_channel == 'Synchro':
566 text_array.append('Line'+line_number+'=Synchro')
567 elif code_channel == 'Portion_Spec':
568 portion_data = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Code_channels/Code_channel', 'id', code_name, 'PortionSpec')
569 periodic = portion_data.find('Periodic').text
570 portions = portion_data.find('Portions')
571 text_array.append('L'+line_number+' Number Of Portions='+str(len(portions)))
572 for zero_idx, portion in enumerate(portions):
573 text_array.append('PORTION_BEGIN('+str(zero_idx)+')='+portion.find('Begin_units').text)
574 text_array.append('PORTION_END('+str(zero_idx)+')='+portion.find('End_units').text)
575 if periodic == '1':
576 text_array.append('L'+line_number+' Portions IPP Periodic=YES')
577 else:
578 text_array.append('L'+line_number+' Portions IPP Periodic=NO')
579 return
580 elif param_field['type'] == 'txb_delays_info':
581 txb_delays = self.xml.find_by_attribute_value('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Controller/Transmitters/TX', 'id', 'txb', 'Delays')
582 text_array.append("Number of Taus="+str(len(txb_delays)))
583 for zero_index, txb_delay in enumerate(txb_delays):
584 text_array.append('TAU('+str(zero_index)+')='+str(txb_delay.text))
585 return
586 elif param_field['type'] == 'cards_info': # Get Cards info
587 if not(acq_number_of_cards == '0'):
588 for card in range(acq_number_of_cards):
589 name = 'Card('+str(card)+')'
590 text_array.append(name + "=" + str(card))
591 return
592 elif param_field['type'] == 'channels_info': # Get Channel info
593 text_array.append("Number of Channels="+str(number_of_acq_channels))
594 if not(number_of_acq_channels == '0'):
595 acq_channels = self.xml.find('Experiments/List/Experiment['+id+']/XML_contents/Pulse_Design/Experiment/Process/Acq_channel_selection')
596 enabled_channels = []
597 channel_names =[]
598 for acq_channel in acq_channels:
599 acq_channel_number = acq_channel.get('id')
600 acq_channel_name = acq_channel.find('Name').text
601 enabled = False
602 if hasattr(acq_channel.find('Enabled'), 'text'):
603 enabled = acq_channel.find('Enabled').text
604 if enabled == 'on':
605 text_array.append("Channel("+acq_channel_number+")=" + str(int(acq_channel_number)+1))
606 enabled_channels.append(acq_channel_number)
607 channel_names.append(acq_channel_name)
608 text_array.append("Antennas_Names="+str(len(enabled_channels)))
609 for index, channel in enumerate(enabled_channels):
610 text_array.append("AntennaName(" + str(int(channel)+1) + ")="+str(channel_names[index]))
611 return
612 if 'hide' in param_field and value in param_field['hide']: # Check to see if value should be written
613 return
614 text_array.append(name + "=" + self.get_field_value(param_field, value))
615
616 def convert_to_racp(self):
617 output = []
618 # HEADER
619 for i in range(self.number_of_experiments):
620 for line in self.header['data_experiment_number_'+str(i)]:
621 output.append(line)
622 output.append('HEADER VERSION='+self.header['version'])
623 # RADAR PARAMETERS
624 output.append(self.radar_param['header'])
625 for line in self.radar_param['data_experiment_number_'+str(i)]:
626 output.append(line)
627 # SYSTEM PARAMETERS
628 output.append(self.system_param1['header'])
629 for line in self.system_param1['data_experiment_number_'+str(i)]:
630 output.append(line)
631 output.append(self.system_param2['header'])
632 for line in self.system_param2['data_experiment_number_'+str(i)]:
633 output.append(line)
634 # PROCESS PARAMETERS
635 output.append(self.process_param['header'])
636 for line in self.process_param['data_experiment_number_'+str(i)]:
637 output.append(line)
638 output.append("\n")
639
640 racp_content = "\n".join([str(x) for x in output])
641 return racp_content
642
643 class RCFile(object):
644
645 def __init__(self, f=None):
646
647 self.data = {}
648 if isinstance(f, str):
649 self.f = open(f)
650 self.name = f.split('/')[-1]
651 elif hasattr(f, 'read'):
652 self.f = f
653 self.name = f.name.split('/')[-1]
654 else:
655 self.f = f
656 self.name = None
657
658 if self.f:
659 if 'racp' in self.name:
660 self.parse_racp()
661 elif 'dat' in self.name:
662 self.parse_dat()
663
664 def get_line_parameters(self, data, line):
665
666 line_params = {}
667 for label in data:
668 if 'L%d' % line in label or '(Line %d)' % line in label or 'Line%d' % line in label:
669 line_params[label] = data[label]
670 return line_params
671
672 def parse_racp(self):
673
674 data = {}
675 raw_data = [s.strip() for s in self.f.readlines()]
676 for line in raw_data:
677 if line and '=' in line:
678 label, value = line.strip().split('=')
679 data[label] = value
680 self.data['experiment_type'] = data['EXPERIMENT TYPE']
681 self.data['header_version'] = data['HEADER VERSION']
682 self.data['name'] = data['EXPERIMENT NAME']
683 self.data['ipp'] = float(data['IPP'])
684 self.data['ntx'] = int(data['NTX'])
685 if 'CLOCK DIVIDER' in data:
686 self.data['clock_divider'] = int(data['CLOCK DIVIDER'])
687 else:
688 self.data['clock_divider'] = 1
689 self.data['clock'] = float(data['RELOJ'])*self.data['clock_divider']
690 self.data['time_before'] = int(data['TR_BEFORE'])
691 self.data['time_after'] = int(data['TR_AFTER'])
692 if 'SYNCHRO DELAY' in data:
693 self.data['sync'] = int(data['SYNCHRO DELAY'])
694 else:
695 self.data['sync'] = 0
696 self.data['lines'] = []
697
698 #Add TR line
699 if 'Pulse selection_TR' in data:
700 if 'A' in data['Pulse selection_TR']:
701 rng = data['Pulse selection_TR'].replace('A', '')
702 elif 'B' in data['Pulse selection_TR']:
703 rng = data['Pulse selection_TR'].replace('B', '')
704 else:
705 rng = data['Pulse selection_TR']
706 line = {'type':'tr', 'range': rng, 'TX_ref':'TXA'}
707 else:
708 line = {'type': 'tr', 'range': 0, 'TX_ref': '0'}
709
710 self.data['lines'].append(line)
711
712 #Add TX's lines
713 if 'TXA' in data:
714 line = {'type':'tx', 'pulse_width':data['TXA'], 'delays':'0'}
715 if 'Pulse selection_TXA' in data:
716 line['range'] = data['Pulse selection_TXA']
717 else:
718 line['range'] = '0'
719 self.data['lines'].append(line)
720
721 if 'TXB' in data:
722 line = {'type':'tx', 'pulse_width':data['TXB'], 'delays':'0'}
723 if 'Pulse selection_TXB' in data:
724 line['range'] = data['Pulse selection_TXB']
725 else:
726 line['range'] = '0'
727
728 if 'Number of Taus' in data:
729 delays = [data['TAU({0})'.format(i)] for i in range(int(data['Number of Taus']))]
730 line['delays'] = ','.join(delays)
731
732 self.data['lines'].append(line)
733
734 #Add Other lines (4-6)
735 for n in range(4, 7):
736 params = self.get_line_parameters(data, n)
737 labels = params.keys()
738
739 if 'L%d_FLIP' % n in labels:
740 line = {'type':'flip', 'number_of_flips':data['L%d_FLIP' % n]}
741 elif 'Code Type' in data and n==4:
742 line = {'type':'codes', 'code':data['Code Type'], 'TX_ref':data['L%d_REFERENCE' % n]}
743 elif 'Code Type (Line %d)' % n in labels:
744 line = {'type':'codes', 'code':data['Code Type (Line %d)' % n], 'TX_ref':data['L%d_REFERENCE' % n]}
745 elif 'Sampling Windows (Line %d)' % n in data:
746 line = {'type':'windows', 'TX_ref':data['L%d_REFERENCE' % n]}
747 windows = []
748 for w in range(int(data['Sampling Windows (Line %d)' % n])):
749 windows.append({'first_height':float(data['L%d_H0(%d)' % (n, w)]),
750 'number_of_samples':int(data['L%d_NSA(%d)' % (n, w)]),
751 'resolution':float(data['L%d_DH(%d)' % (n, w)])}
752 )
753 line['params'] = windows
754 elif 'Line%d' % n in labels and data['Line%d' % n]=='Synchro':
755 line = {'type':'sync', 'invert':0}
756 elif 'L%d Number Of Portions' % n in labels:
757 line = {'type':'prog_pulses'}
758 if 'L%s Portions IPP Periodic' % n in data:
759 line['periodic'] = 1 if data['L%s Portions IPP Periodic' % n]=='YES' else 0
760 portions = []
761 x = raw_data.index('L%d Number Of Portions=%s' % (n, data['L%d Number Of Portions' % n]))
762 for w in range(int(data['L%d Number Of Portions' % n])):
763 begin = raw_data[x+1+2*w].split('=')[-1]
764 end = raw_data[x+2+2*w].split('=')[-1]
765 portions.append({'begin':int(begin),
766 'end':int(end)}
767 )
768 line['params'] = portions
769 elif 'FLIP1' in data and n==5:
770 line = {'type':'flip', 'number_of_flips':data['FLIP1']}
771 elif 'FLIP2' in data and n==6:
772 line = {'type':'flip', 'number_of_flips':data['FLIP2']}
773 else:
774 line = {'type':'none'}
775
776 self.data['lines'].append(line)
777
778 #Add line 7 (windows)
779 if 'Sampling Windows' in data:
780 line = {'type':'windows', 'TX_ref':data['L7_REFERENCE']}
781 windows = []
782 x = raw_data.index('Sampling Windows=%s' % data['Sampling Windows'])
783 for w in range(int(data['Sampling Windows'])):
784 h0 = raw_data[x+1+3*w].split('=')[-1]
785 nsa = raw_data[x+2+3*w].split('=')[-1]
786 dh = raw_data[x+3+3*w].split('=')[-1]
787 windows.append({'first_height':float(h0),
788 'number_of_samples':int(nsa),
789 'resolution':float(dh)}
790 )
791 line['params'] = windows
792 self.data['lines'].append(line)
793 else:
794 self.data['lines'].append({'type':'none'})
795
796 #Add line 8 (synchro inverted)
797 self.data['lines'].append({'type':'sync', 'invert':1})
798
799 return
800
801 def parse_dat(self):
802 pass
803
804
805 def get_json(self, indent=None):
806 return json.dumps(self.data, indent=indent)
807
808
809 def pulses_to_bar(X):
810
811
812 d = X[1:]-X[:-1]
813
814 up = np.where(d==1)[0]
815 if X[0]==1:
816 up = np.concatenate((np.array([-1]), up))
817 up += 1
818
819 dw = np.where(d==-1)[0]
820 if X[-1]==1:
821 dw = np.concatenate((dw, np.array([len(X)-1])))
822 dw += 1
823
824 return [(tup[0], tup[1]-tup[0]) for tup in zip(up, dw)]
825
826
827 def pulses_from_code(ipp, ntx, codes, width, before=0):
828
829 if ntx>len(codes):
830 ipp_codes = [c for __ in xrange(ntx) for c in codes][:ntx]
831 else:
832 ipp_codes = codes[:ntx]
833
834 f = width/len(codes[0])
835
836 ipp_codes = [''.join([s*f for s in code]) for code in ipp_codes]
837
838 if before>0:
839 sbefore = '{0:0{1}d}'.format(0, before)
840 else:
841 sbefore = ''
842
843 temp = ['{0}{1}{2:0{3}d}'.format(sbefore, ipp_codes[i], 0, int(ipp)-len(ipp_codes[i])-before) for i in range(ntx)]
844
845 return (np.fromstring(''.join(temp), dtype=np.uint8)-48).astype(np.int8)
846
847
848 def create_mask(ranges, ipp, ntx, sync):
849
850 x = np.arange(ipp*ntx)
851 iranges = set()
852
853 for index in ranges:
854 if '-' in index:
855 args = [int(a) for a in index.split('-')]
856 iranges = iranges.union([i for i in range(args[0], args[1]+1)])
857 else:
858 iranges.add(int(index))
859
860 y = np.any([(x>=(idx-1)*ipp+sync) & (x<idx*ipp+sync) for idx in iranges], axis=0).astype(np.int8)
861
862 return y
863
864
865 def pulses(X, period, width, delay=0, before=0, after=0, sync=0, shift=0):
866
867 delay_array = delay
868
869 if isinstance(delay, (list, tuple)):
870 delay_array = np.ones(len(X))
871 delays = [d for __ in xrange(len(X)/(period*len(delay))) for d in delay]
872 for i, delay in enumerate(delays):
873 delay_array[np.arange(period*i, period*(i+1))] *= delay
874
875 if after>0:
876 width += after+before
877 before = 0
878
879 Y = ((X%period<width+delay_array+before+sync) & (X%period>=delay_array+before+sync)).astype(np.int8)
880
881 if shift>0:
882 y = np.empty_like(Y)
883 y[:shift] = 0
884 y[shift:] = Y[:-shift]
885 return y
886 else:
887 return Y
888
889
890 def plot_pulses(unit, maximun, lines):
891
892 from bokeh.resources import CDN
893 from bokeh.embed import components
894 from bokeh.mpl import to_bokeh
895 from bokeh.plotting import figure
896 from bokeh.models.tools import WheelZoomTool, ResetTool, PanTool, PreviewSaveTool
897
898
899 N = len(lines)
900 fig = plt.figure(figsize=(10, 2+N*0.5))
901 ax = fig.add_subplot(111)
902 labels = []
903 data = []
904 for i, line in enumerate(lines):
905 print line
906 labels.append(line.get_name())
907 ax.broken_barh(pulses_to_bar(line.pulses_as_array()), (N-i-1, 0.5),
908 edgecolor='none', facecolor='#2c3e50')
909 #data.append(line.pulses_as_array())
910
911
912 #labels.append('{:3.2f} Km'.format(unit*100))
913 #ax.broken_barh(pulses_to_bar(pulses(np.arange(0, maximun), 200, 100)), (0, 0.5),
914 # edgecolor='none', facecolor='#ae3910')
915
916
917 #ax.pcolor(data, cmap=cm.Blues, vmin=0, vmax=1)
918
919 labels.reverse()
920 #plot = figure(x_range=[0, maximun], y_range=[0, N])
921 #plot.image(image=[np.logical_not(data).astype(np.int8)], x=[0], y=[0], dh=[N], dw=[maximun], palette='Blues9')
922 ax.set_yticklabels(labels)
923 plot = to_bokeh(fig, use_pandas=False)
924 plot.tools = [PanTool(dimensions=['width']), WheelZoomTool(dimensions=['width']), ResetTool(), PreviewSaveTool()]
925
926 return components(plot, CDN)
@@ -77,13 +77,12
77 {% block sidebar%}
77 {% block sidebar%}
78 {% endblock %}
78 {% endblock %}
79 </div>
79 </div>
80 </div>
80 </div>
81
81
82 <div class="col-md-9 col-xs-12" role="main">
82 <div class="col-md-9 col-xs-12" role="main">
83 <div class="page-header">
83 <div class="page-header">
84 <h1>{% block content-title %}{% endblock %} <small>{% block content-suptitle %}{% endblock %}</small></h1>
84 <h1>{% block content-title %}{% endblock %} <small>{% block content-suptitle %}{% endblock %}</small></h1>
85 <hr>
85 </div>
86 </div>
87 {% block messages %}
86 {% block messages %}
88 {% if messages %}
87 {% if messages %}
89 {% for message in messages %}
88 {% for message in messages %}
@@ -99,7 +98,6
99 {% endblock %}
98 {% endblock %}
100
99
101 </div>
100 </div>
102
103
101
104 </div><!--/row-->
102 </div><!--/row-->
105 </div> <!-- container -->
103 </div> <!-- container -->
@@ -120,7 +118,6
120 {# bootstrap_javascript jquery=True #}
118 {# bootstrap_javascript jquery=True #}
121 <script src="{% static 'js/jquery.min.js' %}"></script>
119 <script src="{% static 'js/jquery.min.js' %}"></script>
122 <script src="{% static 'js/bootstrap.min.js' %}"></script>
120 <script src="{% static 'js/bootstrap.min.js' %}"></script>
123 <script src="{% static 'js/jquery-ui.min.js' %}"></script>
124 {% block extra-js %}
121 {% block extra-js %}
125 {% endblock%}
122 {% endblock%}
126 </body>
123 </body>
@@ -26,8 +26,10
26 {% endblock %}
26 {% endblock %}
27
27
28 {% block extra-js%}
28 {% block extra-js%}
29 <script src="{% static 'js/moment.min.js' %}"></script>
29 <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script>
30 <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script>
30 <script type="text/javascript">
31 <script type="text/javascript">
32
31 $('.input-group.date').datetimepicker({"format": "YYYY-MM-DD HH:mm"});
33 $('.input-group.date').datetimepicker({"format": "YYYY-MM-DD HH:mm"});
32
34
33 </script>
35 </script>
@@ -11,7 +11,7
11 {% endif %}
11 {% endif %}
12 {% if delete_view %}
12 {% if delete_view %}
13 {% if object_name %}
13 {% if object_name %}
14 <h3>Are you sure you wish to delete {{ object_name }}: {{ object }}?</h3>
14 <h3>Are you sure you wish to delete {{ object_name }} from {{ object }}?</h3>
15 {% else %}
15 {% else %}
16 <h3>Are you sure you wish to delete: {{ object }}?</h3>
16 <h3>Are you sure you wish to delete: {{ object }}?</h3>
17 {% endif %}
17 {% endif %}
@@ -13,7 +13,7
13 <table class="table table-bordered">
13 <table class="table table-bordered">
14 <tr>
14 <tr>
15 <th>Status</th>
15 <th>Status</th>
16 <td>{%if connected == True %} &#9752; Connected {% else %} &#9940; Disconnected {% endif %}</td>
16 <td>{%if connected == True %} <span class="glyphicon glyphicon-ok-circle text-success" aria-hidden="true"></span> Connected {% else %} <span class="glyphicon glyphicon-remove-circle text-danger" aria-hidden="true"></span> Disconnected {% endif %}</td>
17 </tr>
17 </tr>
18
18
19 {% for key in dev_conf_keys %}
19 {% for key in dev_conf_keys %}
@@ -26,8 +26,13
26 {% endblock %}
26 {% endblock %}
27
27
28 {% block extra-js%}
28 {% block extra-js%}
29 <script src="{% static 'js/moment.min.js' %}"></script>
29 <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script>
30 <script src="{% static 'js/bootstrap-datetimepicker.min.js' %}"></script>
30 <script type="text/javascript">
31 <script type="text/javascript">
31 $('.input-group.date').datetimepicker({"format": "YYYY-MM-DD HH:mm"});
32 $('.input-group.time').datetimepicker({
33 format: 'HH:mm:ss',
34 pickDate: false,
35 pickSeconds: true
36 });
32 </script>
37 </script>
33 {% endblock %} No newline at end of file
38 {% endblock %}
@@ -357,7 +357,7 def experiment(request, id_exp):
357 kwargs['title'] = 'Experiment'
357 kwargs['title'] = 'Experiment'
358 kwargs['suptitle'] = 'Details'
358 kwargs['suptitle'] = 'Details'
359
359
360 kwargs['button'] = 'Add Device'
360 kwargs['button'] = 'Add Configuration'
361
361
362 return render(request, 'experiment.html', kwargs)
362 return render(request, 'experiment.html', kwargs)
363
363
@@ -1,23 +1,102
1 import os
1 import json
2 import json
2
3
3 from django import forms
4 from django import forms
5 from django.utils.safestring import mark_safe
6 from apps.main.models import Device
7 from apps.main.forms import add_empty_choice
4 from .models import RCConfiguration, RCLine, RCLineType, RCLineCode
8 from .models import RCConfiguration, RCLine, RCLineType, RCLineCode
5
9
6 def create_choices_from_model(model, conf_id):
10 def create_choices_from_model(model, conf_id):
7
11
8 if model=='RCLine':
12 if model=='RCLine':
9 instance = RCConfiguration.objects.get(pk=conf_id)
13 instance = RCConfiguration.objects.get(pk=conf_id)
10 return instance.get_refs_lines()
14 choices = instance.get_refs_lines()
11 else:
15 else:
12 instance = globals()[model]
16 instance = globals()[model]
13 return instance.objects.all().values_list('pk', 'name')
17 choices = instance.objects.all().values_list('pk', 'name')
18
19 return add_empty_choice(choices, label='All')
20
21
22 class ExtFileField(forms.FileField):
23 """
24 Same as forms.FileField, but you can specify a file extension whitelist.
25
26 >>> from django.core.files.uploadedfile import SimpleUploadedFile
27 >>>
28 >>> t = ExtFileField(ext_whitelist=(".pdf", ".txt"))
29 >>>
30 >>> t.clean(SimpleUploadedFile('filename.pdf', 'Some File Content'))
31 >>> t.clean(SimpleUploadedFile('filename.txt', 'Some File Content'))
32 >>>
33 >>> t.clean(SimpleUploadedFile('filename.exe', 'Some File Content'))
34 Traceback (most recent call last):
35 ...
36 ValidationError: [u'Not allowed filetype!']
37 """
38 def __init__(self, *args, **kwargs):
39 extensions = kwargs.pop("extensions")
40 self.extensions = [i.lower() for i in extensions]
41
42 super(ExtFileField, self).__init__(*args, **kwargs)
43
44 def clean(self, *args, **kwargs):
45 data = super(ExtFileField, self).clean(*args, **kwargs)
46 filename = data.name
47 ext = os.path.splitext(filename)[1]
48 ext = ext.lower()
49 if ext not in self.extensions:
50 raise forms.ValidationError('Not allowed filetype: %s' % ext)
51
52
53 class KmUnitWidget(forms.widgets.TextInput):
54
55 def render(self, name, value, attrs=None):
56
57 if isinstance(value, (int, float)):
58 unit = int(value*attrs['line'].km2unit)
59 elif isinstance(value, basestring):
60 units = []
61 values = [s for s in value.split(',') if s]
62 for val in values:
63 units.append('{0:.0f}'.format(float(val)*attrs['line'].km2unit))
64
65 unit = ','.join(units)
66
67 html = '<div class="col-md-4"><input disabled type="text" class="form-control" id="id_{0}" value="{1}"></div><div class="col-md-1">Km</div><div class="col-md-4"><input disabled type="text" class="form-control" value="{2}"></div><div class="col-md-1">Units</div>'.format(name, value, unit)
68
69 return mark_safe(html)
70
71 class DefaultWidget(forms.widgets.TextInput):
72
73 def render(self, name, value, attrs=None):
74
75 html = '<div class="col-md-4"><input disabled type="text" class="form-control" id="id_{0}" value="{1}"></div>'.format(name, value)
76
77 return mark_safe(html)
14
78
15 class RCConfigurationForm(forms.ModelForm):
79 class RCConfigurationForm(forms.ModelForm):
16
80
81 def __init__(self, *args, **kwargs):
82 super(RCConfigurationForm, self).__init__(*args, **kwargs)
83
84 instance = getattr(self, 'instance', None)
85
86 if instance and instance.pk:
87
88 devices = Device.objects.filter(device_type__name='rc')
89
90 self.fields['experiment'].widget.attrs['readonly'] = True
91 self.fields['experiment'].widget.choices = [(instance.experiment.id, instance.experiment)]
92
93 self.fields['device'].widget.choices = [(device.id, device) for device in devices]
94
17 class Meta:
95 class Meta:
18 model = RCConfiguration
96 model = RCConfiguration
19 exclude = ('clock', 'ipp', 'ntx', 'clock_divider')
97 exclude = ('type', 'parameters', 'status')
20
98
99
21
100
22 class RCLineForm(forms.ModelForm):
101 class RCLineForm(forms.ModelForm):
23
102
@@ -26,6 +105,8 class RCLineForm(forms.ModelForm):
26 super(RCLineForm, self).__init__(*args, **kwargs)
105 super(RCLineForm, self).__init__(*args, **kwargs)
27 if 'initial'in kwargs:
106 if 'initial'in kwargs:
28 for item in self.extra_fields:
107 for item in self.extra_fields:
108 if item['name']=='params':
109 continue
29 if 'model' in item:
110 if 'model' in item:
30 self.fields[item['name']] = forms.ChoiceField(choices=create_choices_from_model(item['model'],
111 self.fields[item['name']] = forms.ChoiceField(choices=create_choices_from_model(item['model'],
31 kwargs['initial']['rc_configuration']))
112 kwargs['initial']['rc_configuration']))
@@ -46,42 +127,97 class RCLineForm(forms.ModelForm):
46 line.channel = RCLine.objects.filter(rc_configuration=line.rc_configuration).count()-1
127 line.channel = RCLine.objects.filter(rc_configuration=line.rc_configuration).count()-1
47
128
48 #auto add position for TX, TR & CODE
129 #auto add position for TX, TR & CODE
49 if line.line_type.name in ('tx', 'tr', 'codes', 'windows'):
130 if line.line_type.name in ('tx', ):
50 line.position = RCLine.objects.filter(rc_configuration=line.rc_configuration, line_type=line.line_type).count()-1
131 line.position = RCLine.objects.filter(rc_configuration=line.rc_configuration, line_type=line.line_type).count()-1
51
132
52 #save extra fields in params
133 #save extra fields in params
53 params = {}
134 params = {}
54 for item in self.extra_fields:
135 for item in self.extra_fields:
55 params[item['name']] = self.data[item['name']]
136 if item['name']=='params':
137 params['params'] = []
138 else:
139 params[item['name']] = self.data[item['name']]
56 line.params = json.dumps(params)
140 line.params = json.dumps(params)
57 line.save()
141 line.save()
58 return
142 return
59
143
144
60 class RCLineViewForm(forms.Form):
145 class RCLineViewForm(forms.Form):
61
146
62 def __init__(self, *args, **kwargs):
147 def __init__(self, *args, **kwargs):
63 extra_fields = kwargs.pop('extra_fields')
148 extra_fields = kwargs.pop('extra_fields')
149 line = kwargs.pop('line')
150 subform = kwargs.pop('subform', False)
64 super(RCLineViewForm, self).__init__(*args, **kwargs)
151 super(RCLineViewForm, self).__init__(*args, **kwargs)
152 print line
65 for label, value in extra_fields.items():
153 for label, value in extra_fields.items():
154 if label=='params':
155 continue
66 if 'ref' in label:
156 if 'ref' in label:
67 value = RCLine.objects.get(pk=value).get_name()
157 if value in (0, '0'):
158 value = 'All'
159 else:
160 value = RCLine.objects.get(pk=value).get_name()
68 elif 'code' in label:
161 elif 'code' in label:
69 value = RCLineCode.objects.get(pk=value).name
162 value = RCLineCode.objects.get(pk=value).name
163
70 self.fields[label] = forms.CharField(initial=value)
164 self.fields[label] = forms.CharField(initial=value)
71
165
72 class RCLineEditForm(forms.Form):
166 if subform:
167 params = json.loads(line.line_type.params)['params']
168 else:
169 params = json.loads(line.line_type.params)
170
171 if 'widget' in params[label]:
172 if params[label]['widget']=='km':
173 self.fields[label].widget = KmUnitWidget(attrs={'line':line})
174 else:
175 self.fields[label].widget = DefaultWidget()
176
177 class RCLineEditForm(forms.ModelForm):
73
178
74 def __init__(self, *args, **kwargs):
179 def __init__(self, *args, **kwargs):
75 self.extra_fields = kwargs.pop('extra_fields', [])
180 self.extra_fields = kwargs.pop('extra_fields', [])
76 super(RCLineEditForm, self).__init__(*args, **kwargs)
181 super(RCLineEditForm, self).__init__(*args, **kwargs)
77 if 'initial'in kwargs:
182 if 'initial'in kwargs:
78 for item in self.extra_fields:
183 for item, values in self.extra_fields.items():
79 if 'model' in item:
184 if item=='params':
80 self.fields[item['name']] = forms.ChoiceField(choices=create_choices_from_model(item['model'],
185 continue
81 kwargs['initial']['rc_configuration']),
186 if 'help' in values:
82 initial=item['value'],
187 help_text = values['help']
83 widget=forms.Select(attrs={'name':'%s|%s' % (kwargs['initial']['line'], item['name'])}))
84 else:
188 else:
85 self.fields[item['name']] = forms.CharField(initial=item['value'],
189 help_text = ''
86 widget=forms.TextInput(attrs={'name':'%s|%s' % (kwargs['initial']['line'], item['name'])}))
190
191 if 'model' in values:
192 self.fields[item] = forms.ChoiceField(choices=create_choices_from_model(values['model'], kwargs['initial']['rc_configuration']),
193 initial=values['value'],
194 widget=forms.Select(attrs={'name':'%s|%s' % (kwargs['initial']['line'], item)}),
195 help_text=help_text)
196
197 else:
198 self.fields[item] = forms.CharField(initial=values['value'],
199 widget=forms.TextInput(attrs={'name':'%s|%s' % (kwargs['initial']['line'], item)}),
200 help_text=help_text)
201
202
203 class Meta:
204 model = RCLine
205 exclude = ('rc_configuration', 'line_type', 'channel', 'position', 'params', 'pulses')
206
207
208 class RCSubLineEditForm(forms.Form):
209
210 def __init__(self, *args, **kwargs):
211 extra_fields = kwargs.pop('extra_fields')
212 count = kwargs.pop('count')
213 line = kwargs.pop('line')
214 super(RCSubLineEditForm, self).__init__(*args, **kwargs)
215 for label, value in extra_fields.items():
216 self.fields[label] = forms.CharField(initial=value,
217 widget=forms.TextInput(attrs={'name':'%s|%s|%s' % (count, line, label)}))
218
219
220 class RCImportForm(forms.Form):
221
222 file_name = ExtFileField(extensions=['.racp', '.json', '.dat'])
87 No newline at end of file
223
@@ -1,5 +1,7
1
1
2 import ast
2 import json
3 import json
4 import numpy as np
3
5
4 from polymorphic import PolymorphicModel
6 from polymorphic import PolymorphicModel
5
7
@@ -7,9 +9,11 from django.db import models
7 from django.core.validators import MinValueValidator, MaxValueValidator
9 from django.core.validators import MinValueValidator, MaxValueValidator
8
10
9 from apps.main.models import Configuration
11 from apps.main.models import Configuration
12 from .utils import pulses, pulses_from_code, create_mask
10 # Create your models here.
13 # Create your models here.
11
14
12 LINE_TYPES = (
15 LINE_TYPES = (
16 ('none', 'Not used'),
13 ('tr', 'Transmission/reception selector signal'),
17 ('tr', 'Transmission/reception selector signal'),
14 ('tx', 'A modulating signal (Transmission pulse)'),
18 ('tx', 'A modulating signal (Transmission pulse)'),
15 ('codes', 'BPSK modulating signal'),
19 ('codes', 'BPSK modulating signal'),
@@ -19,24 +23,16 LINE_TYPES = (
19 ('prog_pulses', 'Programmable pulse'),
23 ('prog_pulses', 'Programmable pulse'),
20 )
24 )
21
25
22 LINE_PARAMS = {
23 "tr": [{"name":"time_after", "value": 0}],
24 "tx": [{"name": "pulse_width", "value": 0},{"name":"delays", "value":""}],
25 "codes": [{"name":"tx_ref", "value": ""},{"name":"code", "value": "", "choices":"RCLineCode"}],
26 "windows": [{"name":"tx_ref","value":""}, {"name":"first_height", "value":0}, {"name":"number_of_samples","value":0}, {"name":"resolution","value":0}, {"name":"last_height","value":0}],
27 "sync": [{"name": "delay", "value": 0}],
28 "flip": [{"name":"number_of_flips", "value": 0}],
29 "prog_pulses": [{"name": "begin", "value": 0}, {"name": "end","value": 0}],
30 }
31
32
26
33 class RCConfiguration(Configuration):
27 class RCConfiguration(Configuration):
34
28
35 clock = models.FloatField(verbose_name='Clock Master (MHz)', validators=[MinValueValidator(0), MaxValueValidator(80)], blank=True, null=True)
29 ipp = models.FloatField(verbose_name='Inter pulse period (Km)', validators=[MinValueValidator(1), MaxValueValidator(1000)], default=10)
36 clock_divider = models.PositiveIntegerField(verbose_name='Clock divider', validators=[MinValueValidator(0), MaxValueValidator(256)], blank=True, null=True)
30 ntx = models.PositiveIntegerField(verbose_name='Number of TX', default=1)
37 ipp = models.PositiveIntegerField(verbose_name='Inter pulse period (Km)', default=10)
31 clock = models.FloatField(verbose_name='Clock Master (MHz)', validators=[MinValueValidator(1), MaxValueValidator(80)], default=1)
38 ntx = models.PositiveIntegerField(verbose_name='Number of pulse of transmit', default=1)
32 clock_divider = models.PositiveIntegerField(verbose_name='Clock divider', validators=[MinValueValidator(1), MaxValueValidator(256)], default=1)
39 time_before = models.PositiveIntegerField(verbose_name='Number of pulse of transmit', default=0)
33 time_before = models.PositiveIntegerField(verbose_name='Time before', default=0)
34 time_after = models.PositiveIntegerField(verbose_name='Time after', default=0)
35 sync = models.PositiveIntegerField(verbose_name='Synchro delay', default=0)
40
36
41 class Meta:
37 class Meta:
42 db_table = 'rc_configurations'
38 db_table = 'rc_configurations'
@@ -52,6 +48,14 class RCConfiguration(Configuration):
52 lines = RCLine.objects.filter(rc_configuration=self.pk, line_type__name='tx')
48 lines = RCLine.objects.filter(rc_configuration=self.pk, line_type__name='tx')
53 return [(line.pk, line.get_name()) for line in lines]
49 return [(line.pk, line.get_name()) for line in lines]
54
50
51 def get_lines(self, type=None):
52
53 if type is not None:
54 return RCLine.objects.filter(rc_configuration=self.pk, line_type__name=type)
55 else:
56 return RCLine.objects.filter(rc_configuration=self.pk)
57
58
55 class RCLineCode(models.Model):
59 class RCLineCode(models.Model):
56
60
57 name = models.CharField(max_length=40)
61 name = models.CharField(max_length=40)
@@ -86,9 +90,11 class RCLine(models.Model):
86 channel = models.PositiveIntegerField(default=0)
90 channel = models.PositiveIntegerField(default=0)
87 position = models.PositiveIntegerField(default=0)
91 position = models.PositiveIntegerField(default=0)
88 params = models.TextField(default='{}')
92 params = models.TextField(default='{}')
93 pulses = models.TextField(default='')
89
94
90 class Meta:
95 class Meta:
91 db_table = 'rc_lines'
96 db_table = 'rc_lines'
97 ordering = ['channel']
92
98
93 def __unicode__(self):
99 def __unicode__(self):
94 return u'%s - %s' % (self.rc_configuration, self.get_name())
100 return u'%s - %s' % (self.rc_configuration, self.get_name())
@@ -97,11 +103,134 class RCLine(models.Model):
97
103
98 chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
104 chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
99
105
100 if self.line_type.name in ('tx', 'tr',):
106 if self.line_type.name in ('tx',):
101 return '%s %s' % (self.line_type.name.upper(), chars[self.position])
107 return '%s %s' % (self.line_type.name.upper(), chars[self.position])
102 elif self.line_type.name in ('codes', 'windows',):
108 elif self.line_type.name in ('codes', 'windows', 'tr'):
103 pk = json.loads(self.params)['TX_ref']
109 pk = json.loads(self.params)['TX_ref']
104 ref = RCLine.objects.get(pk=pk)
110 if pk in (0, '0'):
105 return '%s %s' % (self.line_type.name.upper(), chars[ref.position])
111 refs = ','.join(chars[l.position] for l in self.rc_configuration.get_lines('tx'))
112 return '%s (%s)' % (self.line_type.name.upper(), refs)
113 else:
114 ref = RCLine.objects.get(pk=pk)
115 return '%s (%s)' % (self.line_type.name.upper(), chars[ref.position])
116 elif self.line_type.name in ('flip', 'prog_pulses', 'sync'):
117 return '%s %s' % (self.line_type.name.upper(), self.channel)
106 else:
118 else:
107 return self.line_type.name.upper()
119 return self.line_type.name.upper()
120
121 def get_lines(self, type=None):
122
123 if type is not None:
124 return RCLine.objects.filter(rc_configuration=self.rc_configuration, line_type__name=type)
125 else:
126 return RCLine.objects.filter(rc_configuration=self.rc_configuration)
127
128 def pulses_as_array(self):
129
130 return (np.fromstring(self.pulses, dtype=np.uint8)-48).astype(np.int8)
131
132 @property
133 def km2unit(self):
134
135 return 20./3*(self.rc_configuration.clock/self.rc_configuration.clock_divider)
136
137 def update_pulses(self, save=True, tr=False):
138 print self
139 KM2U = 20./3*(self.rc_configuration.clock/self.rc_configuration.clock_divider)
140 ipp = self.rc_configuration.ipp
141 ntx = self.rc_configuration.ntx
142 ipp_u = int(ipp*KM2U)
143
144 x = np.arange(0, ipp_u*ntx)
145
146 if self.line_type.name=='tr':
147 params = json.loads(self.params)
148 if params['TX_ref'] in ('0', 0):
149 txs = [tx.update_pulses(save=False, tr=True) for tx in self.get_lines('tx')]
150 else:
151 txs = [tx.update_pulses(save=False, tr=True) for tx in RCLine.objects.filter(pk=params['TX_ref'])]
152 if len(txs)==0 or 0 in [len(tx) for tx in txs]:
153 return
154
155 y = np.any(txs, axis=0, out=np.ones(ipp_u*ntx))
156
157 ranges = params['range'].split(',')
158 if len(ranges)>0 and ranges[0]<>'0':
159 mask = create_mask(ranges, ipp_u, ntx, self.rc_configuration.sync)
160 y = y.astype(np.int8) & mask
161
162 elif self.line_type.name=='tx':
163 params = json.loads(self.params)
164 delays = [float(d)*KM2U for d in params['delays'].split(',') if d]
165 y = pulses(x, ipp_u, float(params['pulse_width'])*KM2U,
166 delay=delays,
167 before=self.rc_configuration.time_before,
168 after=self.rc_configuration.time_after if tr else 0,
169 sync=self.rc_configuration.sync)
170 ranges = params['range'].split(',')
171
172 if len(ranges)>0 and ranges[0]<>'0':
173 mask = create_mask(ranges, ipp_u, ntx, self.rc_configuration.sync)
174 y = y & mask
175
176 elif self.line_type.name=='flip':
177 width = float(json.loads(self.params)['number_of_flips'])*ipp*KM2U
178 y = pulses(x, 2*width, width)
179
180 elif self.line_type.name=='codes':
181 params = json.loads(self.params)
182 codes = ast.literal_eval(RCLineCode.objects.get(pk=json.loads(self.params)['code']).codes)
183 tx = RCLine.objects.get(pk=params['TX_ref'])
184 tx_params = json.loads(tx.params)
185
186 y = pulses_from_code(ipp_u, ntx, codes,
187 int(float(tx_params['pulse_width'])*KM2U),
188 before=self.rc_configuration.time_before+self.rc_configuration.sync)
189
190 ranges = tx_params['range'].split(',')
191 if len(ranges)>0 and ranges[0]<>'0':
192 mask = create_mask(ranges, ipp_u, ntx, self.rc_configuration.sync)
193 y = y.astype(np.int8) & mask
194
195 elif self.line_type.name=='sync':
196 params = json.loads(self.params)
197 y = np.zeros(ipp_u*ntx)
198 if params['invert'] in ('1', 1):
199 y[-1] = 1
200 else:
201 y[0] = 1
202
203 elif self.line_type.name=='prog_pulses':
204 params = json.loads(self.params)
205 if int(params['periodic'])==0:
206 nntx = ntx
207 else:
208 nntx = 1
209
210 if 'params' in params and len(params['params'])>0:
211 y = sum([pulses(x, ipp_u*nntx, (pp['end']-pp['begin']), shift=pp['begin']) for pp in params['params']])
212 else:
213 y = np.zeros(ipp_u*ntx)
214
215 elif self.line_type.name=='windows':
216 params = json.loads(self.params)
217 if 'params' in params and len(params['params'])>0:
218 y = sum([pulses(x, ipp_u, pp['resolution']*pp['number_of_samples']*KM2U,
219 delay=(pp['first_height']-pp['resolution'])*KM2U,
220 before=self.rc_configuration.time_before) for pp in params['params']])
221 tr = self.get_lines('tr')[0]
222 ranges = json.loads(tr.params)['range'].split(',')
223 if len(ranges)>0 and ranges[0]<>'0':
224 mask = create_mask(ranges, ipp_u, ntx, self.rc_configuration.sync)
225 y = y & mask
226 else:
227 y = np.zeros(ipp_u*ntx)
228 else:
229 y = np.zeros(ipp_u*ntx)
230
231 if save:
232 self.pulses = (y+48).astype(np.uint8).tostring()
233 self.save()
234 else:
235 return y
236 No newline at end of file
@@ -1,70 +1,80
1 {% extends "dev_conf.html" %}
1 {% extends "dev_conf.html" %}
2 {% load static %}
2 {% load static %}
3 {% load bootstrap3 %}
3 {% load bootstrap3 %}
4 {% load main_tags %}s
4 {% load main_tags %}
5
5
6 {% block extra-head %}
6 {% block extra-head %}
7 <style type="text/css">
7 <link href="http://cdn.pydata.org/bokeh/release/bokeh-0.11.1.min.css" rel="stylesheet" type="text/css">
8 /* show the move cursor as the user moves the mouse over the panel header.*/
9 .panel-default { cursor: move; }
10 </style>
11 {% endblock %}
8 {% endblock %}
9
12 {% block content %}
10 {% block content %}
13 <table class="table table-bordered">
11 <table class="table table-bordered">
14 {% for key in dev_conf_keys %}
12 <tr>
15 <tr><th>{{key|title}}</th><td>{{dev_conf|attr:key}}</td></tr>
13 <th>Status</th>
14 <td>{%if connected == True %} <span class="glyphicon glyphicon-ok-circle text-success" aria-hidden="true"></span> Connected {% else %} <span class="glyphicon glyphicon-remove-circle text-danger" aria-hidden="true"></span> Disconnected {% endif %}</td>
15 </tr>
16 {% for key in dev_conf_keys %}
17 <tr>
18 <th>{% get_verbose_field_name dev_conf key %}</th>
19 <td>{{dev_conf|attr:key}}</td>
20 </tr>
16 {% endfor %}
21 {% endfor %}
17 </table>
22 </table>
18 <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_send">Send</button>
19 <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_export">Export</button>
20 <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_edit">Edit</button>
21 <br>
22 <h2>RC Lines</h2><hr>
23
23
24
25 <div class="clearfix"></div>
26 <h2>RC Lines</h2><hr>
24 <div class="panel-group" id="div_lines" role="tablist" aria-multiselectable="true">
27 <div class="panel-group" id="div_lines" role="tablist" aria-multiselectable="true">
25 {% include "rc_lines.html" %}
28 {% include "rc_lines.html" %}
26 </div>
29 </div>
27
30
28 <br>
31 <br>
29 <div class="pull-right">
32 <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_export">Export</button>
30 <button class="btn btn-primary" id="bt_add_line">Add Line</button>
33 <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_import">Import</button>
31 <button class="btn btn-primary" id="bt_edit_lines"> Edit </button>
34 <button class="btn btn-primary pull-right" style="margin-left: 10px" id="bt_edit">Edit</button>
32 <button class="btn btn-primary" id="bt_pulses">Pulses</button>
33 </div>
34 {% endblock %}
35
35
36 <button class="btn btn-primary pull-left" style="margin-left: 10px" id="bt_read">Read</button>
37 <button class="btn btn-primary pull-left" style="margin-left: 10px" id="bt_write">Write</button>
38 <button class="btn btn-primary pull-left" style="margin-left: 10px" id="bt_pulses">Pulses</button>
39
40 <div class="modal fade" id="pulsesModal" tabindex="-1" role="dialog">
41 <div class="modal-dialog modal-lg">
42 <div class="modal-content">
43 <div class="modal-header">
44 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
45 <h4 class="modal-title">RC Pulses</h4>
46 </div>
47 <div class="modal-body">
48 <div id="div_plot"></div>
49 <div id="div_script"></div>
50 </div>
51 </div><!-- /.modal-content -->
52 </div><!-- /.modal-dialog -->
53 </div><!-- /.modal -->
54
55 {% endblock %}
36
56
37 {% block extra-js%}
57 {% block extra-js%}
38
58
59 <script src="{% static 'js/jquery-ui.min.js' %}"></script>
60 <script src="{% static 'js/bokeh-0.11.1.min.js' %}"></script>
61
39 <script type="text/javascript">
62 <script type="text/javascript">
40
63
64 $("#bt_import").click(function() {
65 document.location = "{% url 'url_import_rc_conf' dev_conf.id %}";
66 });
67
41 $("#bt_edit").click(function() {
68 $("#bt_edit").click(function() {
42 document.location = "{% url 'url_edit_rc_conf' dev_conf.id %}";
69 document.location = "{% url 'url_edit_rc_conf' dev_conf.id %}";
43 });
70 });
44
71
45 $("#div_lines").on("click", "button[name=bt_remove_line]", function(){
72 $("#bt_pulses").click(function() {
46 document.location = "line/"+$(this).val()+"/delete/";
73 $.get( "plot/?json", {}, function(data){
47 });
74 $("#div_plot").html(data.div);
48
75 $("#div_script").html(data.script);
49 $(".panel-group").sortable({
50 //placeholder: "ui-state-highlight",
51 update: function( event, ui ) {
52 var sorted = $( ".panel-group" ).sortable( "serialize", { key: "item" } );
53 var url = "{% url 'url_update_rc_lines' dev_conf.id %}";
54 var csrf_token = "{{csrf_token}}";
55 $.post( url, { 'items': sorted, 'csrfmiddlewaretoken': csrf_token }, function(data){
56 $("#div_lines").html(data.html);
57 });
76 });
58 }
77 $('#pulsesModal').modal();
59 });
60
61
62 $("#bt_add_line").click(function() {
63 document.location = "{% url 'url_add_rc_line' dev_conf.id%}";
64 });
65
66 $("#bt_edit_lines").click(function() {
67 document.location = "{% url 'url_edit_rc_lines' dev_conf.id %}";
68 });
78 });
69
79
70 </script>
80 </script>
@@ -1,1 +1,67
1 {% extends "dev_conf_edit.html" %} No newline at end of file
1 {% extends "dev_conf_edit.html" %}
2 {% load bootstrap3 %}
3 {% load static %}
4
5 {% block extra-head %}
6 <style type="text/css">
7 /* show the move cursor as the user moves the mouse over the panel header.*/
8 .panel-default { cursor: move; }
9 </style>
10 {% endblock %}
11
12 {% block content %}
13 <form class="form" method="post">
14 {% csrf_token %}
15 {% bootstrap_form form layout='horizontal' size='medium' %}
16 <div style="clear: both;"></div>
17 <h2>RC Lines</h2><hr>
18 <div class="panel-group" id="div_lines" role="tablist" aria-multiselectable="true">
19 {% include "rc_lines.html" %}
20 </div>
21 <div style="clear: both;"></div>
22 <br>
23 <div class="pull-right">
24 <button type="button" class="btn btn-primary" onclick="{% if previous %}window.location.replace('{{ previous }}');{% else %}history.go(-1);{% endif %}">Cancel</button>
25 <button type="button" class="btn btn-primary" id="bt_add_line">Add Line</button>
26 <button type="submit" class="btn btn-primary">{{button}}</button>
27 </div>
28 </form>
29 {% endblock %}
30
31 {% block extra-js%}
32
33 <script src="{% static 'js/jquery-ui.min.js' %}"></script>
34
35 <script type="text/javascript">
36
37 $("#div_lines").on("click", "button[name=bt_remove_line]", function(){
38 document.location = "/rc/{{dev_conf.id}}/line/"+$(this).val()+"/delete/";
39 });
40
41 $("#div_lines").on("click", "button[name=bt_remove_subline]", function(){
42 document.location = $(this).data('url');
43 });
44
45 $("#div_lines").on("click", "button[name=bt_add_subline]", function(){
46 document.location = "/rc/{{dev_conf.id}}/line/"+$(this).val()+"/add_subline/";
47 });
48
49 $("#bt_add_line").click(function() {
50 document.location = "{% url 'url_add_rc_line' dev_conf.id%}";
51 });
52
53 $(".panel-group").sortable({
54 //placeholder: "ui-state-highlight",
55 update: function( event, ui ) {
56 var sorted = $( ".panel-group" ).sortable( "serialize", { key: "item" } );
57 var url = "{% url 'url_update_rc_lines_position' dev_conf.id %}";
58 var csrf_token = "{{csrf_token}}";
59 $.post( url, { 'items': sorted, 'csrfmiddlewaretoken': csrf_token }, function(data){
60 $("#div_lines").html(data.html);
61 });
62 }
63 });
64
65 </script>
66 {% endblock %}
67 No newline at end of file
@@ -7,14 +7,30
7 <a role="button" data-toggle="collapse" data-parent="#div_lines" href="#collapse{{line.id}}" aria-expanded="true" aria-controls="collapse{{line.id}}">
7 <a role="button" data-toggle="collapse" data-parent="#div_lines" href="#collapse{{line.id}}" aria-expanded="true" aria-controls="collapse{{line.id}}">
8 CH{{line.channel}} - {{line.get_name}}
8 CH{{line.channel}} - {{line.get_name}}
9 </a>
9 </a>
10 {% if not edit %}
10 {% if edit %}
11 <button class="btn-xs btn-default pull-right" name="bt_remove_line" value="{{line.pk}}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
11 <button type="button" class="btn-xs btn-default pull-right" name="bt_remove_line" value="{{line.pk}}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>
12 {% endif %}
12 {% endif %}
13 </h4>
13 </h4>
14 </div>
14 </div>
15 <div id="collapse{{line.id}}" class="panel-collapse collapse{% if edit %} in{% endif %}" role="tabpanel" aria-labelledby="heading{{line.id}}">
15 <div id="collapse{{line.id}}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading{{line.id}}">
16 <div class="panel-body">
16 <div class="panel-body">
17 {% bootstrap_form line.form layout='horizontal' size='small' %}
17 {% bootstrap_form line.form layout='horizontal' size='small' %}
18 <br><br>
19
20 {% for f in line.subforms %}
21 <div class="form-group form-group-sm">
22 <label class="col-md-3 control-label">{{line.line_type.name}}-{{ forloop.counter }}</label>
23 <div class="col-md-9">{% if edit %}<button type='button' name="bt_remove_subline" class="btn-xs btn-default" data-url="{% url 'url_remove_rc_subline' dev_conf.id line.id forloop.counter %}"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span></button>{% endif %}</div>
24 </div><div class="clearfix"></div>
25 {% bootstrap_form f layout='horizontal' size='small' %}
26 <div class="clearfix"></div>
27 {% endfor %}
28
29 {% if edit and line.subform %}
30 <br>
31 <button type="button" class="btn btn-sm btn-default" style="margin-left: 10px" name="bt_add_subline" value="{{line.pk}}">Add {{line.line_type.name}}</button>
32 {% endif %}
33
18 </div>
34 </div>
19 </div>
35 </div>
20 </div>
36 </div>
@@ -1,16 +1,18
1 from django.conf.urls import url
1 from django.conf.urls import url
2
2
3 urlpatterns = (
3 urlpatterns = (
4 url(r'^(?P<id>-?\d+)/$', 'apps.rc.views.conf', name='url_rc_conf'),
4 url(r'^(?P<conf_id>-?\d+)/$', 'apps.rc.views.conf', name='url_rc_conf'),
5 url(r'^(?P<id>-?\d+)/edit/$', 'apps.rc.views.conf_edit', name='url_edit_rc_conf'),
5 url(r'^(?P<conf_id>-?\d+)/import/$', 'apps.rc.views.import_file', name='url_import_rc_conf'),
6 url(r'^(?P<conf_id>-?\d+)/edit/$', 'apps.rc.views.conf_edit', name='url_edit_rc_conf'),
7 url(r'^(?P<conf_id>-?\d+)/plot/$', 'apps.rc.views.view_pulses', name='url_plot_rc_pulses'),
6 url(r'^(?P<id_conf>-?\d+)/write/$', 'apps.main.views.dev_conf_write', name='url_write_rc_conf'),
8 url(r'^(?P<id_conf>-?\d+)/write/$', 'apps.main.views.dev_conf_write', name='url_write_rc_conf'),
7 url(r'^(?P<id_conf>-?\d+)/read/$', 'apps.main.views.dev_conf_read', name='url_read_rc_conf'),
9 url(r'^(?P<id_conf>-?\d+)/read/$', 'apps.main.views.dev_conf_read', name='url_read_rc_conf'),
8 url(r'^(?P<id_conf>-?\d+)/import/$', 'apps.main.views.dev_conf_import', name='url_import_rc_conf'),
9 url(r'^(?P<id_conf>-?\d+)/export/$', 'apps.main.views.dev_conf_export', name='url_export_rc_conf'),
10 url(r'^(?P<id_conf>-?\d+)/export/$', 'apps.main.views.dev_conf_export', name='url_export_rc_conf'),
10
11
11 url(r'^(?P<conf_id>-?\d+)/add_line/$', 'apps.rc.views.add_line', name='url_add_rc_line'),
12 url(r'^(?P<conf_id>-?\d+)/add_line/$', 'apps.rc.views.add_line', name='url_add_rc_line'),
12 url(r'^(?P<conf_id>-?\d+)/update_lines/$', 'apps.rc.views.update_lines', name='url_update_rc_lines'),
13 url(r'^(?P<conf_id>-?\d+)/edit_lines/$', 'apps.rc.views.edit_lines', name='url_edit_rc_lines'),
14 url(r'^(?P<conf_id>-?\d+)/add_line/(?P<line_type_id>-?\d+)/$', 'apps.rc.views.add_line', name='url_add_rc_line'),
13 url(r'^(?P<conf_id>-?\d+)/add_line/(?P<line_type_id>-?\d+)/$', 'apps.rc.views.add_line', name='url_add_rc_line'),
14 url(r'^(?P<conf_id>-?\d+)/update_position/$', 'apps.rc.views.update_lines_position', name='url_update_rc_lines_position'),
15 url(r'^(?P<conf_id>-?\d+)/line/(?P<line_id>-?\d+)/delete/$', 'apps.rc.views.remove_line', name='url_remove_rc_line'),
15 url(r'^(?P<conf_id>-?\d+)/line/(?P<line_id>-?\d+)/delete/$', 'apps.rc.views.remove_line', name='url_remove_rc_line'),
16 url(r'^(?P<conf_id>-?\d+)/line/(?P<line_id>-?\d+)/add_subline/$', 'apps.rc.views.add_subline', name='url_add_rc_subline'),
17 url(r'^(?P<conf_id>-?\d+)/line/(?P<line_id>-?\d+)/subline/(?P<subline_id>-?\d+)/delete/$', 'apps.rc.views.remove_subline', name='url_remove_rc_subline'),
16 )
18 )
@@ -1,62 +1,147
1 import json
1 import json
2
2
3 from django.contrib import messages
3 from django.contrib import messages
4 from django.utils.safestring import mark_safe
4 from django.shortcuts import render, redirect, get_object_or_404, HttpResponse
5 from django.shortcuts import render, redirect, get_object_or_404, HttpResponse
5
6
6 from apps.main.models import Configuration, Experiment
7 from apps.main.models import Configuration, Experiment, Device
7 from apps.main.views import sidebar
8 from apps.main.views import sidebar
8
9
9 from .models import RCConfiguration, RCLine, RCLineType
10 from .models import RCConfiguration, RCLine, RCLineType, RCLineCode
10 from .forms import RCConfigurationForm, RCLineForm, RCLineViewForm, RCLineEditForm
11 from .forms import RCConfigurationForm, RCLineForm, RCLineViewForm, RCLineEditForm, RCSubLineEditForm, RCImportForm
12 from .utils import RCFile, plot_pulses
11
13
12
14
13 def conf(request, id):
15 def conf(request, conf_id):
14
16
15 conf = get_object_or_404(RCConfiguration, pk=id)
17 conf = get_object_or_404(RCConfiguration, pk=conf_id)
16
18
17 lines = RCLine.objects.filter(rc_configuration=conf).order_by('channel')
19 lines = RCLine.objects.filter(rc_configuration=conf).order_by('channel')
18
20
19 for line in lines:
21 for line in lines:
20 line.form = RCLineViewForm(extra_fields=json.loads(line.params))
22 params = json.loads(line.params)
23 line.form = RCLineViewForm(extra_fields=params, line=line)
24 if 'params' in params:
25 line.subforms = [RCLineViewForm(extra_fields=fields, line=line, subform=True) for fields in params['params']]
21
26
22 kwargs = {}
27 kwargs = {}
23 kwargs['dev_conf'] = conf
28 kwargs['dev_conf'] = conf
24 kwargs['rc_lines'] = lines
29 kwargs['rc_lines'] = lines
25 kwargs['dev_conf_keys'] = ['clock', 'ipp', 'ntx','clock_divider']
30 kwargs['dev_conf_keys'] = ['name', 'ipp', 'ntx', 'clock', 'clock_divider',
31 'time_before', 'time_after', 'sync']
26
32
27 kwargs['title'] = 'RC Configuration'
33 kwargs['title'] = 'RC Configuration'
28 kwargs['suptitle'] = 'Details'
34 kwargs['suptitle'] = 'Details'
29
35
30 kwargs['button'] = 'Edit Configuration'
36 kwargs['button'] = 'Edit Configuration'
31
32 ###### SIDEBAR ######
37 ###### SIDEBAR ######
33 kwargs.update(sidebar(conf))
38 kwargs.update(sidebar(conf))
34
39
35 return render(request, 'rc_conf.html', kwargs)
40 return render(request, 'rc_conf.html', kwargs)
36
41
42
43 def conf_edit(request, conf_id):
37
44
38 def conf_edit(request, id):
45 conf = get_object_or_404(RCConfiguration, pk=conf_id)
39
46
40 conf = get_object_or_404(RCConfiguration, pk=id)
47 lines = RCLine.objects.filter(rc_configuration=conf).order_by('channel')
48
49 for line in lines:
50 line_type = get_object_or_404(RCLineType, pk=line.line_type.id)
51 extra_fields = json.loads(line_type.params)
52 params = json.loads(line.params)
53 for item, values in extra_fields.items():
54 if item=='params':
55 continue
56 values['value'] = params[item]
57
58 line.form = RCLineEditForm(initial={'rc_configuration':conf_id, 'line_type': line.line_type.id, 'line': line.id},
59 extra_fields=extra_fields)
60
61 if 'params' in params:
62 line.subform = True
63 line.subforms = [RCSubLineEditForm(extra_fields=fields, line=line.id, count=i) for i, fields in enumerate(params['params'])]
41
64
42 if request.method=='GET':
65 if request.method=='GET':
66
43 form = RCConfigurationForm(instance=conf)
67 form = RCConfigurationForm(instance=conf)
68
69 elif request.method=='POST':
44
70
45 if request.method=='POST':
71 line_data = {}
46 form = RCConfigurationForm(request.POST, instance=conf)
72 conf_data = {}
73 extras = []
47
74
75 #classified post fields
76 for label,value in request.POST.items():
77 if label=='csrfmiddlewaretoken':
78 continue
79 if label.count('|')==0:
80 conf_data[label] = value
81 continue
82 elif label.count('|')==2:
83 extras.append(label)
84 continue
85
86 pk, name = label.split('|')
87
88 if pk in line_data:
89 line_data[pk][name] = value
90 else:
91 line_data[pk] = {name:value}
92
93 #update conf
94
95 form = RCConfigurationForm(conf_data, instance=conf)
96
48 if form.is_valid():
97 if form.is_valid():
98
49 form.save()
99 form.save()
50 return redirect('url_dev_conf', id=id)
100
51
101 #update lines fields
102 extras.sort()
103 for label in extras:
104 x, pk, name = label.split('|')
105 if pk not in line_data:
106 line_data[pk] = {}
107 if 'params' not in line_data[pk]:
108 line_data[pk]['params'] = []
109 if len(line_data[pk]['params'])<int(x)+1:
110 line_data[pk]['params'].append({})
111 line_data[pk]['params'][int(x)][name] = float(request.POST[label])
112
113 for pk, params in line_data.items():
114 line = RCLine.objects.get(pk=pk)
115 if line.line_type.name in ('windows', 'prog_pulses'):
116 if 'params' not in params:
117 params['params'] = []
118 line.params = json.dumps(params)
119 line.save()
120
121 #update pulses field
122 for line in conf.get_lines():
123 if line.line_type.name=='tr':
124 continue
125 line.update_pulses()
126
127 for tr in conf.get_lines('tr'):
128 tr.update_pulses()
129
130 messages.success(request, 'RC Configuration successfully updated')
131
132 return redirect(conf.get_absolute_url())
133
52 kwargs = {}
134 kwargs = {}
53 kwargs['dev_conf'] = conf
135 kwargs['dev_conf'] = conf
54 kwargs['form'] = form
136 kwargs['form'] = form
55 kwargs['title'] = 'Device Configuration'
137 kwargs['rc_lines'] = lines
138 kwargs['edit'] = True
139
140 kwargs['title'] = 'RC Configuration'
56 kwargs['suptitle'] = 'Edit'
141 kwargs['suptitle'] = 'Edit'
57 kwargs['button'] = 'Update'
142 kwargs['button'] = 'Update'
58 kwargs['previous'] = conf.get_absolute_url()
143 kwargs['previous'] = conf.get_absolute_url()
59
144
60 kwargs.update(sidebar(conf))
145 kwargs.update(sidebar(conf))
61
146
62 return render(request, 'rc_conf_edit.html', kwargs)
147 return render(request, 'rc_conf_edit.html', kwargs)
@@ -80,20 +165,46 def add_line(request, conf_id, line_type_id=None):
80
165
81 if form.is_valid():
166 if form.is_valid():
82 form.save()
167 form.save()
83 return redirect(conf.get_absolute_url())
168 form.instance.update_pulses()
169 return redirect('url_edit_rc_conf', conf.id)
84
170
85 kwargs = {}
171 kwargs = {}
86 kwargs['form'] = form
172 kwargs['form'] = form
87 kwargs['title'] = 'RC Configuration'
173 kwargs['title'] = 'RC Configuration'
88 kwargs['suptitle'] = 'Add Line'
174 kwargs['suptitle'] = 'Add Line'
89 kwargs['button'] = 'Add'
175 kwargs['button'] = 'Add'
90 kwargs['previous'] = conf.get_absolute_url()
176 kwargs['previous'] = conf.get_absolute_url_edit()
91 kwargs['dev_conf'] = conf
177 kwargs['dev_conf'] = conf
92
178
93 kwargs.update(sidebar(conf))
179 kwargs.update(sidebar(conf))
94
180
95 return render(request, 'rc_add_line.html', kwargs)
181 return render(request, 'rc_add_line.html', kwargs)
96
182
183 def add_subline(request, conf_id, line_id):
184
185 conf = get_object_or_404(RCConfiguration, pk=conf_id)
186 line = get_object_or_404(RCLine, pk=line_id)
187
188 if request.method == 'POST':
189 if line:
190 params = json.loads(line.params)
191 if 'params' in params:
192 subparams = json.loads(line.line_type.params)
193 base = [p for p in subparams if p['name']=='params'][0]['form']
194 new = {}
195 for p in base:
196 new[p['name']] = p['value']
197 params['params'].append(new)
198 line.params = json.dumps(params)
199 line.save()
200 return redirect('url_edit_rc_conf', conf.id)
201
202 kwargs = {}
203
204 kwargs['title'] = 'Add new'
205 kwargs['suptitle'] = '%s to %s' % (line.line_type.name, line)
206
207 return render(request, 'confirm.html', kwargs)
97
208
98 def remove_line(request, conf_id, line_id):
209 def remove_line(request, conf_id, line_id):
99
210
@@ -113,67 +224,41 def remove_line(request, conf_id, line_id):
113 except:
224 except:
114 messages.error(request, 'Unable to delete line: "%s".' % line)
225 messages.error(request, 'Unable to delete line: "%s".' % line)
115
226
116 return redirect(conf.get_absolute_url())
227 return redirect('url_edit_rc_conf', conf.id)
117
228
118 kwargs = {}
229 kwargs = {}
119
230
120 kwargs['object'] = line
231 kwargs['object'] = line
121 kwargs['delete_view'] = True
232 kwargs['delete_view'] = True
122 kwargs['title'] = 'Confirm delete'
233 kwargs['title'] = 'Confirm delete'
123 kwargs['previous'] = conf.get_absolute_url()
234 kwargs['previous'] = conf.get_absolute_url_edit()
124 return render(request, 'confirm.html', kwargs)
235 return render(request, 'confirm.html', kwargs)
125
236
126
237 def remove_subline(request, conf_id, line_id, subline_id):
127 def edit_lines(request, conf_id):
128
238
129 conf = get_object_or_404(RCConfiguration, pk=conf_id)
239 conf = get_object_or_404(RCConfiguration, pk=conf_id)
240 line = get_object_or_404(RCLine, pk=line_id)
130
241
131 if request.method=='GET':
242 if request.method == 'POST':
132 lines = RCLine.objects.filter(rc_configuration=conf).order_by('channel')
243 if line:
133 for line in lines:
244 params = json.loads(line.params)
134 line_type = get_object_or_404(RCLineType, pk=line.line_type.id)
245 params['params'].remove(params['params'][int(subline_id)-1])
135 extra_fields = json.loads(line_type.params)
136 for item in extra_fields:
137 params = json.loads(line.params)
138 item['value'] = params[item['name']]
139 line.form = RCLineEditForm(initial={'rc_configuration':conf_id, 'line_type': line.line_type.id, 'line': line.id},
140 extra_fields=extra_fields)
141
142 elif request.method=='POST':
143 data = {}
144 for label,value in request.POST.items():
145 if '|' not in label:
146 continue
147 id, name = label.split('|')
148 if id in data:
149 data[id][name]=value
150 else:
151 data[id] = {name:value}
152
153 for id, params in data.items():
154 line = RCLine.objects.get(pk=id)
155 line.params = json.dumps(params)
246 line.params = json.dumps(params)
156 line.save()
247 line.save()
157
248
158 return redirect(conf.get_absolute_url())
249 return redirect('url_edit_rc_conf', conf.id)
159
160 kwargs = {}
161 kwargs['dev_conf'] = conf
162 kwargs['rc_lines'] = lines
163 kwargs['edit'] = True
164
165 kwargs['title'] = 'RC Configuration'
166 kwargs['suptitle'] = 'Edit Lines'
167 kwargs['button'] = 'Update'
168 kwargs['previous'] = conf.get_absolute_url()
169
250
251 kwargs = {}
170
252
171 kwargs.update(sidebar(conf))
253 kwargs['object'] = line
254 kwargs['object_name'] = line.line_type.name
255 kwargs['delete_view'] = True
256 kwargs['title'] = 'Confirm delete'
172
257
173 return render(request, 'rc_edit_lines.html', kwargs)
258 return render(request, 'confirm.html', kwargs)
174
259
175
260
176 def update_lines(request, conf_id):
261 def update_lines_position(request, conf_id):
177
262
178 conf = get_object_or_404(RCConfiguration, pk=conf_id)
263 conf = get_object_or_404(RCConfiguration, pk=conf_id)
179
264
@@ -190,11 +275,115 def update_lines(request, conf_id):
190 for line in lines:
275 for line in lines:
191 line.form = RCLineViewForm(extra_fields=json.loads(line.params))
276 line.form = RCLineViewForm(extra_fields=json.loads(line.params))
192
277
193 html = render(request, 'rc_lines.html', {'rc_lines':lines})
278 html = render(request, 'rc_lines.html', {'rc_lines':lines, 'edit':True})
194 data = {'html': html.content}
279 data = {'html': html.content}
195
280
196 return HttpResponse(json.dumps(data), content_type="application/json")
281 return HttpResponse(json.dumps(data), content_type="application/json")
197 return redirect(conf.get_absolute_url())
282 return redirect('url_edit_rc_conf', conf.id)
283
284 def import_file(request, conf_id):
198
285
286 conf = get_object_or_404(RCConfiguration, pk=conf_id)
287 if request.method=='POST':
288 form = RCImportForm(request.POST, request.FILES)
289 if form.is_valid():
290 #try:
291 if True:
292 f = RCFile(request.FILES['file_name'])
293 data = f.data
294 conf.ipp = data['ipp']
295 conf.ntx = data['ntx']
296 conf.clock = data['clock']
297 conf.clock_divider = data['clock_divider']
298 conf.time_before = data['time_before']
299 conf.time_after = data['time_after']
300 conf.sync = data['sync']
301 conf.save()
302 lines = []
303 positions = {'tx':0, 'tr':0}
304
305 for i, line_data in enumerate(data['lines']):
306 line_type = RCLineType.objects.get(name=line_data.pop('type'))
307 if line_type.name=='codes':
308 code = RCLineCode.objects.get(name=line_data['code'])
309 line_data['code'] = code.pk
310 line = RCLine.objects.filter(rc_configuration=conf, channel=i)
311 if line:
312 line = line[0]
313 line.line_type = line_type
314 line.params = json.dumps(line_data)
315 else:
316 line = RCLine(rc_configuration=conf, line_type=line_type,
317 params=json.dumps(line_data),
318 channel=i)
319
320 if line_type.name=='tx':
321 line.position = positions['tx']
322 positions['tx'] += 1
323
324 if line_type.name=='tr':
325 line.position = positions['tr']
326 positions['tr'] += 1
327
328 line.save()
329 lines.append(line)
330
331 for line, line_data in zip(lines, data['lines']):
332 if 'TX_ref' in line_data:
333 params = json.loads(line.params)
334 params['TX_ref'] = [l.pk for l in lines if l.line_type.name=='tx' and l.get_name().replace(' ', '')==line_data['TX_ref']][0]
335 line.params = json.dumps(params)
336 line.save()
337
338 for line in conf.get_lines():
339 if line.line_type.name=='tr':
340 continue
341 line.update_pulses()
342
343 for tr in conf.get_lines('tr'):
344 tr.update_pulses()
345
346 messages.success(request, 'Configuration "%s" loaded succesfully' % request.FILES['file_name'])
347 return redirect(conf.get_absolute_url())
348
349 #except Exception as e:
350 # messages.error(request, 'Error parsing file: "%s" - %s' % (request.FILES['file_name'], e))
351
352 else:
353 messages.warning(request, 'Your current configuration will be replaced')
354 form = RCImportForm()
355
356
357 kwargs = {}
358 kwargs['form'] = form
359 kwargs['title'] = 'RC Configuration'
360 kwargs['suptitle'] = 'Import file'
361 kwargs['button'] = 'Upload'
362 kwargs['previous'] = conf.get_absolute_url()
363
364 return render(request, 'rc_import.html', kwargs)
199
365
200
366
367 def view_pulses(request, conf_id):
368
369 conf = get_object_or_404(RCConfiguration, pk=conf_id)
370 lines = RCLine.objects.filter(rc_configuration=conf)
371
372 unit = (conf.clock/conf.clock_divider)*3./20
373
374 N = int(conf.ipp*(conf.clock/conf.clock_divider)*20./3)*conf.ntx
375
376 script, div = plot_pulses(unit, N, lines)
377
378 kwargs = {'div':mark_safe(div), 'script':mark_safe(script)}
379
380 if 'json' in request.GET:
381
382 return HttpResponse(json.dumps(kwargs), content_type="application/json")
383
384 else:
385
386
387
388 return render(request, 'rc_pulses.html', kwargs)
389
@@ -46,7 +46,6 INSTALLED_APPS = (
46 'apps.jars',
46 'apps.jars',
47 'apps.usrp',
47 'apps.usrp',
48 'apps.abs',
48 'apps.abs',
49 'json_field'
50 )
49 )
51
50
52 MIDDLEWARE_CLASSES = (
51 MIDDLEWARE_CLASSES = (
@@ -2,5 +2,7 Django==1.8.6
2 django-bootstrap3==6.2.2
2 django-bootstrap3==6.2.2
3 MySQL-python==1.2.5
3 MySQL-python==1.2.5
4 django-polymorphic==0.7.2
4 django-polymorphic==0.7.2
5 django-json-field==0.5.7
6 requests==2.9.1
5 requests==2.9.1
6 bokeh==0.11.0
7 numpy==1.10.4
8 matplotlib==1.5.1
General Comments 0
You need to be logged in to leave comments. Login now