diff --git a/vulcano_web/CMakeLists.txt b/vulcano_web/CMakeLists.txt new file mode 100644 index 0000000..b86df9a --- /dev/null +++ b/vulcano_web/CMakeLists.txt @@ -0,0 +1,146 @@ +cmake_minimum_required(VERSION 2.8.3) +project(vulcano_web) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED COMPONENTS + message_runtime + std_srvs + std_msgs + tf + message_generation + cv_bridge +) + + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html + catkin_python_setup() + +####################################### +## Declare ROS messages and services ## +####################################### + +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder + add_service_files( + FILES + RecordVideo.srv + set_controller_options.srv + get_controller_options.srv + ) + +## Generate added messages and services with any dependencies listed here + generate_messages( + DEPENDENCIES + std_msgs + ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if you package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( +# INCLUDE_DIRS include +# LIBRARIES beginner_tutorials + CATKIN_DEPENDS roscpp rospy std_msgs + DEPENDS system_lib python-serial python-sys +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +# include_directories(include) +include_directories( + ${catkin_INCLUDE_DIRS} +) + +## Declare a cpp library +# add_library(beginner_tutorials +# src/${PROJECT_NAME}/beginner_tutorials.cpp +# ) + +## Declare a cpp executable +# add_executable(beginner_tutorials_node src/beginner_tutorials_node.cpp) + +## Add cmake target dependencies of the executable/library +## as an example, message headers may need to be generated before nodes +# add_dependencies(beginner_tutorials_node beginner_tutorials_generate_messages_cpp) + +## Specify libraries to link a library or executable target against +# target_link_libraries(beginner_tutorials_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination + install(PROGRAMS + scripts/vulcano_web/start_recording_server.py + #src/start_recording_server.py + #launch/vulcano_web.launch + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} + + ) + +## Mark executables and/or libraries for installation +# install(TARGETS beginner_tutorials beginner_tutorials_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) + install(FILES + launch/vulcano_web.launch + #scripts/start_recording_server.py + #src/start_recording_server.py + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} + ) + + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_beginner_tutorials.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/vulcano_web/css_files/bootOver.css b/vulcano_web/css_files/bootOver.css new file mode 100755 index 0000000..afb53f3 --- /dev/null +++ b/vulcano_web/css_files/bootOver.css @@ -0,0 +1,16 @@ +.navbar-inner +{ +/*#DF0101*/ + background:#BA122B !important; +} +.btn-danger{ + background:#BA122B !important; +} + +img +{ +float:center; +border:0px dotted black; +margin:0px 0px 0px 0px; +} + diff --git a/vulcano_web/css_files/jquery-ui.css b/vulcano_web/css_files/jquery-ui.css new file mode 100755 index 0000000..9d92eb9 --- /dev/null +++ b/vulcano_web/css_files/jquery-ui.css @@ -0,0 +1,481 @@ +/*! jQuery UI - v1.9.2 - 2012-11-23 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* Copyright 2012 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:before, .ui-helper-clearfix:after { content: ""; display: table; } +.ui-helper-clearfix:after { clear: both; } +.ui-helper-clearfix { zoom: 1; } +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + +.ui-accordion .ui-accordion-header { display: block; cursor: pointer; position: relative; margin-top: 2px; padding: .5em .5em .5em .7em; zoom: 1; } +.ui-accordion .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-noicons { padding-left: .7em; } +.ui-accordion .ui-accordion-icons .ui-accordion-icons { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-accordion-header-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; overflow: auto; zoom: 1; } + +.ui-autocomplete { + position: absolute; + top: 0; + left: 0; + cursor: default; +} + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button, .ui-button:link, .ui-button:visited, .ui-button:hover, .ui-button:active { text-decoration: none; } +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ + +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} +.ui-dialog { position: absolute; top: 0; left: 0; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } + +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; outline: none; } +.ui-menu .ui-menu { margin-top: -3px; position: absolute; } +.ui-menu .ui-menu-item { margin: 0; padding: 0; zoom: 1; width: 100%; } +.ui-menu .ui-menu-divider { margin: 5px -2px 5px -2px; height: 0; font-size: 0; line-height: 0; border-width: 1px 0 0 0; } +.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.5; zoom: 1; font-weight: normal; } +.ui-menu .ui-menu-item a.ui-state-focus, +.ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; } + +.ui-menu .ui-state-disabled { font-weight: normal; margin: .4em 0 .2em; line-height: 1.5; } +.ui-menu .ui-state-disabled a { cursor: default; } + +/* icon support */ +.ui-menu-icons { position: relative; } +.ui-menu-icons .ui-menu-item a { position: relative; padding-left: 2em; } + +/* left-aligned */ +.ui-menu .ui-icon { position: absolute; top: .2em; left: .2em; } + +/* right-aligned */ +.ui-menu .ui-menu-icon { position: static; float: right; } + +.ui-progressbar { height:2em; text-align: left; overflow: hidden; width: 50em; color: #E43030; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; float:right;} + +.ui-progressbar2 { height:2em; text-align: left; overflow: hidden; width: 50em; color: #E43030; } +.ui-progressbar2 .ui-progressbar-value {margin: -1px; height:100%; float: left} + +.ui-progressbar3 { height:1em; text-align: left; overflow: hidden; width: 50em; color: #E43030; } +.ui-progressbar3 .ui-progressbar-value {margin: -1px; height:100%; float:left} + +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } + +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } +.ui-spinner { position:relative; display: inline-block; overflow: hidden; padding: 0; vertical-align: middle; } +.ui-spinner-input { border: none; background: none; padding: 0; margin: .2em 0; vertical-align: middle; margin-left: .4em; margin-right: 22px; } +.ui-spinner-button { width: 16px; height: 50%; font-size: .5em; padding: 0; margin: 0; text-align: center; position: absolute; cursor: default; display: block; overflow: hidden; right: 0; } +.ui-spinner a.ui-spinner-button { border-top: none; border-bottom: none; border-right: none; } /* more specificity required here to overide default borders */ +.ui-spinner .ui-icon { position: absolute; margin-top: -8px; top: 50%; left: 0; } /* vertical centre icon */ +.ui-spinner-up { top: 0; } +.ui-spinner-down { bottom: 0; } + +/* TR overrides */ +.ui-spinner .ui-icon-triangle-1-s { + /* need to fix icons sprite */ + background-position:-65px -16px; +} + +.ui-tabs { position: relative; padding: .2em; zoom: 1;} /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; background-color: #BA122B } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 0; margin: 1px .2em 0 0; border-bottom: 0; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active { margin-bottom: -1px; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-active a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-tabs-loading a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } + +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +/* Fades and background-images don't work well together in IE6, drop the image */ +* html .ui-tooltip { + background-image: none; +} +body .ui-tooltip { border-width: 2px; } + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover, .ui-state-hover a:link, .ui-state-hover a:visited { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } +.ui-state-disabled .ui-icon { filter:Alpha(Opacity=35); } /* For IE8 - See #6059 */ + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } diff --git a/vulcano_web/css_files/my_mini.css b/vulcano_web/css_files/my_mini.css new file mode 100755 index 0000000..3ba66a9 --- /dev/null +++ b/vulcano_web/css_files/my_mini.css @@ -0,0 +1,6497 @@ +#@import url(//fonts.googleapis.com/css?family=Telex); + +/*! + * Bootstrap v2.3.2 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +audio:not([controls]) { + display: none; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +a:hover, +a:active { + outline: 0; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + width: auto\9; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +#map_canvas img, +.google-maps img { + max-width: none; +} + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} + +button, +input { + *overflow: visible; + line-height: normal; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} + +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-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} + +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #555555; + background-color: #ffffff; +} + +a { + color: #2fa4e7; + text-decoration: none; +} + +a:hover, +a:focus { + color: #157ab5; + text-decoration: underline; +} + +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} + +.row { + margin-left: -20px; + *zoom: 1; +} + +.row:before, +.row:after { + display: table; + line-height: 0; + content: ""; +} + +.row:after { + clear: both; +} + +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} + +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.span12 { + width: 940px; +} + +.span11 { + width: 860px; +} + +.span10 { + width: 780px; +} + +.span9 { + width: 700px; +} + +.span8 { + width: 620px; +} + +.span7 { + width: 540px; +} + +.span6 { + width: 460px; +} + +.span5 { + width: 380px; +} + +.span4 { + width: 300px; +} + +.span3 { + width: 220px; +} + +.span2 { + width: 140px; +} + +.span1 { + width: 60px; +} + +.offset12 { + margin-left: 980px; +} + +.offset11 { + margin-left: 900px; +} + +.offset10 { + margin-left: 820px; +} + +.offset9 { + margin-left: 740px; +} + +.offset8 { + margin-left: 660px; +} + +.offset7 { + margin-left: 580px; +} + +.offset6 { + margin-left: 500px; +} + +.offset5 { + margin-left: 420px; +} + +.offset4 { + margin-left: 340px; +} + +.offset3 { + margin-left: 260px; +} + +.offset2 { + margin-left: 180px; +} + +.offset1 { + margin-left: 100px; +} + +.row-fluid { + width: 100%; + *zoom: 1; +} + +.row-fluid:before, +.row-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.row-fluid:after { + clear: both; +} + +.row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} + +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} + +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} + +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} + +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} + +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} + +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} + +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} + +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} + +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} + +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} + +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} + +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} + +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} + +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} + +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} + +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} + +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} + +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} + +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} + +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} + +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} + +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} + +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} + +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} + +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} + +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} + +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} + +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} + +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} + +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} + +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} + +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} + +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} + +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} + +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} + +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} + +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} + +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} + +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} + +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} + +.container:before, +.container:after { + display: table; + line-height: 0; + content: ""; +} + +.container:after { + clear: both; +} + +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} + +.container-fluid:before, +.container-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.container-fluid:after { + clear: both; +} + +p { + margin: 0 0 10px; +} + +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; +} + +small { + font-size: 85%; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +cite { + font-style: normal; +} + +.muted { + color: #999999; +} + +a.muted:hover, +a.muted:focus { + color: #808080; +} + +.text-warning { + color: #dd5600; +} + +a.text-warning:hover, +a.text-warning:focus { + color: #aa4200; +} + +.text-error { + color: #bd4247; +} + +a.text-error:hover, +a.text-error:focus { + color: #983538; +} + +.text-info { + color: #178acc; +} + +a.text-info:hover, +a.text-info:focus { + color: #126b9e; +} + +.text-success { + color: #669533; +} + +a.text-success:hover, +a.text-success:focus { + color: #4c6f26; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: 'Telex', sans-serif; + font-weight: bold; + line-height: 20px; + color: #BA122B; + text-rendering: optimizelegibility; +} + +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} + +h1, +h2, +h3 { + line-height: 40px; +} + +h1 { + font-size: 38.5px; +} + +h2 { + font-size: 31.5px; +} + +h3 { + font-size: 24.5px; +} + +h4 { + font-size: 17.5px; +} + +h5 { + font-size: 14px; +} + +h6 { + font-size: 11.9px; +} + +h1 small { + font-size: 24.5px; +} + +h2 small { + font-size: 17.5px; +} + +h3 small { + font-size: 14px; +} + +h4 small { + font-size: 14px; +} + +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #f5f5f5; +} + +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} + +li { + line-height: 20px; +} + +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} + +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} + +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + padding-right: 5px; + padding-left: 5px; + *zoom: 1; +} + +dl { + margin-bottom: 20px; +} + +dt, +dd { + line-height: 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 10px; +} + +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + +.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; +} + +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #f5f5f5; + border-bottom: 1px solid #ffffff; +} + +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} + +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #f5f5f5; +} + +blockquote p { + margin-bottom: 0; + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +blockquote small { + display: block; + line-height: 20px; + color: #999999; +} + +blockquote small:before { + content: '\2014 \00A0'; +} + +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #f5f5f5; + border-left: 0; +} + +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} + +blockquote.pull-right small:before { + content: ''; +} + +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} + +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} + +code, +pre { + padding: 0 3px 2px; + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +code { + padding: 2px 4px; + color: #d14; + white-space: nowrap; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +pre.prettyprint { + margin-bottom: 20px; +} + +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +form { + margin: 0 0 20px; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} + +legend small { + font-size: 15px; + color: #999999; +} + +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} + +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +label { + display: block; + margin-bottom: 5px; +} + +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +input, +textarea, +.uneditable-input { + width: 206px; +} + +textarea { + height: auto; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + *margin-top: 0; + line-height: normal; +} + +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} + +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} + +select { + width: 220px; + background-color: #ffffff; + border: 1px solid #cccccc; +} + +select[multiple], +select[size] { + height: auto; +} + +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.uneditable-input, +.uneditable-textarea { + color: #999999; + cursor: not-allowed; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); +} + +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} + +.uneditable-textarea { + width: auto; + height: auto; +} + +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} + +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} + +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} + +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} + +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} + +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} + +.input-mini { + width: 60px; +} + +.input-small { + width: 90px; +} + +.input-medium { + width: 150px; +} + +.input-large { + width: 210px; +} + +.input-xlarge { + width: 270px; +} + +.input-xxlarge { + width: 530px; +} + +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} + +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} + +input, +textarea, +.uneditable-input { + margin-left: 0; +} + +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} + +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} + +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} + +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} + +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} + +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} + +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} + +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} + +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} + +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} + +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} + +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} + +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} + +.controls-row { + *zoom: 1; +} + +.controls-row:before, +.controls-row:after { + display: table; + line-height: 0; + content: ""; +} + +.controls-row:after { + clear: both; +} + +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} + +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #f5f5f5; +} + +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} + +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #dd5600; +} + +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #dd5600; +} + +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #dd5600; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #aa4200; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ff8d44; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ff8d44; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ff8d44; +} + +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #dd5600; + background-color: #f1ceab; + border-color: #dd5600; +} + +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #bd4247; +} + +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #bd4247; +} + +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #bd4247; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #983538; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d88e90; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d88e90; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d88e90; +} + +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #bd4247; + background-color: #f2bdb1; + border-color: #bd4247; +} + +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #669533; +} + +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #669533; +} + +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #669533; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #4c6f26; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #99ca63; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #99ca63; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #99ca63; +} + +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #669533; + background-color: #d5ecbf; + border-color: #669533; +} + +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #178acc; +} + +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #178acc; +} + +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #178acc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #126b9e; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #5db8ec; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #5db8ec; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #5db8ec; +} + +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #178acc; + background-color: #a7dff1; + border-color: #178acc; +} + +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} + +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} + +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} + +.form-actions:before, +.form-actions:after { + display: table; + line-height: 0; + content: ""; +} + +.form-actions:after { + clear: both; +} + +.help-block, +.help-inline { + color: #7b7b7b; +} + +.help-block { + display: block; + margin-bottom: 10px; +} + +.help-inline { + display: inline-block; + *display: inline; + padding-left: 5px; + vertical-align: middle; + *zoom: 1; +} + +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 10px; + font-size: 0; + white-space: nowrap; + vertical-align: middle; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 14px; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} + +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #f5f5f5; + border: 1px solid #ccc; +} + +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-append .active, +.input-prepend .active { + background-color: #bede9c; + border-color: #73a839; +} + +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} + +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} + +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} + +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +/* Allow for input prepend/append in search forms */ + +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + margin-bottom: 0; + vertical-align: middle; + *zoom: 1; +} + +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} + +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} + +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} + +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} + +.control-group { + margin-bottom: 10px; +} + +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} + +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} + +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + line-height: 0; + content: ""; +} + +.form-horizontal .control-group:after { + clear: both; +} + +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} + +.form-horizontal .controls:first-child { + *padding-left: 180px; +} + +.form-horizontal .help-block { + margin-bottom: 0; +} + +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 10px; +} + +.form-horizontal .form-actions { + padding-left: 180px; +} + +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} + +.table { + width: 100%; + margin-bottom: 20px; +} + +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} + +.table th { + font-weight: bold; +} + +.table thead th { + vertical-align: bottom; +} + +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} + +.table tbody + tbody { + border-top: 2px solid #dddddd; +} + +.table .table { + background-color: #ffffff; +} + +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} + +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} + +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} + +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; +} + +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} + +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} + +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} + +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} + +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} + +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} + +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} + +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} + +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} + +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} + +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} + +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} + +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} + +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} + +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} + +.table tbody tr.success > td { + background-color: #d5ecbf; +} + +.table tbody tr.error > td { + background-color: #f2bdb1; +} + +.table tbody tr.warning > td { + background-color: #f1ceab; +} + +.table tbody tr.info > td { + background-color: #a7dff1; +} + +.table-hover tbody tr.success:hover > td { + background-color: #c8e6ab; +} + +.table-hover tbody tr.error:hover > td { + background-color: #eeab9b; +} + +.table-hover tbody tr.warning:hover > td { + background-color: #edc195; +} + +.table-hover tbody tr.info:hover > td { + background-color: #91d7ee; +} + +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; +} + +/* White icons with optional class, or on hover/focus/active states of certain elements */ + +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} + +.icon-glass { + background-position: 0 0; +} + +.icon-music { + background-position: -24px 0; +} + +.icon-search { + background-position: -48px 0; +} + +.icon-envelope { + background-position: -72px 0; +} + +.icon-heart { + background-position: -96px 0; +} + +.icon-star { + background-position: -120px 0; +} + +.icon-star-empty { + background-position: -144px 0; +} + +.icon-user { + background-position: -168px 0; +} + +.icon-film { + background-position: -192px 0; +} + +.icon-th-large { + background-position: -216px 0; +} + +.icon-th { + background-position: -240px 0; +} + +.icon-th-list { + background-position: -264px 0; +} + +.icon-ok { + background-position: -288px 0; +} + +.icon-remove { + background-position: -312px 0; +} + +.icon-zoom-in { + background-position: -336px 0; +} + +.icon-zoom-out { + background-position: -360px 0; +} + +.icon-off { + background-position: -384px 0; +} + +.icon-signal { + background-position: -408px 0; +} + +.icon-cog { + background-position: -432px 0; +} + +.icon-trash { + background-position: -456px 0; +} + +.icon-home { + background-position: 0 -24px; +} + +.icon-file { + background-position: -24px -24px; +} + +.icon-time { + background-position: -48px -24px; +} + +.icon-road { + background-position: -72px -24px; +} + +.icon-download-alt { + background-position: -96px -24px; +} + +.icon-download { + background-position: -120px -24px; +} + +.icon-upload { + background-position: -144px -24px; +} + +.icon-inbox { + background-position: -168px -24px; +} + +.icon-play-circle { + background-position: -192px -24px; +} + +.icon-repeat { + background-position: -216px -24px; +} + +.icon-refresh { + background-position: -240px -24px; +} + +.icon-list-alt { + background-position: -264px -24px; +} + +.icon-lock { + background-position: -287px -24px; +} + +.icon-flag { + background-position: -312px -24px; +} + +.icon-headphones { + background-position: -336px -24px; +} + +.icon-volume-off { + background-position: -360px -24px; +} + +.icon-volume-down { + background-position: -384px -24px; +} + +.icon-volume-up { + background-position: -408px -24px; +} + +.icon-qrcode { + background-position: -432px -24px; +} + +.icon-barcode { + background-position: -456px -24px; +} + +.icon-tag { + background-position: 0 -48px; +} + +.icon-tags { + background-position: -25px -48px; +} + +.icon-book { + background-position: -48px -48px; +} + +.icon-bookmark { + background-position: -72px -48px; +} + +.icon-print { + background-position: -96px -48px; +} + +.icon-camera { + background-position: -120px -48px; +} + +.icon-font { + background-position: -144px -48px; +} + +.icon-bold { + background-position: -167px -48px; +} + +.icon-italic { + background-position: -192px -48px; +} + +.icon-text-height { + background-position: -216px -48px; +} + +.icon-text-width { + background-position: -240px -48px; +} + +.icon-align-left { + background-position: -264px -48px; +} + +.icon-align-center { + background-position: -288px -48px; +} + +.icon-align-right { + background-position: -312px -48px; +} + +.icon-align-justify { + background-position: -336px -48px; +} + +.icon-list { + background-position: -360px -48px; +} + +.icon-indent-left { + background-position: -384px -48px; +} + +.icon-indent-right { + background-position: -408px -48px; +} + +.icon-facetime-video { + background-position: -432px -48px; +} + +.icon-picture { + background-position: -456px -48px; +} + +.icon-pencil { + background-position: 0 -72px; +} + +.icon-map-marker { + background-position: -24px -72px; +} + +.icon-adjust { + background-position: -48px -72px; +} + +.icon-tint { + background-position: -72px -72px; +} + +.icon-edit { + background-position: -96px -72px; +} + +.icon-share { + background-position: -120px -72px; +} + +.icon-check { + background-position: -144px -72px; +} + +.icon-move { + background-position: -168px -72px; +} + +.icon-step-backward { + background-position: -192px -72px; +} + +.icon-fast-backward { + background-position: -216px -72px; +} + +.icon-backward { + background-position: -240px -72px; +} + +.icon-play { + background-position: -264px -72px; +} + +.icon-pause { + background-position: -288px -72px; +} + +.icon-stop { + background-position: -312px -72px; +} + +.icon-forward { + background-position: -336px -72px; +} + +.icon-fast-forward { + background-position: -360px -72px; +} + +.icon-step-forward { + background-position: -384px -72px; +} + +.icon-eject { + background-position: -408px -72px; +} + +.icon-chevron-left { + background-position: -432px -72px; +} + +.icon-chevron-right { + background-position: -456px -72px; +} + +.icon-plus-sign { + background-position: 0 -96px; +} + +.icon-minus-sign { + background-position: -24px -96px; +} + +.icon-remove-sign { + background-position: -48px -96px; +} + +.icon-ok-sign { + background-position: -72px -96px; +} + +.icon-question-sign { + background-position: -96px -96px; +} + +.icon-info-sign { + background-position: -120px -96px; +} + +.icon-screenshot { + background-position: -144px -96px; +} + +.icon-remove-circle { + background-position: -168px -96px; +} + +.icon-ok-circle { + background-position: -192px -96px; +} + +.icon-ban-circle { + background-position: -216px -96px; +} + +.icon-arrow-left { + background-position: -240px -96px; +} + +.icon-arrow-right { + background-position: -264px -96px; +} + +.icon-arrow-up { + background-position: -289px -96px; +} + +.icon-arrow-down { + background-position: -312px -96px; +} + +.icon-share-alt { + background-position: -336px -96px; +} + +.icon-resize-full { + background-position: -360px -96px; +} + +.icon-resize-small { + background-position: -384px -96px; +} + +.icon-plus { + background-position: -408px -96px; +} + +.icon-minus { + background-position: -433px -96px; +} + +.icon-asterisk { + background-position: -456px -96px; +} + +.icon-exclamation-sign { + background-position: 0 -120px; +} + +.icon-gift { + background-position: -24px -120px; +} + +.icon-leaf { + background-position: -48px -120px; +} + +.icon-fire { + background-position: -72px -120px; +} + +.icon-eye-open { + background-position: -96px -120px; +} + +.icon-eye-close { + background-position: -120px -120px; +} + +.icon-warning-sign { + background-position: -144px -120px; +} + +.icon-plane { + background-position: -168px -120px; +} + +.icon-calendar { + background-position: -192px -120px; +} + +.icon-random { + width: 16px; + background-position: -216px -120px; +} + +.icon-comment { + background-position: -240px -120px; +} + +.icon-magnet { + background-position: -264px -120px; +} + +.icon-chevron-up { + background-position: -288px -120px; +} + +.icon-chevron-down { + background-position: -313px -119px; +} + +.icon-retweet { + background-position: -336px -120px; +} + +.icon-shopping-cart { + background-position: -360px -120px; +} + +.icon-folder-close { + width: 16px; + background-position: -384px -120px; +} + +.icon-folder-open { + width: 16px; + background-position: -408px -120px; +} + +.icon-resize-vertical { + background-position: -432px -119px; +} + +.icon-resize-horizontal { + background-position: -456px -118px; +} + +.icon-hdd { + background-position: 0 -144px; +} + +.icon-bullhorn { + background-position: -24px -144px; +} + +.icon-bell { + background-position: -48px -144px; +} + +.icon-certificate { + background-position: -72px -144px; +} + +.icon-thumbs-up { + background-position: -96px -144px; +} + +.icon-thumbs-down { + background-position: -120px -144px; +} + +.icon-hand-right { + background-position: -144px -144px; +} + +.icon-hand-left { + background-position: -168px -144px; +} + +.icon-hand-up { + background-position: -192px -144px; +} + +.icon-hand-down { + background-position: -216px -144px; +} + +.icon-circle-arrow-right { + background-position: -240px -144px; +} + +.icon-circle-arrow-left { + background-position: -264px -144px; +} + +.icon-circle-arrow-up { + background-position: -288px -144px; +} + +.icon-circle-arrow-down { + background-position: -312px -144px; +} + +.icon-globe { + background-position: -336px -144px; +} + +.icon-wrench { + background-position: -360px -144px; +} + +.icon-tasks { + background-position: -384px -144px; +} + +.icon-filter { + background-position: -408px -144px; +} + +.icon-briefcase { + background-position: -432px -144px; +} + +.icon-fullscreen { + background-position: -456px -144px; +} + +.dropup, +.dropdown { + position: relative; +} + +.dropdown-toggle { + *margin-bottom: -3px; +} + +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} + +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + color: #ffffff; + text-decoration: none; + background-color: #27a0e5; + background-image: -moz-linear-gradient(top, #2fa4e7, #1a99e2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2fa4e7), to(#1a99e2)); + background-image: -webkit-linear-gradient(top, #2fa4e7, #1a99e2); + background-image: -o-linear-gradient(top, #2fa4e7, #1a99e2); + background-image: linear-gradient(to bottom, #2fa4e7, #1a99e2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2fa4e7', endColorstr='#ff1a99e2', GradientType=0); +} + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #27a0e5; + background-image: -moz-linear-gradient(top, #2fa4e7, #1a99e2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2fa4e7), to(#1a99e2)); + background-image: -webkit-linear-gradient(top, #2fa4e7, #1a99e2); + background-image: -o-linear-gradient(top, #2fa4e7, #1a99e2); + background-image: linear-gradient(to bottom, #2fa4e7, #1a99e2); + background-repeat: repeat-x; + outline: 0; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2fa4e7', endColorstr='#ff1a99e2', GradientType=0); +} + +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} + +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.open { + *z-index: 1000; +} + +.open > .dropdown-menu { + display: block; +} + +.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 { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + +.dropdown-submenu > a:after { + display: block; + float: right; + width: 0; + height: 0; + margin-top: 5px; + margin-right: -10px; + border-color: transparent; + border-left-color: #cccccc; + border-style: solid; + border-width: 5px 0 5px 5px; + content: " "; +} + +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.dropdown .dropdown-menu .nav-header { + padding-right: 20px; + padding-left: 20px; +} + +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} + +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} + +.fade.in { + opacity: 1; +} + +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} + +.collapse.in { + height: auto; +} + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} + +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.btn { + display: inline-block; + *display: inline; + padding: 4px 12px; + margin-bottom: 0; + *margin-left: .3em; + font-size: 14px; + line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + *background-color: #e6e6e6; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #cccccc; + *border: 0; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-bottom-color: #b3b3b3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} + +.btn:active, +.btn.active { + background-color: #cccccc \9; +} + +.btn:first-child { + *margin-left: 0; +} + +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} + +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-large { + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} + +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} + +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} + +.btn-mini { + padding: 0 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} + +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #2f92e7; + *background-color: #2f76e7; + background-image: -moz-linear-gradient(top, #2fa4e7, #2f76e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#2fa4e7), to(#2f76e7)); + background-image: -webkit-linear-gradient(top, #2fa4e7, #2f76e7); + background-image: -o-linear-gradient(top, #2fa4e7, #2f76e7); + background-image: linear-gradient(to bottom, #2fa4e7, #2f76e7); + background-repeat: repeat-x; + border-color: #2f76e7 #2f76e7 #1553b5; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff2fa4e7', endColorstr='#ff2f76e7', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #2f76e7; + *background-color: #1a67e2; +} + +.btn-primary:active, +.btn-primary.active { + background-color: #175dcc \9; +} + +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #dd5600; + *background-color: #dd5600; + background-image: -moz-linear-gradient(top, #dd5600, #dd5600); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dd5600), to(#dd5600)); + background-image: -webkit-linear-gradient(top, #dd5600, #dd5600); + background-image: -o-linear-gradient(top, #dd5600, #dd5600); + background-image: linear-gradient(to bottom, #dd5600, #dd5600); + background-repeat: repeat-x; + border-color: #dd5600 #dd5600 #913800; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdd5600', endColorstr='#ffdd5600', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #dd5600; + *background-color: #c44c00; +} + +.btn-warning:active, +.btn-warning.active { + background-color: #aa4200 \9; +} + +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #c32627; + *background-color: #bd362f; + background-image: -moz-linear-gradient(top, #c71c22, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#c71c22), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #c71c22, #bd362f); + background-image: -o-linear-gradient(top, #c71c22, #bd362f); + background-image: linear-gradient(to bottom, #c71c22, #bd362f); + background-repeat: repeat-x; + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffc71c22', endColorstr='#ffbd362f', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} + +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} + +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #65a643; + *background-color: #51a351; + background-image: -moz-linear-gradient(top, #73a839, #51a351); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#73a839), to(#51a351)); + background-image: -webkit-linear-gradient(top, #73a839, #51a351); + background-image: -o-linear-gradient(top, #73a839, #51a351); + background-image: linear-gradient(to bottom, #73a839, #51a351); + background-repeat: repeat-x; + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff73a839', endColorstr='#ff51a351', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} + +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} + +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #6d76b3; + *background-color: #2f96b4; + background-image: -moz-linear-gradient(top, #9760b3, #2f96b4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#9760b3), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #9760b3, #2f96b4); + background-image: -o-linear-gradient(top, #9760b3, #2f96b4); + background-image: linear-gradient(to bottom, #9760b3, #2f96b4); + background-repeat: repeat-x; + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff9760b3', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} + +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} + +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0f3253; + *background-color: #222222; + background-image: -moz-linear-gradient(top, #033c73, #222222); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#033c73), to(#222222)); + background-image: -webkit-linear-gradient(top, #033c73, #222222); + background-image: -o-linear-gradient(top, #033c73, #222222); + background-image: linear-gradient(to bottom, #033c73, #222222); + background-repeat: repeat-x; + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff033c73', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} + +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} + +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} + +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} + +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} + +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-link { + color: #2fa4e7; + cursor: pointer; + border-color: transparent; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-link:hover, +.btn-link:focus { + color: #157ab5; + text-decoration: underline; + background-color: transparent; +} + +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} + +.btn-group { + position: relative; + display: inline-block; + *display: inline; + *margin-left: .3em; + font-size: 0; + white-space: nowrap; + vertical-align: middle; + *zoom: 1; +} + +.btn-group:first-child { + *margin-left: 0; +} + +.btn-group + .btn-group { + margin-left: 5px; +} + +.btn-toolbar { + margin-top: 10px; + margin-bottom: 10px; + font-size: 0; +} + +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} + +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group > .btn + .btn { + margin-left: -1px; +} + +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 14px; +} + +.btn-group > .btn-mini { + font-size: 10.5px; +} + +.btn-group > .btn-small { + font-size: 11.9px; +} + +.btn-group > .btn-large { + font-size: 17.5px; +} + +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + +.btn-group > .btn + .dropdown-toggle { + *padding-top: 5px; + padding-right: 8px; + *padding-bottom: 5px; + padding-left: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group > .btn-mini + .dropdown-toggle { + *padding-top: 2px; + padding-right: 5px; + *padding-bottom: 2px; + padding-left: 5px; +} + +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} + +.btn-group > .btn-large + .dropdown-toggle { + *padding-top: 7px; + padding-right: 12px; + *padding-bottom: 7px; + padding-left: 12px; +} + +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} + +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #2f76e7; +} + +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #dd5600; +} + +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} + +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} + +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} + +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} + +.btn .caret { + margin-top: 8px; + margin-left: 0; +} + +.btn-large .caret { + margin-top: 6px; +} + +.btn-large .caret { + border-top-width: 5px; + border-right-width: 5px; + border-left-width: 5px; +} + +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} + +.dropup .btn-large .caret { + border-bottom-width: 5px; +} + +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-btn btn-dangercolor:#ffffff; + border-bottom-color:#ffffff; +} + +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} + +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group-vertical > .btn + .btn { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} + +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #f1ceab; + border: 1px solid #efb99e; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.alert, +.alert h4 { + color: #dd5600; +} + +.alert h4 { + margin: 0; +} + +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; +} + +.alert-success { + color: #669533; + background-color: #d5ecbf; + border-color: #d2e6ab; +} + +.alert-success h4 { + color: #669533; +} + +.alert-danger, +.alert-error { + color: #bd4247; + background-color: #f2bdb1; + border-color: #f0a5a4; +} + +.alert-danger h4, +.alert-error h4 { + color: #bd4247; +} + +.alert-info { + color: #178acc; + background-color: #a7dff1; + border-color: #88e4ec; +} + +.alert-info h4 { + color: #178acc; +} + +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} + +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} + +.alert-block p + p { + margin-top: 5px; +} + +.nav { + margin-bottom: 20px; + margin-left: 0; + list-style: none; +} + +.nav > li > a { + display: block; +} +/*#f5f5f5**/ +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} + +.nav > li > a > img { + max-width: none; +} + +.nav > .pull-right { + float: right; +} + +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} + +.nav li + .nav-header { + margin-top: 9px; +} + +.nav-list { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 0; +} + +.nav-list > li > a, +.nav-list .nav-header { + margin-right: -15px; + margin-left: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} + +.nav-list > li > a { + padding: 3px 15px; +} + +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #2fa4e7; +} + +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} + +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.nav-tabs, +.nav-pills { + *zoom: 1; +} + +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + line-height: 0; + content: ""; +} + +.nav-tabs:after, +.nav-pills:after { + clear: both; +} + +.nav-tabs > li, +.nav-pills > li { + float: left; +} + +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} + +.nav-tabs { + border-bottom: 1px solid #ddd; +} + +.nav-tabs > li { + margin-bottom: -1px; +} + +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #f5f5f5 #f5f5f5 #dddddd; +} + +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + cursor: default; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #2fa4e7; +} + +.nav-stacked > li { + float: none; +} + +.nav-stacked > li > a { + margin-right: 0; +} + +.nav-tabs.nav-stacked { + border-bottom: 0; +} + +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; +} + +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + z-index: 2; + border-color: #ddd; +} + +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} + +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} + +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.nav .dropdown-toggle .caret { + margin-top: 6px; + border-top-color: #2fa4e7; + border-bottom-color: #2fa4e7; +} + +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #157ab5; + border-bottom-color: #157ab5; +} + +/* move down carets for tabs */ + +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} + +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} + +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} + +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} + +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} + +.tabbable { + *zoom: 1; +} + +.tabbable:before, +.tabbable:after { + display: table; + line-height: 0; + content: ""; +} + +.tabbable:after { + clear: both; +} + +.tab-content { + overflow: auto; +} + +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} + +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} + +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-top-color: #ddd; + border-bottom-color: transparent; +} + +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} + +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} + +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} + +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #f5f5f5 #dddddd #f5f5f5 #f5f5f5; +} + +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} + +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} + +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #f5f5f5 #f5f5f5 #f5f5f5 #dddddd; +} + +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} + +.nav > .disabled > a { + color: #999999; +} + +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; +} + +.navbar { + *position: relative; + *z-index: 2; + margin-bottom: 20px; + overflow: visible; +} + +.navbar-inner { + min-height: 50px; + padding-right: 20px; + padding-left: 20px; + background-color: #45aeea; + background-image: -moz-linear-gradient(top, #54b4eb, #2fa4e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#54b4eb), to(#2fa4e7)); + background-image: -webkit-linear-gradient(top, #54b4eb, #2fa4e7); + background-image: -o-linear-gradient(top, #54b4eb, #2fa4e7); + background-image: linear-gradient(to bottom, #54b4eb, #2fa4e7); + background-repeat: repeat-x; + border: 1px solid #1990d5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff54b4eb', endColorstr='#ff2fa4e7', GradientType=0); + *zoom: 1; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); +} + +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + +.navbar .container { + width: auto; +} + +.nav-collapse.collapse { + height: auto; + overflow: visible; +} + +.navbar .brand { + display: block; + float: left; + padding: 15px 20px 15px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #ffffff; + text-shadow: 0 1px 0 #54b4eb; +} + +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} + +.navbar-text { + margin-bottom: 0; + line-height: 50px; + color: #f5f5f5; +} + +.navbar-link { + color: #ffffff; +} + +.navbar-link:hover, +.navbar-link:focus { + color: #ffffff; +} + +.navbar .divider-vertical { + height: 50px; + margin: 0 9px; + border-right: 1px solid #54b4eb; + border-left: 1px solid #2fa4e7; +} + +.navbar .btn, +.navbar .btn-group { + margin-top: 10px; +} + +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} + +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} + +.navbar-form:before, +.navbar-form:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-form:after { + clear: both; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 10px; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} + +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} + +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} + +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} + +.navbar-search { + position: relative; + float: left; + margin-top: 10px; + margin-bottom: 0; +} + +.navbar-search .search-query { + padding: 4px 14px; + margin-bottom: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.navbar-static-top { + position: static; + margin-bottom: 0; +} + +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} + +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-right: 0; + padding-left: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.navbar-fixed-top { + top: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar-fixed-bottom { + bottom: 0; +} + +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} + +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} + +.navbar .nav > li { + float: left; +} + +.navbar .nav > li > a { + float: none; + padding: 15px 15px 15px; + color: #ffffff; + text-decoration: none; + text-shadow: 0 1px 0 #54b4eb; +} + +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} + +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + color: #ffffff; + text-decoration: none; + background-color: #1684c2; +} + +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #1684c2; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} + +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-right: 5px; + margin-left: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #2fa3e6; + *background-color: #1a99e2; + background-image: -moz-linear-gradient(top, #3daae9, #1a99e2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3daae9), to(#1a99e2)); + background-image: -webkit-linear-gradient(top, #3daae9, #1a99e2); + background-image: -o-linear-gradient(top, #3daae9, #1a99e2); + background-image: linear-gradient(to bottom, #3daae9, #1a99e2); + background-repeat: repeat-x; + border-color: #1a99e2 #1a99e2 #126b9e; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3daae9', endColorstr='#ff1a99e2', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); +} + +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #1a99e2; + *background-color: #178acc; +} + +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #157ab5 \9; +} + +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} + +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} + +.navbar .nav > li > .dropdown-menu:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.navbar .nav > li > .dropdown-menu:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-left: 6px solid transparent; + content: ''; +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + top: auto; + bottom: -7px; + border-top: 7px solid #ccc; + border-bottom: 0; + border-top-color: rgba(0, 0, 0, 0.2); +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + top: auto; + bottom: -6px; + border-top: 6px solid #ffffff; + border-bottom: 0; +} + +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + color: #ffffff; + background-color: #1684c2; +} + +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + right: 12px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + right: 13px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + right: 100%; + left: auto; + margin-right: -1px; + margin-left: 0; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.navbar-inverse .navbar-inner { + background-color: #034482; + background-image: -moz-linear-gradient(top, #04498c, #033c73); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#04498c), to(#033c73)); + background-image: -webkit-linear-gradient(top, #04498c, #033c73); + background-image: -o-linear-gradient(top, #04498c, #033c73); + background-image: linear-gradient(to bottom, #04498c, #033c73); + background-repeat: repeat-x; + border-color: #033464; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff04498c', endColorstr='#ff033c73', GradientType=0); +} + +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} + +.navbar-inverse .brand { + color: #ffffff; +} + +.navbar-inverse .navbar-text { + color: #ffffff; +} + +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; + background-color: #022c55; +} + +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #022c55; +} + +.navbar-inverse .navbar-link { + color: #ffffff; +} + +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} + +.navbar-inverse .divider-vertical { + border-right-color: #04498c; + border-left-color: #033c73; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + color: #ffffff; + background-color: #022c55; +} + +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #ffffff; + border-color: #033c73; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #999999; +} + +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #999999; +} + +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #999999; +} + +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + outline: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} + +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #033769; + *background-color: #022f5a; + background-image: -moz-linear-gradient(top, #033c73, #022f5a); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#033c73), to(#022f5a)); + background-image: -webkit-linear-gradient(top, #033c73, #022f5a); + background-image: -o-linear-gradient(top, #033c73, #022f5a); + background-image: linear-gradient(to bottom, #033c73, #022f5a); + background-repeat: repeat-x; + border-color: #022f5a #022f5a #000810; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff033c73', endColorstr='#ff022f5a', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #022f5a; + *background-color: #022241; +} + +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #011528 \9; +} + +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.breadcrumb > li { + display: inline-block; + *display: inline; + text-shadow: 0 1px 0 #ffffff; + *zoom: 1; +} + +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} + +.breadcrumb > .active { + color: #999999; +} + +.pagination { + margin: 20px 0; +} + +.pagination ul { + display: inline-block; + *display: inline; + margin-bottom: 0; + margin-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + *zoom: 1; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.pagination ul > li { + display: inline; +} + +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 20px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} + +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} + +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} + +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + cursor: default; + background-color: transparent; +} + +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.pagination-centered { + text-align: center; +} + +.pagination-right { + text-align: right; +} + +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} + +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; +} + +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; +} + +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} + +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0 6px; + font-size: 10.5px; +} + +.pager { + margin: 20px 0; + text-align: center; + list-style: none; + *zoom: 1; +} + +.pager:before, +.pager:after { + display: table; + line-height: 0; + content: ""; +} + +.pager:after { + clear: both; +} + +.pager li { + display: inline; +} + +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} + +.pager .next > a, +.pager .next > span { + float: right; +} + +.pager .previous > a, +.pager .previous > span { + float: left; +} + +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + cursor: default; + background-color: #fff; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} + +.modal-backdrop.fade { + opacity: 0; +} + +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} + +.modal.fade { + top: -25%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out; +} + +.modal.fade.in { + top: 10%; +} + +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} + +.modal-header .close { + margin-top: 2px; +} + +.modal-header h3 { + margin: 0; + line-height: 30px; +} + +.modal-body { + position: relative; + max-height: 400px; + padding: 15px; + overflow-y: auto; +} + +.modal-form { + margin-bottom: 0; +} + +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + line-height: 0; + content: ""; +} + +.modal-footer:after { + clear: both; +} + +.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; +} + +.tooltip { + position: absolute; + z-index: 1020; + display: block; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); + visibility: visible; +} + +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.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: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + 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-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #000000; + border-width: 5px 5px 5px 0; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #000000; + border-width: 5px 0 5px 5px; +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.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; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} + +.popover-title:empty { + display: none; +} + +.popover-content { + padding: 9px 14px; +} + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover .arrow { + border-width: 11px; +} + +.popover .arrow:after { + border-width: 10px; + content: ""; +} + +.popover.top .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; +} + +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-top-color: #ffffff; + 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, 0.25); + border-left-width: 0; +} + +.popover.right .arrow:after { + bottom: -10px; + left: 1px; + border-right-color: #ffffff; + border-left-width: 0; +} + +.popover.bottom .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-top-width: 0; +} + +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-bottom-color: #ffffff; + border-top-width: 0; +} + +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); + border-right-width: 0; +} + +.popover.left .arrow:after { + right: 1px; + bottom: -10px; + border-left-color: #ffffff; + border-right-width: 0; +} + +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} + +.thumbnails:before, +.thumbnails:after { + display: table; + line-height: 0; + content: ""; +} + +.thumbnails:after { + clear: both; +} + +.row-fluid .thumbnails { + margin-left: 0; +} + +.thumbnails > li { + float: left; + margin-bottom: 20px; + margin-left: 20px; +} + +.thumbnail { + display: block; + padding: 4px; + line-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #2fa4e7; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} + +.thumbnail > img { + display: block; + max-width: 100%; + margin-right: auto; + margin-left: auto; +} + +.thumbnail .caption { + padding: 9px; + color: #555555; +} + +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media > .pull-left { + margin-right: 10px; +} + +.media > .pull-right { + margin-left: 10px; +} + +.media-list { + margin-left: 0; + list-style: none; +} + +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + white-space: nowrap; + vertical-align: baseline; + background-color: #999999; +} + +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.badge { + padding-right: 9px; + padding-left: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} + +.label:empty, +.badge:empty { + display: none; +} + +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.label-important, +.badge-important { + background-color: #bd4247; +} + +.label-important[href], +.badge-important[href] { + background-color: #983538; +} + +.label-warning, +.badge-warning { + background-color: #dd5600; +} + +.label-warning[href], +.badge-warning[href] { + background-color: #aa4200; +} + +.label-success, +.badge-success { + background-color: #669533; +} + +.label-success[href], +.badge-success[href] { + background-color: #4c6f26; +} + +.label-info, +.badge-info { + background-color: #178acc; +} + +.label-info[href], +.badge-info[href] { + background-color: #126b9e; +} + +.label-inverse, +.badge-inverse { + background-color: #333333; +} + +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} + +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} + +.btn-mini .label, +.btn-mini .badge { + top: 0; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 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: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} + +.progress .bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + color: #ffffff; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} + +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); +} + +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} + +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} + +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} + +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} + +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-warning .bar, +.progress .bar-warning { + background-color: #f16e1a; + background-image: -moz-linear-gradient(top, #ff7d2b, #dd5600); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff7d2b), to(#dd5600)); + background-image: -webkit-linear-gradient(top, #ff7d2b, #dd5600); + background-image: -o-linear-gradient(top, #ff7d2b, #dd5600); + background-image: linear-gradient(to bottom, #ff7d2b, #dd5600); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff7d2b', endColorstr='#ffdd5600', GradientType=0); +} + +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #ff7d2b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.accordion { + margin-bottom: 20px; +} + +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.accordion-heading { + border-bottom: 0; +} + +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} + +.accordion-toggle { + cursor: pointer; +} + +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} + +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} + +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} + +.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: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.carousel-control.right { + right: 15px; + left: auto; +} + +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} + +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} + +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} + +.carousel-indicators .active { + background-color: #fff; +} + +.carousel-caption { + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} + +.carousel-caption h4, +.carousel-caption p { + line-height: 20px; + color: #ffffff; +} + +.carousel-caption h4 { + margin: 0 0 5px; +} + +.carousel-caption p { + margin-bottom: 0; +} + +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; + background-color: #f5f5f5; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + letter-spacing: -1px; + color: inherit; +} + +.hero-unit li { + line-height: 30px; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.hide { + display: none; +} + +.show { + display: block; +} + +.invisible { + visibility: hidden; +} + +.affix { + position: fixed; +} + +.navbar .brand { + padding: 14px 20px 16px; + font-family: 'Telex', sans-serif; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2); +} + +.navbar li { + line-height: 20px; +} + +.navbar .nav > li > a { + padding: 16px 10px 14px; + font-family: 'Telex', sans-serif; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2); +} + +.navbar .search-query { + line-height: normal; + border: 1px solid #178acc; +} + +.navbar .navbar-text { + padding: 19px 10px 18px; + line-height: 13px; + color: rgba(0, 0, 0, 0.5); + text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3); +} + +.navbar-inverse .navbar-search .search-query { + color: #555555; +} + +@media (max-width: 979px) { + .navbar .nav-collapse .nav li > a { + font-family: 'Telex', sans-serif; + font-weight: normal; + color: #ffffff; + text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2); + } + .navbar .nav-collapse .nav li > a:hover { + background-color: #2B7CAC; + } + .navbar .nav-collapse .nav .active > a { + background-color: #2B7CAC; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .navbar .nav-collapse .dropdown-menu li > a:hover, + .navbar .nav-collapse .dropdown-menu li > a:focus, + .navbar .nav-collapse .dropdown-submenu:hover > a { + background-image: none; + } + .navbar .nav-collapse .navbar-form, + .navbar .nav-collapse .navbar-search { + border: none; + } + .navbar .nav-collapse .nav-header { + color: #2B7CAC; + } + .navbar-inverse .nav-collapse .nav li > a { + color: #ffffff; + } + .navbar-inverse .nav-collapse .nav li > a:hover { + background-color: rgba(0, 0, 0, 0.1); + } + .navbar-inverse .nav-collapse .nav .active > a, + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:hover { + background-color: rgba(0, 0, 0, 0.1) !important; + } +} + +div.subnav { + font-family: 'Telex', sans-serif; + text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.2); +} + +div.subnav-fixed { + top: 51px; +} + +.btn { + background-color: #ffffff; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(5%, #ffffff), to(#ffffff)); + background-image: -webkit-linear-gradient(#ffffff, #ffffff 5%, #ffffff); + background-image: -moz-linear-gradient(top, #ffffff, #ffffff 5%, #ffffff); + background-image: -o-linear-gradient(#ffffff, #ffffff 5%, #ffffff); + background-image: linear-gradient(#ffffff, #ffffff 5%, #ffffff); + background-repeat: no-repeat; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffffffff', GradientType=0); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn:hover { + background-position: 0 0; +} + +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #3daae9; + *background-color: #2fa4e7; + background-image: -moz-linear-gradient(top, #46aeea, #2fa4e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#46aeea), to(#2fa4e7)); + background-image: -webkit-linear-gradient(top, #46aeea, #2fa4e7); + background-image: -o-linear-gradient(top, #46aeea, #2fa4e7); + background-image: linear-gradient(to bottom, #46aeea, #2fa4e7); + background-repeat: repeat-x; + border-color: #2fa4e7 #2fa4e7 #157ab5; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff46aeea', endColorstr='#ff2fa4e7', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #2fa4e7; + *background-color: #1a99e2; +} + +.btn-primary:active, +.btn-primary.active { + background-color: #178acc \9; +} + +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #9e6ab8; + *background-color: #9760b3; + background-image: -moz-linear-gradient(top, #a271bb, #9760b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#a271bb), to(#9760b3)); + background-image: -webkit-linear-gradient(top, #a271bb, #9760b3); + background-image: -o-linear-gradient(top, #a271bb, #9760b3); + background-image: linear-gradient(to bottom, #a271bb, #9760b3); + background-repeat: repeat-x; + border-color: #9760b3 #9760b3 #6f4086; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffa271bb', endColorstr='#ff9760b3', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #9760b3; + *background-color: #8b51a9; +} + +.btn-info:active, +.btn-info.active { + background-color: #7d4898 \9; +} + +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #7bb33d; + *background-color: #73a839; + background-image: -moz-linear-gradient(top, #80bb3f, #73a839); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#80bb3f), to(#73a839)); + background-image: -webkit-linear-gradient(top, #80bb3f, #73a839); + background-image: -o-linear-gradient(top, #80bb3f, #73a839); + background-image: linear-gradient(to bottom, #80bb3f, #73a839); + background-repeat: repeat-x; + border-color: #73a839 #73a839 #4c6f26; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff80bb3f', endColorstr='#ff73a839', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #73a839; + *background-color: #669533; +} + +.btn-success:active, +.btn-success.active { + background-color: #59822c \9; +} + +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ec5c00; + *background-color: #dd5600; + background-image: -moz-linear-gradient(top, #f76000, #dd5600); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f76000), to(#dd5600)); + background-image: -webkit-linear-gradient(top, #f76000, #dd5600); + background-image: -o-linear-gradient(top, #f76000, #dd5600); + background-image: linear-gradient(to bottom, #f76000, #dd5600); + background-repeat: repeat-x; + border-color: #dd5600 #dd5600 #913800; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff76000', endColorstr='#ffdd5600', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #dd5600; + *background-color: #c44c00; +} + +.btn-warning:active, +.btn-warning.active { + background-color: #aa4200 \9; +} + +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #d41e24; + *background-color:#c71c22; + background-image: -moz-linear-gradient(top, #dd1f26, #c71c22); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#dd1f26), to(#c71c22)); + background-image: -webkit-linear-gradient(top, #dd1f26, #c71c22); + background-image: -o-linear-gradient(top, #dd1f26, #c71c22); + background-image: linear-gradient(to bottom, #dd1f26, #c71c22); + background-repeat: repeat-x; + border-color: #c71c22 #c71c22 #841317; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdd1f26', endColorstr='#ffc71c22', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color:#c71c22; + *background-color:#b1191e; +} + +.btn-danger:active, +.btn-danger.active { + background-color:#9a161a \9; +} + +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #034482; + *background-color: #033c73; + background-image: -moz-linear-gradient(top, #04498c, #033c73); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#04498c), to(#033c73)); + background-image: -webkit-linear-gradient(top, #04498c, #033c73); + background-image: -o-linear-gradient(top, #04498c, #033c73); + background-image: linear-gradient(to bottom, #04498c, #033c73); + background-repeat: repeat-x; + border-color: #033c73 #033c73 #011528; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff04498c', endColorstr='#ff033c73', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #033c73; + *background-color: #022f5a; +} + +.btn-inverse:active, +.btn-inverse.active { + background-color: #022241 \9; +} + +i[class^="icon-"] { + opacity: 0.8; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.hide { + display: none; +} + +.show { + display: block; +} + +.invisible { + visibility: hidden; +} + +.affix { + position: fixed; +} + + diff --git a/vulcano_web/images/animated-overlay.gif b/vulcano_web/images/animated-overlay.gif new file mode 100755 index 0000000..d441f75 Binary files /dev/null and b/vulcano_web/images/animated-overlay.gif differ diff --git a/vulcano_web/images/green.png b/vulcano_web/images/green.png new file mode 100755 index 0000000..0ca83c3 Binary files /dev/null and b/vulcano_web/images/green.png differ diff --git a/vulcano_web/images/light-green-flash.gif b/vulcano_web/images/light-green-flash.gif new file mode 100755 index 0000000..8c1dc4e Binary files /dev/null and b/vulcano_web/images/light-green-flash.gif differ diff --git a/vulcano_web/images/light-green-flash.jpg b/vulcano_web/images/light-green-flash.jpg new file mode 100755 index 0000000..8d78e75 Binary files /dev/null and b/vulcano_web/images/light-green-flash.jpg differ diff --git a/vulcano_web/images/light-red-flash.gif b/vulcano_web/images/light-red-flash.gif new file mode 100755 index 0000000..7ba32c8 Binary files /dev/null and b/vulcano_web/images/light-red-flash.gif differ diff --git a/vulcano_web/images/red.png b/vulcano_web/images/red.png new file mode 100755 index 0000000..402dcd0 Binary files /dev/null and b/vulcano_web/images/red.png differ diff --git a/vulcano_web/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/vulcano_web/images/ui-bg_diagonals-thick_18_b81900_40x40.png new file mode 100755 index 0000000..f4df034 Binary files /dev/null and b/vulcano_web/images/ui-bg_diagonals-thick_18_b81900_40x40.png differ diff --git a/vulcano_web/images/ui-bg_diagonals-thick_20_666666_40x40.png b/vulcano_web/images/ui-bg_diagonals-thick_20_666666_40x40.png new file mode 100755 index 0000000..196b897 Binary files /dev/null and b/vulcano_web/images/ui-bg_diagonals-thick_20_666666_40x40.png differ diff --git a/vulcano_web/images/ui-bg_flat_10_000000_40x100.png b/vulcano_web/images/ui-bg_flat_10_000000_40x100.png new file mode 100755 index 0000000..439edf5 Binary files /dev/null and b/vulcano_web/images/ui-bg_flat_10_000000_40x100.png differ diff --git a/vulcano_web/images/ui-bg_glass_100_f6f6f6_1x400.png b/vulcano_web/images/ui-bg_glass_100_f6f6f6_1x400.png new file mode 100755 index 0000000..03db8a4 Binary files /dev/null and b/vulcano_web/images/ui-bg_glass_100_f6f6f6_1x400.png differ diff --git a/vulcano_web/images/ui-bg_glass_100_fdf5ce_1x400.png b/vulcano_web/images/ui-bg_glass_100_fdf5ce_1x400.png new file mode 100755 index 0000000..4907f49 Binary files /dev/null and b/vulcano_web/images/ui-bg_glass_100_fdf5ce_1x400.png differ diff --git a/vulcano_web/images/ui-bg_glass_65_ffffff_1x400.png b/vulcano_web/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100755 index 0000000..20a7e77 Binary files /dev/null and b/vulcano_web/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/vulcano_web/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/vulcano_web/images/ui-bg_gloss-wave_35_f6a828_500x100.png new file mode 100755 index 0000000..ddc1075 Binary files /dev/null and b/vulcano_web/images/ui-bg_gloss-wave_35_f6a828_500x100.png differ diff --git a/vulcano_web/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/vulcano_web/images/ui-bg_highlight-soft_100_eeeeee_1x100.png new file mode 100755 index 0000000..1135452 Binary files /dev/null and b/vulcano_web/images/ui-bg_highlight-soft_100_eeeeee_1x100.png differ diff --git a/vulcano_web/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/vulcano_web/images/ui-bg_highlight-soft_75_ffe45c_1x100.png new file mode 100755 index 0000000..3ae6093 Binary files /dev/null and b/vulcano_web/images/ui-bg_highlight-soft_75_ffe45c_1x100.png differ diff --git a/vulcano_web/images/ui-icons_222222_256x240.png b/vulcano_web/images/ui-icons_222222_256x240.png new file mode 100755 index 0000000..1106eef Binary files /dev/null and b/vulcano_web/images/ui-icons_222222_256x240.png differ diff --git a/vulcano_web/images/ui-icons_228ef1_256x240.png b/vulcano_web/images/ui-icons_228ef1_256x240.png new file mode 100755 index 0000000..8c64a89 Binary files /dev/null and b/vulcano_web/images/ui-icons_228ef1_256x240.png differ diff --git a/vulcano_web/images/ui-icons_ef8c08_256x240.png b/vulcano_web/images/ui-icons_ef8c08_256x240.png new file mode 100755 index 0000000..760f14a Binary files /dev/null and b/vulcano_web/images/ui-icons_ef8c08_256x240.png differ diff --git a/vulcano_web/images/ui-icons_ffd27a_256x240.png b/vulcano_web/images/ui-icons_ffd27a_256x240.png new file mode 100755 index 0000000..21fd40e Binary files /dev/null and b/vulcano_web/images/ui-icons_ffd27a_256x240.png differ diff --git a/vulcano_web/images/ui-icons_ffffff_256x240.png b/vulcano_web/images/ui-icons_ffffff_256x240.png new file mode 100755 index 0000000..7cfcb5c Binary files /dev/null and b/vulcano_web/images/ui-icons_ffffff_256x240.png differ diff --git a/vulcano_web/index.html b/vulcano_web/index.html new file mode 100644 index 0000000..894b14d --- /dev/null +++ b/vulcano_web/index.html @@ -0,0 +1,358 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+
+ + + + + + + + + + + + + +
+ IMU state      + + Battery State      + + IMU temperature      + + Stop Button +
+
+
+
+
+
+
+
+
+
+ +

Battery

+

+    + 0%           + 25%           + 50%           + 75%           + 100% +

+
Battery level =
+
IMU temperature =
+
GPS latitude =
+
GPS longitude =
+
Satellites visible =
+
Satellites used =
+
+ +

Odometry

+ + + + + + + + + + + + + + + + + + + + + +
        x        y        z
Position
Orientation
+
+ + +

+ +

Motor Status

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ Front Left Direction Wheel      + + + + Front Right Direction Wheel      + + + + Front Left Traction Wheel      + + + + Front Right Traction Wheel      + + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ Back Left Direction Wheel + + + + Back Right Direction Wheel + + + + Back Left Traction Wheel + + + + Back Right Traction Wheel + + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+ + + + + +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+ +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+ +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+ +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+ + + +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+ +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+ +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+ +
+ Flags info:
+ Flag is off
+ Flag is on
+ Flag has been activated before

+
State =
+
Status =
+
+ Flags: +
+
+ Driver flags: +
+
+
+
+ + diff --git a/vulcano_web/index.js b/vulcano_web/index.js new file mode 100644 index 0000000..50bfd4c --- /dev/null +++ b/vulcano_web/index.js @@ -0,0 +1,2031 @@ +var pos_x= 0.0; +var pos_y= 0.0; +var pos_zoom = 0.0; +var is_recording = 0; +var yaw_angle = 0.0; +var yaw_angle_left = 0.0; +var yaw_angle_right = 0.0; +var default_max_angle = 5.0; +var max_angle = default_max_angle; +var max_angle_message; +var default_trim_angle = 0.0; +var trim_angle = default_trim_angle; +var trim_angle_message; +var max_angle_defined = false; +var trim_angle_defined = false; +var battery_level = 0.0; +var battery_level_corrected; +var maximum_battery_level = 27.2; +var minimum_battery_level = 22.5; +var battery_status = false; +var min_radius = 0.0; +var reverse_direction = false; +var deactivate_imu_msg; +var imu_state = false; +var imu_temperature = 0.0; +var imu_temperature_status = 0.0; +var limit_temperature = 60.0; +var x_position; +var y_position; +var z_position; +var x_orientation; +var y_orientation; +var z_orientation; +var emergency_button_status = false; +var flw_data = ["","","",""]; +var blw_data = ["","","",""]; +var frw_data = ["","","",""]; +var brw_data = ["","","",""]; +var flw_direction_data = ["","","",""]; +var blw_direction_data = ["","","",""]; +var frw_direction_data = ["","","",""]; +var brw_direction_data = ["","","",""]; +var status_word_string = ""; +var status_word_sub_string = ""; + +// wheel drivers flag history +var flw_data_history = ["","","",""]; +var blw_data_history = ["","","",""]; +var frw_data_history = ["","","",""]; +var brw_data_history = ["","","",""]; +var flw_direction_data_history = ["","","",""]; +var blw_direction_data_history = ["","","",""]; +var frw_direction_data_history = ["","","",""]; +var brw_direction_data_history = ["","","",""]; + +//controller options +var gearbox_reduction = 12.52; +var diameter_wheel = 0.207; +var motors_encoders_factor = 4000; +var take_over= true; +var kinematic_mode = "skid"; +var motion_odometry = "false"; +var motors_encoder = "false"; +var x_wam= false; + +var status_codes = +["SW_READY_TO_SWITCH_ON", //0 +"SW_SWITCHED_ON", +"SW_OP_ENABLED", +"SW_FAULT", +"SW_VOLTAGE_ENABLED", +"SW_QUICK_STOP", //5 +"SW_SWITCH_ON_DISABLED", +"SW_WARNING", +"SW_DELAY", +"FLAG NOT USED", +"SW_TARGET_REACHED", //10 +"FLAG NOT USED", +"SW_HOME_ATTAINED", +"SW_HOMING_ERROR", +"SW_CAPTURE", //14 +"FLAG NOT USED"]; + +var drive_status_codes = [ +"DS_BRIDGE_ENABLED", //0 +"DS_DYNAMIC_BRAKE_ENABLED", +"DS_SHUNT_ENABLED", +"DS_POSITIVE_STOP_ENABLED", +"DS_NEGATIVE_STOP_ENABLED", +"DS_POSITIVE_TORQUE_INHIBIT_ACTIVE", //5 +"DS_NEGATIVE_TORQUE_INHIBIT_ACTIVE", +"DS_EXTERNAL_BRAKE_ACTIVE", +"DS_DRIVE_RESET", +"DS_DRIVE_INTERNAL_ERROR", +"DS_SHORT_CIRCUIT",//10 +"DS_CURRENT_OVERSHOOT", +"DS_UNDER_VOLTAGE", +"DS_OVER_VOLTAGE", +"DS_DRIVER_OVER_TEMPERATURE", +"DS_PARAMETER_RESTORE_ERROR",//15 +"DS_PARAMETER_STORE_ERROR", +"DS_INVALID_HALL_STATE", +"DS_PHASE_SYNC_ERROR", +"DS_MOTOR_OVER_TEMPERATURE", +"DS_PHASE_DETECTION_FAULT",//20 +"DS_FEEDBACK_SENSOR_ERROR", +"DS_MOTOR_OVER_SPEED", +"DS_MAX_MEASURED_POSITION", +"DS_MIN_MEASURED_POSITION", +"DS_COMMUNICATION_ERROR",//25 +"DS_LOG_ENTRY_MISSED", +"DS_COMMANDED_DISABLE", +"DS_USER_DISABLE", +"DS_POSITIVE_INHIBIT", +"DS_NEGATIVE_INHIBIT",//30 +"DS_CURRENT_LIMITING", +"DS_CONTINUOUS_CURRENT", +"DS_CURRENT_LOOP_SATURED", +"DS_USER_UNDER_VOLTAGE", +"DS_USER_OVER_VOLTAGE",//35 +"DS_NONSINUSOIDAL_COMMUTATION", +"DS_PHASE_DETECTION", +"DS_USER_AUXILIARY_DISABLE", +"DS_SHUNT_REGULATOR", +"DS_PHASE_DETECTION_COMPLETE",//40 +"DS_ZERO_VELOCITY", +"DS_AT_COMMAND", +"DS_VELOCITY_FOLLOWING_ERROR", +"DS_POSITIVE_TARGET_VELOCITY_LIMIT", +"DS_NEGATIVE_TARGET_VELOCITY_LIMIT",//45 +"DS_COMMAND_LIMITER_ACTIVE", +"DS_IN_HOME_POSITION", +"DS_POSITON_FOLLOWING_ERROR", +"DS_MAX_TARGET_POSITION_LIMIT", +"DS_MIN_TARGET_POSITION_LIMIT",//50 +"DS_LOAD_MEASURED_POSITION", +"DS_LOAD_TARGET", +"DS_HOMING_ACTIVE", +"DS_HOMING_COMPLETE", +"DS_PVT_BUFFER_FULL",//55 +"DS_PVT_BUFFER_EMPTY", +"DS_PVT_BUFFER_THRESHOLD", +"DS_PVT_BUFFER_FAILURE", +"DS_PVT_BUFFER_EMPTY_STOP", +"DS_PVT_BUFFER_SEQUENCE_ERROR",//60 +"DS_COMMANDED_STOP", +"DS_USER_QUICKSTOP", +"DS_COMMANDED_POSITIVE_LIMIT", +"DS_COMMANDED_NEGATIVE_LIMIT", +"DS_ABSOLUTE_POSITION_VALID", //65 +"DS_POSITIVE_STOP_ACTIVE", +"DS_NEGATIVE_STOP_ACTIVE", +"FLAG NOT USED"]; //68 + +/* +var ros = new ROSLIB.Ros({ + url : 'ws://localhost:9090' +});*/ + + +var ros = new ROSLIB.Ros({ + //url : 'ws://192.168.0.200:9090' + url : 'ws://localhost:9090' +}); + + +// Publishers +// ----------- +var aux = new ROSLIB.Topic({ + ros : ros, + name : '/axis_camera/ptz_command', + messageType : 'robotnik_msgs/ptz' +}); + + +// Subscribing to Topics + // ---------------------- + + + //battery topic + var listener = new ROSLIB.Topic({ + ros : ros, + name : '/summit_xl_controller/battery', + messageType : 'std_msgs/Float32' + }); + +//imu yaw angle topic +/* + var yawListener = new ROSLIB.Topic({ + ros : ros, + name : '/imu/yaw_acc', + messageType : 'std_msgs/Float32', + }); + */ + + //imu state topic + var imuStateListener = new ROSLIB.Topic({ + ros : ros, + name : '/imu/data_ok', + messageType : 'std_msgs/Bool' + }); + + + // IMU temperature topic (Arduimu) + //var imu_temperature_listener = new ROSLIB.Topic({ + //ros : ros, + //name : '/imu/temperature', + //messageType : 'std_msgs/Float32' + //}); + + // IMU temperature topic (Arduimu) + var imu_temperature_listener = new ROSLIB.Topic({ + ros : ros, + name : '/mavros/imu/temperature', + messageType : 'sensor_msgs/Temperature' + }); + + //emergency stop topic + var emergency_stop_listener = new ROSLIB.Topic({ + ros : ros, + name : '/summit_xl_controller/emergency_stop', + messageType : 'std_msgs/Bool' + }); + + // Odometry topic + var odometry_listener = new ROSLIB.Topic({ + ros : ros, + name : '/odom', + messageType : 'nav_msgs/Odometry' + }); + + // Motor Status topic + var motor_status_listener = new ROSLIB.Topic({ + ros : ros, + name : '/vulcano_base_hw/status', + messageType : '/vulcano_base_hw/VulcanoMotorsStatus' + }); + + //gps topic + var gps_listener = new ROSLIB.Topic({ + ros : ros, + name : '/extended_fix', + messageType : 'gps_common/GPSFix' + }); + + + +// Message Handlers +// ---------------------- + +// Battery + listener.subscribe(function(message) { + battery_level = message.data; + }); + + // Yaw Angle + /* + yawListener.subscribe(function(message) { + if ( message.data >= 90.0 ) + { + yaw_angle_right = message.data - 90.0; + yaw_angle_left = 0.0; + } + if ( message.data < 90.0 ) + { + yaw_angle_right = 0.0; + yaw_angle_left = 90.0 - message.data; + } + yaw_angle = message.data; + + document.querySelector('#yaw_angle span').innerHTML = Math.round(yaw_angle * 10000) / 10000; + //document.querySelector('#yaw_angle_left span').innerHTML = Math.round(yaw_angle_left * 10000) / 10000; + //document.querySelector('#yaw_angle_right span').innerHTML = Math.round(yaw_angle_right * 10000) / 10000; + +}); +*/ + +// IMU State +imuStateListener.subscribe(function(message) { + + + //console.log(message.data); + if ( message.data == true && !imu_state ){ + //document.querySelector('#imu_status span').innerHTML = "OK"; + document.querySelector('#imu_status span').innerHTML = ""; + imu_state = true; + + } + if ( message.data == false && imu_state){ + //document.querySelector('#imu_status span').innerHTML = "FAILURE"; + document.querySelector('#imu_status span').innerHTML = ""; + imu_state = false; + } + }); + + // IMU temperature listener (Arduimu) + //imu_temperature_listener.subscribe(function(message){ + //imu_temperature = message.data; + //}); + + // IMU temperature listener (Arduimu) + imu_temperature_listener.subscribe(function(message){ + imu_temperature = message.temperature; + }); + + + + // Emergency Stop Listener + emergency_stop_listener.subscribe(function(message){ + + if ( message.data) { + document.querySelector('#emergency_stop span').innerHTML = ""; + //emergency_button_status = true; + } + else if ( !message.data) { + document.querySelector('#emergency_stop span').innerHTML = ""; + //emergency_button_status = false; + } +}); + +// Odometry Listener + odometry_listener.subscribe(function(message){ + + + x_position = message.pose.pose.position.x; + y_position = message.pose.pose.position.y; + z_position = message.pose.pose.position.z; + + x_orientation = message.pose.pose.orientation.x; + y_orientation = message.pose.pose.orientation.y; + z_orientation = message.pose.pose.orientation.z; + + +}); + +// Motor Status Listener + motor_status_listener.subscribe(function(message){ + flw_data[0] = message.motor_status[4].state; + flw_data[1] = message.motor_status[4].status; + flw_data[2] = message.motor_status[4].statusword; + flw_data[3] = message.motor_status[4].driveflags; + + blw_data[0] = message.motor_status[5].state; + blw_data[1] = message.motor_status[5].status; + blw_data[2] = message.motor_status[5].statusword; + blw_data[3] = message.motor_status[5].driveflags; + + frw_data[0] = message.motor_status[6].state; + frw_data[1] = message.motor_status[6].status; + frw_data[2] = message.motor_status[6].statusword; + frw_data[3] = message.motor_status[6].driveflags; + + brw_data[0] = message.motor_status[7].state; + brw_data[1] = message.motor_status[7].status; + brw_data[2] = message.motor_status[7].statusword; + brw_data[3] = message.motor_status[7].driveflags; + + flw_direction_data[0] = message.motor_status[0].state; + flw_direction_data[1] = message.motor_status[0].status; + flw_direction_data[2] = message.motor_status[0].statusword; + flw_direction_data[3] = message.motor_status[0].driveflags; + + blw_direction_data[0] = message.motor_status[1].state; + blw_direction_data[1] = message.motor_status[1].status; + blw_direction_data[2] = message.motor_status[1].statusword; + blw_direction_data[3] = message.motor_status[1].driveflags; + + frw_direction_data[0] = message.motor_status[2].state; + frw_direction_data[1] = message.motor_status[2].status; + frw_direction_data[2] = message.motor_status[2].statusword; + frw_direction_data[3] = message.motor_status[2].driveflags; + + brw_direction_data[0] = message.motor_status[3].state; + brw_direction_data[1] = message.motor_status[3].status; + brw_direction_data[2] = message.motor_status[3].statusword; + brw_direction_data[3] = message.motor_status[3].driveflags; + + + // space is required for the comparison + if(flw_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#front_left_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#front_left_wheel_status span').innerHTML = ""; + } + + if(blw_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#back_left_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#back_left_wheel_status span').innerHTML = ""; + } + + if(frw_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#front_right_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#front_right_wheel_status span').innerHTML = ""; + } + + if(brw_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#back_right_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#back_right_wheel_status span').innerHTML = ""; + } + + // space is required for the comparison + if(flw_direction_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#front_left_direction_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#front_left_direction_wheel_status span').innerHTML = ""; + } + + if(blw_direction_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#back_left_direction_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#back_left_direction_wheel_status span').innerHTML = ""; + } + + if(frw_direction_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#front_right_direction_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#front_right_direction_wheel_status span').innerHTML = ""; + } + + if(brw_direction_data[1] == "OPERATION_ENABLED "){ + document.querySelector('#back_right_direction_wheel_status span').innerHTML = ""; + }else{ + document.querySelector('#back_right_direction_wheel_status span').innerHTML = ""; + } + + +}); + + gps_listener.subscribe(function(message) { + + document.querySelector('#gps_satellites_visible span').innerHTML = message.status.satellites_visible; + document.querySelector('#gps_satellites_used span').innerHTML = message.status.satellites_used; + document.querySelector('#gps_latitude span').innerHTML = message.latitude; + document.querySelector('#gps_longitude span').innerHTML = message.longitude; + + }); + + + +/*function startTime() +{ +aux.subscribe(function(mes){console.log('Received message on ' + mes.pan + ': ' + mes.tilt + ':' + mes.zoom + ':' + mes.relative); + var divelement = document.getElementById("rosmessage"); + var content =mes.pan + ";" + mes.tilt + ";" + mes.zoom + ";" + mes.relative; + divelement.innerHTML = content; + } +); +var ros2 = new ROSLIB.Ros({ + url:'ws://localhost:9090' +}); +var sensor = new ROSLIB.Topic({ + ros : ros2, + name : '/tilt_scan', + massageTyper : 'sensor_msgs/LaserScan' +}); +sensor.subscribe(function(message){console.log('Recived message on' + message.angle_min ); + var divelement = document.getElementById("sensortopic"); + var content =message.angle_min; + divelement.innerHTML = content; ) + +} +function startTime2(){ + + var ros = new ROSLIB.Ros({ + url : 'ws://localhost:9090' +}); + +var sensor = new ROSLIB.Topic({ + ros : ros, + name : '/tilt_scan', + messageType : 'sensor_msgs/LaserScan' +}); + +sensor.subscribe(function(mes){ + console.log('Recived message on' + mes.angle_min + ":"); + var divelement = document.getElementById("sensortopic"); + var content = mes.angle_min; + divelement.innerHTML = content; + + }); + +} +*/ + + + + function stopJo(){ + var ros = new ROSLIB.Ros({ + url : 'ws://summit:9090' + }); + + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/summit_xl_pad/enable_disable_pad', + messageType : 'summit_xl_pad/enable_disable_pad' + }); + + var data = new ROSLIB.ServiceRequest({ + value : true + }); + + aux2.callService(data,function(res){ + console.log("disable joystick"); + }); + + } + function startJo(){ + var ros = new ROSLIB.Ros({ + url : 'ws://summit:9090' + }); + + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/summit_xl_pad/enable_disable_pad', + messageType : 'summit_xl_pad/enable_disable_pad' + }); + + var data = new ROSLIB.ServiceRequest({ + value : false + }); + + aux2.callService(data,function(res){ + console.log("enable joystick"); + }); + + } + + function initial(){ + + pos_x= 0.0; + pos_y= 0.0; + pos_zoom = 0.0; + $( "#slider_zoom" ).slider( "value", 0 ); + var pos = new ROSLIB.Message({ + pan: 0.0, + tilt: 0.0, + zoom: 0.0, + relative: false + + }); + aux.publish(pos); + } + function move_cam_right(){ + + if(pos_zoom>4000){ + pos_x = pos_x + 2.5; + }else{pos_x=pos_x + 10.0; + } + move(); + + } + function move_cam_left(){ + if(pos_zoom>4000){ + pos_x = pos_x - 2.5; + }else{pos_x= pos_x - 10.0; + } + move(); + } + function move_cam_top(){ + + + //limit to 90º? + if(pos_y < 180 ){ + if(pos_zoom > 4000){ + pos_y = pos_y + 2.5; + } + else{ + pos_y = pos_y + 10.0; + } + } + move(); + } + + //function flip180(){} + function move_cam_dowm(){ + + if ( pos_y > 0 ){ + if(pos_zoom > 4000){ + pos_y = pos_y - 2.5; + } + else{ + pos_y = pos_y - 10.0; + } + } + move(); + } + function zoomx0(){ + + pos_zoom = 0.0; + move(); + } + function zoomx15(){ + + pos_zoom = 600.0; + move(); + } + function zoomx2(){ + + pos_zoom = 1550.0; + move(); + } + function zoomx3(){ + + pos_zoom = 2550.0; + move(); + } + function zoomx4(){ + + pos_zoom = 5000.0; + move(); + } + function zoomx5(){ + + pos_zoom = 8000.0; + move(); + } + function zoomx6(){ + + pos_zoom = 10000.0; + move(); + } + function zoomx7(){ + + pos_zoom = 13000.0; + move(); + } + function zoomx8(){ + + pos_zoom = 17200.0; + move(); + } + + function move(){ + var pos = new ROSLIB.Message({ + pan: pos_x, + tilt: pos_y, + zoom: pos_zoom, + relative: false + + }); + aux.publish(pos); + +} + function pos1(){ + pos_x= 180.0; + pos_y= 30.0; + pos_zoom = 0.0; + var pos = new ROSLIB.Message({ + pan: 180.0, + tilt: 30.0, + zoom: 0.0, + relative: false + + }); + aux.publish(pos); + } + function pos2(){ + pos_x= 100.0; + pos_y= 30.0; + pos_zoom = 0.0; + var pos = new ROSLIB.Message({ + pan: 100.0, + tilt: 30.0, + zoom: 0.0, + relative: false + + }); + aux.publish(pos); + } + function pos3(){ + pos_x= 50.0; + pos_y= 30.0; + pos_zoom = 0.0; + var pos = new ROSLIB.Message({ + pan: 50.0, + tilt: 30.0, + zoom: 0.0, + relative: false + + }); + aux.publish(pos); + } + function pos4(){ + pos_x= 0.0; + pos_y= 80.0; + pos_zoom = 0.0; + var pos = new ROSLIB.Message({ + pan: 0.0, + tilt: 80.0, + zoom: 0.0, + relative: false + + }); + aux.publish(pos); + } + + function Foward(){ + + + + + var aux2 = new ROSLIB.Topic({ + ros:ros, + name : '/summit_xl_controller/command', + messageType : 'geometry_msgs/Twist' + }); + + + var twist = new ROSLIB.Message({ + linear : { + x : 0.2, + y : 0.0, + z : 0.0 + }, + angular : { + x : 0.0, + y : 0.0, + z : 0.0 + } + }); + + aux2.publish(twist); + + } + function Back(){ + + + + + + var aux2 = new ROSLIB.Topic({ + ros:ros, + name : '/summit_xl_controller/command', + messageType : 'geometry_msgs/Twist' + }); + + + var twist = new ROSLIB.Message({ + linear : { + x : -0.2, + y : 0.0, + z : 0.0 + }, + angular : { + x : 0.0, + y : 0.0, + z : 0.0 + } + }); + + aux2.publish(twist); + + } + function Right(){ + + + var aux2 = new ROSLIB.Topic({ + ros:ros, + name : '/summit_xl_controller/command', + messageType : 'geometry_msgs/Twist' + }); + + + var twist = new ROSLIB.Message({ + linear : { + x : 0.0, + y : 0.0, + z : 0.0 + }, + angular : { + x : 0.0, + y : 0.0, + z : -0.2 + } + }); + + aux2.publish(twist); + + } + function Left(){ + + + + var aux2 = new ROSLIB.Topic({ + ros:ros, + name : '/summit_xl_controller/command', + messageType : 'geometry_msgs/Twist' + }); + + + var twist = new ROSLIB.Message({ + linear : { + x : 0.0, + y : 0.0, + z : 0.0 + }, + angular : { + x : 0.0, + y : 0.0, + z : 0.2 + } + }); + + aux2.publish(twist); + + } + + function startRecording(){ + + if(is_recording == 0) + is_recording = 1; + + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/start_recording', + messageType : 'summit_xl_web/RecordVideo' + }); + + var data = new ROSLIB.ServiceRequest({ + startRecording : 1 + }); + + aux2.callService(data,function(res){ + console.log("start recording"); + filename = res.filename; + + + }); + updateStrings(filename = ""); + } + + function stopRecording(){ + + if(is_recording == 1) + is_recording = 0; + + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/start_recording', + messageType : 'summit_xl_web/RecordVideo' + }); + + var data = new ROSLIB.ServiceRequest({ + startRecording : 0 + }); + + aux2.callService(data,function(res){ + console.log("stop recording"); + filename = res.filename; + console.log('Saved file on ' + res.filename); + updateStrings(filename); + }); + + + } + + function saveImage(){ + + //console.log("Saving Image"); + + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/start_recording', + messageType : 'summit_xl_web/RecordVideo' + }); + + var data = new ROSLIB.ServiceRequest({ + startRecording : 2 + }); + + aux2.callService(data,function(res){ + //console.log("Image saved"); + + document.querySelector('#imageStatus').innerHTML = "Image saved at " + res.filename; + }); + + } + + /* + function callkeydownhandler(evnt, event2) { + var ev = (evnt) ? evnt : event; + var ev2 = (evnt) ? evnt : event2; + var code=(ev.which) ? ev.which : event.keyCode; + var code2=(ev.which) ? ev.which : event.keyCode; + + if(code == 37) + Left(); + else if(code2 == 38) + Foward(); + else if(code == 39) + Right(); + else if(code2 == 40 ) + Back(); + } + + + if (window.document.addEventListener) { + window.document.addEventListener("keydown", callkeydownhandler, false); + } else { + window.document.attachEvent("onkeydown", callkeydownhandler); + } + */ + + function updateStrings(filename) + { + if(is_recording == 0) + document.querySelector('#videoStatus').innerHTML = filename + ' recorded'; + else if(is_recording == 1) + document.querySelector('#videoStatus').innerHTML = 'Recording video'; + } + + + function setMaximumAngle() + { + console.log("Set maximum angle"); + maxAngle = $("#max_angle_spinner").spinner("value"); + maxAngle = parseFloat(maxAngle); + console.log( maxAngle ); + + max_angle_message = new ROSLIB.Message({ + data : maxAngle + }); + + //set parameter + //max_angle_param.set(maxAngle); + } + + function setTrimAngle() + { + console.log("Set trim angle"); + trim_angle = $("#trim_spinner").spinner("value"); + trim_angle = parseFloat(trim_angle); + + trim_angle_message = new ROSLIB.Message({ + data : trim_angle + }); + + //set parameter + //trim_angle_param.set(trim_angle); + } + + function saveSettings() + { + maxAngle = $("#max_angle_spinner").spinner("value"); + maxAngle = parseFloat(maxAngle); + trim_angle = $("#trim_spinner").spinner("value"); + trim_angle = parseFloat(trim_angle); + min_radius = $("#min_radius_spinner").spinner("value"); + min_radius = parseFloat(min_radius); + reverse_direction = document.getElementById("reverse_direction_checkbox").checked; + //console.log(maxAngle + " " + trim_angle + " " + min_radius + " " + reverse_direction); + + + + } + + function deactivateIMU(){ + deactivate_imu_msg.data = true; + document.querySelector('#imu_connected span').innerHTML = "NO"; + } + + function activateIMU(){ + deactivate_imu_msg.data = false; + document.querySelector('#imu_connected span').innerHTML = "SI"; + } + + function reset_odometry(){ + + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/set_odometry', + messageType : 'robotnik_msgs/set_odometry' + }); + + var data = new ROSLIB.ServiceRequest({ + x : 0.0, + y : 0.0, + z : 0.0, + orientation : 0.0 + }); + + aux2.callService(data,function(res){ + + }); + + } + + function saveControllerOptions(){ + + //get options from ui + + take_over = document.getElementById("take_over_checkbox").checked; + + x_wam = document.getElementById("robot_type").value; + + kinematic_mode = document.getElementById("kinematic_mode").value; + + gearbox_reduction = $("#gearbox_reduction_spinner").spinner("value"); + gearbox_reduction = parseFloat(gearbox_reduction); + + diameter_wheel = $("#diameter_wheel_spinner").spinner("value"); + diameter_wheel = parseFloat(diameter_wheel); + + motion_odometry = document.getElementById("motion_odometry_checkbox").checked; + if (motion_odometry) + motion_odometry = "true"; + else + motion_odometry = "false"; + + motors_encoders = document.getElementById("motors_encoders_checkbox").checked; + if (motors_encoders) + motors_encoders = "true"; + else + motors_encoders = "false"; + + motors_encoders_factor = $("#motors_encoders_factor_spinner").spinner("value"); + motors_encoders_factor = parseFloat(motors_encoders_factor); + + + + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/set_controller_options', + messageType : 'summit_xl_web/set_controller_options' + }); + + var data = new ROSLIB.ServiceRequest({ + takeOver : take_over, + kinematicMode: kinematic_mode, + gearboxReduction : gearbox_reduction, + diameterWheel : diameter_wheel, + motionOdometry : motion_odometry, + motorsEncoder : motors_encoders, + motorsEncoderFactor : motors_encoders_factor, + xWam : x_wam + }); + + aux2.callService(data,function(res){}); + + } + + function update_controller_options(){ + var aux2 = new ROSLIB.Service({ + ros : ros, + name : '/get_controller_options', + messageType : 'summit_xl_web/get_controller_options' + }); + var data = new ROSLIB.ServiceRequest({}); + + aux2.callService(data,function(res){ + console.log(res.takeOver); + console.log(res.kinematicMode); + console.log(res.gearboxReduction); + console.log(res.diameterWheel); + console.log(res.motionOdometry); + console.log(res.motorsEncoder); + console.log(res.motorsEncoderFactor); + console.log(res.xWam); + + + if(res.motionOdometry == "true") + motion_odometry = true; + else + motion_odometry = false; + + if(res.motorsEncoder == "true") + motors_encoder = true; + else + motors_encoder = false; + + document.getElementById("take_over_checkbox").checked = res.takeOver; + + + document.getElementById("motion_odometry_checkbox").checked = motion_odometry; + + + document.getElementById("motors_encoders_checkbox").checked = motors_encoder; + + $("#gearbox_reduction_spinner").spinner("value",res.gearboxReduction); + $("#diameter_wheel_spinner").spinner("value",res.diameterWheel); + $("#motors_encoders_factor_spinner").spinner("value",res.motorsEncoderFactor); + document.getElementById("robot_type").value = res.xWam; + document.getElementById("kinematic_mode").value = res.kinematicMode; + }); + + } + + function resetDriverHistory() + { + + for(var i=0; i= 23.0 && !battery_status ) { + document.querySelector('#battery_ok span').innerHTML = ""; + //console.log("Bateria ok"); + battery_status = true; + } + + + // update imu temperature + // ------------- + imu_temperature = Math.round(imu_temperature * 100) / 100; + document.querySelector('#imu_temperature span').innerHTML = imu_temperature; + + if ( imu_temperature < limit_temperature && !imu_temperature_status) { + document.querySelector('#imu_temperature_alarm span').innerHTML = ""; + imu_temperature_status = true; + } + else if (imu_temperature >= limit_temperature && imu_temperature_status) + document.querySelector('#imu_temperature_alarm span').innerHTML = ""; + imu_temperature_status = false; + + + // update odometry + // ------------- + + x_position = Math.round(x_position * 10000) / 10000; + y_position = Math.round(y_position * 10000) / 10000; + z_position = Math.round(z_position * 10000) / 10000; + + x_orientation = Math.round(x_orientation * 10000) / 10000; + y_orientation = Math.round(y_orientation * 10000) / 10000; + z_orientation = Math.round(z_orientation * 10000) / 10000; + + if (x_position == 0) x_position = x_position.toFixed(4); + if (y_position == 0) y_position = y_position.toFixed(4); + if (z_position == 0) z_position = z_position.toFixed(4); + if (x_orientation == 0) x_orientation = x_orientation.toFixed(4); + if (y_orientation == 0) y_orientation = y_orientation.toFixed(4); + if (z_orientation == 0) z_orientation = z_orientation.toFixed(4); + + + document.querySelector('#odometry_position_x span').innerHTML = x_position; + document.querySelector('#odometry_position_y span').innerHTML = y_position; + document.querySelector('#odometry_position_z span').innerHTML = z_position; + + document.querySelector('#odometry_orientation_x span').innerHTML = x_orientation; + document.querySelector('#odometry_orientation_y span').innerHTML = y_orientation; + document.querySelector('#odometry_orientation_z span').innerHTML = z_orientation; + + //update motor values + + // Front Left Motor + // ---------------- + document.querySelector('#flw_state span').innerHTML = flw_data[0]; + document.querySelector('#flw_status span').innerHTML = flw_data[1]; + + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < flw_data[2].length ; i++) + { + if(flw_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + flw_data_history[2] = flw_data_history[2].substr(0, i) + '1' + flw_data_history[2].substr(i + 1); + } + else + { + if(flw_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#flw_status_words span').innerHTML = status_word_string; + + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < flw_data[3].length ; i++) + { + if(flw_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + flw_data_history[3] = flw_data_history[3].substr(0, i) + '1' + flw_data_history[3].substr(i + 1); + } + else + { + if(flw_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#flw_driver_status_words span').innerHTML = status_word_string; + + + // Front Right Motor + // ---------------- + + document.querySelector('#frw_state span').innerHTML = frw_data[0]; + document.querySelector('#frw_status span').innerHTML = frw_data[1]; + + // status codes + // ------------- + status_word_string = ""; + status_word_sub_string = ""; + + for( var i = 0; i < frw_data[2].length ; i++) + { + if(frw_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + frw_data_history[2] = frw_data_history[2].substr(0, i) + '1' + frw_data_history[2].substr(i + 1); + } + else + { + if(frw_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#frw_status_words span').innerHTML = status_word_string; + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < frw_data[3].length ; i++) + { + if(frw_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + frw_data_history[3] = frw_data_history[3].substr(0, i) + '1' + frw_data_history[3].substr(i + 1); + } + else + { + if(frw_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#frw_driver_status_words span').innerHTML = status_word_string; + + + // Back Left Motor + // ---------------- + document.querySelector('#blw_state span').innerHTML = blw_data[0]; + document.querySelector('#blw_status span').innerHTML = blw_data[1]; + status_word_string = ""; + status_word_sub_string = ""; + + for( var i = 0; i < blw_data[2].length ; i++) + { + if(blw_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + blw_data_history[2] = blw_data_history[2].substr(0, i) + '1' + blw_data_history[2].substr(i + 1); + } + else + { + if(blw_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#blw_status_words span').innerHTML = status_word_string; + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < blw_data[3].length ; i++) + { + if(blw_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + blw_data_history[3] = blw_data_history[3].substr(0, i) + '1' + blw_data_history[3].substr(i + 1); + } + else + { + if(blw_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#blw_driver_status_words span').innerHTML = status_word_string; + + + // Back Right Motor + // ---------------- + + document.querySelector('#brw_state span').innerHTML = brw_data[0]; + document.querySelector('#brw_status span').innerHTML = brw_data[1]; + status_word_string = ""; + status_word_sub_string = ""; + + for( var i = 0; i < brw_data[2].length ; i++) + { + if(brw_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + brw_data_history[2] = brw_data_history[2].substr(0, i) + '1' + brw_data_history[2].substr(i + 1); + } + else + { + if(brw_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#brw_status_words span').innerHTML = status_word_string; + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < brw_data[3].length ; i++) + { + if(brw_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + brw_data_history[3] = brw_data_history[3].substr(0, i) + '1' + brw_data_history[3].substr(i + 1); + } + else + { + if(brw_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#brw_driver_status_words span').innerHTML = status_word_string; + + + // Front Left Motor Direction + // ---------------- + document.querySelector('#flw_direction_state span').innerHTML = flw_direction_data[0]; + document.querySelector('#flw_direction_status span').innerHTML = flw_direction_data[1]; + + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < flw_direction_data[2].length ; i++) + { + if(flw_direction_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + flw_direction_data_history[2] = flw_direction_data_history[2].substr(0, i) + '1' + flw_direction_data_history[2].substr(i + 1); + } + else + { + if(flw_direction_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#flw_direction_status_words span').innerHTML = status_word_string; + + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < flw_direction_data[3].length ; i++) + { + if(flw_direction_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + flw_direction_data_history[3] = flw_direction_data_history[3].substr(0, i) + '1' + flw_direction_data_history[3].substr(i + 1); + } + else + { + if(flw_direction_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#flw_direction_driver_status_words span').innerHTML = status_word_string; + + + // Front Right Motor Direction + // ---------------- + + document.querySelector('#frw_direction_state span').innerHTML = frw_direction_data[0]; + document.querySelector('#frw_direction_status span').innerHTML = frw_direction_data[1]; + + // status codes + // ------------- + status_word_string = ""; + status_word_sub_string = ""; + + for( var i = 0; i < frw_direction_data[2].length ; i++) + { + if(frw_direction_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + frw_direction_data_history[2] = frw_direction_data_history[2].substr(0, i) + '1' + frw_direction_data_history[2].substr(i + 1); + } + else + { + if(frw_direction_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#frw_direction_status_words span').innerHTML = status_word_string; + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < frw_direction_data[3].length ; i++) + { + if(frw_direction_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + frw_direction_data_history[3] = frw_direction_data_history[3].substr(0, i) + '1' + frw_direction_data_history[3].substr(i + 1); + } + else + { + if(frw_direction_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#frw_direction_driver_status_words span').innerHTML = status_word_string; + + + // Back Left Motor Direction + // ---------------- + document.querySelector('#blw_direction_state span').innerHTML = blw_direction_data[0]; + document.querySelector('#blw_direction_status span').innerHTML = blw_direction_data[1]; + status_word_string = ""; + status_word_sub_string = ""; + + for( var i = 0; i < blw_direction_data[2].length ; i++) + { + if(blw_direction_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + blw_direction_data_history[2] = blw_direction_data_history[2].substr(0, i) + '1' + blw_direction_data_history[2].substr(i + 1); + } + else + { + if(blw_direction_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#blw_direction_status_words span').innerHTML = status_word_string; + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < blw_direction_data[3].length ; i++) + { + if(blw_direction_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + blw_direction_data_history[3] = blw_direction_data_history[3].substr(0, i) + '1' + blw_direction_data_history[3].substr(i + 1); + } + else + { + if(blw_direction_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#blw_direction_driver_status_words span').innerHTML = status_word_string; + + + // Back Right Motor Direction + // ---------------- + + document.querySelector('#brw_direction_state span').innerHTML = brw_direction_data[0]; + document.querySelector('#brw_direction_status span').innerHTML = brw_direction_data[1]; + status_word_string = ""; + status_word_sub_string = ""; + + for( var i = 0; i < brw_direction_data[2].length ; i++) + { + if(brw_direction_data[2][i] == 1) + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + brw_direction_data_history[2] = brw_direction_data_history[2].substr(0, i) + '1' + brw_direction_data_history[2].substr(i + 1); + } + else + { + if(brw_direction_data_history[2][i] == 1) // flag used in the past + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#brw_direction_status_words span').innerHTML = status_word_string; + status_word_string = ""; + status_word_sub_string = ""; + for( var i = 0; i < brw_direction_data[3].length ; i++) + { + if(brw_direction_data[3][i] == 1) + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + + // updating history + brw_direction_data_history[3] = brw_direction_data_history[3].substr(0, i) + '1' + brw_direction_data_history[3].substr(i + 1); + } + else + { + if(brw_direction_data_history[3][i] == 1) // flag used in the past + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string,""); + //console.log("flag used in the past"); + } + else // flag off + { + status_word_sub_string = drive_status_codes[i]; + status_word_string = status_word_string.concat("
",status_word_sub_string); + } + } + }; + document.querySelector('#brw_direction_driver_status_words span').innerHTML = status_word_string; + + } + + //jquery init + $(document).ready(function() { + + //set tab + $( "#tabs" ).tabs(); + + $( "#tabs" ).on( "tabsactivate", function( event, ui ) { + //console.log("before activate"); + console.log(event); + //console.log(ui.newPanel.selector); + + // update displays (controller) + update_controller_options(); + + if(ui.newPanel.selector == "#tabs-2" ) + { + + + var pass1 = prompt('Introduzca contraseña',''); + if(pass1 == "robotnik") + { + console.log("correct password"); + + //update displays (elliot) + /* + $("#max_angle_spinner").spinner("value",max_angle); + $("#trim_spinner").spinner("value",trim_angle); + $("#min_radius_spinner").spinner("value",min_radius); + document.getElementById("reverse_direction_checkbox").checked = reverse_direction + */ + + + } + else { + console.log("incorrect password"); + $( "#tabs" ).tabs( "option", "active", 0 ); + //$( "#tabs" ).tabs( "load", 0 ); + } + } + + var active = $( "#tabs" ).tabs( "option", "active" ); + console.log("panel active: " + active); + }); + + var yaw_angle_left_100 = 0.0; + var yaw_angle_right_100 = 0.0; + + //Progress bars + $("#progressbar_battery").progressbar({value: battery_level}); + $("#progressbar_battery" ).progressbar( "option", "max", maximum_battery_level - minimum_battery_level ); + + $("#progressbar_left").progressbar({value: yaw_angle_left}); + $("#progressbar_right").progressbar({value: yaw_angle_right}); + + + //Spinners (elliot options + /* + $("#max_angle_spinner").spinner({step: 0.1, min: 0.0, max: 90.0}); + $("#max_angle_spinner").spinner("value",max_angle); + $("#trim_spinner").spinner({step: 0.1, min: -1.0, max: 1.0}); + $("#trim_spinner").spinner("value",trim_angle); + $("#min_radius_spinner").spinner({step: 0.1, min: 0.0, max: 10.0}); + $("#min_radius_spinner").spinner("value",1.0); + */ + + //Spinners (controller options) + $("#gearbox_reduction_spinner").spinner({step: 0.01, min: 0.0, max: 100.0}); + $("#gearbox_reduction_spinner").spinner("value",gearbox_reduction); + $("#diameter_wheel_spinner").spinner({step: 0.001, min: 0.0, max: 1.0}); + $("#diameter_wheel_spinner").spinner("value",diameter_wheel); + $("#motors_encoders_factor_spinner").spinner({step: 1, min: 0, max: 100000}); + $("#motors_encoders_factor_spinner").spinner("value",motors_encoders_factor); + + + //document.querySelector('#imu_connected span').innerHTML = "SI"; + + + // Sliders + $( "#slider_zoom" ).slider(); + $( "#slider_focus" ).slider(); + $( "#slider_zoom" ).on( "slidechange", function( event, ui ) { + + + var slider_value = $( "#slider_zoom" ).slider( "value" ); + pos_zoom = slider_value * 172; + //console.log(pos_zoom); + move(); + } ); + + // init alarms + document.querySelector('#imu_status span').innerHTML = ""; + document.querySelector('#battery_ok span').innerHTML = ""; + document.querySelector('#imu_temperature_alarm span').innerHTML = ""; + document.querySelector('#emergency_stop span').innerHTML = ""; + document.querySelector('#front_left_wheel_status span').innerHTML = ""; + document.querySelector('#front_right_wheel_status span').innerHTML = ""; + document.querySelector('#back_left_wheel_status span').innerHTML = ""; + document.querySelector('#back_right_wheel_status span').innerHTML = ""; + document.querySelector('#front_left_direction_wheel_status span').innerHTML = ""; + document.querySelector('#front_right_direction_wheel_status span').innerHTML = ""; + document.querySelector('#back_left_direction_wheel_status span').innerHTML = ""; + document.querySelector('#back_right_direction_wheel_status span').innerHTML = ""; + + //init messages + max_angle_message = new ROSLIB.Message({ + data : max_angle + }); + + trim_angle_message = new ROSLIB.Message({ + data : trim_angle + }); + + deactivate_imu_msg = new ROSLIB.Message({ + data : false + }); + + // Motor Dialogs + // -------------- + + // Front Left Direction Wheel + // ---------------- + + $("#dialog_flw_direction").dialog({ + autoOpen: false + }); + + $("#button_flw_direction").click(function(){ + + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_flw_direction").dialog("open"); + }); + + // Front Right Direction Wheel + // ---------------- + + $("#dialog_frw_direction").dialog({ + autoOpen: false + }); + + $("#button_frw_direction").click(function(){ + + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_frw_direction").dialog("open"); + }); + + // Back Left Direction Wheel + // ---------------- + + $("#dialog_blw_direction").dialog({ + autoOpen: false + }); + + $("#button_blw_direction").click(function(){ + + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_blw_direction").dialog("open"); + }); + + // Back Right Direction Wheel + // ---------------- + + $("#dialog_brw_direction").dialog({ + autoOpen: false + }); + + $("#button_brw_direction").click(function(){ + + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_brw_direction").dialog("open"); + }); + + // Front Left Traction Wheel + // ---------------- + + $("#dialog_flw").dialog({ + autoOpen: false + }); + + $("#button_flw").click(function(){ + + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_flw").dialog("open"); + }); + + // Front Right Traction Wheel + // ---------------- + + $("#dialog_frw").dialog({ + autoOpen: false + }); + + $("#button_frw").click(function(){ + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_frw").dialog("open"); + }); + + // Back Left Traction Wheel + // ---------------- + + $("#dialog_blw").dialog({ + autoOpen: false + }); + + $("#button_blw").click(function(){ + + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_blw").dialog("open"); + }); + + // Back Right Traction Wheel + // ---------------- + + $("#dialog_brw").dialog({ + autoOpen: false + }); + + $("#button_brw").click(function(){ + + //close other dialogs + // fist direction dialogs + $("#dialog_flw_direction").dialog("close"); + $("#dialog_frw_direction").dialog("close"); + $("#dialog_blw_direction").dialog("close"); + $("#dialog_brw_direction").dialog("close"); + + // then traction dialogs + $("#dialog_flw").dialog("close"); + $("#dialog_frw").dialog("close"); + $("#dialog_blw").dialog("close"); + $("#dialog_brw").dialog("close"); + + $("#dialog_brw").dialog("open"); + }); + + + // reset drivers data history + resetDriverHistory(); + + + //call to mainLoop each x ms + setInterval(mainLoop, 1000); + }); diff --git a/vulcano_web/javascript_libraries/ColladaLoader2.js b/vulcano_web/javascript_libraries/ColladaLoader2.js new file mode 100755 index 0000000..bff9e95 --- /dev/null +++ b/vulcano_web/javascript_libraries/ColladaLoader2.js @@ -0,0 +1,4365 @@ +(function() { + var ColladaAnimation, ColladaAnimationTarget, ColladaAsset, ColladaCamera, ColladaCameraParam, ColladaChannel, ColladaColorOrTexture, ColladaController, ColladaEffect, ColladaEffectSampler, ColladaEffectSurface, ColladaEffectTechnique, ColladaFile, ColladaFxLink, ColladaGeometry, ColladaImage, ColladaInput, ColladaInstanceCamera, ColladaInstanceController, ColladaInstanceGeometry, ColladaInstanceLight, ColladaInstanceMaterial, ColladaJoints, ColladaLight, ColladaLightParam, ColladaLoader2, ColladaMaterial, ColladaNodeTransform, ColladaSampler, ColladaSidLink, ColladaSkin, ColladaSource, ColladaTriangles, ColladaUrlLink, ColladaVertexWeights, ColladaVertices, ColladaVisualScene, ColladaVisualSceneNode, TO_RADIANS, ThreejsAnimationChannel, ThreejsMaterialMap, ThreejsSkeletonBone, getNodeInfo, graphNodeString, indentString, _checkMatrix4, _colorToHex, _fillMatrix4ColumnMajor, _fillMatrix4RowMajor, _floatsToMatrix4ColumnMajor, _floatsToMatrix4RowMajor, _floatsToVec3, _strToBools, _strToColor, _strToFloats, _strToInts, _strToStrings, + __hasProp = Object.prototype.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor; child.__super__ = parent.prototype; return child; }; + + indentString = function(count, str) { + var i, output; + output = ""; + for (i = 1; i <= count; i += 1) { + output += " "; + } + output += str; + return output; + }; + + graphNodeString = function(indent, str) { + return indentString(indent, "|-" + str); + }; + + getNodeInfo = function(node, indent, prefix) { + if (!(node != null)) return ""; + if (typeof node === "string") { + return graphNodeString(indent, prefix + ("'" + node + "'\n")); + } + if (typeof node === "number") { + return graphNodeString(indent, prefix + ("" + node + "\n")); + } + if (typeof node === "boolean") { + return graphNodeString(indent, prefix + ("" + node + "\n")); + } + if (node.getInfo != null) return node.getInfo(indent, prefix); + return graphNodeString(indent, prefix + "\n"); + }; + + ColladaUrlLink = (function() { + + function ColladaUrlLink(url) { + this.url = url.trim().replace(/^#/, ""); + this.object = null; + } + + ColladaUrlLink.prototype.getInfo = function(indent, prefix) { + return graphNodeString(indent, prefix + ("\n")); + }; + + return ColladaUrlLink; + + })(); + + ColladaFxLink = (function() { + + function ColladaFxLink(url, scope) { + this.url = url; + this.scope = scope; + this.object = null; + } + + ColladaFxLink.prototype.getInfo = function(indent, prefix) { + return graphNodeString(indent, prefix + ("\n")); + }; + + return ColladaFxLink; + + })(); + + ColladaSidLink = (function() { + + function ColladaSidLink(parentId, url) { + var arrIndices, arrSyntax, dotSyntax, index, lastSid, parts, _i, _len; + this.url = url; + this.object = null; + this.id = null; + this.sids = []; + this.member = null; + this.indices = null; + this.dotSyntax = false; + this.arrSyntax = false; + parts = url.split("/"); + this.id = parts.shift(); + if (this.id === ".") this.id = parentId; + while (parts.length > 1) { + this.sids.push(parts.shift()); + } + if (parts.length > 0) { + lastSid = parts[0]; + dotSyntax = lastSid.indexOf(".") >= 0; + arrSyntax = lastSid.indexOf("(") >= 0; + if (dotSyntax) { + parts = lastSid.split("."); + this.sids.push(parts.shift()); + this.member = parts.shift(); + this.dotSyntax = true; + } else if (arrSyntax) { + arrIndices = lastSid.split("("); + this.sids.push(arrIndices.shift()); + this.indices = []; + for (_i = 0, _len = arrIndices.length; _i < _len; _i++) { + index = arrIndices[_i]; + this.indices.push(parseInt(index.replace(/\)/, ""), 10)); + } + this.arrSyntax = true; + } else { + this.sids.push(lastSid); + } + } + } + + ColladaSidLink.prototype.getInfo = function(indent, prefix) { + var output, str; + str = " 0) { + str += ", sids='["; + str += this.sids.join(","); + str += "]'"; + } + str += ">\n"; + return output = graphNodeString(indent, prefix + str); + }; + + return ColladaSidLink; + + })(); + + ColladaAnimationTarget = (function() { + + function ColladaAnimationTarget() { + this.animTarget = {}; + this.animTarget.channels = []; + this.animTarget.activeChannels = []; + this.animTarget.dataRows = null; + this.animTarget.dataColumns = null; + } + + ColladaAnimationTarget.prototype.selectAnimation = function(filter) { + var channel, i, _len, _ref; + this.animTarget.activeChannels = []; + _ref = this.animTarget.channels; + for (i = 0, _len = _ref.length; i < _len; i++) { + channel = _ref[i]; + if (filter(channel, i)) this.animTarget.activeChannels.push(channel); + } + }; + + ColladaAnimationTarget.prototype.selectAnimationById = function(id) { + this.selectAnimation(function(channel, i) { + return channel.animation.id === id; + }); + }; + + ColladaAnimationTarget.prototype.selectAnimationByName = function(name) { + this.selectAnimation(function(channel, i) { + return channel.animation.name === name; + }); + }; + + ColladaAnimationTarget.prototype.selectAllAnimations = function(index) { + this.selectAnimation(function(channel, i) { + return true; + }); + }; + + ColladaAnimationTarget.prototype.applyAnimationKeyframe = function(keyframe) { + throw new Error("applyAnimationKeyframe() not implemented"); + }; + + ColladaAnimationTarget.prototype.initAnimationTarget = function() { + throw new Error("initAnimationTarget() not implemented"); + }; + + ColladaAnimationTarget.prototype.resetAnimation = function() { + throw new Error("resetAnimation() not implemented"); + }; + + return ColladaAnimationTarget; + + })(); + + ColladaAsset = (function() { + + function ColladaAsset() { + this.unit = 1; + this.upAxis = null; + } + + ColladaAsset.prototype.getInfo = function(indent, prefix) { + return graphNodeString(indent, prefix + "\n"); + }; + + return ColladaAsset; + + })(); + + ColladaVisualScene = (function() { + + function ColladaVisualScene() { + this.id = null; + this.children = []; + this.sidChildren = []; + } + + ColladaVisualScene.prototype.getInfo = function(indent, prefix) { + var child, output, _i, _len, _ref; + output = graphNodeString(indent, prefix + ("\n")); + if (this.children != null) { + _ref = this.children; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + output += getNodeInfo(child, indent + 1, "child "); + } + } + return output; + }; + + return ColladaVisualScene; + + })(); + + ColladaVisualSceneNode = (function() { + + function ColladaVisualSceneNode() { + this.id = null; + this.sid = null; + this.name = null; + this.type = null; + this.layer = null; + this.parent = null; + this.children = []; + this.sidChildren = []; + this.transformations = []; + this.geometries = []; + this.controllers = []; + this.lights = []; + this.cameras = []; + } + + ColladaVisualSceneNode.prototype.getInfo = function(indent, prefix) { + var child, output, _i, _j, _k, _l, _len, _len2, _len3, _len4, _len5, _m, _ref, _ref2, _ref3, _ref4, _ref5; + output = graphNodeString(indent, prefix + ("\n")); + if (this.geometries != null) { + _ref = this.geometries; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + output += getNodeInfo(child, indent + 1, "geometry "); + } + } + if (this.controllers != null) { + _ref2 = this.controllers; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + child = _ref2[_j]; + output += getNodeInfo(child, indent + 1, "controller "); + } + } + if (this.lights != null) { + _ref3 = this.lights; + for (_k = 0, _len3 = _ref3.length; _k < _len3; _k++) { + child = _ref3[_k]; + output += getNodeInfo(child, indent + 1, "light "); + } + } + if (this.cameras != null) { + _ref4 = this.cameras; + for (_l = 0, _len4 = _ref4.length; _l < _len4; _l++) { + child = _ref4[_l]; + output += getNodeInfo(child, indent + 1, "camera "); + } + } + if (this.children != null) { + _ref5 = this.children; + for (_m = 0, _len5 = _ref5.length; _m < _len5; _m++) { + child = _ref5[_m]; + output += getNodeInfo(child, indent + 1, "child "); + } + } + return output; + }; + + ColladaVisualSceneNode.prototype.getTransformMatrix = function(result) { + var temp, transform, _i, _len, _ref; + temp = new THREE.Matrix4; + result.identity(); + _ref = this.transformations; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + transform = _ref[_i]; + transform.getTransformMatrix(temp); + result.multiplyMatrices(result, temp); + } + }; + + return ColladaVisualSceneNode; + + })(); + + ColladaNodeTransform = (function(_super) { + + __extends(ColladaNodeTransform, _super); + + function ColladaNodeTransform() { + ColladaNodeTransform.__super__.constructor.call(this); + this.sid = null; + this.type = null; + this.data = null; + this.originalData = null; + this.node = null; + } + + ColladaNodeTransform.prototype.getTransformMatrix = function(result) { + var axis; + switch (this.type) { + case "matrix": + _fillMatrix4RowMajor(this.data, 0, result); + break; + case "rotate": + axis = new THREE.Vector3(this.data[0], this.data[1], this.data[2]); + result.makeRotationAxis(axis, this.data[3] * TO_RADIANS); + break; + case "translate": + result.makeTranslation(this.data[0], this.data[1], this.data[2]); + break; + case "scale": + result.makeScale(this.data[0], this.data[1], this.data[2]); + break; + default: + throw new Error("transform type '" + this.type + "' not implemented"); + } + }; + + ColladaNodeTransform.prototype.applyAnimationKeyframe = function(keyframe) { + var channel, i, outputData, _i, _len, _ref, _ref2; + _ref = this.animTarget.activeChannels; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + channel = _ref[_i]; + outputData = channel.outputData; + for (i = 0, _ref2 = channel.count - 1; i <= _ref2; i += 1) { + this.data[channel.offset + i] = outputData[keyframe * channel.stride + i]; + } + } + }; + + ColladaNodeTransform.prototype.initAnimationTarget = function() { + var i, x, _len, _ref; + this.originalData = new Float32Array(this.data.length); + _ref = this.data; + for (i = 0, _len = _ref.length; i < _len; i++) { + x = _ref[i]; + this.originalData[i] = this.data[i]; + } + switch (this.type) { + case "matrix": + this.animTarget.dataColumns = 4; + this.animTarget.dataRows = 4; + break; + case "rotate": + this.animTarget.dataColumns = 4; + this.animTarget.dataRows = 1; + break; + case "translate": + case "scale": + this.animTarget.dataColumns = 3; + this.animTarget.dataRows = 1; + break; + default: + throw new Error("transform type '" + this.type + "' not implemented"); + } + }; + + ColladaNodeTransform.prototype.resetAnimation = function() { + var i, x, _len, _ref; + _ref = this.originalData; + for (i = 0, _len = _ref.length; i < _len; i++) { + x = _ref[i]; + this.data[i] = this.originalData[i]; + } + }; + + return ColladaNodeTransform; + + })(ColladaAnimationTarget); + + ColladaInstanceGeometry = (function() { + + function ColladaInstanceGeometry() { + this.geometry = null; + this.materials = []; + this.sidChildren = []; + } + + ColladaInstanceGeometry.prototype.getInfo = function(indent, prefix) { + var material, output, _i, _len, _ref; + output = graphNodeString(indent, prefix + "\n"); + output += getNodeInfo(this.geometry, indent + 1, "geometry "); + _ref = this.materials; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + material = _ref[_i]; + output += getNodeInfo(material, indent + 1, "material "); + } + return output; + }; + + return ColladaInstanceGeometry; + + })(); + + ColladaInstanceController = (function() { + + function ColladaInstanceController() { + this.controller = null; + this.skeletons = []; + this.materials = []; + this.sidChildren = []; + } + + ColladaInstanceController.prototype.getInfo = function(indent, prefix) { + var material, output, skeleton, _i, _j, _len, _len2, _ref, _ref2; + output = graphNodeString(indent, prefix + "\n"); + output += getNodeInfo(this.controller, indent + 1, "controller "); + _ref = this.skeletons; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + skeleton = _ref[_i]; + output += getNodeInfo(skeleton, indent + 1, "skeleton "); + } + _ref2 = this.materials; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + material = _ref2[_j]; + output += getNodeInfo(material, indent + 1, "material "); + } + return output; + }; + + return ColladaInstanceController; + + })(); + + ColladaInstanceMaterial = (function() { + + function ColladaInstanceMaterial() { + this.sid = null; + this.symbol = null; + this.material = null; + this.name = null; + this.vertexInputs = {}; + this.params = {}; + } + + ColladaInstanceMaterial.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.material, indent + 1, "material "); + return output; + }; + + return ColladaInstanceMaterial; + + })(); + + ColladaInstanceLight = (function() { + + function ColladaInstanceLight() { + this.sid = null; + this.light = null; + this.name = null; + this.sidChildren = []; + } + + ColladaInstanceLight.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + "\n"); + output += getNodeInfo(this.light, indent + 1, "light "); + return output; + }; + + return ColladaInstanceLight; + + })(); + + ColladaInstanceCamera = (function() { + + function ColladaInstanceCamera() { + this.sid = null; + this.camera = null; + this.name = null; + this.sidChildren = []; + } + + ColladaInstanceCamera.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + "\n"); + output += getNodeInfo(this.light, indent + 1, "camera "); + return output; + }; + + return ColladaInstanceCamera; + + })(); + + ColladaImage = (function() { + + function ColladaImage() { + this.id = null; + this.initFrom = null; + } + + ColladaImage.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.initFrom, indent + 1, "initFrom "); + return output; + }; + + return ColladaImage; + + })(); + + ColladaEffect = (function() { + + function ColladaEffect() { + this.id = null; + this.sids = {}; + this.technique = null; + } + + ColladaEffect.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.technique, indent + 1, "technique "); + return output; + }; + + return ColladaEffect; + + })(); + + ColladaEffectTechnique = (function() { + + function ColladaEffectTechnique() { + this.sid = null; + this.sids = {}; + this.fxScope = null; + this.shading = null; + this.emission = null; + this.ambient = null; + this.diffuse = null; + this.specular = null; + this.shininess = null; + this.reflective = null; + this.transparent = null; + this.bump = null; + this.reflectivity = null; + this.transparency = null; + this.index_of_refraction = null; + } + + ColladaEffectTechnique.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + return output; + }; + + return ColladaEffectTechnique; + + })(); + + ColladaEffectSurface = (function() { + + function ColladaEffectSurface() { + this.sid = null; + this.fxScope = null; + this.type = null; + this.initFrom = null; + this.format = null; + this.size = null; + this.viewportRatio = null; + this.mipLevels = null; + this.mipmapGenerate = null; + } + + ColladaEffectSurface.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.initFrom, indent + 1, "initFrom "); + return output; + }; + + return ColladaEffectSurface; + + })(); + + ColladaEffectSampler = (function() { + + function ColladaEffectSampler() { + this.sid = null; + this.fxScope = null; + this.surface = null; + this.image = null; + this.wrapS = null; + this.wrapT = null; + this.minfilter = null; + this.magfilter = null; + this.borderColor = null; + this.mipmapMaxLevel = null; + this.mipmapBias = null; + } + + ColladaEffectSampler.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.image, indent + 1, "image "); + output += getNodeInfo(this.surface, indent + 1, "surface "); + return output; + }; + + return ColladaEffectSampler; + + })(); + + ColladaColorOrTexture = (function() { + + function ColladaColorOrTexture() { + this.color = null; + this.textureSampler = null; + this.texcoord = null; + this.opaque = null; + this.bumptype = null; + } + + return ColladaColorOrTexture; + + })(); + + ColladaMaterial = (function() { + + function ColladaMaterial() { + this.id = null; + this.name = null; + this.effect = null; + } + + ColladaMaterial.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.effect, indent + 1, "effect "); + return output; + }; + + return ColladaMaterial; + + })(); + + ColladaGeometry = (function() { + + function ColladaGeometry() { + this.id = null; + this.name = null; + this.sources = []; + this.vertices = null; + this.triangles = []; + } + + ColladaGeometry.prototype.getInfo = function(indent, prefix) { + var output, source, tri, _i, _j, _len, _len2, _ref, _ref2; + output = graphNodeString(indent, prefix + ("\n")); + _ref = this.sources; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + source = _ref[_i]; + output += getNodeInfo(source, indent + 1, "source "); + } + output += getNodeInfo(this.vertices, indent + 1, "vertices "); + _ref2 = this.triangles; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + tri = _ref2[_j]; + output += getNodeInfo(tri, indent + 1, "triangles "); + } + return output; + }; + + return ColladaGeometry; + + })(); + + ColladaSource = (function() { + + function ColladaSource() { + this.id = null; + this.name = null; + this.sourceId = null; + this.count = null; + this.stride = null; + this.data = null; + this.params = {}; + } + + ColladaSource.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.sourceId, indent + 1, "sourceId "); + return output; + }; + + return ColladaSource; + + })(); + + ColladaVertices = (function() { + + function ColladaVertices() { + this.id = null; + this.name = null; + this.inputs = []; + } + + ColladaVertices.prototype.getInfo = function(indent, prefix) { + var input, output, _i, _len, _ref; + output = graphNodeString(indent, prefix + ("\n")); + _ref = this.inputs; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + input = _ref[_i]; + output += getNodeInfo(input, indent + 1, "input "); + } + return output; + }; + + return ColladaVertices; + + })(); + + ColladaTriangles = (function() { + + function ColladaTriangles() { + this.name = null; + this.count = null; + this.material = null; + this.inputs = []; + this.indices = null; + } + + ColladaTriangles.prototype.getInfo = function(indent, prefix) { + var input, output, _i, _len, _ref; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.material, indent + 1, "material "); + _ref = this.inputs; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + input = _ref[_i]; + output += getNodeInfo(input, indent + 1, "input "); + } + return output; + }; + + return ColladaTriangles; + + })(); + + ColladaInput = (function() { + + function ColladaInput() { + this.semantic = null; + this.source = null; + this.offset = null; + this.set = null; + } + + ColladaInput.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.source, indent + 1, "source "); + return output; + }; + + return ColladaInput; + + })(); + + ColladaController = (function() { + + function ColladaController() { + this.id = null; + this.name = null; + this.skin = null; + this.morph = null; + } + + ColladaController.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.skin, indent + 1, "skin "); + output += getNodeInfo(this.morph, indent + 1, "morph "); + return output; + }; + + return ColladaController; + + })(); + + ColladaSkin = (function() { + + function ColladaSkin() { + this.source = null; + this.bindShapeMatrix = null; + this.sources = []; + this.joints = null; + this.vertexWeights = null; + } + + ColladaSkin.prototype.getInfo = function(indent, prefix) { + var output, source, _i, _len, _ref; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.bindShapeMatrix, indent + 1, "bind_shape_matrix "); + _ref = this.sources; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + source = _ref[_i]; + output += getNodeInfo(source, indent + 1, "source "); + } + output += getNodeInfo(this.joints, indent + 1, "joints "); + output += getNodeInfo(this.vertexWeights, indent + 1, "vertex_weights "); + return output; + }; + + return ColladaSkin; + + })(); + + ColladaJoints = (function() { + + function ColladaJoints() { + this.joints = null; + this.invBindMatrices = null; + } + + ColladaJoints.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + "\n"); + output += getNodeInfo(this.joints, indent + 1, "joints "); + output += getNodeInfo(this.invBindMatrices, indent + 1, "invBindMatrices "); + return output; + }; + + return ColladaJoints; + + })(); + + ColladaVertexWeights = (function() { + + function ColladaVertexWeights() { + this.inputs = []; + this.vcount = null; + this.v = null; + this.joints = null; + this.weights = null; + } + + ColladaVertexWeights.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + "\n"); + output += getNodeInfo(this.joints, indent + 1, "joints "); + output += getNodeInfo(this.weights, indent + 1, "weights "); + return output; + }; + + return ColladaVertexWeights; + + })(); + + ColladaAnimation = (function() { + + function ColladaAnimation() { + this.id = null; + this.name = null; + this.parent = null; + this.rootId = null; + this.rootName = null; + this.animations = []; + this.sources = []; + this.samplers = []; + this.channels = []; + } + + ColladaAnimation.prototype.getInfo = function(indent, prefix) { + var animation, channel, output, sampler, source, _i, _j, _k, _l, _len, _len2, _len3, _len4, _ref, _ref2, _ref3, _ref4; + output = graphNodeString(indent, prefix + ("\n")); + _ref = this.animations; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + animation = _ref[_i]; + output += getNodeInfo(animation, indent + 1, "animation "); + } + _ref2 = this.sources; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + source = _ref2[_j]; + output += getNodeInfo(source, indent + 1, "source "); + } + _ref3 = this.samplers; + for (_k = 0, _len3 = _ref3.length; _k < _len3; _k++) { + sampler = _ref3[_k]; + output += getNodeInfo(sampler, indent + 1, "sampler "); + } + _ref4 = this.channels; + for (_l = 0, _len4 = _ref4.length; _l < _len4; _l++) { + channel = _ref4[_l]; + output += getNodeInfo(channel, indent + 1, "channel "); + } + return output; + }; + + return ColladaAnimation; + + })(); + + ColladaSampler = (function() { + + function ColladaSampler() { + this.id = null; + this.input = null; + this.outputs = []; + this.inTangents = []; + this.outTangents = []; + this.interpolation = null; + } + + ColladaSampler.prototype.getInfo = function(indent, prefix) { + var o, output, t, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3; + output = graphNodeString(indent, prefix + ("\n")); + output += getNodeInfo(this.input, indent + 1, "input "); + _ref = this.outputs; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + o = _ref[_i]; + output += getNodeInfo(o, indent + 1, "output "); + } + _ref2 = this.inTangents; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + t = _ref2[_j]; + output += getNodeInfo(t, indent + 1, "inTangent "); + } + _ref3 = this.outTangents; + for (_k = 0, _len3 = _ref3.length; _k < _len3; _k++) { + t = _ref3[_k]; + output += getNodeInfo(t, indent + 1, "outTangent "); + } + output += getNodeInfo(this.interpolation, indent + 1, "interpolation "); + return output; + }; + + return ColladaSampler; + + })(); + + ColladaChannel = (function() { + + function ColladaChannel() { + this.animation = null; + this.source = null; + this.target = null; + } + + ColladaChannel.prototype.getInfo = function(indent, prefix) { + var output; + output = graphNodeString(indent, prefix + "\n"); + output += getNodeInfo(this.source, indent + 1, "source "); + output += getNodeInfo(this.target, indent + 1, "target "); + return output; + }; + + return ColladaChannel; + + })(); + + ColladaLight = (function() { + + function ColladaLight() { + this.id = null; + this.name = null; + this.type = null; + this.color = null; + this.params = {}; + this.sidChildren = []; + } + + ColladaLight.prototype.getInfo = function(indent, prefix) { + return graphNodeString(indent, prefix + "\n"); + }; + + return ColladaLight; + + })(); + + ColladaLightParam = (function() { + + function ColladaLightParam() { + this.sid = null; + this.name = null; + this.value = null; + } + + return ColladaLightParam; + + })(); + + ColladaCamera = (function() { + + function ColladaCamera() { + this.id = null; + this.name = null; + this.type = null; + this.params = {}; + this.sidChildren = []; + } + + ColladaCamera.prototype.getInfo = function(indent, prefix) { + return graphNodeString(indent, prefix + "\n"); + }; + + return ColladaCamera; + + })(); + + ColladaCameraParam = (function() { + + function ColladaCameraParam() { + this.sid = null; + this.name = null; + this.value = null; + } + + return ColladaCameraParam; + + })(); + + ThreejsAnimationChannel = (function() { + + function ThreejsAnimationChannel() { + this.inputData = null; + this.outputData = null; + this.offset = null; + this.stride = null; + this.count = null; + this.animation = null; + } + + return ThreejsAnimationChannel; + + })(); + + ThreejsSkeletonBone = (function() { + + function ThreejsSkeletonBone() { + this.index = null; + this.node = null; + this.sid = null; + this.parent = null; + this.isAnimated = null; + this.matrix = new THREE.Matrix4; + this.worldMatrix = new THREE.Matrix4; + this.invBindMatrix = new THREE.Matrix4; + this.skinMatrix = new THREE.Matrix4; + this.worldMatrixDirty = true; + } + + ThreejsSkeletonBone.prototype.getWorldMatrix = function() { + if (this.worldMatrixDirty) { + if (this.parent != null) { + this.worldMatrix.multiplyMatrices(this.parent.getWorldMatrix(), this.matrix); + } else { + this.worldMatrix.copy(this.matrix); + } + this.worldMatrixDirty = false; + } + return this.worldMatrix; + }; + + ThreejsSkeletonBone.prototype.applyAnimation = function(frame) { + var transform, _i, _len, _ref; + if (this.isAnimated) { + _ref = this.node.transformations; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + transform = _ref[_i]; + transform.applyAnimationKeyframe(frame); + } + this.node.getTransformMatrix(this.matrix); + } + this.worldMatrixDirty = true; + return null; + }; + + ThreejsSkeletonBone.prototype.updateSkinMatrix = function(bindShapeMatrix) { + var worldMatrix; + worldMatrix = this.getWorldMatrix(); + this.skinMatrix.multiplyMatrices(worldMatrix, this.invBindMatrix); + this.skinMatrix.multiplyMatrices(this.skinMatrix, bindShapeMatrix); + return null; + }; + + return ThreejsSkeletonBone; + + })(); + + ThreejsMaterialMap = (function() { + + function ThreejsMaterialMap() { + this.materials = []; + this.indices = {}; + this.needTangents = false; + } + + return ThreejsMaterialMap; + + })(); + + ColladaFile = (function() { + + function ColladaFile(loader) { + var key, value, _ref; + this._url = null; + this._baseUrl = null; + this._loader = loader; + this._options = {}; + _ref = loader.options; + for (key in _ref) { + value = _ref[key]; + this._options[key] = value; + } + this._log = loader.log; + this._readyCallback = null; + this._progressCallback = null; + this.dae = {}; + this.dae.ids = {}; + this.dae.animationTargets = []; + this.dae.libEffects = []; + this.dae.libMaterials = []; + this.dae.libGeometries = []; + this.dae.libControllers = []; + this.dae.libLights = []; + this.dae.libCameras = []; + this.dae.libImages = []; + this.dae.libVisualScenes = []; + this.dae.libAnimations = []; + this.dae.asset = null; + this.dae.scene = null; + this.threejs = {}; + this.threejs.scene = null; + this.threejs.images = []; + this.threejs.geometries = []; + this.threejs.materials = []; + this.scene = null; + } + + ColladaFile.prototype.setUrl = function(url) { + var parts; + if (url != null) { + this._url = url; + parts = url.split("/"); + parts.pop(); + this._baseUrl = (parts.length < 1 ? "." : parts.join("/")) + "/"; + } else { + this._url = ""; + this._baseUrl = ""; + } + }; + + ColladaFile.prototype.getLibInfo = function(lib, indent, libname) { + var child, numElements, output, _i, _len; + if (lib == null) return ""; + output = graphNodeString(indent, libname + (" <" + libname + ">\n")); + numElements = 0; + for (_i = 0, _len = lib.length; _i < _len; _i++) { + child = lib[_i]; + output += getNodeInfo(child, indent + 1, ""); + numElements += 1; + } + if (numElements > 0) { + return output; + } else { + return ""; + } + }; + + ColladaFile.prototype.getInfo = function(indent, prefix) { + var output; + output = "\n"; + output += getNodeInfo(this.dae.asset, indent + 1, "asset "); + output += getNodeInfo(this.dae.scene, indent + 1, "scene "); + output += this.getLibInfo(this.dae.libEffects, indent + 1, "library_effects"); + output += this.getLibInfo(this.dae.libMaterials, indent + 1, "library_materials"); + output += this.getLibInfo(this.dae.libGeometries, indent + 1, "library_geometries"); + output += this.getLibInfo(this.dae.libControllers, indent + 1, "library_controllers"); + output += this.getLibInfo(this.dae.libLights, indent + 1, "library_lights"); + output += this.getLibInfo(this.dae.libCameras, indent + 1, "library_cameras"); + output += this.getLibInfo(this.dae.libImages, indent + 1, "library_images"); + output += this.getLibInfo(this.dae.libVisualScenes, indent + 1, "library_visual_scenes"); + output += this.getLibInfo(this.dae.libAnimations, indent + 1, "library_animations"); + return output; + }; + + ColladaFile.prototype._reportUnexpectedChild = function(parent, child) { + this._log("Skipped unknown <" + parent.nodeName + "> child <" + child.nodeName + ">.", ColladaLoader2.messageWarning); + }; + + ColladaFile.prototype._reportUnhandledExtra = function(parent, child) { + this._log("Skipped element <" + parent.nodeName + ">/<" + child.nodeName + ">. Element is legal, but not handled by this loader.", ColladaLoader2.messageWarning); + }; + + ColladaFile.prototype._getAttributeAsFloat = function(el, name, defaultValue) { + var data; + data = el.getAttribute(name); + if (data != null) { + return parseFloat(data); + } else { + return defaultValue; + } + }; + + ColladaFile.prototype._getAttributeAsInt = function(el, name, defaultValue) { + var data; + data = el.getAttribute(name); + if (data != null) { + return parseInt(data, 10); + } else { + return defaultValue; + } + }; + + ColladaFile.prototype._addUrlTarget = function(object, lib, needsId) { + var id; + if (lib != null) lib.push(object); + id = object.id; + if (!(id != null)) { + if (needsId) this._log("Object has no ID.", ColladaLoader2.messageError); + return; + } + if (this.dae.ids[id] != null) { + this._log("There is already an object with ID " + id + ".", ColladaLoader2.messageError); + return; + } + this.dae.ids[id] = object; + }; + + ColladaFile.prototype._resolveUrlLink = function(link) { + link.object = this.dae.ids[link.url]; + if (!(link.object != null)) { + this._log("Could not resolve URL #" + link.url, ColladaLoader2.messageError); + return false; + } + return true; + }; + + ColladaFile.prototype._addFxTarget = function(object, scope) { + var sid; + sid = object.sid; + if (!(sid != null)) { + this._log("Cannot add a FX target: object has no SID.", ColladaLoader2.messageError); + return; + } + if (scope.sids[sid] != null) { + this._log("There is already an FX target with SID " + sid + ".", ColladaLoader2.messageError); + return; + } + object.fxScope = scope; + scope.sids[sid] = object; + }; + + ColladaFile.prototype._resolveFxLink = function(link) { + var scope; + scope = link.scope; + while (!(link.object != null) && (scope != null)) { + link.object = scope.sids[link.url]; + scope = scope.fxScope; + } + if (!(link.object != null)) { + this._log("Could not resolve FX parameter #" + link.url, ColladaLoader2.messageError); + return false; + } + return true; + }; + + ColladaFile.prototype._addSidTarget = function(object, parent) { + if (!(parent.sidChildren != null)) parent.sidChildren = []; + parent.sidChildren.push(object); + }; + + ColladaFile.prototype._findSidTarget = function(root, sidString) { + var childObject, front, parentObject, queue, sid, sidChild, sids, _i, _j, _len, _len2, _ref; + sids = sidString.split("/"); + parentObject = root; + childObject = null; + for (_i = 0, _len = sids.length; _i < _len; _i++) { + sid = sids[_i]; + queue = [parentObject]; + while (queue.length !== 0) { + front = queue.shift(); + if (front.sid === sid) { + childObject = front; + break; + } + if (front.sidChildren != null) { + _ref = front.sidChildren; + for (_j = 0, _len2 = _ref.length; _j < _len2; _j++) { + sidChild = _ref[_j]; + queue.push(sidChild); + } + } + } + if (!(childObject != null)) return null; + parentObject = childObject; + } + return childObject; + }; + + ColladaFile.prototype._resolveSidLink = function(link) { + var baseObject, childObject, front, parentObject, queue, sid, sidChild, _i, _j, _len, _len2, _ref, _ref2; + baseObject = this.dae.ids[link.id]; + if (!(baseObject != null)) { + this._log("Could not resolve SID #" + link.url + ", missing base ID " + link.id, ColladaLoader2.messageError); + return false; + } + parentObject = baseObject; + childObject = null; + _ref = link.sids; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + sid = _ref[_i]; + queue = [parentObject]; + while (queue.length !== 0) { + front = queue.shift(); + if (front.sid === sid) { + childObject = front; + break; + } + if (front.sidChildren != null) { + _ref2 = front.sidChildren; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + sidChild = _ref2[_j]; + queue.push(sidChild); + } + } + } + if (!(childObject != null)) { + this._log("Could not resolve SID #" + link.url + ", missing SID part " + sid, ColladaLoader2.messageError); + return false; + } + parentObject = childObject; + } + link.object = childObject; + return true; + }; + + ColladaFile.prototype._getLinkTarget = function(link, type) { + if (!(link != null)) return null; + if (!(link.object != null)) { + if (link instanceof ColladaUrlLink) { + this._resolveUrlLink(link); + } else if (link instanceof ColladaSidLink) { + this._resolveSidLink(link); + } else if (link instanceof ColladaFxLink) { + this._resolveFxLink(link); + } else { + this._log("Trying to resolve an object that is not a link", ColladaLoader2.messageError); + } + } + if ((type != null) && (link.object != null) && !(link.object instanceof type)) { + this._log("Link " + link.url + " does not link to a " + type.name, ColladaLoader2.messageError); + } + return link.object; + }; + + ColladaFile.prototype._parseXml = function(doc) { + var colladaElement, _ref; + colladaElement = doc.childNodes[0]; + if ((colladaElement != null ? (_ref = colladaElement.nodeName) != null ? _ref.toUpperCase() : void 0 : void 0) === "COLLADA") { + this._parseCollada(colladaElement); + } else { + this._log("Can not parse document, top level element is not .", ColladaLoader2.messageError); + } + }; + + ColladaFile.prototype._parseCollada = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "asset": + this._parseAsset(child); + break; + case "scene": + this._parseScene(child); + break; + case "library_effects": + this._parseLibEffect(child); + break; + case "library_materials": + this._parseLibMaterial(child); + break; + case "library_geometries": + this._parseLibGeometry(child); + break; + case "library_images": + this._parseLibImage(child); + break; + case "library_visual_scenes": + this._parseLibVisualScene(child); + break; + case "library_controllers": + this._parseLibController(child); + break; + case "library_animations": + this._parseLibAnimation(child); + break; + case "library_lights": + this._parseLibLight(child); + break; + case "library_cameras": + this._parseLibCamera(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseAsset = function(el) { + var child, _i, _len, _ref; + if (!this.dae.asset) this.dae.asset = new ColladaAsset(); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "unit": + this.dae.asset.unit = this._getAttributeAsFloat(child, "meter"); + break; + case "up_axis": + this.dae.asset.upAxis = child.textContent.toUpperCase().charAt(0); + break; + case "contributor": + case "created": + case "modified": + case "revision": + case "title": + case "subject": + case "keywords": + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseScene = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "instance_visual_scene": + this.dae.scene = new ColladaUrlLink(child.getAttribute("url")); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLibVisualScene = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "visual_scene": + this._parseVisualScene(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseVisualScene = function(el) { + var child, scene, _i, _len, _ref; + scene = new ColladaVisualScene; + scene.id = el.getAttribute("id"); + this._addUrlTarget(scene, this.dae.libVisualScenes, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "node": + this._parseSceneNode(scene, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseSceneNode = function(parent, el) { + var child, node, _i, _len, _ref; + node = new ColladaVisualSceneNode; + node.id = el.getAttribute("id"); + node.sid = el.getAttribute("sid"); + node.name = el.getAttribute("name"); + node.type = el.getAttribute("type"); + node.layer = el.getAttribute("layer"); + node.parent = parent; + parent.children.push(node); + this._addUrlTarget(node, null, false); + this._addSidTarget(node, parent); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "instance_geometry": + this._parseInstanceGeometry(node, child); + break; + case "instance_controller": + this._parseInstanceController(node, child); + break; + case "instance_light": + this._parseInstanceLight(node, child); + break; + case "instance_camera": + this._parseInstanceCamera(node, child); + break; + case "matrix": + case "rotate": + case "translate": + case "scale": + this._parseTransformElement(node, child); + break; + case "node": + this._parseSceneNode(node, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseInstanceGeometry = function(parent, el) { + var child, geometry, _i, _len, _ref; + geometry = new ColladaInstanceGeometry(); + geometry.geometry = new ColladaUrlLink(el.getAttribute("url")); + geometry.sid = el.getAttribute("sid"); + parent.geometries.push(geometry); + this._addSidTarget(geometry, parent); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "bind_material": + this._parseBindMaterial(geometry, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseInstanceController = function(parent, el) { + var child, controller, _i, _len, _ref; + controller = new ColladaInstanceController(); + controller.controller = new ColladaUrlLink(el.getAttribute("url")); + controller.sid = el.getAttribute("sid"); + controller.name = el.getAttribute("name"); + parent.controllers.push(controller); + this._addSidTarget(controller, parent); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "skeleton": + controller.skeletons.push(new ColladaUrlLink(child.textContent)); + break; + case "bind_material": + this._parseBindMaterial(controller, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseBindMaterial = function(parent, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "technique_common": + this._parseBindMaterialTechnique(parent, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseBindMaterialTechnique = function(parent, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "instance_material": + this._parseInstanceMaterial(parent, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseInstanceMaterial = function(parent, el) { + var child, inputSemantic, inputSet, material, semantic, target, _i, _len, _ref; + material = new ColladaInstanceMaterial; + material.symbol = el.getAttribute("symbol"); + material.material = new ColladaUrlLink(el.getAttribute("target")); + parent.materials.push(material); + this._addSidTarget(material, parent); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "bind_vertex_input": + semantic = child.getAttribute("semantic"); + inputSemantic = child.getAttribute("input_semantic"); + inputSet = child.getAttribute("input_set"); + if (inputSet != null) inputSet = parseInt(inputSet, 10); + material.vertexInputs[semantic] = { + inputSemantic: inputSemantic, + inputSet: inputSet + }; + break; + case "bind": + semantic = child.getAttribute("semantic"); + target = new ColladaSidLink(null, child.getAttribute("target")); + material.params[semantic] = { + target: target + }; + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseTransformElement = function(parent, el) { + var expectedDataLength, transform; + transform = new ColladaNodeTransform; + transform.sid = el.getAttribute("sid"); + transform.type = el.nodeName; + transform.node = parent; + parent.transformations.push(transform); + this._addSidTarget(transform, parent); + this.dae.animationTargets.push(transform); + transform.data = _strToFloats(el.textContent); + expectedDataLength = 0; + switch (transform.type) { + case "matrix": + expectedDataLength = 16; + break; + case "rotate": + expectedDataLength = 4; + break; + case "translate": + expectedDataLength = 3; + break; + case "scale": + expectedDataLength = 3; + break; + case "skew": + expectedDataLength = 7; + break; + case "lookat": + expectedDataLength = 9; + break; + default: + this._log("Unknown transformation type " + transform.type + ".", ColladaLoader2.messageError); + } + if (transform.data.length !== expectedDataLength) { + this._log("Wrong number of elements for transformation type '" + transform.type + "': expected " + expectedDataLength + ", found " + transform.data.length, ColladaLoader2.messageError); + } + }; + + ColladaFile.prototype._parseInstanceLight = function(parent, el) { + var child, light, _i, _len, _ref; + light = new ColladaInstanceLight(); + light.light = new ColladaUrlLink(el.getAttribute("url")); + light.sid = el.getAttribute("sid"); + light.name = el.getAttribute("name"); + parent.lights.push(light); + this._addSidTarget(light, parent); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "extra": + this._reportUnhandledExtra(el, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseInstanceCamera = function(parent, el) { + var camera, child, _i, _len, _ref; + camera = new ColladaInstanceCamera(); + camera.camera = new ColladaUrlLink(el.getAttribute("url")); + camera.sid = el.getAttribute("sid"); + camera.name = el.getAttribute("name"); + parent.cameras.push(camera); + this._addSidTarget(camera, parent); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "extra": + this._reportUnhandledExtra(el, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLibEffect = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "effect": + this._parseEffect(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseEffect = function(el) { + var child, effect, _i, _len, _ref; + effect = new ColladaEffect; + effect.id = el.getAttribute("id"); + this._addUrlTarget(effect, this.dae.libEffects, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "profile_COMMON": + this._parseEffectProfileCommon(effect, child); + break; + case "profile": + this._log("Skipped non-common effect profile for effect " + effect.id + ".", ColladaLoader2.messageWarning); + break; + case "extra": + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseEffectProfileCommon = function(effect, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "newparam": + this._parseEffectNewparam(effect, child); + break; + case "technique": + this._parseEffectTechnique(effect, child); + break; + case "extra": + this._parseTechniqueExtra(effect.technique, "COMMON", child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseEffectNewparam = function(scope, el) { + var child, sid, _i, _len, _ref; + sid = el.getAttribute("sid"); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "surface": + this._parseEffectSurface(scope, sid, child); + break; + case "sampler2D": + this._parseEffectSampler(scope, sid, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseEffectSurface = function(scope, sid, el) { + var child, surface, _i, _len, _ref; + surface = new ColladaEffectSurface; + surface.type = el.getAttribute("type"); + surface.sid = sid; + this._addFxTarget(surface, scope); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "init_from": + surface.initFrom = new ColladaUrlLink(child.textContent); + break; + case "format": + surface.format = child.textContent; + break; + case "size": + surface.size = _strToFloats(child.textContent); + break; + case "viewport_ratio": + surface.viewportRatio = _strToFloats(child.textContent); + break; + case "mip_levels": + surface.mipLevels = parseInt(child.textContent, 10); + break; + case "mipmap_generate": + surface.mipmapGenerate = child.textContent; + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseEffectSampler = function(scope, sid, el) { + var child, sampler, _i, _len, _ref; + sampler = new ColladaEffectSampler; + sampler.sid = sid; + this._addFxTarget(sampler, scope); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "source": + sampler.surface = new ColladaFxLink(child.textContent, scope); + break; + case "instance_image": + sampler.image = new ColladaUrlLink(child.getAttribute("url")); + break; + case "wrap_s": + sampler.wrapS = child.textContent; + break; + case "wrap_t": + sampler.wrapT = child.textContent; + break; + case "minfilter": + sampler.minfilter = child.textContent; + break; + case "magfilter": + sampler.magfilter = child.textContent; + break; + case "border_color": + sampler.borderColor = _strToFloats(child.textContent); + break; + case "mipmap_maxlevel": + sampler.mipmapMaxLevel = parseInt(child.textContent, 10); + break; + case "mipmap_bias": + sampler.mipmapBias = parseFloat(child.textContent); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseEffectTechnique = function(effect, el) { + var child, technique, _i, _len, _ref; + technique = new ColladaEffectTechnique; + technique.sid = el.getAttribute("sid"); + this._addFxTarget(technique, effect); + effect.technique = technique; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "blinn": + case "phong": + case "lambert": + case "constant": + technique.shading = child.nodeName; + this._parseTechniqueParam(technique, "COMMON", child); + break; + case "extra": + this._parseTechniqueExtra(technique, "COMMON", child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseTechniqueParam = function(technique, profile, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "newparam": + this._parseEffectNewparam(technique, child); + break; + case "emission": + case "ambient": + case "diffuse": + case "specular": + case "reflective": + this._parseEffectColorOrTexture(technique, child); + break; + case "shininess": + case "reflectivity": + case "transparency": + case "index_of_refraction": + technique[child.nodeName] = parseFloat(child.childNodes[1].textContent); + break; + case "transparent": + this._parseEffectColorOrTexture(technique, child); + technique.transparent.opaque = child.getAttribute("opaque"); + break; + case "bump": + this._parseEffectColorOrTexture(technique, child); + technique.bump.bumptype = child.getAttribute("bumptype"); + break; + case "double_sided": + technique.doubleSided = parseInt(child.textContent, 10) === 1 ? true : false; + break; + default: + if (profile === "COMMON") this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseTechniqueExtra = function(technique, profile, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "technique": + profile = child.getAttribute("profile"); + this._parseTechniqueParam(technique, profile, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseEffectColorOrTexture = function(technique, el) { + var child, colorOrTexture, name, texture, _i, _len, _ref; + name = el.nodeName; + colorOrTexture = technique[name]; + if (!(colorOrTexture != null)) { + colorOrTexture = new ColladaColorOrTexture(); + technique[name] = colorOrTexture; + } + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "color": + colorOrTexture.color = _strToColor(child.textContent); + break; + case "texture": + texture = child.getAttribute("texture"); + colorOrTexture.textureSampler = new ColladaFxLink(texture, technique); + colorOrTexture.texcoord = child.getAttribute("texcoord"); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLibMaterial = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "material": + this._parseMaterial(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseMaterial = function(el) { + var child, material, _i, _len, _ref; + material = new ColladaMaterial; + material.id = el.getAttribute("id"); + material.name = el.getAttribute("name"); + this._addUrlTarget(material, this.dae.libMaterials, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "instance_effect": + material.effect = new ColladaUrlLink(child.getAttribute("url")); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLibGeometry = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "geometry": + this._parseGeometry(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseGeometry = function(el) { + var child, geometry, _i, _len, _ref; + geometry = new ColladaGeometry(); + geometry.id = el.getAttribute("id"); + geometry.name = el.getAttribute("name"); + this._addUrlTarget(geometry, this.dae.libGeometries, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "mesh": + this._parseMesh(geometry, child); + break; + case "convex_mesh": + case "spline": + this._log("Geometry type " + child.nodeName + " not supported.", ColladaLoader2.messageError); + break; + case "extra": + this._parseGeometryExtra(geometry, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseMesh = function(geometry, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "source": + this._parseSource(geometry, child); + break; + case "vertices": + this._parseVertices(geometry, child); + break; + case "triangles": + case "polylist": + case "polygons": + this._parseTriangles(geometry, child); + break; + case "lines": + case "linestrips": + case "trifans": + case "tristrips": + this._log("Geometry primitive type " + child.nodeName + " not supported.", ColladaLoader2.messageError); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseGeometryExtra = function(geometry, el) { + var child, profile, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "technique": + profile = child.getAttribute("profile"); + this._parseGeometryExtraTechnique(geometry, profile, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseGeometryExtraTechnique = function(geometry, profile, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "double_sided": + geometry.doubleSided = el.textContent === "1"; + } + } + } + }; + + ColladaFile.prototype._parseSource = function(parent, el) { + var child, source, _i, _len, _ref; + source = new ColladaSource; + source.id = el.getAttribute("id"); + source.name = el.getAttribute("name"); + this._addUrlTarget(source, parent.sources, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "bool_array": + source.sourceId = child.getAttribute("id"); + source.data = _strToBools(child.textContent); + break; + case "float_array": + source.sourceId = child.getAttribute("id"); + source.data = _strToFloats(child.textContent); + break; + case "int_array": + source.sourceId = child.getAttribute("id"); + source.data = _strToInts(child.textContent); + break; + case "IDREF_array": + case "Name_array": + source.sourceId = child.getAttribute("id"); + source.data = _strToStrings(child.textContent); + break; + case "technique_common": + this._parseSourceTechniqueCommon(source, child); + break; + case "technique": + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseVertices = function(geometry, el) { + var child, vertices, _i, _len, _ref; + vertices = new ColladaVertices; + vertices.id = el.getAttribute("id"); + vertices.name = el.getAttribute("name"); + this._addUrlTarget(vertices, null, true); + geometry.vertices = vertices; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "input": + vertices.inputs.push(this._parseInput(child)); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseTriangles = function(geometry, el) { + var child, triangles, _i, _len, _ref; + triangles = new ColladaTriangles; + triangles.name = el.getAttribute("name"); + triangles.material = el.getAttribute("material"); + triangles.count = this._getAttributeAsInt(el, "count"); + triangles.type = el.nodeName; + geometry.triangles.push(triangles); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "input": + triangles.inputs.push(this._parseInput(child)); + break; + case "vcount": + triangles.vcount = _strToInts(child.textContent); + break; + case "p": + triangles.indices = _strToInts(child.textContent); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + return triangles; + }; + + ColladaFile.prototype._parseSourceTechniqueCommon = function(source, el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "accessor": + this._parseAccessor(source, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseAccessor = function(source, el) { + var child, name, sourceId, type, _i, _len, _ref; + sourceId = el.getAttribute("source"); + source.count = el.getAttribute("count"); + source.stride = this._getAttributeAsInt(el, "stride", 1); + if (sourceId !== "#" + source.sourceId) { + this._log("Non-local sources not supported, source data will be empty", ColladaLoader2.messageError); + } + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "param": + name = child.getAttribute("name"); + type = child.getAttribute("type"); + source.params[name] = type; + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseInput = function(el) { + var input; + input = new ColladaInput; + input.semantic = el.getAttribute("semantic"); + input.source = new ColladaUrlLink(el.getAttribute("source")); + input.offset = this._getAttributeAsInt(el, "offset"); + input.set = this._getAttributeAsInt(el, "set"); + return input; + }; + + ColladaFile.prototype._parseLibImage = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "image": + this._parseImage(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseImage = function(el) { + var child, image, _i, _len, _ref; + image = new ColladaImage; + image.id = el.getAttribute("id"); + this._addUrlTarget(image, this.dae.libImages, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "init_from": + image.initFrom = child.textContent; + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLibController = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "controller": + this._parseController(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseController = function(el) { + var child, controller, _i, _len, _ref; + controller = new ColladaController; + controller.id = el.getAttribute("id"); + controller.name = el.getAttribute("name"); + this._addUrlTarget(controller, this.dae.libControllers, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "skin": + this._parseSkin(controller, child); + break; + case "morph": + this._parseMorph(controller, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseMorph = function(parent, el) { + this._log("Morph controllers not implemented", ColladaLoader2.messageError); + }; + + ColladaFile.prototype._parseSkin = function(parent, el) { + var child, skin, _i, _len, _ref; + skin = new ColladaSkin; + skin.source = new ColladaUrlLink(el.getAttribute("source")); + if ((parent.skin != null) || (parent.morph != null)) { + this._log("Controller already has a skin or morph", ColladaLoader2.messageError); + } + parent.skin = skin; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "bind_shape_matrix": + this._parseBindShapeMatrix(skin, child); + break; + case "source": + this._parseSource(skin, child); + break; + case "joints": + this._parseJoints(skin, child); + break; + case "vertex_weights": + this._parseVertexWeights(skin, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseBindShapeMatrix = function(parent, el) { + parent.bindShapeMatrix = _strToFloats(el.textContent); + }; + + ColladaFile.prototype._parseJoints = function(parent, el) { + var child, input, inputs, joints, _i, _j, _len, _len2, _ref; + joints = new ColladaJoints; + if (parent.joints != null) { + this._log("Skin already has a joints array", ColladaLoader2.messageError); + } + parent.joints = joints; + inputs = []; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "input": + inputs.push(this._parseInput(child)); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + for (_j = 0, _len2 = inputs.length; _j < _len2; _j++) { + input = inputs[_j]; + switch (input.semantic) { + case "JOINT": + joints.joints = input; + break; + case "INV_BIND_MATRIX": + joints.invBindMatrices = input; + break; + default: + this._log("Unknown joints input semantic " + input.semantic, ColladaLoader2.messageError); + } + } + }; + + ColladaFile.prototype._parseVertexWeights = function(parent, el) { + var child, input, inputs, weights, _i, _j, _len, _len2, _ref; + weights = new ColladaVertexWeights; + weights.count = parseInt(el.getAttribute("count"), 10); + if (parent.vertexWeights != null) { + this._log("Skin already has a vertex weight array", ColladaLoader2.messageError); + } + parent.vertexWeights = weights; + inputs = []; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "input": + inputs.push(this._parseInput(child)); + break; + case "vcount": + weights.vcount = _strToInts(child.textContent); + break; + case "v": + weights.v = _strToInts(child.textContent); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + for (_j = 0, _len2 = inputs.length; _j < _len2; _j++) { + input = inputs[_j]; + switch (input.semantic) { + case "JOINT": + weights.joints = input; + break; + case "WEIGHT": + weights.weights = input; + break; + default: + this._log("Unknown vertex weight input semantic " + input.semantic, ColladaLoader2.messageError); + } + } + }; + + ColladaFile.prototype._parseLibAnimation = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "animation": + this._parseAnimation(null, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseAnimation = function(parent, el) { + var animation, child, _i, _len, _ref; + animation = new ColladaAnimation; + animation.id = el.getAttribute("id"); + animation.name = el.getAttribute("name"); + animation.parent = parent; + if (parent != null) { + animation.rootId = parent.rootId; + animation.rootName = parent.rootName; + } else { + animation.rootId = animation.id; + animation.rootName = animation.name; + } + this._addUrlTarget(animation, (parent != null ? parent.animations : void 0) || this.dae.libAnimations, false); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "animation": + this._parseAnimation(animation, child); + break; + case "source": + this._parseSource(animation, child); + break; + case "sampler": + this._parseSampler(animation, child); + break; + case "channel": + this._parseChannel(animation, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseSampler = function(parent, el) { + var child, input, inputs, sampler, _i, _j, _len, _len2, _ref; + sampler = new ColladaSampler; + sampler.id = el.getAttribute("id"); + if (sampler.id != null) this._addUrlTarget(sampler, parent.samplers, false); + inputs = []; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "input": + inputs.push(this._parseInput(child)); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + for (_j = 0, _len2 = inputs.length; _j < _len2; _j++) { + input = inputs[_j]; + switch (input.semantic) { + case "INPUT": + sampler.input = input; + break; + case "OUTPUT": + sampler.outputs.push(input); + break; + case "INTERPOLATION": + sampler.interpolation = input; + break; + case "IN_TANGENT": + sampler.inTangents.push(input); + break; + case "OUT_TANGENT": + sampler.outTangents.push(input); + break; + default: + this._log("Unknown sampler input semantic " + input.semantic, ColladaLoader2.messageError); + } + } + }; + + ColladaFile.prototype._parseChannel = function(parent, el) { + var channel, child, _i, _len, _ref; + channel = new ColladaChannel; + channel.source = new ColladaUrlLink(el.getAttribute("source")); + channel.target = new ColladaSidLink(parent.id, el.getAttribute("target")); + parent.channels.push(channel); + channel.animation = parent; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) this._reportUnexpectedChild(el, child); + } + }; + + ColladaFile.prototype._parseLibLight = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "light": + this._parseLight(child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLight = function(el) { + var child, light, _i, _len, _ref; + light = new ColladaLight(); + light.id = el.getAttribute("id"); + light.name = el.getAttribute("name"); + if (light.id != null) this._addUrlTarget(light, this.dae.libLights, true); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "technique_common": + this._parseLightTechniqueCommon(child, light); + break; + case "extra": + this._reportUnhandledExtra(el, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLightTechniqueCommon = function(el, light) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "ambient": + this._parseLightParams(child, "COMMON", light); + break; + case "directional": + this._parseLightParams(child, "COMMON", light); + break; + case "point": + this._parseLightParams(child, "COMMON", light); + break; + case "spot": + this._parseLightParams(child, "COMMON", light); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLightParams = function(el, profile, light) { + var child, _i, _len, _ref; + light.type = el.nodeName; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "color": + this._parseLightColor(child, profile, light); + break; + case "constant_attenuation": + this._parseLightParam(child, profile, light); + break; + case "linear_attenuation": + this._parseLightParam(child, profile, light); + break; + case "quadratic_attenuation": + this._parseLightParam(child, profile, light); + break; + case "falloff_angle": + this._parseLightParam(child, profile, light); + break; + case "falloff_exponent": + this._parseLightParam(child, profile, light); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseLightColor = function(el, profile, light) { + light.color = _strToFloats(el.textContent); + }; + + ColladaFile.prototype._parseLightParam = function(el, profile, light) { + var param; + param = new ColladaLightParam(); + param.sid = el.getAttribute("sid"); + param.name = el.nodeName; + light.params[param.name] = param; + this._addSidTarget(param, light); + param.value = parseFloat(el.textContent); + }; + + ColladaFile.prototype._parseLibCamera = function(el) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "camera": + this._parseCamera(child); + break; + case "extra": + this._reportUnhandledExtra(el, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseCamera = function(el) { + var camera, child, _i, _len, _ref; + camera = new ColladaCamera; + camera.id = el.getAttribute("id"); + if (camera.id != null) this._addUrlTarget(camera, this.dae.libCameras, true); + camera.name = el.getAttribute("name"); + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "asset": + this._reportUnhandledExtra(el, child); + break; + case "optics": + this._parseCameraOptics(child, camera); + break; + case "imager": + this._reportUnhandledExtra(el, child); + break; + case "extra": + this._reportUnhandledExtra(el, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseCameraOptics = function(el, camera) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "technique_common": + this._parseCameraTechniqueCommon(child, camera); + break; + case "technique": + this._reportUnhandledExtra(el, child); + break; + case "extra": + this._reportUnhandledExtra(el, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseCameraTechniqueCommon = function(el, camera) { + var child, _i, _len, _ref; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "orthographic": + this._parseCameraParams(child, camera); + break; + case "perspective": + this._parseCameraParams(child, camera); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseCameraParams = function(el, camera) { + var child, _i, _len, _ref; + camera.type = el.nodeName; + _ref = el.childNodes; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + child = _ref[_i]; + if (child.nodeType === 1) { + switch (child.nodeName) { + case "xmag": + this._parseCameraParam(child, camera); + break; + case "ymag": + this._parseCameraParam(child, camera); + break; + case "xfov": + this._parseCameraParam(child, camera); + break; + case "yfov": + this._parseCameraParam(child, camera); + break; + case "aspect_ratio": + this._parseCameraParam(child, camera); + break; + case "znear": + this._parseCameraParam(child, camera); + break; + case "zfar": + this._parseCameraParam(child, camera); + break; + case "extra": + this._reportUnhandledExtra(el, child); + break; + default: + this._reportUnexpectedChild(el, child); + } + } + } + }; + + ColladaFile.prototype._parseCameraParam = function(el, camera) { + var param; + param = new ColladaCameraParam(); + param.sid = el.getAttribute("sid"); + param.name = el.nodeName; + camera.params[param.name] = param; + this._addSidTarget(param, camera); + param.value = parseFloat(el.textContent); + }; + + ColladaFile.prototype._linkAnimations = function() { + var animation, target, _i, _j, _len, _len2, _ref, _ref2; + _ref = this.dae.animationTargets; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + target = _ref[_i]; + target.initAnimationTarget(); + } + _ref2 = this.dae.libAnimations; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + animation = _ref2[_j]; + this._linkAnimationChannels(animation); + } + }; + + ColladaFile.prototype._linkAnimationChannels = function(animation) { + var channel, child, inputSource, output, outputSource, sampler, target, threejsChannel, _i, _j, _len, _len2, _ref, _ref2, _ref3; + _ref = animation.channels; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + channel = _ref[_i]; + target = this._getLinkTarget(channel.target, ColladaAnimationTarget); + if (!(target != null)) { + this._log("Animation channel has an invalid target '" + channel.target.url + "', animation ignored", ColladaLoader2.messageWarning); + continue; + } + sampler = this._getLinkTarget(channel.source, ColladaSampler); + if (!(sampler != null)) { + this._log("Animation channel has an invalid sampler '" + channel.source.url + "', animation ignored", ColladaLoader2.messageWarning); + continue; + } + inputSource = this._getLinkTarget((_ref2 = sampler.input) != null ? _ref2.source : void 0); + if (!(inputSource != null)) { + this._log("Animation channel has no input data, animation ignored", ColladaLoader2.messageWarning); + continue; + } + if (sampler.outputs.length === 0) { + this._log("Animation channel has no output, animation ignored", ColladaLoader2.messageWarning); + continue; + } + if (sampler.outputs.length > 1) { + this._log("Animation channel has more than one output, using only the first output", ColladaLoader2.messageWarning); + } + output = sampler.outputs[0]; + outputSource = this._getLinkTarget(output != null ? output.source : void 0); + if (!(outputSource != null)) { + this._log("Animation channel has no output data, animation ignored", ColladaLoader2.messageWarning); + continue; + } + threejsChannel = new ThreejsAnimationChannel; + threejsChannel.outputData = outputSource.data; + threejsChannel.inputData = inputSource.data; + threejsChannel.stride = outputSource.stride; + threejsChannel.animation = animation; + if (channel.target.dotSyntax) { + threejsChannel.semantic = channel.target.member; + threejsChannel.count = 1; + switch (threejsChannel.semantic) { + case "X": + threejsChannel.offset = 0; + break; + case "Y": + threejsChannel.offset = 1; + break; + case "Z": + threejsChannel.offset = 2; + break; + case "W": + threejsChannel.offset = 3; + break; + case "R": + threejsChannel.offset = 0; + break; + case "G": + threejsChannel.offset = 1; + break; + case "B": + threejsChannel.offset = 2; + break; + case "U": + threejsChannel.offset = 0; + break; + case "V": + threejsChannel.offset = 1; + break; + case "S": + threejsChannel.offset = 0; + break; + case "T": + threejsChannel.offset = 1; + break; + case "P": + threejsChannel.offset = 2; + break; + case "Q": + threejsChannel.offset = 3; + break; + case "ANGLE": + threejsChannel.offset = 3; + break; + default: + this._log("Unknown semantic for '" + targetLink.url + "', animation ignored", ColladaLoader2.messageWarning); + continue; + } + } else if (channel.target.arrSyntax) { + switch (targetLink.indices.length) { + case 1: + threejsChannel.offset = targetLink.indices[0]; + break; + case 2: + threejsChannel.offset = targetLink.indices[0] * target.animTarget.dataRows + targetLink.indices[1]; + break; + default: + this._log("Invalid number of indices for '" + targetLink.url + "', animation ignored", ColladaLoader2.messageWarning); + continue; + } + threejsChannel.count = 1; + } else { + threejsChannel.offset = 0; + threejsChannel.count = target.animTarget.dataColumns * target.animTarget.dataRows; + } + target.animTarget.channels.push(threejsChannel); + } + _ref3 = animation.animations; + for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) { + child = _ref3[_j]; + this._linkAnimationChannels(child); + } + }; + + ColladaFile.prototype._createSceneGraph = function() { + var daeChild, daeScene, threejsScene, _i, _len, _ref; + daeScene = this._getLinkTarget(this.dae.scene, ColladaVisualScene); + if (!(daeScene != null)) return; + threejsScene = new THREE.Object3D(); + this.threejs.scene = threejsScene; + _ref = daeScene.children; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + daeChild = _ref[_i]; + this._createSceneGraphNode(daeChild, threejsScene); + } + this.scene = threejsScene; + }; + + ColladaFile.prototype._setNodeTransformation = function(daeNode, threejsNode) { + daeNode.getTransformMatrix(threejsNode.matrix); + threejsNode.matrix.decompose(threejsNode.position, threejsNode.quaternion, threejsNode.scale); + threejsNode.rotation.setEulerFromQuaternion(threejsNode.quaternion); + }; + + ColladaFile.prototype._createSceneGraphNode = function(daeNode, threejsParent) { + var daeCamera, daeChild, daeController, daeGeometry, daeLight, threejsCamera, threejsChild, threejsChildren, threejsLight, threejsMesh, threejsNode, _i, _j, _k, _l, _len, _len2, _len3, _len4, _len5, _len6, _m, _n, _ref, _ref2, _ref3, _ref4, _ref5; + threejsChildren = []; + _ref = daeNode.geometries; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + daeGeometry = _ref[_i]; + threejsMesh = this._createStaticMesh(daeGeometry); + if (threejsMesh != null) { + threejsMesh.name = daeNode.name != null ? daeNode.name : ""; + threejsChildren.push(threejsMesh); + } + } + _ref2 = daeNode.controllers; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + daeController = _ref2[_j]; + threejsMesh = this._createAnimatedMesh(daeController); + if (threejsMesh != null) { + threejsMesh.name = daeNode.name != null ? daeNode.name : ""; + threejsChildren.push(threejsMesh); + } + } + _ref3 = daeNode.lights; + for (_k = 0, _len3 = _ref3.length; _k < _len3; _k++) { + daeLight = _ref3[_k]; + threejsLight = this._createLight(daeLight); + if (threejsLight != null) { + threejsLight.name = daeNode.name != null ? daeNode.name : ""; + threejsChildren.push(threejsLight); + } + } + _ref4 = daeNode.cameras; + for (_l = 0, _len4 = _ref4.length; _l < _len4; _l++) { + daeCamera = _ref4[_l]; + threejsCamera = this._createCamera(daeCamera); + if (threejsCamera != null) { + threejsCamera.name = daeNode.name != null ? daeNode.name : ""; + threejsChildren.push(threejsCamera); + } + } + if (threejsChildren.length > 1) { + threejsNode = new THREE.Object3D(); + for (_m = 0, _len5 = threejsChildren.length; _m < _len5; _m++) { + threejsChild = threejsChildren[_m]; + if (threejsChild != null) threejsNode.add(threejsChild); + } + threejsParent.add(threejsNode); + } else if (threejsChildren.length === 1) { + threejsNode = threejsChildren[0]; + threejsParent.add(threejsNode); + } else if (threejsChildren.length === 0) { + if (daeNode.type !== "JOINT") { + this._log("Collada node " + daeNode.name + " did not produce any threejs nodes", ColladaLoader2.messageWarning); + } + threejsNode = new THREE.Object3D(); + threejsParent.add(threejsNode); + } + this._setNodeTransformation(daeNode, threejsNode); + _ref5 = daeNode.children; + for (_n = 0, _len6 = _ref5.length; _n < _len6; _n++) { + daeChild = _ref5[_n]; + this._createSceneGraphNode(daeChild, threejsNode); + } + }; + + ColladaFile.prototype._createLight = function(daeInstanceLight) { + var attConst, attLin, attQuad, color, colorHex, foAngle, foExp, light, _ref, _ref2, _ref3, _ref4, _ref5; + light = this._getLinkTarget(daeInstanceLight.light, ColladaLight); + if (!(light != null)) { + this._log("Light instance has no light, light ignored", ColladaLoader2.messageWarning); + return null; + } + color = light.color; + colorHex = (color[0] * 255) << 16 ^ (color[1] * 255) << 8 ^ (color[2] * 255) << 0; + attConst = (_ref = light.params["constant_attenuation"]) != null ? _ref.value : void 0; + attLin = (_ref2 = light.params["linear_attenuation"]) != null ? _ref2.value : void 0; + attQuad = (_ref3 = light.params["quadratic_attenuation"]) != null ? _ref3.value : void 0; + foAngle = (_ref4 = light.params["falloff_angle"]) != null ? _ref4.value : void 0; + foExp = (_ref5 = light.params["falloff_exponent"]) != null ? _ref5.value : void 0; + switch (light.type) { + case "ambient": + light = new THREE.AmbientLight(colorHex); + break; + case "directional": + light = new THREE.DirectionalLight(colorHex, 1); + break; + case "point": + light = new THREE.PointLight(colorHex, attConst, attLin); + break; + case "spot": + light = new THREE.SpotLight(colorHex, attConst, attLin, foAngle, foExp); + break; + default: + this._log("Unknown light type " + daeInstanceLight.type + ", light ignored.", ColladaLoader2.messageError); + } + return light; + }; + + ColladaFile.prototype._createCamera = function(daeInstanceCamera) { + var aspect, camera, x_fov, x_mag, y_fov, y_mag, z_max, z_min, _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + camera = this._getLinkTarget(daeInstanceCamera.camera, ColladaCamera); + if (!(camera != null)) { + this._log("Camera instance has no camera, camera ignored", ColladaLoader2.messageWarning); + return null; + } + x_mag = (_ref = camera.params["xmag"]) != null ? _ref.value : void 0; + y_mag = (_ref2 = camera.params["ymag"]) != null ? _ref2.value : void 0; + x_fov = (_ref3 = camera.params["xfov"]) != null ? _ref3.value : void 0; + y_fov = (_ref4 = camera.params["yfov"]) != null ? _ref4.value : void 0; + aspect = (_ref5 = camera.params["aspect_ratio"]) != null ? _ref5.value : void 0; + z_min = (_ref6 = camera.params["znear"]) != null ? _ref6.value : void 0; + z_max = (_ref7 = camera.params["zfar"]) != null ? _ref7.value : void 0; + switch (camera.type) { + case "orthographic": + if ((x_mag != null) && (y_mag != null)) { + aspect = x_mag / y_mag; + } else if ((y_mag != null) && (aspect != null)) { + x_mag = y_mag * aspect; + } else if ((x_mag != null) && (aspect != null)) { + y_mag = x_mag / aspect; + } else if (x_mag != null) { + aspect = 1; + y_mag = x_mag; + } else if (y_mag != null) { + aspect = 1; + x_mag = y_mag; + } else { + this._log("Not enough field of view parameters for an orthographic camera.", ColladaLoader2.messageError); + } + camera = new THREE.OrthographicCamera(-x_mag, +x_mag, -y_mag, +y_mag, z_min, z_max); + break; + case "perspective": + if ((x_fov != null) && (y_fov != null)) { + aspect = x_fov / y_fov; + } else if ((y_fov != null) && (aspect != null)) { + x_fov = y_fov * aspect; + } else if ((x_fov != null) && (aspect != null)) { + y_fov = x_fov / aspect; + } else if (x_fov != null) { + aspect = 1; + y_fov = x_fov; + } else if (y_fov != null) { + aspect = 1; + x_fov = y_fov; + } else { + this._log("Not enough field of view parameters for a perspective camera.", ColladaLoader2.messageError); + } + camera = new THREE.PerspectiveCamera(y_fov, aspect, z_min, z_max); + break; + default: + this._log("Unknown camera type " + daeInstanceCamera.type + ", camera ignored.", ColladaLoader2.messageError); + } + return camera; + }; + + ColladaFile.prototype._createStaticMesh = function(daeInstanceGeometry) { + var daeGeometry, mesh, threejsGeometry, threejsMaterial, _ref; + daeGeometry = this._getLinkTarget(daeInstanceGeometry.geometry, ColladaGeometry); + if (!(daeGeometry != null)) { + this._log("Geometry instance has no geometry, mesh ignored", ColladaLoader2.messageWarning); + return null; + } + _ref = this._createGeometryAndMaterial(daeGeometry, daeInstanceGeometry.materials), threejsGeometry = _ref[0], threejsMaterial = _ref[1]; + mesh = new THREE.Mesh(threejsGeometry, threejsMaterial); + return mesh; + }; + + ColladaFile.prototype._createGeometryAndMaterial = function(daeGeometry, daeInstanceMaterials) { + var material, threejsGeometry, threejsMaterial, threejsMaterials, _i, _len, _ref; + threejsMaterials = this._createMaterials(daeInstanceMaterials); + threejsGeometry = this._createGeometry(daeGeometry, threejsMaterials); + threejsMaterial = null; + if (threejsMaterials.materials.length > 1) { + threejsMaterial = new THREE.MeshFaceMaterial(); + _ref = threejsMaterials.materials; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + material = _ref[_i]; + threejsMaterial.materials.push(material); + } + } else { + threejsMaterial = threejsMaterials.materials[0]; + } + return [threejsGeometry, threejsMaterial]; + }; + + ColladaFile.prototype._createAnimatedMesh = function(daeInstanceController, daeController) { + daeController = this._getLinkTarget(daeInstanceController.controller, ColladaController); + if (daeController.skin != null) { + return this._createSkinMesh(daeInstanceController, daeController); + } + if (daeController.morph != null) { + return this._createMorphMesh(daeInstanceController, daeController); + } + this._log("Controller has neither a skin nor a morph, can not create a mesh", ColladaLoader2.messageError); + return null; + }; + + ColladaFile.prototype._createSkinMesh = function(daeInstanceController, daeController) { + var bone, bones, daeInvBindMatricesSource, daeJointsSource, daeSkin, daeSkinGeometry, i, jointNode, jointSid, mesh, parentBone, skeleton, skeletonLink, skeletonRootNodes, threejsGeometry, threejsMaterial, _i, _j, _k, _l, _len, _len2, _len3, _len4, _ref, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + daeSkin = daeController.skin; + if (!(daeSkin != null) || !(daeSkin instanceof ColladaSkin)) { + this._log("Controller for a skinned mesh has no skin, mesh ignored", ColladaLoader2.messageError); + return null; + } + daeSkinGeometry = this._getLinkTarget(daeSkin.source); + if (!(daeSkinGeometry != null)) { + this._log("Skin for a skinned mesh has no geometry, mesh ignored", ColladaLoader2.messageError); + return null; + } + if (!this._options["useAnimations"]) { + _ref = this._createGeometryAndMaterial(daeSkinGeometry, daeInstanceController.materials), threejsGeometry = _ref[0], threejsMaterial = _ref[1]; + return new THREE.Mesh(threejsGeometry, threejsMaterial); + } + skeletonRootNodes = []; + _ref2 = daeInstanceController.skeletons; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + skeletonLink = _ref2[_i]; + skeleton = this._getLinkTarget(skeletonLink, ColladaVisualSceneNode); + if (!(skeleton != null)) { + this._log("Controller instance for a skinned mesh uses unknown skeleton " + skeleton + ", skeleton ignored", ColladaLoader2.messageError); + continue; + } + skeletonRootNodes.push(skeleton); + } + if (skeletonRootNodes.length === 0) { + this._log("Controller instance for a skinned mesh has no skeleton, mesh ignored", ColladaLoader2.messageError); + return null; + } + if (!(daeSkin.joints != null)) { + this._log("Skin has no joints, mesh ignored", ColladaLoader2.messageError); + return null; + } + daeJointsSource = this._getLinkTarget((_ref3 = daeSkin.joints.joints) != null ? _ref3.source : void 0, ColladaSource); + if (!(daeJointsSource != null) || !(daeJointsSource.data != null)) { + this._log("Skin has no joints source, mesh ignored", ColladaLoader2.messageError); + return null; + } + daeInvBindMatricesSource = this._getLinkTarget((_ref4 = daeSkin.joints.invBindMatrices) != null ? _ref4.source : void 0, ColladaSource); + if (!(daeInvBindMatricesSource != null) || !(daeInvBindMatricesSource.data != null)) { + this._log("Skin has no inverse bind matrix source, mesh ignored", ColladaLoader2.messageError); + return null; + } + if (daeJointsSource.data.length * 16 !== daeInvBindMatricesSource.data.length) { + this._log("Skin has an inconsistent length of joint data sources, mesh ignored", ColladaLoader2.messageError); + return null; + } + bones = []; + _ref5 = daeJointsSource.data; + for (_j = 0, _len2 = _ref5.length; _j < _len2; _j++) { + jointSid = _ref5[_j]; + jointNode = this._findJointNode(jointSid, skeletonRootNodes); + if (!(jointNode != null)) { + this._log("Joint " + jointSid + " not found for skin with skeletons " + ((skeletonRootNodes.map(function(node) { + return node.id; + })).join(', ')) + ", mesh ignored", ColladaLoader2.messageError); + return null; + } + bone = this._createBone(jointNode, jointSid, bones); + _fillMatrix4RowMajor(daeInvBindMatricesSource.data, bone.index * 16, bone.invBindMatrix); + } + if (this._options["verboseMessages"]) { + this._log("Skin contains " + bones.length + " bones", ColladaLoader2.messageInfo); + } + i = 0; + while (i < bones.length) { + bone = bones[i]; + i = i + 1; + for (_k = 0, _len3 = bones.length; _k < _len3; _k++) { + parentBone = bones[_k]; + if (bone.node.parent === parentBone.node) { + bone.parent = parentBone; + break; + } + } + if ((bone.node.parent != null) && bone.node.parent instanceof ColladaVisualSceneNode && !(bone.parent != null)) { + bone.parent = this._createBone(bone.node.parent, "", bones); + } + } + if (this._options["verboseMessages"]) { + this._log("Skeleton contains " + bones.length + " bones", ColladaLoader2.messageInfo); + } + if (!(daeSkin.vertexWeights != null)) { + this._log("Skin has no vertex weight data, mesh ignored", ColladaLoader2.messageError); + return null; + } + if (daeSkin.vertexWeights.joints.source.url !== daeSkin.joints.joints.source.url) { + this._log("Skin uses different data sources for joints in and , this is not supported by this loader, mesh ignored", ColladaLoader2.messageError); + return null; + } + _ref6 = this._createGeometryAndMaterial(daeSkinGeometry, daeInstanceController.materials), threejsGeometry = _ref6[0], threejsMaterial = _ref6[1]; + if (this._options["convertSkinsToMorphs"]) { + if (this._addSkinMorphTargets(threejsGeometry, daeSkin, bones, threejsMaterial)) { + return new THREE.MorphAnimMesh(threejsGeometry, threejsMaterial); + } else { + return new THREE.Mesh(threejsGeometry, threejsMaterial); + } + } else { + if (this._addSkinBones(threejsGeometry, daeSkin, bones, threejsMaterial)) { + mesh = new THREE.SkinnedMesh(threejsGeometry, threejsMaterial); + mesh.boneInverses = []; + _ref7 = threejsGeometry.bones; + for (_l = 0, _len4 = _ref7.length; _l < _len4; _l++) { + bone = _ref7[_l]; + mesh.boneInverses.push(bone.inverse); + } + return mesh; + } else { + return new THREE.Mesh(threejsGeometry, threejsMaterial); + } + } + return null; + }; + + ColladaFile.prototype._findJointNode = function(jointSid, skeletonRootNodes) { + var jointNode, skeleton, _i, _len; + jointNode = null; + for (_i = 0, _len = skeletonRootNodes.length; _i < _len; _i++) { + skeleton = skeletonRootNodes[_i]; + jointNode = this._findSidTarget(skeleton, jointSid); + if (jointNode != null) break; + } + if (jointNode instanceof ColladaVisualSceneNode) { + return jointNode; + } else { + return null; + } + }; + + ColladaFile.prototype._createBone = function(boneNode, jointSid, bones) { + var bone, transform, _i, _len, _ref; + bone = new ThreejsSkeletonBone; + bone.sid = jointSid; + bone.node = boneNode; + _ref = boneNode.transformations; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + transform = _ref[_i]; + if (transform.animTarget.channels.length > 0) { + bone.isAnimated = true; + break; + } + } + bone.matrix = new THREE.Matrix4; + boneNode.getTransformMatrix(bone.matrix); + bone.index = bones.length; + bones.push(bone); + return bone; + }; + + ColladaFile.prototype._addSkinMorphTargets = function(threejsGeometry, daeSkin, bones, threejsMaterial) { + var bindShapeMatrix, bone, boneIndex, boneWeight, boneWeightIndex, enableWarningInvalidWeight, enableWarningNoBones, i, material, sourceVertex, sourceVertices, srcVertex, tempVertex, timesteps, totalWeight, vertex, vertexCount, vertices, vindex, vwJoints, vwJointsSource, vwV, vwVcount, vwWeights, vwWeightsSource, w, weights, _i, _j, _len, _len2, _len3, _ref, _ref2, _ref3; + timesteps = this._prepareAnimations(bones); + if (!timesteps > 0) return null; + sourceVertices = threejsGeometry.vertices; + vertexCount = sourceVertices.length; + vwV = daeSkin.vertexWeights.v; + vwVcount = daeSkin.vertexWeights.vcount; + vwJointsSource = this._getLinkTarget(daeSkin.vertexWeights.joints.source); + vwWeightsSource = this._getLinkTarget(daeSkin.vertexWeights.weights.source); + vwJoints = vwJointsSource != null ? vwJointsSource.data : void 0; + vwWeights = vwWeightsSource != null ? vwWeightsSource.data : void 0; + if (!(vwWeights != null)) { + this._log("Skin has no weights data, no morph targets added for mesh", ColladaLoader2.messageError); + return null; + } + bindShapeMatrix = new THREE.Matrix4; + if (daeSkin.bindShapeMatrix != null) { + bindShapeMatrix = _floatsToMatrix4RowMajor(daeSkin.bindShapeMatrix, 0); + } + tempVertex = new THREE.Vector3; + enableWarningNoBones = true; + enableWarningInvalidWeight = true; + for (i = 0, _ref = timesteps - 1; i <= _ref; i += 1) { + this._updateSkinMatrices(bones, bindShapeMatrix, i); + vertices = []; + for (_i = 0, _len = sourceVertices.length; _i < _len; _i++) { + srcVertex = sourceVertices[_i]; + vertices.push(new THREE.Vector3()); + } + vindex = 0; + for (i = 0, _len2 = vertices.length; i < _len2; i++) { + vertex = vertices[i]; + sourceVertex = sourceVertices[i]; + weights = vwVcount[i]; + totalWeight = 0; + for (w = 0, _ref2 = weights - 1; w <= _ref2; w += 1) { + boneIndex = vwV[vindex]; + boneWeightIndex = vwV[vindex + 1]; + vindex += 2; + boneWeight = vwWeights[boneWeightIndex]; + totalWeight += boneWeight; + if (boneIndex >= 0) { + bone = bones[boneIndex]; + tempVertex.copy(sourceVertex); + tempVertex.applyMatrix4(bone.skinMatrix); + tempVertex.multiplyScalar(boneWeight); + vertex.add(tempVertex); + } else { + tempVertex.copy(sourceVertex); + tempVertex.applyMatrix4(bindShapeMatrix); + tempVertex.multiplyScalar(boneWeight); + vertex.add(tempVertex); + } + } + if (weights === 0) { + vertex.copy(sourceVertex); + if (enableWarningNoBones) { + this._log("Skinned vertex not influenced by any bone, some vertices will be unskinned", ColladaLoader2.messageWarning); + enableWarningNoBones = false; + } + } else if (!((0.01 < totalWeight && totalWeight < 1e6))) { + vertex.copy(sourceVertex); + if (enableWarningInvalidWeight) { + this._log("Zero or infinite total weight for skinned vertex, some vertices will be unskinned", ColladaLoader2.messageWarning); + enableWarningInvalidWeight = false; + } + } else { + vertex.multiplyScalar(1 / totalWeight); + } + } + if (vindex !== vwV.length) { + this._log("Skinning did not consume all weights", ColladaLoader2.messageError); + } + threejsGeometry.morphTargets.push({ + name: "target", + vertices: vertices + }); + } + threejsGeometry.computeMorphNormals(); + threejsMaterial.morphTargets = true; + threejsMaterial.morphNormals = true; + if (threejsMaterial.materials != null) { + _ref3 = threejsMaterial.materials; + for (_j = 0, _len3 = _ref3.length; _j < _len3; _j++) { + material = _ref3[_j]; + material.morphTargets = true; + material.morphNormals = true; + } + } + return true; + }; + + ColladaFile.prototype._prepareAnimations = function(bones) { + var bone, channel, channelTimesteps, hasAnimation, timesteps, transform, _i, _j, _k, _len, _len2, _len3, _ref, _ref2; + timesteps = null; + for (_i = 0, _len = bones.length; _i < _len; _i++) { + bone = bones[_i]; + hasAnimation = false; + _ref = bone.node.transformations; + for (_j = 0, _len2 = _ref.length; _j < _len2; _j++) { + transform = _ref[_j]; + transform.resetAnimation(); + transform.selectAllAnimations(); + _ref2 = transform.animTarget.activeChannels; + for (_k = 0, _len3 = _ref2.length; _k < _len3; _k++) { + channel = _ref2[_k]; + hasAnimation = true; + channelTimesteps = channel.inputData.length; + if ((timesteps != null) && channelTimesteps !== timesteps) { + this._log("Inconsistent number of time steps, no morph targets added for mesh. Resample all animations to fix this.", ColladaLoader2.messageError); + return null; + } + timesteps = channelTimesteps; + } + } + if (this._options["verboseMessages"] && !hasAnimation) { + this._log("Joint '" + bone.sid + "' has no animation channel", ColladaLoader2.messageWarning); + } + } + return timesteps; + }; + + ColladaFile.prototype._updateSkinMatrices = function(bones, bindShapeMatrix, keyframe) { + var bone, _i, _j, _len, _len2; + for (_i = 0, _len = bones.length; _i < _len; _i++) { + bone = bones[_i]; + bone.applyAnimation(keyframe); + } + for (_j = 0, _len2 = bones.length; _j < _len2; _j++) { + bone = bones[_j]; + bone.updateSkinMatrix(bindShapeMatrix); + } + return null; + }; + + ColladaFile.prototype._addSkinBones = function(threejsGeometry, daeSkin, bones, threejsMaterial) { + var bindShapeMatrix, bone, boneIndex, boneWeight, boneWeightIndex, bonesPerVertex, enableWarningInvalidWeight, enableWarningTooManyBones, i, indices, key, keyframe, material, pos, rot, scl, sourceVertices, threejsAnimation, threejsBone, threejsBoneAnimation, threejsBones, threejsSkinIndices, threejsSkinWeights, timesteps, totalWeight, vertex, vertexCount, vindex, vwJoints, vwJointsSource, vwV, vwVcount, vwWeights, vwWeightsSource, w, weightCount, weights, _i, _j, _k, _len, _len2, _len3, _len4, _ref, _ref2, _ref3, _ref4, _ref5; + timesteps = this._prepareAnimations(bones); + if (!timesteps > 0) return null; + sourceVertices = threejsGeometry.vertices; + vertexCount = sourceVertices.length; + vwV = daeSkin.vertexWeights.v; + vwVcount = daeSkin.vertexWeights.vcount; + vwJointsSource = this._getLinkTarget(daeSkin.vertexWeights.joints.source); + vwWeightsSource = this._getLinkTarget(daeSkin.vertexWeights.weights.source); + vwJoints = vwJointsSource != null ? vwJointsSource.data : void 0; + vwWeights = vwWeightsSource != null ? vwWeightsSource.data : void 0; + if (!(vwWeights != null)) { + this._log("Skin has no weights data, no skin added for mesh", ColladaLoader2.messageError); + return null; + } + bindShapeMatrix = new THREE.Matrix4; + if (daeSkin.bindShapeMatrix != null) { + bindShapeMatrix = _floatsToMatrix4RowMajor(daeSkin.bindShapeMatrix, 0); + } + pos = new THREE.Vector3(); + rot = new THREE.Quaternion(); + scl = new THREE.Vector3(); + enableWarningTooManyBones = true; + enableWarningInvalidWeight = true; + threejsSkinIndices = []; + threejsSkinWeights = []; + vindex = 0; + bonesPerVertex = 4; + indices = [0, 0, 0, 0]; + weights = [0, 0, 0, 0]; + for (i = 0, _len = sourceVertices.length; i < _len; i++) { + vertex = sourceVertices[i]; + weightCount = vwVcount[i]; + if (weightCount > bonesPerVertex) { + if (enableWarningTooManyBones) { + this._log("Too many bones influence a vertex, some influences will be discarded. Threejs supports only " + bonesPerVertex + " bones per vertex.", ColladaLoader2.messageWarning); + enableWarningTooManyBones = false; + } + weightCount = bonesPerVertex; + } + totalWeight = 0; + for (w = 0, _ref = weightCount - 1; w <= _ref; w += 1) { + boneIndex = vwV[vindex]; + boneWeightIndex = vwV[vindex + 1]; + vindex += 2; + boneWeight = vwWeights[boneWeightIndex]; + totalWeight += boneWeight; + indices[w] = boneIndex; + weights[w] = boneWeight; + } + for (w = weights, _ref2 = bonesPerVertex - 1; w <= _ref2; w += 1) { + indices[w] = 0; + weights[w] = 0; + } + if (!((0.01 < totalWeight && totalWeight < 1e6))) { + if (enableWarningInvalidWeight) { + this._log("Zero or infinite total weight for skinned vertex, skin will be broken", ColladaLoader2.messageWarning); + enableWarningInvalidWeight = false; + } + } else { + for (w = 0, _ref3 = bonesPerVertex - 1; w <= _ref3; w += 1) { + weights[w] /= totalWeight; + } + } + threejsSkinIndices.push(new THREE.Vector4(indices[0], indices[1], indices[2], indices[3])); + threejsSkinWeights.push(new THREE.Vector4(weights[0], weights[1], weights[2], weights[3])); + } + threejsGeometry.skinIndices = threejsSkinIndices; + threejsGeometry.skinWeights = threejsSkinWeights; + threejsBones = []; + for (_i = 0, _len2 = bones.length; _i < _len2; _i++) { + bone = bones[_i]; + threejsBone = {}; + if (bone.parent != null) { + threejsBone.parent = bone.parent.index; + } else { + threejsBone.parent = -1; + } + threejsBone.name = bone.node.name; + bone.matrix.decompose(pos, rot, scl); + threejsBone.pos = [pos.x, pos.y, pos.z]; + threejsBone.scl = [scl.x, scl.y, scl.z]; + threejsBone.rotq = [rot.x, rot.y, rot.z, rot.w]; + threejsBone.rot = null; + threejsBone.inverse = new THREE.Matrix4; + threejsBone.inverse.multiplyMatrices(bone.invBindMatrix, bindShapeMatrix); + threejsBones.push(threejsBone); + } + threejsGeometry.bones = threejsBones; + threejsAnimation = {}; + threejsAnimation.name = "animation"; + threejsAnimation.hierarchy = []; + for (_j = 0, _len3 = bones.length; _j < _len3; _j++) { + bone = bones[_j]; + threejsBoneAnimation = {}; + threejsBoneAnimation.parent = bone.index; + threejsBoneAnimation.keys = []; + for (keyframe = 0, _ref4 = timesteps - 1; keyframe <= _ref4; keyframe += 1) { + bone.applyAnimation(keyframe); + bone.updateSkinMatrix(bindShapeMatrix); + key = {}; + key.time = keyframe; + bone.matrix.decompose(pos, rot, scl); + key.pos = [pos.x, pos.y, pos.z]; + key.scl = [scl.x, scl.y, scl.z]; + key.rot = [rot.x, rot.y, rot.z, rot.w]; + threejsBoneAnimation.keys.push(key); + } + threejsAnimation.hierarchy.push(threejsBoneAnimation); + } + threejsAnimation.fps = 30; + threejsAnimation.length = timesteps - 1; + threejsGeometry.animation = threejsAnimation; + threejsMaterial.skinning = true; + if (threejsMaterial.materials != null) { + _ref5 = threejsMaterial.materials; + for (_k = 0, _len4 = _ref5.length; _k < _len4; _k++) { + material = _ref5[_k]; + material.skinning = true; + } + } + return true; + }; + + ColladaFile.prototype._createMorphMesh = function(daeInstanceController, daeController) { + this._log("Morph animated meshes not supported, mesh ignored", ColladaLoader2.messageError); + return null; + }; + + ColladaFile.prototype._createGeometry = function(daeGeometry, materials) { + var materialIndex, threejsGeometry, triangles, _i, _len, _ref; + threejsGeometry = new THREE.Geometry(); + _ref = daeGeometry.triangles; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + triangles = _ref[_i]; + materialIndex = materials.indices[triangles.material]; + if (!(materialIndex != null)) { + this._log("Material symbol " + triangles.material + " has no bound material instance", ColladaLoader2.messageError); + materialIndex = 0; + } + this._addTrianglesToGeometry(daeGeometry, triangles, materialIndex, threejsGeometry); + } + threejsGeometry.computeFaceNormals(); + threejsGeometry.computeCentroids(); + if (materials.needtangents) threejsGeometry.computeTangents(); + threejsGeometry.computeBoundingBox(); + return threejsGeometry; + }; + + ColladaFile.prototype._addTrianglesToGeometry = function(daeGeometry, triangles, materialIndex, threejsGeometry) { + var baseOffset0, baseOffset1, baseOffset2, c, color, data, dataTriColor, dataTriNormal, dataTriTexcoord, dataVertColor, dataVertNormal, dataVertPos, dataVertTexcoord, face, faceVertexUvs, i, indices, input, inputTriColor, inputTriNormal, inputTriTexcoord, inputTriVertices, inputVertColor, inputVertNormal, inputVertPos, inputVertTexcoord, missingFaces, n0, n1, n2, normal, numExistingFaces, numExistingTexcoordSets, numNewFaces, numNewTexcoordSets, srcTriColor, srcTriNormal, srcTriTexcoord, srcTriVertices, srcVertColor, srcVertNormal, srcVertPos, srcVertTexcoord, t0, t1, t2, texcoord, triangleBaseOffset, triangleStride, v0, v1, v2, vcount, vertexStride, _i, _j, _k, _len, _len2, _len3, _len4, _len5, _len6, _len7, _ref, _ref2, _ref3, _ref4, _step, _unused, + _this = this; + inputTriVertices = null; + inputTriNormal = null; + inputTriColor = null; + inputTriTexcoord = []; + _ref = triangles.inputs; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + input = _ref[_i]; + switch (input.semantic) { + case "VERTEX": + inputTriVertices = input; + break; + case "NORMAL": + inputTriNormal = input; + break; + case "COLOR": + inputTriColor = input; + break; + case "TEXCOORD": + inputTriTexcoord.push(input); + break; + default: + this._log("Unknown triangles input semantic " + input.semantic + " ignored", ColladaLoader2.messageWarning); + } + } + srcTriVertices = this._getLinkTarget(inputTriVertices.source, ColladaVertices); + if (!(srcTriVertices != null)) { + this._log("Geometry " + daeGeometry.id + " has no vertices", ColladaLoader2.messageError); + return; + } + srcTriNormal = this._getLinkTarget(inputTriNormal != null ? inputTriNormal.source : void 0, ColladaSource); + srcTriColor = this._getLinkTarget(inputTriColor != null ? inputTriColor.source : void 0, ColladaSource); + srcTriTexcoord = inputTriTexcoord.map(function(x) { + return _this._getLinkTarget(x != null ? x.source : void 0, ColladaSource); + }); + inputVertPos = null; + inputVertNormal = null; + inputVertColor = null; + inputVertTexcoord = []; + _ref2 = srcTriVertices.inputs; + for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { + input = _ref2[_j]; + switch (input.semantic) { + case "POSITION": + inputVertPos = input; + break; + case "NORMAL": + inputVertNormal = input; + break; + case "COLOR": + inputVertColor = input; + break; + case "TEXCOORD": + inputVertTexcoord.push(input); + break; + default: + this._log("Unknown vertices input semantic " + input.semantic + " ignored", ColladaLoader2.messageWarning); + } + } + srcVertPos = this._getLinkTarget(inputVertPos.source, ColladaSource); + if (!(srcVertPos != null)) { + this._log("Geometry " + daeGeometry.id + " has no vertex positions", ColladaLoader2.messageError); + return; + } + srcVertNormal = this._getLinkTarget(inputVertNormal != null ? inputVertNormal.source : void 0, ColladaSource); + srcVertColor = this._getLinkTarget(inputVertColor != null ? inputVertColor.source : void 0, ColladaSource); + srcVertTexcoord = inputVertTexcoord.map(function(x) { + return _this._getLinkTarget(x != null ? x.source : void 0, ColladaSource); + }); + dataVertPos = this._createVector3Array(srcVertPos); + dataVertNormal = this._createVector3Array(srcVertNormal); + dataTriNormal = this._createVector3Array(srcTriNormal); + dataVertColor = this._createColorArray(srcVertColor); + dataTriColor = this._createColorArray(srcTriColor); + dataVertTexcoord = srcVertTexcoord.map(function(x) { + return _this._createUVArray(x); + }); + dataTriTexcoord = srcTriTexcoord.map(function(x) { + return _this._createUVArray(x); + }); + threejsGeometry.vertices = dataVertPos; + numNewTexcoordSets = dataVertTexcoord.length + dataTriTexcoord.length; + numExistingTexcoordSets = threejsGeometry.faceVertexUvs.length; + numNewFaces = triangles.count; + numExistingFaces = threejsGeometry.faces.count; + _ref3 = threejsGeometry.faceVertexUvs; + for (i = 0, _len3 = _ref3.length; i < _len3; i++) { + faceVertexUvs = _ref3[i]; + if (i < numNewTexcoordSets) { + missingFaces = faceVertexUvs.length - threejsGeometry.faces.length; + this._addEmptyUVs(faceVertexUvs, missingFaces); + } else { + missingFaces = faceVertexUvs.length - threejsGeometry.faces.length + numNewFaces; + this._addEmptyUVs(faceVertexUvs, missingFaces); + } + } + while (threejsGeometry.faceVertexUvs.length < numNewTexcoordSets) { + faceVertexUvs = []; + this._addEmptyUVs(faceVertexUvs, numExistingFaces); + threejsGeometry.faceVertexUvs.push(faceVertexUvs); + } + if (triangles.type !== "triangles") { + vcount = triangles.vcount; + for (_k = 0, _len4 = vcount.length; _k < _len4; _k++) { + c = vcount[_k]; + if (c !== 3) { + this._log("Geometry " + daeGeometry.id + " has non-triangle polygons, geometry ignored", ColladaLoader2.messageError); + return; + } + } + } + indices = triangles.indices; + triangleStride = indices.length / triangles.count; + vertexStride = triangleStride / 3; + _ref4 = triangles.indices; + for (triangleBaseOffset = 0, _len5 = _ref4.length, _step = triangleStride; triangleBaseOffset < _len5; triangleBaseOffset += _step) { + _unused = _ref4[triangleBaseOffset]; + baseOffset0 = triangleBaseOffset + 0 * vertexStride; + baseOffset1 = triangleBaseOffset + 1 * vertexStride; + baseOffset2 = triangleBaseOffset + 2 * vertexStride; + v0 = indices[baseOffset0 + inputTriVertices.offset]; + v1 = indices[baseOffset1 + inputTriVertices.offset]; + v2 = indices[baseOffset2 + inputTriVertices.offset]; + if (dataVertNormal != null) { + normal = [dataVertNormal[v0], dataVertNormal[v1], dataVertNormal[v2]]; + } else if (dataTriNormal != null) { + n0 = indices[baseOffset0 + inputTriNormal.offset]; + n1 = indices[baseOffset1 + inputTriNormal.offset]; + n2 = indices[baseOffset2 + inputTriNormal.offset]; + normal = [dataTriNormal[n0], dataTriNormal[n1], dataTriNormal[n2]]; + } else { + normal = null; + } + if (dataVertColor != null) { + color = [dataVertColor[v0], dataVertColor[v1], dataVertColor[v2]]; + } else if (dataTriColor != null) { + n0 = indices[baseOffset0 + inputTriColor.offset]; + n1 = indices[baseOffset1 + inputTriColor.offset]; + n2 = indices[baseOffset2 + inputTriColor.offset]; + color = [dataTriColor[n0], dataTriColor[n1], dataTriColor[n2]]; + } else { + color = null; + } + face = new THREE.Face3(v0, v1, v2, normal, color); + if (materialIndex != null) face.materialIndex = materialIndex; + threejsGeometry.faces.push(face); + for (i = 0, _len6 = dataVertTexcoord.length; i < _len6; i++) { + data = dataVertTexcoord[i]; + if (!(data != null)) { + geometry.faceVertexUvs[i].push([new THREE.Vector2(0, 0), new THREE.Vector2(0, 0), new THREE.Vector2(0, 0)]); + } else { + texcoord = [data[v0], data[v1], data[v2]]; + geometry.faceVertexUvs[i].push(texcoord); + } + } + for (i = 0, _len7 = dataTriTexcoord.length; i < _len7; i++) { + data = dataTriTexcoord[i]; + if (!(data != null)) { + geometry.faceVertexUvs[i].push([new THREE.Vector2(0, 0), new THREE.Vector2(0, 0), new THREE.Vector2(0, 0)]); + } else { + t0 = indices[baseOffset0 + inputTriTexcoord[i].offset]; + t1 = indices[baseOffset1 + inputTriTexcoord[i].offset]; + t2 = indices[baseOffset2 + inputTriTexcoord[i].offset]; + texcoord = [data[t0], data[t1], data[t2]]; + threejsGeometry.faceVertexUvs[i].push(texcoord); + } + } + } + }; + + ColladaFile.prototype._addEmptyUVs = function(faceVertexUvs, count) { + var i, _ref; + for (i = 0, _ref = count - 1; i <= _ref; i += 1) { + faceVertexUvs.push(new THREE.Vector2(0, 0)); + } + }; + + ColladaFile.prototype._createVector3Array = function(source) { + var data, i, srcData, _ref; + if (!(source != null)) return null; + if (source.stride !== 3) { + this._log("Vector source data does not contain 3D vectors", ColladaLoader2.messageError); + return null; + } + data = []; + srcData = source.data; + for (i = 0, _ref = srcData.length - 1; i <= _ref; i += 3) { + data.push(new THREE.Vector3(srcData[i], srcData[i + 1], srcData[i + 2])); + } + return data; + }; + + ColladaFile.prototype._createColorArray = function(source) { + var data, i, srcData, _ref, _ref2; + if (!(source != null)) return null; + if (source.stride < 3) { + this._log("Color source data does not contain 3+D vectors", ColladaLoader2.messageError); + return null; + } + data = []; + srcData = source.data; + for (i = 0, _ref = srcData.length - 1, _ref2 = source.stride; 0 <= _ref ? i <= _ref : i >= _ref; i += _ref2) { + data.push(new THREE.Color().setRGB(srcData[i], srcData[i + 1], srcData[i + 2])); + } + return data; + }; + + ColladaFile.prototype._createUVArray = function(source) { + var data, i, srcData, _ref, _ref2; + if (!(source != null)) return null; + if (source.stride < 2) { + this._log("UV source data does not contain 2+D vectors", ColladaLoader2.messageError); + return null; + } + data = []; + srcData = source.data; + for (i = 0, _ref = srcData.length - 1, _ref2 = source.stride; 0 <= _ref ? i <= _ref : i >= _ref; i += _ref2) { + data.push(new THREE.Vector2(srcData[i], 1.0 - srcData[i + 1])); + } + return data; + }; + + ColladaFile.prototype._createMaterials = function(daeInstanceMaterials) { + var daeInstanceMaterial, numMaterials, result, symbol, threejsMaterial, _i, _len; + result = new ThreejsMaterialMap; + numMaterials = 0; + for (_i = 0, _len = daeInstanceMaterials.length; _i < _len; _i++) { + daeInstanceMaterial = daeInstanceMaterials[_i]; + symbol = daeInstanceMaterial.symbol; + if (!(symbol != null)) { + this._log("Material instance has no symbol, material skipped.", ColladaLoader2.messageError); + continue; + } + if (result.indices[symbol] != null) { + this._log("Geometry instance tried to map material symbol " + symbol + " multiple times", ColladaLoader2.messageError); + continue; + } + threejsMaterial = this._createMaterial(daeInstanceMaterial); + if ((threejsMaterial.bumpMap != null) || (threejsMaterial.normalMap != null)) { + result.needtangents = true; + } + this.threejs.materials.push(threejsMaterial); + result.materials.push(threejsMaterial); + result.indices[symbol] = numMaterials++; + } + return result; + }; + + ColladaFile.prototype._createMaterial = function(daeInstanceMaterial) { + var daeEffect, daeMaterial; + daeMaterial = this._getLinkTarget(daeInstanceMaterial.material, ColladaMaterial); + if (!(daeMaterial != null)) return this._createDefaultMaterial; + daeEffect = this._getLinkTarget(daeMaterial.effect, ColladaEffect); + if (!(daeEffect != null)) return this._createDefaultMaterial; + return this._createBuiltInMaterial(daeEffect); + }; + + ColladaFile.prototype._createShaderMaterial = function(daeEffect) { + var materialNormalMap, shader, technique, textureDiffuse, textureLight, textureNormal, textureSpecular, uniforms, _ref, _ref2, _ref3; + technique = daeEffect.technique; + shader = THREE.ShaderUtils.lib["normal"]; + uniforms = THREE.UniformsUtils.clone(shader.uniforms); + textureNormal = this._loadThreejsTexture(technique.bump); + if (textureNormal != null) { + uniforms["tNormal"].texture = textureNormal; + uniforms["uNormalScale"].value = 0.85; + } + textureDiffuse = this._loadThreejsTexture(technique.diffuse); + if (textureDiffuse != null) { + uniforms["tDiffuse"].texture = textureDiffuse; + uniforms["enableDiffuse"].value = true; + } else { + uniforms["enableDiffuse"].value = false; + } + textureSpecular = this._loadThreejsTexture(technique.specular); + if (textureSpecular != null) { + uniforms["tSpecular"].texture = textureSpecular; + uniforms["enableSpecular"].value = true; + } else { + uniforms["enableSpecular"].value = false; + } + textureLight = this._loadThreejsTexture(technique.emission); + if (textureLight != null) { + uniforms["tAO"].texture = textureLight; + uniforms["enableAO"].value = true; + } else { + uniforms["enableAO"].value = false; + } + if (((_ref = technique.diffuse) != null ? _ref.color : void 0) != null) { + uniforms["uDiffuseColor"].value.setHex(_colorToHex(technique.diffuse.color)); + } + if (((_ref2 = technique.specular) != null ? _ref2.color : void 0) != null) { + uniforms["uSpecularColor"].value.setHex(_colorToHex(technique.specular.color)); + } + if (((_ref3 = technique.ambient) != null ? _ref3.color : void 0) != null) { + uniforms["uAmbientColor"].value.setHex(_colorToHex(technique.ambient.color)); + } + if (technique.shininess != null) { + uniforms["uShininess"].value = technique.shininess; + } + if (technique.transparency != null) { + uniforms["uOpacity"].value = this._getOpacity(daeEffect); + } + materialNormalMap = new THREE.ShaderMaterial({ + fragmentShader: shader.fragmentShader, + vertexShader: shader.vertexShader, + uniforms: uniforms, + lights: true + }); + return materialNormalMap; + }; + + ColladaFile.prototype._getOpacity = function(daeEffect) { + var opacityMode, technique, transparency, transparent, transparentA, _ref; + technique = daeEffect.technique; + transparent = technique.transparent; + opacityMode = transparent != null ? transparent.opaque : void 0; + if ((opacityMode != null) && opacityMode !== "A_ONE") { + this._log("Opacity mode " + opacityMode + " not supported, transparency will be broken", ColladaLoader2.messageWarning); + } + if ((transparent != null ? transparent.textureSampler : void 0) != null) { + this._log("Separate transparency texture not supported, transparency will be broken", ColladaLoader2.messageWarning); + } + transparentA = (transparent != null ? (_ref = transparent.color) != null ? _ref[3] : void 0 : void 0) || 1; + transparency = technique.transparency || 1; + return transparentA * transparency; + }; + + ColladaFile.prototype._hasTransparency = function(daeEffect) { + var technique, _ref, _ref2; + technique = daeEffect.technique; + return (((_ref = technique.transparent) != null ? _ref.textureSampler : void 0) != null) || ((0 >= (_ref2 = technique.transparency) && _ref2 >= 1)); + }; + + ColladaFile.prototype._createBuiltInMaterial = function(daeEffect) { + var hasTransparency, opacity, params, technique; + technique = daeEffect.technique; + params = {}; + this._setThreejsMaterialParam(params, technique.diffuse, "diffuse", "map", false); + this._setThreejsMaterialParam(params, technique.emission, "emissive", null, false); + this._setThreejsMaterialParam(params, technique.ambient, "ambient", "lightMap", false); + this._setThreejsMaterialParam(params, technique.specular, "specular", "specularMap", false); + this._setThreejsMaterialParam(params, technique.bump, null, "normalMap", false); + if (params["bumpMap"]) params["bumpScale"] = 1.0; + if (params["normalMap"]) params["normalScale"] = new THREE.Vector2(1.0, 1.0); + if (params["map"] != null) params["diffuse"] = 0xffffff; + if (params["specularMap"] != null) params["specular"] = 0xffffff; + if (!(params["diffuse"] != null)) params["diffuse"] = 0xffffff; + if (technique.shininess != null) params["shininess"] = technique.shininess; + if (technique.reflectivity != null) { + params["reflectivity"] = technique.reflectivity; + } + hasTransparency = this._hasTransparency(daeEffect); + if (hasTransparency) { + params["transparent"] = true; + opacity = this._getOpacity(daeEffect); + params["opacity"] = opacity; + params["alphaTest"] = 0.001; + } + if (technique.doubleSided) params["side"] = THREE.DoubleSide; + params["shading"] = THREE.SmoothShading; + params["perPixel"] = true; + switch (technique.shading) { + case "blinn": + case "phong": + params["color"] = params["diffuse"]; + return new THREE.MeshPhongMaterial(params); + case "lambert": + params["color"] = params["diffuse"]; + return new THREE.MeshLambertMaterial(params); + case "constant": + params["color"] = params["emission"]; + return new THREE.MeshBasicMaterial(params); + default: + return this._createDefaultMaterial; + } + }; + + ColladaFile.prototype._createDefaultMaterial = function() { + return new THREE.MeshLambertMaterial({ + color: 0xdddddd, + shading: THREE.FlatShading + }); + }; + + ColladaFile.prototype._setThreejsMaterialParam = function(params, colorOrTexture, nameColor, nameTexture, replace) { + var threejsTexture; + if (!(colorOrTexture != null)) return; + if ((colorOrTexture.color != null) && (nameColor != null)) { + if (!replace && (params[nameColor] != null)) return; + params[nameColor] = _colorToHex(colorOrTexture.color); + } else if ((colorOrTexture.textureSampler != null) && (nameTexture != null)) { + if (!replace && (params[nameTexture] != null)) return; + threejsTexture = this._loadThreejsTexture(colorOrTexture); + if (threejsTexture != null) params[nameTexture] = threejsTexture; + } + }; + + ColladaFile.prototype._loadThreejsTexture = function(colorOrTexture) { + var imageURL, texture, textureImage, textureSampler, textureSurface; + if (!(colorOrTexture.textureSampler != null)) return null; + textureSampler = this._getLinkTarget(colorOrTexture.textureSampler, ColladaEffectSampler); + if (!(textureSampler != null)) return null; + textureImage = null; + if (textureSampler.image != null) { + textureImage = this._getLinkTarget(textureSampler.image, ColladaImage); + } else if (textureSampler.surface != null) { + textureSurface = this._getLinkTarget(textureSampler.surface, ColladaEffectSurface); + textureImage = this._getLinkTarget(textureSurface.initFrom, ColladaImage); + } + if (!(textureImage != null)) return null; + imageURL = this._baseUrl + textureImage.initFrom; + texture = this._loader._loadTextureFromURL(imageURL); + return texture; + }; + + return ColladaFile; + + })(); + + ColladaLoader2 = (function() { + + ColladaLoader2.messageTrace = 0; + + ColladaLoader2.messageInfo = 1; + + ColladaLoader2.messageWarning = 2; + + ColladaLoader2.messageError = 3; + + ColladaLoader2.messageTypes = ["TRACE", "INFO", "WARNING", "ERROR"]; + + function ColladaLoader2() { + this.log = ColladaLoader2.logConsole; + this._imageCache = {}; + this.options = { + "useAnimations": true, + "convertSkinsToMorphs": false, + "verboseMessages": false, + "localImageMode": false + }; + } + + ColladaLoader2.logConsole = function(msg, type) { + console.log("ColladaLoader2 " + ColladaLoader2.messageTypes[type] + ": " + msg); + }; + + ColladaLoader2.prototype.setLog = function(logCallback) { + this.log = logCallback || this.logConsole; + }; + + ColladaLoader2.prototype.addChachedTextures = function(textures) { + var key, value; + for (key in textures) { + value = textures[key]; + this._imageCache[key] = value; + } + }; + + ColladaLoader2.prototype.load = function(url, readyCallback, progressCallback) { + var length, req, _ref, + _this = this; + length = 0; + if ((_ref = document.implementation) != null ? _ref.createDocument : void 0) { + req = new XMLHttpRequest(); + if (typeof req.overrideMimeType === "function") { + req.overrideMimeType("text/xml"); + } + req.onreadystatechange = function() { + if (req.readyState === 4) { + if (req.status === 0 || req.status === 200) { + if (req.responseXML) { + return _this.parse(req.responseXML, readyCallback, url); + } else { + return _this.log("Empty or non-existing file " + url + ".", ColladaLoader2.messageError); + } + } + } else if (req.readyState === 3) { + if (progressCallback) { + if (length === 0) length = req.getResponseHeader("Content-Length"); + return progressCallback({ + total: length, + loaded: req.responseText.length + }); + } + } + }; + req.open("GET", url, true); + req.send(null); + } else { + this.log("Don't know how to parse XML!", ColladaLoader2.messageError); + } + }; + + ColladaLoader2.prototype.parse = function(doc, readyCallback, url) { + var file; + file = new ColladaFile(this); + file.setUrl(url); + file._readyCallback = readyCallback; + file._parseXml(doc); + file._linkAnimations(); + file._createSceneGraph(); + if (file._readyCallback) file._readyCallback(file); + return file; + }; + + ColladaLoader2.prototype._loadTextureFromURL = function(imageURL) { + var texture; + texture = this._imageCache[imageURL]; + if (texture != null) return texture; + if (this.options.localImageMode) texture = this._loadImageLocal(imageURL); + if (!(texture != null)) texture = this._loadImageSimple(imageURL); + if (texture != null) { + this._imageCache[imageURL] = texture; + } else { + this.log("Texture " + imageURL + " could not be loaded, texture will be ignored.", ColladaLoader2.messageError); + } + return texture; + }; + + ColladaLoader2.prototype._loadImageThreejs = function(imageURL) { + var texture; + texture = THREE.ImageUtils.loadTexture(imageURL); + texture.flipY = false; + return texture; + }; + + ColladaLoader2.prototype._loadImageSimple = function(imageURL) { + var image, texture; + image = new Image(); + texture = new THREE.Texture(image); + texture.flipY = false; + texture.wrapS = THREE.RepeatWrapping; + texture.wrapT = THREE.RepeatWrapping; + image.onload = function() { + return texture.needsUpdate = true; + }; + image.crossOrigin = 'anonymous'; + image.src = imageURL; + return texture; + }; + + ColladaLoader2.prototype._loadImageLocal = function(imageURL) { + var cachedURLBase, imageURLBase, key, texture, value, _ref, _ref2; + imageURLBase = this._removeSameDirectoryPath(imageURL); + _ref = this._imageCache; + for (key in _ref) { + value = _ref[key]; + cachedURLBase = this._removeSameDirectoryPath(key); + if (imageURLBase.indexOf(cachedURLBase) >= 0) { + texture = value; + break; + } + } + imageURLBase = this._removeSameDirectoryPath(this._removeFileExtension(imageURL)); + if (!(texture != null)) { + _ref2 = this._imageCache; + for (key in _ref2) { + value = _ref2[key]; + cachedURLBase = this._removeSameDirectoryPath(this._removeFileExtension(key)); + if (imageURLBase.indexOf(cachedURLBase) >= 0) { + texture = value; + break; + } + } + } + return texture; + }; + + ColladaLoader2.prototype._removeFileExtension = function(filePath) { + return filePath.substr(0, filePath.lastIndexOf(".")) || filePath; + }; + + ColladaLoader2.prototype._removeSameDirectoryPath = function(filePath) { + return filePath.replace(/^.\//, ""); + }; + + return ColladaLoader2; + + })(); + + _strToStrings = function(str) { + var trimmed; + if (str.length > 0) { + trimmed = str.trim(); + return trimmed.split(/\s+/); + } else { + return []; + } + }; + + _strToFloats = function(str) { + var data, i, string, strings, _len; + strings = _strToStrings(str); + data = new Float32Array(strings.length); + for (i = 0, _len = strings.length; i < _len; i++) { + string = strings[i]; + data[i] = parseFloat(string); + } + return data; + }; + + _strToInts = function(str) { + var data, i, string, strings, _len; + strings = _strToStrings(str); + data = new Int32Array(strings.length); + for (i = 0, _len = strings.length; i < _len; i++) { + string = strings[i]; + data[i] = parseInt(string, 10); + } + return data; + }; + + _strToBools = function(str) { + var data, i, string, strings, _len, _ref; + strings = _strToStrings(str); + data = new Uint8Array(strings.length); + for (i = 0, _len = strings.length; i < _len; i++) { + string = strings[i]; + data[i] = (_ref = string === "true" || string === "1") != null ? _ref : { + 1: 0 + }; + } + return data; + }; + + _strToColor = function(str) { + var rgba; + rgba = _strToFloats(str); + if (rgba.length === 4) { + return rgba; + } else { + return null; + } + }; + + _colorToHex = function(rgba) { + if (rgba != null) { + return Math.floor(rgba[0] * 255) << 16 ^ Math.floor(rgba[1] * 255) << 8 ^ Math.floor(rgba[2] * 255); + } else { + return null; + } + }; + + _floatsToMatrix4ColumnMajor = function(data, offset) { + return new THREE.Matrix4(data[0 + offset], data[4 + offset], data[8 + offset], data[12 + offset], data[1 + offset], data[5 + offset], data[9 + offset], data[13 + offset], data[2 + offset], data[6 + offset], data[10 + offset], data[14 + offset], data[3 + offset], data[7 + offset], data[11 + offset], data[15 + offset]); + }; + + _floatsToMatrix4RowMajor = function(data, offset) { + return new THREE.Matrix4(data[0 + offset], data[1 + offset], data[2 + offset], data[3 + offset], data[4 + offset], data[5 + offset], data[6 + offset], data[7 + offset], data[8 + offset], data[9 + offset], data[10 + offset], data[11 + offset], data[12 + offset], data[13 + offset], data[14 + offset], data[15 + offset]); + }; + + _fillMatrix4ColumnMajor = function(data, offset, matrix) { + return matrix.set(data[0 + offset], data[4 + offset], data[8 + offset], data[12 + offset], data[1 + offset], data[5 + offset], data[9 + offset], data[13 + offset], data[2 + offset], data[6 + offset], data[10 + offset], data[14 + offset], data[3 + offset], data[7 + offset], data[11 + offset], data[15 + offset]); + }; + + _fillMatrix4RowMajor = function(data, offset, matrix) { + return matrix.set(data[0 + offset], data[1 + offset], data[2 + offset], data[3 + offset], data[4 + offset], data[5 + offset], data[6 + offset], data[7 + offset], data[8 + offset], data[9 + offset], data[10 + offset], data[11 + offset], data[12 + offset], data[13 + offset], data[14 + offset], data[15 + offset]); + }; + + _checkMatrix4 = function(matrix) { + var col1len, col2len, col3len, me; + me = matrix.elements; + if (me[3] !== 0 || me[7] !== 0 || me[11] !== 0 || me[15] !== 1) { + throw new Error("Last row isnt [0,0,0,1]"); + } + col1len = Math.sqrt(me[0] * me[0] + me[1] * me[1] + me[2] * me[2]); + col2len = Math.sqrt(me[4] * me[4] + me[5] * me[5] + me[6] * me[6]); + col3len = Math.sqrt(me[8] * me[8] + me[9] * me[9] + me[10] * me[10]); + if (col1len < 0.9 || col1len > 1.1) { + throw new Error("First column has significant scaling"); + } + if (col2len < 0.9 || col2len > 1.1) { + throw new Error("Second column has significant scaling"); + } + if (col3len < 0.9 || col3len > 1.1) { + throw new Error("Third column has significant scaling"); + } + }; + + _floatsToVec3 = function(data) { + return new THREE.Vector3(data[0], data[1], data[2]); + }; + + TO_RADIANS = Math.PI / 180.0; + + ColladaLoader2.prototype['setLog'] = ColladaLoader2.prototype.setLog; + + ColladaLoader2.prototype['addChachedTextures'] = ColladaLoader2.prototype.addChachedTextures; + + ColladaLoader2.prototype['load'] = ColladaLoader2.prototype.load; + + ColladaLoader2.prototype['parse'] = ColladaLoader2.prototype.parse; + + if (typeof module !== "undefined" && module !== null) { + module['exports'] = ColladaLoader2; + } else if (typeof window !== "undefined" && window !== null) { + window['ColladaLoader2'] = ColladaLoader2; + } + +}).call(this); diff --git a/vulcano_web/javascript_libraries/Ros3D.js b/vulcano_web/javascript_libraries/Ros3D.js new file mode 100755 index 0000000..604c9c6 --- /dev/null +++ b/vulcano_web/javascript_libraries/Ros3D.js @@ -0,0 +1,169 @@ +/** + * @author Russell Toris - rctoris@wpi.edu + * @author David Gossow - dgossow@willowgarage.com + */ + +var ROS3D = ROS3D || { + REVISION : '8-devel' +}; + +// Marker types +ROS3D.MARKER_ARROW = 0; +ROS3D.MARKER_CUBE = 1; +ROS3D.MARKER_SPHERE = 2; +ROS3D.MARKER_CYLINDER = 3; +ROS3D.MARKER_LINE_STRIP = 4; +ROS3D.MARKER_LINE_LIST = 5; +ROS3D.MARKER_CUBE_LIST = 6; +ROS3D.MARKER_SPHERE_LIST = 7; +ROS3D.MARKER_POINTS = 8; +ROS3D.MARKER_TEXT_VIEW_FACING = 9; +ROS3D.MARKER_MESH_RESOURCE = 10; +ROS3D.MARKER_TRIANGLE_LIST = 11; + +// Interactive marker feedback types +ROS3D.INTERACTIVE_MARKER_KEEP_ALIVE = 0; +ROS3D.INTERACTIVE_MARKER_POSE_UPDATE = 1; +ROS3D.INTERACTIVE_MARKER_MENU_SELECT = 2; +ROS3D.INTERACTIVE_MARKER_BUTTON_CLICK = 3; +ROS3D.INTERACTIVE_MARKER_MOUSE_DOWN = 4; +ROS3D.INTERACTIVE_MARKER_MOUSE_UP = 5; + +// Interactive marker control types +ROS3D.INTERACTIVE_MARKER_NONE = 0; +ROS3D.INTERACTIVE_MARKER_MENU = 1; +ROS3D.INTERACTIVE_MARKER_BUTTON = 2; +ROS3D.INTERACTIVE_MARKER_MOVE_AXIS = 3; +ROS3D.INTERACTIVE_MARKER_MOVE_PLANE = 4; +ROS3D.INTERACTIVE_MARKER_ROTATE_AXIS = 5; +ROS3D.INTERACTIVE_MARKER_MOVE_ROTATE = 6; + +// Interactive marker rotation behavior +ROS3D.INTERACTIVE_MARKER_INHERIT = 0; +ROS3D.INTERACTIVE_MARKER_FIXED = 1; +ROS3D.INTERACTIVE_MARKER_VIEW_FACING = 2; + +/** + * Create a THREE material based on the given RGBA values. + * + * @param r - the red value + * @param g - the green value + * @param b - the blue value + * @param a - the alpha value + * @returns the THREE material + */ +ROS3D.makeColorMaterial = function(r, g, b, a) { + var color = new THREE.Color(); + color.setRGB(r, g, b); + if (a <= 0.99) { + return new THREE.MeshBasicMaterial({ + color : color.getHex(), + opacity : a + 0.1, + transparent : true, + depthWrite : true, + blendSrc : THREE.SrcAlphaFactor, + blendDst : THREE.OneMinusSrcAlphaFactor, + blendEquation : THREE.ReverseSubtractEquation, + blending : THREE.NormalBlending + }); + } else { + return new THREE.MeshLambertMaterial({ + color : color.getHex(), + opacity : a, + blending : THREE.NormalBlending + }); + } +}; + +/** + * Return the intersection between the mouseray and the plane. + * + * @param mouseRay - the mouse ray + * @param planeOrigin - the origin of the plane + * @param planeNormal - the normal of the plane + * @returns the intersection point + */ +ROS3D.intersectPlane = function(mouseRay, planeOrigin, planeNormal) { + var vector = new THREE.Vector3(); + var intersectPoint = new THREE.Vector3(); + vector.subVectors(planeOrigin, mouseRay.origin); + var dot = mouseRay.direction.dot(planeNormal); + + // bail if ray and plane are parallel + if (Math.abs(dot) < mouseRay.precision) { + return undefined; + } + + // calc distance to plane + var scalar = planeNormal.dot(vector) / dot; + + intersectPoint.addVectors(mouseRay.origin, mouseRay.direction.clone().multiplyScalar(scalar)); + return intersectPoint; +}; + +/** + * Find the closest point on targetRay to any point on mouseRay. Math taken from + * http://paulbourke.net/geometry/lineline3d/ + * + * @param targetRay - the target ray to use + * @param mouseRay - the mouse ray + * @param the closest point between the two rays + */ +ROS3D.findClosestPoint = function(targetRay, mouseRay) { + var v13 = new THREE.Vector3(); + v13.subVectors(targetRay.origin, mouseRay.origin); + var v43 = mouseRay.direction.clone(); + var v21 = targetRay.direction.clone(); + var d1343 = v13.dot(v43); + var d4321 = v43.dot(v21); + var d1321 = v13.dot(v21); + var d4343 = v43.dot(v43); + var d2121 = v21.dot(v21); + + var denom = d2121 * d4343 - d4321 * d4321; + // check within a delta + if (Math.abs(denom) <= 0.0001) { + return undefined; + } + var numer = d1343 * d4321 - d1321 * d4343; + + var mua = numer / denom; + return mua; +}; + +/** + * Find the closest point between the axis and the mouse. + * + * @param axisRay - the ray from the axis + * @param camera - the camera to project from + * @param mousePos - the mouse position + * @returns the closest axis point + */ +ROS3D.closestAxisPoint = function(axisRay, camera, mousePos) { + var projector = new THREE.Projector(); + + // project axis onto screen + var o = axisRay.origin.clone(); + projector.projectVector(o, camera); + var o2 = axisRay.direction.clone().add(axisRay.origin); + projector.projectVector(o2, camera); + + // d is the axis vector in screen space (d = o2-o) + var d = o2.clone().sub(o); + + // t is the 2d ray param of perpendicular projection of mousePos onto o + var tmp = new THREE.Vector2(); + // (t = (mousePos - o) * d / (d*d)) + var t = tmp.subVectors(mousePos, o).dot(d) / d.dot(d); + + // mp is the final 2d-projected mouse pos (mp = o + d*t) + var mp = new THREE.Vector2(); + mp.addVectors(o, d.clone().multiplyScalar(t)); + + // go back to 3d by shooting a ray + var vector = new THREE.Vector3(mp.x, mp.y, 0.5); + projector.unprojectVector(vector, camera); + var mpRay = new THREE.Ray(camera.position, vector.sub(camera.position).normalize()); + + return ROS3D.findClosestPoint(axisRay, mpRay); +}; diff --git a/vulcano_web/javascript_libraries/depthcloud/DepthCloud.js b/vulcano_web/javascript_libraries/depthcloud/DepthCloud.js new file mode 100755 index 0000000..b13cc05 --- /dev/null +++ b/vulcano_web/javascript_libraries/depthcloud/DepthCloud.js @@ -0,0 +1,305 @@ +/** + * @author Julius Kammerl - jkammerl@willowgarage.com + */ + +/** + * The DepthCloud object. + * + * @constructor + * @param options - object with following keys: + * * url - the URL of the stream + * * f (optional) - the camera's focal length (defaults to standard Kinect calibration) + * * pointSize (optional) - point size (pixels) for rendered point cloud + * * width (optional) - width of the video stream + * * height (optional) - height of the video stream + * * whiteness (optional) - blends rgb values to white (0..100) + * * varianceThreshold (optional) - threshold for variance filter, used for compression artifact removal + */ +ROS3D.DepthCloud = function(options) { + options = options || {}; + THREE.Object3D.call(this); + + this.url = options.url; + this.f = options.f || 526; + this.pointSize = options.pointSize || 3; + this.width = options.width || 1024; + this.height = options.height || 1024; + this.whiteness = options.whiteness || 0; + this.varianceThreshold = options.varianceThreshold || 0.000016667; + + var metaLoaded = false; + this.video = document.createElement('video'); + + this.video.addEventListener('loadedmetadata', this.metaLoaded.bind(this), false); + + this.video.loop = true; + this.video.src = this.url; + this.video.crossOrigin = 'Anonymous'; + this.video.setAttribute('crossorigin', 'Anonymous'); + + // define custom shaders + this.vertex_shader = [ + 'uniform sampler2D map;', + '', + 'uniform float width;', + 'uniform float height;', + 'uniform float nearClipping, farClipping;', + '', + 'uniform float pointSize;', + 'uniform float zOffset;', + '', + 'uniform float focallength;', + '', + 'varying vec2 vUvP;', + 'varying vec2 colorP;', + '', + 'varying float depthVariance;', + 'varying float maskVal;', + '', + 'float sampleDepth(vec2 pos)', + ' {', + ' float depth;', + ' ', + ' vec2 vUv = vec2( pos.x / (width*2.0), pos.y / (height*2.0)+0.5 );', + ' vec2 vUv2 = vec2( pos.x / (width*2.0)+0.5, pos.y / (height*2.0)+0.5 );', + ' ', + ' vec4 depthColor = texture2D( map, vUv );', + ' ', + ' depth = ( depthColor.r + depthColor.g + depthColor.b ) / 3.0 ;', + ' ', + ' if (depth>0.99)', + ' {', + ' vec4 depthColor2 = texture2D( map, vUv2 );', + ' float depth2 = ( depthColor2.r + depthColor2.g + depthColor2.b ) / 3.0 ;', + ' depth = 0.99+depth2;', + ' }', + ' ', + ' return depth;', + ' }', + '', + 'float median(float a, float b, float c)', + ' {', + ' float r=a;', + ' ', + ' if ( (a0.5) || (vUvP.y<0.5) || (vUvP.y>0.0))', + ' {', + ' vec2 smp = decodeDepth(vec2(position.x, position.y));', + ' float depth = smp.x;', + ' depthVariance = smp.y;', + ' ', + ' float z = -depth;', + ' ', + ' pos = vec4(', + ' ( position.x / width - 0.5 ) * z * (1000.0/focallength) * -1.0,', + ' ( position.y / height - 0.5 ) * z * (1000.0/focallength),', + ' (- z + zOffset / 1000.0) * 2.0,', + ' 1.0);', + ' ', + ' vec2 maskP = vec2( position.x / (width*2.0), position.y / (height*2.0) );', + ' vec4 maskColor = texture2D( map, maskP );', + ' maskVal = ( maskColor.r + maskColor.g + maskColor.b ) / 3.0 ;', + ' }', + ' ', + ' gl_PointSize = pointSize;', + ' gl_Position = projectionMatrix * modelViewMatrix * pos;', + ' ', + '}' + ].join('\n'); + + this.fragment_shader = [ + 'uniform sampler2D map;', + 'uniform float varianceThreshold;', + 'uniform float whiteness;', + '', + 'varying vec2 vUvP;', + 'varying vec2 colorP;', + '', + 'varying float depthVariance;', + 'varying float maskVal;', + '', + '', + 'void main() {', + ' ', + ' vec4 color;', + ' ', + ' if ( (depthVariance>varianceThreshold) || (maskVal>0.5) ||(vUvP.x<0.0)|| (vUvP.x>0.5) || (vUvP.y<0.5) || (vUvP.y>1.0))', + ' { ', + ' discard;', + ' }', + ' else ', + ' {', + ' color = texture2D( map, colorP );', + ' ', + ' float fader = whiteness /100.0;', + ' ', + ' color.r = color.r * (1.0-fader)+ fader;', + ' ', + ' color.g = color.g * (1.0-fader)+ fader;', + ' ', + ' color.b = color.b * (1.0-fader)+ fader;', + ' ', + ' color.a = 1.0;//smoothstep( 20000.0, -20000.0, gl_FragCoord.z / gl_FragCoord.w );', + ' }', + ' ', + ' gl_FragColor = vec4( color.r, color.g, color.b, color.a );', + ' ', + '}' + ].join('\n'); +}; +ROS3D.DepthCloud.prototype.__proto__ = THREE.Object3D.prototype; + +/** + * Callback called when video metadata is ready + */ +ROS3D.DepthCloud.prototype.metaLoaded = function() { + this.metaLoaded = true; + this.initStreamer(); +}; + +/** + * Callback called when video metadata is ready + */ +ROS3D.DepthCloud.prototype.initStreamer = function() { + + if (this.metaLoaded) { + this.texture = new THREE.Texture(this.video); + this.geometry = new THREE.Geometry(); + + for (var i = 0, l = this.width * this.height; i < l; i++) { + + var vertex = new THREE.Vector3(); + vertex.x = (i % this.width); + vertex.y = Math.floor(i / this.width); + + this.geometry.vertices.push(vertex); + } + + this.material = new THREE.ShaderMaterial({ + uniforms : { + 'map' : { + type : 't', + value : this.texture + }, + 'width' : { + type : 'f', + value : this.width + }, + 'height' : { + type : 'f', + value : this.height + }, + 'focallength' : { + type : 'f', + value : this.f + }, + 'pointSize' : { + type : 'f', + value : this.pointSize + }, + 'zOffset' : { + type : 'f', + value : 0 + }, + 'whiteness' : { + type : 'f', + value : this.whiteness + }, + 'varianceThreshold' : { + type : 'f', + value : this.varianceThreshold + } + }, + vertexShader : this.vertex_shader, + fragmentShader : this.fragment_shader + }); + + this.mesh = new THREE.ParticleSystem(this.geometry, this.material); + this.mesh.position.x = 0; + this.mesh.position.y = 0; + this.add(this.mesh); + + var that = this; + + setInterval(function() { + if (that.video.readyState === that.video.HAVE_ENOUGH_DATA) { + that.texture.needsUpdate = true; + } + }, 1000 / 30); + } +}; + +/** + * Start video playback + */ +ROS3D.DepthCloud.prototype.startStream = function() { + this.video.play(); +}; + +/** + * Stop video playback + */ +ROS3D.DepthCloud.prototype.stopStream = function() { + this.video.stop(); +}; diff --git a/vulcano_web/javascript_libraries/eventemitter2.min.js b/vulcano_web/javascript_libraries/eventemitter2.min.js new file mode 100755 index 0000000..5acfdaf --- /dev/null +++ b/vulcano_web/javascript_libraries/eventemitter2.min.js @@ -0,0 +1 @@ +!function(d,b){var e=Array.isArray?Array.isArray:function h(k){return Object.prototype.toString.call(k)==="[object Array]"};var f=10;function i(){this._events={};if(this._conf){a.call(this,this._conf)}}function a(k){if(k){this._conf=k;k.delimiter&&(this.delimiter=k.delimiter);k.maxListeners&&(this._events.maxListeners=k.maxListeners);k.wildcard&&(this.wildcard=k.wildcard);k.newListener&&(this.newListener=k.newListener);if(this.wildcard){this.listenerTree={}}}}function j(k){this._events={};this.newListener=false;a.call(this,k)}function c(l,t,y,n){if(!y){return[]}var u=[],q,p,w,x,s,r,m,k=t.length,o=t[n],v=t[n+1];if(n===k&&y._listeners){if(typeof y._listeners==="function"){l&&l.push(y._listeners);return[y]}else{for(q=0,p=y._listeners.length;q0&&l._listeners.length>k){l._listeners.warned=true;console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",l._listeners.length);console.trace()}}}}}return true}o=q.shift()}return true}j.prototype.delimiter=".";j.prototype.setMaxListeners=function(k){this._events||i.call(this);this._events.maxListeners=k;if(!this._conf){this._conf={}}this._conf.maxListeners=k};j.prototype.event="";j.prototype.once=function(l,k){this.many(l,1,k);return this};j.prototype.many=function(n,k,m){var l=this;if(typeof m!=="function"){throw new Error("many only accepts instances of Function")}function o(){if(--k===0){l.off(n,o)}m.apply(this,arguments)}o._origin=m;this.on(n,o);return l};j.prototype.emit=function(){this._events||i.call(this);var r=arguments[0];if(r==="newListener"&&!this.newListener){if(!this._events.newListener){return false}}if(this._all){var k=arguments.length;var m=new Array(k-1);for(var n=1;n1){switch(arguments.length){case 2:q.call(this,arguments[1]);break;case 3:q.call(this,arguments[1],arguments[2]);break;default:var k=arguments.length;var m=new Array(k-1);for(var n=1;n0)||this._all}else{return this._all}}};j.prototype.on=function(l,n){if(typeof l==="function"){this.onAny(l);return this}if(typeof n!=="function"){throw new Error("on only accepts instances of Function")}this._events||i.call(this);this.emit("newListener",l,n);if(this.wildcard){g.call(this,l,n);return this}if(!this._events[l]){this._events[l]=n}else{if(typeof this._events[l]==="function"){this._events[l]=[this._events[l],n]}else{if(e(this._events[l])){this._events[l].push(n);if(!this._events[l].warned){var k=f;if(typeof this._events.maxListeners!=="undefined"){k=this._events.maxListeners}if(k>0&&this._events[l].length>k){this._events[l].warned=true;console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[l].length);console.trace()}}}}}return this};j.prototype.onAny=function(k){if(!this._all){this._all=[]}if(typeof k!=="function"){throw new Error("onAny only accepts instances of Function")}this._all.push(k);return this};j.prototype.addListener=j.prototype.on;j.prototype.off=function(q,l){if(typeof l!=="function"){throw new Error("removeListener only takes instances of Function")}var m,t=[];if(this.wildcard){var r=typeof q==="string"?q.split(this.delimiter):q.slice();t=c.call(this,null,r,this.listenerTree,0)}else{if(!this._events[q]){return this}m=this._events[q];t.push({_listeners:m})}for(var s=0;s0){m=this._all;for(n=0,k=m.length;n 0) { + this.menu = new ROS3D.InteractiveMarkerMenu({ + menuEntries : handle.menuEntries + }); + + // forward menu select events + this.menu.addEventListener('menu-select', function(event) { + that.dispatchEvent(event); + }); + } +}; +ROS3D.InteractiveMarker.prototype.__proto__ = THREE.Object3D.prototype; + +/** + * Show the interactive marker menu associated with this marker. + * + * @param control - the control to use + * @param event - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.showMenu = function(control, event) { + if (this.menu) { + this.menu.show(control, event); + } +}; + +/** + * Move the axis based on the given event information. + * + * @param control - the control to use + * @param origAxis - the origin of the axis + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.moveAxis = function(control, origAxis, event3d) { + if (this.dragging) { + var currentControlOri = control.currentControlOri; + var axis = origAxis.clone().applyQuaternion(currentControlOri); + // get move axis in world coords + var originWorld = this.dragStart.event3d.intersection.point; + var axisWorld = axis.clone().applyQuaternion(this.dragStart.orientationWorld.clone()); + + var axisRay = new THREE.Ray(originWorld, axisWorld); + + // find closest point to mouse on axis + var t = ROS3D.closestAxisPoint(axisRay, event3d.camera, event3d.mousePos); + + // offset from drag start position + var p = new THREE.Vector3(); + p.addVectors(this.dragStart.position, axis.clone().applyQuaternion(this.dragStart.orientation) + .multiplyScalar(t)); + this.setPosition(control, p); + + event3d.stopPropagation(); + } +}; + +/** + * Move with respect to the plane based on the contorl and event. + * + * @param control - the control to use + * @param origNormal - the normal of the origin + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.movePlane = function(control, origNormal, event3d) { + if (this.dragging) { + var currentControlOri = control.currentControlOri; + var normal = origNormal.clone().applyQuaternion(currentControlOri); + // get plane params in world coords + var originWorld = this.dragStart.event3d.intersection.point; + var normalWorld = normal.clone().applyQuaternion(this.dragStart.orientationWorld); + + // intersect mouse ray with plane + var intersection = ROS3D.intersectPlane(event3d.mouseRay, originWorld, normalWorld); + + // offset from drag start position + var p = new THREE.Vector3(); + p.subVectors(intersection, originWorld); + p.add(this.dragStart.positionWorld); + this.setPosition(control, p); + event3d.stopPropagation(); + } +}; + +/** + * Rotate based on the control and event given. + * + * @param control - the control to use + * @param origOrientation - the orientation of the origin + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.rotateAxis = function(control, origOrientation, event3d) { + if (this.dragging) { + control.updateMatrixWorld(); + + var currentControlOri = control.currentControlOri; + var orientation = currentControlOri.clone().multiply(origOrientation.clone()); + + var normal = (new THREE.Vector3(1, 0, 0)).applyQuaternion(orientation); + + // get plane params in world coords + var originWorld = this.dragStart.event3d.intersection.point; + var normalWorld = normal.applyQuaternion(this.dragStart.orientationWorld); + + // intersect mouse ray with plane + var intersection = ROS3D.intersectPlane(event3d.mouseRay, originWorld, normalWorld); + + // offset local origin to lie on intersection plane + var normalRay = new THREE.Ray(this.dragStart.positionWorld, normalWorld); + var rotOrigin = ROS3D.intersectPlane(normalRay, originWorld, normalWorld); + + // rotates from world to plane coords + var orientationWorld = this.dragStart.orientationWorld.clone().multiply(orientation); + var orientationWorldInv = orientationWorld.clone().inverse(); + + // rotate original and current intersection into local coords + intersection.sub(rotOrigin); + intersection.applyQuaternion(orientationWorldInv); + + var origIntersection = this.dragStart.event3d.intersection.point.clone(); + origIntersection.sub(rotOrigin); + origIntersection.applyQuaternion(orientationWorldInv); + + // compute relative 2d angle + var a1 = Math.atan2(intersection.y, intersection.z); + var a2 = Math.atan2(origIntersection.y, origIntersection.z); + var a = a2 - a1; + + var rot = new THREE.Quaternion(); + rot.setFromAxisAngle(normal, a); + + // rotate + this.setOrientation(control, rot.multiply(this.dragStart.orientationWorld)); + + // offset from drag start position + event3d.stopPropagation(); + } +}; + +/** + * Dispatch the given event type. + * + * @param type - the type of event + * @param control - the control to use + */ +ROS3D.InteractiveMarker.prototype.feedbackEvent = function(type, control) { + this.dispatchEvent({ + type : type, + position : this.position.clone(), + orientation : this.quaternion.clone(), + controlName : control.name + }); +}; + +/** + * Start a drag action. + * + * @param control - the control to use + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.startDrag = function(control, event3d) { + if (event3d.domEvent.button === 0) { + event3d.stopPropagation(); + this.dragging = true; + this.updateMatrixWorld(true); + var scale = new THREE.Vector3(); + this.matrixWorld + .decompose(this.dragStart.positionWorld, this.dragStart.orientationWorld, scale); + this.dragStart.position = this.position.clone(); + this.dragStart.orientation = this.quaternion.clone(); + this.dragStart.event3d = event3d; + + this.feedbackEvent('user-mousedown', control); + } +}; + +/** + * Stop a drag action. + * + * @param control - the control to use + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.stopDrag = function(control, event3d) { + if (event3d.domEvent.button === 0) { + event3d.stopPropagation(); + this.dragging = false; + this.dragStart.event3d = {}; + this.onServerSetPose(this.bufferedPoseEvent); + this.bufferedPoseEvent = undefined; + + this.feedbackEvent('user-mouseup', control); + } +}; + +/** + * Handle a button click. + * + * @param control - the control to use + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.buttonClick = function(control, event3d) { + event3d.stopPropagation(); + this.feedbackEvent('user-button-click', control); +}; + +/** + * Handle a user pose change for the position. + * + * @param control - the control to use + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.setPosition = function(control, position) { + this.position = position; + this.feedbackEvent('user-pose-change', control); +}; + +/** + * Handle a user pose change for the orientation. + * + * @param control - the control to use + * @param event3d - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.setOrientation = function(control, orientation) { + orientation.normalize(); + this.quaternion = orientation; + this.feedbackEvent('user-pose-change', control); +}; + +/** + * Update the marker based when the pose is set from the server. + * + * @param event - the event that caused this + */ +ROS3D.InteractiveMarker.prototype.onServerSetPose = function(event) { + if (event !== undefined) { + // don't update while dragging + if (this.dragging) { + this.bufferedPoseEvent = event; + } else { + var pose = event.pose; + + this.position.x = pose.position.x; + this.position.y = pose.position.y; + this.position.z = pose.position.z; + + this.useQuaternion = true; + this.quaternion = new THREE.Quaternion(pose.orientation.x, pose.orientation.y, + pose.orientation.z, pose.orientation.w); + + this.updateMatrixWorld(true); + } + } +}; diff --git a/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerClient.js b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerClient.js new file mode 100755 index 0000000..d2fe338 --- /dev/null +++ b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerClient.js @@ -0,0 +1,183 @@ +/** + * @author David Gossow - dgossow@willowgarage.com + */ + +/** + * A client for an interactive marker topic. + * + * @constructor + * @param options - object with following keys: + * * ros - a handle to the ROS connection + * * tfClient - a handle to the TF client + * * topic (optional) - the topic to subscribe to, like '/basic_controls' + * * path (optional) - the base path to any meshes that will be loaded + * * camera - the main camera associated with the viewer for this marker client + * * rootObject (optional) - the root THREE 3D object to render to + */ +ROS3D.InteractiveMarkerClient = function(options) { + var that = this; + options = options || {}; + this.ros = options.ros; + this.tfClient = options.tfClient; + this.topic = options.topic; + this.path = options.path || '/'; + this.camera = options.camera; + this.rootObject = options.rootObject || new THREE.Object3D(); + + this.interactiveMarkers = {}; + this.updateTopic = null; + this.feedbackTopic = null; + + // check for an initial topic + if (this.topic) { + this.subscribe(this.topic); + } +}; + +/** + * Subscribe to the given interactive marker topic. This will unsubscribe from any current topics. + * + * @param topic - the topic to subscribe to, like '/basic_controls' + */ +ROS3D.InteractiveMarkerClient.prototype.subscribe = function(topic) { + // unsubscribe to the other topics + this.unsubscribe(); + + this.updateTopic = new ROSLIB.Topic({ + ros : this.ros, + name : topic + '/tunneled/update', + messageType : 'visualization_msgs/InteractiveMarkerUpdate', + compression : 'png' + }); + this.updateTopic.subscribe(this.processUpdate.bind(this)); + + this.feedbackTopic = new ROSLIB.Topic({ + ros : this.ros, + name : topic + '/feedback', + messageType : 'visualization_msgs/InteractiveMarkerFeedback', + compression : 'png' + }); + this.feedbackTopic.advertise(); + + this.initService = new ROSLIB.Service({ + ros : this.ros, + name : topic + '/tunneled/get_init', + serviceType : 'demo_interactive_markers/GetInit' + }); + var request = new ROSLIB.ServiceRequest({}); + this.initService.callService(request, this.processInit.bind(this)); +}; + +/** + * Unsubscribe from the current interactive marker topic. + */ +ROS3D.InteractiveMarkerClient.prototype.unsubscribe = function() { + if (this.updateTopic) { + this.updateTopic.unsubscribe(); + } + if (this.feedbackTopic) { + this.feedbackTopic.unadvertise(); + } + // erase all markers + for (var intMarkerName in this.interactiveMarkers) { + this.eraseIntMarker(intMarkerName); + } + this.interactiveMarkers = {}; +}; + +/** + * Process the given interactive marker initialization message. + * + * @param initMessage - the interactive marker initialization message to process + */ +ROS3D.InteractiveMarkerClient.prototype.processInit = function(initMessage) { + var message = initMessage.msg; + + // erase any old markers + message.erases = []; + for (var intMarkerName in this.interactiveMarkers) { + message.erases.push(intMarkerName); + } + message.poses = []; + + // treat it as an update + this.processUpdate(message); +}; + +/** + * Process the given interactive marker update message. + * + * @param initMessage - the interactive marker update message to process + */ +ROS3D.InteractiveMarkerClient.prototype.processUpdate = function(message) { + var that = this; + + // erase any markers + message.erases.forEach(function(name) { + that.eraseIntMarker(name); + }); + + // updates marker poses + message.poses.forEach(function(poseMessage) { + var marker = that.interactiveMarkers[poseMessage.name]; + if (marker) { + marker.setPoseFromServer(poseMessage.pose); + } + }); + + // add new markers + message.markers.forEach(function(msg) { + // get rid of anything with the same name + var oldhandle = that.interactiveMarkers[msg.name]; + if (oldhandle) { + that.eraseIntMarker(oldhandle.name); + } + + // create the handle + var handle = new ROS3D.InteractiveMarkerHandle({ + message : msg, + feedbackTopic : that.feedbackTopic, + tfClient : that.tfClient + }); + that.interactiveMarkers[msg.name] = handle; + + // create the actual marker + var intMarker = new ROS3D.InteractiveMarker({ + handle : handle, + camera : that.camera, + path : that.path + }); + // add it to the scene + intMarker.name = msg.name; + that.rootObject.add(intMarker); + + // listen for any pose updates from the server + handle.on('pose', function(pose) { + intMarker.onServerSetPose({ + pose : pose + }); + }); + + intMarker.addEventListener('user-pose-change', handle.setPoseFromClient.bind(handle)); + intMarker.addEventListener('user-mousedown', handle.onMouseDown.bind(handle)); + intMarker.addEventListener('user-mouseup', handle.onMouseUp.bind(handle)); + intMarker.addEventListener('user-button-click', handle.onButtonClick.bind(handle)); + intMarker.addEventListener('menu-select', handle.onMenuSelect.bind(handle)); + + // now list for any TF changes + handle.subscribeTf(); + }); +}; + +/** + * Erase the interactive marker with the given name. + * + * @param intMarkerName - the interactive marker name to delete + */ +ROS3D.InteractiveMarkerClient.prototype.eraseIntMarker = function(intMarkerName) { + if (this.interactiveMarkers[intMarkerName]) { + // remove the object + this.rootObject.remove(this.rootObject.getChildByName(intMarkerName)); + delete this.interactiveMarkers[intMarkerName]; + } +}; diff --git a/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerControl.js b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerControl.js new file mode 100755 index 0000000..b9ec195 --- /dev/null +++ b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerControl.js @@ -0,0 +1,181 @@ +/** + * @author David Gossow - dgossow@willowgarage.com + */ + +/** + * The main marker control object for an interactive marker. + * + * @constructor + * @param options - object with following keys: + * * parent - the parent of this control + * * message - the interactive marker control message + * * camera - the main camera associated with the viewer for this marker client + * * path (optional) - the base path to any meshes that will be loaded + */ +ROS3D.InteractiveMarkerControl = function(options) { + var that = this; + THREE.Object3D.call(this); + THREE.EventDispatcher.call(this); + + options = options || {}; + this.parent = options.parent; + var message = options.message; + this.name = message.name; + this.camera = options.camera; + this.path = options.path || '/'; + this.dragging = false; + + // orientation for the control + var controlOri = new THREE.Quaternion(message.orientation.x, message.orientation.y, + message.orientation.z, message.orientation.w); + controlOri.normalize(); + + // transform x axis into local frame + var controlAxis = new THREE.Vector3(1, 0, 0); + controlAxis.applyQuaternion(controlOri); + + this.currentControlOri = new THREE.Quaternion(); + + // determine mouse interaction + switch (message.interaction_mode) { + case ROS3D.INTERACTIVE_MARKER_MOVE_AXIS: + this.addEventListener('mousemove', this.parent.moveAxis.bind(this.parent, this, controlAxis)); + this.addEventListener('touchmove', this.parent.moveAxis.bind(this.parent, this, controlAxis)); + break; + case ROS3D.INTERACTIVE_MARKER_ROTATE_AXIS: + this + .addEventListener('mousemove', this.parent.rotateAxis.bind(this.parent, this, controlOri)); + break; + case ROS3D.INTERACTIVE_MARKER_MOVE_PLANE: + this + .addEventListener('mousemove', this.parent.movePlane.bind(this.parent, this, controlAxis)); + break; + case ROS3D.INTERACTIVE_MARKER_BUTTON: + this.addEventListener('click', this.parent.buttonClick.bind(this.parent, this)); + break; + default: + break; + } + + /** + * Install default listeners for highlighting / dragging. + * + * @param event - the event to stop + */ + function stopPropagation(event) { + event.stopPropagation(); + } + + // check the mode + if (message.interaction_mode !== ROS3D.INTERACTIVE_MARKER_NONE) { + this.addEventListener('mousedown', this.parent.startDrag.bind(this.parent, this)); + this.addEventListener('mouseup', this.parent.stopDrag.bind(this.parent, this)); + this.addEventListener('contextmenu', this.parent.showMenu.bind(this.parent, this)); + this.addEventListener('mouseover', stopPropagation); + this.addEventListener('mouseout', stopPropagation); + this.addEventListener('click', stopPropagation); + + // touch support + this.addEventListener('touchstart', function(event3d) { + console.log(event3d.domEvent); + if (event3d.domEvent.touches.length === 1) { + event3d.type = 'mousedown'; + event3d.domEvent.button = 0; + that.dispatchEvent(event3d); + } + }); + this.addEventListener('touchmove', function(event3d) { + if (event3d.domEvent.touches.length === 1) { + console.log(event3d.domEvent); + event3d.type = 'mousemove'; + event3d.domEvent.button = 0; + that.dispatchEvent(event3d); + } + }); + this.addEventListener('touchend', function(event3d) { + if (event3d.domEvent.touches.length === 0) { + event3d.domEvent.button = 0; + event3d.type = 'mouseup'; + that.dispatchEvent(event3d); + event3d.type = 'click'; + that.dispatchEvent(event3d); + } + }); + } + + // rotation behavior + var rotInv = new THREE.Quaternion(); + var posInv = this.parent.position.clone().multiplyScalar(-1); + switch (message.orientation_mode) { + case ROS3D.INTERACTIVE_MARKER_INHERIT: + rotInv = this.parent.quaternion.clone().inverse(); + this.updateMatrixWorld = function(force) { + ROS3D.InteractiveMarkerControl.prototype.updateMatrixWorld.call(that, force); + that.currentControlOri.copy(that.quaternion); + that.currentControlOri.normalize(); + }; + break; + case ROS3D.INTERACTIVE_MARKER_FIXED: + this.updateMatrixWorld = function(force) { + that.useQuaternion = true; + that.quaternion = that.parent.quaternion.clone().inverse(); + that.updateMatrix(); + that.matrixWorldNeedsUpdate = true; + ROS3D.InteractiveMarkerControl.prototype.updateMatrixWorld.call(that, force); + that.currentControlOri.copy(that.quaternion); + }; + break; + case ROS3D.INTERACTIVE_MARKER_VIEW_FACING: + var independentMarkerOrientation = message.independentMarkerOrientation; + this.updateMatrixWorld = function(force) { + that.camera.updateMatrixWorld(); + var cameraRot = new THREE.Matrix4().extractRotation(that.camera.matrixWorld); + + var ros2Gl = new THREE.Matrix4(); + var r90 = Math.PI * 0.5; + var rv = new THREE.Vector3(-r90, 0, r90); + ros2Gl.setRotationFromEuler(rv); + + var worldToLocal = new THREE.Matrix4(); + worldToLocal.getInverse(that.parent.matrixWorld); + + cameraRot.multiplyMatrices(cameraRot, ros2Gl); + cameraRot.multiplyMatrices(worldToLocal, cameraRot); + + that.currentControlOri.setFromRotationMatrix(cameraRot); + + // check the orientation + if (!independentMarkerOrientation) { + that.useQuaternion = true; + that.quaternion.copy(that.currentControlOri); + that.updateMatrix(); + that.matrixWorldNeedsUpdate = true; + } + ROS3D.InteractiveMarkerControl.prototype.updateMatrixWorld.call(that, force); + }; + break; + default: + console.error('Unkown orientation mode: ' + message.orientation_mode); + break; + } + + // create visuals (markers) + message.markers.forEach(function(markerMsg) { + var markerHelper = new ROS3D.Marker({ + message : markerMsg, + path : that.path + }); + + if (markerMsg.header.frame_id !== '') { + // if the marker lives in its own coordinate frame, convert position into IM's local frame + markerHelper.position.add(posInv); + markerHelper.position.applyQuaternion(rotInv); + markerHelper.quaternion.multiplyQuaternions(rotInv, markerHelper.quaternion); + markerHelper.updateMatrixWorld(); + } + + // add the marker + that.add(markerHelper); + }); +}; +ROS3D.InteractiveMarkerControl.prototype.__proto__ = THREE.Object3D.prototype; diff --git a/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerHandle.js b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerHandle.js new file mode 100755 index 0000000..2022792 --- /dev/null +++ b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerHandle.js @@ -0,0 +1,176 @@ +/** + * @author David Gossow - dgossow@willowgarage.com + */ + +/** + * Handle with signals for a single interactive marker. + * + * Emits the following events: + * * 'pose' - emitted when a new pose comes from the server + * + * @constructor + * @param options - object with following keys: + * * message - the interactive marker message + * * feedbackTopic - the ROSLIB.Topic associated with the feedback + * * tfClient - a handle to the TF client to use + */ +ROS3D.InteractiveMarkerHandle = function(options) { + options = options || {}; + this.message = options.message; + this.feedbackTopic = options.feedbackTopic; + this.tfClient = options.tfClient; + this.name = this.message.name; + this.header = this.message.header; + this.controls = this.message.controls; + this.menuEntries = this.message.menu_entries; + this.dragging = false; + this.timeoutHandle = null; + this.tfTransform = new ROSLIB.Transform(); + this.pose = new ROSLIB.Pose(); + + // start by setting the pose + this.setPoseFromServer(this.message.pose); +}; +ROS3D.InteractiveMarkerHandle.prototype.__proto__ = EventEmitter2.prototype; + +/** + * Subscribe to the TF associated with this interactive marker. + */ +ROS3D.InteractiveMarkerHandle.prototype.subscribeTf = function() { + // subscribe to tf updates if frame-fixed + if (this.message.header.stamp.secs === 0.0 && this.message.header.stamp.nsecs === 0.0) { + this.tfClient.subscribe(this.message.header.frame_id, this.tfUpdate.bind(this)); + } +}; + +/** + * Emit the new pose that has come from the server. + */ +ROS3D.InteractiveMarkerHandle.prototype.emitServerPoseUpdate = function() { + var poseTransformed = new ROSLIB.Pose(this.pose); + poseTransformed.applyTransform(this.tfTransform); + this.emit('pose', poseTransformed); +}; + +/** + * Update the pose based on the pose given by the server. + * + * @param poseMsg - the pose given by the server + */ +ROS3D.InteractiveMarkerHandle.prototype.setPoseFromServer = function(poseMsg) { + this.pose = new ROSLIB.Pose(poseMsg); + this.emitServerPoseUpdate(); +}; + +/** + * Update the pose based on the TF given by the server. + * + * @param transformMsg - the TF given by the server + */ +ROS3D.InteractiveMarkerHandle.prototype.tfUpdate = function(transformMsg) { + this.tfTransform = new ROSLIB.Transform(transformMsg); + this.emitServerPoseUpdate(); +}; + +/** + * Set the pose from the client based on the given event. + * + * @param event - the event to base the change off of + */ +ROS3D.InteractiveMarkerHandle.prototype.setPoseFromClient = function(event) { + // apply the transform + this.pose = new ROSLIB.Pose(event); + var inv = this.tfTransform.clone(); + inv.rotation.invert(); + inv.translation.multiplyQuaternion(inv.rotation); + inv.translation.x *= -1; + inv.translation.y *= -1; + inv.translation.z *= -1; + this.pose.applyTransform(inv); + + // send feedback to the server + this.sendFeedback(ROS3D.INTERACTIVE_MARKER_POSE_UPDATE, undefined, 0, event.controlName); + + // keep sending pose feedback until the mouse goes up + if (this.dragging) { + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + } + this.timeoutHandle = setTimeout(this.setPoseFromClient.bind(this, event), 250); + } +}; + +/** + * Send the button click feedback to the server. + * + * @param event - the event associated with the button click + */ +ROS3D.InteractiveMarkerHandle.prototype.onButtonClick = function(event) { + this.sendFeedback(ROS3D.INTERACTIVE_MARKER_BUTTON_CLICK, event.clickPosition, 0, + event.controlName); +}; + +/** + * Send the mousedown feedback to the server. + * + * @param event - the event associated with the mousedown + */ +ROS3D.InteractiveMarkerHandle.prototype.onMouseDown = function(event) { + this.sendFeedback(ROS3D.INTERACTIVE_MARKER_MOUSE_DOWN, event.clickPosition, 0, event.controlName); + this.dragging = true; +}; + +/** + * Send the mouseup feedback to the server. + * + * @param event - the event associated with the mouseup + */ +ROS3D.InteractiveMarkerHandle.prototype.onMouseUp = function(event) { + this.sendFeedback(ROS3D.INTERACTIVE_MARKER_MOUSE_UP, event.clickPosition, 0, event.controlName); + this.dragging = false; + if (this.timeoutHandle) { + clearTimeout(this.timeoutHandle); + } +}; + +/** + * Send the menu select feedback to the server. + * + * @param event - the event associated with the menu select + */ +ROS3D.InteractiveMarkerHandle.prototype.onMenuSelect = function(event) { + this.sendFeedback(ROS3D.INTERACTIVE_MARKER_MENU_SELECT, undefined, event.id, event.controlName); +}; + +/** + * Send feedback to the interactive marker server. + * + * @param eventType - the type of event that happened + * @param clickPosition (optional) - the position in ROS space the click happened + * @param menuEntryID (optional) - the menu entry ID that is associated + * @param controlName - the name of the control + */ +ROS3D.InteractiveMarkerHandle.prototype.sendFeedback = function(eventType, clickPosition, + menuEntryID, controlName) { + + // check for the click position + var mousePointValid = clickPosition !== undefined; + clickPosition = clickPosition || { + x : 0, + y : 0, + z : 0 + }; + + var feedback = { + header : this.header, + client_id : this.clientID, + marker_name : this.name, + control_name : controlName, + event_type : eventType, + pose : this.pose, + mouse_point : clickPosition, + mouse_point_valid : mousePointValid, + menu_entry_id : menuEntryID + }; + this.feedbackTopic.publish(feedback); +}; diff --git a/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerMenu.js b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerMenu.js new file mode 100755 index 0000000..7b808f1 --- /dev/null +++ b/vulcano_web/javascript_libraries/interactivemarkers/InteractiveMarkerMenu.js @@ -0,0 +1,166 @@ +/** + * @author David Gossow - dgossow@willowgarage.com + */ + +/** + * A menu for an interactive marker. This will be overlayed on the canvas. + * + * @constructor + * @param options - object with following keys: + * * menuEntries - the menu entries to add + * * className (optional) - a custom CSS class for the menu div + * * entryClassName (optional) - a custom CSS class for the menu entry + * * overlayClassName (optional) - a custom CSS class for the menu overlay + */ +ROS3D.InteractiveMarkerMenu = function(options) { + var that = this; + options = options || {}; + var menuEntries = options.menuEntries; + var className = options.className || 'default-interactive-marker-menu'; + var entryClassName = options.entryClassName || 'default-interactive-marker-menu-entry'; + var overlayClassName = options.overlayClassName || 'default-interactive-marker-overlay'; + + // holds the menu tree + var allMenus = []; + allMenus[0] = { + children : [] + }; + + THREE.EventDispatcher.call(this); + + // create the CSS for this marker if it has not been created + if (document.getElementById('default-interactive-marker-menu-css') === null) { + var style = document.createElement('style'); + style.id = 'default-interactive-marker-menu-css'; + style.type = 'text/css'; + style.innerHTML = '.default-interactive-marker-menu {' + 'background-color: #444444;' + + 'border: 1px solid #888888;' + 'border: 1px solid #888888;' + 'padding: 0px 0px 0px 0px;' + + 'color: #FFFFFF;' + 'font-family: sans-serif;' + 'font-size: 0.8em;' + 'z-index: 1002;' + + '}' + '.default-interactive-marker-menu ul {' + 'padding: 0px 0px 5px 0px;' + + 'margin: 0px;' + 'list-style-type: none;' + '}' + + '.default-interactive-marker-menu ul li div {' + '-webkit-touch-callout: none;' + + '-webkit-user-select: none;' + '-khtml-user-select: none;' + '-moz-user-select: none;' + + '-ms-user-select: none;' + 'user-select: none;' + 'cursor: default;' + + 'padding: 3px 10px 3px 10px;' + '}' + '.default-interactive-marker-menu-entry:hover {' + + ' background-color: #666666;' + ' cursor: pointer;' + '}' + + '.default-interactive-marker-menu ul ul {' + ' font-style: italic;' + + ' padding-left: 10px;' + '}' + '.default-interactive-marker-overlay {' + + ' position: absolute;' + ' top: 0%;' + ' left: 0%;' + ' width: 100%;' + + ' height: 100%;' + ' background-color: black;' + ' z-index: 1001;' + + ' -moz-opacity: 0.0;' + ' opacity: .0;' + ' filter: alpha(opacity = 0);' + '}'; + document.getElementsByTagName('head')[0].appendChild(style); + } + + // place the menu in a div + this.menuDomElem = document.createElement('div'); + this.menuDomElem.style.position = 'absolute'; + this.menuDomElem.className = className; + this.menuDomElem.addEventListener('contextmenu', function(event) { + event.preventDefault(); + }); + + // create the overlay DOM + this.overlayDomElem = document.createElement('div'); + this.overlayDomElem.className = overlayClassName; + + this.hideListener = this.hide.bind(this); + this.overlayDomElem.addEventListener('contextmenu', this.hideListener); + this.overlayDomElem.addEventListener('click', this.hideListener); + + // parse all entries and link children to parents + var i, entry, id; + for ( i = 0; i < menuEntries.length; i++) { + entry = menuEntries[i]; + id = entry.id; + allMenus[id] = { + title : entry.title, + id : id, + children : [] + }; + } + for ( i = 0; i < menuEntries.length; i++) { + entry = menuEntries[i]; + id = entry.id; + var menu = allMenus[id]; + var parent = allMenus[entry.parent_id]; + parent.children.push(menu); + } + + function emitMenuSelect(menuEntry, domEvent) { + this.dispatchEvent({ + type : 'menu-select', + domEvent : domEvent, + id : menuEntry.id, + controlName : this.controlName + }); + this.hide(domEvent); + } + + /** + * Create the HTML UL element for the menu and link it to the parent. + * + * @param parentDomElem - the parent DOM element + * @param parentMenu - the parent menu + */ + function makeUl(parentDomElem, parentMenu) { + + var ulElem = document.createElement('ul'); + parentDomElem.appendChild(ulElem); + + var children = parentMenu.children; + + for ( var i = 0; i < children.length; i++) { + var liElem = document.createElement('li'); + var divElem = document.createElement('div'); + divElem.appendChild(document.createTextNode(children[i].title)); + ulElem.appendChild(liElem); + liElem.appendChild(divElem); + + if (children[i].children.length > 0) { + makeUl(liElem, children[i]); + divElem.addEventListener('click', that.hide.bind(that)); + } else { + divElem.addEventListener('click', emitMenuSelect.bind(that, children[i])); + divElem.className = 'default-interactive-marker-menu-entry'; + } + } + + } + + // construct DOM element + makeUl(this.menuDomElem, allMenus[0]); +}; + +/** + * Shoe the menu DOM element. + * + * @param control - the control for the menu + * @param event - the event that caused this + */ +ROS3D.InteractiveMarkerMenu.prototype.show = function(control, event) { + if (event && event.preventDefault) { + event.preventDefault(); + } + + this.controlName = control.name; + + // position it on the click + this.menuDomElem.style.left = event.domEvent.clientX + 'px'; + this.menuDomElem.style.top = event.domEvent.clientY + 'px'; + document.body.appendChild(this.overlayDomElem); + document.body.appendChild(this.menuDomElem); +}; + +/** + * Hide the menu DOM element. + * + * @param event (optional) - the event that caused this + */ +ROS3D.InteractiveMarkerMenu.prototype.hide = function(event) { + if (event && event.preventDefault) { + event.preventDefault(); + } + + document.body.removeChild(this.overlayDomElem); + document.body.removeChild(this.menuDomElem); +}; diff --git a/vulcano_web/javascript_libraries/jquery-2.1.0.min.js b/vulcano_web/javascript_libraries/jquery-2.1.0.min.js new file mode 100755 index 0000000..cbe6abe --- /dev/null +++ b/vulcano_web/javascript_libraries/jquery-2.1.0.min.js @@ -0,0 +1,4 @@ +/*! jQuery v2.1.0 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ +!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m=a.document,n="2.1.0",o=function(a,b){return new o.fn.init(a,b)},p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};o.fn=o.prototype={jquery:n,constructor:o,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=o.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return o.each(this,a,b)},map:function(a){return this.pushStack(o.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},o.extend=o.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||o.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(o.isPlainObject(d)||(e=o.isArray(d)))?(e?(e=!1,f=c&&o.isArray(c)?c:[]):f=c&&o.isPlainObject(c)?c:{},g[b]=o.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},o.extend({expando:"jQuery"+(n+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===o.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return a-parseFloat(a)>=0},isPlainObject:function(a){if("object"!==o.type(a)||a.nodeType||o.isWindow(a))return!1;try{if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(b){return!1}return!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=o.trim(a),a&&(1===a.indexOf("use strict")?(b=m.createElement("script"),b.text=a,m.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":k.call(a)},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?o.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),o.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||o.guid++,f):void 0},now:Date.now,support:l}),o.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=o.type(a);return"function"===c||o.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s="sizzle"+-new Date,t=a.document,u=0,v=0,w=eb(),x=eb(),y=eb(),z=function(a,b){return a===b&&(j=!0),0},A="undefined",B=1<<31,C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=D.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M=L.replace("w","w#"),N="\\["+K+"*("+L+")"+K+"*(?:([*^$|!~]?=)"+K+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+M+")|)|)"+K+"*\\]",O=":("+L+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+N.replace(3,8)+")*)|.*)\\)|)",P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(O),U=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L.replace("w","w*")+")"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=/'|\\/g,ab=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),bb=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)};try{G.apply(D=H.call(t.childNodes),t.childNodes),D[t.childNodes.length].nodeType}catch(cb){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function db(a,b,d,e){var f,g,h,i,j,m,p,q,u,v;if((b?b.ownerDocument||b:t)!==l&&k(b),b=b||l,d=d||[],!a||"string"!=typeof a)return d;if(1!==(i=b.nodeType)&&9!==i)return[];if(n&&!e){if(f=Z.exec(a))if(h=f[1]){if(9===i){if(g=b.getElementById(h),!g||!g.parentNode)return d;if(g.id===h)return d.push(g),d}else if(b.ownerDocument&&(g=b.ownerDocument.getElementById(h))&&r(b,g)&&g.id===h)return d.push(g),d}else{if(f[2])return G.apply(d,b.getElementsByTagName(a)),d;if((h=f[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(h)),d}if(c.qsa&&(!o||!o.test(a))){if(q=p=s,u=b,v=9===i&&a,1===i&&"object"!==b.nodeName.toLowerCase()){m=ob(a),(p=b.getAttribute("id"))?q=p.replace(_,"\\$&"):b.setAttribute("id",q),q="[id='"+q+"'] ",j=m.length;while(j--)m[j]=q+pb(m[j]);u=$.test(a)&&mb(b.parentNode)||b,v=m.join(",")}if(v)try{return G.apply(d,u.querySelectorAll(v)),d}catch(w){}finally{p||b.removeAttribute("id")}}}return xb(a.replace(P,"$1"),b,d,e)}function eb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function fb(a){return a[s]=!0,a}function gb(a){var b=l.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function hb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function ib(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||B)-(~a.sourceIndex||B);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function jb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function kb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function lb(a){return fb(function(b){return b=+b,fb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function mb(a){return a&&typeof a.getElementsByTagName!==A&&a}c=db.support={},f=db.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},k=db.setDocument=function(a){var b,e=a?a.ownerDocument||a:t,g=e.defaultView;return e!==l&&9===e.nodeType&&e.documentElement?(l=e,m=e.documentElement,n=!f(e),g&&g!==g.top&&(g.addEventListener?g.addEventListener("unload",function(){k()},!1):g.attachEvent&&g.attachEvent("onunload",function(){k()})),c.attributes=gb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=gb(function(a){return a.appendChild(e.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(e.getElementsByClassName)&&gb(function(a){return a.innerHTML="
",a.firstChild.className="i",2===a.getElementsByClassName("i").length}),c.getById=gb(function(a){return m.appendChild(a).id=s,!e.getElementsByName||!e.getElementsByName(s).length}),c.getById?(d.find.ID=function(a,b){if(typeof b.getElementById!==A&&n){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ab,bb);return function(a){var c=typeof a.getAttributeNode!==A&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return typeof b.getElementsByTagName!==A?b.getElementsByTagName(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return typeof b.getElementsByClassName!==A&&n?b.getElementsByClassName(a):void 0},p=[],o=[],(c.qsa=Y.test(e.querySelectorAll))&&(gb(function(a){a.innerHTML="",a.querySelectorAll("[t^='']").length&&o.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||o.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll(":checked").length||o.push(":checked")}),gb(function(a){var b=e.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&o.push("name"+K+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||o.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),o.push(",.*:")})),(c.matchesSelector=Y.test(q=m.webkitMatchesSelector||m.mozMatchesSelector||m.oMatchesSelector||m.msMatchesSelector))&&gb(function(a){c.disconnectedMatch=q.call(a,"div"),q.call(a,"[s!='']:x"),p.push("!=",O)}),o=o.length&&new RegExp(o.join("|")),p=p.length&&new RegExp(p.join("|")),b=Y.test(m.compareDocumentPosition),r=b||Y.test(m.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},z=b?function(a,b){if(a===b)return j=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===e||a.ownerDocument===t&&r(t,a)?-1:b===e||b.ownerDocument===t&&r(t,b)?1:i?I.call(i,a)-I.call(i,b):0:4&d?-1:1)}:function(a,b){if(a===b)return j=!0,0;var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],k=[b];if(!f||!g)return a===e?-1:b===e?1:f?-1:g?1:i?I.call(i,a)-I.call(i,b):0;if(f===g)return ib(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)k.unshift(c);while(h[d]===k[d])d++;return d?ib(h[d],k[d]):h[d]===t?-1:k[d]===t?1:0},e):l},db.matches=function(a,b){return db(a,null,null,b)},db.matchesSelector=function(a,b){if((a.ownerDocument||a)!==l&&k(a),b=b.replace(S,"='$1']"),!(!c.matchesSelector||!n||p&&p.test(b)||o&&o.test(b)))try{var d=q.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return db(b,l,null,[a]).length>0},db.contains=function(a,b){return(a.ownerDocument||a)!==l&&k(a),r(a,b)},db.attr=function(a,b){(a.ownerDocument||a)!==l&&k(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!n):void 0;return void 0!==f?f:c.attributes||!n?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},db.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},db.uniqueSort=function(a){var b,d=[],e=0,f=0;if(j=!c.detectDuplicates,i=!c.sortStable&&a.slice(0),a.sort(z),j){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return i=null,a},e=db.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=db.selectors={cacheLength:50,createPseudo:fb,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ab,bb),a[3]=(a[4]||a[5]||"").replace(ab,bb),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||db.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&db.error(a[0]),a},PSEUDO:function(a){var b,c=!a[5]&&a[2];return V.CHILD.test(a[0])?null:(a[3]&&void 0!==a[4]?a[2]=a[4]:c&&T.test(c)&&(b=ob(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ab,bb).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=w[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&w(a,function(a){return b.test("string"==typeof a.className&&a.className||typeof a.getAttribute!==A&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=db.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),t=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&t){k=q[s]||(q[s]={}),j=k[a]||[],n=j[0]===u&&j[1],m=j[0]===u&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[u,n,m];break}}else if(t&&(j=(b[s]||(b[s]={}))[a])&&j[0]===u)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(t&&((l[s]||(l[s]={}))[a]=[u,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||db.error("unsupported pseudo: "+a);return e[s]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?fb(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I.call(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:fb(function(a){var b=[],c=[],d=g(a.replace(P,"$1"));return d[s]?fb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),!c.pop()}}),has:fb(function(a){return function(b){return db(a,b).length>0}}),contains:fb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:fb(function(a){return U.test(a||"")||db.error("unsupported lang: "+a),a=a.replace(ab,bb).toLowerCase(),function(b){var c;do if(c=n?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===m},focus:function(a){return a===l.activeElement&&(!l.hasFocus||l.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:lb(function(){return[0]}),last:lb(function(a,b){return[b-1]}),eq:lb(function(a,b,c){return[0>c?c+b:c]}),even:lb(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:lb(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:lb(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:lb(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function qb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=v++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[u,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[s]||(b[s]={}),(h=i[d])&&h[0]===u&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function rb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function sb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function tb(a,b,c,d,e,f){return d&&!d[s]&&(d=tb(d)),e&&!e[s]&&(e=tb(e,f)),fb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||wb(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:sb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=sb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I.call(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=sb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ub(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],i=g||d.relative[" "],j=g?1:0,k=qb(function(a){return a===b},i,!0),l=qb(function(a){return I.call(b,a)>-1},i,!0),m=[function(a,c,d){return!g&&(d||c!==h)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];f>j;j++)if(c=d.relative[a[j].type])m=[qb(rb(m),c)];else{if(c=d.filter[a[j].type].apply(null,a[j].matches),c[s]){for(e=++j;f>e;e++)if(d.relative[a[e].type])break;return tb(j>1&&rb(m),j>1&&pb(a.slice(0,j-1).concat({value:" "===a[j-2].type?"*":""})).replace(P,"$1"),c,e>j&&ub(a.slice(j,e)),f>e&&ub(a=a.slice(e)),f>e&&pb(a))}m.push(c)}return rb(m)}function vb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,i,j,k){var m,n,o,p=0,q="0",r=f&&[],s=[],t=h,v=f||e&&d.find.TAG("*",k),w=u+=null==t?1:Math.random()||.1,x=v.length;for(k&&(h=g!==l&&g);q!==x&&null!=(m=v[q]);q++){if(e&&m){n=0;while(o=a[n++])if(o(m,g,i)){j.push(m);break}k&&(u=w)}c&&((m=!o&&m)&&p--,f&&r.push(m))}if(p+=q,c&&q!==p){n=0;while(o=b[n++])o(r,s,g,i);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=E.call(j));s=sb(s)}G.apply(j,s),k&&!f&&s.length>0&&p+b.length>1&&db.uniqueSort(j)}return k&&(u=w,h=t),r};return c?fb(f):f}g=db.compile=function(a,b){var c,d=[],e=[],f=y[a+" "];if(!f){b||(b=ob(a)),c=b.length;while(c--)f=ub(b[c]),f[s]?d.push(f):e.push(f);f=y(a,vb(e,d))}return f};function wb(a,b,c){for(var d=0,e=b.length;e>d;d++)db(a,b[d],c);return c}function xb(a,b,e,f){var h,i,j,k,l,m=ob(a);if(!f&&1===m.length){if(i=m[0]=m[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&c.getById&&9===b.nodeType&&n&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(ab,bb),b)||[])[0],!b)return e;a=a.slice(i.shift().value.length)}h=V.needsContext.test(a)?0:i.length;while(h--){if(j=i[h],d.relative[k=j.type])break;if((l=d.find[k])&&(f=l(j.matches[0].replace(ab,bb),$.test(i[0].type)&&mb(b.parentNode)||b))){if(i.splice(h,1),a=f.length&&pb(i),!a)return G.apply(e,f),e;break}}}return g(a,m)(f,b,!n,e,$.test(a)&&mb(b.parentNode)||b),e}return c.sortStable=s.split("").sort(z).join("")===s,c.detectDuplicates=!!j,k(),c.sortDetached=gb(function(a){return 1&a.compareDocumentPosition(l.createElement("div"))}),gb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||hb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&gb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||hb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),gb(function(a){return null==a.getAttribute("disabled")})||hb(J,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),db}(a);o.find=t,o.expr=t.selectors,o.expr[":"]=o.expr.pseudos,o.unique=t.uniqueSort,o.text=t.getText,o.isXMLDoc=t.isXML,o.contains=t.contains;var u=o.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(o.isFunction(b))return o.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return o.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return o.filter(b,a,c);b=o.filter(b,a)}return o.grep(a,function(a){return g.call(b,a)>=0!==c})}o.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?o.find.matchesSelector(d,a)?[d]:[]:o.find.matches(a,o.grep(b,function(a){return 1===a.nodeType}))},o.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(o(a).filter(function(){for(b=0;c>b;b++)if(o.contains(e[b],this))return!0}));for(b=0;c>b;b++)o.find(a,e[b],d);return d=this.pushStack(c>1?o.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?o(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=o.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof o?b[0]:b,o.merge(this,o.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:m,!0)),v.test(c[1])&&o.isPlainObject(b))for(c in b)o.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=m.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=m,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):o.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(o):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),o.makeArray(a,this))};A.prototype=o.fn,y=o(m);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};o.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&o(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),o.fn.extend({has:function(a){var b=o(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(o.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?o(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&o.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?o.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(o(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(o.unique(o.merge(this.get(),o(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}o.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return o.dir(a,"parentNode")},parentsUntil:function(a,b,c){return o.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return o.dir(a,"nextSibling")},prevAll:function(a){return o.dir(a,"previousSibling")},nextUntil:function(a,b,c){return o.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return o.dir(a,"previousSibling",c)},siblings:function(a){return o.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return o.sibling(a.firstChild)},contents:function(a){return a.contentDocument||o.merge([],a.childNodes)}},function(a,b){o.fn[a]=function(c,d){var e=o.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=o.filter(d,e)),this.length>1&&(C[a]||o.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return o.each(a.match(E)||[],function(a,c){b[c]=!0}),b}o.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):o.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){o.each(b,function(b,c){var d=o.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&o.each(arguments,function(a,b){var c;while((c=o.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?o.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},o.extend({Deferred:function(a){var b=[["resolve","done",o.Callbacks("once memory"),"resolved"],["reject","fail",o.Callbacks("once memory"),"rejected"],["notify","progress",o.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return o.Deferred(function(c){o.each(b,function(b,f){var g=o.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&o.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?o.extend(a,d):d}},e={};return d.pipe=d.then,o.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&o.isFunction(a.promise)?e:0,g=1===f?a:o.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&o.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;o.fn.ready=function(a){return o.ready.promise().done(a),this},o.extend({isReady:!1,readyWait:1,holdReady:function(a){a?o.readyWait++:o.ready(!0)},ready:function(a){(a===!0?--o.readyWait:o.isReady)||(o.isReady=!0,a!==!0&&--o.readyWait>0||(H.resolveWith(m,[o]),o.fn.trigger&&o(m).trigger("ready").off("ready")))}});function I(){m.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),o.ready()}o.ready.promise=function(b){return H||(H=o.Deferred(),"complete"===m.readyState?setTimeout(o.ready):(m.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},o.ready.promise();var J=o.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===o.type(c)){e=!0;for(h in c)o.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,o.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(o(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};o.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=o.expando+Math.random()}K.uid=1,K.accepts=o.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,o.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(o.isEmptyObject(f))o.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,o.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{o.isArray(b)?d=b.concat(b.map(o.camelCase)):(e=o.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!o.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?o.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}o.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),o.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length; +while(c--)d=g[c].name,0===d.indexOf("data-")&&(d=o.camelCase(d.slice(5)),P(f,d,e[d]));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=o.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),o.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||o.isArray(c)?d=L.access(a,b,o.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=o.queue(a,b),d=c.length,e=c.shift(),f=o._queueHooks(a,b),g=function(){o.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:o.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),o.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length",l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";l.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return m.activeElement}catch(a){}}o.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=o.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof o!==U&&o.event.triggered!==b.type?o.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n&&(l=o.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=o.event.special[n]||{},k=o.extend({type:n,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&o.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),o.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],n=q=h[1],p=(h[2]||"").split(".").sort(),n){l=o.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||o.removeEvent(a,n,r.handle),delete i[n])}else for(n in i)o.event.remove(a,n+b[j],c,d,!0);o.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,p=[d||m],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||m,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+o.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[o.expando]?b:new o.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:o.makeArray(c,[b]),n=o.event.special[q]||{},e||!n.trigger||n.trigger.apply(d,c)!==!1)){if(!e&&!n.noBubble&&!o.isWindow(d)){for(i=n.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||m)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:n.bindType||q,l=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),l&&l.apply(g,c),l=k&&g[k],l&&l.apply&&o.acceptData(g)&&(b.result=l.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||n._default&&n._default.apply(p.pop(),c)!==!1||!o.acceptData(d)||k&&o.isFunction(d[q])&&!o.isWindow(d)&&(h=d[k],h&&(d[k]=null),o.event.triggered=q,d[q](),o.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=o.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=o.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=o.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((o.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?o(e,this).index(i)>=0:o.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return o.nodeName(a,"table")&&o.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)o.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=o.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&o.nodeName(a,b)?o.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}o.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=o.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||o.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,n=a.length;n>m;m++)if(e=a[m],e||0===e)if("object"===o.type(e))o.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;o.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===o.inArray(e,d))&&(i=o.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f,g,h=o.event.special,i=0;void 0!==(c=a[i]);i++){if(o.acceptData(c)&&(f=c[L.expando],f&&(b=L.cache[f]))){if(d=Object.keys(b.events||{}),d.length)for(g=0;void 0!==(e=d[g]);g++)h[e]?o.event.remove(c,e):o.removeEvent(c,e,b.handle);L.cache[f]&&delete L.cache[f]}delete M.cache[c[M.expando]]}}}),o.fn.extend({text:function(a){return J(this,function(a){return void 0===a?o.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?o.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||o.cleanData(ob(c)),c.parentNode&&(b&&o.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(o.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return o.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(o.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,o.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,k=this.length,m=this,n=k-1,p=a[0],q=o.isFunction(p);if(q||k>1&&"string"==typeof p&&!l.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(k&&(c=o.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=o.map(ob(c,"script"),kb),g=f.length;k>j;j++)h=c,j!==n&&(h=o.clone(h,!0,!0),g&&o.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,o.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&o.contains(i,h)&&(h.src?o._evalUrl&&o._evalUrl(h.src):o.globalEval(h.textContent.replace(hb,"")))}return this}}),o.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){o.fn[a]=function(a){for(var c,d=[],e=o(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),o(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d=o(c.createElement(b)).appendTo(c.body),e=a.getDefaultComputedStyle?a.getDefaultComputedStyle(d[0]).display:o.css(d[0],"display");return d.detach(),e}function tb(a){var b=m,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||o("