diff --git a/README.md b/README.md
index 7ccca1f..bca0fe3 100644
--- a/README.md
+++ b/README.md
@@ -1,35 +1,49 @@
# AndroidControl
-这是一款实时控制Android手机的工具
+
+即将更名为**RemoteControl**,因为即将支持iphone的屏幕实时查看
+
+在工作时,有很多场景需要用到**RemoteControl**,比如:
+
+* 你是个开发者,当你需要对不同型号的手机进行安装APP测试时,你可以仅仅通过电脑就能操作所有手机
+* 你是一个测试工程师,你需要大批量对手机进行操作时
+* 你是个白领,当你的怕拿起手机的动作被leader发现时,可以利用RemoteControl来在电脑上进行你想要的操作
+* 你是一个微商,或者自媒体😅。你懂得
+
+这将是改变当前电脑工作者生活方式的产品
**欢迎提交`issue`,如果它对你有帮助,点个`Star`哟**
-## What?
+## 它是什么?
+
+RemoteControl是一个服务器,简单来说,如果你只有这个,而没有客户端,那么你什么都干不了。所以在下文,我介绍了几个不同版本的客户端供大家使用
-* 查看手机的实时屏幕
-* 查看参数设置
- * 设置屏幕的缩放比例
- * 设置屏幕的旋转角度
-* 操作手机
- * 单点触摸
- * 滑动
- * 键盘输入
- * 文字输入
-* 上传文件到手机
+- 查看手机的实时屏幕
+- 查看参数设置
+ - 设置屏幕的缩放比例
+ - 设置屏幕的旋转角度
+- 操作手机
+ - 单点触摸
+ - 滑动
+ - 键盘输入
+ - 文字输入
+- 上传文件到手机
-![demo](docs/demo.gif)
+## 客户端 Awesome
-## Run demo
+* RemoteControl-Web 网页端,可直接通过浏览器操作设备
-1. 使用Gradle构建项目: `gradle jar`
-2. 进入到生成的目录:`cd build/libs`
-3. 运行服务器(这里使用本地服务器):`java -jar AndroidControl.jar localserver 6655`
-4. 打开`web/index.html`
-5. 点击网页中的`设置`,配置IP和端口:`127.0.0.1` `6655`
+ ![demo](docs/demo.gif)
-注意:
+## 如何运行?
-* 测试的手机需要打开Debug模式
-* 某些手机需要特别开启虚拟按键的权限
+1. 运行之前,请确保配置了如下环境
+ * java se/jdk 1.8 +
+ * adb 配置到环境变量
+ * 您的安卓设备开启了usb调试,部分设备需要开启模拟点击权限
+2. 使用Gradle构建项目: `gradle jar`
+3. 进入到生成的目录:`cd build/libs`
+4. 运行服务器(这里使用本地服务器):`java -jar AndroidControl.jar localserver 6655`
+5. 此刻,服务器部分就搭建完毕了,你可以选择你想要的客户端进行操作
## For Developers
diff --git a/web/css/bootstrap.min.css b/web/css/bootstrap.min.css
deleted file mode 100644
index ed3905e..0000000
--- a/web/css/bootstrap.min.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-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:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}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{padding:0;border: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-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{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 td,.table-bordered th{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:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro: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}:after,:before{-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:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;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:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,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,.h5,.h6,h4,h5,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{padding:.2em;background-color:#fcf8e3}.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:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer: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:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;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{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{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-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{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-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{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-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{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:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{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;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@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 #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border: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;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{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=checkbox]:focus,input[type=radio]:focus{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}.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,.075);box-shadow:inset 0 1px 1px rgba(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,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;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:34px}.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],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.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],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left: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}select[multiple].input-sm,textarea.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 select[multiple].form-control,.form-group-sm textarea.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:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.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 .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;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:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{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=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .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-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.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}.dropdown,.dropup{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;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.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:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{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-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-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-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(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-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-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-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;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=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{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-right:0;padding-left: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:46px;padding:10px 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:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.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}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn: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:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{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-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-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:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-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:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{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{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.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 #ddd}.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:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.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:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.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:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.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{margin-bottom:5px;text-align:center}.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:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-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{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.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-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{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-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{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;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{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;padding:9px 10px;margin-top:8px;margin-right:15px;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 .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{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{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@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 .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{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;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.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-right:15px;margin-left: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:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.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{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.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:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-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-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.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:#eee}.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{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.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:700}.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{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-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{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-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:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.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-body,.media-left,.media-right{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{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-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:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}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:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}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:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}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:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}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:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.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:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;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-left-radius:3px;border-top-right-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-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody: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:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.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 th:first-child,.panel>.table-responsive:first-child>.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 th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.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 th:last-child,.panel>.table-responsive:first-child>.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 th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.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 th:first-child,.panel>.table-responsive:last-child>.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 th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.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 th:last-child,.panel>.table-responsive:last-child>.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 th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.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 #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border: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>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;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:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;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:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-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,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(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:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.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:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.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:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.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,.5);box-shadow:0 5px 15px rgba(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:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;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:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;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{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>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.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,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;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.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%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(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-next,.carousel-control .icon-prev{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{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left: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-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-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}td.visible-xs,th.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}td.visible-sm,th.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}td.visible-md,th.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}td.visible-lg,th.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}td.visible-print,th.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}}
-/*# sourceMappingURL=bootstrap.min.css.map */
\ No newline at end of file
diff --git a/web/css/device.css b/web/css/device.css
deleted file mode 100644
index 2dba5e5..0000000
--- a/web/css/device.css
+++ /dev/null
@@ -1,18 +0,0 @@
-#phone-screen {
- cursor: not-allowed;
-}
-
-#phone-screen[class~="minitouch"] {
- cursor: default;
-}
-
-.screen-container {
- text-align: center;
-}
-
-.screen-container .menu {
- position: fixed;
- text-align: left;
- display: inline-block;
- vertical-align: top;
-}
\ No newline at end of file
diff --git a/web/css/index.css b/web/css/index.css
deleted file mode 100644
index b3b24e9..0000000
--- a/web/css/index.css
+++ /dev/null
@@ -1,41 +0,0 @@
-
-body {
- background-color: #bdbdbd;
-}
-
-.device-container {
- /*border: 1px solid red;*/
- padding: 5px 5px 5px 5px;
- background-color: #f9f9f9;
-}
-
-.device-container img {
- width: 100%;
- cursor: pointer;
-}
-
-.device-detail {
- text-align: center;
-}
-
-.setting {
- display: inline-block;
- float: right;
-}
-
-canvas{
- width: 100%;
-}
-
-@media (min-width: 768px) {
- .device-container {
- }
-}
-@media (min-width: 992px) {
- .device-container {
- }
-}
-@media (min-width: 1200px) {
- .device-container {
- }
-}
diff --git a/web/device.html b/web/device.html
deleted file mode 100644
index 25ce793..0000000
--- a/web/device.html
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
- Device
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/web/index.html b/web/index.html
deleted file mode 100644
index 020bdde..0000000
--- a/web/index.html
+++ /dev/null
@@ -1,56 +0,0 @@
-
-
-
-
-
-
- Bootstrap 101 Template
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ip
-
-
-
-
- port
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/web/js/bootstrap-notify.min.js b/web/js/bootstrap-notify.min.js
deleted file mode 100644
index f5ad385..0000000
--- a/web/js/bootstrap-notify.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Project: Bootstrap Growl = v3.1.3 | Description: Turns standard Bootstrap alerts into "Growl-like" notifications. | Author: Mouse0270 aka Robert McIntosh | License: MIT License | Website: https://github.com/mouse0270/bootstrap-growl */
-!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){function e(e,i,n){var i={content:{message:"object"==typeof i?i.message:i,title:i.title?i.title:"",icon:i.icon?i.icon:"",url:i.url?i.url:"#",target:i.target?i.target:"-"}};n=t.extend(!0,{},i,n),this.settings=t.extend(!0,{},s,n),this._defaults=s,"-"==this.settings.content.target&&(this.settings.content.target=this.settings.url_target),this.animations={start:"webkitAnimationStart oanimationstart MSAnimationStart animationstart",end:"webkitAnimationEnd oanimationend MSAnimationEnd animationend"},"number"==typeof this.settings.offset&&(this.settings.offset={x:this.settings.offset,y:this.settings.offset}),this.init()}var s={element:"body",position:null,type:"info",allow_dismiss:!0,newest_on_top:!1,showProgressbar:!1,placement:{from:"top",align:"right"},offset:20,spacing:10,z_index:1031,delay:5e3,timer:1e3,url_target:"_blank",mouse_over:null,animate:{enter:"animated fadeInDown",exit:"animated fadeOutUp"},onShow:null,onShown:null,onClose:null,onClosed:null,icon_type:"class",template:''};String.format=function(){for(var t=arguments[0],e=1;e .progress-bar').removeClass("progress-bar-"+t.settings.type),t.settings.type=i[e],this.$ele.addClass("alert-"+i[e]).find('[data-notify="progressbar"] > .progress-bar').addClass("progress-bar-"+i[e]);break;case"icon":var n=this.$ele.find('[data-notify="icon"]');"class"==t.settings.icon_type.toLowerCase()?n.removeClass(t.settings.content.icon).addClass(i[e]):(n.is("img")||n.find("img"),n.attr("src",i[e]));break;case"progress":var a=t.settings.delay-t.settings.delay*(i[e]/100);this.$ele.data("notify-delay",a),this.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i[e]).css("width",i[e]+"%");break;case"url":this.$ele.find('[data-notify="url"]').attr("href",i[e]);break;case"target":this.$ele.find('[data-notify="url"]').attr("target",i[e]);break;default:this.$ele.find('[data-notify="'+e+'"]').html(i[e])}var o=this.$ele.outerHeight()+parseInt(t.settings.spacing)+parseInt(t.settings.offset.y);t.reposition(o)},close:function(){t.close()}}},buildNotify:function(){var e=this.settings.content;this.$ele=t(String.format(this.settings.template,this.settings.type,e.title,e.message,e.url,e.target)),this.$ele.attr("data-notify-position",this.settings.placement.from+"-"+this.settings.placement.align),this.settings.allow_dismiss||this.$ele.find('[data-notify="dismiss"]').css("display","none"),(this.settings.delay<=0&&!this.settings.showProgressbar||!this.settings.showProgressbar)&&this.$ele.find('[data-notify="progressbar"]').remove()},setIcon:function(){"class"==this.settings.icon_type.toLowerCase()?this.$ele.find('[data-notify="icon"]').addClass(this.settings.content.icon):this.$ele.find('[data-notify="icon"]').is("img")?this.$ele.find('[data-notify="icon"]').attr("src",this.settings.content.icon):this.$ele.find('[data-notify="icon"]').append('')},styleURL:function(){this.$ele.find('[data-notify="url"]').css({backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)",height:"100%",left:"0px",position:"absolute",top:"0px",width:"100%",zIndex:this.settings.z_index+1}),this.$ele.find('[data-notify="dismiss"]').css({position:"absolute",right:"10px",top:"5px",zIndex:this.settings.z_index+2})},placement:function(){var e=this,s=this.settings.offset.y,i={display:"inline-block",margin:"0px auto",position:this.settings.position?this.settings.position:"body"===this.settings.element?"fixed":"absolute",transition:"all .5s ease-in-out",zIndex:this.settings.z_index},n=!1,a=this.settings;switch(t('[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])').each(function(){return s=Math.max(s,parseInt(t(this).css(a.placement.from))+parseInt(t(this).outerHeight())+parseInt(a.spacing))}),1==this.settings.newest_on_top&&(s=this.settings.offset.y),i[this.settings.placement.from]=s+"px",this.settings.placement.align){case"left":case"right":i[this.settings.placement.align]=this.settings.offset.x+"px";break;case"center":i.left=0,i.right=0}this.$ele.css(i).addClass(this.settings.animate.enter),t.each(Array("webkit","moz","o","ms",""),function(t,s){e.$ele[0].style[s+"AnimationIterationCount"]=1}),t(this.settings.element).append(this.$ele),1==this.settings.newest_on_top&&(s=parseInt(s)+parseInt(this.settings.spacing)+this.$ele.outerHeight(),this.reposition(s)),t.isFunction(e.settings.onShow)&&e.settings.onShow.call(this.$ele),this.$ele.one(this.animations.start,function(){n=!0}).one(this.animations.end,function(){t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)}),setTimeout(function(){n||t.isFunction(e.settings.onShown)&&e.settings.onShown.call(this)},600)},bind:function(){var e=this;if(this.$ele.find('[data-notify="dismiss"]').on("click",function(){e.close()}),this.$ele.mouseover(function(){t(this).data("data-hover","true")}).mouseout(function(){t(this).data("data-hover","false")}),this.$ele.data("data-hover","false"),this.settings.delay>0){e.$ele.data("notify-delay",e.settings.delay);var s=setInterval(function(){var t=parseInt(e.$ele.data("notify-delay"))-e.settings.timer;if("false"===e.$ele.data("data-hover")&&"pause"==e.settings.mouse_over||"pause"!=e.settings.mouse_over){var i=(e.settings.delay-t)/e.settings.delay*100;e.$ele.data("notify-delay",t),e.$ele.find('[data-notify="progressbar"] > div').attr("aria-valuenow",i).css("width",i+"%")}t<=-e.settings.timer&&(clearInterval(s),e.close())},e.settings.timer)}},close:function(){var e=this,s=parseInt(this.$ele.css(this.settings.placement.from)),i=!1;this.$ele.data("closing","true").addClass(this.settings.animate.exit),e.reposition(s),t.isFunction(e.settings.onClose)&&e.settings.onClose.call(this.$ele),this.$ele.one(this.animations.start,function(){i=!0}).one(this.animations.end,function(){t(this).remove(),t.isFunction(e.settings.onClosed)&&e.settings.onClosed.call(this)}),setTimeout(function(){i||(e.$ele.remove(),e.settings.onClosed&&e.settings.onClosed(e.$ele))},600)},reposition:function(e){var s=this,i='[data-notify-position="'+this.settings.placement.from+"-"+this.settings.placement.align+'"]:not([data-closing="true"])',n=this.$ele.nextAll(i);1==this.settings.newest_on_top&&(n=this.$ele.prevAll(i)),n.each(function(){t(this).css(s.settings.placement.from,e),e=parseInt(e)+parseInt(s.settings.spacing)+t(this).outerHeight()})}}),t.notify=function(t,s){var i=new e(this,t,s);return i.notify},t.notifyDefaults=function(e){return s=t.extend(!0,{},s,e)},t.notifyClose=function(e){"undefined"==typeof e||"all"==e?t("[data-notify]").find('[data-notify="dismiss"]').trigger("click"):t('[data-notify-position="'+e+'"]').find('[data-notify="dismiss"]').trigger("click")}});
\ No newline at end of file
diff --git a/web/js/bootstrap.min.js b/web/js/bootstrap.min.js
deleted file mode 100644
index 9bcd2fc..0000000
--- a/web/js/bootstrap.min.js
+++ /dev/null
@@ -1,7 +0,0 @@
-/*!
- * Bootstrap v3.3.7 (http://getbootstrap.com)
- * Copyright 2011-2016 Twitter, Inc.
- * Licensed under the MIT license
- */
-if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
\ No newline at end of file
diff --git a/web/js/device.js b/web/js/device.js
deleted file mode 100644
index 648b435..0000000
--- a/web/js/device.js
+++ /dev/null
@@ -1,400 +0,0 @@
-/**
- * Created by harry on 2017/4/24.
- */
-
-
-var util = {
- setMinicapScale:function (scale) {
- localStorage.setItem("minicap_scale", scale);
- },
- getMinicapScale:function () {
- return localStorage.getItem("minicap_scale");
- },
- setMinicapRotate:function (rotate) {
- localStorage.setItem("minicap_rotate", rotate);
- },
- getMinicapRotate:function () {
- return localStorage.getItem("minicap_rotate");
- },
- isRotate: false,
- screenW:400,
- screenH:400
-};
-var webSocket = null;
-
-String.prototype.startWith=function(str){
- var reg=new RegExp("^"+str);
- return reg.test(this);
-};
-
-String.prototype.endWith=function(str){
- var reg=new RegExp(str+"$");
- return reg.test(this);
-};
-
-var canvas = document.getElementById("phone-screen");
-var g = canvas.getContext('2d');
-
-function getUrlParams(name) {
- var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
- if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " "));
- return "";
-}
-
-function connectServer() {
- webSocket = new WebSocket("ws://" + server.getServerIp() + ":" + server.getServerPort());
- webSocket.onopen = function () {
- webSocket.send("wait://" + JSON.stringify({sn:util.sn, key:util.key}));
- };
- webSocket.onclose = function () {
- util.serverConnected = false;
- };
-
- webSocket.onmessage = function(msg) {
- var str = msg.data;
- if (typeof(str) === "string") {
- if (str.startWith("open://")) {
- var checkKey = str.substr(str.indexOf(":") + 3);
- util.serverConnected = true;
- requestStartMinicap();
- requestStartMinitouch();
- } else if(str.startWith("minicap://") && util.serverConnected) {
- var stat = str.substr(str.indexOf(":") + 3);
- if (stat === "open") {
- onMinicapOpen();
- waitingData();
- } else {
- onMinicapClose();
- }
- } else if (str.startWith("minitouch://") && util.serverConnected) {
- var stat = str.substr(str.indexOf(":") + 3);
- if (stat === "open") {
- onMinitouchOpen();
- } else {
- onMinitouchClose();
- }
- } else if(str.startWith("message://")) {
- var msg = str.substr(str.indexOf(":") + 3);
- alert(msg);
- }
- } else {
- waitingData();
- setCanvasImageData(str);
- }
- }
-}
-
-window.onload = function() {
- // 获取请求参数
- util.sn = getUrlParams("sn");
- util.key = getUrlParams("key");
-
- util.ip = getUrlParams("ip") || "127.0.0.1";
- util.port = getUrlParams("port") || "6655";
-
- util.screenW = getUrlParams("w") || 1080;
- util.screenH = getUrlParams("h") || 1920;
-
- $("#minicapScaleText").val(util.getMinicapScale());
-
- var s = util.getMinicapRotate();
-
- connectServer();
-};
-
-document.onkeydown = function (event) {
- var e = event || window.event || arguments.callee.caller.arguments[0];
- console.log(e.keyCode);
- sendKeyEvent(e.keyCode);
-};
-
-function waitingData() {
- webSocket.send("waitting://");
-}
-function setCanvasImageData(data) {
- var blob = new Blob([data], {type: 'image/jpeg'});
- var URL = window.URL || window.webkitURL;
- var img = new Image();
- img.onload = function () {
- canvas.width = img.width;
- canvas.height = img.height;
- g.drawImage(img, 0, 0);
- img.onLoad = null;
- img = null;
- u = null;
- blob = null;
- };
- var u = URL.createObjectURL(blob);
- img.src = u;
-}
-
-// 获取鼠标在html中的绝对位置
-function mouseCoords(event){
- if(event.pageX || event.pageY){
- return {x:event.pageX, y:event.pageY};
- }
- return{
- x:event.clientX + document.body.scrollLeft - document.body.clientLeft,
- y:event.clientY + document.body.scrollTop - document.body.clientTop
- };
-}
-// 获取鼠标在控件的相对位置
-function getXAndY(control, event){
- //鼠标点击的绝对位置
- Ev= event || window.event;
- var mousePos = mouseCoords(event);
- var x = mousePos.x;
- var y = mousePos.y;
- //alert("鼠标点击的绝对位置坐标:"+x+","+y);
-
- //获取div在body中的绝对位置
- var x1 = control.offsetLeft;
- var y1 = control.offsetTop;
-
- //鼠标点击位置相对于div的坐标
- var x2 = x - x1;
- var y2 = y - y1;
- return {x:x2,y:y2};
-}
-
-var isDown = false;
-
-function onMinitouchOpen() {
- $(canvas).toggleClass("minitouch");
- $.notify("Minitouch Ready!", {
- allow_dismiss: false,
- delay: 2000,
- placement: {
- align: "left"
- },
- type: "success"
- });
-}
-
-function onMinitouchClose() {
- $(canvas).toggleClass("minitouch");
- $.notify("Minitouch Close!", {
- allow_dismiss: false,
- delay: 2000,
- placement: {
- align: "left"
- },
- type: "danger"
- });
-}
-
-function onMinicapOpen() {
- $.notify("Minicap Ready!", {
- allow_dismiss: false,
- delay: 2000,
- placement: {
- align: "left"
- },
- type: "success"
- });
-}
-
-function onMinicapClose() {
- $.notify("Minicap Close!", {
- allow_dismiss: false,
- delay: 2000,
- placement: {
- align: "left"
- },
- type: "danger"
- });
-}
-
-function onMinicapScaleChange() {
- var inputScale = $("#minicapScaleText").val();
- if (util.getMinicapScale() === inputScale) {
- return;
- }
- util.setMinicapScale(inputScale);
- requestStartMinicap();
-}
-
-function onMinicapRotateChange(rotate) {
- var inputRotate = rotate;
- if (util.getMinicapRotate() ===inputRotate) {
- return;
- }
- util.setMinicapRotate(inputRotate);
- requestStartMinicap();
-}
-
-$("#fileToUpload").on("change", function () {
- var file = this.files[0];
- var total = file.size; // 文件总大小
- var curLoaded = 0; // 已读取文件字节数
- var step = 1024 * 1024 ; // 一次读取的最大长度
- var reader = new FileReader();
- reader.onload = function (e) {
- var loaded = e.loaded;
-
- // 发送
- console.log(loaded);
- sendFileData(reader.result, curLoaded, function() {
- curLoaded += loaded;
- if (curLoaded < total) {
- readBlob(curLoaded);
- } else {
- curLoaded = total;
- }
- });
- };
-
- function readBlob(start) {
- var blob = file.slice(start, start + step);
- reader.readAsArrayBuffer(blob);
- }
-
- function str2ab(str) {
- var buf = new ArrayBuffer(str.length*2); // 每个字符占用2个字节
- var bufView = new Uint16Array(buf);
- for (var i=0, strLen=str.length; i= min and a <= max.
- */
- function inRange(a, min, max) {
- return min <= a && a <= max;
- }
-
- /**
- * @param {!Array.<*>} array The array to check.
- * @param {*} item The item to look for in the array.
- * @return {boolean} True if the item appears in the array.
- */
- function includes(array, item) {
- return array.indexOf(item) !== -1;
- }
-
- var floor = Math.floor;
-
- /**
- * @param {*} o
- * @return {Object}
- */
- function ToDictionary(o) {
- if (o === undefined) return {};
- if (o === Object(o)) return o;
- throw TypeError('Could not convert argument to dictionary');
- }
-
- /**
- * @param {string} string Input string of UTF-16 code units.
- * @return {!Array.} Code points.
- */
- function stringToCodePoints(string) {
- // https://heycam.github.io/webidl/#dfn-obtain-unicode
-
- // 1. Let S be the DOMString value.
- var s = String(string);
-
- // 2. Let n be the length of S.
- var n = s.length;
-
- // 3. Initialize i to 0.
- var i = 0;
-
- // 4. Initialize U to be an empty sequence of Unicode characters.
- var u = [];
-
- // 5. While i < n:
- while (i < n) {
-
- // 1. Let c be the code unit in S at index i.
- var c = s.charCodeAt(i);
-
- // 2. Depending on the value of c:
-
- // c < 0xD800 or c > 0xDFFF
- if (c < 0xD800 || c > 0xDFFF) {
- // Append to U the Unicode character with code point c.
- u.push(c);
- }
-
- // 0xDC00 ≤ c ≤ 0xDFFF
- else if (0xDC00 <= c && c <= 0xDFFF) {
- // Append to U a U+FFFD REPLACEMENT CHARACTER.
- u.push(0xFFFD);
- }
-
- // 0xD800 ≤ c ≤ 0xDBFF
- else if (0xD800 <= c && c <= 0xDBFF) {
- // 1. If i = n−1, then append to U a U+FFFD REPLACEMENT
- // CHARACTER.
- if (i === n - 1) {
- u.push(0xFFFD);
- }
- // 2. Otherwise, i < n−1:
- else {
- // 1. Let d be the code unit in S at index i+1.
- var d = s.charCodeAt(i + 1);
-
- // 2. If 0xDC00 ≤ d ≤ 0xDFFF, then:
- if (0xDC00 <= d && d <= 0xDFFF) {
- // 1. Let a be c & 0x3FF.
- var a = c & 0x3FF;
-
- // 2. Let b be d & 0x3FF.
- var b = d & 0x3FF;
-
- // 3. Append to U the Unicode character with code point
- // 2^16+2^10*a+b.
- u.push(0x10000 + (a << 10) + b);
-
- // 4. Set i to i+1.
- i += 1;
- }
-
- // 3. Otherwise, d < 0xDC00 or d > 0xDFFF. Append to U a
- // U+FFFD REPLACEMENT CHARACTER.
- else {
- u.push(0xFFFD);
- }
- }
- }
-
- // 3. Set i to i+1.
- i += 1;
- }
-
- // 6. Return U.
- return u;
- }
-
- /**
- * @param {!Array.} code_points Array of code points.
- * @return {string} string String of UTF-16 code units.
- */
- function codePointsToString(code_points) {
- var s = '';
- for (var i = 0; i < code_points.length; ++i) {
- var cp = code_points[i];
- if (cp <= 0xFFFF) {
- s += String.fromCharCode(cp);
- } else {
- cp -= 0x10000;
- s += String.fromCharCode((cp >> 10) + 0xD800,
- (cp & 0x3FF) + 0xDC00);
- }
- }
- return s;
- }
-
-
- //
- // Implementation of Encoding specification
- // https://encoding.spec.whatwg.org/
- //
-
- //
- // 4. Terminology
- //
-
- /**
- * An ASCII byte is a byte in the range 0x00 to 0x7F, inclusive.
- * @param {number} a The number to test.
- * @return {boolean} True if a is in the range 0x00 to 0x7F, inclusive.
- */
- function isASCIIByte(a) {
- return 0x00 <= a && a <= 0x7F;
- }
-
- /**
- * An ASCII code point is a code point in the range U+0000 to
- * U+007F, inclusive.
- */
- var isASCIICodePoint = isASCIIByte;
-
-
- /**
- * End-of-stream is a special token that signifies no more tokens
- * are in the stream.
- * @const
- */ var end_of_stream = -1;
-
- /**
- * A stream represents an ordered sequence of tokens.
- *
- * @constructor
- * @param {!(Array.|Uint8Array)} tokens Array of tokens that provide
- * the stream.
- */
- function Stream(tokens) {
- /** @type {!Array.} */
- this.tokens = [].slice.call(tokens);
- // Reversed as push/pop is more efficient than shift/unshift.
- this.tokens.reverse();
- }
-
- Stream.prototype = {
- /**
- * @return {boolean} True if end-of-stream has been hit.
- */
- endOfStream: function() {
- return !this.tokens.length;
- },
-
- /**
- * When a token is read from a stream, the first token in the
- * stream must be returned and subsequently removed, and
- * end-of-stream must be returned otherwise.
- *
- * @return {number} Get the next token from the stream, or
- * end_of_stream.
- */
- read: function() {
- if (!this.tokens.length)
- return end_of_stream;
- return this.tokens.pop();
- },
-
- /**
- * When one or more tokens are prepended to a stream, those tokens
- * must be inserted, in given order, before the first token in the
- * stream.
- *
- * @param {(number|!Array.)} token The token(s) to prepend to the
- * stream.
- */
- prepend: function(token) {
- if (Array.isArray(token)) {
- var tokens = /**@type {!Array.}*/(token);
- while (tokens.length)
- this.tokens.push(tokens.pop());
- } else {
- this.tokens.push(token);
- }
- },
-
- /**
- * When one or more tokens are pushed to a stream, those tokens
- * must be inserted, in given order, after the last token in the
- * stream.
- *
- * @param {(number|!Array.)} token The tokens(s) to push to the
- * stream.
- */
- push: function(token) {
- if (Array.isArray(token)) {
- var tokens = /**@type {!Array.}*/(token);
- while (tokens.length)
- this.tokens.unshift(tokens.shift());
- } else {
- this.tokens.unshift(token);
- }
- }
- };
-
- //
- // 5. Encodings
- //
-
- // 5.1 Encoders and decoders
-
- /** @const */
- var finished = -1;
-
- /**
- * @param {boolean} fatal If true, decoding errors raise an exception.
- * @param {number=} opt_code_point Override the standard fallback code point.
- * @return {number} The code point to insert on a decoding error.
- */
- function decoderError(fatal, opt_code_point) {
- if (fatal)
- throw TypeError('Decoder error');
- return opt_code_point || 0xFFFD;
- }
-
- /**
- * @param {number} code_point The code point that could not be encoded.
- * @return {number} Always throws, no value is actually returned.
- */
- function encoderError(code_point) {
- throw TypeError('The code point ' + code_point + ' could not be encoded.');
- }
-
- /** @interface */
- function Decoder() {}
- Decoder.prototype = {
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point, or |finished|.
- */
- handler: function(stream, bite) {}
- };
-
- /** @interface */
- function Encoder() {}
- Encoder.prototype = {
- /**
- * @param {Stream} stream The stream of code points being encoded.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit, or |finished|.
- */
- handler: function(stream, code_point) {}
- };
-
- // 5.2 Names and labels
-
- // TODO: Define @typedef for Encoding: {name:string,labels:Array.}
- // https://github.com/google/closure-compiler/issues/247
-
- /**
- * @param {string} label The encoding label.
- * @return {?{name:string,labels:Array.}}
- */
- function getEncoding(label) {
- // 1. Remove any leading and trailing ASCII whitespace from label.
- label = String(label).trim().toLowerCase();
-
- // 2. If label is an ASCII case-insensitive match for any of the
- // labels listed in the table below, return the corresponding
- // encoding, and failure otherwise.
- if (Object.prototype.hasOwnProperty.call(label_to_encoding, label)) {
- return label_to_encoding[label];
- }
- return null;
- }
-
- /**
- * Encodings table: https://encoding.spec.whatwg.org/encodings.json
- * @const
- * @type {!Array.<{
- * heading: string,
- * encodings: Array.<{name:string,labels:Array.}>
- * }>}
- */
- var encodings = [
- {
- "encodings": [
- {
- "labels": [
- "unicode-1-1-utf-8",
- "utf-8",
- "utf8"
- ],
- "name": "UTF-8"
- }
- ],
- "heading": "The Encoding"
- },
- {
- "encodings": [
- {
- "labels": [
- "866",
- "cp866",
- "csibm866",
- "ibm866"
- ],
- "name": "IBM866"
- },
- {
- "labels": [
- "csisolatin2",
- "iso-8859-2",
- "iso-ir-101",
- "iso8859-2",
- "iso88592",
- "iso_8859-2",
- "iso_8859-2:1987",
- "l2",
- "latin2"
- ],
- "name": "ISO-8859-2"
- },
- {
- "labels": [
- "csisolatin3",
- "iso-8859-3",
- "iso-ir-109",
- "iso8859-3",
- "iso88593",
- "iso_8859-3",
- "iso_8859-3:1988",
- "l3",
- "latin3"
- ],
- "name": "ISO-8859-3"
- },
- {
- "labels": [
- "csisolatin4",
- "iso-8859-4",
- "iso-ir-110",
- "iso8859-4",
- "iso88594",
- "iso_8859-4",
- "iso_8859-4:1988",
- "l4",
- "latin4"
- ],
- "name": "ISO-8859-4"
- },
- {
- "labels": [
- "csisolatincyrillic",
- "cyrillic",
- "iso-8859-5",
- "iso-ir-144",
- "iso8859-5",
- "iso88595",
- "iso_8859-5",
- "iso_8859-5:1988"
- ],
- "name": "ISO-8859-5"
- },
- {
- "labels": [
- "arabic",
- "asmo-708",
- "csiso88596e",
- "csiso88596i",
- "csisolatinarabic",
- "ecma-114",
- "iso-8859-6",
- "iso-8859-6-e",
- "iso-8859-6-i",
- "iso-ir-127",
- "iso8859-6",
- "iso88596",
- "iso_8859-6",
- "iso_8859-6:1987"
- ],
- "name": "ISO-8859-6"
- },
- {
- "labels": [
- "csisolatingreek",
- "ecma-118",
- "elot_928",
- "greek",
- "greek8",
- "iso-8859-7",
- "iso-ir-126",
- "iso8859-7",
- "iso88597",
- "iso_8859-7",
- "iso_8859-7:1987",
- "sun_eu_greek"
- ],
- "name": "ISO-8859-7"
- },
- {
- "labels": [
- "csiso88598e",
- "csisolatinhebrew",
- "hebrew",
- "iso-8859-8",
- "iso-8859-8-e",
- "iso-ir-138",
- "iso8859-8",
- "iso88598",
- "iso_8859-8",
- "iso_8859-8:1988",
- "visual"
- ],
- "name": "ISO-8859-8"
- },
- {
- "labels": [
- "csiso88598i",
- "iso-8859-8-i",
- "logical"
- ],
- "name": "ISO-8859-8-I"
- },
- {
- "labels": [
- "csisolatin6",
- "iso-8859-10",
- "iso-ir-157",
- "iso8859-10",
- "iso885910",
- "l6",
- "latin6"
- ],
- "name": "ISO-8859-10"
- },
- {
- "labels": [
- "iso-8859-13",
- "iso8859-13",
- "iso885913"
- ],
- "name": "ISO-8859-13"
- },
- {
- "labels": [
- "iso-8859-14",
- "iso8859-14",
- "iso885914"
- ],
- "name": "ISO-8859-14"
- },
- {
- "labels": [
- "csisolatin9",
- "iso-8859-15",
- "iso8859-15",
- "iso885915",
- "iso_8859-15",
- "l9"
- ],
- "name": "ISO-8859-15"
- },
- {
- "labels": [
- "iso-8859-16"
- ],
- "name": "ISO-8859-16"
- },
- {
- "labels": [
- "cskoi8r",
- "koi",
- "koi8",
- "koi8-r",
- "koi8_r"
- ],
- "name": "KOI8-R"
- },
- {
- "labels": [
- "koi8-ru",
- "koi8-u"
- ],
- "name": "KOI8-U"
- },
- {
- "labels": [
- "csmacintosh",
- "mac",
- "macintosh",
- "x-mac-roman"
- ],
- "name": "macintosh"
- },
- {
- "labels": [
- "dos-874",
- "iso-8859-11",
- "iso8859-11",
- "iso885911",
- "tis-620",
- "windows-874"
- ],
- "name": "windows-874"
- },
- {
- "labels": [
- "cp1250",
- "windows-1250",
- "x-cp1250"
- ],
- "name": "windows-1250"
- },
- {
- "labels": [
- "cp1251",
- "windows-1251",
- "x-cp1251"
- ],
- "name": "windows-1251"
- },
- {
- "labels": [
- "ansi_x3.4-1968",
- "ascii",
- "cp1252",
- "cp819",
- "csisolatin1",
- "ibm819",
- "iso-8859-1",
- "iso-ir-100",
- "iso8859-1",
- "iso88591",
- "iso_8859-1",
- "iso_8859-1:1987",
- "l1",
- "latin1",
- "us-ascii",
- "windows-1252",
- "x-cp1252"
- ],
- "name": "windows-1252"
- },
- {
- "labels": [
- "cp1253",
- "windows-1253",
- "x-cp1253"
- ],
- "name": "windows-1253"
- },
- {
- "labels": [
- "cp1254",
- "csisolatin5",
- "iso-8859-9",
- "iso-ir-148",
- "iso8859-9",
- "iso88599",
- "iso_8859-9",
- "iso_8859-9:1989",
- "l5",
- "latin5",
- "windows-1254",
- "x-cp1254"
- ],
- "name": "windows-1254"
- },
- {
- "labels": [
- "cp1255",
- "windows-1255",
- "x-cp1255"
- ],
- "name": "windows-1255"
- },
- {
- "labels": [
- "cp1256",
- "windows-1256",
- "x-cp1256"
- ],
- "name": "windows-1256"
- },
- {
- "labels": [
- "cp1257",
- "windows-1257",
- "x-cp1257"
- ],
- "name": "windows-1257"
- },
- {
- "labels": [
- "cp1258",
- "windows-1258",
- "x-cp1258"
- ],
- "name": "windows-1258"
- },
- {
- "labels": [
- "x-mac-cyrillic",
- "x-mac-ukrainian"
- ],
- "name": "x-mac-cyrillic"
- }
- ],
- "heading": "Legacy single-byte encodings"
- },
- {
- "encodings": [
- {
- "labels": [
- "chinese",
- "csgb2312",
- "csiso58gb231280",
- "gb2312",
- "gb_2312",
- "gb_2312-80",
- "gbk",
- "iso-ir-58",
- "x-gbk"
- ],
- "name": "GBK"
- },
- {
- "labels": [
- "gb18030"
- ],
- "name": "gb18030"
- }
- ],
- "heading": "Legacy multi-byte Chinese (simplified) encodings"
- },
- {
- "encodings": [
- {
- "labels": [
- "big5",
- "big5-hkscs",
- "cn-big5",
- "csbig5",
- "x-x-big5"
- ],
- "name": "Big5"
- }
- ],
- "heading": "Legacy multi-byte Chinese (traditional) encodings"
- },
- {
- "encodings": [
- {
- "labels": [
- "cseucpkdfmtjapanese",
- "euc-jp",
- "x-euc-jp"
- ],
- "name": "EUC-JP"
- },
- {
- "labels": [
- "csiso2022jp",
- "iso-2022-jp"
- ],
- "name": "ISO-2022-JP"
- },
- {
- "labels": [
- "csshiftjis",
- "ms932",
- "ms_kanji",
- "shift-jis",
- "shift_jis",
- "sjis",
- "windows-31j",
- "x-sjis"
- ],
- "name": "Shift_JIS"
- }
- ],
- "heading": "Legacy multi-byte Japanese encodings"
- },
- {
- "encodings": [
- {
- "labels": [
- "cseuckr",
- "csksc56011987",
- "euc-kr",
- "iso-ir-149",
- "korean",
- "ks_c_5601-1987",
- "ks_c_5601-1989",
- "ksc5601",
- "ksc_5601",
- "windows-949"
- ],
- "name": "EUC-KR"
- }
- ],
- "heading": "Legacy multi-byte Korean encodings"
- },
- {
- "encodings": [
- {
- "labels": [
- "csiso2022kr",
- "hz-gb-2312",
- "iso-2022-cn",
- "iso-2022-cn-ext",
- "iso-2022-kr"
- ],
- "name": "replacement"
- },
- {
- "labels": [
- "utf-16be"
- ],
- "name": "UTF-16BE"
- },
- {
- "labels": [
- "utf-16",
- "utf-16le"
- ],
- "name": "UTF-16LE"
- },
- {
- "labels": [
- "x-user-defined"
- ],
- "name": "x-user-defined"
- }
- ],
- "heading": "Legacy miscellaneous encodings"
- }
- ];
-
- // Label to encoding registry.
- /** @type {Object.}>} */
- var label_to_encoding = {};
- encodings.forEach(function(category) {
- category.encodings.forEach(function(encoding) {
- encoding.labels.forEach(function(label) {
- label_to_encoding[label] = encoding;
- });
- });
- });
-
- // Registry of of encoder/decoder factories, by encoding name.
- /** @type {Object.} */
- var encoders = {};
- /** @type {Object.} */
- var decoders = {};
-
- //
- // 6. Indexes
- //
-
- /**
- * @param {number} pointer The |pointer| to search for.
- * @param {(!Array.|undefined)} index The |index| to search within.
- * @return {?number} The code point corresponding to |pointer| in |index|,
- * or null if |code point| is not in |index|.
- */
- function indexCodePointFor(pointer, index) {
- if (!index) return null;
- return index[pointer] || null;
- }
-
- /**
- * @param {number} code_point The |code point| to search for.
- * @param {!Array.} index The |index| to search within.
- * @return {?number} The first pointer corresponding to |code point| in
- * |index|, or null if |code point| is not in |index|.
- */
- function indexPointerFor(code_point, index) {
- var pointer = index.indexOf(code_point);
- return pointer === -1 ? null : pointer;
- }
-
- /**
- * @param {string} name Name of the index.
- * @return {(!Array.|!Array.>)}
- * */
- function index(name) {
- if (!('encoding-indexes' in global)) {
- throw Error("Indexes missing." +
- " Did you forget to include encoding-indexes.js first?");
- }
- return global['encoding-indexes'][name];
- }
-
- /**
- * @param {number} pointer The |pointer| to search for in the gb18030 index.
- * @return {?number} The code point corresponding to |pointer| in |index|,
- * or null if |code point| is not in the gb18030 index.
- */
- function indexGB18030RangesCodePointFor(pointer) {
- // 1. If pointer is greater than 39419 and less than 189000, or
- // pointer is greater than 1237575, return null.
- if ((pointer > 39419 && pointer < 189000) || (pointer > 1237575))
- return null;
-
- // 2. If pointer is 7457, return code point U+E7C7.
- if (pointer === 7457) return 0xE7C7;
-
- // 3. Let offset be the last pointer in index gb18030 ranges that
- // is equal to or less than pointer and let code point offset be
- // its corresponding code point.
- var offset = 0;
- var code_point_offset = 0;
- var idx = index('gb18030-ranges');
- var i;
- for (i = 0; i < idx.length; ++i) {
- /** @type {!Array.} */
- var entry = idx[i];
- if (entry[0] <= pointer) {
- offset = entry[0];
- code_point_offset = entry[1];
- } else {
- break;
- }
- }
-
- // 4. Return a code point whose value is code point offset +
- // pointer − offset.
- return code_point_offset + pointer - offset;
- }
-
- /**
- * @param {number} code_point The |code point| to locate in the gb18030 index.
- * @return {number} The first pointer corresponding to |code point| in the
- * gb18030 index.
- */
- function indexGB18030RangesPointerFor(code_point) {
- // 1. If code point is U+E7C7, return pointer 7457.
- if (code_point === 0xE7C7) return 7457;
-
- // 2. Let offset be the last code point in index gb18030 ranges
- // that is equal to or less than code point and let pointer offset
- // be its corresponding pointer.
- var offset = 0;
- var pointer_offset = 0;
- var idx = index('gb18030-ranges');
- var i;
- for (i = 0; i < idx.length; ++i) {
- /** @type {!Array.} */
- var entry = idx[i];
- if (entry[1] <= code_point) {
- offset = entry[1];
- pointer_offset = entry[0];
- } else {
- break;
- }
- }
-
- // 3. Return a pointer whose value is pointer offset + code point
- // − offset.
- return pointer_offset + code_point - offset;
- }
-
- /**
- * @param {number} code_point The |code_point| to search for in the Shift_JIS
- * index.
- * @return {?number} The code point corresponding to |pointer| in |index|,
- * or null if |code point| is not in the Shift_JIS index.
- */
- function indexShiftJISPointerFor(code_point) {
- // 1. Let index be index jis0208 excluding all entries whose
- // pointer is in the range 8272 to 8835, inclusive.
- shift_jis_index = shift_jis_index ||
- index('jis0208').map(function(code_point, pointer) {
- return inRange(pointer, 8272, 8835) ? null : code_point;
- });
- var index_ = shift_jis_index;
-
- // 2. Return the index pointer for code point in index.
- return index_.indexOf(code_point);
- }
- var shift_jis_index;
-
- /**
- * @param {number} code_point The |code_point| to search for in the big5
- * index.
- * @return {?number} The code point corresponding to |pointer| in |index|,
- * or null if |code point| is not in the big5 index.
- */
- function indexBig5PointerFor(code_point) {
- // 1. Let index be index Big5 excluding all entries whose pointer
- big5_index_no_hkscs = big5_index_no_hkscs ||
- index('big5').map(function(code_point, pointer) {
- return (pointer < (0xA1 - 0x81) * 157) ? null : code_point;
- });
- var index_ = big5_index_no_hkscs;
-
- // 2. If code point is U+2550, U+255E, U+2561, U+256A, U+5341, or
- // U+5345, return the last pointer corresponding to code point in
- // index.
- if (code_point === 0x2550 || code_point === 0x255E ||
- code_point === 0x2561 || code_point === 0x256A ||
- code_point === 0x5341 || code_point === 0x5345) {
- return index_.lastIndexOf(code_point);
- }
-
- // 3. Return the index pointer for code point in index.
- return indexPointerFor(code_point, index_);
- }
- var big5_index_no_hkscs;
-
- //
- // 8. API
- //
-
- /** @const */ var DEFAULT_ENCODING = 'utf-8';
-
- // 8.1 Interface TextDecoder
-
- /**
- * @constructor
- * @param {string=} label The label of the encoding;
- * defaults to 'utf-8'.
- * @param {Object=} options
- */
- function TextDecoder(label, options) {
- // Web IDL conventions
- if (!(this instanceof TextDecoder))
- throw TypeError('Called as a function. Did you forget \'new\'?');
- label = label !== undefined ? String(label) : DEFAULT_ENCODING;
- options = ToDictionary(options);
-
- // A TextDecoder object has an associated encoding, decoder,
- // stream, ignore BOM flag (initially unset), BOM seen flag
- // (initially unset), error mode (initially replacement), and do
- // not flush flag (initially unset).
-
- /** @private */
- this._encoding = null;
- /** @private @type {?Decoder} */
- this._decoder = null;
- /** @private @type {boolean} */
- this._ignoreBOM = false;
- /** @private @type {boolean} */
- this._BOMseen = false;
- /** @private @type {string} */
- this._error_mode = 'replacement';
- /** @private @type {boolean} */
- this._do_not_flush = false;
-
-
- // 1. Let encoding be the result of getting an encoding from
- // label.
- var encoding = getEncoding(label);
-
- // 2. If encoding is failure or replacement, throw a RangeError.
- if (encoding === null || encoding.name === 'replacement')
- throw RangeError('Unknown encoding: ' + label);
- if (!decoders[encoding.name]) {
- throw Error('Decoder not present.' +
- ' Did you forget to include encoding-indexes.js first?');
- }
-
- // 3. Let dec be a new TextDecoder object.
- var dec = this;
-
- // 4. Set dec's encoding to encoding.
- dec._encoding = encoding;
-
- // 5. If options's fatal member is true, set dec's error mode to
- // fatal.
- if (Boolean(options['fatal']))
- dec._error_mode = 'fatal';
-
- // 6. If options's ignoreBOM member is true, set dec's ignore BOM
- // flag.
- if (Boolean(options['ignoreBOM']))
- dec._ignoreBOM = true;
-
- // For pre-ES5 runtimes:
- if (!Object.defineProperty) {
- this.encoding = dec._encoding.name.toLowerCase();
- this.fatal = dec._error_mode === 'fatal';
- this.ignoreBOM = dec._ignoreBOM;
- }
-
- // 7. Return dec.
- return dec;
- }
-
- if (Object.defineProperty) {
- // The encoding attribute's getter must return encoding's name.
- Object.defineProperty(TextDecoder.prototype, 'encoding', {
- /** @this {TextDecoder} */
- get: function() { return this._encoding.name.toLowerCase(); }
- });
-
- // The fatal attribute's getter must return true if error mode
- // is fatal, and false otherwise.
- Object.defineProperty(TextDecoder.prototype, 'fatal', {
- /** @this {TextDecoder} */
- get: function() { return this._error_mode === 'fatal'; }
- });
-
- // The ignoreBOM attribute's getter must return true if ignore
- // BOM flag is set, and false otherwise.
- Object.defineProperty(TextDecoder.prototype, 'ignoreBOM', {
- /** @this {TextDecoder} */
- get: function() { return this._ignoreBOM; }
- });
- }
-
- /**
- * @param {BufferSource=} input The buffer of bytes to decode.
- * @param {Object=} options
- * @return {string} The decoded string.
- */
- TextDecoder.prototype.decode = function decode(input, options) {
- var bytes;
- if (typeof input === 'object' && input instanceof ArrayBuffer) {
- bytes = new Uint8Array(input);
- } else if (typeof input === 'object' && 'buffer' in input &&
- input.buffer instanceof ArrayBuffer) {
- bytes = new Uint8Array(input.buffer,
- input.byteOffset,
- input.byteLength);
- } else {
- bytes = new Uint8Array(0);
- }
-
- options = ToDictionary(options);
-
- // 1. If the do not flush flag is unset, set decoder to a new
- // encoding's decoder, set stream to a new stream, and unset the
- // BOM seen flag.
- if (!this._do_not_flush) {
- this._decoder = decoders[this._encoding.name]({
- fatal: this._error_mode === 'fatal'});
- this._BOMseen = false;
- }
-
- // 2. If options's stream is true, set the do not flush flag, and
- // unset the do not flush flag otherwise.
- this._do_not_flush = Boolean(options['stream']);
-
- // 3. If input is given, push a copy of input to stream.
- // TODO: Align with spec algorithm - maintain stream on instance.
- var input_stream = new Stream(bytes);
-
- // 4. Let output be a new stream.
- var output = [];
-
- /** @type {?(number|!Array.)} */
- var result;
-
- // 5. While true:
- while (true) {
- // 1. Let token be the result of reading from stream.
- var token = input_stream.read();
-
- // 2. If token is end-of-stream and the do not flush flag is
- // set, return output, serialized.
- // TODO: Align with spec algorithm.
- if (token === end_of_stream)
- break;
-
- // 3. Otherwise, run these subsubsteps:
-
- // 1. Let result be the result of processing token for decoder,
- // stream, output, and error mode.
- result = this._decoder.handler(input_stream, token);
-
- // 2. If result is finished, return output, serialized.
- if (result === finished)
- break;
-
- if (result !== null) {
- if (Array.isArray(result))
- output.push.apply(output, /**@type {!Array.}*/(result));
- else
- output.push(result);
- }
-
- // 3. Otherwise, if result is error, throw a TypeError.
- // (Thrown in handler)
-
- // 4. Otherwise, do nothing.
- }
- // TODO: Align with spec algorithm.
- if (!this._do_not_flush) {
- do {
- result = this._decoder.handler(input_stream, input_stream.read());
- if (result === finished)
- break;
- if (result === null)
- continue;
- if (Array.isArray(result))
- output.push.apply(output, /**@type {!Array.}*/(result));
- else
- output.push(result);
- } while (!input_stream.endOfStream());
- this._decoder = null;
- }
-
- // A TextDecoder object also has an associated serialize stream
- // algorithm...
- /**
- * @param {!Array.} stream
- * @return {string}
- * @this {TextDecoder}
- */
- function serializeStream(stream) {
- // 1. Let token be the result of reading from stream.
- // (Done in-place on array, rather than as a stream)
-
- // 2. If encoding is UTF-8, UTF-16BE, or UTF-16LE, and ignore
- // BOM flag and BOM seen flag are unset, run these subsubsteps:
- if (includes(['UTF-8', 'UTF-16LE', 'UTF-16BE'], this._encoding.name) &&
- !this._ignoreBOM && !this._BOMseen) {
- if (stream.length > 0 && stream[0] === 0xFEFF) {
- // 1. If token is U+FEFF, set BOM seen flag.
- this._BOMseen = true;
- stream.shift();
- } else if (stream.length > 0) {
- // 2. Otherwise, if token is not end-of-stream, set BOM seen
- // flag and append token to stream.
- this._BOMseen = true;
- } else {
- // 3. Otherwise, if token is not end-of-stream, append token
- // to output.
- // (no-op)
- }
- }
- // 4. Otherwise, return output.
- return codePointsToString(stream);
- }
-
- return serializeStream.call(this, output);
- };
-
- // 8.2 Interface TextEncoder
-
- /**
- * @constructor
- * @param {string=} label The label of the encoding. NONSTANDARD.
- * @param {Object=} options NONSTANDARD.
- */
- function TextEncoder(label, options) {
- // Web IDL conventions
- if (!(this instanceof TextEncoder))
- throw TypeError('Called as a function. Did you forget \'new\'?');
- options = ToDictionary(options);
-
- // A TextEncoder object has an associated encoding and encoder.
-
- /** @private */
- this._encoding = null;
- /** @private @type {?Encoder} */
- this._encoder = null;
-
- // Non-standard
- /** @private @type {boolean} */
- this._do_not_flush = false;
- /** @private @type {string} */
- this._fatal = Boolean(options['fatal']) ? 'fatal' : 'replacement';
-
- // 1. Let enc be a new TextEncoder object.
- var enc = this;
-
- // 2. Set enc's encoding to UTF-8's encoder.
- if (Boolean(options['NONSTANDARD_allowLegacyEncoding'])) {
- // NONSTANDARD behavior.
- label = label !== undefined ? String(label) : DEFAULT_ENCODING;
- var encoding = getEncoding(label);
- if (encoding === null || encoding.name === 'replacement')
- throw RangeError('Unknown encoding: ' + label);
- if (!encoders[encoding.name]) {
- throw Error('Encoder not present.' +
- ' Did you forget to include encoding-indexes.js first?');
- }
- enc._encoding = encoding;
- } else {
- // Standard behavior.
- enc._encoding = getEncoding('utf-8');
-
- if (label !== undefined && 'console' in global) {
- console.warn('TextEncoder constructor called with encoding label, '
- + 'which is ignored.');
- }
- }
-
- // For pre-ES5 runtimes:
- if (!Object.defineProperty)
- this.encoding = enc._encoding.name.toLowerCase();
-
- // 3. Return enc.
- return enc;
- }
-
- if (Object.defineProperty) {
- // The encoding attribute's getter must return encoding's name.
- Object.defineProperty(TextEncoder.prototype, 'encoding', {
- /** @this {TextEncoder} */
- get: function() { return this._encoding.name.toLowerCase(); }
- });
- }
-
- /**
- * @param {string=} opt_string The string to encode.
- * @param {Object=} options
- * @return {!Uint8Array} Encoded bytes, as a Uint8Array.
- */
- TextEncoder.prototype.encode = function encode(opt_string, options) {
- opt_string = opt_string === undefined ? '' : String(opt_string);
- options = ToDictionary(options);
-
- // NOTE: This option is nonstandard. None of the encodings
- // permitted for encoding (i.e. UTF-8, UTF-16) are stateful when
- // the input is a USVString so streaming is not necessary.
- if (!this._do_not_flush)
- this._encoder = encoders[this._encoding.name]({
- fatal: this._fatal === 'fatal'});
- this._do_not_flush = Boolean(options['stream']);
-
- // 1. Convert input to a stream.
- var input = new Stream(stringToCodePoints(opt_string));
-
- // 2. Let output be a new stream
- var output = [];
-
- /** @type {?(number|!Array.)} */
- var result;
- // 3. While true, run these substeps:
- while (true) {
- // 1. Let token be the result of reading from input.
- var token = input.read();
- if (token === end_of_stream)
- break;
- // 2. Let result be the result of processing token for encoder,
- // input, output.
- result = this._encoder.handler(input, token);
- if (result === finished)
- break;
- if (Array.isArray(result))
- output.push.apply(output, /**@type {!Array.}*/(result));
- else
- output.push(result);
- }
- // TODO: Align with spec algorithm.
- if (!this._do_not_flush) {
- while (true) {
- result = this._encoder.handler(input, input.read());
- if (result === finished)
- break;
- if (Array.isArray(result))
- output.push.apply(output, /**@type {!Array.}*/(result));
- else
- output.push(result);
- }
- this._encoder = null;
- }
- // 3. If result is finished, convert output into a byte sequence,
- // and then return a Uint8Array object wrapping an ArrayBuffer
- // containing output.
- return new Uint8Array(output);
- };
-
-
- //
- // 9. The encoding
- //
-
- // 9.1 utf-8
-
- // 9.1.1 utf-8 decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function UTF8Decoder(options) {
- var fatal = options.fatal;
-
- // utf-8's decoder's has an associated utf-8 code point, utf-8
- // bytes seen, and utf-8 bytes needed (all initially 0), a utf-8
- // lower boundary (initially 0x80), and a utf-8 upper boundary
- // (initially 0xBF).
- var /** @type {number} */ utf8_code_point = 0,
- /** @type {number} */ utf8_bytes_seen = 0,
- /** @type {number} */ utf8_bytes_needed = 0,
- /** @type {number} */ utf8_lower_boundary = 0x80,
- /** @type {number} */ utf8_upper_boundary = 0xBF;
-
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream and utf-8 bytes needed is not 0,
- // set utf-8 bytes needed to 0 and return error.
- if (bite === end_of_stream && utf8_bytes_needed !== 0) {
- utf8_bytes_needed = 0;
- return decoderError(fatal);
- }
-
- // 2. If byte is end-of-stream, return finished.
- if (bite === end_of_stream)
- return finished;
-
- // 3. If utf-8 bytes needed is 0, based on byte:
- if (utf8_bytes_needed === 0) {
-
- // 0x00 to 0x7F
- if (inRange(bite, 0x00, 0x7F)) {
- // Return a code point whose value is byte.
- return bite;
- }
-
- // 0xC2 to 0xDF
- else if (inRange(bite, 0xC2, 0xDF)) {
- // 1. Set utf-8 bytes needed to 1.
- utf8_bytes_needed = 1;
-
- // 2. Set UTF-8 code point to byte & 0x1F.
- utf8_code_point = bite & 0x1F;
- }
-
- // 0xE0 to 0xEF
- else if (inRange(bite, 0xE0, 0xEF)) {
- // 1. If byte is 0xE0, set utf-8 lower boundary to 0xA0.
- if (bite === 0xE0)
- utf8_lower_boundary = 0xA0;
- // 2. If byte is 0xED, set utf-8 upper boundary to 0x9F.
- if (bite === 0xED)
- utf8_upper_boundary = 0x9F;
- // 3. Set utf-8 bytes needed to 2.
- utf8_bytes_needed = 2;
- // 4. Set UTF-8 code point to byte & 0xF.
- utf8_code_point = bite & 0xF;
- }
-
- // 0xF0 to 0xF4
- else if (inRange(bite, 0xF0, 0xF4)) {
- // 1. If byte is 0xF0, set utf-8 lower boundary to 0x90.
- if (bite === 0xF0)
- utf8_lower_boundary = 0x90;
- // 2. If byte is 0xF4, set utf-8 upper boundary to 0x8F.
- if (bite === 0xF4)
- utf8_upper_boundary = 0x8F;
- // 3. Set utf-8 bytes needed to 3.
- utf8_bytes_needed = 3;
- // 4. Set UTF-8 code point to byte & 0x7.
- utf8_code_point = bite & 0x7;
- }
-
- // Otherwise
- else {
- // Return error.
- return decoderError(fatal);
- }
-
- // Return continue.
- return null;
- }
-
- // 4. If byte is not in the range utf-8 lower boundary to utf-8
- // upper boundary, inclusive, run these substeps:
- if (!inRange(bite, utf8_lower_boundary, utf8_upper_boundary)) {
-
- // 1. Set utf-8 code point, utf-8 bytes needed, and utf-8
- // bytes seen to 0, set utf-8 lower boundary to 0x80, and set
- // utf-8 upper boundary to 0xBF.
- utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
- utf8_lower_boundary = 0x80;
- utf8_upper_boundary = 0xBF;
-
- // 2. Prepend byte to stream.
- stream.prepend(bite);
-
- // 3. Return error.
- return decoderError(fatal);
- }
-
- // 5. Set utf-8 lower boundary to 0x80 and utf-8 upper boundary
- // to 0xBF.
- utf8_lower_boundary = 0x80;
- utf8_upper_boundary = 0xBF;
-
- // 6. Set UTF-8 code point to (UTF-8 code point << 6) | (byte &
- // 0x3F)
- utf8_code_point = (utf8_code_point << 6) | (bite & 0x3F);
-
- // 7. Increase utf-8 bytes seen by one.
- utf8_bytes_seen += 1;
-
- // 8. If utf-8 bytes seen is not equal to utf-8 bytes needed,
- // continue.
- if (utf8_bytes_seen !== utf8_bytes_needed)
- return null;
-
- // 9. Let code point be utf-8 code point.
- var code_point = utf8_code_point;
-
- // 10. Set utf-8 code point, utf-8 bytes needed, and utf-8 bytes
- // seen to 0.
- utf8_code_point = utf8_bytes_needed = utf8_bytes_seen = 0;
-
- // 11. Return a code point whose value is code point.
- return code_point;
- };
- }
-
- // 9.1.2 utf-8 encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- */
- function UTF8Encoder(options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point, return a byte whose
- // value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 3. Set count and offset based on the range code point is in:
- var count, offset;
- // U+0080 to U+07FF, inclusive:
- if (inRange(code_point, 0x0080, 0x07FF)) {
- // 1 and 0xC0
- count = 1;
- offset = 0xC0;
- }
- // U+0800 to U+FFFF, inclusive:
- else if (inRange(code_point, 0x0800, 0xFFFF)) {
- // 2 and 0xE0
- count = 2;
- offset = 0xE0;
- }
- // U+10000 to U+10FFFF, inclusive:
- else if (inRange(code_point, 0x10000, 0x10FFFF)) {
- // 3 and 0xF0
- count = 3;
- offset = 0xF0;
- }
-
- // 4. Let bytes be a byte sequence whose first byte is (code
- // point >> (6 × count)) + offset.
- var bytes = [(code_point >> (6 * count)) + offset];
-
- // 5. Run these substeps while count is greater than 0:
- while (count > 0) {
-
- // 1. Set temp to code point >> (6 × (count − 1)).
- var temp = code_point >> (6 * (count - 1));
-
- // 2. Append to bytes 0x80 | (temp & 0x3F).
- bytes.push(0x80 | (temp & 0x3F));
-
- // 3. Decrease count by one.
- count -= 1;
- }
-
- // 6. Return bytes bytes, in order.
- return bytes;
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['UTF-8'] = function(options) {
- return new UTF8Encoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['UTF-8'] = function(options) {
- return new UTF8Decoder(options);
- };
-
- //
- // 10. Legacy single-byte encodings
- //
-
- // 10.1 single-byte decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {!Array.} index The encoding index.
- * @param {{fatal: boolean}} options
- */
- function SingleByteDecoder(index, options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream, return finished.
- if (bite === end_of_stream)
- return finished;
-
- // 2. If byte is an ASCII byte, return a code point whose value
- // is byte.
- if (isASCIIByte(bite))
- return bite;
-
- // 3. Let code point be the index code point for byte − 0x80 in
- // index single-byte.
- var code_point = index[bite - 0x80];
-
- // 4. If code point is null, return error.
- if (code_point === null)
- return decoderError(fatal);
-
- // 5. Return a code point whose value is code point.
- return code_point;
- };
- }
-
- // 10.2 single-byte encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {!Array.} index The encoding index.
- * @param {{fatal: boolean}} options
- */
- function SingleByteEncoder(index, options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point, return a byte whose
- // value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 3. Let pointer be the index pointer for code point in index
- // single-byte.
- var pointer = indexPointerFor(code_point, index);
-
- // 4. If pointer is null, return error with code point.
- if (pointer === null)
- encoderError(code_point);
-
- // 5. Return a byte whose value is pointer + 0x80.
- return pointer + 0x80;
- };
- }
-
- (function() {
- if (!('encoding-indexes' in global))
- return;
- encodings.forEach(function(category) {
- if (category.heading !== 'Legacy single-byte encodings')
- return;
- category.encodings.forEach(function(encoding) {
- var name = encoding.name;
- var idx = index(name.toLowerCase());
- /** @param {{fatal: boolean}} options */
- decoders[name] = function(options) {
- return new SingleByteDecoder(idx, options);
- };
- /** @param {{fatal: boolean}} options */
- encoders[name] = function(options) {
- return new SingleByteEncoder(idx, options);
- };
- });
- });
- }());
-
- //
- // 11. Legacy multi-byte Chinese (simplified) encodings
- //
-
- // 11.1 gbk
-
- // 11.1.1 gbk decoder
- // gbk's decoder is gb18030's decoder.
- /** @param {{fatal: boolean}} options */
- decoders['GBK'] = function(options) {
- return new GB18030Decoder(options);
- };
-
- // 11.1.2 gbk encoder
- // gbk's encoder is gb18030's encoder with its gbk flag set.
- /** @param {{fatal: boolean}} options */
- encoders['GBK'] = function(options) {
- return new GB18030Encoder(options, true);
- };
-
- // 11.2 gb18030
-
- // 11.2.1 gb18030 decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function GB18030Decoder(options) {
- var fatal = options.fatal;
- // gb18030's decoder has an associated gb18030 first, gb18030
- // second, and gb18030 third (all initially 0x00).
- var /** @type {number} */ gb18030_first = 0x00,
- /** @type {number} */ gb18030_second = 0x00,
- /** @type {number} */ gb18030_third = 0x00;
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream and gb18030 first, gb18030
- // second, and gb18030 third are 0x00, return finished.
- if (bite === end_of_stream && gb18030_first === 0x00 &&
- gb18030_second === 0x00 && gb18030_third === 0x00) {
- return finished;
- }
- // 2. If byte is end-of-stream, and gb18030 first, gb18030
- // second, or gb18030 third is not 0x00, set gb18030 first,
- // gb18030 second, and gb18030 third to 0x00, and return error.
- if (bite === end_of_stream &&
- (gb18030_first !== 0x00 || gb18030_second !== 0x00 ||
- gb18030_third !== 0x00)) {
- gb18030_first = 0x00;
- gb18030_second = 0x00;
- gb18030_third = 0x00;
- decoderError(fatal);
- }
- var code_point;
- // 3. If gb18030 third is not 0x00, run these substeps:
- if (gb18030_third !== 0x00) {
- // 1. Let code point be null.
- code_point = null;
- // 2. If byte is in the range 0x30 to 0x39, inclusive, set
- // code point to the index gb18030 ranges code point for
- // (((gb18030 first − 0x81) × 10 + gb18030 second − 0x30) ×
- // 126 + gb18030 third − 0x81) × 10 + byte − 0x30.
- if (inRange(bite, 0x30, 0x39)) {
- code_point = indexGB18030RangesCodePointFor(
- (((gb18030_first - 0x81) * 10 + gb18030_second - 0x30) * 126 +
- gb18030_third - 0x81) * 10 + bite - 0x30);
- }
-
- // 3. Let buffer be a byte sequence consisting of gb18030
- // second, gb18030 third, and byte, in order.
- var buffer = [gb18030_second, gb18030_third, bite];
-
- // 4. Set gb18030 first, gb18030 second, and gb18030 third to
- // 0x00.
- gb18030_first = 0x00;
- gb18030_second = 0x00;
- gb18030_third = 0x00;
-
- // 5. If code point is null, prepend buffer to stream and
- // return error.
- if (code_point === null) {
- stream.prepend(buffer);
- return decoderError(fatal);
- }
-
- // 6. Return a code point whose value is code point.
- return code_point;
- }
-
- // 4. If gb18030 second is not 0x00, run these substeps:
- if (gb18030_second !== 0x00) {
-
- // 1. If byte is in the range 0x81 to 0xFE, inclusive, set
- // gb18030 third to byte and return continue.
- if (inRange(bite, 0x81, 0xFE)) {
- gb18030_third = bite;
- return null;
- }
-
- // 2. Prepend gb18030 second followed by byte to stream, set
- // gb18030 first and gb18030 second to 0x00, and return error.
- stream.prepend([gb18030_second, bite]);
- gb18030_first = 0x00;
- gb18030_second = 0x00;
- return decoderError(fatal);
- }
-
- // 5. If gb18030 first is not 0x00, run these substeps:
- if (gb18030_first !== 0x00) {
-
- // 1. If byte is in the range 0x30 to 0x39, inclusive, set
- // gb18030 second to byte and return continue.
- if (inRange(bite, 0x30, 0x39)) {
- gb18030_second = bite;
- return null;
- }
-
- // 2. Let lead be gb18030 first, let pointer be null, and set
- // gb18030 first to 0x00.
- var lead = gb18030_first;
- var pointer = null;
- gb18030_first = 0x00;
-
- // 3. Let offset be 0x40 if byte is less than 0x7F and 0x41
- // otherwise.
- var offset = bite < 0x7F ? 0x40 : 0x41;
-
- // 4. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
- // to 0xFE, inclusive, set pointer to (lead − 0x81) × 190 +
- // (byte − offset).
- if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFE))
- pointer = (lead - 0x81) * 190 + (bite - offset);
-
- // 5. Let code point be null if pointer is null and the index
- // code point for pointer in index gb18030 otherwise.
- code_point = pointer === null ? null :
- indexCodePointFor(pointer, index('gb18030'));
-
- // 6. If code point is null and byte is an ASCII byte, prepend
- // byte to stream.
- if (code_point === null && isASCIIByte(bite))
- stream.prepend(bite);
-
- // 7. If code point is null, return error.
- if (code_point === null)
- return decoderError(fatal);
-
- // 8. Return a code point whose value is code point.
- return code_point;
- }
-
- // 6. If byte is an ASCII byte, return a code point whose value
- // is byte.
- if (isASCIIByte(bite))
- return bite;
-
- // 7. If byte is 0x80, return code point U+20AC.
- if (bite === 0x80)
- return 0x20AC;
-
- // 8. If byte is in the range 0x81 to 0xFE, inclusive, set
- // gb18030 first to byte and return continue.
- if (inRange(bite, 0x81, 0xFE)) {
- gb18030_first = bite;
- return null;
- }
-
- // 9. Return error.
- return decoderError(fatal);
- };
- }
-
- // 11.2.2 gb18030 encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- * @param {boolean=} gbk_flag
- */
- function GB18030Encoder(options, gbk_flag) {
- var fatal = options.fatal;
- // gb18030's decoder has an associated gbk flag (initially unset).
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point, return a byte whose
- // value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 3. If code point is U+E5E5, return error with code point.
- if (code_point === 0xE5E5)
- return encoderError(code_point);
-
- // 4. If the gbk flag is set and code point is U+20AC, return
- // byte 0x80.
- if (gbk_flag && code_point === 0x20AC)
- return 0x80;
-
- // 5. Let pointer be the index pointer for code point in index
- // gb18030.
- var pointer = indexPointerFor(code_point, index('gb18030'));
-
- // 6. If pointer is not null, run these substeps:
- if (pointer !== null) {
-
- // 1. Let lead be floor(pointer / 190) + 0x81.
- var lead = floor(pointer / 190) + 0x81;
-
- // 2. Let trail be pointer % 190.
- var trail = pointer % 190;
-
- // 3. Let offset be 0x40 if trail is less than 0x3F and 0x41 otherwise.
- var offset = trail < 0x3F ? 0x40 : 0x41;
-
- // 4. Return two bytes whose values are lead and trail + offset.
- return [lead, trail + offset];
- }
-
- // 7. If gbk flag is set, return error with code point.
- if (gbk_flag)
- return encoderError(code_point);
-
- // 8. Set pointer to the index gb18030 ranges pointer for code
- // point.
- pointer = indexGB18030RangesPointerFor(code_point);
-
- // 9. Let byte1 be floor(pointer / 10 / 126 / 10).
- var byte1 = floor(pointer / 10 / 126 / 10);
-
- // 10. Set pointer to pointer − byte1 × 10 × 126 × 10.
- pointer = pointer - byte1 * 10 * 126 * 10;
-
- // 11. Let byte2 be floor(pointer / 10 / 126).
- var byte2 = floor(pointer / 10 / 126);
-
- // 12. Set pointer to pointer − byte2 × 10 × 126.
- pointer = pointer - byte2 * 10 * 126;
-
- // 13. Let byte3 be floor(pointer / 10).
- var byte3 = floor(pointer / 10);
-
- // 14. Let byte4 be pointer − byte3 × 10.
- var byte4 = pointer - byte3 * 10;
-
- // 15. Return four bytes whose values are byte1 + 0x81, byte2 +
- // 0x30, byte3 + 0x81, byte4 + 0x30.
- return [byte1 + 0x81,
- byte2 + 0x30,
- byte3 + 0x81,
- byte4 + 0x30];
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['gb18030'] = function(options) {
- return new GB18030Encoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['gb18030'] = function(options) {
- return new GB18030Decoder(options);
- };
-
-
- //
- // 12. Legacy multi-byte Chinese (traditional) encodings
- //
-
- // 12.1 Big5
-
- // 12.1.1 Big5 decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function Big5Decoder(options) {
- var fatal = options.fatal;
- // Big5's decoder has an associated Big5 lead (initially 0x00).
- var /** @type {number} */ Big5_lead = 0x00;
-
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream and Big5 lead is not 0x00, set
- // Big5 lead to 0x00 and return error.
- if (bite === end_of_stream && Big5_lead !== 0x00) {
- Big5_lead = 0x00;
- return decoderError(fatal);
- }
-
- // 2. If byte is end-of-stream and Big5 lead is 0x00, return
- // finished.
- if (bite === end_of_stream && Big5_lead === 0x00)
- return finished;
-
- // 3. If Big5 lead is not 0x00, let lead be Big5 lead, let
- // pointer be null, set Big5 lead to 0x00, and then run these
- // substeps:
- if (Big5_lead !== 0x00) {
- var lead = Big5_lead;
- var pointer = null;
- Big5_lead = 0x00;
-
- // 1. Let offset be 0x40 if byte is less than 0x7F and 0x62
- // otherwise.
- var offset = bite < 0x7F ? 0x40 : 0x62;
-
- // 2. If byte is in the range 0x40 to 0x7E, inclusive, or 0xA1
- // to 0xFE, inclusive, set pointer to (lead − 0x81) × 157 +
- // (byte − offset).
- if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0xA1, 0xFE))
- pointer = (lead - 0x81) * 157 + (bite - offset);
-
- // 3. If there is a row in the table below whose first column
- // is pointer, return the two code points listed in its second
- // column
- // Pointer | Code points
- // --------+--------------
- // 1133 | U+00CA U+0304
- // 1135 | U+00CA U+030C
- // 1164 | U+00EA U+0304
- // 1166 | U+00EA U+030C
- switch (pointer) {
- case 1133: return [0x00CA, 0x0304];
- case 1135: return [0x00CA, 0x030C];
- case 1164: return [0x00EA, 0x0304];
- case 1166: return [0x00EA, 0x030C];
- }
-
- // 4. Let code point be null if pointer is null and the index
- // code point for pointer in index Big5 otherwise.
- var code_point = (pointer === null) ? null :
- indexCodePointFor(pointer, index('big5'));
-
- // 5. If code point is null and byte is an ASCII byte, prepend
- // byte to stream.
- if (code_point === null && isASCIIByte(bite))
- stream.prepend(bite);
-
- // 6. If code point is null, return error.
- if (code_point === null)
- return decoderError(fatal);
-
- // 7. Return a code point whose value is code point.
- return code_point;
- }
-
- // 4. If byte is an ASCII byte, return a code point whose value
- // is byte.
- if (isASCIIByte(bite))
- return bite;
-
- // 5. If byte is in the range 0x81 to 0xFE, inclusive, set Big5
- // lead to byte and return continue.
- if (inRange(bite, 0x81, 0xFE)) {
- Big5_lead = bite;
- return null;
- }
-
- // 6. Return error.
- return decoderError(fatal);
- };
- }
-
- // 12.1.2 Big5 encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- */
- function Big5Encoder(options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point, return a byte whose
- // value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 3. Let pointer be the index Big5 pointer for code point.
- var pointer = indexBig5PointerFor(code_point);
-
- // 4. If pointer is null, return error with code point.
- if (pointer === null)
- return encoderError(code_point);
-
- // 5. Let lead be floor(pointer / 157) + 0x81.
- var lead = floor(pointer / 157) + 0x81;
-
- // 6. If lead is less than 0xA1, return error with code point.
- if (lead < 0xA1)
- return encoderError(code_point);
-
- // 7. Let trail be pointer % 157.
- var trail = pointer % 157;
-
- // 8. Let offset be 0x40 if trail is less than 0x3F and 0x62
- // otherwise.
- var offset = trail < 0x3F ? 0x40 : 0x62;
-
- // Return two bytes whose values are lead and trail + offset.
- return [lead, trail + offset];
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['Big5'] = function(options) {
- return new Big5Encoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['Big5'] = function(options) {
- return new Big5Decoder(options);
- };
-
-
- //
- // 13. Legacy multi-byte Japanese encodings
- //
-
- // 13.1 euc-jp
-
- // 13.1.1 euc-jp decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function EUCJPDecoder(options) {
- var fatal = options.fatal;
-
- // euc-jp's decoder has an associated euc-jp jis0212 flag
- // (initially unset) and euc-jp lead (initially 0x00).
- var /** @type {boolean} */ eucjp_jis0212_flag = false,
- /** @type {number} */ eucjp_lead = 0x00;
-
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream and euc-jp lead is not 0x00, set
- // euc-jp lead to 0x00, and return error.
- if (bite === end_of_stream && eucjp_lead !== 0x00) {
- eucjp_lead = 0x00;
- return decoderError(fatal);
- }
-
- // 2. If byte is end-of-stream and euc-jp lead is 0x00, return
- // finished.
- if (bite === end_of_stream && eucjp_lead === 0x00)
- return finished;
-
- // 3. If euc-jp lead is 0x8E and byte is in the range 0xA1 to
- // 0xDF, inclusive, set euc-jp lead to 0x00 and return a code
- // point whose value is 0xFF61 − 0xA1 + byte.
- if (eucjp_lead === 0x8E && inRange(bite, 0xA1, 0xDF)) {
- eucjp_lead = 0x00;
- return 0xFF61 - 0xA1 + bite;
- }
-
- // 4. If euc-jp lead is 0x8F and byte is in the range 0xA1 to
- // 0xFE, inclusive, set the euc-jp jis0212 flag, set euc-jp lead
- // to byte, and return continue.
- if (eucjp_lead === 0x8F && inRange(bite, 0xA1, 0xFE)) {
- eucjp_jis0212_flag = true;
- eucjp_lead = bite;
- return null;
- }
-
- // 5. If euc-jp lead is not 0x00, let lead be euc-jp lead, set
- // euc-jp lead to 0x00, and run these substeps:
- if (eucjp_lead !== 0x00) {
- var lead = eucjp_lead;
- eucjp_lead = 0x00;
-
- // 1. Let code point be null.
- var code_point = null;
-
- // 2. If lead and byte are both in the range 0xA1 to 0xFE,
- // inclusive, set code point to the index code point for (lead
- // − 0xA1) × 94 + byte − 0xA1 in index jis0208 if the euc-jp
- // jis0212 flag is unset and in index jis0212 otherwise.
- if (inRange(lead, 0xA1, 0xFE) && inRange(bite, 0xA1, 0xFE)) {
- code_point = indexCodePointFor(
- (lead - 0xA1) * 94 + (bite - 0xA1),
- index(!eucjp_jis0212_flag ? 'jis0208' : 'jis0212'));
- }
-
- // 3. Unset the euc-jp jis0212 flag.
- eucjp_jis0212_flag = false;
-
- // 4. If byte is not in the range 0xA1 to 0xFE, inclusive,
- // prepend byte to stream.
- if (!inRange(bite, 0xA1, 0xFE))
- stream.prepend(bite);
-
- // 5. If code point is null, return error.
- if (code_point === null)
- return decoderError(fatal);
-
- // 6. Return a code point whose value is code point.
- return code_point;
- }
-
- // 6. If byte is an ASCII byte, return a code point whose value
- // is byte.
- if (isASCIIByte(bite))
- return bite;
-
- // 7. If byte is 0x8E, 0x8F, or in the range 0xA1 to 0xFE,
- // inclusive, set euc-jp lead to byte and return continue.
- if (bite === 0x8E || bite === 0x8F || inRange(bite, 0xA1, 0xFE)) {
- eucjp_lead = bite;
- return null;
- }
-
- // 8. Return error.
- return decoderError(fatal);
- };
- }
-
- // 13.1.2 euc-jp encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- */
- function EUCJPEncoder(options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point, return a byte whose
- // value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 3. If code point is U+00A5, return byte 0x5C.
- if (code_point === 0x00A5)
- return 0x5C;
-
- // 4. If code point is U+203E, return byte 0x7E.
- if (code_point === 0x203E)
- return 0x7E;
-
- // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
- // return two bytes whose values are 0x8E and code point −
- // 0xFF61 + 0xA1.
- if (inRange(code_point, 0xFF61, 0xFF9F))
- return [0x8E, code_point - 0xFF61 + 0xA1];
-
- // 6. If code point is U+2212, set it to U+FF0D.
- if (code_point === 0x2212)
- code_point = 0xFF0D;
-
- // 7. Let pointer be the index pointer for code point in index
- // jis0208.
- var pointer = indexPointerFor(code_point, index('jis0208'));
-
- // 8. If pointer is null, return error with code point.
- if (pointer === null)
- return encoderError(code_point);
-
- // 9. Let lead be floor(pointer / 94) + 0xA1.
- var lead = floor(pointer / 94) + 0xA1;
-
- // 10. Let trail be pointer % 94 + 0xA1.
- var trail = pointer % 94 + 0xA1;
-
- // 11. Return two bytes whose values are lead and trail.
- return [lead, trail];
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['EUC-JP'] = function(options) {
- return new EUCJPEncoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['EUC-JP'] = function(options) {
- return new EUCJPDecoder(options);
- };
-
- // 13.2 iso-2022-jp
-
- // 13.2.1 iso-2022-jp decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function ISO2022JPDecoder(options) {
- var fatal = options.fatal;
- /** @enum */
- var states = {
- ASCII: 0,
- Roman: 1,
- Katakana: 2,
- LeadByte: 3,
- TrailByte: 4,
- EscapeStart: 5,
- Escape: 6
- };
- // iso-2022-jp's decoder has an associated iso-2022-jp decoder
- // state (initially ASCII), iso-2022-jp decoder output state
- // (initially ASCII), iso-2022-jp lead (initially 0x00), and
- // iso-2022-jp output flag (initially unset).
- var /** @type {number} */ iso2022jp_decoder_state = states.ASCII,
- /** @type {number} */ iso2022jp_decoder_output_state = states.ASCII,
- /** @type {number} */ iso2022jp_lead = 0x00,
- /** @type {boolean} */ iso2022jp_output_flag = false;
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // switching on iso-2022-jp decoder state:
- switch (iso2022jp_decoder_state) {
- default:
- case states.ASCII:
- // ASCII
- // Based on byte:
-
- // 0x1B
- if (bite === 0x1B) {
- // Set iso-2022-jp decoder state to escape start and return
- // continue.
- iso2022jp_decoder_state = states.EscapeStart;
- return null;
- }
-
- // 0x00 to 0x7F, excluding 0x0E, 0x0F, and 0x1B
- if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E
- && bite !== 0x0F && bite !== 0x1B) {
- // Unset the iso-2022-jp output flag and return a code point
- // whose value is byte.
- iso2022jp_output_flag = false;
- return bite;
- }
-
- // end-of-stream
- if (bite === end_of_stream) {
- // Return finished.
- return finished;
- }
-
- // Otherwise
- // Unset the iso-2022-jp output flag and return error.
- iso2022jp_output_flag = false;
- return decoderError(fatal);
-
- case states.Roman:
- // Roman
- // Based on byte:
-
- // 0x1B
- if (bite === 0x1B) {
- // Set iso-2022-jp decoder state to escape start and return
- // continue.
- iso2022jp_decoder_state = states.EscapeStart;
- return null;
- }
-
- // 0x5C
- if (bite === 0x5C) {
- // Unset the iso-2022-jp output flag and return code point
- // U+00A5.
- iso2022jp_output_flag = false;
- return 0x00A5;
- }
-
- // 0x7E
- if (bite === 0x7E) {
- // Unset the iso-2022-jp output flag and return code point
- // U+203E.
- iso2022jp_output_flag = false;
- return 0x203E;
- }
-
- // 0x00 to 0x7F, excluding 0x0E, 0x0F, 0x1B, 0x5C, and 0x7E
- if (inRange(bite, 0x00, 0x7F) && bite !== 0x0E && bite !== 0x0F
- && bite !== 0x1B && bite !== 0x5C && bite !== 0x7E) {
- // Unset the iso-2022-jp output flag and return a code point
- // whose value is byte.
- iso2022jp_output_flag = false;
- return bite;
- }
-
- // end-of-stream
- if (bite === end_of_stream) {
- // Return finished.
- return finished;
- }
-
- // Otherwise
- // Unset the iso-2022-jp output flag and return error.
- iso2022jp_output_flag = false;
- return decoderError(fatal);
-
- case states.Katakana:
- // Katakana
- // Based on byte:
-
- // 0x1B
- if (bite === 0x1B) {
- // Set iso-2022-jp decoder state to escape start and return
- // continue.
- iso2022jp_decoder_state = states.EscapeStart;
- return null;
- }
-
- // 0x21 to 0x5F
- if (inRange(bite, 0x21, 0x5F)) {
- // Unset the iso-2022-jp output flag and return a code point
- // whose value is 0xFF61 − 0x21 + byte.
- iso2022jp_output_flag = false;
- return 0xFF61 - 0x21 + bite;
- }
-
- // end-of-stream
- if (bite === end_of_stream) {
- // Return finished.
- return finished;
- }
-
- // Otherwise
- // Unset the iso-2022-jp output flag and return error.
- iso2022jp_output_flag = false;
- return decoderError(fatal);
-
- case states.LeadByte:
- // Lead byte
- // Based on byte:
-
- // 0x1B
- if (bite === 0x1B) {
- // Set iso-2022-jp decoder state to escape start and return
- // continue.
- iso2022jp_decoder_state = states.EscapeStart;
- return null;
- }
-
- // 0x21 to 0x7E
- if (inRange(bite, 0x21, 0x7E)) {
- // Unset the iso-2022-jp output flag, set iso-2022-jp lead
- // to byte, iso-2022-jp decoder state to trail byte, and
- // return continue.
- iso2022jp_output_flag = false;
- iso2022jp_lead = bite;
- iso2022jp_decoder_state = states.TrailByte;
- return null;
- }
-
- // end-of-stream
- if (bite === end_of_stream) {
- // Return finished.
- return finished;
- }
-
- // Otherwise
- // Unset the iso-2022-jp output flag and return error.
- iso2022jp_output_flag = false;
- return decoderError(fatal);
-
- case states.TrailByte:
- // Trail byte
- // Based on byte:
-
- // 0x1B
- if (bite === 0x1B) {
- // Set iso-2022-jp decoder state to escape start and return
- // continue.
- iso2022jp_decoder_state = states.EscapeStart;
- return decoderError(fatal);
- }
-
- // 0x21 to 0x7E
- if (inRange(bite, 0x21, 0x7E)) {
- // 1. Set the iso-2022-jp decoder state to lead byte.
- iso2022jp_decoder_state = states.LeadByte;
-
- // 2. Let pointer be (iso-2022-jp lead − 0x21) × 94 + byte − 0x21.
- var pointer = (iso2022jp_lead - 0x21) * 94 + bite - 0x21;
-
- // 3. Let code point be the index code point for pointer in
- // index jis0208.
- var code_point = indexCodePointFor(pointer, index('jis0208'));
-
- // 4. If code point is null, return error.
- if (code_point === null)
- return decoderError(fatal);
-
- // 5. Return a code point whose value is code point.
- return code_point;
- }
-
- // end-of-stream
- if (bite === end_of_stream) {
- // Set the iso-2022-jp decoder state to lead byte, prepend
- // byte to stream, and return error.
- iso2022jp_decoder_state = states.LeadByte;
- stream.prepend(bite);
- return decoderError(fatal);
- }
-
- // Otherwise
- // Set iso-2022-jp decoder state to lead byte and return
- // error.
- iso2022jp_decoder_state = states.LeadByte;
- return decoderError(fatal);
-
- case states.EscapeStart:
- // Escape start
-
- // 1. If byte is either 0x24 or 0x28, set iso-2022-jp lead to
- // byte, iso-2022-jp decoder state to escape, and return
- // continue.
- if (bite === 0x24 || bite === 0x28) {
- iso2022jp_lead = bite;
- iso2022jp_decoder_state = states.Escape;
- return null;
- }
-
- // 2. Prepend byte to stream.
- stream.prepend(bite);
-
- // 3. Unset the iso-2022-jp output flag, set iso-2022-jp
- // decoder state to iso-2022-jp decoder output state, and
- // return error.
- iso2022jp_output_flag = false;
- iso2022jp_decoder_state = iso2022jp_decoder_output_state;
- return decoderError(fatal);
-
- case states.Escape:
- // Escape
-
- // 1. Let lead be iso-2022-jp lead and set iso-2022-jp lead to
- // 0x00.
- var lead = iso2022jp_lead;
- iso2022jp_lead = 0x00;
-
- // 2. Let state be null.
- var state = null;
-
- // 3. If lead is 0x28 and byte is 0x42, set state to ASCII.
- if (lead === 0x28 && bite === 0x42)
- state = states.ASCII;
-
- // 4. If lead is 0x28 and byte is 0x4A, set state to Roman.
- if (lead === 0x28 && bite === 0x4A)
- state = states.Roman;
-
- // 5. If lead is 0x28 and byte is 0x49, set state to Katakana.
- if (lead === 0x28 && bite === 0x49)
- state = states.Katakana;
-
- // 6. If lead is 0x24 and byte is either 0x40 or 0x42, set
- // state to lead byte.
- if (lead === 0x24 && (bite === 0x40 || bite === 0x42))
- state = states.LeadByte;
-
- // 7. If state is non-null, run these substeps:
- if (state !== null) {
- // 1. Set iso-2022-jp decoder state and iso-2022-jp decoder
- // output state to states.
- iso2022jp_decoder_state = iso2022jp_decoder_state = state;
-
- // 2. Let output flag be the iso-2022-jp output flag.
- var output_flag = iso2022jp_output_flag;
-
- // 3. Set the iso-2022-jp output flag.
- iso2022jp_output_flag = true;
-
- // 4. Return continue, if output flag is unset, and error
- // otherwise.
- return !output_flag ? null : decoderError(fatal);
- }
-
- // 8. Prepend lead and byte to stream.
- stream.prepend([lead, bite]);
-
- // 9. Unset the iso-2022-jp output flag, set iso-2022-jp
- // decoder state to iso-2022-jp decoder output state and
- // return error.
- iso2022jp_output_flag = false;
- iso2022jp_decoder_state = iso2022jp_decoder_output_state;
- return decoderError(fatal);
- }
- };
- }
-
- // 13.2.2 iso-2022-jp encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- */
- function ISO2022JPEncoder(options) {
- var fatal = options.fatal;
- // iso-2022-jp's encoder has an associated iso-2022-jp encoder
- // state which is one of ASCII, Roman, and jis0208 (initially
- // ASCII).
- /** @enum */
- var states = {
- ASCII: 0,
- Roman: 1,
- jis0208: 2
- };
- var /** @type {number} */ iso2022jp_state = states.ASCII;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream and iso-2022-jp encoder
- // state is not ASCII, prepend code point to stream, set
- // iso-2022-jp encoder state to ASCII, and return three bytes
- // 0x1B 0x28 0x42.
- if (code_point === end_of_stream &&
- iso2022jp_state !== states.ASCII) {
- stream.prepend(code_point);
- iso2022jp_state = states.ASCII;
- return [0x1B, 0x28, 0x42];
- }
-
- // 2. If code point is end-of-stream and iso-2022-jp encoder
- // state is ASCII, return finished.
- if (code_point === end_of_stream && iso2022jp_state === states.ASCII)
- return finished;
-
- // 3. If ISO-2022-JP encoder state is ASCII or Roman, and code
- // point is U+000E, U+000F, or U+001B, return error with U+FFFD.
- if ((iso2022jp_state === states.ASCII ||
- iso2022jp_state === states.Roman) &&
- (code_point === 0x000E || code_point === 0x000F ||
- code_point === 0x001B)) {
- return encoderError(0xFFFD);
- }
-
- // 4. If iso-2022-jp encoder state is ASCII and code point is an
- // ASCII code point, return a byte whose value is code point.
- if (iso2022jp_state === states.ASCII &&
- isASCIICodePoint(code_point))
- return code_point;
-
- // 5. If iso-2022-jp encoder state is Roman and code point is an
- // ASCII code point, excluding U+005C and U+007E, or is U+00A5
- // or U+203E, run these substeps:
- if (iso2022jp_state === states.Roman &&
- ((isASCIICodePoint(code_point) &&
- code_point !== 0x005C && code_point !== 0x007E) ||
- (code_point == 0x00A5 || code_point == 0x203E))) {
-
- // 1. If code point is an ASCII code point, return a byte
- // whose value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 2. If code point is U+00A5, return byte 0x5C.
- if (code_point === 0x00A5)
- return 0x5C;
-
- // 3. If code point is U+203E, return byte 0x7E.
- if (code_point === 0x203E)
- return 0x7E;
- }
-
- // 6. If code point is an ASCII code point, and iso-2022-jp
- // encoder state is not ASCII, prepend code point to stream, set
- // iso-2022-jp encoder state to ASCII, and return three bytes
- // 0x1B 0x28 0x42.
- if (isASCIICodePoint(code_point) &&
- iso2022jp_state !== states.ASCII) {
- stream.prepend(code_point);
- iso2022jp_state = states.ASCII;
- return [0x1B, 0x28, 0x42];
- }
-
- // 7. If code point is either U+00A5 or U+203E, and iso-2022-jp
- // encoder state is not Roman, prepend code point to stream, set
- // iso-2022-jp encoder state to Roman, and return three bytes
- // 0x1B 0x28 0x4A.
- if ((code_point === 0x00A5 || code_point === 0x203E) &&
- iso2022jp_state !== states.Roman) {
- stream.prepend(code_point);
- iso2022jp_state = states.Roman;
- return [0x1B, 0x28, 0x4A];
- }
-
- // 8. If code point is U+2212, set it to U+FF0D.
- if (code_point === 0x2212)
- code_point = 0xFF0D;
-
- // 9. Let pointer be the index pointer for code point in index
- // jis0208.
- var pointer = indexPointerFor(code_point, index('jis0208'));
-
- // 10. If pointer is null, return error with code point.
- if (pointer === null)
- return encoderError(code_point);
-
- // 11. If iso-2022-jp encoder state is not jis0208, prepend code
- // point to stream, set iso-2022-jp encoder state to jis0208,
- // and return three bytes 0x1B 0x24 0x42.
- if (iso2022jp_state !== states.jis0208) {
- stream.prepend(code_point);
- iso2022jp_state = states.jis0208;
- return [0x1B, 0x24, 0x42];
- }
-
- // 12. Let lead be floor(pointer / 94) + 0x21.
- var lead = floor(pointer / 94) + 0x21;
-
- // 13. Let trail be pointer % 94 + 0x21.
- var trail = pointer % 94 + 0x21;
-
- // 14. Return two bytes whose values are lead and trail.
- return [lead, trail];
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['ISO-2022-JP'] = function(options) {
- return new ISO2022JPEncoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['ISO-2022-JP'] = function(options) {
- return new ISO2022JPDecoder(options);
- };
-
- // 13.3 Shift_JIS
-
- // 13.3.1 Shift_JIS decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function ShiftJISDecoder(options) {
- var fatal = options.fatal;
- // Shift_JIS's decoder has an associated Shift_JIS lead (initially
- // 0x00).
- var /** @type {number} */ Shift_JIS_lead = 0x00;
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream and Shift_JIS lead is not 0x00,
- // set Shift_JIS lead to 0x00 and return error.
- if (bite === end_of_stream && Shift_JIS_lead !== 0x00) {
- Shift_JIS_lead = 0x00;
- return decoderError(fatal);
- }
-
- // 2. If byte is end-of-stream and Shift_JIS lead is 0x00,
- // return finished.
- if (bite === end_of_stream && Shift_JIS_lead === 0x00)
- return finished;
-
- // 3. If Shift_JIS lead is not 0x00, let lead be Shift_JIS lead,
- // let pointer be null, set Shift_JIS lead to 0x00, and then run
- // these substeps:
- if (Shift_JIS_lead !== 0x00) {
- var lead = Shift_JIS_lead;
- var pointer = null;
- Shift_JIS_lead = 0x00;
-
- // 1. Let offset be 0x40, if byte is less than 0x7F, and 0x41
- // otherwise.
- var offset = (bite < 0x7F) ? 0x40 : 0x41;
-
- // 2. Let lead offset be 0x81, if lead is less than 0xA0, and
- // 0xC1 otherwise.
- var lead_offset = (lead < 0xA0) ? 0x81 : 0xC1;
-
- // 3. If byte is in the range 0x40 to 0x7E, inclusive, or 0x80
- // to 0xFC, inclusive, set pointer to (lead − lead offset) ×
- // 188 + byte − offset.
- if (inRange(bite, 0x40, 0x7E) || inRange(bite, 0x80, 0xFC))
- pointer = (lead - lead_offset) * 188 + bite - offset;
-
- // 4. If pointer is in the range 8836 to 10715, inclusive,
- // return a code point whose value is 0xE000 − 8836 + pointer.
- if (inRange(pointer, 8836, 10715))
- return 0xE000 - 8836 + pointer;
-
- // 5. Let code point be null, if pointer is null, and the
- // index code point for pointer in index jis0208 otherwise.
- var code_point = (pointer === null) ? null :
- indexCodePointFor(pointer, index('jis0208'));
-
- // 6. If code point is null and byte is an ASCII byte, prepend
- // byte to stream.
- if (code_point === null && isASCIIByte(bite))
- stream.prepend(bite);
-
- // 7. If code point is null, return error.
- if (code_point === null)
- return decoderError(fatal);
-
- // 8. Return a code point whose value is code point.
- return code_point;
- }
-
- // 4. If byte is an ASCII byte or 0x80, return a code point
- // whose value is byte.
- if (isASCIIByte(bite) || bite === 0x80)
- return bite;
-
- // 5. If byte is in the range 0xA1 to 0xDF, inclusive, return a
- // code point whose value is 0xFF61 − 0xA1 + byte.
- if (inRange(bite, 0xA1, 0xDF))
- return 0xFF61 - 0xA1 + bite;
-
- // 6. If byte is in the range 0x81 to 0x9F, inclusive, or 0xE0
- // to 0xFC, inclusive, set Shift_JIS lead to byte and return
- // continue.
- if (inRange(bite, 0x81, 0x9F) || inRange(bite, 0xE0, 0xFC)) {
- Shift_JIS_lead = bite;
- return null;
- }
-
- // 7. Return error.
- return decoderError(fatal);
- };
- }
-
- // 13.3.2 Shift_JIS encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- */
- function ShiftJISEncoder(options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point or U+0080, return a
- // byte whose value is code point.
- if (isASCIICodePoint(code_point) || code_point === 0x0080)
- return code_point;
-
- // 3. If code point is U+00A5, return byte 0x5C.
- if (code_point === 0x00A5)
- return 0x5C;
-
- // 4. If code point is U+203E, return byte 0x7E.
- if (code_point === 0x203E)
- return 0x7E;
-
- // 5. If code point is in the range U+FF61 to U+FF9F, inclusive,
- // return a byte whose value is code point − 0xFF61 + 0xA1.
- if (inRange(code_point, 0xFF61, 0xFF9F))
- return code_point - 0xFF61 + 0xA1;
-
- // 6. If code point is U+2212, set it to U+FF0D.
- if (code_point === 0x2212)
- code_point = 0xFF0D;
-
- // 7. Let pointer be the index Shift_JIS pointer for code point.
- var pointer = indexShiftJISPointerFor(code_point);
-
- // 8. If pointer is null, return error with code point.
- if (pointer === null)
- return encoderError(code_point);
-
- // 9. Let lead be floor(pointer / 188).
- var lead = floor(pointer / 188);
-
- // 10. Let lead offset be 0x81, if lead is less than 0x1F, and
- // 0xC1 otherwise.
- var lead_offset = (lead < 0x1F) ? 0x81 : 0xC1;
-
- // 11. Let trail be pointer % 188.
- var trail = pointer % 188;
-
- // 12. Let offset be 0x40, if trail is less than 0x3F, and 0x41
- // otherwise.
- var offset = (trail < 0x3F) ? 0x40 : 0x41;
-
- // 13. Return two bytes whose values are lead + lead offset and
- // trail + offset.
- return [lead + lead_offset, trail + offset];
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['Shift_JIS'] = function(options) {
- return new ShiftJISEncoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['Shift_JIS'] = function(options) {
- return new ShiftJISDecoder(options);
- };
-
- //
- // 14. Legacy multi-byte Korean encodings
- //
-
- // 14.1 euc-kr
-
- // 14.1.1 euc-kr decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function EUCKRDecoder(options) {
- var fatal = options.fatal;
-
- // euc-kr's decoder has an associated euc-kr lead (initially 0x00).
- var /** @type {number} */ euckr_lead = 0x00;
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream and euc-kr lead is not 0x00, set
- // euc-kr lead to 0x00 and return error.
- if (bite === end_of_stream && euckr_lead !== 0) {
- euckr_lead = 0x00;
- return decoderError(fatal);
- }
-
- // 2. If byte is end-of-stream and euc-kr lead is 0x00, return
- // finished.
- if (bite === end_of_stream && euckr_lead === 0)
- return finished;
-
- // 3. If euc-kr lead is not 0x00, let lead be euc-kr lead, let
- // pointer be null, set euc-kr lead to 0x00, and then run these
- // substeps:
- if (euckr_lead !== 0x00) {
- var lead = euckr_lead;
- var pointer = null;
- euckr_lead = 0x00;
-
- // 1. If byte is in the range 0x41 to 0xFE, inclusive, set
- // pointer to (lead − 0x81) × 190 + (byte − 0x41).
- if (inRange(bite, 0x41, 0xFE))
- pointer = (lead - 0x81) * 190 + (bite - 0x41);
-
- // 2. Let code point be null, if pointer is null, and the
- // index code point for pointer in index euc-kr otherwise.
- var code_point = (pointer === null)
- ? null : indexCodePointFor(pointer, index('euc-kr'));
-
- // 3. If code point is null and byte is an ASCII byte, prepend
- // byte to stream.
- if (pointer === null && isASCIIByte(bite))
- stream.prepend(bite);
-
- // 4. If code point is null, return error.
- if (code_point === null)
- return decoderError(fatal);
-
- // 5. Return a code point whose value is code point.
- return code_point;
- }
-
- // 4. If byte is an ASCII byte, return a code point whose value
- // is byte.
- if (isASCIIByte(bite))
- return bite;
-
- // 5. If byte is in the range 0x81 to 0xFE, inclusive, set
- // euc-kr lead to byte and return continue.
- if (inRange(bite, 0x81, 0xFE)) {
- euckr_lead = bite;
- return null;
- }
-
- // 6. Return error.
- return decoderError(fatal);
- };
- }
-
- // 14.1.2 euc-kr encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- */
- function EUCKREncoder(options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point, return a byte whose
- // value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 3. Let pointer be the index pointer for code point in index
- // euc-kr.
- var pointer = indexPointerFor(code_point, index('euc-kr'));
-
- // 4. If pointer is null, return error with code point.
- if (pointer === null)
- return encoderError(code_point);
-
- // 5. Let lead be floor(pointer / 190) + 0x81.
- var lead = floor(pointer / 190) + 0x81;
-
- // 6. Let trail be pointer % 190 + 0x41.
- var trail = (pointer % 190) + 0x41;
-
- // 7. Return two bytes whose values are lead and trail.
- return [lead, trail];
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['EUC-KR'] = function(options) {
- return new EUCKREncoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['EUC-KR'] = function(options) {
- return new EUCKRDecoder(options);
- };
-
-
- //
- // 15. Legacy miscellaneous encodings
- //
-
- // 15.1 replacement
-
- // Not needed - API throws RangeError
-
- // 15.2 Common infrastructure for utf-16be and utf-16le
-
- /**
- * @param {number} code_unit
- * @param {boolean} utf16be
- * @return {!Array.} bytes
- */
- function convertCodeUnitToBytes(code_unit, utf16be) {
- // 1. Let byte1 be code unit >> 8.
- var byte1 = code_unit >> 8;
-
- // 2. Let byte2 be code unit & 0x00FF.
- var byte2 = code_unit & 0x00FF;
-
- // 3. Then return the bytes in order:
- // utf-16be flag is set: byte1, then byte2.
- if (utf16be)
- return [byte1, byte2];
- // utf-16be flag is unset: byte2, then byte1.
- return [byte2, byte1];
- }
-
- // 15.2.1 shared utf-16 decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {boolean} utf16_be True if big-endian, false if little-endian.
- * @param {{fatal: boolean}} options
- */
- function UTF16Decoder(utf16_be, options) {
- var fatal = options.fatal;
- var /** @type {?number} */ utf16_lead_byte = null,
- /** @type {?number} */ utf16_lead_surrogate = null;
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream and either utf-16 lead byte or
- // utf-16 lead surrogate is not null, set utf-16 lead byte and
- // utf-16 lead surrogate to null, and return error.
- if (bite === end_of_stream && (utf16_lead_byte !== null ||
- utf16_lead_surrogate !== null)) {
- return decoderError(fatal);
- }
-
- // 2. If byte is end-of-stream and utf-16 lead byte and utf-16
- // lead surrogate are null, return finished.
- if (bite === end_of_stream && utf16_lead_byte === null &&
- utf16_lead_surrogate === null) {
- return finished;
- }
-
- // 3. If utf-16 lead byte is null, set utf-16 lead byte to byte
- // and return continue.
- if (utf16_lead_byte === null) {
- utf16_lead_byte = bite;
- return null;
- }
-
- // 4. Let code unit be the result of:
- var code_unit;
- if (utf16_be) {
- // utf-16be decoder flag is set
- // (utf-16 lead byte << 8) + byte.
- code_unit = (utf16_lead_byte << 8) + bite;
- } else {
- // utf-16be decoder flag is unset
- // (byte << 8) + utf-16 lead byte.
- code_unit = (bite << 8) + utf16_lead_byte;
- }
- // Then set utf-16 lead byte to null.
- utf16_lead_byte = null;
-
- // 5. If utf-16 lead surrogate is not null, let lead surrogate
- // be utf-16 lead surrogate, set utf-16 lead surrogate to null,
- // and then run these substeps:
- if (utf16_lead_surrogate !== null) {
- var lead_surrogate = utf16_lead_surrogate;
- utf16_lead_surrogate = null;
-
- // 1. If code unit is in the range U+DC00 to U+DFFF,
- // inclusive, return a code point whose value is 0x10000 +
- // ((lead surrogate − 0xD800) << 10) + (code unit − 0xDC00).
- if (inRange(code_unit, 0xDC00, 0xDFFF)) {
- return 0x10000 + (lead_surrogate - 0xD800) * 0x400 +
- (code_unit - 0xDC00);
- }
-
- // 2. Prepend the sequence resulting of converting code unit
- // to bytes using utf-16be decoder flag to stream and return
- // error.
- stream.prepend(convertCodeUnitToBytes(code_unit, utf16_be));
- return decoderError(fatal);
- }
-
- // 6. If code unit is in the range U+D800 to U+DBFF, inclusive,
- // set utf-16 lead surrogate to code unit and return continue.
- if (inRange(code_unit, 0xD800, 0xDBFF)) {
- utf16_lead_surrogate = code_unit;
- return null;
- }
-
- // 7. If code unit is in the range U+DC00 to U+DFFF, inclusive,
- // return error.
- if (inRange(code_unit, 0xDC00, 0xDFFF))
- return decoderError(fatal);
-
- // 8. Return code point code unit.
- return code_unit;
- };
- }
-
- // 15.2.2 shared utf-16 encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {boolean} utf16_be True if big-endian, false if little-endian.
- * @param {{fatal: boolean}} options
- */
- function UTF16Encoder(utf16_be, options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1. If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is in the range U+0000 to U+FFFF, inclusive,
- // return the sequence resulting of converting code point to
- // bytes using utf-16be encoder flag.
- if (inRange(code_point, 0x0000, 0xFFFF))
- return convertCodeUnitToBytes(code_point, utf16_be);
-
- // 3. Let lead be ((code point − 0x10000) >> 10) + 0xD800,
- // converted to bytes using utf-16be encoder flag.
- var lead = convertCodeUnitToBytes(
- ((code_point - 0x10000) >> 10) + 0xD800, utf16_be);
-
- // 4. Let trail be ((code point − 0x10000) & 0x3FF) + 0xDC00,
- // converted to bytes using utf-16be encoder flag.
- var trail = convertCodeUnitToBytes(
- ((code_point - 0x10000) & 0x3FF) + 0xDC00, utf16_be);
-
- // 5. Return a byte sequence of lead followed by trail.
- return lead.concat(trail);
- };
- }
-
- // 15.3 utf-16be
- // 15.3.1 utf-16be decoder
- /** @param {{fatal: boolean}} options */
- encoders['UTF-16BE'] = function(options) {
- return new UTF16Encoder(true, options);
- };
- // 15.3.2 utf-16be encoder
- /** @param {{fatal: boolean}} options */
- decoders['UTF-16BE'] = function(options) {
- return new UTF16Decoder(true, options);
- };
-
- // 15.4 utf-16le
- // 15.4.1 utf-16le decoder
- /** @param {{fatal: boolean}} options */
- encoders['UTF-16LE'] = function(options) {
- return new UTF16Encoder(false, options);
- };
- // 15.4.2 utf-16le encoder
- /** @param {{fatal: boolean}} options */
- decoders['UTF-16LE'] = function(options) {
- return new UTF16Decoder(false, options);
- };
-
- // 15.5 x-user-defined
-
- // 15.5.1 x-user-defined decoder
- /**
- * @constructor
- * @implements {Decoder}
- * @param {{fatal: boolean}} options
- */
- function XUserDefinedDecoder(options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream The stream of bytes being decoded.
- * @param {number} bite The next byte read from the stream.
- * @return {?(number|!Array.)} The next code point(s)
- * decoded, or null if not enough data exists in the input
- * stream to decode a complete code point.
- */
- this.handler = function(stream, bite) {
- // 1. If byte is end-of-stream, return finished.
- if (bite === end_of_stream)
- return finished;
-
- // 2. If byte is an ASCII byte, return a code point whose value
- // is byte.
- if (isASCIIByte(bite))
- return bite;
-
- // 3. Return a code point whose value is 0xF780 + byte − 0x80.
- return 0xF780 + bite - 0x80;
- };
- }
-
- // 15.5.2 x-user-defined encoder
- /**
- * @constructor
- * @implements {Encoder}
- * @param {{fatal: boolean}} options
- */
- function XUserDefinedEncoder(options) {
- var fatal = options.fatal;
- /**
- * @param {Stream} stream Input stream.
- * @param {number} code_point Next code point read from the stream.
- * @return {(number|!Array.)} Byte(s) to emit.
- */
- this.handler = function(stream, code_point) {
- // 1.If code point is end-of-stream, return finished.
- if (code_point === end_of_stream)
- return finished;
-
- // 2. If code point is an ASCII code point, return a byte whose
- // value is code point.
- if (isASCIICodePoint(code_point))
- return code_point;
-
- // 3. If code point is in the range U+F780 to U+F7FF, inclusive,
- // return a byte whose value is code point − 0xF780 + 0x80.
- if (inRange(code_point, 0xF780, 0xF7FF))
- return code_point - 0xF780 + 0x80;
-
- // 4. Return error with code point.
- return encoderError(code_point);
- };
- }
-
- /** @param {{fatal: boolean}} options */
- encoders['x-user-defined'] = function(options) {
- return new XUserDefinedEncoder(options);
- };
- /** @param {{fatal: boolean}} options */
- decoders['x-user-defined'] = function(options) {
- return new XUserDefinedDecoder(options);
- };
-
- if (!global['TextEncoder'])
- global['TextEncoder'] = TextEncoder;
- if (!global['TextDecoder'])
- global['TextDecoder'] = TextDecoder;
-
- if (typeof module !== "undefined" && module.exports) {
- module.exports = {
- TextEncoder: global['TextEncoder'],
- TextDecoder: global['TextDecoder'],
- EncodingIndexes: global["encoding-indexes"]
- };
- }
-
-// For strict environments where `this` inside the global scope
-// is `undefined`, take a pure object instead
-}(this || {}));
\ No newline at end of file
diff --git a/web/js/index.js b/web/js/index.js
deleted file mode 100644
index dd16de0..0000000
--- a/web/js/index.js
+++ /dev/null
@@ -1,67 +0,0 @@
-/**
- * Created by harry on 2017/4/21.
- */
-
-window.onresize = function () {
- var dc = $(".device-container");
- dc.css("height", dc.width() * 2);
-};
-
-/**
- * 请求服务器获取
- *
- * return json
- */
-function requestDevices() {
- var ws = new WebSocket("ws://" + server.getServerIp() + ":" + server.getServerPort());
- ws.onopen = function (p1) { ws.send("devices://"); };
- ws.onmessage = function (d) {
- fillDevices(JSON.parse(d.data));
- window.onresize();
- ws.close();
- };
-}
-
-function onDeviceClick(sn, w, h) {
- window.open("device.html?sn=" + sn + "&w=" + w + "&h=" + h);
-};
-
-/**
- * 填充设备列表
- * @param array
- */
-var fillDevices = function(array) {
-
- for (var i in array) {
- var deviceInfo = array[i];
- var innerCanvas = "";
- var html = "" +
- "
" +
- "
" + deviceInfo.sn + "
@" + deviceInfo.w + "x" + deviceInfo.h + "
" +
- "
";
- var dom = $(html);
- $(".container-fluid .row").append(dom);
- }
-};
-
-
-function onServerConfig() {
- var ip = $("#server-ip").val();
- var port = $("#server-port").val();
-
- server.setServerIp(ip);
- server.setServerPort(port);
- $("#settingModal").modal('toggle');
-}
-
-window.onload = function () {
- $("#settingModal").on('show.bs.modal', function (e) {
- $("#server-ip").val(server.getServerIp());
- $("#server-port").val(server.getServerPort());
- });
-
- requestDevices();
-};
-
-
-
diff --git a/web/js/jquery.jsonp.js b/web/js/jquery.jsonp.js
deleted file mode 100644
index 2abeef7..0000000
--- a/web/js/jquery.jsonp.js
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * jQuery JSONP Core Plugin 2.4.0 (2012-08-21)
- *
- * https://github.com/jaubourg/jquery-jsonp
- *
- * Copyright (c) 2012 Julian Aubourg
- *
- * This document is licensed as free software under the terms of the
- * MIT License: http://www.opensource.org/licenses/mit-license.php
- */
-( function( $ ) {
-
- // ###################### UTILITIES ##
-
- // Noop
- function noop() {
- }
-
- // Generic callback
- function genericCallback( data ) {
- lastValue = [ data ];
- }
-
- // Call if defined
- function callIfDefined( method , object , parameters ) {
- return method && method.apply( object.context || object , parameters );
- }
-
- // Give joining character given url
- function qMarkOrAmp( url ) {
- return /\?/ .test( url ) ? "&" : "?";
- }
-
- var // String constants (for better minification)
- STR_ASYNC = "async",
- STR_CHARSET = "charset",
- STR_EMPTY = "",
- STR_ERROR = "error",
- STR_INSERT_BEFORE = "insertBefore",
- STR_JQUERY_JSONP = "_jqjsp",
- STR_ON = "on",
- STR_ON_CLICK = STR_ON + "click",
- STR_ON_ERROR = STR_ON + STR_ERROR,
- STR_ON_LOAD = STR_ON + "load",
- STR_ON_READY_STATE_CHANGE = STR_ON + "readystatechange",
- STR_READY_STATE = "readyState",
- STR_REMOVE_CHILD = "removeChild",
- STR_SCRIPT_TAG = "