\n * License: Open source - MIT\n * Please visit http://opensource.org/licenses/MIT for more information\n!*/\n/*\n * Core: General Layout Style\n * -------------------------\n */\nhtml,\nbody {\n min-height: 100%;\n}\n.layout-boxed html,\n.layout-boxed body {\n height: 100%;\n}\nbody {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n font-family: 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;\n font-weight: 400;\n overflow-x: hidden;\n overflow-y: auto;\n}\n/* Layout */\n.wrapper {\n min-height: 100%;\n position: relative;\n overflow: hidden;\n}\n.wrapper:before,\n.wrapper:after {\n content: \" \";\n display: table;\n}\n.wrapper:after {\n clear: both;\n}\n.layout-boxed .wrapper {\n max-width: 1250px;\n margin: 0 auto;\n min-height: 100%;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);\n position: relative;\n}\n.layout-boxed {\n background: url('../img/boxed-bg.jpg') repeat fixed;\n}\n/*\n * Content Wrapper - contains the main content\n * ```.right-side has been deprecated as of v2.0.0 in favor of .content-wrapper ```\n */\n.content-wrapper,\n.right-side,\n.main-footer {\n -webkit-transition: -webkit-transform 0.3s ease-in-out, margin 0.3s ease-in-out;\n -moz-transition: -moz-transform 0.3s ease-in-out, margin 0.3s ease-in-out;\n -o-transition: -o-transform 0.3s ease-in-out, margin 0.3s ease-in-out;\n transition: transform 0.3s ease-in-out, margin 0.3s ease-in-out;\n margin-left: 230px;\n z-index: 820;\n}\n.layout-top-nav .content-wrapper,\n.layout-top-nav .right-side,\n.layout-top-nav .main-footer {\n margin-left: 0;\n}\n@media (max-width: 767px) {\n .content-wrapper,\n .right-side,\n .main-footer {\n margin-left: 0;\n }\n}\n@media (min-width: 768px) {\n .sidebar-collapse .content-wrapper,\n .sidebar-collapse .right-side,\n .sidebar-collapse .main-footer {\n margin-left: 0;\n }\n}\n@media (max-width: 767px) {\n .sidebar-open .content-wrapper,\n .sidebar-open .right-side,\n .sidebar-open .main-footer {\n -webkit-transform: translate(230px, 0);\n -ms-transform: translate(230px, 0);\n -o-transform: translate(230px, 0);\n transform: translate(230px, 0);\n }\n}\n.content-wrapper,\n.right-side {\n min-height: 100%;\n z-index: 800;\n}\n.main-footer {\n background: #fff;\n padding: 15px;\n color: #444;\n border-top: 1px solid #d2d6de;\n}\n/* Fixed layout */\n.fixed .main-header,\n.fixed .main-sidebar,\n.fixed .left-side {\n position: fixed;\n}\n.fixed .main-header {\n top: 0;\n right: 0;\n left: 0;\n}\n.fixed .content-wrapper,\n.fixed .right-side {\n padding-top: 50px;\n}\n@media (max-width: 767px) {\n .fixed .content-wrapper,\n .fixed .right-side {\n padding-top: 100px;\n }\n}\n.fixed.layout-boxed .wrapper {\n max-width: 100%;\n}\nbody.hold-transition .content-wrapper,\nbody.hold-transition .right-side,\nbody.hold-transition .main-footer,\nbody.hold-transition .main-sidebar,\nbody.hold-transition .left-side,\nbody.hold-transition .main-header > .navbar,\nbody.hold-transition .main-header .logo {\n /* Fix for IE */\n -webkit-transition: none;\n -o-transition: none;\n transition: none;\n}\n/* Content */\n.content {\n min-height: 250px;\n padding: 15px;\n margin-right: auto;\n margin-left: auto;\n padding-left: 15px;\n padding-right: 15px;\n}\n/* H1 - H6 font */\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\n.h1,\n.h2,\n.h3,\n.h4,\n.h5,\n.h6 {\n font-family: 'Source Sans Pro', sans-serif;\n}\n/* General Links */\na {\n color: #3c8dbc;\n}\na:hover,\na:active,\na:focus {\n outline: none;\n text-decoration: none;\n color: #72afd2;\n}\n/* Page Header */\n.page-header {\n margin: 10px 0 20px 0;\n font-size: 22px;\n}\n.page-header > small {\n color: #666;\n display: block;\n margin-top: 5px;\n}\n/*\n * Component: Main Header\n * ----------------------\n */\n.main-header {\n position: relative;\n max-height: 100px;\n z-index: 1030;\n}\n.main-header > .navbar {\n -webkit-transition: margin-left 0.3s ease-in-out;\n -o-transition: margin-left 0.3s ease-in-out;\n transition: margin-left 0.3s ease-in-out;\n margin-bottom: 0;\n margin-left: 230px;\n border: none;\n min-height: 50px;\n border-radius: 0;\n}\n.layout-top-nav .main-header > .navbar {\n margin-left: 0;\n}\n.main-header #navbar-search-input.form-control {\n background: rgba(255, 255, 255, 0.2);\n border-color: transparent;\n}\n.main-header #navbar-search-input.form-control:focus,\n.main-header #navbar-search-input.form-control:active {\n border-color: rgba(0, 0, 0, 0.1);\n background: rgba(255, 255, 255, 0.9);\n}\n.main-header #navbar-search-input.form-control::-moz-placeholder {\n color: #ccc;\n opacity: 1;\n}\n.main-header #navbar-search-input.form-control:-ms-input-placeholder {\n color: #ccc;\n}\n.main-header #navbar-search-input.form-control::-webkit-input-placeholder {\n color: #ccc;\n}\n.main-header .navbar-custom-menu,\n.main-header .navbar-right {\n float: right;\n}\n@media (max-width: 991px) {\n .main-header .navbar-custom-menu a,\n .main-header .navbar-right a {\n color: inherit;\n background: transparent;\n }\n}\n@media (max-width: 767px) {\n .main-header .navbar-right {\n float: none;\n }\n .navbar-collapse .main-header .navbar-right {\n margin: 7.5px -15px;\n }\n .main-header .navbar-right > li {\n color: inherit;\n border: 0;\n }\n}\n.main-header .sidebar-toggle {\n float: left;\n background-color: transparent;\n background-image: none;\n padding: 15px 15px;\n font-family: fontAwesome;\n}\n.main-header .sidebar-toggle:before {\n content: \"\\f0c9\";\n}\n.main-header .sidebar-toggle:hover {\n color: #fff;\n}\n.main-header .sidebar-toggle:focus,\n.main-header .sidebar-toggle:active {\n background: transparent;\n}\n.main-header .sidebar-toggle .icon-bar {\n display: none;\n}\n.main-header .navbar .nav > li.user > a > .fa,\n.main-header .navbar .nav > li.user > a > .glyphicon,\n.main-header .navbar .nav > li.user > a > .ion {\n margin-right: 5px;\n}\n.main-header .navbar .nav > li > a > .label {\n position: absolute;\n top: 9px;\n right: 7px;\n text-align: center;\n font-size: 9px;\n padding: 2px 3px;\n line-height: .9;\n}\n.main-header .logo {\n -webkit-transition: width 0.3s ease-in-out;\n -o-transition: width 0.3s ease-in-out;\n transition: width 0.3s ease-in-out;\n display: block;\n float: left;\n height: 50px;\n font-size: 20px;\n line-height: 50px;\n text-align: center;\n width: 230px;\n font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n padding: 0 15px;\n font-weight: 300;\n overflow: hidden;\n}\n.main-header .logo .logo-lg {\n display: block;\n}\n.main-header .logo .logo-mini {\n display: none;\n}\n.main-header .navbar-brand {\n color: #fff;\n}\n.content-header {\n position: relative;\n padding: 15px 15px 0 15px;\n}\n.content-header > h1 {\n margin: 0;\n font-size: 24px;\n}\n.content-header > h1 > small {\n font-size: 15px;\n display: inline-block;\n padding-left: 4px;\n font-weight: 300;\n}\n.content-header > .breadcrumb {\n float: right;\n background: transparent;\n margin-top: 0;\n margin-bottom: 0;\n font-size: 12px;\n padding: 7px 5px;\n position: absolute;\n top: 15px;\n right: 10px;\n border-radius: 2px;\n}\n.content-header > .breadcrumb > li > a {\n color: #444;\n text-decoration: none;\n display: inline-block;\n}\n.content-header > .breadcrumb > li > a > .fa,\n.content-header > .breadcrumb > li > a > .glyphicon,\n.content-header > .breadcrumb > li > a > .ion {\n margin-right: 5px;\n}\n.content-header > .breadcrumb > li + li:before {\n content: '>\\00a0';\n}\n@media (max-width: 991px) {\n .content-header > .breadcrumb {\n position: relative;\n margin-top: 5px;\n top: 0;\n right: 0;\n float: none;\n background: #d2d6de;\n padding-left: 10px;\n }\n .content-header > .breadcrumb li:before {\n color: #97a0b3;\n }\n}\n.navbar-toggle {\n color: #fff;\n border: 0;\n margin: 0;\n padding: 15px 15px;\n}\n@media (max-width: 991px) {\n .navbar-custom-menu .navbar-nav > li {\n float: left;\n }\n .navbar-custom-menu .navbar-nav {\n margin: 0;\n float: left;\n }\n .navbar-custom-menu .navbar-nav > li > a {\n padding-top: 15px;\n padding-bottom: 15px;\n line-height: 20px;\n }\n}\n@media (max-width: 767px) {\n .main-header {\n position: relative;\n }\n .main-header .logo,\n .main-header .navbar {\n width: 100%;\n float: none;\n }\n .main-header .navbar {\n margin: 0;\n }\n .main-header .navbar-custom-menu {\n float: right;\n }\n}\n@media (max-width: 991px) {\n .navbar-collapse.pull-left {\n float: none !important;\n }\n .navbar-collapse.pull-left + .navbar-custom-menu {\n display: block;\n position: absolute;\n top: 0;\n right: 40px;\n }\n}\n/*\n * Component: Sidebar\n * ------------------\n */\n.main-sidebar,\n.left-side {\n position: absolute;\n top: 0;\n left: 0;\n padding-top: 50px;\n min-height: 100%;\n width: 230px;\n z-index: 810;\n -webkit-transition: -webkit-transform 0.3s ease-in-out, width 0.3s ease-in-out;\n -moz-transition: -moz-transform 0.3s ease-in-out, width 0.3s ease-in-out;\n -o-transition: -o-transform 0.3s ease-in-out, width 0.3s ease-in-out;\n transition: transform 0.3s ease-in-out, width 0.3s ease-in-out;\n}\n@media (max-width: 767px) {\n .main-sidebar,\n .left-side {\n padding-top: 100px;\n }\n}\n@media (max-width: 767px) {\n .main-sidebar,\n .left-side {\n -webkit-transform: translate(-230px, 0);\n -ms-transform: translate(-230px, 0);\n -o-transform: translate(-230px, 0);\n transform: translate(-230px, 0);\n }\n}\n@media (min-width: 768px) {\n .sidebar-collapse .main-sidebar,\n .sidebar-collapse .left-side {\n -webkit-transform: translate(-230px, 0);\n -ms-transform: translate(-230px, 0);\n -o-transform: translate(-230px, 0);\n transform: translate(-230px, 0);\n }\n}\n@media (max-width: 767px) {\n .sidebar-open .main-sidebar,\n .sidebar-open .left-side {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n }\n}\n.sidebar {\n padding-bottom: 10px;\n}\n.sidebar-form input:focus {\n border-color: transparent;\n}\n.user-panel {\n position: relative;\n width: 100%;\n padding: 10px;\n overflow: hidden;\n}\n.user-panel:before,\n.user-panel:after {\n content: \" \";\n display: table;\n}\n.user-panel:after {\n clear: both;\n}\n.user-panel > .image > img {\n width: 100%;\n max-width: 45px;\n height: auto;\n}\n.user-panel > .info {\n padding: 5px 5px 5px 15px;\n line-height: 1;\n position: absolute;\n left: 55px;\n}\n.user-panel > .info > p {\n font-weight: 600;\n margin-bottom: 9px;\n}\n.user-panel > .info > a {\n text-decoration: none;\n padding-right: 5px;\n margin-top: 3px;\n font-size: 11px;\n}\n.user-panel > .info > a > .fa,\n.user-panel > .info > a > .ion,\n.user-panel > .info > a > .glyphicon {\n margin-right: 3px;\n}\n.sidebar-menu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.sidebar-menu > li {\n position: relative;\n margin: 0;\n padding: 0;\n}\n.sidebar-menu > li > a {\n padding: 12px 5px 12px 15px;\n display: block;\n}\n.sidebar-menu > li > a > .fa,\n.sidebar-menu > li > a > .glyphicon,\n.sidebar-menu > li > a > .ion {\n width: 20px;\n}\n.sidebar-menu > li .label,\n.sidebar-menu > li .badge {\n margin-top: 3px;\n margin-right: 5px;\n}\n.sidebar-menu li.header {\n padding: 10px 25px 10px 15px;\n font-size: 12px;\n}\n.sidebar-menu li > a > .fa-angle-left {\n width: auto;\n height: auto;\n padding: 0;\n margin-right: 10px;\n margin-top: 3px;\n}\n.sidebar-menu li.active > a > .fa-angle-left {\n -webkit-transform: rotate(-90deg);\n -ms-transform: rotate(-90deg);\n -o-transform: rotate(-90deg);\n transform: rotate(-90deg);\n}\n.sidebar-menu li.active > .treeview-menu {\n display: block;\n}\n.sidebar-menu .treeview-menu {\n display: none;\n list-style: none;\n padding: 0;\n margin: 0;\n padding-left: 5px;\n}\n.sidebar-menu .treeview-menu .treeview-menu {\n padding-left: 20px;\n}\n.sidebar-menu .treeview-menu > li {\n margin: 0;\n}\n.sidebar-menu .treeview-menu > li > a {\n padding: 5px 5px 5px 15px;\n display: block;\n font-size: 14px;\n}\n.sidebar-menu .treeview-menu > li > a > .fa,\n.sidebar-menu .treeview-menu > li > a > .glyphicon,\n.sidebar-menu .treeview-menu > li > a > .ion {\n width: 20px;\n}\n.sidebar-menu .treeview-menu > li > a > .fa-angle-left,\n.sidebar-menu .treeview-menu > li > a > .fa-angle-down {\n width: auto;\n}\n/*\n * Component: Sidebar Mini\n */\n@media (min-width: 768px) {\n .sidebar-mini.sidebar-collapse .content-wrapper,\n .sidebar-mini.sidebar-collapse .right-side,\n .sidebar-mini.sidebar-collapse .main-footer {\n margin-left: 50px !important;\n z-index: 840;\n }\n .sidebar-mini.sidebar-collapse .main-sidebar {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n width: 50px !important;\n z-index: 850;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li {\n position: relative;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li > a {\n margin-right: 0;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span {\n border-top-right-radius: 4px;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li:not(.treeview) > a > span {\n border-bottom-right-radius: 4px;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu {\n padding-top: 5px;\n padding-bottom: 5px;\n border-bottom-right-radius: 4px;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span:not(.pull-right),\n .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {\n display: block !important;\n position: absolute;\n width: 180px;\n left: 50px;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > a > span {\n top: 0;\n margin-left: -3px;\n padding: 12px 5px 12px 20px;\n background-color: inherit;\n }\n .sidebar-mini.sidebar-collapse .sidebar-menu > li:hover > .treeview-menu {\n top: 44px;\n margin-left: 0;\n }\n .sidebar-mini.sidebar-collapse .main-sidebar .user-panel > .info,\n .sidebar-mini.sidebar-collapse .sidebar-form,\n .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > span,\n .sidebar-mini.sidebar-collapse .sidebar-menu > li > .treeview-menu,\n .sidebar-mini.sidebar-collapse .sidebar-menu > li > a > .pull-right,\n .sidebar-mini.sidebar-collapse .sidebar-menu li.header {\n display: none !important;\n -webkit-transform: translateZ(0);\n }\n .sidebar-mini.sidebar-collapse .main-header .logo {\n width: 50px;\n }\n .sidebar-mini.sidebar-collapse .main-header .logo > .logo-mini {\n display: block;\n margin-left: -15px;\n margin-right: -15px;\n font-size: 18px;\n }\n .sidebar-mini.sidebar-collapse .main-header .logo > .logo-lg {\n display: none;\n }\n .sidebar-mini.sidebar-collapse .main-header .navbar {\n margin-left: 50px;\n }\n}\n.sidebar-menu,\n.main-sidebar .user-panel,\n.sidebar-menu > li.header {\n white-space: nowrap;\n overflow: hidden;\n}\n.sidebar-menu:hover {\n overflow: visible;\n}\n.sidebar-form,\n.sidebar-menu > li.header {\n overflow: hidden;\n text-overflow: clip;\n}\n.sidebar-menu li > a {\n position: relative;\n}\n.sidebar-menu li > a > .pull-right {\n position: absolute;\n right: 10px;\n top: 50%;\n margin-top: -7px;\n}\n/*\n * Component: Control sidebar. By default, this is the right sidebar.\n */\n.control-sidebar-bg {\n position: fixed;\n z-index: 1000;\n bottom: 0;\n}\n.control-sidebar-bg,\n.control-sidebar {\n top: 0;\n right: -230px;\n width: 230px;\n -webkit-transition: right 0.3s ease-in-out;\n -o-transition: right 0.3s ease-in-out;\n transition: right 0.3s ease-in-out;\n}\n.control-sidebar {\n position: absolute;\n padding-top: 50px;\n z-index: 1010;\n}\n@media (max-width: 768px) {\n .control-sidebar {\n padding-top: 100px;\n }\n}\n.control-sidebar > .tab-content {\n padding: 10px 15px;\n}\n.control-sidebar.control-sidebar-open,\n.control-sidebar.control-sidebar-open + .control-sidebar-bg {\n right: 0;\n}\n.control-sidebar-open .control-sidebar-bg,\n.control-sidebar-open .control-sidebar {\n right: 0;\n}\n@media (min-width: 768px) {\n .control-sidebar-open .content-wrapper,\n .control-sidebar-open .right-side,\n .control-sidebar-open .main-footer {\n margin-right: 230px;\n }\n}\n.nav-tabs.control-sidebar-tabs > li:first-of-type > a,\n.nav-tabs.control-sidebar-tabs > li:first-of-type > a:hover,\n.nav-tabs.control-sidebar-tabs > li:first-of-type > a:focus {\n border-left-width: 0;\n}\n.nav-tabs.control-sidebar-tabs > li > a {\n border-radius: 0;\n}\n.nav-tabs.control-sidebar-tabs > li > a,\n.nav-tabs.control-sidebar-tabs > li > a:hover {\n border-top: none;\n border-right: none;\n border-left: 1px solid transparent;\n border-bottom: 1px solid transparent;\n}\n.nav-tabs.control-sidebar-tabs > li > a .icon {\n font-size: 16px;\n}\n.nav-tabs.control-sidebar-tabs > li.active > a,\n.nav-tabs.control-sidebar-tabs > li.active > a:hover,\n.nav-tabs.control-sidebar-tabs > li.active > a:focus,\n.nav-tabs.control-sidebar-tabs > li.active > a:active {\n border-top: none;\n border-right: none;\n border-bottom: none;\n}\n@media (max-width: 768px) {\n .nav-tabs.control-sidebar-tabs {\n display: table;\n }\n .nav-tabs.control-sidebar-tabs > li {\n display: table-cell;\n }\n}\n.control-sidebar-heading {\n font-weight: 400;\n font-size: 16px;\n padding: 10px 0;\n margin-bottom: 10px;\n}\n.control-sidebar-subheading {\n display: block;\n font-weight: 400;\n font-size: 14px;\n}\n.control-sidebar-menu {\n list-style: none;\n padding: 0;\n margin: 0 -15px;\n}\n.control-sidebar-menu > li > a {\n display: block;\n padding: 10px 15px;\n}\n.control-sidebar-menu > li > a:before,\n.control-sidebar-menu > li > a:after {\n content: \" \";\n display: table;\n}\n.control-sidebar-menu > li > a:after {\n clear: both;\n}\n.control-sidebar-menu > li > a > .control-sidebar-subheading {\n margin-top: 0;\n}\n.control-sidebar-menu .menu-icon {\n float: left;\n width: 35px;\n height: 35px;\n border-radius: 50%;\n text-align: center;\n line-height: 35px;\n}\n.control-sidebar-menu .menu-info {\n margin-left: 45px;\n margin-top: 3px;\n}\n.control-sidebar-menu .menu-info > .control-sidebar-subheading {\n margin: 0;\n}\n.control-sidebar-menu .menu-info > p {\n margin: 0;\n font-size: 11px;\n}\n.control-sidebar-menu .progress {\n margin: 0;\n}\n.control-sidebar-dark {\n color: #b8c7ce;\n}\n.control-sidebar-dark,\n.control-sidebar-dark + .control-sidebar-bg {\n background: #222d32;\n}\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs {\n border-bottom: #1c2529;\n}\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a {\n background: #181f23;\n color: #b8c7ce;\n}\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a,\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover,\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:focus {\n border-left-color: #141a1d;\n border-bottom-color: #141a1d;\n}\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover,\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:focus,\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:active {\n background: #1c2529;\n}\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li > a:hover {\n color: #fff;\n}\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a,\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:hover,\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:focus,\n.control-sidebar-dark .nav-tabs.control-sidebar-tabs > li.active > a:active {\n background: #222d32;\n color: #fff;\n}\n.control-sidebar-dark .control-sidebar-heading,\n.control-sidebar-dark .control-sidebar-subheading {\n color: #fff;\n}\n.control-sidebar-dark .control-sidebar-menu > li > a:hover {\n background: #1e282c;\n}\n.control-sidebar-dark .control-sidebar-menu > li > a .menu-info > p {\n color: #b8c7ce;\n}\n.control-sidebar-light {\n color: #5e5e5e;\n}\n.control-sidebar-light,\n.control-sidebar-light + .control-sidebar-bg {\n background: #f9fafc;\n border-left: 1px solid #d2d6de;\n}\n.control-sidebar-light .nav-tabs.control-sidebar-tabs {\n border-bottom: #d2d6de;\n}\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a {\n background: #e8ecf4;\n color: #444444;\n}\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a,\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:hover,\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:focus {\n border-left-color: #d2d6de;\n border-bottom-color: #d2d6de;\n}\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:hover,\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:focus,\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li > a:active {\n background: #eff1f7;\n}\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a,\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:hover,\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:focus,\n.control-sidebar-light .nav-tabs.control-sidebar-tabs > li.active > a:active {\n background: #f9fafc;\n color: #111;\n}\n.control-sidebar-light .control-sidebar-heading,\n.control-sidebar-light .control-sidebar-subheading {\n color: #111;\n}\n.control-sidebar-light .control-sidebar-menu {\n margin-left: -14px;\n}\n.control-sidebar-light .control-sidebar-menu > li > a:hover {\n background: #f4f4f5;\n}\n.control-sidebar-light .control-sidebar-menu > li > a .menu-info > p {\n color: #5e5e5e;\n}\n/*\n * Component: Dropdown menus\n * -------------------------\n */\n/*Dropdowns in general*/\n.dropdown-menu {\n box-shadow: none;\n border-color: #eee;\n}\n.dropdown-menu > li > a {\n color: #777;\n}\n.dropdown-menu > li > a > .glyphicon,\n.dropdown-menu > li > a > .fa,\n.dropdown-menu > li > a > .ion {\n margin-right: 10px;\n}\n.dropdown-menu > li > a:hover {\n background-color: #e1e3e9;\n color: #333;\n}\n.dropdown-menu > .divider {\n background-color: #eee;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu,\n.navbar-nav > .messages-menu > .dropdown-menu,\n.navbar-nav > .tasks-menu > .dropdown-menu {\n width: 280px;\n padding: 0 0 0 0;\n margin: 0;\n top: 100%;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li,\n.navbar-nav > .messages-menu > .dropdown-menu > li,\n.navbar-nav > .tasks-menu > .dropdown-menu > li {\n position: relative;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li.header,\n.navbar-nav > .messages-menu > .dropdown-menu > li.header,\n.navbar-nav > .tasks-menu > .dropdown-menu > li.header {\n border-top-left-radius: 4px;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n background-color: #ffffff;\n padding: 7px 10px;\n border-bottom: 1px solid #f4f4f4;\n color: #444444;\n font-size: 14px;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a,\n.navbar-nav > .messages-menu > .dropdown-menu > li.footer > a,\n.navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n font-size: 12px;\n background-color: #fff;\n padding: 7px 10px;\n border-bottom: 1px solid #eeeeee;\n color: #444 !important;\n text-align: center;\n}\n@media (max-width: 991px) {\n .navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a,\n .navbar-nav > .messages-menu > .dropdown-menu > li.footer > a,\n .navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a {\n background: #fff !important;\n color: #444 !important;\n }\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li.footer > a:hover,\n.navbar-nav > .messages-menu > .dropdown-menu > li.footer > a:hover,\n.navbar-nav > .tasks-menu > .dropdown-menu > li.footer > a:hover {\n text-decoration: none;\n font-weight: normal;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li .menu,\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu,\n.navbar-nav > .tasks-menu > .dropdown-menu > li .menu {\n max-height: 200px;\n margin: 0;\n padding: 0;\n list-style: none;\n overflow-x: hidden;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a,\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a,\n.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a {\n display: block;\n white-space: nowrap;\n /* Prevent text from breaking */\n border-bottom: 1px solid #f4f4f4;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a:hover,\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:hover,\n.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a:hover {\n background: #f4f4f4;\n text-decoration: none;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a {\n color: #444444;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 10px;\n}\n.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .glyphicon,\n.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .fa,\n.navbar-nav > .notifications-menu > .dropdown-menu > li .menu > li > a > .ion {\n width: 20px;\n}\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a {\n margin: 0;\n padding: 10px 10px;\n}\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > div > img {\n margin: auto 10px auto auto;\n width: 40px;\n height: 40px;\n}\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 {\n padding: 0;\n margin: 0 0 0 45px;\n color: #444444;\n font-size: 15px;\n position: relative;\n}\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > h4 > small {\n color: #999999;\n font-size: 10px;\n position: absolute;\n top: 0;\n right: 0;\n}\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a > p {\n margin: 0 0 0 45px;\n font-size: 12px;\n color: #888888;\n}\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:before,\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after {\n content: \" \";\n display: table;\n}\n.navbar-nav > .messages-menu > .dropdown-menu > li .menu > li > a:after {\n clear: both;\n}\n.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a {\n padding: 10px;\n}\n.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > h3 {\n font-size: 14px;\n padding: 0;\n margin: 0 0 10px 0;\n color: #666666;\n}\n.navbar-nav > .tasks-menu > .dropdown-menu > li .menu > li > a > .progress {\n padding: 0;\n margin: 0;\n}\n.navbar-nav > .user-menu > .dropdown-menu {\n border-top-right-radius: 0;\n border-top-left-radius: 0;\n padding: 1px 0 0 0;\n border-top-width: 0;\n width: 280px;\n}\n.navbar-nav > .user-menu > .dropdown-menu,\n.navbar-nav > .user-menu > .dropdown-menu > .user-body {\n border-bottom-right-radius: 4px;\n border-bottom-left-radius: 4px;\n}\n.navbar-nav > .user-menu > .dropdown-menu > li.user-header {\n height: 175px;\n padding: 10px;\n text-align: center;\n}\n.navbar-nav > .user-menu > .dropdown-menu > li.user-header > img {\n z-index: 5;\n height: 90px;\n width: 90px;\n border: 3px solid;\n border-color: transparent;\n border-color: rgba(255, 255, 255, 0.2);\n}\n.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p {\n z-index: 5;\n color: #fff;\n color: rgba(255, 255, 255, 0.8);\n font-size: 17px;\n margin-top: 10px;\n}\n.navbar-nav > .user-menu > .dropdown-menu > li.user-header > p > small {\n display: block;\n font-size: 12px;\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-body {\n padding: 15px;\n border-bottom: 1px solid #f4f4f4;\n border-top: 1px solid #dddddd;\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-body:before,\n.navbar-nav > .user-menu > .dropdown-menu > .user-body:after {\n content: \" \";\n display: table;\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-body:after {\n clear: both;\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-body a {\n color: #444 !important;\n}\n@media (max-width: 991px) {\n .navbar-nav > .user-menu > .dropdown-menu > .user-body a {\n background: #fff !important;\n color: #444 !important;\n }\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-footer {\n background-color: #f9f9f9;\n padding: 10px;\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-footer:before,\n.navbar-nav > .user-menu > .dropdown-menu > .user-footer:after {\n content: \" \";\n display: table;\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-footer:after {\n clear: both;\n}\n.navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default {\n color: #666666;\n}\n@media (max-width: 991px) {\n .navbar-nav > .user-menu > .dropdown-menu > .user-footer .btn-default:hover {\n background-color: #f9f9f9;\n }\n}\n.navbar-nav > .user-menu .user-image {\n float: left;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n margin-right: 10px;\n margin-top: -2px;\n}\n@media (max-width: 767px) {\n .navbar-nav > .user-menu .user-image {\n float: none;\n margin-right: 0;\n margin-top: -8px;\n line-height: 10px;\n }\n}\n/* Add fade animation to dropdown menus by appending\n the class .animated-dropdown-menu to the .dropdown-menu ul (or ol)*/\n.open:not(.dropup) > .animated-dropdown-menu {\n backface-visibility: visible !important;\n -webkit-animation: flipInX 0.7s both;\n -o-animation: flipInX 0.7s both;\n animation: flipInX 0.7s both;\n}\n@keyframes flipInX {\n 0% {\n transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n transition-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n transition-timing-function: ease-in;\n }\n 60% {\n transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n 100% {\n transform: perspective(400px);\n }\n}\n@-webkit-keyframes flipInX {\n 0% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);\n -webkit-transition-timing-function: ease-in;\n opacity: 0;\n }\n 40% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -20deg);\n -webkit-transition-timing-function: ease-in;\n }\n 60% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 10deg);\n opacity: 1;\n }\n 80% {\n -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -5deg);\n }\n 100% {\n -webkit-transform: perspective(400px);\n }\n}\n/* Fix dropdown menu in navbars */\n.navbar-custom-menu > .navbar-nav > li {\n position: relative;\n}\n.navbar-custom-menu > .navbar-nav > li > .dropdown-menu {\n position: absolute;\n right: 0;\n left: auto;\n}\n@media (max-width: 991px) {\n .navbar-custom-menu > .navbar-nav {\n float: right;\n }\n .navbar-custom-menu > .navbar-nav > li {\n position: static;\n }\n .navbar-custom-menu > .navbar-nav > li > .dropdown-menu {\n position: absolute;\n right: 5%;\n left: auto;\n border: 1px solid #ddd;\n background: #fff;\n }\n}\n/*\n * Component: Form\n * ---------------\n */\n.form-control {\n border-radius: 0;\n box-shadow: none;\n border-color: #d2d6de;\n}\n.form-control:focus {\n border-color: #3c8dbc;\n box-shadow: none;\n}\n.form-control::-moz-placeholder,\n.form-control:-ms-input-placeholder,\n.form-control::-webkit-input-placeholder {\n color: #bbb;\n opacity: 1;\n}\n.form-control:not(select) {\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n}\n.form-group.has-success label {\n color: #00a65a;\n}\n.form-group.has-success .form-control {\n border-color: #00a65a;\n box-shadow: none;\n}\n.form-group.has-warning label {\n color: #f39c12;\n}\n.form-group.has-warning .form-control {\n border-color: #f39c12;\n box-shadow: none;\n}\n.form-group.has-error label {\n color: #dd4b39;\n}\n.form-group.has-error .form-control {\n border-color: #dd4b39;\n box-shadow: none;\n}\n/* Input group */\n.input-group .input-group-addon {\n border-radius: 0;\n border-color: #d2d6de;\n background-color: #fff;\n}\n/* button groups */\n.btn-group-vertical .btn.btn-flat:first-of-type,\n.btn-group-vertical .btn.btn-flat:last-of-type {\n border-radius: 0;\n}\n.icheck > label {\n padding-left: 0;\n}\n/* support Font Awesome icons in form-control */\n.form-control-feedback.fa {\n line-height: 34px;\n}\n.input-lg + .form-control-feedback.fa,\n.input-group-lg + .form-control-feedback.fa,\n.form-group-lg .form-control + .form-control-feedback.fa {\n line-height: 46px;\n}\n.input-sm + .form-control-feedback.fa,\n.input-group-sm + .form-control-feedback.fa,\n.form-group-sm .form-control + .form-control-feedback.fa {\n line-height: 30px;\n}\n/*\n * Component: Progress Bar\n * -----------------------\n */\n.progress,\n.progress > .progress-bar {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.progress,\n.progress > .progress-bar,\n.progress .progress-bar,\n.progress > .progress-bar .progress-bar {\n border-radius: 1px;\n}\n/* size variation */\n.progress.sm,\n.progress-sm {\n height: 10px;\n}\n.progress.sm,\n.progress-sm,\n.progress.sm .progress-bar,\n.progress-sm .progress-bar {\n border-radius: 1px;\n}\n.progress.xs,\n.progress-xs {\n height: 7px;\n}\n.progress.xs,\n.progress-xs,\n.progress.xs .progress-bar,\n.progress-xs .progress-bar {\n border-radius: 1px;\n}\n.progress.xxs,\n.progress-xxs {\n height: 3px;\n}\n.progress.xxs,\n.progress-xxs,\n.progress.xxs .progress-bar,\n.progress-xxs .progress-bar {\n border-radius: 1px;\n}\n/* Vertical bars */\n.progress.vertical {\n position: relative;\n width: 30px;\n height: 200px;\n display: inline-block;\n margin-right: 10px;\n}\n.progress.vertical > .progress-bar {\n width: 100%;\n position: absolute;\n bottom: 0;\n}\n.progress.vertical.sm,\n.progress.vertical.progress-sm {\n width: 20px;\n}\n.progress.vertical.xs,\n.progress.vertical.progress-xs {\n width: 10px;\n}\n.progress.vertical.xxs,\n.progress.vertical.progress-xxs {\n width: 3px;\n}\n.progress-group .progress-text {\n font-weight: 600;\n}\n.progress-group .progress-number {\n float: right;\n}\n/* Remove margins from progress bars when put in a table */\n.table tr > td .progress {\n margin: 0;\n}\n.progress-bar-light-blue,\n.progress-bar-primary {\n background-color: #3c8dbc;\n}\n.progress-striped .progress-bar-light-blue,\n.progress-striped .progress-bar-primary {\n 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);\n 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);\n 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);\n}\n.progress-bar-green,\n.progress-bar-success {\n background-color: #00a65a;\n}\n.progress-striped .progress-bar-green,\n.progress-striped .progress-bar-success {\n 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);\n 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);\n 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);\n}\n.progress-bar-aqua,\n.progress-bar-info {\n background-color: #00c0ef;\n}\n.progress-striped .progress-bar-aqua,\n.progress-striped .progress-bar-info {\n 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);\n 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);\n 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);\n}\n.progress-bar-yellow,\n.progress-bar-warning {\n background-color: #f39c12;\n}\n.progress-striped .progress-bar-yellow,\n.progress-striped .progress-bar-warning {\n 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);\n 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);\n 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);\n}\n.progress-bar-red,\n.progress-bar-danger {\n background-color: #dd4b39;\n}\n.progress-striped .progress-bar-red,\n.progress-striped .progress-bar-danger {\n 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);\n 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);\n 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);\n}\n/*\n * Component: Small Box\n * --------------------\n */\n.small-box {\n border-radius: 2px;\n position: relative;\n display: block;\n margin-bottom: 20px;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n}\n.small-box > .inner {\n padding: 10px;\n}\n.small-box > .small-box-footer {\n position: relative;\n text-align: center;\n padding: 3px 0;\n color: #fff;\n color: rgba(255, 255, 255, 0.8);\n display: block;\n z-index: 10;\n background: rgba(0, 0, 0, 0.1);\n text-decoration: none;\n}\n.small-box > .small-box-footer:hover {\n color: #fff;\n background: rgba(0, 0, 0, 0.15);\n}\n.small-box h3 {\n font-size: 38px;\n font-weight: bold;\n margin: 0 0 10px 0;\n white-space: nowrap;\n padding: 0;\n}\n.small-box p {\n font-size: 15px;\n}\n.small-box p > small {\n display: block;\n color: #f9f9f9;\n font-size: 13px;\n margin-top: 5px;\n}\n.small-box h3,\n.small-box p {\n z-index: 5;\n}\n.small-box .icon {\n -webkit-transition: all 0.3s linear;\n -o-transition: all 0.3s linear;\n transition: all 0.3s linear;\n position: absolute;\n top: -10px;\n right: 10px;\n z-index: 0;\n font-size: 90px;\n color: rgba(0, 0, 0, 0.15);\n}\n.small-box:hover {\n text-decoration: none;\n color: #f9f9f9;\n}\n.small-box:hover .icon {\n font-size: 95px;\n}\n@media (max-width: 767px) {\n .small-box {\n text-align: center;\n }\n .small-box .icon {\n display: none;\n }\n .small-box p {\n font-size: 12px;\n }\n}\n/*\n * Component: Box\n * --------------\n */\n.box {\n position: relative;\n border-radius: 3px;\n background: #ffffff;\n border-top: 3px solid #d2d6de;\n margin-bottom: 20px;\n width: 100%;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n}\n.box.box-primary {\n border-top-color: #3c8dbc;\n}\n.box.box-info {\n border-top-color: #00c0ef;\n}\n.box.box-danger {\n border-top-color: #dd4b39;\n}\n.box.box-warning {\n border-top-color: #f39c12;\n}\n.box.box-success {\n border-top-color: #00a65a;\n}\n.box.box-default {\n border-top-color: #d2d6de;\n}\n.box.collapsed-box .box-body,\n.box.collapsed-box .box-footer {\n display: none;\n}\n.box .nav-stacked > li {\n border-bottom: 1px solid #f4f4f4;\n margin: 0;\n}\n.box .nav-stacked > li:last-of-type {\n border-bottom: none;\n}\n.box.height-control .box-body {\n max-height: 300px;\n overflow: auto;\n}\n.box .border-right {\n border-right: 1px solid #f4f4f4;\n}\n.box .border-left {\n border-left: 1px solid #f4f4f4;\n}\n.box.box-solid {\n border-top: 0;\n}\n.box.box-solid > .box-header .btn.btn-default {\n background: transparent;\n}\n.box.box-solid > .box-header .btn:hover,\n.box.box-solid > .box-header a:hover {\n background: rgba(0, 0, 0, 0.1);\n}\n.box.box-solid.box-default {\n border: 1px solid #d2d6de;\n}\n.box.box-solid.box-default > .box-header {\n color: #444444;\n background: #d2d6de;\n background-color: #d2d6de;\n}\n.box.box-solid.box-default > .box-header a,\n.box.box-solid.box-default > .box-header .btn {\n color: #444444;\n}\n.box.box-solid.box-primary {\n border: 1px solid #3c8dbc;\n}\n.box.box-solid.box-primary > .box-header {\n color: #ffffff;\n background: #3c8dbc;\n background-color: #3c8dbc;\n}\n.box.box-solid.box-primary > .box-header a,\n.box.box-solid.box-primary > .box-header .btn {\n color: #ffffff;\n}\n.box.box-solid.box-info {\n border: 1px solid #00c0ef;\n}\n.box.box-solid.box-info > .box-header {\n color: #ffffff;\n background: #00c0ef;\n background-color: #00c0ef;\n}\n.box.box-solid.box-info > .box-header a,\n.box.box-solid.box-info > .box-header .btn {\n color: #ffffff;\n}\n.box.box-solid.box-danger {\n border: 1px solid #dd4b39;\n}\n.box.box-solid.box-danger > .box-header {\n color: #ffffff;\n background: #dd4b39;\n background-color: #dd4b39;\n}\n.box.box-solid.box-danger > .box-header a,\n.box.box-solid.box-danger > .box-header .btn {\n color: #ffffff;\n}\n.box.box-solid.box-warning {\n border: 1px solid #f39c12;\n}\n.box.box-solid.box-warning > .box-header {\n color: #ffffff;\n background: #f39c12;\n background-color: #f39c12;\n}\n.box.box-solid.box-warning > .box-header a,\n.box.box-solid.box-warning > .box-header .btn {\n color: #ffffff;\n}\n.box.box-solid.box-success {\n border: 1px solid #00a65a;\n}\n.box.box-solid.box-success > .box-header {\n color: #ffffff;\n background: #00a65a;\n background-color: #00a65a;\n}\n.box.box-solid.box-success > .box-header a,\n.box.box-solid.box-success > .box-header .btn {\n color: #ffffff;\n}\n.box.box-solid > .box-header > .box-tools .btn {\n border: 0;\n box-shadow: none;\n}\n.box.box-solid[class*='bg'] > .box-header {\n color: #fff;\n}\n.box .box-group > .box {\n margin-bottom: 5px;\n}\n.box .knob-label {\n text-align: center;\n color: #333;\n font-weight: 100;\n font-size: 12px;\n margin-bottom: 0.3em;\n}\n.box > .overlay,\n.overlay-wrapper > .overlay,\n.box > .loading-img,\n.overlay-wrapper > .loading-img {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.box .overlay,\n.overlay-wrapper .overlay {\n z-index: 50;\n background: rgba(255, 255, 255, 0.7);\n border-radius: 3px;\n}\n.box .overlay > .fa,\n.overlay-wrapper .overlay > .fa {\n position: absolute;\n top: 50%;\n left: 50%;\n margin-left: -15px;\n margin-top: -15px;\n color: #000;\n font-size: 30px;\n}\n.box .overlay.dark,\n.overlay-wrapper .overlay.dark {\n background: rgba(0, 0, 0, 0.5);\n}\n.box-header:before,\n.box-body:before,\n.box-footer:before,\n.box-header:after,\n.box-body:after,\n.box-footer:after {\n content: \" \";\n display: table;\n}\n.box-header:after,\n.box-body:after,\n.box-footer:after {\n clear: both;\n}\n.box-header {\n color: #444;\n display: block;\n padding: 10px;\n position: relative;\n}\n.box-header.with-border {\n border-bottom: 1px solid #f4f4f4;\n}\n.collapsed-box .box-header.with-border {\n border-bottom: none;\n}\n.box-header > .fa,\n.box-header > .glyphicon,\n.box-header > .ion,\n.box-header .box-title {\n display: inline-block;\n font-size: 18px;\n margin: 0;\n line-height: 1;\n}\n.box-header > .fa,\n.box-header > .glyphicon,\n.box-header > .ion {\n margin-right: 5px;\n}\n.box-header > .box-tools {\n position: absolute;\n right: 10px;\n top: 5px;\n}\n.box-header > .box-tools [data-toggle=\"tooltip\"] {\n position: relative;\n}\n.box-header > .box-tools.pull-right .dropdown-menu {\n right: 0;\n left: auto;\n}\n.btn-box-tool {\n padding: 5px;\n font-size: 12px;\n background: transparent;\n color: #97a0b3;\n}\n.open .btn-box-tool,\n.btn-box-tool:hover {\n color: #606c84;\n}\n.btn-box-tool.btn:active {\n box-shadow: none;\n}\n.box-body {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n padding: 10px;\n}\n.no-header .box-body {\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.box-body > .table {\n margin-bottom: 0;\n}\n.box-body .fc {\n margin-top: 5px;\n}\n.box-body .full-width-chart {\n margin: -19px;\n}\n.box-body.no-padding .full-width-chart {\n margin: -9px;\n}\n.box-body .box-pane {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 3px;\n}\n.box-body .box-pane-right {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 0;\n}\n.box-footer {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n border-top: 1px solid #f4f4f4;\n padding: 10px;\n background-color: #ffffff;\n}\n.chart-legend {\n margin: 10px 0;\n}\n@media (max-width: 991px) {\n .chart-legend > li {\n float: left;\n margin-right: 10px;\n }\n}\n.box-comments {\n background: #f7f7f7;\n}\n.box-comments .box-comment {\n padding: 8px 0;\n border-bottom: 1px solid #eee;\n}\n.box-comments .box-comment:before,\n.box-comments .box-comment:after {\n content: \" \";\n display: table;\n}\n.box-comments .box-comment:after {\n clear: both;\n}\n.box-comments .box-comment:last-of-type {\n border-bottom: 0;\n}\n.box-comments .box-comment:first-of-type {\n padding-top: 0;\n}\n.box-comments .box-comment img {\n float: left;\n}\n.box-comments .comment-text {\n margin-left: 40px;\n color: #555;\n}\n.box-comments .username {\n color: #444;\n display: block;\n font-weight: 600;\n}\n.box-comments .text-muted {\n font-weight: 400;\n font-size: 12px;\n}\n/* Widget: TODO LIST */\n.todo-list {\n margin: 0;\n padding: 0;\n list-style: none;\n overflow: auto;\n}\n.todo-list > li {\n border-radius: 2px;\n padding: 10px;\n background: #f4f4f4;\n margin-bottom: 2px;\n border-left: 2px solid #e6e7e8;\n color: #444;\n}\n.todo-list > li:last-of-type {\n margin-bottom: 0;\n}\n.todo-list > li > input[type='checkbox'] {\n margin: 0 10px 0 5px;\n}\n.todo-list > li .text {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600;\n}\n.todo-list > li .label {\n margin-left: 10px;\n font-size: 9px;\n}\n.todo-list > li .tools {\n display: none;\n float: right;\n color: #dd4b39;\n}\n.todo-list > li .tools > .fa,\n.todo-list > li .tools > .glyphicon,\n.todo-list > li .tools > .ion {\n margin-right: 5px;\n cursor: pointer;\n}\n.todo-list > li:hover .tools {\n display: inline-block;\n}\n.todo-list > li.done {\n color: #999;\n}\n.todo-list > li.done .text {\n text-decoration: line-through;\n font-weight: 500;\n}\n.todo-list > li.done .label {\n background: #d2d6de !important;\n}\n.todo-list .danger {\n border-left-color: #dd4b39;\n}\n.todo-list .warning {\n border-left-color: #f39c12;\n}\n.todo-list .info {\n border-left-color: #00c0ef;\n}\n.todo-list .success {\n border-left-color: #00a65a;\n}\n.todo-list .primary {\n border-left-color: #3c8dbc;\n}\n.todo-list .handle {\n display: inline-block;\n cursor: move;\n margin: 0 5px;\n}\n/* Chat widget (DEPRECATED - this will be removed in the next major release. Use Direct Chat instead)*/\n.chat {\n padding: 5px 20px 5px 10px;\n}\n.chat .item {\n margin-bottom: 10px;\n}\n.chat .item:before,\n.chat .item:after {\n content: \" \";\n display: table;\n}\n.chat .item:after {\n clear: both;\n}\n.chat .item > img {\n width: 40px;\n height: 40px;\n border: 2px solid transparent;\n border-radius: 50%;\n}\n.chat .item > .online {\n border: 2px solid #00a65a;\n}\n.chat .item > .offline {\n border: 2px solid #dd4b39;\n}\n.chat .item > .message {\n margin-left: 55px;\n margin-top: -40px;\n}\n.chat .item > .message > .name {\n display: block;\n font-weight: 600;\n}\n.chat .item > .attachment {\n border-radius: 3px;\n background: #f4f4f4;\n margin-left: 65px;\n margin-right: 15px;\n padding: 10px;\n}\n.chat .item > .attachment > h4 {\n margin: 0 0 5px 0;\n font-weight: 600;\n font-size: 14px;\n}\n.chat .item > .attachment > p,\n.chat .item > .attachment > .filename {\n font-weight: 600;\n font-size: 13px;\n font-style: italic;\n margin: 0;\n}\n.chat .item > .attachment:before,\n.chat .item > .attachment:after {\n content: \" \";\n display: table;\n}\n.chat .item > .attachment:after {\n clear: both;\n}\n.box-input {\n max-width: 200px;\n}\n.modal .panel-body {\n color: #444;\n}\n/*\n * Component: Info Box\n * -------------------\n */\n.info-box {\n display: block;\n min-height: 90px;\n background: #fff;\n width: 100%;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n border-radius: 2px;\n margin-bottom: 15px;\n}\n.info-box small {\n font-size: 14px;\n}\n.info-box .progress {\n background: rgba(0, 0, 0, 0.2);\n margin: 5px -10px 5px -10px;\n height: 2px;\n}\n.info-box .progress,\n.info-box .progress .progress-bar {\n border-radius: 0;\n}\n.info-box .progress .progress-bar {\n background: #fff;\n}\n.info-box-icon {\n border-top-left-radius: 2px;\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 2px;\n display: block;\n float: left;\n height: 90px;\n width: 90px;\n text-align: center;\n font-size: 45px;\n line-height: 90px;\n background: rgba(0, 0, 0, 0.2);\n}\n.info-box-icon > img {\n max-width: 100%;\n}\n.info-box-content {\n padding: 5px 10px;\n margin-left: 90px;\n}\n.info-box-number {\n display: block;\n font-weight: bold;\n font-size: 18px;\n}\n.progress-description,\n.info-box-text {\n display: block;\n font-size: 14px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.info-box-text {\n text-transform: uppercase;\n}\n.info-box-more {\n display: block;\n}\n.progress-description {\n margin: 0;\n}\n/*\n * Component: Timeline\n * -------------------\n */\n.timeline {\n position: relative;\n margin: 0 0 30px 0;\n padding: 0;\n list-style: none;\n}\n.timeline:before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n width: 4px;\n background: #ddd;\n left: 31px;\n margin: 0;\n border-radius: 2px;\n}\n.timeline > li {\n position: relative;\n margin-right: 10px;\n margin-bottom: 15px;\n}\n.timeline > li:before,\n.timeline > li:after {\n content: \" \";\n display: table;\n}\n.timeline > li:after {\n clear: both;\n}\n.timeline > li > .timeline-item {\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n margin-top: 0;\n background: #fff;\n color: #444;\n margin-left: 60px;\n margin-right: 15px;\n padding: 0;\n position: relative;\n}\n.timeline > li > .timeline-item > .time {\n color: #999;\n float: right;\n padding: 10px;\n font-size: 12px;\n}\n.timeline > li > .timeline-item > .timeline-header {\n margin: 0;\n color: #555;\n border-bottom: 1px solid #f4f4f4;\n padding: 10px;\n font-size: 16px;\n line-height: 1.1;\n}\n.timeline > li > .timeline-item > .timeline-header > a {\n font-weight: 600;\n}\n.timeline > li > .timeline-item > .timeline-body,\n.timeline > li > .timeline-item > .timeline-footer {\n padding: 10px;\n}\n.timeline > li > .fa,\n.timeline > li > .glyphicon,\n.timeline > li > .ion {\n width: 30px;\n height: 30px;\n font-size: 15px;\n line-height: 30px;\n position: absolute;\n color: #666;\n background: #d2d6de;\n border-radius: 50%;\n text-align: center;\n left: 18px;\n top: 0;\n}\n.timeline > .time-label > span {\n font-weight: 600;\n padding: 5px;\n display: inline-block;\n background-color: #fff;\n border-radius: 4px;\n}\n.timeline-inverse > li > .timeline-item {\n background: #f0f0f0;\n border: 1px solid #ddd;\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.timeline-inverse > li > .timeline-item > .timeline-header {\n border-bottom-color: #ddd;\n}\n/*\n * Component: Button\n * -----------------\n */\n.btn {\n border-radius: 3px;\n -webkit-box-shadow: none;\n box-shadow: none;\n border: 1px solid transparent;\n}\n.btn.uppercase {\n text-transform: uppercase;\n}\n.btn.btn-flat {\n border-radius: 0;\n -webkit-box-shadow: none;\n -moz-box-shadow: none;\n box-shadow: none;\n border-width: 1px;\n}\n.btn:active {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn:focus {\n outline: none;\n}\n.btn.btn-file {\n position: relative;\n overflow: hidden;\n}\n.btn.btn-file > input[type='file'] {\n position: absolute;\n top: 0;\n right: 0;\n min-width: 100%;\n min-height: 100%;\n font-size: 100px;\n text-align: right;\n opacity: 0;\n filter: alpha(opacity=0);\n outline: none;\n background: white;\n cursor: inherit;\n display: block;\n}\n.btn-default {\n background-color: #f4f4f4;\n color: #444;\n border-color: #ddd;\n}\n.btn-default:hover,\n.btn-default:active,\n.btn-default.hover {\n background-color: #e7e7e7;\n}\n.btn-primary {\n background-color: #3c8dbc;\n border-color: #367fa9;\n}\n.btn-primary:hover,\n.btn-primary:active,\n.btn-primary.hover {\n background-color: #367fa9;\n}\n.btn-success {\n background-color: #00a65a;\n border-color: #008d4c;\n}\n.btn-success:hover,\n.btn-success:active,\n.btn-success.hover {\n background-color: #008d4c;\n}\n.btn-info {\n background-color: #00c0ef;\n border-color: #00acd6;\n}\n.btn-info:hover,\n.btn-info:active,\n.btn-info.hover {\n background-color: #00acd6;\n}\n.btn-danger {\n background-color: #dd4b39;\n border-color: #d73925;\n}\n.btn-danger:hover,\n.btn-danger:active,\n.btn-danger.hover {\n background-color: #d73925;\n}\n.btn-warning {\n background-color: #f39c12;\n border-color: #e08e0b;\n}\n.btn-warning:hover,\n.btn-warning:active,\n.btn-warning.hover {\n background-color: #e08e0b;\n}\n.btn-outline {\n border: 1px solid #fff;\n background: transparent;\n color: #fff;\n}\n.btn-outline:hover,\n.btn-outline:focus,\n.btn-outline:active {\n color: rgba(255, 255, 255, 0.7);\n border-color: rgba(255, 255, 255, 0.7);\n}\n.btn-link {\n -webkit-box-shadow: none;\n box-shadow: none;\n}\n.btn[class*='bg-']:hover {\n -webkit-box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);\n box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.2);\n}\n.btn-app {\n border-radius: 3px;\n position: relative;\n padding: 15px 5px;\n margin: 0 0 10px 10px;\n min-width: 80px;\n height: 60px;\n text-align: center;\n color: #666;\n border: 1px solid #ddd;\n background-color: #f4f4f4;\n font-size: 12px;\n}\n.btn-app > .fa,\n.btn-app > .glyphicon,\n.btn-app > .ion {\n font-size: 20px;\n display: block;\n}\n.btn-app:hover {\n background: #f4f4f4;\n color: #444;\n border-color: #aaa;\n}\n.btn-app:active,\n.btn-app:focus {\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n -moz-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);\n}\n.btn-app > .badge {\n position: absolute;\n top: -3px;\n right: -10px;\n font-size: 10px;\n font-weight: 400;\n}\n/*\n * Component: Callout\n * ------------------\n */\n.callout {\n border-radius: 3px;\n margin: 0 0 20px 0;\n padding: 15px 30px 15px 15px;\n border-left: 5px solid #eee;\n}\n.callout a {\n color: #fff;\n text-decoration: underline;\n}\n.callout a:hover {\n color: #eee;\n}\n.callout h4 {\n margin-top: 0;\n font-weight: 600;\n}\n.callout p:last-child {\n margin-bottom: 0;\n}\n.callout code,\n.callout .highlight {\n background-color: #fff;\n}\n.callout.callout-danger {\n border-color: #c23321;\n}\n.callout.callout-warning {\n border-color: #c87f0a;\n}\n.callout.callout-info {\n border-color: #0097bc;\n}\n.callout.callout-success {\n border-color: #00733e;\n}\n/*\n * Component: alert\n * ----------------\n */\n.alert {\n border-radius: 3px;\n}\n.alert h4 {\n font-weight: 600;\n}\n.alert .icon {\n margin-right: 10px;\n}\n.alert .close {\n color: #000;\n opacity: 0.2;\n filter: alpha(opacity=20);\n}\n.alert .close:hover {\n opacity: 0.5;\n filter: alpha(opacity=50);\n}\n.alert a {\n color: #fff;\n text-decoration: underline;\n}\n.alert-success {\n border-color: #008d4c;\n}\n.alert-danger,\n.alert-error {\n border-color: #d73925;\n}\n.alert-warning {\n border-color: #e08e0b;\n}\n.alert-info {\n border-color: #00acd6;\n}\n/*\n * Component: Nav\n * --------------\n */\n.nav > li > a:hover,\n.nav > li > a:active,\n.nav > li > a:focus {\n color: #444;\n background: #f7f7f7;\n}\n/* NAV PILLS */\n.nav-pills > li > a {\n border-radius: 0;\n border-top: 3px solid transparent;\n color: #444;\n}\n.nav-pills > li > a > .fa,\n.nav-pills > li > a > .glyphicon,\n.nav-pills > li > a > .ion {\n margin-right: 5px;\n}\n.nav-pills > li.active > a,\n.nav-pills > li.active > a:hover,\n.nav-pills > li.active > a:focus {\n border-top-color: #3c8dbc;\n}\n.nav-pills > li.active > a {\n font-weight: 600;\n}\n/* NAV STACKED */\n.nav-stacked > li > a {\n border-radius: 0;\n border-top: 0;\n border-left: 3px solid transparent;\n color: #444;\n}\n.nav-stacked > li.active > a,\n.nav-stacked > li.active > a:hover {\n background: transparent;\n color: #444;\n border-top: 0;\n border-left-color: #3c8dbc;\n}\n.nav-stacked > li.header {\n border-bottom: 1px solid #ddd;\n color: #777;\n margin-bottom: 10px;\n padding: 5px 10px;\n text-transform: uppercase;\n}\n/* NAV TABS */\n.nav-tabs-custom {\n margin-bottom: 20px;\n background: #fff;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n}\n.nav-tabs-custom > .nav-tabs {\n margin: 0;\n border-bottom-color: #f4f4f4;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.nav-tabs-custom > .nav-tabs > li {\n border-top: 3px solid transparent;\n margin-bottom: -2px;\n margin-right: 5px;\n}\n.nav-tabs-custom > .nav-tabs > li > a {\n color: #444;\n border-radius: 0;\n}\n.nav-tabs-custom > .nav-tabs > li > a.text-muted {\n color: #999;\n}\n.nav-tabs-custom > .nav-tabs > li > a,\n.nav-tabs-custom > .nav-tabs > li > a:hover {\n background: transparent;\n margin: 0;\n}\n.nav-tabs-custom > .nav-tabs > li > a:hover {\n color: #999;\n}\n.nav-tabs-custom > .nav-tabs > li:not(.active) > a:hover,\n.nav-tabs-custom > .nav-tabs > li:not(.active) > a:focus,\n.nav-tabs-custom > .nav-tabs > li:not(.active) > a:active {\n border-color: transparent;\n}\n.nav-tabs-custom > .nav-tabs > li.active {\n border-top-color: #3c8dbc;\n}\n.nav-tabs-custom > .nav-tabs > li.active > a,\n.nav-tabs-custom > .nav-tabs > li.active:hover > a {\n background-color: #fff;\n color: #444;\n}\n.nav-tabs-custom > .nav-tabs > li.active > a {\n border-top-color: transparent;\n border-left-color: #f4f4f4;\n border-right-color: #f4f4f4;\n}\n.nav-tabs-custom > .nav-tabs > li:first-of-type {\n margin-left: 0;\n}\n.nav-tabs-custom > .nav-tabs > li:first-of-type.active > a {\n border-left-color: transparent;\n}\n.nav-tabs-custom > .nav-tabs.pull-right {\n float: none !important;\n}\n.nav-tabs-custom > .nav-tabs.pull-right > li {\n float: right;\n}\n.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type {\n margin-right: 0;\n}\n.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type > a {\n border-left-width: 1px;\n}\n.nav-tabs-custom > .nav-tabs.pull-right > li:first-of-type.active > a {\n border-left-color: #f4f4f4;\n border-right-color: transparent;\n}\n.nav-tabs-custom > .nav-tabs > li.header {\n line-height: 35px;\n padding: 0 10px;\n font-size: 20px;\n color: #444;\n}\n.nav-tabs-custom > .nav-tabs > li.header > .fa,\n.nav-tabs-custom > .nav-tabs > li.header > .glyphicon,\n.nav-tabs-custom > .nav-tabs > li.header > .ion {\n margin-right: 5px;\n}\n.nav-tabs-custom > .tab-content {\n background: #fff;\n padding: 10px;\n border-bottom-right-radius: 3px;\n border-bottom-left-radius: 3px;\n}\n.nav-tabs-custom .dropdown.open > a:active,\n.nav-tabs-custom .dropdown.open > a:focus {\n background: transparent;\n color: #999;\n}\n.nav-tabs-custom.tab-primary > .nav-tabs > li.active {\n border-top-color: #3c8dbc;\n}\n.nav-tabs-custom.tab-info > .nav-tabs > li.active {\n border-top-color: #00c0ef;\n}\n.nav-tabs-custom.tab-danger > .nav-tabs > li.active {\n border-top-color: #dd4b39;\n}\n.nav-tabs-custom.tab-warning > .nav-tabs > li.active {\n border-top-color: #f39c12;\n}\n.nav-tabs-custom.tab-success > .nav-tabs > li.active {\n border-top-color: #00a65a;\n}\n.nav-tabs-custom.tab-default > .nav-tabs > li.active {\n border-top-color: #d2d6de;\n}\n/* PAGINATION */\n.pagination > li > a {\n background: #fafafa;\n color: #666;\n}\n.pagination.pagination-flat > li > a {\n border-radius: 0 !important;\n}\n/*\n * Component: Products List\n * ------------------------\n */\n.products-list {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.products-list > .item {\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n padding: 10px 0;\n background: #fff;\n}\n.products-list > .item:before,\n.products-list > .item:after {\n content: \" \";\n display: table;\n}\n.products-list > .item:after {\n clear: both;\n}\n.products-list .product-img {\n float: left;\n}\n.products-list .product-img img {\n width: 50px;\n height: 50px;\n}\n.products-list .product-info {\n margin-left: 60px;\n}\n.products-list .product-title {\n font-weight: 600;\n}\n.products-list .product-description {\n display: block;\n color: #999;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.product-list-in-box > .item {\n -webkit-box-shadow: none;\n box-shadow: none;\n border-radius: 0;\n border-bottom: 1px solid #f4f4f4;\n}\n.product-list-in-box > .item:last-of-type {\n border-bottom-width: 0;\n}\n/*\n * Component: Table\n * ----------------\n */\n.table > thead > tr > th,\n.table > tbody > tr > th,\n.table > tfoot > tr > th,\n.table > thead > tr > td,\n.table > tbody > tr > td,\n.table > tfoot > tr > td {\n border-top: 1px solid #f4f4f4;\n}\n.table > thead > tr > th {\n border-bottom: 2px solid #f4f4f4;\n}\n.table tr td .progress {\n margin-top: 5px;\n}\n.table-bordered {\n border: 1px solid #f4f4f4;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > tbody > tr > th,\n.table-bordered > tfoot > tr > th,\n.table-bordered > thead > tr > td,\n.table-bordered > tbody > tr > td,\n.table-bordered > tfoot > tr > td {\n border: 1px solid #f4f4f4;\n}\n.table-bordered > thead > tr > th,\n.table-bordered > thead > tr > td {\n border-bottom-width: 2px;\n}\n.table.no-border,\n.table.no-border td,\n.table.no-border th {\n border: 0;\n}\n/* .text-center in tables */\ntable.text-center,\ntable.text-center td,\ntable.text-center th {\n text-align: center;\n}\n.table.align th {\n text-align: left;\n}\n.table.align td {\n text-align: right;\n}\n/*\n * Component: Label\n * ----------------\n */\n.label-default {\n background-color: #d2d6de;\n color: #444;\n}\n/*\n * Component: Direct Chat\n * ----------------------\n */\n.direct-chat .box-body {\n border-bottom-right-radius: 0;\n border-bottom-left-radius: 0;\n position: relative;\n overflow-x: hidden;\n padding: 0;\n}\n.direct-chat.chat-pane-open .direct-chat-contacts {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.direct-chat-messages {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n padding: 10px;\n height: 250px;\n overflow: auto;\n}\n.direct-chat-msg,\n.direct-chat-text {\n display: block;\n}\n.direct-chat-msg {\n margin-bottom: 10px;\n}\n.direct-chat-msg:before,\n.direct-chat-msg:after {\n content: \" \";\n display: table;\n}\n.direct-chat-msg:after {\n clear: both;\n}\n.direct-chat-messages,\n.direct-chat-contacts {\n -webkit-transition: -webkit-transform 0.5s ease-in-out;\n -moz-transition: -moz-transform 0.5s ease-in-out;\n -o-transition: -o-transform 0.5s ease-in-out;\n transition: transform 0.5s ease-in-out;\n}\n.direct-chat-text {\n border-radius: 5px;\n position: relative;\n padding: 5px 10px;\n background: #d2d6de;\n border: 1px solid #d2d6de;\n margin: 5px 0 0 50px;\n color: #444444;\n}\n.direct-chat-text:after,\n.direct-chat-text:before {\n position: absolute;\n right: 100%;\n top: 15px;\n border: solid transparent;\n border-right-color: #d2d6de;\n content: ' ';\n height: 0;\n width: 0;\n pointer-events: none;\n}\n.direct-chat-text:after {\n border-width: 5px;\n margin-top: -5px;\n}\n.direct-chat-text:before {\n border-width: 6px;\n margin-top: -6px;\n}\n.right .direct-chat-text {\n margin-right: 50px;\n margin-left: 0;\n}\n.right .direct-chat-text:after,\n.right .direct-chat-text:before {\n right: auto;\n left: 100%;\n border-right-color: transparent;\n border-left-color: #d2d6de;\n}\n.direct-chat-img {\n border-radius: 50%;\n float: left;\n width: 40px;\n height: 40px;\n}\n.right .direct-chat-img {\n float: right;\n}\n.direct-chat-info {\n display: block;\n margin-bottom: 2px;\n font-size: 12px;\n}\n.direct-chat-name {\n font-weight: 600;\n}\n.direct-chat-timestamp {\n color: #999;\n}\n.direct-chat-contacts-open .direct-chat-contacts {\n -webkit-transform: translate(0, 0);\n -ms-transform: translate(0, 0);\n -o-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n.direct-chat-contacts {\n -webkit-transform: translate(101%, 0);\n -ms-transform: translate(101%, 0);\n -o-transform: translate(101%, 0);\n transform: translate(101%, 0);\n position: absolute;\n top: 0;\n bottom: 0;\n height: 250px;\n width: 100%;\n background: #222d32;\n color: #fff;\n overflow: auto;\n}\n.contacts-list > li {\n border-bottom: 1px solid rgba(0, 0, 0, 0.2);\n padding: 10px;\n margin: 0;\n}\n.contacts-list > li:before,\n.contacts-list > li:after {\n content: \" \";\n display: table;\n}\n.contacts-list > li:after {\n clear: both;\n}\n.contacts-list > li:last-of-type {\n border-bottom: none;\n}\n.contacts-list-img {\n border-radius: 50%;\n width: 40px;\n float: left;\n}\n.contacts-list-info {\n margin-left: 45px;\n color: #fff;\n}\n.contacts-list-name,\n.contacts-list-status {\n display: block;\n}\n.contacts-list-name {\n font-weight: 600;\n}\n.contacts-list-status {\n font-size: 12px;\n}\n.contacts-list-date {\n color: #aaa;\n font-weight: normal;\n}\n.contacts-list-msg {\n color: #999;\n}\n.direct-chat-danger .right > .direct-chat-text {\n background: #dd4b39;\n border-color: #dd4b39;\n color: #ffffff;\n}\n.direct-chat-danger .right > .direct-chat-text:after,\n.direct-chat-danger .right > .direct-chat-text:before {\n border-left-color: #dd4b39;\n}\n.direct-chat-primary .right > .direct-chat-text {\n background: #3c8dbc;\n border-color: #3c8dbc;\n color: #ffffff;\n}\n.direct-chat-primary .right > .direct-chat-text:after,\n.direct-chat-primary .right > .direct-chat-text:before {\n border-left-color: #3c8dbc;\n}\n.direct-chat-warning .right > .direct-chat-text {\n background: #f39c12;\n border-color: #f39c12;\n color: #ffffff;\n}\n.direct-chat-warning .right > .direct-chat-text:after,\n.direct-chat-warning .right > .direct-chat-text:before {\n border-left-color: #f39c12;\n}\n.direct-chat-info .right > .direct-chat-text {\n background: #00c0ef;\n border-color: #00c0ef;\n color: #ffffff;\n}\n.direct-chat-info .right > .direct-chat-text:after,\n.direct-chat-info .right > .direct-chat-text:before {\n border-left-color: #00c0ef;\n}\n.direct-chat-success .right > .direct-chat-text {\n background: #00a65a;\n border-color: #00a65a;\n color: #ffffff;\n}\n.direct-chat-success .right > .direct-chat-text:after,\n.direct-chat-success .right > .direct-chat-text:before {\n border-left-color: #00a65a;\n}\n/*\n * Component: Users List\n * ---------------------\n */\n.users-list > li {\n width: 25%;\n float: left;\n padding: 10px;\n text-align: center;\n}\n.users-list > li img {\n border-radius: 50%;\n max-width: 100%;\n height: auto;\n}\n.users-list > li > a:hover,\n.users-list > li > a:hover .users-list-name {\n color: #999;\n}\n.users-list-name,\n.users-list-date {\n display: block;\n}\n.users-list-name {\n font-weight: 600;\n color: #444;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.users-list-date {\n color: #999;\n font-size: 12px;\n}\n/*\n * Component: Carousel\n * -------------------\n */\n.carousel-control.left,\n.carousel-control.right {\n background-image: none;\n}\n.carousel-control > .fa {\n font-size: 40px;\n position: absolute;\n top: 50%;\n z-index: 5;\n display: inline-block;\n margin-top: -20px;\n}\n/*\n * Component: modal\n * ----------------\n */\n.modal {\n background: rgba(0, 0, 0, 0.3);\n}\n.modal-content {\n border-radius: 0;\n -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);\n box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);\n border: 0;\n}\n@media (min-width: 768px) {\n .modal-content {\n -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);\n box-shadow: 0 2px 3px rgba(0, 0, 0, 0.125);\n }\n}\n.modal-header {\n border-bottom-color: #f4f4f4;\n}\n.modal-footer {\n border-top-color: #f4f4f4;\n}\n.modal-primary .modal-header,\n.modal-primary .modal-footer {\n border-color: #307095;\n}\n.modal-warning .modal-header,\n.modal-warning .modal-footer {\n border-color: #c87f0a;\n}\n.modal-info .modal-header,\n.modal-info .modal-footer {\n border-color: #0097bc;\n}\n.modal-success .modal-header,\n.modal-success .modal-footer {\n border-color: #00733e;\n}\n.modal-danger .modal-header,\n.modal-danger .modal-footer {\n border-color: #c23321;\n}\n/*\n * Component: Social Widgets\n * -------------------------\n */\n.box-widget {\n border: none;\n position: relative;\n}\n.widget-user .widget-user-header {\n padding: 20px;\n height: 120px;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.widget-user .widget-user-username {\n margin-top: 0;\n margin-bottom: 5px;\n font-size: 25px;\n font-weight: 300;\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);\n}\n.widget-user .widget-user-desc {\n margin-top: 0;\n}\n.widget-user .widget-user-image {\n position: absolute;\n top: 65px;\n left: 50%;\n margin-left: -45px;\n}\n.widget-user .widget-user-image > img {\n width: 90px;\n height: auto;\n border: 3px solid #fff;\n}\n.widget-user .box-footer {\n padding-top: 30px;\n}\n.widget-user-2 .widget-user-header {\n padding: 20px;\n border-top-right-radius: 3px;\n border-top-left-radius: 3px;\n}\n.widget-user-2 .widget-user-username {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: 25px;\n font-weight: 300;\n}\n.widget-user-2 .widget-user-desc {\n margin-top: 0;\n}\n.widget-user-2 .widget-user-username,\n.widget-user-2 .widget-user-desc {\n margin-left: 75px;\n}\n.widget-user-2 .widget-user-image > img {\n width: 65px;\n height: auto;\n float: left;\n}\n/*\n * Page: Mailbox\n * -------------\n */\n.mailbox-messages > .table {\n margin: 0;\n}\n.mailbox-controls {\n padding: 5px;\n}\n.mailbox-controls.with-border {\n border-bottom: 1px solid #f4f4f4;\n}\n.mailbox-read-info {\n border-bottom: 1px solid #f4f4f4;\n padding: 10px;\n}\n.mailbox-read-info h3 {\n font-size: 20px;\n margin: 0;\n}\n.mailbox-read-info h5 {\n margin: 0;\n padding: 5px 0 0 0;\n}\n.mailbox-read-time {\n color: #999;\n font-size: 13px;\n}\n.mailbox-read-message {\n padding: 10px;\n}\n.mailbox-attachments li {\n float: left;\n width: 200px;\n border: 1px solid #eee;\n margin-bottom: 10px;\n margin-right: 10px;\n}\n.mailbox-attachment-name {\n font-weight: bold;\n color: #666;\n}\n.mailbox-attachment-icon,\n.mailbox-attachment-info,\n.mailbox-attachment-size {\n display: block;\n}\n.mailbox-attachment-info {\n padding: 10px;\n background: #f4f4f4;\n}\n.mailbox-attachment-size {\n color: #999;\n font-size: 12px;\n}\n.mailbox-attachment-icon {\n text-align: center;\n font-size: 65px;\n color: #666;\n padding: 20px 10px;\n}\n.mailbox-attachment-icon.has-img {\n padding: 0;\n}\n.mailbox-attachment-icon.has-img > img {\n max-width: 100%;\n height: auto;\n}\n/*\n * Page: Lock Screen\n * -----------------\n */\n/* ADD THIS CLASS TO THE TAG */\n.lockscreen {\n background: #d2d6de;\n}\n.lockscreen-logo {\n font-size: 35px;\n text-align: center;\n margin-bottom: 25px;\n font-weight: 300;\n}\n.lockscreen-logo a {\n color: #444;\n}\n.lockscreen-wrapper {\n max-width: 400px;\n margin: 0 auto;\n margin-top: 10%;\n}\n/* User name [optional] */\n.lockscreen .lockscreen-name {\n text-align: center;\n font-weight: 600;\n}\n/* Will contain the image and the sign in form */\n.lockscreen-item {\n border-radius: 4px;\n padding: 0;\n background: #fff;\n position: relative;\n margin: 10px auto 30px auto;\n width: 290px;\n}\n/* User image */\n.lockscreen-image {\n border-radius: 50%;\n position: absolute;\n left: -10px;\n top: -25px;\n background: #fff;\n padding: 5px;\n z-index: 10;\n}\n.lockscreen-image > img {\n border-radius: 50%;\n width: 70px;\n height: 70px;\n}\n/* Contains the password input and the login button */\n.lockscreen-credentials {\n margin-left: 70px;\n}\n.lockscreen-credentials .form-control {\n border: 0;\n}\n.lockscreen-credentials .btn {\n background-color: #fff;\n border: 0;\n padding: 0 10px;\n}\n.lockscreen-footer {\n margin-top: 10px;\n}\n/*\n * Page: Login & Register\n * ----------------------\n */\n.login-logo,\n.register-logo {\n font-size: 35px;\n text-align: center;\n margin-bottom: 25px;\n font-weight: 300;\n}\n.login-logo a,\n.register-logo a {\n color: #444;\n}\n.login-page,\n.register-page {\n background: #d2d6de;\n}\n.login-box,\n.register-box {\n width: 360px;\n margin: 7% auto;\n}\n@media (max-width: 768px) {\n .login-box,\n .register-box {\n width: 90%;\n margin-top: 20px;\n }\n}\n.login-box-body,\n.register-box-body {\n background: #fff;\n padding: 20px;\n border-top: 0;\n color: #666;\n}\n.login-box-body .form-control-feedback,\n.register-box-body .form-control-feedback {\n color: #777;\n}\n.login-box-msg,\n.register-box-msg {\n margin: 0;\n text-align: center;\n padding: 0 20px 20px 20px;\n}\n.social-auth-links {\n margin: 10px 0;\n}\n/*\n * Page: 400 and 500 error pages\n * ------------------------------\n */\n.error-page {\n width: 600px;\n margin: 20px auto 0 auto;\n}\n@media (max-width: 991px) {\n .error-page {\n width: 100%;\n }\n}\n.error-page > .headline {\n float: left;\n font-size: 100px;\n font-weight: 300;\n}\n@media (max-width: 991px) {\n .error-page > .headline {\n float: none;\n text-align: center;\n }\n}\n.error-page > .error-content {\n margin-left: 190px;\n display: block;\n}\n@media (max-width: 991px) {\n .error-page > .error-content {\n margin-left: 0;\n }\n}\n.error-page > .error-content > h3 {\n font-weight: 300;\n font-size: 25px;\n}\n@media (max-width: 991px) {\n .error-page > .error-content > h3 {\n text-align: center;\n }\n}\n/*\n * Page: Invoice\n * -------------\n */\n.invoice {\n position: relative;\n background: #fff;\n border: 1px solid #f4f4f4;\n padding: 20px;\n margin: 10px 25px;\n}\n.invoice-title {\n margin-top: 0;\n}\n/*\n * Page: Profile\n * -------------\n */\n.profile-user-img {\n margin: 0 auto;\n width: 100px;\n padding: 3px;\n border: 3px solid #d2d6de;\n}\n.profile-username {\n font-size: 21px;\n margin-top: 5px;\n}\n.post {\n border-bottom: 1px solid #d2d6de;\n margin-bottom: 15px;\n padding-bottom: 15px;\n color: #666;\n}\n.post:last-of-type {\n border-bottom: 0;\n margin-bottom: 0;\n padding-bottom: 0;\n}\n.post .user-block {\n margin-bottom: 15px;\n}\n/*\n * Social Buttons for Bootstrap\n *\n * Copyright 2013-2015 Panayiotis Lipiridis\n * Licensed under the MIT License\n *\n * https://github.com/lipis/bootstrap-social\n */\n.btn-social {\n position: relative;\n padding-left: 44px;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.btn-social > :first-child {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 32px;\n line-height: 34px;\n font-size: 1.6em;\n text-align: center;\n border-right: 1px solid rgba(0, 0, 0, 0.2);\n}\n.btn-social.btn-lg {\n padding-left: 61px;\n}\n.btn-social.btn-lg > :first-child {\n line-height: 45px;\n width: 45px;\n font-size: 1.8em;\n}\n.btn-social.btn-sm {\n padding-left: 38px;\n}\n.btn-social.btn-sm > :first-child {\n line-height: 28px;\n width: 28px;\n font-size: 1.4em;\n}\n.btn-social.btn-xs {\n padding-left: 30px;\n}\n.btn-social.btn-xs > :first-child {\n line-height: 20px;\n width: 20px;\n font-size: 1.2em;\n}\n.btn-social-icon {\n position: relative;\n padding-left: 44px;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n height: 34px;\n width: 34px;\n padding: 0;\n}\n.btn-social-icon > :first-child {\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 32px;\n line-height: 34px;\n font-size: 1.6em;\n text-align: center;\n border-right: 1px solid rgba(0, 0, 0, 0.2);\n}\n.btn-social-icon.btn-lg {\n padding-left: 61px;\n}\n.btn-social-icon.btn-lg > :first-child {\n line-height: 45px;\n width: 45px;\n font-size: 1.8em;\n}\n.btn-social-icon.btn-sm {\n padding-left: 38px;\n}\n.btn-social-icon.btn-sm > :first-child {\n line-height: 28px;\n width: 28px;\n font-size: 1.4em;\n}\n.btn-social-icon.btn-xs {\n padding-left: 30px;\n}\n.btn-social-icon.btn-xs > :first-child {\n line-height: 20px;\n width: 20px;\n font-size: 1.2em;\n}\n.btn-social-icon > :first-child {\n border: none;\n text-align: center;\n width: 100%;\n}\n.btn-social-icon.btn-lg {\n height: 45px;\n width: 45px;\n padding-left: 0;\n padding-right: 0;\n}\n.btn-social-icon.btn-sm {\n height: 30px;\n width: 30px;\n padding-left: 0;\n padding-right: 0;\n}\n.btn-social-icon.btn-xs {\n height: 22px;\n width: 22px;\n padding-left: 0;\n padding-right: 0;\n}\n.btn-adn {\n color: #ffffff;\n background-color: #d87a68;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-adn:focus,\n.btn-adn.focus {\n color: #ffffff;\n background-color: #ce563f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-adn:hover {\n color: #ffffff;\n background-color: #ce563f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-adn:active,\n.btn-adn.active,\n.open > .dropdown-toggle.btn-adn {\n color: #ffffff;\n background-color: #ce563f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-adn:active,\n.btn-adn.active,\n.open > .dropdown-toggle.btn-adn {\n background-image: none;\n}\n.btn-adn .badge {\n color: #d87a68;\n background-color: #ffffff;\n}\n.btn-bitbucket {\n color: #ffffff;\n background-color: #205081;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-bitbucket:focus,\n.btn-bitbucket.focus {\n color: #ffffff;\n background-color: #163758;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-bitbucket:hover {\n color: #ffffff;\n background-color: #163758;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-bitbucket:active,\n.btn-bitbucket.active,\n.open > .dropdown-toggle.btn-bitbucket {\n color: #ffffff;\n background-color: #163758;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-bitbucket:active,\n.btn-bitbucket.active,\n.open > .dropdown-toggle.btn-bitbucket {\n background-image: none;\n}\n.btn-bitbucket .badge {\n color: #205081;\n background-color: #ffffff;\n}\n.btn-dropbox {\n color: #ffffff;\n background-color: #1087dd;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-dropbox:focus,\n.btn-dropbox.focus {\n color: #ffffff;\n background-color: #0d6aad;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-dropbox:hover {\n color: #ffffff;\n background-color: #0d6aad;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-dropbox:active,\n.btn-dropbox.active,\n.open > .dropdown-toggle.btn-dropbox {\n color: #ffffff;\n background-color: #0d6aad;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-dropbox:active,\n.btn-dropbox.active,\n.open > .dropdown-toggle.btn-dropbox {\n background-image: none;\n}\n.btn-dropbox .badge {\n color: #1087dd;\n background-color: #ffffff;\n}\n.btn-facebook {\n color: #ffffff;\n background-color: #3b5998;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-facebook:focus,\n.btn-facebook.focus {\n color: #ffffff;\n background-color: #2d4373;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-facebook:hover {\n color: #ffffff;\n background-color: #2d4373;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-facebook:active,\n.btn-facebook.active,\n.open > .dropdown-toggle.btn-facebook {\n color: #ffffff;\n background-color: #2d4373;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-facebook:active,\n.btn-facebook.active,\n.open > .dropdown-toggle.btn-facebook {\n background-image: none;\n}\n.btn-facebook .badge {\n color: #3b5998;\n background-color: #ffffff;\n}\n.btn-flickr {\n color: #ffffff;\n background-color: #ff0084;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-flickr:focus,\n.btn-flickr.focus {\n color: #ffffff;\n background-color: #cc006a;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-flickr:hover {\n color: #ffffff;\n background-color: #cc006a;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-flickr:active,\n.btn-flickr.active,\n.open > .dropdown-toggle.btn-flickr {\n color: #ffffff;\n background-color: #cc006a;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-flickr:active,\n.btn-flickr.active,\n.open > .dropdown-toggle.btn-flickr {\n background-image: none;\n}\n.btn-flickr .badge {\n color: #ff0084;\n background-color: #ffffff;\n}\n.btn-foursquare {\n color: #ffffff;\n background-color: #f94877;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-foursquare:focus,\n.btn-foursquare.focus {\n color: #ffffff;\n background-color: #f71752;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-foursquare:hover {\n color: #ffffff;\n background-color: #f71752;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-foursquare:active,\n.btn-foursquare.active,\n.open > .dropdown-toggle.btn-foursquare {\n color: #ffffff;\n background-color: #f71752;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-foursquare:active,\n.btn-foursquare.active,\n.open > .dropdown-toggle.btn-foursquare {\n background-image: none;\n}\n.btn-foursquare .badge {\n color: #f94877;\n background-color: #ffffff;\n}\n.btn-github {\n color: #ffffff;\n background-color: #444444;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-github:focus,\n.btn-github.focus {\n color: #ffffff;\n background-color: #2b2b2b;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-github:hover {\n color: #ffffff;\n background-color: #2b2b2b;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-github:active,\n.btn-github.active,\n.open > .dropdown-toggle.btn-github {\n color: #ffffff;\n background-color: #2b2b2b;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-github:active,\n.btn-github.active,\n.open > .dropdown-toggle.btn-github {\n background-image: none;\n}\n.btn-github .badge {\n color: #444444;\n background-color: #ffffff;\n}\n.btn-google {\n color: #ffffff;\n background-color: #dd4b39;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-google:focus,\n.btn-google.focus {\n color: #ffffff;\n background-color: #c23321;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-google:hover {\n color: #ffffff;\n background-color: #c23321;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-google:active,\n.btn-google.active,\n.open > .dropdown-toggle.btn-google {\n color: #ffffff;\n background-color: #c23321;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-google:active,\n.btn-google.active,\n.open > .dropdown-toggle.btn-google {\n background-image: none;\n}\n.btn-google .badge {\n color: #dd4b39;\n background-color: #ffffff;\n}\n.btn-instagram {\n color: #ffffff;\n background-color: #3f729b;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-instagram:focus,\n.btn-instagram.focus {\n color: #ffffff;\n background-color: #305777;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-instagram:hover {\n color: #ffffff;\n background-color: #305777;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-instagram:active,\n.btn-instagram.active,\n.open > .dropdown-toggle.btn-instagram {\n color: #ffffff;\n background-color: #305777;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-instagram:active,\n.btn-instagram.active,\n.open > .dropdown-toggle.btn-instagram {\n background-image: none;\n}\n.btn-instagram .badge {\n color: #3f729b;\n background-color: #ffffff;\n}\n.btn-linkedin {\n color: #ffffff;\n background-color: #007bb6;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-linkedin:focus,\n.btn-linkedin.focus {\n color: #ffffff;\n background-color: #005983;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-linkedin:hover {\n color: #ffffff;\n background-color: #005983;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-linkedin:active,\n.btn-linkedin.active,\n.open > .dropdown-toggle.btn-linkedin {\n color: #ffffff;\n background-color: #005983;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-linkedin:active,\n.btn-linkedin.active,\n.open > .dropdown-toggle.btn-linkedin {\n background-image: none;\n}\n.btn-linkedin .badge {\n color: #007bb6;\n background-color: #ffffff;\n}\n.btn-microsoft {\n color: #ffffff;\n background-color: #2672ec;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-microsoft:focus,\n.btn-microsoft.focus {\n color: #ffffff;\n background-color: #125acd;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-microsoft:hover {\n color: #ffffff;\n background-color: #125acd;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-microsoft:active,\n.btn-microsoft.active,\n.open > .dropdown-toggle.btn-microsoft {\n color: #ffffff;\n background-color: #125acd;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-microsoft:active,\n.btn-microsoft.active,\n.open > .dropdown-toggle.btn-microsoft {\n background-image: none;\n}\n.btn-microsoft .badge {\n color: #2672ec;\n background-color: #ffffff;\n}\n.btn-openid {\n color: #ffffff;\n background-color: #f7931e;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-openid:focus,\n.btn-openid.focus {\n color: #ffffff;\n background-color: #da7908;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-openid:hover {\n color: #ffffff;\n background-color: #da7908;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-openid:active,\n.btn-openid.active,\n.open > .dropdown-toggle.btn-openid {\n color: #ffffff;\n background-color: #da7908;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-openid:active,\n.btn-openid.active,\n.open > .dropdown-toggle.btn-openid {\n background-image: none;\n}\n.btn-openid .badge {\n color: #f7931e;\n background-color: #ffffff;\n}\n.btn-pinterest {\n color: #ffffff;\n background-color: #cb2027;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-pinterest:focus,\n.btn-pinterest.focus {\n color: #ffffff;\n background-color: #9f191f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-pinterest:hover {\n color: #ffffff;\n background-color: #9f191f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-pinterest:active,\n.btn-pinterest.active,\n.open > .dropdown-toggle.btn-pinterest {\n color: #ffffff;\n background-color: #9f191f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-pinterest:active,\n.btn-pinterest.active,\n.open > .dropdown-toggle.btn-pinterest {\n background-image: none;\n}\n.btn-pinterest .badge {\n color: #cb2027;\n background-color: #ffffff;\n}\n.btn-reddit {\n color: #000000;\n background-color: #eff7ff;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-reddit:focus,\n.btn-reddit.focus {\n color: #000000;\n background-color: #bcddff;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-reddit:hover {\n color: #000000;\n background-color: #bcddff;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-reddit:active,\n.btn-reddit.active,\n.open > .dropdown-toggle.btn-reddit {\n color: #000000;\n background-color: #bcddff;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-reddit:active,\n.btn-reddit.active,\n.open > .dropdown-toggle.btn-reddit {\n background-image: none;\n}\n.btn-reddit .badge {\n color: #eff7ff;\n background-color: #000000;\n}\n.btn-soundcloud {\n color: #ffffff;\n background-color: #ff5500;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-soundcloud:focus,\n.btn-soundcloud.focus {\n color: #ffffff;\n background-color: #cc4400;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-soundcloud:hover {\n color: #ffffff;\n background-color: #cc4400;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-soundcloud:active,\n.btn-soundcloud.active,\n.open > .dropdown-toggle.btn-soundcloud {\n color: #ffffff;\n background-color: #cc4400;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-soundcloud:active,\n.btn-soundcloud.active,\n.open > .dropdown-toggle.btn-soundcloud {\n background-image: none;\n}\n.btn-soundcloud .badge {\n color: #ff5500;\n background-color: #ffffff;\n}\n.btn-tumblr {\n color: #ffffff;\n background-color: #2c4762;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-tumblr:focus,\n.btn-tumblr.focus {\n color: #ffffff;\n background-color: #1c2d3f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-tumblr:hover {\n color: #ffffff;\n background-color: #1c2d3f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-tumblr:active,\n.btn-tumblr.active,\n.open > .dropdown-toggle.btn-tumblr {\n color: #ffffff;\n background-color: #1c2d3f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-tumblr:active,\n.btn-tumblr.active,\n.open > .dropdown-toggle.btn-tumblr {\n background-image: none;\n}\n.btn-tumblr .badge {\n color: #2c4762;\n background-color: #ffffff;\n}\n.btn-twitter {\n color: #ffffff;\n background-color: #55acee;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-twitter:focus,\n.btn-twitter.focus {\n color: #ffffff;\n background-color: #2795e9;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-twitter:hover {\n color: #ffffff;\n background-color: #2795e9;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-twitter:active,\n.btn-twitter.active,\n.open > .dropdown-toggle.btn-twitter {\n color: #ffffff;\n background-color: #2795e9;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-twitter:active,\n.btn-twitter.active,\n.open > .dropdown-toggle.btn-twitter {\n background-image: none;\n}\n.btn-twitter .badge {\n color: #55acee;\n background-color: #ffffff;\n}\n.btn-vimeo {\n color: #ffffff;\n background-color: #1ab7ea;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vimeo:focus,\n.btn-vimeo.focus {\n color: #ffffff;\n background-color: #1295bf;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vimeo:hover {\n color: #ffffff;\n background-color: #1295bf;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vimeo:active,\n.btn-vimeo.active,\n.open > .dropdown-toggle.btn-vimeo {\n color: #ffffff;\n background-color: #1295bf;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vimeo:active,\n.btn-vimeo.active,\n.open > .dropdown-toggle.btn-vimeo {\n background-image: none;\n}\n.btn-vimeo .badge {\n color: #1ab7ea;\n background-color: #ffffff;\n}\n.btn-vk {\n color: #ffffff;\n background-color: #587ea3;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vk:focus,\n.btn-vk.focus {\n color: #ffffff;\n background-color: #466482;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vk:hover {\n color: #ffffff;\n background-color: #466482;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vk:active,\n.btn-vk.active,\n.open > .dropdown-toggle.btn-vk {\n color: #ffffff;\n background-color: #466482;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-vk:active,\n.btn-vk.active,\n.open > .dropdown-toggle.btn-vk {\n background-image: none;\n}\n.btn-vk .badge {\n color: #587ea3;\n background-color: #ffffff;\n}\n.btn-yahoo {\n color: #ffffff;\n background-color: #720e9e;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-yahoo:focus,\n.btn-yahoo.focus {\n color: #ffffff;\n background-color: #500a6f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-yahoo:hover {\n color: #ffffff;\n background-color: #500a6f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-yahoo:active,\n.btn-yahoo.active,\n.open > .dropdown-toggle.btn-yahoo {\n color: #ffffff;\n background-color: #500a6f;\n border-color: rgba(0, 0, 0, 0.2);\n}\n.btn-yahoo:active,\n.btn-yahoo.active,\n.open > .dropdown-toggle.btn-yahoo {\n background-image: none;\n}\n.btn-yahoo .badge {\n color: #720e9e;\n background-color: #ffffff;\n}\n/*\n * Plugin: Full Calendar\n * ---------------------\n */\n.fc-button {\n background: #f4f4f4;\n background-image: none;\n color: #444;\n border-color: #ddd;\n border-bottom-color: #ddd;\n}\n.fc-button:hover,\n.fc-button:active,\n.fc-button.hover {\n background-color: #e9e9e9;\n}\n.fc-header-title h2 {\n font-size: 15px;\n line-height: 1.6em;\n color: #666;\n margin-left: 10px;\n}\n.fc-header-right {\n padding-right: 10px;\n}\n.fc-header-left {\n padding-left: 10px;\n}\n.fc-widget-header {\n background: #fafafa;\n}\n.fc-grid {\n width: 100%;\n border: 0;\n}\n.fc-widget-header:first-of-type,\n.fc-widget-content:first-of-type {\n border-left: 0;\n border-right: 0;\n}\n.fc-widget-header:last-of-type,\n.fc-widget-content:last-of-type {\n border-right: 0;\n}\n.fc-toolbar {\n padding: 10px;\n margin: 0;\n}\n.fc-day-number {\n font-size: 20px;\n font-weight: 300;\n padding-right: 10px;\n}\n.fc-color-picker {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.fc-color-picker > li {\n float: left;\n font-size: 30px;\n margin-right: 5px;\n line-height: 30px;\n}\n.fc-color-picker > li .fa {\n -webkit-transition: -webkit-transform linear 0.3s;\n -moz-transition: -moz-transform linear 0.3s;\n -o-transition: -o-transform linear 0.3s;\n transition: transform linear 0.3s;\n}\n.fc-color-picker > li .fa:hover {\n -webkit-transform: rotate(30deg);\n -ms-transform: rotate(30deg);\n -o-transform: rotate(30deg);\n transform: rotate(30deg);\n}\n#add-new-event {\n -webkit-transition: all linear 0.3s;\n -o-transition: all linear 0.3s;\n transition: all linear 0.3s;\n}\n.external-event {\n padding: 5px 10px;\n font-weight: bold;\n margin-bottom: 4px;\n box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);\n border-radius: 3px;\n cursor: move;\n}\n.external-event:hover {\n box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.2);\n}\n/*\n * Plugin: Select2\n * ---------------\n */\n.select2-container--default.select2-container--focus,\n.select2-selection.select2-container--focus,\n.select2-container--default:focus,\n.select2-selection:focus,\n.select2-container--default:active,\n.select2-selection:active {\n outline: none;\n}\n.select2-container--default .select2-selection--single,\n.select2-selection .select2-selection--single {\n border: 1px solid #d2d6de;\n border-radius: 0;\n padding: 6px 12px;\n height: 34px;\n}\n.select2-container--default.select2-container--open {\n border-color: #3c8dbc;\n}\n.select2-dropdown {\n border: 1px solid #d2d6de;\n border-radius: 0;\n}\n.select2-container--default .select2-results__option--highlighted[aria-selected] {\n background-color: #3c8dbc;\n color: white;\n}\n.select2-results__option {\n padding: 6px 12px;\n user-select: none;\n -webkit-user-select: none;\n}\n.select2-container .select2-selection--single .select2-selection__rendered {\n padding-left: 0;\n padding-right: 0;\n height: auto;\n margin-top: -4px;\n}\n.select2-container[dir=\"rtl\"] .select2-selection--single .select2-selection__rendered {\n padding-right: 6px;\n padding-left: 20px;\n}\n.select2-container--default .select2-selection--single .select2-selection__arrow {\n height: 28px;\n right: 3px;\n}\n.select2-container--default .select2-selection--single .select2-selection__arrow b {\n margin-top: 0;\n}\n.select2-dropdown .select2-search__field,\n.select2-search--inline .select2-search__field {\n border: 1px solid #d2d6de;\n}\n.select2-dropdown .select2-search__field:focus,\n.select2-search--inline .select2-search__field:focus {\n outline: none;\n border: 1px solid #3c8dbc;\n}\n.select2-container--default .select2-results__option[aria-disabled=true] {\n color: #999;\n}\n.select2-container--default .select2-results__option[aria-selected=true] {\n background-color: #ddd;\n}\n.select2-container--default .select2-results__option[aria-selected=true],\n.select2-container--default .select2-results__option[aria-selected=true]:hover {\n color: #444;\n}\n.select2-container--default .select2-selection--multiple {\n border: 1px solid #d2d6de;\n border-radius: 0;\n}\n.select2-container--default .select2-selection--multiple:focus {\n border-color: #3c8dbc;\n}\n.select2-container--default.select2-container--focus .select2-selection--multiple {\n border-color: #d2d6de;\n}\n.select2-container--default .select2-selection--multiple .select2-selection__choice {\n background-color: #3c8dbc;\n border-color: #367fa9;\n padding: 1px 10px;\n color: #fff;\n}\n.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {\n margin-right: 5px;\n color: rgba(255, 255, 255, 0.7);\n}\n.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {\n color: #fff;\n}\n.select2-container .select2-selection--single .select2-selection__rendered {\n padding-right: 10px;\n}\n/*\n * General: Miscellaneous\n * ----------------------\n */\n.pad {\n padding: 10px;\n}\n.margin {\n margin: 10px;\n}\n.margin-bottom {\n margin-bottom: 20px;\n}\n.margin-bottom-none {\n margin-bottom: 0;\n}\n.margin-r-5 {\n margin-right: 5px;\n}\n.inline {\n display: inline;\n}\n.description-block {\n display: block;\n margin: 10px 0;\n text-align: center;\n}\n.description-block.margin-bottom {\n margin-bottom: 25px;\n}\n.description-block > .description-header {\n margin: 0;\n padding: 0;\n font-weight: 600;\n font-size: 16px;\n}\n.description-block > .description-text {\n text-transform: uppercase;\n}\n.bg-red,\n.bg-yellow,\n.bg-aqua,\n.bg-blue,\n.bg-light-blue,\n.bg-green,\n.bg-navy,\n.bg-teal,\n.bg-olive,\n.bg-lime,\n.bg-orange,\n.bg-fuchsia,\n.bg-purple,\n.bg-maroon,\n.bg-black,\n.bg-red-active,\n.bg-yellow-active,\n.bg-aqua-active,\n.bg-blue-active,\n.bg-light-blue-active,\n.bg-green-active,\n.bg-navy-active,\n.bg-teal-active,\n.bg-olive-active,\n.bg-lime-active,\n.bg-orange-active,\n.bg-fuchsia-active,\n.bg-purple-active,\n.bg-maroon-active,\n.bg-black-active,\n.callout.callout-danger,\n.callout.callout-warning,\n.callout.callout-info,\n.callout.callout-success,\n.alert-success,\n.alert-danger,\n.alert-error,\n.alert-warning,\n.alert-info,\n.label-danger,\n.label-info,\n.label-warning,\n.label-primary,\n.label-success,\n.modal-primary .modal-body,\n.modal-primary .modal-header,\n.modal-primary .modal-footer,\n.modal-warning .modal-body,\n.modal-warning .modal-header,\n.modal-warning .modal-footer,\n.modal-info .modal-body,\n.modal-info .modal-header,\n.modal-info .modal-footer,\n.modal-success .modal-body,\n.modal-success .modal-header,\n.modal-success .modal-footer,\n.modal-danger .modal-body,\n.modal-danger .modal-header,\n.modal-danger .modal-footer {\n color: #fff !important;\n}\n.bg-gray {\n color: #000;\n background-color: #d2d6de !important;\n}\n.bg-gray-light {\n background-color: #f7f7f7;\n}\n.bg-black {\n background-color: #111111 !important;\n}\n.bg-red,\n.callout.callout-danger,\n.alert-danger,\n.alert-error,\n.label-danger,\n.modal-danger .modal-body {\n background-color: #dd4b39 !important;\n}\n.bg-yellow,\n.callout.callout-warning,\n.alert-warning,\n.label-warning,\n.modal-warning .modal-body {\n background-color: #f39c12 !important;\n}\n.bg-aqua,\n.callout.callout-info,\n.alert-info,\n.label-info,\n.modal-info .modal-body {\n background-color: #00c0ef !important;\n}\n.bg-blue {\n background-color: #0073b7 !important;\n}\n.bg-light-blue,\n.label-primary,\n.modal-primary .modal-body {\n background-color: #3c8dbc !important;\n}\n.bg-green,\n.callout.callout-success,\n.alert-success,\n.label-success,\n.modal-success .modal-body {\n background-color: #00a65a !important;\n}\n.bg-navy {\n background-color: #001f3f !important;\n}\n.bg-teal {\n background-color: #39cccc !important;\n}\n.bg-olive {\n background-color: #3d9970 !important;\n}\n.bg-lime {\n background-color: #01ff70 !important;\n}\n.bg-orange {\n background-color: #ff851b !important;\n}\n.bg-fuchsia {\n background-color: #f012be !important;\n}\n.bg-purple {\n background-color: #605ca8 !important;\n}\n.bg-maroon {\n background-color: #d81b60 !important;\n}\n.bg-gray-active {\n color: #000;\n background-color: #b5bbc8 !important;\n}\n.bg-black-active {\n background-color: #000000 !important;\n}\n.bg-red-active,\n.modal-danger .modal-header,\n.modal-danger .modal-footer {\n background-color: #d33724 !important;\n}\n.bg-yellow-active,\n.modal-warning .modal-header,\n.modal-warning .modal-footer {\n background-color: #db8b0b !important;\n}\n.bg-aqua-active,\n.modal-info .modal-header,\n.modal-info .modal-footer {\n background-color: #00a7d0 !important;\n}\n.bg-blue-active {\n background-color: #005384 !important;\n}\n.bg-light-blue-active,\n.modal-primary .modal-header,\n.modal-primary .modal-footer {\n background-color: #357ca5 !important;\n}\n.bg-green-active,\n.modal-success .modal-header,\n.modal-success .modal-footer {\n background-color: #008d4c !important;\n}\n.bg-navy-active {\n background-color: #001a35 !important;\n}\n.bg-teal-active {\n background-color: #30bbbb !important;\n}\n.bg-olive-active {\n background-color: #368763 !important;\n}\n.bg-lime-active {\n background-color: #00e765 !important;\n}\n.bg-orange-active {\n background-color: #ff7701 !important;\n}\n.bg-fuchsia-active {\n background-color: #db0ead !important;\n}\n.bg-purple-active {\n background-color: #555299 !important;\n}\n.bg-maroon-active {\n background-color: #ca195a !important;\n}\n[class^=\"bg-\"].disabled {\n opacity: 0.65;\n filter: alpha(opacity=65);\n}\n.text-red {\n color: #dd4b39 !important;\n}\n.text-yellow {\n color: #f39c12 !important;\n}\n.text-aqua {\n color: #00c0ef !important;\n}\n.text-blue {\n color: #0073b7 !important;\n}\n.text-black {\n color: #111111 !important;\n}\n.text-light-blue {\n color: #3c8dbc !important;\n}\n.text-green {\n color: #00a65a !important;\n}\n.text-gray {\n color: #d2d6de !important;\n}\n.text-navy {\n color: #001f3f !important;\n}\n.text-teal {\n color: #39cccc !important;\n}\n.text-olive {\n color: #3d9970 !important;\n}\n.text-lime {\n color: #01ff70 !important;\n}\n.text-orange {\n color: #ff851b !important;\n}\n.text-fuchsia {\n color: #f012be !important;\n}\n.text-purple {\n color: #605ca8 !important;\n}\n.text-maroon {\n color: #d81b60 !important;\n}\n.link-muted {\n color: #7a869d;\n}\n.link-muted:hover,\n.link-muted:focus {\n color: #606c84;\n}\n.link-black {\n color: #666;\n}\n.link-black:hover,\n.link-black:focus {\n color: #999;\n}\n.hide {\n display: none !important;\n}\n.no-border {\n border: 0 !important;\n}\n.no-padding {\n padding: 0 !important;\n}\n.no-margin {\n margin: 0 !important;\n}\n.no-shadow {\n box-shadow: none !important;\n}\n.list-unstyled,\n.chart-legend,\n.contacts-list,\n.users-list,\n.mailbox-attachments {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n.list-group-unbordered > .list-group-item {\n border-left: 0;\n border-right: 0;\n border-radius: 0;\n padding-left: 0;\n padding-right: 0;\n}\n.flat {\n border-radius: 0 !important;\n}\n.text-bold,\n.text-bold.table td,\n.text-bold.table th {\n font-weight: 700;\n}\n.text-sm {\n font-size: 12px;\n}\n.jqstooltip {\n padding: 5px !important;\n width: auto !important;\n height: auto !important;\n}\n.bg-teal-gradient {\n background: #39cccc !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #39cccc), color-stop(1, #7adddd)) !important;\n background: -ms-linear-gradient(bottom, #39cccc, #7adddd) !important;\n background: -moz-linear-gradient(center bottom, #39cccc 0%, #7adddd 100%) !important;\n background: -o-linear-gradient(#7adddd, #39cccc) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7adddd', endColorstr='#39cccc', GradientType=0) !important;\n color: #fff;\n}\n.bg-light-blue-gradient {\n background: #3c8dbc !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #3c8dbc), color-stop(1, #67a8ce)) !important;\n background: -ms-linear-gradient(bottom, #3c8dbc, #67a8ce) !important;\n background: -moz-linear-gradient(center bottom, #3c8dbc 0%, #67a8ce 100%) !important;\n background: -o-linear-gradient(#67a8ce, #3c8dbc) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#67a8ce', endColorstr='#3c8dbc', GradientType=0) !important;\n color: #fff;\n}\n.bg-blue-gradient {\n background: #0073b7 !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #0073b7), color-stop(1, #0089db)) !important;\n background: -ms-linear-gradient(bottom, #0073b7, #0089db) !important;\n background: -moz-linear-gradient(center bottom, #0073b7 0%, #0089db 100%) !important;\n background: -o-linear-gradient(#0089db, #0073b7) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0089db', endColorstr='#0073b7', GradientType=0) !important;\n color: #fff;\n}\n.bg-aqua-gradient {\n background: #00c0ef !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00c0ef), color-stop(1, #14d1ff)) !important;\n background: -ms-linear-gradient(bottom, #00c0ef, #14d1ff) !important;\n background: -moz-linear-gradient(center bottom, #00c0ef 0%, #14d1ff 100%) !important;\n background: -o-linear-gradient(#14d1ff, #00c0ef) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#14d1ff', endColorstr='#00c0ef', GradientType=0) !important;\n color: #fff;\n}\n.bg-yellow-gradient {\n background: #f39c12 !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #f39c12), color-stop(1, #f7bc60)) !important;\n background: -ms-linear-gradient(bottom, #f39c12, #f7bc60) !important;\n background: -moz-linear-gradient(center bottom, #f39c12 0%, #f7bc60 100%) !important;\n background: -o-linear-gradient(#f7bc60, #f39c12) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7bc60', endColorstr='#f39c12', GradientType=0) !important;\n color: #fff;\n}\n.bg-purple-gradient {\n background: #605ca8 !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #605ca8), color-stop(1, #9491c4)) !important;\n background: -ms-linear-gradient(bottom, #605ca8, #9491c4) !important;\n background: -moz-linear-gradient(center bottom, #605ca8 0%, #9491c4 100%) !important;\n background: -o-linear-gradient(#9491c4, #605ca8) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#9491c4', endColorstr='#605ca8', GradientType=0) !important;\n color: #fff;\n}\n.bg-green-gradient {\n background: #00a65a !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #00a65a), color-stop(1, #00ca6d)) !important;\n background: -ms-linear-gradient(bottom, #00a65a, #00ca6d) !important;\n background: -moz-linear-gradient(center bottom, #00a65a 0%, #00ca6d 100%) !important;\n background: -o-linear-gradient(#00ca6d, #00a65a) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ca6d', endColorstr='#00a65a', GradientType=0) !important;\n color: #fff;\n}\n.bg-red-gradient {\n background: #dd4b39 !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #dd4b39), color-stop(1, #e47365)) !important;\n background: -ms-linear-gradient(bottom, #dd4b39, #e47365) !important;\n background: -moz-linear-gradient(center bottom, #dd4b39 0%, #e47365 100%) !important;\n background: -o-linear-gradient(#e47365, #dd4b39) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47365', endColorstr='#dd4b39', GradientType=0) !important;\n color: #fff;\n}\n.bg-black-gradient {\n background: #111111 !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #111111), color-stop(1, #2b2b2b)) !important;\n background: -ms-linear-gradient(bottom, #111111, #2b2b2b) !important;\n background: -moz-linear-gradient(center bottom, #111111 0%, #2b2b2b 100%) !important;\n background: -o-linear-gradient(#2b2b2b, #111111) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b2b2b', endColorstr='#111111', GradientType=0) !important;\n color: #fff;\n}\n.bg-maroon-gradient {\n background: #d81b60 !important;\n background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #d81b60), color-stop(1, #e73f7c)) !important;\n background: -ms-linear-gradient(bottom, #d81b60, #e73f7c) !important;\n background: -moz-linear-gradient(center bottom, #d81b60 0%, #e73f7c 100%) !important;\n background: -o-linear-gradient(#e73f7c, #d81b60) !important;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e73f7c', endColorstr='#d81b60', GradientType=0) !important;\n color: #fff;\n}\n.description-block .description-icon {\n font-size: 16px;\n}\n.no-pad-top {\n padding-top: 0;\n}\n.position-static {\n position: static !important;\n}\n.list-header {\n font-size: 15px;\n padding: 10px 4px;\n font-weight: bold;\n color: #666;\n}\n.list-seperator {\n height: 1px;\n background: #f4f4f4;\n margin: 15px 0 9px 0;\n}\n.list-link > a {\n padding: 4px;\n color: #777;\n}\n.list-link > a:hover {\n color: #222;\n}\n.font-light {\n font-weight: 300;\n}\n.user-block:before,\n.user-block:after {\n content: \" \";\n display: table;\n}\n.user-block:after {\n clear: both;\n}\n.user-block img {\n width: 40px;\n height: 40px;\n float: left;\n}\n.user-block .username,\n.user-block .description,\n.user-block .comment {\n display: block;\n margin-left: 50px;\n}\n.user-block .username {\n font-size: 16px;\n font-weight: 600;\n}\n.user-block .description {\n color: #999;\n font-size: 13px;\n}\n.user-block.user-block-sm .username,\n.user-block.user-block-sm .description,\n.user-block.user-block-sm .comment {\n margin-left: 40px;\n}\n.user-block.user-block-sm .username {\n font-size: 14px;\n}\n.img-sm,\n.img-md,\n.img-lg,\n.box-comments .box-comment img,\n.user-block.user-block-sm img {\n float: left;\n}\n.img-sm,\n.box-comments .box-comment img,\n.user-block.user-block-sm img {\n width: 30px !important;\n height: 30px !important;\n}\n.img-sm + .img-push {\n margin-left: 40px;\n}\n.img-md {\n width: 60px;\n height: 60px;\n}\n.img-md + .img-push {\n margin-left: 70px;\n}\n.img-lg {\n width: 100px;\n height: 100px;\n}\n.img-lg + .img-push {\n margin-left: 110px;\n}\n.img-bordered {\n border: 3px solid #d2d6de;\n padding: 3px;\n}\n.img-bordered-sm {\n border: 2px solid #d2d6de;\n padding: 2px;\n}\n.attachment-block {\n border: 1px solid #f4f4f4;\n padding: 5px;\n margin-bottom: 10px;\n background: #f7f7f7;\n}\n.attachment-block .attachment-img {\n max-width: 100px;\n max-height: 100px;\n height: auto;\n float: left;\n}\n.attachment-block .attachment-pushed {\n margin-left: 110px;\n}\n.attachment-block .attachment-heading {\n margin: 0;\n}\n.attachment-block .attachment-text {\n color: #555;\n}\n.connectedSortable {\n min-height: 100px;\n}\n.ui-helper-hidden-accessible {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n.sort-highlight {\n background: #f4f4f4;\n border: 1px dashed #ddd;\n margin-bottom: 10px;\n}\n.full-opacity-hover {\n opacity: 0.65;\n filter: alpha(opacity=65);\n}\n.full-opacity-hover:hover {\n opacity: 1;\n filter: alpha(opacity=100);\n}\n.chart {\n position: relative;\n overflow: hidden;\n width: 100%;\n}\n.chart svg,\n.chart canvas {\n width: 100% !important;\n}\n/*\n * Misc: print\n * -----------\n */\n@media print {\n .no-print,\n .main-sidebar,\n .left-side,\n .main-header,\n .content-header {\n display: none !important;\n }\n .content-wrapper,\n .right-side,\n .main-footer {\n margin-left: 0 !important;\n min-height: 0 !important;\n -webkit-transform: translate(0, 0) !important;\n -ms-transform: translate(0, 0) !important;\n -o-transform: translate(0, 0) !important;\n transform: translate(0, 0) !important;\n }\n .fixed .content-wrapper,\n .fixed .right-side {\n padding-top: 0 !important;\n }\n .invoice {\n width: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n }\n .invoice-col {\n float: left;\n width: 33.3333333%;\n }\n .table-responsive {\n overflow: auto;\n }\n .table-responsive > .table tr th,\n .table-responsive > .table tr td {\n white-space: normal !important;\n }\n}",".timeline {\n position: relative;\n padding: 20px 0 20px;\n list-style: none;\n}\n\n.timeline:before {\n content: \" \";\n position: absolute;\n top: 0;\n bottom: 0;\n left: 50%;\n width: 3px;\n margin-left: -1.5px;\n background-color: #eeeeee;\n}\n\n.timeline > li {\n position: relative;\n margin-bottom: 20px;\n}\n\n.timeline > li:before,\n.timeline > li:after {\n content: \" \";\n display: table;\n}\n\n.timeline > li:after {\n clear: both;\n}\n\n.timeline > li:before,\n.timeline > li:after {\n content: \" \";\n display: table;\n}\n\n.timeline > li:after {\n clear: both;\n}\n\n.timeline > li > .timeline-panel {\n float: left;\n position: relative;\n width: 46%;\n padding: 20px;\n border: 1px solid #d4d4d4;\n border-radius: 2px;\n -webkit-box-shadow: 0 1px 6px rgba(0,0,0,0.175);\n box-shadow: 0 1px 6px rgba(0,0,0,0.175);\n}\n\n.timeline > li > .timeline-panel:before {\n content: \" \";\n display: inline-block;\n position: absolute;\n top: 26px;\n right: -15px;\n border-top: 15px solid transparent;\n border-right: 0 solid #ccc;\n border-bottom: 15px solid transparent;\n border-left: 15px solid #ccc;\n}\n\n.timeline > li > .timeline-panel:after {\n content: \" \";\n display: inline-block;\n position: absolute;\n top: 27px;\n right: -14px;\n border-top: 14px solid transparent;\n border-right: 0 solid #fff;\n border-bottom: 14px solid transparent;\n border-left: 14px solid #fff;\n}\n\n.timeline > li > .timeline-badge {\n z-index: 100;\n position: absolute;\n top: 16px;\n left: 50%;\n width: 50px;\n height: 50px;\n margin-left: -25px;\n border-radius: 50% 50% 50% 50%;\n text-align: center;\n font-size: 1.4em;\n line-height: 50px;\n color: #fff;\n background-color: #999999;\n}\n\n.timeline > li.timeline-inverted > .timeline-panel {\n float: right;\n}\n\n.timeline > li.timeline-inverted > .timeline-panel:before {\n right: auto;\n left: -15px;\n border-right-width: 15px;\n border-left-width: 0;\n}\n\n.timeline > li.timeline-inverted > .timeline-panel:after {\n right: auto;\n left: -14px;\n border-right-width: 14px;\n border-left-width: 0;\n}\n\n.timeline-badge.primary {\n background-color: #2e6da4 !important;\n}\n\n.timeline-badge.success {\n background-color: #3f903f !important;\n}\n\n.timeline-badge.warning {\n background-color: #f0ad4e !important;\n}\n\n.timeline-badge.danger {\n background-color: #d9534f !important;\n}\n\n.timeline-badge.info {\n background-color: #5bc0de !important;\n}\n\n.timeline-title {\n margin-top: 0;\n color: inherit;\n}\n\n.timeline-body > p,\n.timeline-body > ul {\n margin-bottom: 0;\n}\n\n.timeline-body > p + p {\n margin-top: 5px;\n}\n\n@media(max-width:767px) {\n ul.timeline:before {\n left: 40px;\n }\n\n ul.timeline > li > .timeline-panel {\n width: calc(100% - 90px);\n width: -moz-calc(100% - 90px);\n width: -webkit-calc(100% - 90px);\n }\n\n ul.timeline > li > .timeline-badge {\n top: 16px;\n left: 15px;\n margin-left: 0;\n }\n\n ul.timeline > li > .timeline-panel {\n float: right;\n }\n\n ul.timeline > li > .timeline-panel:before {\n right: auto;\n left: -15px;\n border-right-width: 15px;\n border-left-width: 0;\n }\n\n ul.timeline > li > .timeline-panel:after {\n right: auto;\n left: -14px;\n border-right-width: 14px;\n border-left-width: 0;\n }\n}"]}
\ No newline at end of file
diff --git a/public/app.js b/public/app.js
deleted file mode 100644
index 9755f5d..0000000
--- a/public/app.js
+++ /dev/null
@@ -1,4382 +0,0 @@
-(function() {
- 'use strict';
-
- var globals = typeof window === 'undefined' ? global : window;
- if (typeof globals.require === 'function') return;
-
- var modules = {};
- var cache = {};
- var aliases = {};
- var has = ({}).hasOwnProperty;
-
- var endsWith = function(str, suffix) {
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
- };
-
- var _cmp = 'components/';
- var unalias = function(alias, loaderPath) {
- var start = 0;
- if (loaderPath) {
- if (loaderPath.indexOf(_cmp) === 0) {
- start = _cmp.length;
- }
- if (loaderPath.indexOf('/', start) > 0) {
- loaderPath = loaderPath.substring(start, loaderPath.indexOf('/', start));
- }
- }
- var result = aliases[alias + '/index.js'] || aliases[loaderPath + '/deps/' + alias + '/index.js'];
- if (result) {
- return _cmp + result.substring(0, result.length - '.js'.length);
- }
- return alias;
- };
-
- var _reg = /^\.\.?(\/|$)/;
- var expand = function(root, name) {
- var results = [], part;
- var parts = (_reg.test(name) ? root + '/' + name : name).split('/');
- for (var i = 0, length = parts.length; i < length; i++) {
- part = parts[i];
- if (part === '..') {
- results.pop();
- } else if (part !== '.' && part !== '') {
- results.push(part);
- }
- }
- return results.join('/');
- };
-
- var dirname = function(path) {
- return path.split('/').slice(0, -1).join('/');
- };
-
- var localRequire = function(path) {
- return function expanded(name) {
- var absolute = expand(dirname(path), name);
- return globals.require(absolute, path);
- };
- };
-
- var initModule = function(name, definition) {
- var module = {id: name, exports: {}};
- cache[name] = module;
- definition(module.exports, localRequire(name), module);
- return module.exports;
- };
-
- var require = function(name, loaderPath) {
- var path = expand(name, '.');
- if (loaderPath == null) loaderPath = '/';
- path = unalias(name, loaderPath);
-
- if (has.call(cache, path)) return cache[path].exports;
- if (has.call(modules, path)) return initModule(path, modules[path]);
-
- var dirIndex = expand(path, './index');
- if (has.call(cache, dirIndex)) return cache[dirIndex].exports;
- if (has.call(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]);
-
- throw new Error('Cannot find module "' + name + '" from '+ '"' + loaderPath + '"');
- };
-
- require.alias = function(from, to) {
- aliases[to] = from;
- };
-
- require.register = require.define = function(bundle, fn) {
- if (typeof bundle === 'object') {
- for (var key in bundle) {
- if (has.call(bundle, key)) {
- modules[key] = bundle[key];
- }
- }
- } else {
- modules[bundle] = fn;
- }
- };
-
- require.list = function() {
- var result = [];
- for (var item in modules) {
- if (has.call(modules, item)) {
- result.push(item);
- }
- }
- return result;
- };
-
- require.brunch = true;
- require._cache = cache;
- globals.require = require;
-})();
-require.register("javascripts/app", function(exports, require, module) {
-"use strict";
-
-var React = require("react");
-var ReactDOM = require("react-dom");
-var App = require("javascripts/components/main");
-
-module.exports = function (mount) {
- ReactDOM.render(React.createElement(App, null), mount);
-};
-});
-
-require.register("javascripts/components/event", function(exports, require, module) {
-"use strict";
-
-var React = require("react");
-var Events = exports.Events = React.createClass({
- displayName: "Events",
-
- propTypes: {
- events: React.PropTypes.array.isRequired
- },
-
- getTime: function getTime(timeString) {
- return new Date(timeString).toTimeString().match(/^[\d:]*/)[0];
- },
- render: function render() {
- var _this = this;
-
- var events = undefined;
- if (this.props.events.length) {
- events = this.props.events.map(function (event) {
- return _this.getTime(event.createdAt) + " " + event.description;
- }).join("\n");
- return React.createElement(
- "pre",
- { className: "events-panel" },
- events
- );
- } else {
- return React.createElement(
- "pre",
- { className: "events-panel" },
- "Listening for new events..."
- );
- }
- }
-});
-});
-
-require.register("javascripts/components/gather", function(exports, require, module) {
-"use strict";
-
-var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
-
-var _user = require("javascripts/components/user");
-
-var React = require("react");
-var helper = require("javascripts/helper");
-var enslUrl = helper.enslUrl;
-var rankVotes = helper.rankeVotes;
-var hiveUrl = helper.hiveUrl;
-
-var SelectPlayerButton = React.createClass({
- displayName: "SelectPlayerButton",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- gatherer: React.PropTypes.object.isRequired
- },
-
- selectPlayer: function selectPlayer(e) {
- e.preventDefault();
- this.props.socket.emit("gather:select", {
- player: parseInt(e.target.value, 10)
- });
- },
- render: function render() {
- var button = undefined;
- if (this.props.gatherer.leader) {
- button = React.createElement(
- "button",
- {
- className: "btn btn-xs btn-default team-label",
- "data-disabled": "true" },
- "Leader"
- );
- } else if (this.props.gatherer.team !== "lobby") {
- button = React.createElement(
- "button",
- {
- "data-disabled": "true",
- className: "btn btn-xs btn-default team-label" },
- _.capitalize(this.props.gatherer.team)
- );
- } else {
- button = React.createElement(
- "button",
- {
- onClick: this.selectPlayer,
- value: this.props.gatherer.id,
- className: "btn btn-xs btn-primary team-label" },
- " Select"
- );
- }
- return button;
- }
-});
-
-var GathererList = React.createClass({
- displayName: "GathererList",
- memberList: function memberList() {
- var self = this;
- return this.props.gather.gatherers.filter(function (gatherer) {
- return gatherer.team === self.props.team;
- }).sort(function (gatherer) {
- return gatherer.leader ? 1 : -1;
- });
- },
- render: function render() {
- var extractGatherer = function extractGatherer(gatherer) {
- var image = undefined;
- if (gatherer.leader) {
- image = React.createElement("i", { className: "fa fa-star add-right" });
- }
- return React.createElement(
- "tr",
- { key: gatherer.id },
- React.createElement(
- "td",
- { className: "col-md-12" },
- image,
- gatherer.user.username,
- React.createElement(
- "span",
- { className: "pull-right" },
- React.createElement(LifeformIcons, { gatherer: gatherer })
- )
- )
- );
- };
- var members = this.memberList().map(extractGatherer);
- return React.createElement(
- "table",
- { className: "table" },
- React.createElement(
- "tbody",
- null,
- members
- )
- );
- }
-});
-
-var GatherTeams = React.createClass({
- displayName: "GatherTeams",
- render: function render() {
- return React.createElement(
- "div",
- { className: "row add-top" },
- React.createElement(
- "div",
- { className: "col-sm-6" },
- React.createElement(
- "div",
- { className: "panel panel-primary panel-light-background" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- "Marines"
- ),
- React.createElement(GathererList, { gather: this.props.gather, team: "marine" })
- )
- ),
- React.createElement(
- "div",
- { className: "col-sm-6" },
- React.createElement(
- "div",
- { className: "panel panel-primary panel-light-background" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- "Aliens"
- ),
- React.createElement(GathererList, { gather: this.props.gather, team: "alien" })
- )
- )
- );
- }
-});
-
-var ElectionProgressBar = React.createClass({
- displayName: "ElectionProgressBar",
- componentDidMount: function componentDidMount() {
- var self = this;
- this.timer = setInterval(function () {
- self.forceUpdate();
- }, 900);
- },
- progress: function progress() {
- var interval = this.props.gather.election.interval;
- var startTime = new Date(this.props.gather.election.startTime).getTime();
- var msTranspired = Math.floor(new Date().getTime() - startTime);
-
- return {
- num: msTranspired,
- den: interval,
- barMessage: Math.floor((interval - msTranspired) / 1000) + "s remaining"
- };
- },
- componentWillUnmount: function componentWillUnmount() {
- clearInterval(this.timer);
- },
- render: function render() {
- return React.createElement(ProgressBar, { progress: this.progress() });
- }
-});
-
-var ProgressBar = React.createClass({
- displayName: "ProgressBar",
- render: function render() {
- var progress = this.props.progress;
- var style = {
- width: Math.round(progress.num / progress.den * 100) + "%"
- };
- var barMessage = progress.barMessage || "";
- return React.createElement(
- "div",
- { className: "progress" },
- React.createElement(
- "div",
- { className: "progress-bar progress-bar-striped active",
- "data-role": "progressbar",
- "data-aria-valuenow": progress.num,
- "data-aria-valuemin": "0",
- "data-aria-valuemax": progress.den,
- style: style },
- barMessage
- )
- );
- }
-});
-
-var GatherProgress = React.createClass({
- displayName: "GatherProgress",
- stateDescription: function stateDescription() {
- switch (this.props.gather.state) {
- case "gathering":
- return "Waiting for more gatherers.";
- case "election":
- return "Currently voting for team leaders.";
- case "selection":
- return "Waiting for leaders to pick teams.";
- case "done":
- return "Gather completed.";
- default:
- return "Initialising gather.";
- }
- },
- gatheringProgress: function gatheringProgress() {
- var num = this.props.gather.gatherers.length;
- var den = 12;
- var remaining = den - num;
- var message = remaining === 1 ? "Waiting for last player" : "Waiting for " + remaining + " more players";
- return {
- num: num,
- den: den,
- message: message
- };
- },
- electionProgress: function electionProgress() {
- var num = this.props.gather.gatherers.reduce(function (acc, gatherer) {
- if (gatherer.leaderVote) acc++;
- return acc;
- }, 0);
- var den = 12;
- return {
- num: num,
- den: den,
- message: den - num + " more votes required"
- };
- },
- selectionProgress: function selectionProgress() {
- var num = this.props.gather.gatherers.reduce(function (acc, gatherer) {
- if (gatherer.team !== "lobby") acc++;
- return acc;
- }, 0);
- var den = 12;
-
- return {
- num: num,
- den: den,
- message: num + " out of " + den + " players assigned. Waiting \n\t\t\t\ton " + _.capitalize(this.props.gather.pickingTurn) + "s to pick next..."
- };
- },
- render: function render() {
- var progress = undefined,
- progressBar = undefined;
- var gatherState = this.props.gather.state;
- if (gatherState === 'gathering' && this.props.gather.gatherers.length) {
- progress = this.gatheringProgress();
- progressBar = React.createElement(ProgressBar, { progress: progress });
- } else if (gatherState === 'election') {
- progress = this.electionProgress();
- progressBar = React.createElement(ElectionProgressBar, _extends({}, this.props, { progress: progress }));
- } else if (gatherState === 'selection') {
- progress = this.selectionProgress();
- progressBar = React.createElement(ProgressBar, { progress: progress });
- }
-
- if (!progress) return false;
-
- return React.createElement(
- "div",
- { className: "no-bottom" },
- React.createElement(
- "p",
- null,
- React.createElement(
- "strong",
- null,
- this.stateDescription()
- ),
- " ",
- progress.message
- ),
- progressBar
- );
- }
-});
-
-var JoinGatherButton = React.createClass({
- displayName: "JoinGatherButton",
-
- propTypes: {
- thisGatherer: React.PropTypes.object,
- user: React.PropTypes.object.isRequired,
- socket: React.PropTypes.object.isRequired,
- gather: React.PropTypes.object.isRequired
- },
-
- componentDidMount: function componentDidMount() {
- var self = this;
- this.timer = setInterval(function () {
- self.forceUpdate();
- }, 30000);
- },
- componentWillUnmount: function componentWillUnmount() {
- clearInterval(this.timer);
- },
- joinGather: function joinGather(e) {
- e.preventDefault();
- this.props.socket.emit("gather:join");
- },
- leaveGather: function leaveGather(e) {
- e.preventDefault();
- this.props.socket.emit("gather:leave");
- },
- cooldownTime: function cooldownTime() {
- var user = this.props.user;
- if (!user) return false;
- var cooloffTime = this.props.gather.cooldown[user.id];
- if (!cooloffTime) return false;
- var timeRemaining = new Date(cooloffTime) - new Date();
- return timeRemaining > 0 ? timeRemaining : false;
- },
- render: function render() {
- var gather = this.props.gather;
- var thisGatherer = this.props.thisGatherer;
- if (thisGatherer) {
- return React.createElement(
- "button",
- {
- onClick: this.leaveGather,
- className: "btn btn-danger" },
- "Leave Gather"
- );
- }
- if (gather.state === 'gathering') {
- var cooldownTime = this.cooldownTime();
- if (cooldownTime) {
- return React.createElement(CooloffButton, { timeRemaining: cooldownTime });
- } else {
- return React.createElement(
- "button",
- {
- onClick: this.joinGather,
- className: "btn btn-success" },
- "Join Gather"
- );
- }
- }
- return false;
- }
-});
-
-var CooloffButton = React.createClass({
- displayName: "CooloffButton",
-
- propTypes: {
- timeRemaining: React.PropTypes.number.isRequired
- },
-
- timeRemaining: function timeRemaining() {
- return Math.floor(this.props.timeRemaining / 60000) + 1 + " minutes remaining";
- },
- render: function render() {
- return React.createElement(
- "button",
- {
- disabled: "true",
- className: "btn btn-success" },
- "Leaver Cooloff (",
- this.timeRemaining(),
- ")"
- );
- }
-});
-
-var GatherActions = React.createClass({
- displayName: "GatherActions",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- gather: React.PropTypes.object.isRequired,
- thisGatherer: React.PropTypes.object
- },
-
- voteRegather: function voteRegather(e) {
- e.preventDefault(e);
- this.props.socket.emit("gather:vote", {
- regather: e.target.value === "true"
- });
- },
- regatherVotes: function regatherVotes() {
- var gather = this.props.gather;
- if (!gather) return 0;
- return gather.gatherers.reduce(function (acc, gatherer) {
- if (gatherer.regatherVote) acc++;
- return acc;
- }, 0);
- },
- render: function render() {
- var regatherButton = undefined;
- var user = this.props.user;
- var gather = this.props.gather;
- var socket = this.props.socket;
- var thisGatherer = this.props.thisGatherer;
- if (thisGatherer) {
- var regatherVotes = this.regatherVotes();
- if (thisGatherer.regatherVote) {
- regatherButton = React.createElement(
- "button",
- { value: "false", onClick: this.voteRegather,
- className: "btn btn-danger" },
- "Voted Regather (" + regatherVotes + "/8)"
- );
- } else {
- regatherButton = React.createElement(
- "button",
- { value: "true", onClick: this.voteRegather,
- className: "btn btn-danger" },
- "Vote Regather (" + regatherVotes + "/8)"
- );
- }
- }
-
- return React.createElement(
- "div",
- null,
- React.createElement(
- "div",
- { className: "text-right" },
- React.createElement(
- "ul",
- { className: "list-inline no-bottom" },
- React.createElement(
- "li",
- null,
- regatherButton
- ),
- React.createElement(
- "li",
- null,
- React.createElement(JoinGatherButton, { gather: gather, thisGatherer: thisGatherer,
- user: user, socket: socket })
- )
- )
- )
- );
- }
-});
-
-var VoteButton = React.createClass({
- displayName: "VoteButton",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- candidate: React.PropTypes.object.isRequired,
- thisGatherer: React.PropTypes.object
- },
-
- cancelVote: function cancelVote(e) {
- this.props.socket.emit("gather:vote", {
- leader: {
- candidate: null
- }
- });
- },
- vote: function vote(e) {
- e.preventDefault();
- this.props.socket.emit("gather:vote", {
- leader: {
- candidate: parseInt(e.target.value, 10)
- }
- });
- },
- stopGatherMusic: function stopGatherMusic() {
- soundController.stop();
- },
- render: function render() {
- var candidate = this.props.candidate;
- var thisGatherer = this.props.thisGatherer;
- if (thisGatherer === null) {
- return false;
- }
- if (thisGatherer.leaderVote === candidate.id) {
- return React.createElement(
- "button",
- {
- onClick: this.cancelVote,
- className: "btn btn-xs btn-success vote-button" },
- "Voted"
- );
- } else {
- return React.createElement(
- "button",
- {
- onClick: this.vote,
- className: "btn btn-xs btn-primary vote-button",
- value: candidate.id },
- "Vote"
- );
- }
- }
-});
-
-var ServerVoting = React.createClass({
- displayName: "ServerVoting",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- gather: React.PropTypes.object.isRequired,
- thisGatherer: React.PropTypes.object,
- servers: React.PropTypes.array.isRequired
- },
-
- voteHandler: function voteHandler(serverId) {
- var _this = this;
-
- return function (e) {
- e.preventDefault();
- _this.props.socket.emit("gather:vote", {
- server: {
- id: serverId
- }
- });
- };
- },
- votesForServer: function votesForServer(server) {
- return this.props.gather.gatherers.reduce(function (acc, gatherer) {
- if (gatherer.serverVote.some(function (voteId) {
- return voteId === server.id;
- })) acc++;
- return acc;
- }, 0);
- },
- render: function render() {
- var self = this;
- var thisGatherer = self.props.thisGatherer;
- var servers = self.props.servers.sort(function (a, b) {
- var aVotes = self.votesForServer(a);
- var bVotes = self.votesForServer(b);
- return bVotes - aVotes;
- }).map(function (server) {
- var votes = self.votesForServer(server);
- var style = thisGatherer.serverVote.some(function (voteId) {
- return voteId === server.id;
- }) ? "list-group-item list-group-item-success" : "list-group-item";
- return React.createElement(
- "a",
- { href: "#",
- className: style,
- onClick: self.voteHandler(server.id),
- key: server.id },
- React.createElement(
- "span",
- { className: "badge" },
- votes
- ),
- server.name || server.description
- );
- });
-
- var votes = thisGatherer.serverVote.length;
-
- return React.createElement(
- "div",
- { className: "panel panel-primary" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- votes === 2 ? "Server Votes" : "Please Vote for a Server. " + (2 - votes) + " votes remaining"
- ),
- React.createElement(
- "div",
- { className: "list-group gather-voting" },
- servers
- )
- );
- }
-});
-
-var MapVoting = React.createClass({
- displayName: "MapVoting",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- gather: React.PropTypes.object.isRequired,
- thisGatherer: React.PropTypes.object,
- maps: React.PropTypes.array.isRequired
- },
-
- voteHandler: function voteHandler(mapId) {
- var _this2 = this;
-
- return function (e) {
- e.preventDefault();
- _this2.props.socket.emit("gather:vote", {
- map: {
- id: mapId
- }
- });
- };
- },
- votesForMap: function votesForMap(map) {
- return this.props.gather.gatherers.reduce(function (acc, gatherer) {
- if (gatherer.mapVote.some(function (voteId) {
- return voteId === map.id;
- })) acc++;
- return acc;
- }, 0);
- },
- render: function render() {
- var self = this;
- var thisGatherer = self.props.thisGatherer;
- var maps = self.props.maps.sort(function (a, b) {
- var aVotes = self.votesForMap(a);
- var bVotes = self.votesForMap(b);
- return bVotes - aVotes;
- }).map(function (map) {
- var votes = self.votesForMap(map);
- var style = thisGatherer.mapVote.some(function (voteId) {
- return voteId === map.id;
- }) ? "list-group-item list-group-item-success" : "list-group-item";
- return React.createElement(
- "a",
- { href: "#",
- key: map.id,
- onClick: self.voteHandler(map.id),
- className: style },
- React.createElement(
- "span",
- { className: "badge" },
- votes
- ),
- map.name
- );
- });
-
- var votes = thisGatherer.mapVote.length;
-
- return React.createElement(
- "div",
- { className: "panel panel-primary" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- votes === 2 ? "Map Votes" : "Please Vote for a Map. " + (2 - votes) + " votes remaining"
- ),
- React.createElement(
- "div",
- { className: "list-group gather-voting" },
- maps
- )
- );
- }
-});
-
-var Gather = exports.Gather = React.createClass({
- displayName: "Gather",
-
- propTypes: {
- thisGatherer: React.PropTypes.object,
- maps: React.PropTypes.array.isRequired,
- servers: React.PropTypes.array.isRequired,
- socket: React.PropTypes.object.isRequired,
- gather: React.PropTypes.object.isRequired
- },
-
- render: function render() {
- var socket = this.props.socket;
- var gather = this.props.gather;
- var thisGatherer = this.props.thisGatherer;
- var servers = this.props.servers;
- var maps = this.props.maps;
- var user = this.props.user;
- if (gather === null) return React.createElement("div", null);
-
- var voting = undefined;
- if (thisGatherer) {
- var state = gather.state;
- if (state === 'gathering' || state === 'election') {
- voting = React.createElement(
- "div",
- { className: "row add-top" },
- React.createElement(
- "div",
- { className: "col-sm-6" },
- React.createElement(MapVoting, { gather: gather, maps: maps,
- socket: socket, thisGatherer: thisGatherer })
- ),
- React.createElement(
- "div",
- { className: "col-sm-6" },
- React.createElement(ServerVoting, { gather: gather, servers: servers,
- socket: socket, thisGatherer: thisGatherer })
- )
- );
- } else {
- voting = React.createElement(GatherVotingResults, { gather: gather,
- servers: servers,
- maps: maps });
- }
- }
-
- var gatherTeams = undefined;
- if (gather.state === 'selection') {
- gatherTeams = React.createElement(GatherTeams, { gather: gather });
- }
-
- if (gather.gatherers.length > 0) {
- return React.createElement(
- "div",
- null,
- React.createElement(
- "div",
- { className: "panel panel-primary add-bottom" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- "Current Gather"
- ),
- React.createElement(
- "div",
- { className: "panel-body" },
- React.createElement(GatherProgress, { gather: gather }),
- React.createElement(GatherActions, { gather: gather, user: user, thisGatherer: thisGatherer,
- socket: socket })
- )
- ),
- React.createElement(Gatherers, { gather: gather, user: user,
- soundController: this.props.soundController,
- thisGatherer: thisGatherer, socket: socket }),
- gatherTeams,
- voting
- );
- } else {
- return React.createElement(
- "div",
- null,
- React.createElement(
- "div",
- { className: "panel panel-primary add-bottom" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- "Current Gather"
- )
- ),
- React.createElement(Gatherers, { gather: gather, user: user, thisGatherer: thisGatherer,
- socket: socket })
- );
- }
- }
-});
-
-var LifeformIcons = exports.LifeformIcons = React.createClass({
- displayName: "LifeformIcons",
- availableLifeforms: function availableLifeforms() {
- return ["skulk", "gorge", "lerk", "fade", "onos", "commander"];
- },
- gathererLifeforms: function gathererLifeforms() {
- var lifeforms = [];
- var gatherer = this.props.gatherer;
- var abilities = gatherer.user.profile.abilities;
- for (var attr in abilities) {
- if (abilities[attr]) lifeforms.push(_.capitalize(attr));
- }
- return lifeforms;
- },
- render: function render() {
- var lifeforms = this.gathererLifeforms();
- var availableLifeforms = this.availableLifeforms();
- var icons = availableLifeforms.map(function (lifeform) {
- var containsAbility = lifeforms.some(function (gathererLifeform) {
- return gathererLifeform.toLowerCase() === lifeform.toLowerCase();
- });
- if (containsAbility) {
- return React.createElement("img", {
- className: "lifeform-icon",
- key: lifeform,
- src: "/" + lifeform.toLowerCase() + ".png" });
- } else {
- return React.createElement("img", {
- className: "lifeform-icon",
- key: lifeform,
- src: "/blank.gif" });
- }
- });
- return React.createElement(
- "span",
- { className: "add-right hidden-xs" },
- icons
- );
- }
-});
-
-var Gatherers = React.createClass({
- displayName: "Gatherers",
-
- propTypes: {
- user: React.PropTypes.object,
- thisGatherer: React.PropTypes.object,
- socket: React.PropTypes.object.isRequired,
- gather: React.PropTypes.object.isRequired
- },
-
- joinGather: function joinGather(e) {
- e.preventDefault();
- this.props.socket.emit("gather:join");
- },
- bootGatherer: function bootGatherer(e) {
- e.preventDefault();
- this.props.socket.emit("gather:leave", {
- gatherer: parseInt(e.target.value, 10) || null
- });
- },
- render: function render() {
- var _this3 = this;
-
- var self = this;
- var user = this.props.user;
- var socket = this.props.socket;
- var gather = this.props.gather;
- var thisGatherer = this.props.thisGatherer;
- var admin = user && user.admin || user && user.moderator;
- var gatherers = gather.gatherers.sort(function (a, b) {
- return (b.user.hive.skill || 1000) - (a.user.hive.skill || 1000);
- }).map(function (gatherer) {
- var country = undefined;
- if (gatherer.user.country) {
- country = React.createElement("img", { src: "/blank.gif",
- className: "flag flag-" + gatherer.user.country.toLowerCase(),
- alt: gatherer.user.country });
- };
-
- var skill = gatherer.user.profile.skill || "Not Available";
-
- var hiveStats = [];
- if (gatherer.user.hive.skill) hiveStats.push(gatherer.user.hive.skill + " ELO");
-
- if (gatherer.user.hive.playTime) {
- hiveStats.push(Math.floor(gatherer.user.hive.playTime / 3600) + " Hours");
- }
-
- var hive = hiveStats.length ? hiveStats.join(", ") : "Not Available";
-
- var team = gatherer.user.team ? gatherer.user.team.name : "None";
-
- var action = undefined;
- if (gather.state === "election") {
- var votes = gather.gatherers.reduce(function (acc, voter) {
- if (voter.leaderVote === gatherer.id) acc++;
- return acc;
- }, 0);
- action = React.createElement(
- "span",
- null,
- React.createElement(
- "span",
- { className: "badge add-right" },
- votes + " votes"
- ),
- React.createElement(VoteButton, {
- thisGatherer: thisGatherer,
- soundController: _this3.props.soundController,
- candidate: gatherer })
- );
- }
-
- if (gather.state === 'selection') {
- if (thisGatherer && thisGatherer.leader && thisGatherer.team === gather.pickingTurn) {
- action = React.createElement(
- "span",
- null,
- React.createElement(SelectPlayerButton, { gatherer: gatherer })
- );
- } else {
- if (gatherer.leader) {
- action = React.createElement(
- "span",
- { className: "label label-padding \n\t\t\t\t\t\t\tlabel-" + gatherer.team + " \n\t\t\t\t\t\t\tteam-label" },
- "Leader"
- );
- } else if (gatherer.team !== "lobby") {
- action = React.createElement(
- "span",
- { className: "label label-padding \n\t\t\t\t\t\t\tlabel-" + gatherer.team + " \n\t\t\t\t\t\t\tteam-label" },
- _.capitalize(gatherer.team)
- );
- } else {
- action = React.createElement(
- "span",
- { className: "label label-padding label-default team-label" },
- "Lobby"
- );
- }
- }
- }
-
- var adminOptions = undefined;
- if (admin) {
- adminOptions = [React.createElement("hr", null), React.createElement(
- "dt",
- null,
- "Admin"
- ), React.createElement(
- "dd",
- null,
- React.createElement(
- "button",
- {
- className: "btn btn-xs btn-danger",
- value: gatherer.user.id,
- onClick: _this3.bootGatherer },
- "Boot from Gather"
- ),
- "Â ",
- React.createElement(_user.AssumeUserIdButton, { socket: socket,
- gatherer: gatherer, currentUser: user })
- )];
- }
-
- var tabColor = gatherer.team !== "lobby" ? "panel-" + gatherer.team : "panel-info";
- return React.createElement(
- "div",
- { className: "panel " + tabColor + " gatherer-panel",
- key: gatherer.user.id, "data-userid": gatherer.user.id },
- React.createElement(
- "div",
- { className: "panel-heading" },
- React.createElement(
- "h4",
- { className: "panel-title" },
- country,
- " ",
- gatherer.user.username,
- React.createElement(
- "span",
- { className: "pull-right" },
- React.createElement(
- "a",
- { "data-toggle": "collapse",
- href: "#" + gatherer.user.id.toString() + "-collapse",
- "aria-expanded": "false",
- className: "btn btn-xs btn-primary add-right",
- "aria-controls": gatherer.user.id.toString() + "-collapse" },
- "Info ",
- React.createElement("span", { className: "caret" })
- ),
- React.createElement(LifeformIcons, { gatherer: gatherer }),
- action
- )
- )
- ),
- React.createElement(
- "div",
- { id: gatherer.user.id.toString() + "-collapse",
- className: "panel-collapse collapse out" },
- React.createElement(
- "div",
- { className: "panel-body" },
- React.createElement(
- "dl",
- { className: "dl-horizontal" },
- React.createElement(
- "dt",
- null,
- "Skill Level"
- ),
- React.createElement(
- "dd",
- null,
- skill
- ),
- React.createElement(
- "dt",
- null,
- "Team"
- ),
- React.createElement(
- "dd",
- null,
- team
- ),
- React.createElement(
- "dt",
- null,
- "Hive Stats"
- ),
- React.createElement(
- "dd",
- null,
- hive
- ),
- React.createElement(
- "dt",
- null,
- "Links"
- ),
- React.createElement(
- "dd",
- null,
- React.createElement(
- "a",
- { href: enslUrl(gatherer),
- className: "btn btn-xs btn-primary",
- target: "_blank" },
- "ENSL Profile"
- ),
- "Â ",
- React.createElement(
- "a",
- { href: hiveUrl(gatherer),
- className: "btn btn-xs btn-primary",
- target: "_blank" },
- "Hive Profile"
- )
- ),
- adminOptions
- )
- )
- )
- );
- });
- if (gather.gatherers.length) {
- return React.createElement(
- "div",
- { "class": "panel-group",
- role: "tablist",
- "aria-multiselectable": "true",
- id: "gatherers-panel" },
- gatherers
- );
- } else {
- return React.createElement(
- "div",
- { className: "panel panel-primary add-bottom" },
- React.createElement(
- "div",
- { className: "panel-body text-center join-hero" },
- React.createElement(
- "button",
- {
- onClick: this.joinGather,
- className: "btn btn-success btn-lg" },
- "Start a Gather"
- )
- )
- );
- }
- }
-});
-
-var CompletedGather = React.createClass({
- displayName: "CompletedGather",
- completionDate: function completionDate() {
- var d = new Date(this.props.gather.done.time);
- if (d) {
- return d.toLocaleTimeString();
- } else {
- return "Completed Gather";
- }
- },
- getInitialState: function getInitialState() {
- return {
- show: !!this.props.show
- };
- },
- toggleGatherInfo: function toggleGatherInfo() {
- var newState = !this.state.show;
- this.setState({
- show: newState
- });
- },
- render: function render() {
- var gatherInfo = [];
- var gather = this.props.gather;
- var maps = this.props.maps;
- var servers = this.props.servers;
- if (this.state.show) {
- gatherInfo.push(React.createElement(GatherTeams, { gather: gather }));
- gatherInfo.push(React.createElement(GatherVotingResults, { gather: gather,
- maps: maps,
- servers: servers }));
- }
- return React.createElement(
- "div",
- null,
- React.createElement(
- "div",
- { className: "panel panel-success add-bottom pointer",
- onClick: this.toggleGatherInfo },
- React.createElement(
- "div",
- { className: "panel-heading" },
- React.createElement(
- "strong",
- null,
- this.completionDate()
- )
- )
- ),
- gatherInfo
- );
- }
-});
-
-var GatherVotingResults = React.createClass({
- displayName: "GatherVotingResults",
-
- // Returns an array of ids voted for e.g. [1,2,5,1,1,3,2]
- countVotes: function countVotes(voteType) {
- return this.props.gather.gatherers.reduce(function (acc, gatherer) {
- var votes = gatherer[voteType];
-
- // Temporary fix because some mapvotes are ints and not arrays
- if (!Array.isArray(votes)) votes = [votes];
-
- if (votes.length > 0) votes.forEach(function (vote) {
- return acc.push(vote);
- });
- return acc;
- }, []);
- },
- selectedMaps: function selectedMaps() {
- return rankVotes(this.countVotes('mapVote'), this.props.maps).slice(0, 2);
- },
- selectedServer: function selectedServer() {
- return rankVotes(this.countVotes('serverVote'), this.props.servers).slice(0, 1);
- },
- render: function render() {
- var maps = this.selectedMaps();
- var server = this.selectedServer().pop();
- var password = undefined;
- if (server.password) {
- password = [React.createElement(
- "dt",
- null,
- "Password"
- ), React.createElement(
- "dd",
- null,
- server.password
- )];
- }
- return React.createElement(
- "div",
- { className: "panel panel-primary" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- "Server"
- ),
- React.createElement(
- "div",
- { className: "panel-body" },
- React.createElement(
- "dl",
- { className: "dl-horizontal" },
- React.createElement(
- "dt",
- null,
- "Maps"
- ),
- React.createElement(
- "dd",
- null,
- maps.map(function (map) {
- return map.name;
- }).join(" & ")
- ),
- React.createElement(
- "dt",
- null,
- "Server"
- ),
- React.createElement(
- "dd",
- null,
- server.name
- ),
- React.createElement(
- "dt",
- null,
- "Address"
- ),
- React.createElement(
- "dd",
- null,
- server.ip,
- ":",
- server.port
- ),
- password
- ),
- React.createElement(
- "p",
- null,
- React.createElement(
- "a",
- { href: "steam://run/4920/connect+%20" + server.ip + ":" + server.port + "%20+password%20" + server.password,
- className: "btn btn-primary max-width" },
- "Join Server"
- )
- )
- )
- );
- }
-});
-
-var ArchivedGathers = exports.ArchivedGathers = React.createClass({
- displayName: "ArchivedGathers",
-
- propTypes: {
- archive: React.PropTypes.array.isRequired,
- servers: React.PropTypes.array.isRequired,
- maps: React.PropTypes.array.isRequired
- },
-
- render: function render() {
- var _this4 = this;
-
- var archive = this.props.archive.sort(function (a, b) {
- return new Date(b.createdAt) - new Date(a.createdAt);
- }).map(function (archivedGather, index) {
- return React.createElement(CompletedGather, {
- id: archivedGather.gather.done.time,
- show: index === 0 ? true : false,
- gather: archivedGather.gather,
- maps: _this4.props.maps,
- servers: _this4.props.servers });
- });
-
- return React.createElement(
- "div",
- { className: "panel panel-primary" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- "Archived Gathers"
- ),
- React.createElement(
- "div",
- { className: "panel-body" },
- archive
- )
- );
- }
-});
-});
-
-require.register("javascripts/components/main", function(exports, require, module) {
-"use strict";
-
-var _event = require("javascripts/components/event");
-
-var _user = require("javascripts/components/user");
-
-var _sound = require("javascripts/components/sound");
-
-var _teamspeak = require("javascripts/components/teamspeak");
-
-var _settings = require("javascripts/components/settings");
-
-var _message = require("javascripts/components/message");
-
-var _gather = require("javascripts/components/gather");
-
-var React = require("react");
-var Sound = require("javascripts/components/sound");
-var SoundController = Sound.SoundController;
-var helper = require("javascripts/helper");
-var storageAvailable = helper.storageAvailable;
-var SplashScreen = React.createClass({
- displayName: "SplashScreen",
- getInitialState: function getInitialState() {
- return {
- status: "connecting",
- socket: null
- };
- },
- componentDidMount: function componentDidMount() {
- var _this = this;
-
- var socketUrl = window.location.protocol + "//" + window.location.host;
- var socket = io(socketUrl).on("connect", function () {
- console.log("Connected");
- _this.setState({ status: "connected" });
- socket.on("reconnect", function () {
- console.log("Reconnected");
- }).on("disconnect", function () {
- console.log("Disconnected");
- });
- }).on("error", function (error) {
- console.log(error);
- if (error === "Authentication Failed") {
- _this.setState({ status: "authFailed" });
- } else if (error === "Gather Banned") {
- _this.setState({ status: "banned" });
- }
- });
-
- this.setState({ socket: socket });
- },
- render: function render() {
- var status = this.state.status;
-
- if (status === "connected") {
- return React.createElement(App, { socket: this.state.socket });
- }
-
- var splash = undefined;
- if (status === "authFailed") {
- splash = React.createElement(AuthFailedSplash, null);
- } else if (status === "banned") {
- splash = React.createElement(BannedSplash, null);
- } else if (status === "connecting") {
- splash = React.createElement(ConnectingSplash, null);
- }
-
- return React.createElement(
- "div",
- null,
- React.createElement(
- "div",
- { style: { "minHeight": "750px" } },
- React.createElement(
- "div",
- { className: "container-fluid" },
- splash
- )
- )
- );
- }
-});
-
-var AuthFailedSplash = React.createClass({
- displayName: "AuthFailedSplash",
- render: function render() {
- return React.createElement(
- "div",
- { className: "row", id: "auth-required" },
- React.createElement(
- "div",
- { className: "col-lg-6 col-lg-offset-3" },
- React.createElement(
- "div",
- { className: "add-top jumbotron jumbo-auth text-center" },
- React.createElement(
- "div",
- null,
- React.createElement("img", { src: "/ensl_logo.png", alt: "ENSL Logo" })
- ),
- React.createElement(
- "h3",
- null,
- "You need to be logged in to the ENSL website to access gathers"
- ),
- React.createElement(
- "h3",
- null,
- React.createElement(
- "small",
- null,
- "If you are logged on, try visiting a few pages on ENSL.org so the server can update your cookies"
- )
- ),
- React.createElement(
- "h3",
- null,
- React.createElement(
- "small",
- null,
- "If this error persists please contact an admin to fix it"
- )
- ),
- React.createElement("br", null),
- React.createElement(
- "p",
- null,
- React.createElement(
- "a",
- { className: "btn btn-primary btn-lg", href: "www.ensl.org", role: "button" },
- "Go to website"
- )
- )
- )
- )
- );
- }
-});
-
-var BannedSplash = React.createClass({
- displayName: "BannedSplash",
- render: function render() {
- return React.createElement(
- "div",
- { className: "row" },
- React.createElement(
- "div",
- { className: "col-lg-6 col-lg-offset-3" },
- React.createElement(
- "div",
- { className: "add-top jumbotron jumbo-auth text-center" },
- React.createElement(
- "div",
- null,
- React.createElement("img", { src: "/ensl_logo.png", alt: "ENSL Logo" })
- ),
- React.createElement(
- "h3",
- null,
- "You're currently barred from joining gathers"
- ),
- React.createElement(
- "h3",
- null,
- React.createElement(
- "small",
- null,
- "Either wait for the ban to expire or talk to an admin to get it lifted"
- )
- ),
- React.createElement("br", null),
- React.createElement(
- "p",
- null,
- React.createElement(
- "a",
- { className: "btn btn-primary btn-lg", href: "http://www.ensl.org/bans", role: "button" },
- "See the ban list"
- )
- )
- )
- )
- );
- }
-});
-
-var ConnectingSplash = React.createClass({
- displayName: "ConnectingSplash",
- render: function render() {
- return React.createElement(
- "div",
- { className: "row", id: "authenticating" },
- React.createElement(
- "div",
- { className: "col-lg-6 col-lg-offset-3" },
- React.createElement(
- "div",
- { className: "add-top jumbotron jumbo-auth text-center" },
- React.createElement(
- "div",
- null,
- React.createElement("img", { src: "/ensl_logo.png", className: "jumbo-img", alt: "ENSL Logo" })
- ),
- React.createElement("br", null),
- React.createElement(
- "h3",
- null,
- "Authenticating your ENSL account"
- ),
- React.createElement("br", null),
- React.createElement(
- "div",
- null,
- React.createElement("img", { src: "/spinner.svg", className: "spinner", alt: "Loading" })
- )
- )
- )
- );
- }
-});
-
-var App = React.createClass({
- displayName: "App",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired
- },
-
- getInitialState: function getInitialState() {
- var updateTitle = true;
- var showEventsPanel = true;
-
- if (storageAvailable('localStorage')) {
- if (localStorage.getItem("updateTitle") !== null) {
- updateTitle = JSON.parse(localStorage.getItem("updateTitle"));
- }
- if (localStorage.getItem("showEventsPanel") !== null) {
- showEventsPanel = JSON.parse(localStorage.getItem("showEventsPanel"));
- }
- }
-
- return {
- gather: {
- gatherers: []
- },
- users: [],
- messages: [],
- maps: [],
- user: null,
- servers: [],
- archive: [],
- socket: null,
- events: [],
- updateTitle: updateTitle,
- showEventsPanel: showEventsPanel,
- soundController: new SoundController(),
- showMessageBox: true,
- collapseMenu: false,
- connectionState: "connected"
- };
- },
- updateTitle: function updateTitle() {
- var gather = this.state.gather;
- if (gather && this.state.updateTitle) {
- document.title = "NSL Gathers (" + gather.gatherers.length + "/12)";
- return;
- }
- document.title = "NSL Gathers";
- },
- toggleEventsPanel: function toggleEventsPanel(event) {
- var newState = event.target.checked;
- this.setState({ showEventsPanel: newState });
- if (storageAvailable('localStorage')) {
- localStorage.setItem("showEventsPanel", newState);
- }
- },
- toggleUpdateTitle: function toggleUpdateTitle(event) {
- var newState = event.target.checked;
- this.setState({ updateTitle: newState });
- if (storageAvailable('localStorage')) {
- localStorage.setItem("updateTitle", newState);
- }
- this.updateTitle();
- },
- thisGatherer: function thisGatherer() {
- var gather = this.state.gather;
- var user = this.state.user;
- if (gather && user && gather.gatherers.length) {
- return gather.gatherers.filter(function (gatherer) {
- return gatherer.id === user.id;
- }).pop() || null;
- }
- return null;
- },
- componentDidMount: function componentDidMount() {
- var _this2 = this;
-
- var self = this;
- var socket = this.props.socket;
- var soundController = this.state.soundController;
-
- this.updateTitle();
-
- socket.on('stateChange', function (data) {
- var state = data.state;
-
- if (state.from === 'gathering' && state.to === 'election' && _this2.thisGatherer()) {
- soundController.playGatherMusic();
- }
-
- if (state.from === 'election' && state.to === 'gathering') {
- soundController.stop();
- }
- });
-
- socket.on('event:append', function (data) {
- var events = self.state.events;
- events.unshift(data);
- self.setState({
- events: events.slice(0, 20)
- });
- });
-
- socket.on('users:update', function (data) {
- return self.setState({
- users: data.users,
- user: data.currentUser
- });
- });
-
- socket.on("message:append", function (data) {
- self.setState({
- messages: self.state.messages.concat(data.messages).sort(function (a, b) {
- return new Date(a.createdAt) - new Date(b.createdAt);
- })
- });
- });
-
- socket.on("message:refresh", function (data) {
- self.setState({
- messages: data.messages
- });
- });
-
- socket.on("gather:refresh", function (data) {
- self.setState({
- gather: data.gather,
- maps: data.maps,
- servers: data.servers,
- previousGather: data.previousGather
- });
- _this2.updateTitle();
- });
-
- socket.on("gather:archive:refresh", function (data) {
- self.setState({
- archive: data.archive,
- maps: data.maps,
- servers: data.servers
- });
- });
-
- socket.on("connect", function () {
- _this2.setState({ connectionState: "connected" });
- });
-
- socket.on("disconnect", function () {
- _this2.setState({ connectionState: "disconnected" });
- });
-
- socket.on("reconnecting", function () {
- _this2.setState({ connectionState: "reconnecting" });
- });
-
- socket.on("reconnect", function () {
- _this2.setState({ connectionState: "connected" });
- });
-
- socket.emit("users:refresh");
- socket.emit("message:refresh");
- socket.emit("gather:refresh");
- },
- toggleMessageBox: function toggleMessageBox(e) {
- e.preventDefault();
- console.log("FOO");
- this.setState({
- showMessageBox: !this.state.showMessageBox
- });
- },
- toggleCollapseMenu: function toggleCollapseMenu(e) {
- e.preventDefault();
- this.setState({
- collapseMenu: !this.state.collapseMenu
- });
- },
- render: function render() {
- var socket = this.props.socket;
-
- var eventsPanel = undefined;
- if (this.state.showEventsPanel) {
- eventsPanel = React.createElement(_event.Events, { events: this.state.events });
- }
-
- var profileModal = undefined,
- chatroom = undefined,
- currentUser = undefined;
- if (this.state.user) {
- profileModal = React.createElement(_user.ProfileModal, { user: this.state.user });
- chatroom = React.createElement(_message.Chatroom, { messages: this.state.messages,
- user: this.state.user, socket: socket });
- currentUser = React.createElement(
- "ul",
- { className: "nav navbar-top-links navbar-right", id: "currentuser" },
- React.createElement(_user.CurrentUser, { user: this.state.user })
- );
- }
-
- var user = this.state.user;
- var username = undefined,
- avatar = undefined;
- if (user) {
- username = user.username;
- avatar = user.avatar;
- }
-
- var appClass = ["skin-blue", "sidebar-mini", "fixed"];
- if (this.state.showMessageBox) appClass.push("control-sidebar-open");
- if (this.state.collapseMenu) appClass.push("sidebar-collapse");
-
- var connectionStatus = undefined;
- var connectionState = this.state.connectionState;
- if (connectionState === "connected") {
- connectionStatus = React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-circle text-success" }),
- " Online"
- );
- } else if (connectionState === "reconnecting") {
- connectionStatus = React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-circle text-warning" }),
- " Reconnecting"
- );
- } else if (connectionState === "disconnected") {
- connectionStatus = React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-circle text-danger" }),
- " Disconnected"
- );
- }
-
- return React.createElement(
- "div",
- { className: appClass.join(" ") },
- React.createElement(
- "header",
- { className: "main-header" },
- React.createElement(
- "a",
- { href: "/", className: "logo" },
- React.createElement(
- "span",
- { className: "logo-mini" },
- "NSL Gathers"
- ),
- React.createElement(
- "span",
- { className: "logo-lg" },
- "NSL Gathers"
- )
- ),
- React.createElement(
- "nav",
- { className: "navbar navbar-static-top", role: "navigation" },
- React.createElement(
- "a",
- { href: "#", className: "sidebar-toggle", onClick: this.toggleCollapseMenu, role: "button" },
- React.createElement(
- "span",
- { className: "sr-only" },
- "Toggle navigation"
- )
- ),
- React.createElement(
- "div",
- { className: "navbar-custom-menu" },
- React.createElement(
- "ul",
- { className: "nav navbar-nav" },
- React.createElement(
- "li",
- { className: "dropdown messages-menu" },
- React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-headphones" })
- )
- ),
- React.createElement(
- "li",
- { className: "dropdown messages-menu" },
- React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-newspaper-o" }),
- React.createElement(
- "span",
- { className: "label label-success" },
- "4"
- )
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", onClick: this.toggleMessageBox },
- React.createElement("i", { className: "fa fa-comment" })
- )
- )
- )
- )
- )
- ),
- React.createElement(
- "aside",
- { className: "main-sidebar" },
- React.createElement(
- "section",
- { className: "sidebar", style: { height: "auto" } },
- React.createElement(
- "div",
- { className: "user-panel" },
- React.createElement(
- "div",
- { className: "pull-left image" },
- React.createElement("img", { src: avatar, className: "img-circle", alt: "User Image" })
- ),
- React.createElement(
- "div",
- { className: "pull-left info" },
- React.createElement(
- "p",
- null,
- username
- ),
- connectionStatus
- )
- ),
- React.createElement(
- "ul",
- { className: "sidebar-menu" },
- React.createElement(
- "li",
- { className: "header" },
- "MAIN NAVIGATION"
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-dashboard" }),
- " ",
- React.createElement(
- "span",
- null,
- "Online"
- )
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-dashboard" }),
- " ",
- React.createElement(
- "span",
- null,
- "Teamspeak"
- )
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "fa fa-dashboard" }),
- " ",
- React.createElement(
- "span",
- null,
- "Info"
- )
- )
- )
- )
- )
- ),
- React.createElement(
- "div",
- { className: "content-wrapper", style: { "minHeight": "916px" } },
- React.createElement(
- "section",
- { className: "content-header" },
- React.createElement(
- "h1",
- null,
- "Gathers",
- React.createElement(
- "small",
- null,
- "beta"
- )
- )
- ),
- React.createElement(
- "section",
- { className: "content" },
- React.createElement(
- "p",
- null,
- "Foo"
- )
- )
- ),
- React.createElement(
- "aside",
- { className: "control-sidebar control-sidebar-dark", style: { "position": "fixed", "height": "auto" } },
- React.createElement(
- "div",
- null,
- React.createElement(
- "div",
- null,
- React.createElement(
- "h3",
- { className: "control-sidebar-heading" },
- "Recent Activity"
- ),
- React.createElement(
- "ul",
- { className: "control-sidebar-menu" },
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#" },
- React.createElement("i", { className: "menu-icon fa fa-birthday-cake bg-red" }),
- React.createElement(
- "div",
- { className: "menu-info" },
- React.createElement(
- "h4",
- { className: "control-sidebar-subheading" },
- "Langdon's Birthday"
- ),
- React.createElement(
- "p",
- null,
- "Will be 23 on April 24th"
- )
- )
- )
- )
- )
- )
- )
- ),
- React.createElement("div", { className: "control-sidebar-bg", style: { "position": "fixed", "height": "auto" } })
- );
-
- return React.createElement(
- "div",
- { id: "wrapper" },
- React.createElement(
- "nav",
- { className: "navbar navbar-default navbar-static-top",
- role: "navigation",
- style: { marginBottom: "0" } },
- React.createElement(
- "div",
- { className: "navbar-header" },
- React.createElement(
- "a",
- { className: "navbar-brand", href: "/" },
- "NSL Gathers ",
- React.createElement(
- "small",
- null,
- React.createElement(
- "i",
- null,
- "Alpha"
- )
- )
- )
- ),
- currentUser,
- React.createElement(
- "ul",
- { className: "nav navbar-top-links navbar-right", id: "soundcontroller" },
- React.createElement(_sound.SoundPanel, { soundController: this.state.soundController })
- ),
- React.createElement(_teamspeak.TeamSpeakButton, null),
- React.createElement(
- "ul",
- { className: "nav navbar-top-links navbar-right" },
- React.createElement(
- "li",
- { className: "dropdown" },
- React.createElement(
- "a",
- { href: "#" },
- "Info  ",
- React.createElement("i", { className: "fa fa-caret-down" })
- ),
- React.createElement(
- "ul",
- { className: "dropdown-menu" },
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "https://github.com/cblanc/sws_gathers", target: "_blank" },
- React.createElement(
- "i",
- { className: "fa fa-github" },
- "Â "
- ),
- "Â Github"
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "http://steamcommunity.com/id/nslgathers", target: "_blank" },
- React.createElement(
- "i",
- { className: "fa fa-external-link" },
- "Â "
- ),
- "Â Steam Bot"
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "http://www.ensl.org/articles/464", target: "_blank" },
- React.createElement(
- "i",
- { className: "fa fa-external-link" },
- "Â "
- ),
- "Â Gather Rules"
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "/messages", target: "_blank" },
- React.createElement(
- "i",
- { className: "fa fa-external-link" },
- "Â "
- ),
- "Â Message Archive"
- )
- )
- )
- )
- )
- ),
- React.createElement(_user.AdminPanel, { socket: socket }),
- React.createElement(_settings.SettingsPanel, {
- toggleEventsPanel: this.toggleEventsPanel,
- showEventsPanel: this.state.showEventsPanel,
- toggleUpdateTitle: this.toggleUpdateTitle,
- updateTitle: this.state.updateTitle }),
- React.createElement(_teamspeak.TeamSpeakModal, null),
- profileModal,
- React.createElement(
- "div",
- { style: { minHeight: "750px" } },
- React.createElement(
- "div",
- { className: "container-fluid" },
- React.createElement(
- "div",
- { className: "row" },
- React.createElement(
- "div",
- { className: "col-md-2 hidden-xs" },
- React.createElement(
- "ul",
- { className: "nav", id: "side-menu" },
- React.createElement(_user.UserMenu, { users: this.state.users, user: this.state.user,
- socket: socket })
- )
- ),
- React.createElement(
- "div",
- { className: "col-md-4", id: "chatroom" },
- chatroom
- ),
- React.createElement(
- "div",
- { className: "col-md-6", id: "gathers" },
- React.createElement(_gather.Gather, {
- socket: socket,
- maps: this.state.maps,
- user: this.state.user,
- gather: this.state.gather,
- servers: this.state.servers,
- thisGatherer: this.thisGatherer(),
- previousGather: this.state.previousGather,
- soundController: this.state.soundController }),
- eventsPanel,
- React.createElement("hr", null),
- React.createElement(_gather.ArchivedGathers, { archive: this.state.archive,
- maps: this.state.maps,
- servers: this.state.servers })
- )
- )
- )
- )
- );
- }
-});
-
-module.exports = SplashScreen;
-});
-
-require.register("javascripts/components/message", function(exports, require, module) {
-"use strict";
-
-var React = require("react");
-var ReactDOM = require("react-dom");
-var ReactEmoji = require("react-emoji");
-var ReactAutolink = require("react-autolink");
-var MessageBrowser = React.createClass({
- displayName: "MessageBrowser",
- getInitialState: function getInitialState() {
- return {
- browserState: "",
- messages: [],
- page: 0,
- limit: 250,
- search: ""
- };
- },
- handleNextPage: function handleNextPage(e) {
- e.preventDefault();
- var page = this.state.page;
- this.setState({ page: page + 1 });
- this.loadMessages();
- },
- handlePreviousPage: function handlePreviousPage(e) {
- e.preventDefault();
- var page = this.state.page;
- if (page < 1) return;
- this.setState({ page: page - 1 });
- this.loadMessages();
- },
- pageHandlers: function pageHandlers() {
- var previous = undefined;
- if (this.state.page > 0) {
- previous = React.createElement(
- "a",
- { className: "btn btn-xs btn-primary add-right",
- onClick: this.handlePreviousPage },
- "Prev"
- );
- }
- var next = undefined;
- if (this.state.messages.length === this.state.limit) {
- next = React.createElement(
- "a",
- { className: "btn btn-xs btn-primary",
- onClick: this.handleNextPage },
- "Next"
- );
- }
- return React.createElement(
- "div",
- null,
- previous,
- React.createElement(
- "span",
- { className: "add-right" },
- this.state.page
- ),
- next
- );
- },
- loadMessages: function loadMessages() {
- var _this = this;
-
- var limit = this.state.limit;
- var page = this.state.page;
- var data = {
- limit: limit,
- page: page
- };
-
- if (this.state.search.length) {
- data.query = this.state.search;
- }
-
- this.setState({ browserState: "Retrieving messages" });
- $.ajax({
- url: "/api/messages",
- data: data
- }).done(function (data) {
- _this.setState({
- messages: data.messages,
- browserState: ""
- });
- }).fail(function (error) {
- console.error(error);
- _this.setState({
- browserState: "Unable to retrieve messages."
- });
- });
- },
- componentDidMount: function componentDidMount() {
- this.loadMessages();
- },
- updateLimit: function updateLimit(e) {
- var newLimit = parseInt(e.target.value, 10);
- if (isNaN(newLimit) || newLimit > 250) newLimit = 250;
- this.setState({ limit: newLimit });
- },
- updateSearch: function updateSearch(e) {
- this.setState({ search: e.target.value });
- },
- render: function render() {
- var browserState = undefined;
- if (this.state.browserState.length) {
- browserState = React.createElement(
- "div",
- { className: "col-xs-7" },
- React.createElement(
- "div",
- { className: "well" },
- this.state.browserState
- )
- );
- }
- var messages = this.state.messages.map(function (message) {
- return React.createElement(
- "tr",
- { key: message._id },
- React.createElement(
- "td",
- { className: "col-xs-2" },
- new Date(message.createdAt).toString()
- ),
- React.createElement(
- "td",
- { className: "col-xs-3" },
- message.author.username
- ),
- React.createElement(
- "td",
- { className: "col-xs-5" },
- message.content
- ),
- React.createElement(
- "td",
- { className: "col-xs-2" },
- message._id
- )
- );
- });
- return React.createElement(
- "div",
- { className: "row" },
- React.createElement(
- "div",
- { className: "col-xs-5" },
- React.createElement(
- "div",
- { className: "form-horizontal" },
- React.createElement(
- "div",
- { className: "form-group" },
- React.createElement(
- "label",
- { className: "col-sm-3 control-label" },
- "Max Results"
- ),
- React.createElement(
- "div",
- { className: "col-sm-9" },
- React.createElement("input", { type: "number", className: "form-control",
- onChange: this.updateLimit,
- value: this.state.limit })
- )
- ),
- React.createElement(
- "div",
- { className: "form-group" },
- React.createElement(
- "label",
- { className: "col-sm-3 control-label" },
- "Search Filter"
- ),
- React.createElement(
- "div",
- { className: "col-sm-9" },
- React.createElement("input", { type: "text", className: "form-control",
- onChange: this.updateSearch,
- value: this.state.search })
- )
- ),
- React.createElement(
- "div",
- { className: "form-group" },
- React.createElement(
- "div",
- { className: "col-sm-offset-3 col-sm-9" },
- React.createElement(
- "button",
- {
- className: "btn btn-primary",
- onClick: this.loadMessages },
- "Search"
- )
- )
- ),
- React.createElement(
- "div",
- { className: "row" },
- React.createElement(
- "div",
- { className: "col-sm-offset-3 col-sm-9" },
- React.createElement(
- "p",
- null,
- "Page Control"
- ),
- this.pageHandlers()
- )
- )
- )
- ),
- browserState,
- React.createElement(
- "div",
- { className: "col-xs-12" },
- React.createElement(
- "table",
- { className: "table" },
- React.createElement(
- "thead",
- null,
- React.createElement(
- "tr",
- null,
- React.createElement(
- "th",
- null,
- "Date"
- ),
- React.createElement(
- "th",
- null,
- "Author"
- ),
- React.createElement(
- "th",
- null,
- "Message"
- ),
- React.createElement(
- "th",
- null,
- "ID"
- )
- )
- ),
- React.createElement(
- "tbody",
- null,
- messages
- )
- )
- )
- );
- }
-});
-
-var Chatroom = exports.Chatroom = React.createClass({
- displayName: "Chatroom",
-
- propTypes: {
- messages: React.PropTypes.array.isRequired,
- socket: React.PropTypes.object.isRequired,
- user: React.PropTypes.object.isRequired
- },
-
- getInitialState: function getInitialState() {
- return {
- autoScroll: true
- };
- },
- componentDidMount: function componentDidMount() {
- var self = this;
-
- this.scrollListener = _.debounce(function (event) {
- self.temporarilyDisableAutoScroll(event);
- }, 300, {
- leading: false,
- trailing: true
- });
-
- var node = ReactDOM.findDOMNode(this.refs.messageContainer);
- node.addEventListener('scroll', this.scrollListener);
-
- this.scrollToBottom();
- },
- componentWillUnmount: function componentWillUnmount() {
- node.removeEventListener('scroll', this.scrollListener);
- clearTimeout(this.disableScrollTimer);
- },
- loadMoreMessages: function loadMoreMessages() {
- var earliestMessage = this.props.messages[0];
- if (earliestMessage === undefined) return;
- this.props.socket.emit("message:refresh", {
- before: earliestMessage.createdAt
- });
- },
- sendMessage: function sendMessage(message) {
- this.props.socket.emit("newMessage", { message: message });
- },
- clearAutoScrollTimeout: function clearAutoScrollTimeout() {
- if (this.disableScrollTimer) clearTimeout(this.disableScrollTimer);
- },
- temporarilyDisableAutoScroll: function temporarilyDisableAutoScroll(event) {
- var self = this;
- var node = event.target;
- if (node) {
- if (node.scrollHeight - node.scrollTop === node.clientHeight) {
- this.setState({ autoScroll: true });
- this.clearAutoScrollTimeout();
- }
- if (node.scrollHeight - node.scrollTop - node.clientHeight < 50) return;
- }
- this.setState({ autoScroll: false });
- this.clearAutoScrollTimeout();
- this.disableScrollTimer = setTimeout(function () {
- self.setState({
- autoScroll: true
- });
- }, 10000);
- },
- componentDidUpdate: function componentDidUpdate() {
- this.scrollToBottom();
- },
- scrollToBottom: function scrollToBottom() {
- if (!this.state.autoScroll) return;
- var node = ReactDOM.findDOMNode(this.refs.messageContainer);
- node.scrollTop = node.scrollHeight;
- },
- render: function render() {
- var _this2 = this;
-
- var socket = this.props.socket;
- var messages = this.props.messages.map(function (message) {
- if (message) {
- return React.createElement(ChatMessage, { message: message,
- key: message._id,
- socket: socket,
- user: _this2.props.user });
- }
- });
- return React.createElement(
- "div",
- { className: "panel panel-primary chatbox" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- "Gather Chat"
- ),
- React.createElement(
- "div",
- { className: "panel-body" },
- React.createElement(
- "ul",
- { className: "chat", id: "chatmessages", ref: "messageContainer" },
- React.createElement(
- "li",
- { className: "text-center" },
- React.createElement(
- "a",
- { href: "#",
- onClick: this.loadMoreMessages,
- className: "btn btn-primary btn-xs" },
- "Load more messages"
- )
- ),
- messages
- )
- ),
- React.createElement(
- "div",
- { className: "panel-footer" },
- React.createElement(MessageBar, { socket: socket })
- )
- );
- }
-});
-
-var imgurRegex = /^(https?:\/\/i\.imgur\.com\/\S*\.(jpg|png))$/i;
-
-var ChatMessage = React.createClass({
- displayName: "ChatMessage",
-
- propTypes: {
- user: React.PropTypes.object.isRequired,
- socket: React.PropTypes.object.isRequired,
- message: React.PropTypes.object.isRequired
- },
-
- mixins: [ReactAutolink, ReactEmoji],
-
- getInitialState: function getInitialState() {
- return {
- createdAt: ""
- };
- },
- updateCreatedAt: function updateCreatedAt() {
- var self = this;
- if (this.props.message.createdAt) {
- self.setState({
- createdAt: $.timeago(self.props.message.createdAt)
- });
- }
- },
- componentWillMount: function componentWillMount() {
- this.updateCreatedAt();
- },
- componentDidMount: function componentDidMount() {
- this.interval = setInterval(this.updateCreatedAt, 60000);
- },
-
- componentWillUnmount: function componentWillUnmount() {
- clearInterval(this.interval);
- },
-
- messageContent: function messageContent() {
- var self = this;
- var message = self.props.message.content;
- if (message.match(imgurRegex)) {
- return React.createElement(
- "div",
- { className: "imgur-container" },
- React.createElement(
- "a",
- { href: message, target: "_blank" },
- React.createElement("img", { className: "imgur-chat", src: message })
- )
- );
- }
-
- return self.autolink(message, {
- target: "_blank",
- rel: "nofollow"
- }).map(function (elem) {
- if (_.isString(elem)) {
- return self.emojify(elem);
- } else {
- return elem;
- }
- });
- },
-
- render: function render() {
- var deleteButton = undefined;
- var user = this.props.user;
- if (user && user.admin) {
- deleteButton = React.createElement(DeleteMessageButton, { messageId: this.props.message._id,
- socket: this.props.socket });
- }
- return React.createElement(
- "li",
- { className: "left clearfix" },
- React.createElement(
- "span",
- { className: "chat-img pull-left" },
- React.createElement("img", {
- src: this.props.message.author.avatar,
- alt: "User Avatar",
- height: "40",
- width: "40",
- className: "img-circle" })
- ),
- React.createElement(
- "div",
- { className: "chat-body clearfix" },
- React.createElement(
- "div",
- { className: "header" },
- React.createElement(
- "strong",
- { className: "primary-font" },
- this.props.message.author.username
- ),
- React.createElement(
- "small",
- { className: "pull-right text-muted" },
- deleteButton,
- React.createElement(
- "span",
- { className: "hidden-xs" },
- React.createElement("i", { className: "fa fa-clock-o fa-fw" }),
- this.state.createdAt
- )
- )
- ),
- React.createElement(
- "p",
- { className: "wordwrap" },
- this.messageContent()
- )
- )
- );
- }
-});
-
-var DeleteMessageButton = React.createClass({
- displayName: "DeleteMessageButton",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired
- },
-
- handleClick: function handleClick(e) {
- e.preventDefault();
- this.props.socket.emit("message:delete", {
- id: this.props.messageId
- });
- },
- render: function render() {
- return React.createElement(
- "a",
- { href: "#", onClick: this.handleClick },
- React.createElement("i", { className: "fa fa-trash-o" })
- );
- }
-});
-
-var MessageBar = React.createClass({
- displayName: "MessageBar",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired
- },
-
- sendMessage: function sendMessage(content) {
- this.props.socket.emit("message:new", {
- content: content
- });
- },
- getInitialState: function getInitialState() {
- return {
- statusMessage: null
- };
- },
- checkInputLength: function checkInputLength() {
- var input = ReactDOM.findDOMNode(this.refs.content).value;
- var currentStatusMessage = this.state.statusMessage;
- if (input.length > 256) {
- return this.setState({
- statusMessage: "Maximum of 256 characters will be saved"
- });
- }
- if (currentStatusMessage !== null) {
- this.setState({
- statusMessage: null
- });
- }
- },
- handleInputChange: function handleInputChange() {
- // Noop, later assigned as debounced method in componentWillMount
- },
- handleSubmit: function handleSubmit(e) {
- e.preventDefault();
- var content = ReactDOM.findDOMNode(this.refs.content).value.trim();
- if (!content) return;
- ReactDOM.findDOMNode(this.refs.content).value = '';
- this.sendMessage(content);
- return;
- },
- componentWillMount: function componentWillMount() {
- this.handleInputChange = _.debounce(this.checkInputLength, {
- leading: false,
- trailing: true
- });
- },
- render: function render() {
- var statusMessage = undefined;
- if (this.state.statusMessage !== null) {
- statusMessage = React.createElement(
- "div",
- { className: "input-group" },
- React.createElement(
- "small",
- null,
- this.state.statusMessage
- )
- );
- }
- return React.createElement(
- "form",
- { onSubmit: this.handleSubmit, autoComplete: "off" },
- React.createElement(
- "div",
- { className: "input-group" },
- React.createElement("input", {
- id: "btn-input",
- type: "text",
- className: "form-control",
- ref: "content",
- onChange: this.handleInputChange,
- autoComplete: "off",
- placeholder: "Be polite please..." }),
- React.createElement(
- "span",
- { className: "input-group-btn" },
- React.createElement("input", {
- type: "submit",
- className: "btn btn-primary",
- id: "btn-chat",
- value: "Send" })
- )
- ),
- statusMessage
- );
- }
-});
-});
-
-require.register("javascripts/components/settings", function(exports, require, module) {
-"use strict";
-
-var React = require("react");
-
-var SettingsPanel = exports.SettingsPanel = React.createClass({
- displayName: "SettingsPanel",
-
- propTypes: {
- toggleUpdateTitle: React.PropTypes.func.isRequired,
- updateTitle: React.PropTypes.bool.isRequired,
- toggleEventsPanel: React.PropTypes.func.isRequired,
- showEventsPanel: React.PropTypes.bool.isRequired
- },
-
- render: function render() {
- return React.createElement(
- "div",
- { className: "modal fade", id: "settingsmodal" },
- React.createElement(
- "div",
- { className: "modal-dialog" },
- React.createElement(
- "div",
- { className: "modal-content" },
- React.createElement(
- "div",
- { className: "modal-header" },
- React.createElement(
- "button",
- { type: "button", className: "close", "data-dismiss": "modal",
- "aria-label": "Close" },
- React.createElement(
- "span",
- { "aria-hidden": "true" },
- "×"
- )
- ),
- React.createElement(
- "h4",
- { className: "modal-title" },
- "Settings"
- )
- ),
- React.createElement(
- "div",
- { className: "modal-body" },
- React.createElement(
- "div",
- { className: "checkbox" },
- React.createElement(
- "label",
- { className: "checkbox-inline" },
- React.createElement("input", { type: "checkbox",
- onChange: this.props.toggleUpdateTitle,
- checked: this.props.updateTitle }),
- " Update Gather Status in Title (Cabooble Mode) - May require refresh"
- )
- )
- ),
- React.createElement(
- "div",
- { className: "modal-body" },
- React.createElement(
- "div",
- { className: "checkbox" },
- React.createElement(
- "label",
- { className: "checkbox-inline" },
- React.createElement("input", { type: "checkbox",
- onChange: this.props.toggleEventsPanel,
- checked: this.props.showEventsPanel }),
- " Show events panel"
- )
- )
- ),
- React.createElement(
- "div",
- { className: "modal-footer" },
- React.createElement(
- "button",
- { type: "button", className: "btn btn-default",
- "data-dismiss": "modal" },
- "Close"
- )
- )
- )
- )
- );
- }
-});
-});
-
-require.register("javascripts/components/snowMachine", function(exports, require, module) {
-"use strict";
-
-var React = require("react");
-
-var SnowMachineMenu = React.createClass({
- displayName: "SnowMachineMenu",
- getInitialState: function getInitialState() {
- return {
- snowMachine: null
- };
- },
- componentDidMount: function componentDidMount() {
- var snowMachine = new SnowMachine();
- snowMachine.start();
- this.setState({ snowMachine: snowMachine });
- },
- toggle: function toggle() {
- var snowMachine = this.state.snowMachine;
- if (snowMachine.timer) {
- snowMachine.stop();
- } else {
- snowMachine.start();
- }
- },
- render: function render() {
- return React.createElement(
- "ul",
- { className: "nav navbar-top-links navbar-right" },
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", onClick: this.toggle },
- "Snow"
- )
- )
- );
- }
-});
-});
-
-require.register("javascripts/components/sound", function(exports, require, module) {
-"use strict";
-
-var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
-
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-var $ = require("jquery");
-var React = require("react");
-var Howl = require("howler").Howl;
-var Howler = require("howler").Howler;
-var helper = require("javascripts/helper");
-var storageAvailable = helper.storageAvailable;
-
-var SoundController = function () {
- function SoundController() {
- var _this = this;
-
- _classCallCheck(this, SoundController);
-
- if (Howl === undefined) {
- throw new Error("Howl.js required to created sound controller");
- }
-
- this.MINIMUM_PLAY_INTERVAL = 20000;
-
- this.playGatherMusic = _.throttle(function () {
- _this.gather.music.play();
- }, this.MINIMUM_PLAY_INTERVAL);
-
- this.isMuted = Howler._muted;
-
- var gatherMusic = undefined;
- if (storageAvailable("localStorage")) {
- var volume = localStorage.getItem("gatherVolume");
- if (volume !== undefined) Howler.volume(volume);
- gatherMusic = localStorage.getItem("gatherMusic");
- }
-
- this.tunes = {
- "classic": {
- description: "Gathers Classic",
- url: 'http://www.ensl.org/files/audio/gather-1.mp3'
- },
- "nights": {
- description: "Nights",
- url: 'http://www.ensl.org/files/audio/nights.mp3'
- },
- "robby": {
- description: "Robby",
- url: 'http://www.ensl.org/files/audio/robby.mp3'
- },
- "america": {
- description: "Infamous",
- url: 'http://www.ensl.org/files/audio/america.mp3'
- },
- "prommah": {
- description: "Prommah",
- url: 'http://www.ensl.org/files/audio/prommah.mp3'
- },
- "turts": {
- description: "Gorges Rock your Ass",
- url: 'http://www.ensl.org/files/audio/turts.mp3'
- },
- "skyice": {
- description: "Skyice",
- url: 'http://www.ensl.org/files/audio/skyice.mp3'
- },
- "justwannahavefun": {
- description: "Gorges just want to have fun",
- url: 'http://www.ensl.org/files/audio/justwannahavefun.mp3'
- },
- "eyeofthegorgie": {
- description: "Eye of the Gorgie",
- url: 'http://www.ensl.org/files/audio/eyeofthegorgie.mp3'
- },
- "boondock": {
- description: "Boondock Marines",
- url: 'http://www.ensl.org/files/audio/boondock.mp3'
- },
- "preclassic": {
- description: "Old Gathers Classic",
- url: 'http://www.ensl.org/files/audio/gather-5.mp3'
- }
- };
-
- this.setupGatherMusic(gatherMusic);
- }
-
- _createClass(SoundController, [{
- key: "mute",
- value: function mute() {
- this.isMuted = true;
- return Howler.mute();
- }
- }, {
- key: "unMute",
- value: function unMute() {
- this.isMuted = false;
- return Howler.unmute();
- }
- }, {
- key: "getVolume",
- value: function getVolume() {
- return Howler.volume();
- }
- }, {
- key: "setVolume",
- value: function setVolume(val) {
- if (val === undefined || typeof val !== 'number' || Math.abs(val) > 1) return;
- if (storageAvailable("localStorage")) {
- localStorage.setItem("gatherVolume", val);
- }
- return Howler.volume(val);
- }
- }, {
- key: "play",
- value: function play(music) {
- if (this.gather && this.gather.music) return this.gather.music.play();
- }
- }, {
- key: "stop",
- value: function stop(music) {
- if (this.gather && this.gather.music) return this.gather.music.stop();
- }
- }, {
- key: "defaultGatherMusic",
- value: function defaultGatherMusic() {
- return "classic";
- }
- }, {
- key: "setupGatherMusic",
- value: function setupGatherMusic(musicName) {
- var self = this;
- var gatherMusic = self.tunes[musicName];
-
- if (!gatherMusic) {
- musicName = this.defaultGatherMusic();
- gatherMusic = self.tunes[musicName];
- }
-
- if (self.gather && self.gather.name === musicName) return;
-
- // Stop if already playing
- if (self.gather && self.gather.music) {
- self.gather.music.stop();
- }
-
- var tune = self.tunes[musicName];
- self.gather = {
- name: musicName,
- description: tune.description,
- url: tune.url,
- music: new Howl({
- urls: [tune.url]
- })
- };
- }
- }]);
-
- return SoundController;
-}();
-
-var MusicSelector = React.createClass({
- displayName: "MusicSelector",
- getInitialState: function getInitialState() {
- return {
- music: this.selectedMusic()
- };
- },
- selectedMusic: function selectedMusic() {
- if (storageAvailable("localStorage")) {
- return localStorage.getItem("gatherMusic") || this.props.soundController.defaultGatherMusic();
- } else {
- return this.props.soundController.defaultGatherMusic();
- }
- },
- setMusic: function setMusic(event) {
- var name = event.target.value;
- var soundController = this.props.soundController;
- var selectedTune = soundController.tunes[name];
- if (selectedTune === undefined) return;
- this.setState({ music: name });
- soundController.setupGatherMusic(name);
- if (storageAvailable("localStorage")) {
- localStorage.setItem("gatherMusic", name);
- }
- },
- render: function render() {
- var soundController = this.props.soundController;
- var tunes = [];
- for (var attr in soundController.tunes) {
- var o = soundController.tunes[attr];
- o.id = attr;
- tunes.push(o);
- }
- var options = tunes.map(function (tune) {
- return React.createElement(
- "option",
- { key: tune.id, value: tune.id },
- tune.description
- );
- });
- return React.createElement(
- "div",
- { className: "form-group music-select" },
- React.createElement(
- "label",
- null,
- "Music"
- ),
- React.createElement(
- "select",
- {
- className: "form-control",
- defaultValue: this.state.music,
- onChange: this.setMusic,
- value: this.state.music },
- options
- )
- );
- }
-});
-
-var SoundPanel = React.createClass({
- displayName: "SoundPanel",
- componentDidMount: function componentDidMount() {
- var soundController = this.props.soundController;
- var scale = 10;
-
- $('a#sound-dropdown').on('click', function (event) {
- $(this).parent().toggleClass('open');
- });
-
- $("#volume-slide").slider({
- min: 0,
- max: scale,
- step: 1
- }).on("slideStop", function (_ref) {
- var value = _ref.value;
-
- soundController.setVolume(value / scale);
- }).slider('setValue', soundController.getVolume() * scale);
- },
- mute: function mute() {
- this.props.soundController.mute();
- this.forceUpdate();
- },
- unMute: function unMute() {
- this.props.soundController.unMute();
- this.forceUpdate();
- },
- play: function play() {
- this.props.soundController.play();
- },
- stop: function stop() {
- this.props.soundController.stop();
- },
- render: function render() {
- var soundController = this.props.soundController;
- var mutedIcon = undefined,
- mutedButton = undefined;
- if (soundController.isMuted) {
- mutedIcon = React.createElement("i", { className: "fa fa-volume-off fa-fw" });
- mutedButton = React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", onClick: this.unMute },
- mutedIcon,
- "Â Muted"
- )
- );
- } else {
- mutedIcon = React.createElement("i", { className: "fa fa-volume-up fa-fw" });
- mutedButton = React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", onClick: this.mute },
- mutedIcon,
- "Â Unmuted"
- )
- );
- }
- return React.createElement(
- "ul",
- { className: "nav navbar-top-links navbar-right" },
- React.createElement(
- "li",
- { className: "dropdown" },
- React.createElement(
- "a",
- { className: "dropdown-toggle", href: "#", id: "sound-dropdown" },
- "Sound  ",
- mutedIcon,
- "Â ",
- React.createElement("i", { className: "fa fa-caret-down" })
- ),
- React.createElement(
- "ul",
- { className: "dropdown-menu", id: "sound-dropdown" },
- mutedButton,
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", onClick: this.play },
- React.createElement("i", { className: "fa fa-play" }),
- "Â Play"
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", onClick: this.stop },
- React.createElement("i", { className: "fa fa-stop" }),
- "Â Stop"
- )
- ),
- React.createElement("hr", null),
- React.createElement(
- "li",
- null,
- React.createElement(
- "div",
- { className: "volume-slide" },
- React.createElement(
- "label",
- null,
- "Volume"
- ),
- React.createElement("div", { id: "volume-slide" })
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(MusicSelector, { soundController: soundController })
- )
- )
- )
- );
- }
-});
-
-module.exports = {
- SoundController: SoundController,
- SoundPanel: SoundPanel
-};
-});
-
-require.register("javascripts/components/teamspeak", function(exports, require, module) {
-"use strict";
-
-var React = require("react");
-
-var teamspeakDefaults = {
- url: "ts3server://ensl.org/",
- password: "ns2gather",
- alien: {
- channel: "NS2 Gather/Gather #1/Alien",
- password: "ns2gather"
- },
- marine: {
- channel: "NS2 Gather/Gather #1/Marine",
- password: "ns2gather"
- }
-};
-
-var TeamSpeakButton = exports.TeamSpeakButton = React.createClass({
- displayName: "TeamSpeakButton",
- getDefaultProps: function getDefaultProps() {
- return teamspeakDefaults;
- },
- marineUrl: function marineUrl() {
- return this.teamSpeakUrl(this.props.marine);
- },
- alienUrl: function alienUrl() {
- return this.teamSpeakUrl(this.props.alien);
- },
- teamSpeakUrl: function teamSpeakUrl(conn) {
- var params = "channel=" + encodeURIComponent(conn.channel) + "&\n\t\t\tchannelpassword=" + encodeURIComponent(conn.password);
- return this.props.url + "?" + params;
- },
- render: function render() {
- return React.createElement(
- "ul",
- { className: "nav navbar-top-links navbar-right" },
- React.createElement(
- "li",
- { className: "dropdown" },
- React.createElement(
- "a",
- { className: "dropdown-toggle", "data-toggle": "dropdown", href: "#" },
- "Teamspeak  ",
- React.createElement("i", { className: "fa fa-caret-down" })
- ),
- React.createElement(
- "ul",
- { className: "dropdown-menu" },
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: this.props.url },
- "Join Teamspeak Lobby"
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: this.marineUrl() },
- "Join Marine Teamspeak"
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: this.alienUrl() },
- "Join Alien Teamspeak"
- )
- ),
- React.createElement("li", { role: "separator", className: "divider" }),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", "data-toggle": "modal", "data-target": "#teamspeakmodal" },
- "Teamspeak Details"
- )
- )
- )
- )
- );
- }
-});
-
-var TeamSpeakModal = exports.TeamSpeakModal = React.createClass({
- displayName: "TeamSpeakModal",
- getDefaultProps: function getDefaultProps() {
- return teamspeakDefaults;
- },
- render: function render() {
- return React.createElement(
- "div",
- { className: "modal fade text-left", id: "teamspeakmodal" },
- React.createElement(
- "div",
- { className: "modal-dialog" },
- React.createElement(
- "div",
- { className: "modal-content" },
- React.createElement(
- "div",
- { className: "modal-header" },
- React.createElement(
- "button",
- { type: "button",
- className: "close",
- "data-dismiss": "modal",
- "aria-label": "Close" },
- React.createElement(
- "span",
- { "aria-hidden": "true" },
- "×"
- )
- ),
- React.createElement(
- "h4",
- { className: "modal-title" },
- "Teamspeak Server Information"
- )
- ),
- React.createElement(
- "div",
- { className: "modal-body" },
- React.createElement(
- "dl",
- { className: "dl-horizontal" },
- React.createElement(
- "dt",
- null,
- "Server"
- ),
- React.createElement(
- "dd",
- null,
- this.props.url
- ),
- React.createElement(
- "dt",
- null,
- "Password"
- ),
- React.createElement(
- "dd",
- null,
- this.props.password
- ),
- React.createElement(
- "dt",
- null,
- "Marine Channel"
- ),
- React.createElement(
- "dd",
- null,
- this.props.marine.channel
- ),
- React.createElement(
- "dt",
- null,
- "Alien Channel"
- ),
- React.createElement(
- "dd",
- null,
- this.props.alien.channel
- )
- )
- )
- )
- )
- );
- }
-});
-});
-
-require.register("javascripts/components/user", function(exports, require, module) {
-"use strict";
-
-var _gather = require("javascripts/components/gather");
-
-var React = require("react");
-var helper = require("javascripts/helper");
-var enslUrl = helper.enslUrl;
-var hiveUrl = helper.hiveUrl;
-var modalId = helper.modalId;
-
-var UserLogin = React.createClass({
- displayName: "UserLogin",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired
- },
-
- authorizeId: function authorizeId(id) {
- this.props.socket.emit("users:authorize", {
- id: parseInt(id, 10)
- });
- },
- handleSubmit: function handleSubmit(e) {
- e.preventDefault();
- var id = React.findDOMNode(this.refs.authorize_id).value.trim();
- if (!id) return;
- React.findDOMNode(this.refs.authorize_id).value = '';
- this.authorizeId(id);
- },
- render: function render() {
- return React.createElement(
- "form",
- { onSubmit: this.handleSubmit },
- React.createElement(
- "div",
- { className: "input-group signin" },
- React.createElement("input", {
- id: "btn-input",
- type: "text",
- className: "form-control",
- ref: "authorize_id",
- placeholder: "Change user" }),
- React.createElement(
- "span",
- { className: "input-group-btn" },
- React.createElement("input", {
- type: "submit",
- className: "btn btn-primary",
- id: "btn-chat",
- value: "Assume ID" })
- )
- )
- );
- }
-});
-
-var DisconnectUserButton = React.createClass({
- displayName: "DisconnectUserButton",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- id: React.PropTypes.number.isRequired
- },
-
- getDefaultProps: function getDefaultProps() {
- return {
- id: null
- };
- },
- disconnectUser: function disconnectUser() {
- this.props.socket.emit("users:disconnect", {
- id: this.props.id
- });
- },
- render: function render() {
- return React.createElement(
- "button",
- {
- className: "btn btn-danger",
- onClick: this.disconnectUser },
- "Disconnect User"
- );
- }
-});
-
-var UserModal = React.createClass({
- displayName: "UserModal",
-
- propTypes: {
- user: React.PropTypes.object.isRequired,
- socket: React.PropTypes.object.isRequired,
- currentUser: React.PropTypes.object.isRequired
- },
-
- render: function render() {
- var currentUser = this.props.currentUser;
- var user = this.props.user;
- var hiveStats = undefined;
- if (user.hive.id) {
- hiveStats = [React.createElement(
- "tr",
- { key: "stats" },
- React.createElement(
- "td",
- null,
- React.createElement(
- "strong",
- null,
- "Hive Stats"
- )
- ),
- React.createElement("td", null)
- ), React.createElement(
- "tr",
- { key: "elo" },
- React.createElement(
- "td",
- null,
- "ELO"
- ),
- React.createElement(
- "td",
- null,
- user.hive.skill
- )
- ), React.createElement(
- "tr",
- { key: "hours" },
- React.createElement(
- "td",
- null,
- "Hours Played"
- ),
- React.createElement(
- "td",
- null,
- Math.round(user.hive.playTime / 3600)
- )
- ), React.createElement(
- "tr",
- { key: "wins" },
- React.createElement(
- "td",
- null,
- "Wins"
- ),
- React.createElement(
- "td",
- null,
- user.hive.wins
- )
- ), React.createElement(
- "tr",
- { key: "losses" },
- React.createElement(
- "td",
- null,
- "Losses"
- ),
- React.createElement(
- "td",
- null,
- user.hive.loses
- )
- ), React.createElement(
- "tr",
- { key: "kills" },
- React.createElement(
- "td",
- null,
- "Kills (/min)"
- ),
- React.createElement(
- "td",
- null,
- user.hive.kills,
- " (",
- _.round(user.hive.kills / (user.hive.playTime / 60), 1),
- ")"
- )
- ), React.createElement(
- "tr",
- { key: "assists" },
- React.createElement(
- "td",
- null,
- "Assists (/min)"
- ),
- React.createElement(
- "td",
- null,
- user.hive.assists,
- " (",
- _.round(user.hive.assists / (user.hive.playTime / 60), 1),
- ")"
- )
- ), React.createElement(
- "tr",
- { key: "deaths" },
- React.createElement(
- "td",
- null,
- "Deaths (/min)"
- ),
- React.createElement(
- "td",
- null,
- user.hive.deaths,
- " (",
- _.round(user.hive.deaths / (user.hive.playTime / 60), 1),
- ")"
- )
- )];
- }
- var adminOptions = undefined;
- if (currentUser.admin) {
- adminOptions = React.createElement(DisconnectUserButton, { id: user.id, socket: this.props.socket });
- }
- return React.createElement(
- "div",
- { className: "modal fade", id: modalId(user) },
- React.createElement(
- "div",
- { className: "modal-dialog" },
- React.createElement(
- "div",
- { className: "modal-content" },
- React.createElement(
- "div",
- { className: "modal-header" },
- React.createElement(
- "button",
- { type: "button", className: "close", "data-dismiss": "modal",
- "aria-label": "Close" },
- React.createElement(
- "span",
- { "aria-hidden": "true" },
- "×"
- )
- ),
- React.createElement(
- "h4",
- { className: "modal-title" },
- React.createElement("img", { src: "blank.gif",
- className: "flag flag-" + (user.country === null ? "eu" : user.country.toLowerCase()),
- alt: user.country }),
- "Â ",
- user.username
- )
- ),
- React.createElement(
- "div",
- { className: "modal-body" },
- React.createElement(
- "div",
- { className: "text-center" },
- React.createElement("img", {
- src: user.avatar,
- alt: "User Avatar" })
- ),
- React.createElement(
- "table",
- { className: "table" },
- React.createElement(
- "tbody",
- null,
- React.createElement(
- "tr",
- null,
- React.createElement(
- "td",
- null,
- "Lifeforms"
- ),
- React.createElement(
- "td",
- null,
- React.createElement(_gather.LifeformIcons, { gatherer: { user: user } })
- )
- ),
- React.createElement(
- "tr",
- null,
- React.createElement(
- "td",
- null,
- "Links"
- ),
- React.createElement(
- "td",
- null,
- React.createElement(
- "a",
- { href: enslUrl(user),
- className: "btn btn-xs btn-primary",
- target: "_blank" },
- "ENSL Profile"
- ),
- "Â ",
- React.createElement(
- "a",
- { href: hiveUrl({ user: user }),
- className: "btn btn-xs btn-primary",
- target: "_blank" },
- "Hive Profile"
- )
- )
- ),
- hiveStats
- )
- )
- ),
- React.createElement(
- "div",
- { className: "modal-footer" },
- adminOptions,
- React.createElement(
- "button",
- { type: "button",
- className: "btn btn-default",
- "data-dismiss": "modal" },
- "Close"
- )
- )
- )
- )
- );
- }
-});
-
-var UserItem = React.createClass({
- displayName: "UserItem",
-
- propTypes: {
- user: React.PropTypes.object.isRequired,
- socket: React.PropTypes.object.isRequired,
- currentUser: React.PropTypes.object.isRequired
- },
-
- render: function render() {
- var user = this.props.user;
- var currentUser = this.props.currentUser;
- return React.createElement(
- "li",
- { className: "list-group-item" },
- React.createElement(
- "a",
- { href: "#", "data-toggle": "modal",
- "data-target": "#" + modalId(user) },
- user.username
- ),
- React.createElement(UserModal, { user: user, currentUser: currentUser,
- socket: this.props.socket })
- );
- }
-});
-
-var UserMenu = exports.UserMenu = React.createClass({
- displayName: "UserMenu",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- users: React.PropTypes.array.isRequired
- },
-
- render: function render() {
- var _this = this;
-
- var users = this.props.users.sort(function (a, b) {
- return a.username.toLowerCase() > b.username.toLowerCase() ? 1 : -1;
- }).map(function (user) {
- return React.createElement(UserItem, { user: user, key: user.id,
- currentUser: _this.props.user, socket: _this.props.socket });
- });
- return React.createElement(
- "div",
- null,
- React.createElement(
- "div",
- { className: "panel panel-primary add-bottom" },
- React.createElement(
- "div",
- { className: "panel-heading" },
- React.createElement("i", { className: "fa fa-users fa-fw" }),
- " Online",
- React.createElement(
- "span",
- { className: "badge pull-right" },
- this.props.users.length
- )
- ),
- React.createElement(
- "ul",
- { className: "list-group", id: "users-list" },
- users
- )
- )
- );
- }
-});
-
-var AdminPanel = exports.AdminPanel = React.createClass({
- displayName: "AdminPanel",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired
- },
-
- handleGatherReset: function handleGatherReset() {
- this.props.socket.emit("gather:reset");
- },
- render: function render() {
- return React.createElement(
- "div",
- { className: "modal fade", id: "adminmodal" },
- React.createElement(
- "div",
- { className: "modal-dialog" },
- React.createElement(
- "div",
- { className: "modal-content" },
- React.createElement(
- "div",
- { className: "modal-header" },
- React.createElement(
- "button",
- { type: "button", className: "close", "data-dismiss": "modal",
- "aria-label": "Close" },
- React.createElement(
- "span",
- { "aria-hidden": "true" },
- "×"
- )
- ),
- React.createElement(
- "h4",
- { className: "modal-title" },
- "Administration Panel"
- )
- ),
- React.createElement(
- "div",
- { className: "modal-body", id: "admin-menu" },
- React.createElement(
- "h5",
- null,
- "Swap Into a Different Account (Only works for admins)"
- ),
- React.createElement(UserLogin, { socket: this.props.socket }),
- React.createElement(
- "h5",
- null,
- "Gather Options"
- ),
- React.createElement(
- "div",
- null,
- React.createElement(
- "button",
- {
- className: "btn btn-danger max-width",
- onClick: this.handleGatherReset },
- "Reset Gather"
- )
- )
- ),
- React.createElement(
- "div",
- { className: "modal-footer" },
- React.createElement(
- "button",
- { type: "button", className: "btn btn-default",
- "data-dismiss": "modal" },
- "Close"
- )
- )
- )
- )
- );
- }
-});
-
-var ProfileModal = exports.ProfileModal = React.createClass({
- displayName: "ProfileModal",
-
- propTypes: {
- user: React.PropTypes.object.isRequired
- },
-
- handleUserUpdate: function handleUserUpdate(e) {
- e.preventDefault();
- var abilities = {
- skulk: React.findDOMNode(this.refs.skulk).checked,
- lerk: React.findDOMNode(this.refs.lerk).checked,
- gorge: React.findDOMNode(this.refs.gorge).checked,
- fade: React.findDOMNode(this.refs.fade).checked,
- onos: React.findDOMNode(this.refs.onos).checked,
- commander: React.findDOMNode(this.refs.commander).checked
- };
- var skill = React.findDOMNode(this.refs.playerskill).value;
- socket.emit("users:update:profile", {
- id: this.props.user.id,
- profile: {
- abilities: abilities,
- skill: skill
- }
- });
- },
- render: function render() {
- if (!this.props.user) return false;
- var abilities = this.props.user.profile.abilities;
- var abilitiesForm = [];
- for (var lifeform in abilities) {
- abilitiesForm.push(React.createElement(
- "div",
- { key: lifeform, className: "checkbox" },
- React.createElement(
- "label",
- { className: "checkbox-inline" },
- React.createElement("input", { type: "checkbox",
- ref: lifeform,
- defaultChecked: abilities[lifeform] }),
- " ",
- _.capitalize(lifeform)
- )
- ));
- }
-
- var skillLevel = this.props.user.profile.skill;
- var skillLevels = _.uniq(["Low Skill", "Medium Skill", "High Skill", skillLevel]).filter(function (skill) {
- return typeof skill === 'string';
- }).map(function (skill) {
- return React.createElement(
- "option",
- { key: skill },
- skill
- );
- });
-
- return React.createElement(
- "div",
- { className: "modal fade", id: "profilemodal" },
- React.createElement(
- "div",
- { className: "modal-dialog" },
- React.createElement(
- "div",
- { className: "modal-content" },
- React.createElement(
- "div",
- { className: "modal-header" },
- React.createElement(
- "button",
- { type: "button", className: "close", "data-dismiss": "modal",
- "aria-label": "Close" },
- React.createElement(
- "span",
- { "aria-hidden": "true" },
- "×"
- )
- ),
- React.createElement(
- "h4",
- { className: "modal-title" },
- "Profile"
- )
- ),
- React.createElement(
- "div",
- { className: "modal-body", id: "profile-panel" },
- React.createElement(
- "form",
- null,
- React.createElement(
- "div",
- { className: "form-group" },
- React.createElement(
- "label",
- null,
- "Player Skill"
- ),
- React.createElement("br", null),
- React.createElement(
- "select",
- {
- defaultValue: skillLevel,
- className: "form-control",
- ref: "playerskill" },
- skillLevels
- ),
- React.createElement(
- "p",
- { className: "add-top" },
- React.createElement(
- "small",
- null,
- "Try to give an accurate representation of your skill to raise the quality of your gathers"
- )
- )
- ),
- React.createElement("hr", null),
- React.createElement(
- "div",
- { className: "form-group" },
- React.createElement(
- "label",
- null,
- "Preferred Lifeforms"
- ),
- React.createElement("br", null),
- abilitiesForm,
- React.createElement(
- "p",
- null,
- React.createElement(
- "small",
- null,
- "Specify which lifeforms you'd like to play in the gather"
- )
- )
- ),
- React.createElement("hr", null),
- React.createElement(
- "p",
- { className: "small" },
- "You will need to rejoin the gather to see your updated profile"
- ),
- React.createElement(
- "div",
- { className: "form-group" },
- React.createElement(
- "button",
- {
- type: "submit",
- className: "btn btn-primary",
- "data-dismiss": "modal",
- onClick: this.handleUserUpdate },
- "Update & Close"
- )
- )
- )
- )
- )
- )
- );
- }
-});
-
-var CurrentUser = exports.CurrentUser = React.createClass({
- displayName: "CurrentUser",
- render: function render() {
- if (this.props.user) {
- var adminOptions = undefined;
- if (this.props.user.admin || this.props.user.moderator) {
- adminOptions = React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { href: "#", "data-toggle": "modal", "data-target": "#adminmodal" },
- React.createElement("i", { className: "fa fa-magic fa-fw" }),
- " Administration"
- )
- );
- }
- return React.createElement(
- "li",
- { className: "dropdown" },
- React.createElement(
- "a",
- { className: "dropdown-toggle", "data-toggle": "dropdown", href: "#" },
- this.props.user.username,
- " Â ",
- React.createElement("img", { src: this.props.user.avatar,
- alt: "User Avatar",
- height: "20",
- width: "20" }),
- " ",
- React.createElement("i", { className: "fa fa-caret-down" })
- ),
- React.createElement(
- "ul",
- { className: "dropdown-menu dropdown-user" },
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { "data-toggle": "modal",
- "data-target": "#profilemodal",
- href: "#" },
- React.createElement("i", { className: "fa fa-user fa-fw" }),
- " Profile"
- )
- ),
- React.createElement(
- "li",
- null,
- React.createElement(
- "a",
- { "data-toggle": "modal",
- "data-target": "#settingsmodal",
- href: "#" },
- React.createElement("i", { className: "fa fa-gear fa-fw" }),
- " Settings"
- )
- ),
- adminOptions
- )
- );
- } else {
- return false;
- }
- }
-});
-
-var AssumeUserIdButton = exports.AssumeUserIdButton = React.createClass({
- displayName: "AssumeUserIdButton",
-
- propTypes: {
- socket: React.PropTypes.object.isRequired,
- gatherer: React.PropTypes.object.isRequired,
- currentUser: React.PropTypes.object.isRequired
- },
-
- assumeId: function assumeId(e) {
- var _this2 = this;
-
- e.preventDefault();
- if (this.props.gatherer) {
- this.props.socket.emit("users:authorize", {
- id: this.props.gatherer.id
- });
- // Refresh Gather list
- setTimeout(function () {
- _this2.props.socket.emit("gather:refresh");
- }, 5000);
- }
- },
- render: function render() {
- var currentUser = this.props.currentUser;
- var gatherer = this.props.gatherer;
- if (currentUser && gatherer) {
- return React.createElement(
- "button",
- {
- className: "btn btn-xs btn-danger",
- onClick: this.assumeId },
- "Assume User ID"
- );
- }
- }
-});
-});
-
-require.register("javascripts/helper", function(exports, require, module) {
-'use strict';
-
-// Accepts an array of IDs voted
-// 1. Creates an array of tally objects,
-// with ID as prop and vote count as val { 12: 0 }
-// 2. Increments ID vote tally for every vote
-// 3. Sorts
-
-var rankVotes = exports.rankVotes = function (votes, candidates) {
- var initial = candidates.reduce(function (acc, candidate) {
- acc[candidate.id] = 0;
- return acc;
- }, {});
-
- var scores = votes.reduce(function (acc, id) {
- if (acc[id] !== undefined) {
- acc[id]++;
- }
- return acc;
- }, initial);
-
- var rank = [];
-
- for (var id in scores) {
- if (scores.hasOwnProperty(id)) {
- rank.push({
- id: parseInt(id, 10),
- count: scores[id]
- });
- }
- }
-
- return rank.sort(function (a, b) {
- if (b.count === a.count) {
- return b.id - a.id;
- } else {
- return b.count - a.count;
- }
- }).map(function (tally) {
- return tally.id;
- }).map(function (id) {
- return candidates.reduce(function (acc, candidate) {
- if (candidate.id === id) return candidate;
- return acc;
- });
- });
-};
-
-var enslUrl = exports.enslUrl = function (gatherer) {
- return 'http://www.ensl.org/users/' + gatherer.id;
-};
-
-var hiveUrl = exports.hiveUrl = function (gatherer) {
- var hiveId = gatherer.user.hive.id;
- if (hiveId) {
- return 'http://hive.naturalselection2.com/profile/' + hiveId;
- } else {
- return null;
- }
-};
-
-var modalId = exports.modalId = function (user) {
- return 'user-modal-' + user.id;
-};
-
-var storageAvailable = exports.storageAvailable = function (type) {
- try {
- var storage = window[type],
- x = '__storage_test__';
- storage.setItem(x, x);
- storage.removeItem(x);
- return true;
- } catch (e) {
- return false;
- }
-};
-});
-
-
-//# sourceMappingURL=app.js.map
\ No newline at end of file
diff --git a/public/app.js.map b/public/app.js.map
deleted file mode 100644
index d818a3c..0000000
--- a/public/app.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"sources":["app.js","event.js","gather.js","main.js","message.js","settings.js","snowMachine.js","sound.js","teamspeak.js","user.js","helper.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAM,QAAQ,QAAQ,OAAR,CAAR;AACN,IAAM,WAAW,QAAQ,WAAR,CAAX;AACN,IAAM,MAAM,QAAQ,6BAAR,CAAN;;AAEN,OAAO,OAAP,GAAiB,UAAU,KAAV,EAAiB;AACjC,UAAS,MAAT,CAAgB,oBAAC,GAAD,OAAhB,EAAyB,KAAzB,EADiC;CAAjB;;;;;;ACJjB,IAAM,QAAQ,QAAQ,OAAR,CAAR;AACN,IAAM,SAAS,QAAQ,MAAR,GAAiB,MAAM,WAAN,CAAkB;;;AACjD,YAAW;AACV,UAAQ,MAAM,SAAN,CAAgB,KAAhB,CAAsB,UAAtB;EADT;;AAIA,2BAAQ,YAAY;AACnB,SAAO,IAAK,IAAJ,CAAS,UAAT,CAAD,CAAuB,YAAvB,GAAsC,KAAtC,CAA4C,SAA5C,EAAuD,CAAvD,CAAP,CADmB;EAL6B;AASjD,2BAAS;;;AACR,MAAI,kBAAJ,CADQ;AAER,MAAI,KAAK,KA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CAQA,UAAU,EAAV,EAAc;AACpB,SAAO,WAAW,MAAX,CAAkB,UAAU,GAAV,EAAe,SAAf,EAA0B;AAClD,OAAI,UAAU,EAAV,KAAiB,EAAjB,EAAqB,OAAO,SAAP,CAAzB;AACA,UAAO,GAAP,CAFkD;GAA1B,CAAzB,CADoB;EAAd,CARP,CAxBkE;CAA7B;;AAwCtC,IAAM,UAAU,QAAQ,OAAR,GAAkB,UAAC,QAAD,EAAc;AAC/C,uCAAoC,SAAS,EAAT,CADW;CAAd;;AAIlC,IAAM,UAAU,QAAQ,OAAR,GAAkB,UAAC,QAAD,EAAc;AAC/C,KAAM,SAAS,SAAS,IAAT,CAAc,IAAd,CAAmB,EAAnB,CADgC;AAE/C,KAAI,MAAJ,EAAY;AACX,wDAAoD,MAApD,CADW;EAAZ,MAEO;AACN,SAAO,IAAP,CADM;EAFP;CAFiC;;AASlC,IAAM,UAAU,QAAQ,OAAR,GAAkB,UAAC,IAAD,EAAU;AAC3C,wBAAqB,KAAK,EAAL,CADsB;CAAV;;AAIlC,IAAM,mBAAmB,QAAQ,gBAAR,GAA2B,UAAC,IAAD,EAAU;AAC7D,KAAI;AACH,MAAI,UAAU,OAAO,IAAP,CAAV;MACH,IAAI,kBAAJ,CAFE;AAGH,UAAQ,OAAR,CAAgB,CAAhB,EAAmB,CAAnB,EAHG;AAIH,UAAQ,UAAR,CAAmB,CAAnB,EAJG;AAKH,SAAO,IAAP,CALG;EAAJ,CAOA,OAAM,CAAN,EAAS;AACR,SAAO,KAAP,CADQ;EAAT;CARmD","file":"public/app.js","sourcesContent":["const React = require(\"react\");\nconst ReactDOM = require(\"react-dom\");\nconst App = require(\"javascripts/components/main\");\n\nmodule.exports = function (mount) { \n\tReactDOM.render(, mount);\n};\n","const React = require(\"react\");\nconst Events = exports.Events = React.createClass({\n\tpropTypes: {\n\t\tevents: React.PropTypes.array.isRequired\n\t},\n\n\tgetTime(timeString) {\n\t\treturn (new Date(timeString)).toTimeString().match(/^[\\d:]*/)[0];\n\t},\n\n\trender() {\n\t\tlet events;\n\t\tif (this.props.events.length) {\n\t\t\tevents = this.props.events.map(event => {\n\t\t\t\treturn `${this.getTime(event.createdAt)} ${event.description}`;\n\t\t\t}).join(\"\\n\");\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{events}\n\t\t\t\t
\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\tListening for new events...\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n});\n","import {AssumeUserIdButton} from \"javascripts/components/user\";\n\nconst React = require(\"react\");\nconst helper = require(\"javascripts/helper\");\nconst enslUrl = helper.enslUrl;\nconst rankVotes = helper.rankeVotes;\nconst hiveUrl = helper.hiveUrl;\n\nconst SelectPlayerButton = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgatherer: React.PropTypes.object.isRequired\n\t},\n\n\tselectPlayer(e) {\n\t\te.preventDefault();\n\t\tthis.props.socket.emit(\"gather:select\", {\n\t\t\tplayer: parseInt(e.target.value, 10)\n\t\t});\n\t},\n\n\trender() {\n\t\tlet button;\n\t\tif (this.props.gatherer.leader) {\n\t\t\tbutton = ;\n\t\t} else if (this.props.gatherer.team !== \"lobby\") {\n\t\t\tbutton = ;\n\t\t} else {\n\t\t\tbutton = ;\n\t\t}\n\t\treturn button;\n\t}\n});\n\nconst GathererList = React.createClass({\n\tmemberList() {\n\t\tconst self = this;\n\t\treturn this.props.gather.gatherers\n\t\t\t.filter(gatherer => gatherer.team === self.props.team)\n\t\t\t.sort(gatherer => { return gatherer.leader ? 1 : -1 });\n\t},\n\n\trender() {\n\t\tconst extractGatherer = gatherer => {\n\t\t\tlet image;\n\t\t\tif (gatherer.leader) {\n\t\t\t\timage = ;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{image}{gatherer.user.username}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t | \n\t\t\t\t
\n\t\t\t);\n\t\t};\n\t\tconst members = this.memberList()\n\t\t\t.map(extractGatherer);\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t{members}\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst GatherTeams = React.createClass({\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tMarines\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\tAliens\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst ElectionProgressBar = React.createClass({\n\tcomponentDidMount() {\n\t\tconst self = this;\n\t\tthis.timer = setInterval(() => {\n\t\t\tself.forceUpdate();\n\t\t}, 900);\n\t},\n\n\tprogress() {\n\t\tconst interval = this.props.gather.election.interval;\n\t\tconst startTime = (new Date(this.props.gather.election.startTime)).getTime();\n\t\tconst msTranspired = Math.floor((new Date()).getTime() - startTime);\n\n\t\treturn {\n\t\t\tnum: msTranspired,\n\t\t\tden: interval,\n\t\t\tbarMessage: Math.floor((interval - msTranspired) / 1000) + \"s remaining\"\n\t\t}\n\t},\n\n\tcomponentWillUnmount() {\n\t\tclearInterval(this.timer);\n\t},\n\n\trender() {\n\t\treturn ();\n\t}\n});\n\nconst ProgressBar = React.createClass({\n\trender() {\n\t\tconst progress = this.props.progress;\n\t\tconst style = {\n\t\t\twidth: Math.round((progress.num / progress.den * 100)) + \"%\"\n\t\t};\n\t\tconst barMessage = progress.barMessage || \"\";\n\t\treturn (\n\t\t\t\n\t\t\t\t
{barMessage}\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst GatherProgress = React.createClass({\n\tstateDescription() {\n\t\tswitch(this.props.gather.state) {\n\t\t\tcase \"gathering\":\n\t\t\t\treturn \"Waiting for more gatherers.\";\n\t\t\tcase \"election\":\n\t\t\t\treturn \"Currently voting for team leaders.\";\n\t\t\tcase \"selection\":\n\t\t\t\treturn \"Waiting for leaders to pick teams.\";\n\t\t\tcase \"done\":\n\t\t\t\treturn \"Gather completed.\";\n\t\t\tdefault:\n\t\t\t\treturn \"Initialising gather.\";\n\t\t}\n\t},\n\n\tgatheringProgress() {\n\t\tconst num = this.props.gather.gatherers.length;\n\t\tconst den = 12;\n\t\tconst remaining = den - num;\n\t\tconst message = (remaining === 1) ? \n\t\t\t\"Waiting for last player\" : `Waiting for ${remaining} more players`;\n\t\treturn {\n\t\t\tnum: num,\n\t\t\tden: den,\n\t\t\tmessage: message\n\t\t};\n\t},\n\n\telectionProgress() {\n\t\tconst num = this.props.gather.gatherers.reduce((acc, gatherer) => {\n\t\t\tif (gatherer.leaderVote) acc++;\n\t\t\treturn acc;\n\t\t}, 0);\n\t\tconst den = 12;\n\t\treturn {\n\t\t\tnum: num,\n\t\t\tden: den,\n\t\t\tmessage: den - num + \" more votes required\"\n\t\t};\n\t},\n\n\tselectionProgress() {\n\t\tconst num = this.props.gather.gatherers.reduce((acc, gatherer) => {\n\t\t\tif (gatherer.team !== \"lobby\") acc++;\n\t\t\treturn acc;\n\t\t}, 0);\n\t\tconst den = 12;\n\n\t\treturn {\n\t\t\tnum: num,\n\t\t\tden: den,\n\t\t\tmessage: `${num} out of ${den} players assigned. Waiting \n\t\t\t\ton ${_.capitalize(this.props.gather.pickingTurn)}s to pick next...`\n\t\t};\n\t},\n\n\trender() {\n\t\tlet progress, progressBar;\n\t\tconst gatherState = this.props.gather.state;\n\t\tif (gatherState === 'gathering' && this.props.gather.gatherers.length) {\n\t\t\tprogress = this.gatheringProgress();\n\t\t\tprogressBar = ();\n\t\t} else if (gatherState === 'election') {\n\t\t\tprogress = this.electionProgress();\n\t\t\tprogressBar = ();\n\t\t} else if (gatherState === 'selection') {\n\t\t\tprogress = this.selectionProgress();\n\t\t\tprogressBar = ();\n\t\t}\n\n\t\tif (!progress) return false;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
{this.stateDescription()} {progress.message}
\n\t\t\t\t{progressBar}\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst JoinGatherButton = React.createClass({\n\tpropTypes: {\n\t\tthisGatherer: React.PropTypes.object,\n\t\tuser: React.PropTypes.object.isRequired,\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgather: React.PropTypes.object.isRequired\n\t},\n\n\tcomponentDidMount() {\n\t\tconst self = this;\n\t\tthis.timer = setInterval(() => {\n\t\t\tself.forceUpdate();\n\t\t}, 30000);\n\t},\n\n\tcomponentWillUnmount() {\n\t\tclearInterval(this.timer);\n\t},\n\n\tjoinGather(e) {\n\t\te.preventDefault();\n\t\tthis.props.socket.emit(\"gather:join\");\n\t},\n\n\tleaveGather(e) {\n\t\te.preventDefault();\n\t\tthis.props.socket.emit(\"gather:leave\");\n\t},\n\n\tcooldownTime() {\n\t\tlet user = this.props.user;\n\t\tif (!user) return false;\n\t\tlet cooloffTime = this.props.gather.cooldown[user.id];\n\t\tif (!cooloffTime) return false;\n\t\tlet timeRemaining = new Date(cooloffTime) - new Date();\n\t\treturn timeRemaining > 0 ? timeRemaining : false;\n\t},\n\n\trender() {\n\t\tlet gather = this.props.gather;\n\t\tlet thisGatherer = this.props.thisGatherer;\n\t\tif (thisGatherer) {\n\t\t\treturn ;\n\t\t} \n\t\tif (gather.state === 'gathering') {\n\t\t\tlet cooldownTime = this.cooldownTime();\n\t\t\tif (cooldownTime) {\n\t\t\t\treturn ;\n\t\t\t} else {\n\t\t\t\treturn ;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n});\n\nconst CooloffButton = React.createClass({\n\tpropTypes: {\n\t\ttimeRemaining: React.PropTypes.number.isRequired\n\t},\n\n\ttimeRemaining() {\n\t\treturn `${Math.floor(this.props.timeRemaining / 60000) + 1} minutes remaining`;\n\t},\n\n\trender() {\n\t\treturn \n\t}\n})\n\nconst GatherActions = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgather: React.PropTypes.object.isRequired,\n\t\tthisGatherer: React.PropTypes.object\n\t},\n\n\tvoteRegather(e) {\n\t\te.preventDefault(e);\n\t\tthis.props.socket.emit(\"gather:vote\", {\n\t\t\tregather: (e.target.value === \"true\")\n\t\t});\n\t},\n\n\tregatherVotes() {\n\t\tlet gather = this.props.gather;\n\t\tif (!gather) return 0;\n\t\treturn gather.gatherers.reduce((acc, gatherer) => {\n\t\t\tif (gatherer.regatherVote) acc++;\n\t\t\treturn acc;\n\t\t}, 0);\n\t},\n\n\trender() {\n\t\tlet regatherButton;\n\t\tconst user = this.props.user;\n\t\tconst gather = this.props.gather;\n\t\tconst socket = this.props.socket;\n\t\tconst thisGatherer = this.props.thisGatherer;\n\t\tif (thisGatherer) {\n\t\t\tlet regatherVotes = this.regatherVotes();\n\t\t\tif (thisGatherer.regatherVote) {\n\t\t\t\tregatherButton = ;\n\t\t\t} else {\n\t\t\t\tregatherButton = ;\n\t\t\t}\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t- \n\t\t\t\t\t\t\t{regatherButton}\n\t\t\t\t\t\t
\n\t\t\t\t\t\t- \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst VoteButton = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tcandidate: React.PropTypes.object.isRequired,\n\t\tthisGatherer: React.PropTypes.object\n\t},\n\n\tcancelVote(e) {\n\t\tthis.props.socket.emit(\"gather:vote\", {\n\t\t\tleader: {\n\t\t\t\tcandidate: null\n\t\t\t}\n\t\t});\n\t},\n\n\tvote(e) {\n\t\te.preventDefault();\n\t\tthis.props.socket.emit(\"gather:vote\", {\n\t\t\tleader: {\n\t\t\t\tcandidate: parseInt(e.target.value, 10)\n\t\t\t}\n\t\t});\n\t},\n\n\tstopGatherMusic() {\n\t\tsoundController.stop();\n\t},\n\n\trender() {\n\t\tlet candidate = this.props.candidate;\n\t\tlet thisGatherer = this.props.thisGatherer;\n\t\tif (thisGatherer === null) {\n\t\t\treturn false;\n\t\t}\n\t\tif (thisGatherer.leaderVote === candidate.id) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\t}\n});\n\nconst ServerVoting = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgather: React.PropTypes.object.isRequired,\n\t\tthisGatherer: React.PropTypes.object,\n\t\tservers: React.PropTypes.array.isRequired,\n\t},\n\n\tvoteHandler(serverId) {\n\t\treturn e => {\n\t\t\te.preventDefault();\n\t\t\tthis.props.socket.emit(\"gather:vote\", {\n\t\t\t\tserver: {\n\t\t\t\t\tid: serverId\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\n\tvotesForServer(server) {\n\t\treturn this.props.gather.gatherers.reduce((acc, gatherer) => {\n\t\t\tif (gatherer.serverVote.some(voteId => voteId === server.id)) acc++;\n\t\t\treturn acc;\n\t\t}, 0);\n\t},\n\n\trender() {\n\t\tlet self = this;\n\t\tlet thisGatherer = self.props.thisGatherer;\n\t\tlet servers = self.props.servers.sort((a, b) => {\n\t\t\t\tconst aVotes = self.votesForServer(a);\n\t\t\t\tconst bVotes = self.votesForServer(b);\n\t\t\t\treturn bVotes - aVotes;\n\t\t\t}).map(server => {\n\t\t\tlet votes = self.votesForServer(server);\n\t\t\tlet style = thisGatherer.serverVote.some(voteId => voteId === server.id) ? \n\t\t\t\t\"list-group-item list-group-item-success\" : \"list-group-item\";\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{votes}\n\t\t\t\t\t{server.name || server.description}\n\t\t\t\t\n\t\t\t);\n\t\t});\n\n\t\tlet votes = thisGatherer.serverVote.length;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t{votes === 2 ? \"Server Votes\" : \n\t\t\t\t\t`Please Vote for a Server. ${2 - votes} votes remaining` }\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{servers}\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n})\n\nconst MapVoting = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgather: React.PropTypes.object.isRequired,\n\t\tthisGatherer: React.PropTypes.object,\n\t\tmaps: React.PropTypes.array.isRequired,\n\t},\n\n\tvoteHandler(mapId) {\n\t\treturn e => {\n\t\t\te.preventDefault();\n\t\t\tthis.props.socket.emit(\"gather:vote\", {\n\t\t\t\tmap: {\n\t\t\t\t\tid: mapId\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t},\n\n\tvotesForMap(map) {\n\t\treturn this.props.gather.gatherers.reduce((acc, gatherer) => {\n\t\t\tif (gatherer.mapVote.some(voteId => voteId === map.id)) acc++;\n\t\t\treturn acc;\n\t\t}, 0);\n\t},\n\n\trender() {\n\t\tconst self = this;\n\t\tlet thisGatherer = self.props.thisGatherer\n\t\tlet maps = self.props.maps.sort((a, b) => {\n\t\t\t\t\tconst aVotes = self.votesForMap(a);\n\t\t\t\t\tconst bVotes = self.votesForMap(b);\n\t\t\t\t\treturn bVotes - aVotes;\n\t\t\t\t}).map(map => {\n\t\t\t\tlet votes = self.votesForMap(map);\n\t\t\t\tlet style = thisGatherer.mapVote.some(voteId => voteId === map.id) ? \n\t\t\t\t\t\"list-group-item list-group-item-success\" : \"list-group-item\";\n\t\t\t\treturn (\n\t\t\t\t\t\n\t\t\t\t\t\t\t{votes}\n\t\t\t\t\t\t\t{map.name}\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t});\n\n\t\tlet votes = thisGatherer.mapVote.length;\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t{votes === 2 ? \"Map Votes\" : \n\t\t\t\t\t\t`Please Vote for a Map. ${2 - votes} votes remaining` }\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t{maps}\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n})\n\nconst Gather = exports.Gather = React.createClass({\n\tpropTypes: {\n\t\tthisGatherer: React.PropTypes.object,\n\t\tmaps: React.PropTypes.array.isRequired,\n\t\tservers: React.PropTypes.array.isRequired,\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgather: React.PropTypes.object.isRequired\n\t},\n\n\trender() {\n\t\tconst socket = this.props.socket;\n\t\tconst gather = this.props.gather;\n\t\tconst thisGatherer = this.props.thisGatherer;\n\t\tconst servers = this.props.servers;\n\t\tconst maps = this.props.maps;\n\t\tconst user = this.props.user;\n\t\tif (gather === null) return ;\n\n\t\tlet voting;\n\t\tif (thisGatherer) {\n\t\t\tlet state = gather.state;\n\t\t\tif (state === 'gathering' || state === 'election') {\n\t\t\t\tvoting = (\n\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tvoting = ;\n\t\t\t}\n\t\t}\n\n\t\tlet gatherTeams;\n\t\tif (gather.state === 'selection') {\n\t\t\tgatherTeams = ;\n\t\t}\n\n\t\tif (gather.gatherers.length > 0) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
Current Gather
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t{gatherTeams}\n\t\t\t\t\t{voting}\n\t\t\t\t
\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
Current Gather
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t}\n});\n\nconst LifeformIcons = exports.LifeformIcons = React.createClass({\n\tavailableLifeforms() {\n\t\treturn [\"skulk\", \"gorge\", \"lerk\", \"fade\", \"onos\", \"commander\"];\n\t},\n\n\tgathererLifeforms() {\n\t\tlet lifeforms = [];\n\t\tlet gatherer = this.props.gatherer;\n\t\tlet abilities = gatherer.user.profile.abilities;\n\t\tfor (let attr in abilities) {\n\t\t\tif (abilities[attr]) lifeforms.push(_.capitalize(attr));\n\t\t}\n\t\treturn lifeforms;\n\t},\n\n\trender() {\n\t\tlet lifeforms = this.gathererLifeforms();\t\n\t\tlet availableLifeforms = this.availableLifeforms();\n\t\tlet icons = availableLifeforms.map(lifeform => {\n\t\t\tlet containsAbility = lifeforms.some(gathererLifeform => {\n\t\t\t\treturn gathererLifeform.toLowerCase() === lifeform.toLowerCase()\n\t\t\t});\n\t\t\tif (containsAbility) {\n\t\t\t\treturn
\n\t\t\t} else {\n\t\t\t\treturn
\n\t\t\t}\n\t\t});\n\t\treturn {icons}\n\t}\n});\n\nconst Gatherers = React.createClass({\n\tpropTypes: {\n\t\tuser: React.PropTypes.object,\n\t\tthisGatherer: React.PropTypes.object,\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgather: React.PropTypes.object.isRequired\n\t},\n\n\tjoinGather(e) {\n\t\te.preventDefault();\n\t\tthis.props.socket.emit(\"gather:join\");\n\t},\n\n\tbootGatherer(e) {\n\t\te.preventDefault();\n\t\tthis.props.socket.emit(\"gather:leave\", {\n\t\t\tgatherer: parseInt(e.target.value, 10) || null\n\t\t});\n\t},\n\n\trender() {\n\t\tconst self = this;\n\t\tconst user = this.props.user;\n\t\tconst socket = this.props.socket;\n\t\tconst gather = this.props.gather;\n\t\tconst thisGatherer = this.props.thisGatherer;\n\t\tconst admin = (user && user.admin) || (user && user.moderator);\n\t\tconst gatherers = gather.gatherers\n\t\t.sort((a, b) => {\n\t\t\t\treturn (b.user.hive.skill || 1000) - (a.user.hive.skill || 1000);\n\t\t\t})\n\t\t.map(gatherer => {\n\t\t\tlet country;\n\t\t\tif (gatherer.user.country) {\n\t\t\t\tcountry = (\n\t\t\t\t\t
\n\t\t\t\t);\n\t\t\t};\n\n\t\t\tlet skill = gatherer.user.profile.skill || \"Not Available\";\n\n\t\t\tlet hiveStats = [];\n\t\t\tif (gatherer.user.hive.skill) hiveStats.push(`${gatherer.user.hive.skill} ELO`);\n\n\t\t\tif (gatherer.user.hive.playTime) {\n\t\t\t\thiveStats.push(`${Math.floor(gatherer.user.hive.playTime / 3600)} Hours`);\n\t\t\t}\n\n\t\t\tlet hive = (hiveStats.length) ? hiveStats.join(\", \") : \"Not Available\";\n\t\t\t\n\t\t\tlet team = (gatherer.user.team) ? gatherer.user.team.name : \"None\";\n\n\t\t\tlet action;\n\t\t\tif (gather.state === \"election\") {\n\t\t\t\tlet votes = gather.gatherers.reduce((acc, voter) => {\n\t\t\t\t\tif (voter.leaderVote === gatherer.id) acc++;\n\t\t\t\t\treturn acc;\n\t\t\t\t}, 0)\n\t\t\t\taction = (\n\t\t\t\t\t\n\t\t\t\t\t\t{votes + \" votes\"}\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (gather.state === 'selection') {\n\t\t\t\tif (thisGatherer && \n\t\t\t\t\t\tthisGatherer.leader &&\n\t\t\t\t\t\tthisGatherer.team === gather.pickingTurn) {\n\t\t\t\t\taction = (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tif (gatherer.leader) {\n\t\t\t\t\t\taction = (Leader);\n\t\t\t\t\t} else if (gatherer.team !== \"lobby\") {\n\t\t\t\t\t\taction = ({_.capitalize(gatherer.team)});\n\t\t\t\t\t} else {\n\t\t\t\t\t\taction = (\n\t\t\t\t\t\t\tLobby);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlet adminOptions;\n\t\t\tif (admin) {\n\t\t\t\tadminOptions = [\n\t\t\t\t\t
,\n\t\t\t\t\tAdmin,\n\t\t\t\t\t\n\t\t\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t]\n\t\t\t}\n\n\t\t\tlet tabColor = gatherer.team !== \"lobby\" ? `panel-${gatherer.team}` : \"panel-info\";\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{country} {gatherer.user.username}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tInfo \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t{action}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t- Skill Level
\n\t\t\t\t\t\t\t\t- {skill}
\n\t\t\t\t\t\t\t\t- Team
\n\t\t\t\t\t\t\t\t- {team}
\n\t\t\t\t\t\t\t\t- Hive Stats
\n\t\t\t\t\t\t\t\t- {hive}
\n\t\t\t\t\t\t\t\t- Links
\n\t\t\t\t\t\t\t\t- \n\t\t\t\t\t\t\t\t\tENSL Profile \n\t\t\t\t\t\t\t\t\tHive Profile\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{adminOptions}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t})\n\t\tif (gather.gatherers.length) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{gatherers}\n\t\t\t\t
\n\t\t\t);\n\t\t} else {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t}\n});\n\nconst CompletedGather = React.createClass({\n\tcompletionDate() {\n\t\tlet d = new Date(this.props.gather.done.time);\n\t\tif (d) {\n\t\t\treturn d.toLocaleTimeString();\n\t\t} else {\n\t\t\treturn \"Completed Gather\"\n\t\t}\n\t},\n\n\tgetInitialState() {\n\t\treturn {\n\t\t\tshow: !!this.props.show\n\t\t};\n\t},\n\n\ttoggleGatherInfo() {\n\t\tlet newState = !this.state.show;\n\t\tthis.setState({\n\t\t\tshow: newState\n\t\t});\n\t},\n\n\trender() {\n\t\tlet gatherInfo = [];\n\t\tlet gather = this.props.gather;\n\t\tlet maps = this.props.maps;\n\t\tlet servers = this.props.servers;\n\t\tif (this.state.show) {\n\t\t\tgatherInfo.push();\n\t\t\tgatherInfo.push();\n\t\t}\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
{this.completionDate()}
\n\t\t\t\t
\n\t\t\t\t{gatherInfo}\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst GatherVotingResults = React.createClass({\n\t// Returns an array of ids voted for e.g. [1,2,5,1,1,3,2]\n\tcountVotes(voteType) {\n\t\treturn this.props.gather.gatherers.reduce((acc, gatherer) => {\n\t\t\tlet votes = gatherer[voteType];\n\n\t\t\t// Temporary fix because some mapvotes are ints and not arrays\n\t\t\tif (!Array.isArray(votes)) votes = [votes];\n\n\t\t\tif (votes.length > 0) votes.forEach(vote => acc.push(vote));\n\t\t\treturn acc;\n\t\t}, []);\n\t},\n\n\tselectedMaps() {\n\t\treturn rankVotes(this.countVotes('mapVote'), this.props.maps).slice(0, 2)\n\t},\n\n\tselectedServer() {\n\t\treturn rankVotes(this.countVotes('serverVote'), this.props.servers).slice(0, 1);\n\t},\n\n\trender() {\n\t\tlet maps = this.selectedMaps();\n\t\tlet server = this.selectedServer().pop();\n\t\tlet password;\n\t\tif (server.password) {\n\t\t\tpassword = [\n\t\t\t\tPassword,\n\t\t\t\t{server.password}\n\t\t\t];\n\t\t}\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\tServer\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t- Maps
\n\t\t\t\t\t\t- {maps.map(map => map.name).join(\" & \")}
\n\t\t\t\t\t\t- Server
\n\t\t\t\t\t\t- {server.name}
\n\t\t\t\t\t\t- Address
\n\t\t\t\t\t\t- {server.ip}:{server.port}
\n\t\t\t\t\t\t{password}\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\tJoin Server\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst ArchivedGathers = exports.ArchivedGathers = React.createClass({\n\tpropTypes: {\n\t\tarchive: React.PropTypes.array.isRequired,\n\t\tservers: React.PropTypes.array.isRequired,\n\t\tmaps: React.PropTypes.array.isRequired\n\t},\n\n\trender() {\n\t\tlet archive = this.props.archive\n\t\t\t.sort((a, b) => {\n\t\t\t\treturn new Date(b.createdAt) - new Date(a.createdAt);\n\t\t\t})\n\t\t\t.map((archivedGather, index) => {\n\t\t\t\treturn \n\t\t\t});\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
Archived Gathers
\n\t\t\t\t
\n\t\t\t\t\t{archive}\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n","import {Events} from \"javascripts/components/event\";\nimport {CurrentUser, AdminPanel, ProfileModal, UserMenu} from \"javascripts/components/user\";\nimport {SoundPanel} from \"javascripts/components/sound\";\nimport {TeamSpeakButton, TeamSpeakModal} from \"javascripts/components/teamspeak\";\nimport {SettingsPanel} from \"javascripts/components/settings\";\nimport {Chatroom} from \"javascripts/components/message\";\nimport {Gather, ArchivedGathers} from \"javascripts/components/gather\"\n\nconst React = require(\"react\");\nconst Sound = require(\"javascripts/components/sound\");\nconst SoundController = Sound.SoundController;\nconst helper = require(\"javascripts/helper\");\nconst storageAvailable = helper.storageAvailable;\nconst SplashScreen = React.createClass({\n\tgetInitialState() {\n\t\treturn {\n\t\t\tstatus: \"connecting\",\n\t\t\tsocket: null\n\t\t}\n\t},\n\n\tcomponentDidMount() {\n\t\tconst socketUrl = window.location.protocol + \"//\" + window.location.host;\n\t\tlet socket = io(socketUrl)\n\t\t\t.on(\"connect\", () => {\n\t\t\t\tconsole.log(\"Connected\");\n\t\t\t\tthis.setState({ status: \"connected\" });\n\t\t\t\tsocket\n\t\t\t\t\t.on(\"reconnect\", () => {\n\t\t\t\t\t\tconsole.log(\"Reconnected\");\n\t\t\t\t\t})\n\t\t\t\t\t.on(\"disconnect\", () => {\n\t\t\t\t\t\tconsole.log(\"Disconnected\")\n\t\t\t\t\t});\n\t\t\t})\n\t\t\t.on(\"error\", error => {\n\t\t\t\tconsole.log(error);\n\t\t\t\tif (error === \"Authentication Failed\") {\n\t\t\t\t\tthis.setState({ status: \"authFailed\" });\n\t\t\t\t} else if (error === \"Gather Banned\") {\n\t\t\t\t\tthis.setState({ status: \"banned\" });\n\t\t\t\t}\n\t\t\t});\n\n\t\tthis.setState({ socket: socket });\n\t},\n\n\trender() {\n\t\tconst status = this.state.status;\n\n\t\tif (status === \"connected\") {\n\t\t\treturn ;\n\t\t} \n\n\t\tlet splash;\n\t\tif (status === \"authFailed\") {\n\t\t\tsplash = ;\n\t\t} else if (status === \"banned\") {\n\t\t\tsplash = ;\n\t\t} else if (status === \"connecting\") {\n\t\t\tsplash = ;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{splash}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst AuthFailedSplash = React.createClass({\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
![\"ENSL](\"/ensl_logo.png\")
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
You need to be logged in to the ENSL website to access gathers
\n\t\t\t\t\t\t
If you are logged on, try visiting a few pages on ENSL.org so the server can update your cookies
\n\t\t\t\t\t\t
If this error persists please contact an admin to fix it
\n\t\t\t\t\t\t
\n\t\t\t\t\t
Go to website
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst BannedSplash = React.createClass({\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
![\"ENSL](\"/ensl_logo.png\")
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
You're currently barred from joining gathers
\n\t\t\t\t\t\t
Either wait for the ban to expire or talk to an admin to get it lifted
\n\t\t\t\t\t\t
\n\t\t\t\t\t
See the ban list
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst ConnectingSplash = React.createClass({\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
![\"ENSL](\"/ensl_logo.png\")
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
Authenticating your ENSL account
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
![\"Loading\"](\"/spinner.svg\")
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst App = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired\n\t},\n\n\tgetInitialState() {\n\t\tlet updateTitle = true;\n\t\tlet showEventsPanel = true;\n\n\t\tif (storageAvailable('localStorage')) {\n\t\t\tif (localStorage.getItem(\"updateTitle\") !== null) {\n\t\t\t\tupdateTitle = JSON.parse(localStorage.getItem(\"updateTitle\"));\n\t\t\t}\n\t\t\tif (localStorage.getItem(\"showEventsPanel\") !== null) {\n\t\t\t\tshowEventsPanel = JSON.parse(localStorage.getItem(\"showEventsPanel\"));\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tgather: {\n\t\t\t\tgatherers: []\n\t\t\t},\n\t\t\tusers: [],\n\t\t\tmessages: [],\n\t\t\tmaps: [],\n\t\t\tuser: null,\n\t\t\tservers: [],\n\t\t\tarchive: [],\n\t\t\tsocket: null,\n\t\t\tevents: [],\n\t\t\tupdateTitle: updateTitle,\n\t\t\tshowEventsPanel: showEventsPanel,\n\t\t\tsoundController: new SoundController(),\n\t\t\tshowMessageBox: true,\n\t\t\tcollapseMenu: false,\n\t\t\tconnectionState: \"connected\"\n\t\t};\n\t},\n\n\tupdateTitle() {\n\t\tlet gather = this.state.gather;\n\t\tif (gather && this.state.updateTitle) {\n\t\t\tdocument.title = `NSL Gathers (${gather.gatherers.length}/12)`;\n\t\t\treturn;\n\t\t}\n\t\tdocument.title = \"NSL Gathers\";\n\t},\n\n\ttoggleEventsPanel(event) {\n\t\tlet newState = event.target.checked;\n\t\tthis.setState({ showEventsPanel: newState });\n\t\tif (storageAvailable('localStorage')) {\n\t\t\tlocalStorage.setItem(\"showEventsPanel\", newState)\n\t\t}\n\t},\n\n\ttoggleUpdateTitle(event) {\n\t\tlet newState = event.target.checked;\n\t\tthis.setState({ updateTitle: newState });\n\t\tif (storageAvailable('localStorage')) {\n\t\t\tlocalStorage.setItem(\"updateTitle\", newState)\n\t\t}\n\t\tthis.updateTitle();\n\t},\n\n\tthisGatherer() {\n\t\tlet gather = this.state.gather;\n\t\tlet user = this.state.user;\n\t\tif (gather && user && gather.gatherers.length) {\n\t\t\treturn gather.gatherers\n\t\t\t\t.filter(gatherer => gatherer.id === user.id)\n\t\t\t\t.pop() || null;\n\t\t}\n\t\treturn null;\n\t},\n\n\tcomponentDidMount() {\n\t\tlet self = this;\n\t\tlet socket = this.props.socket;\n\t\tlet soundController = this.state.soundController;\n\n\t\tthis.updateTitle();\n\n\t\tsocket.on('stateChange', data => {\n\t\t\tlet state = data.state;\n\t\t\t\n\t\t\tif (state.from === 'gathering'\n\t\t\t\t\t&& state.to === 'election'\n\t\t\t\t\t&& this.thisGatherer()) {\n\t\t\t\tsoundController.playGatherMusic();\n\t\t\t}\n\n\t\t\tif (state.from === 'election'\n\t\t\t\t\t&& state.to === 'gathering') {\n\t\t\t\tsoundController.stop();\n\t\t\t}\n\t\t});\n\n\t\tsocket.on('event:append', data => {\n\t\t\tlet events = self.state.events;\n\t\t\tevents.unshift(data);\n\t\t\tself.setState({\n\t\t\t\tevents: events.slice(0, 20)\n\t\t\t});\n\t\t});\n\n\t\tsocket.on('users:update', \n\t\t\tdata => self.setState({\n\t\t\t\tusers: data.users,\n\t\t\t\tuser: data.currentUser\n\t\t\t})\n\t\t);\n\n\t\tsocket.on(\"message:append\", data => {\n\t\t\tself.setState({\n\t\t\t\tmessages: self.state.messages.concat(data.messages)\n\t\t\t\t\t.sort((a, b) => {\n\t\t\t\t\t\treturn new Date(a.createdAt) - new Date(b.createdAt);\n\t\t\t\t\t})\n\t\t\t});\n\t\t});\n\n\t\tsocket.on(\"message:refresh\", data => {\n\t\t\tself.setState({\n\t\t\t\tmessages: data.messages\n\t\t\t});\n\t\t});\n\n\t\tsocket.on(\"gather:refresh\", (data) => {\n\t\t\tself.setState({\n\t\t\t\tgather: data.gather,\n\t\t\t\tmaps: data.maps,\n\t\t\t\tservers: data.servers,\n\t\t\t\tpreviousGather: data.previousGather\n\t\t\t});\n\t\t\tthis.updateTitle();\n\t\t});\n\n\t\tsocket.on(\"gather:archive:refresh\", data => {\n\t\t\tself.setState({\n\t\t\t\tarchive: data.archive,\n\t\t\t\tmaps: data.maps,\n\t\t\t\tservers: data.servers\n\t\t\t});\n\t\t});\n\n\t\tsocket.on(\"connect\", () => {\n\t\t\tthis.setState({ connectionState: \"connected\" });\n\t\t});\n\n\t\tsocket.on(\"disconnect\", () => {\n\t\t\tthis.setState({ connectionState: \"disconnected\" });\n\t\t});\n\n\t\tsocket.on(\"reconnecting\", () => {\n\t\t\tthis.setState({ connectionState: \"reconnecting\" });\n\t\t});\n\n\t\tsocket.on(\"reconnect\", () => {\n\t\t\tthis.setState({ connectionState: \"connected\" });\n\t\t});\n\n\t\tsocket.emit(\"users:refresh\");\n\t\tsocket.emit(\"message:refresh\");\n\t\tsocket.emit(\"gather:refresh\");\n\t},\n\n\ttoggleMessageBox(e) {\n\t\te.preventDefault();\n\t\tconsole.log(\"FOO\")\n\t\tthis.setState({\n\t\t\tshowMessageBox: !this.state.showMessageBox\n\t\t});\n\t},\n\n\ttoggleCollapseMenu(e) {\n\t\te.preventDefault();\n\t\tthis.setState({\n\t\t\tcollapseMenu: !this.state.collapseMenu\n\t\t});\n\t},\n\n\trender() {\n\t\tconst socket = this.props.socket;\n\n\t\tlet eventsPanel;\n\t\tif (this.state.showEventsPanel) {\n\t\t\teventsPanel = ;\n\t\t}\n\n\t\tlet profileModal, chatroom, currentUser;\n\t\tif (this.state.user) {\n\t\t\tprofileModal = ;\n\t\t\tchatroom = ;\n\t\t\tcurrentUser = (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\tconst user = this.state.user;\n\t\tlet username, avatar;\n\t\tif (user) {\n\t\t\tusername = user.username;\n\t\t\tavatar = user.avatar;\n\t\t}\n\n\t\tlet appClass = [\"skin-blue\", \"sidebar-mini\", \"fixed\"];\n\t\tif (this.state.showMessageBox) appClass.push(\"control-sidebar-open\");\n\t\tif (this.state.collapseMenu) appClass.push(\"sidebar-collapse\");\n\n\t\tlet connectionStatus;\n\t\tconst connectionState = this.state.connectionState;\n\t\tif (connectionState === \"connected\") {\n\t\t\tconnectionStatus = Online;\n\t\t} else if (connectionState === \"reconnecting\") {\n\t\t\tconnectionStatus = Reconnecting;\n\t\t} else if (connectionState === \"disconnected\") {\n\t\t\tconnectionStatus = Disconnected;\n\t\t}\n\n\t\treturn (\n\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t Gathersbeta
\n\t\t\t \n\t\t\t\t
\n\t\t\t\t \tFoo
\n\t\t\t\t \n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t
\n\t\t);\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t{profileModal}\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{chatroom}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{eventsPanel}\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nmodule.exports = SplashScreen;\n","const React = require(\"react\");\nconst ReactDOM = require(\"react-dom\");\nconst ReactEmoji = require(\"react-emoji\");\nconst ReactAutolink = require(\"react-autolink\");\nconst MessageBrowser = React.createClass({\n\tgetInitialState() {\n\t\treturn {\n\t\t\tbrowserState: \"\",\n\t\t\tmessages: [],\n\t\t\tpage: 0,\n\t\t\tlimit: 250,\n\t\t\tsearch: \"\"\n\t\t}\n\t},\n\n\thandleNextPage(e) {\n\t\te.preventDefault();\n\t\tconst page = this.state.page;\n\t\tthis.setState({ page: page + 1 });\n\t\tthis.loadMessages();\n\t},\n\n\thandlePreviousPage(e) {\n\t\te.preventDefault();\n\t\tconst page = this.state.page;\n\t\tif (page < 1) return;\n\t\tthis.setState({ page: page - 1 });\n\t\tthis.loadMessages();\n\t},\n\n\tpageHandlers() {\n\t\tlet previous;\n\t\tif (this.state.page > 0) {\n\t\t\tprevious = (\n\t\t\t\tPrev\n\t\t\t);\n\t\t}\n\t\tlet next;\n\t\tif (this.state.messages.length === this.state.limit) {\n\t\t\tnext = (\n\t\t\t\tNext\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t\n\t\t\t\t{previous}\n\t\t\t\t\n\t\t\t\t\t{this.state.page}\n\t\t\t\t\n\t\t\t\t{next}\n\t\t\t
\n\t\t);\n\t},\n\n\tloadMessages() {\n\t\tconst limit = this.state.limit;\n\t\tconst page = this.state.page;\n\t\tlet data = {\n\t\t\tlimit: limit,\n\t\t\tpage: page\n\t\t};\n\n\t\tif (this.state.search.length) {\n\t\t\tdata.query = this.state.search;\n\t\t}\n\n\t\tthis.setState({ browserState: \"Retrieving messages\"});\n\t\t$.ajax({\n\t\t\turl: \"/api/messages\",\n\t\t\tdata: data\n\t\t})\n\t\t.done(data => {\n\t\t\tthis.setState({\n\t\t\t\tmessages: data.messages,\n\t\t\t\tbrowserState: \"\"\n\t\t\t});\n\t\t})\n\t\t.fail(error => {\n\t\t\tconsole.error(error);\n\t\t\tthis.setState({\n\t\t\t\tbrowserState: `Unable to retrieve messages.`\n\t\t\t});\n\t\t})\n\t},\n\n\tcomponentDidMount() {\n\t\tthis.loadMessages();\n\t},\n\n\tupdateLimit(e) {\n\t\tlet newLimit = parseInt(e.target.value, 10);\n\t\tif (isNaN(newLimit) || newLimit > 250) newLimit = 250;\n\t\tthis.setState({ limit: newLimit });\n\t},\n\n\tupdateSearch(e) {\n\t\tthis.setState({ search: e.target.value });\n\t},\n\n\trender() {\n\t\tlet browserState;\n\t\tif (this.state.browserState.length) {\n\t\t\tbrowserState = (\n\t\t\t\t\n\t\t\t\t\t
{this.state.browserState}
\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\t\tconst messages = this.state.messages.map(message => {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t{(new Date(message.createdAt)).toString()} | \n\t\t\t\t\t{message.author.username} | \n\t\t\t\t\t{message.content} | \n\t\t\t\t\t{message._id} | \n\t\t\t\t
\n\t\t\t);\n\t\t});\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t \n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t \n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t \t
\n\t\t\t\t\t\t \t\n\t\t\t\t\t \t
\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t \t
Page Control
\n\t\t\t\t\t\t \t{this.pageHandlers()}\n\t\t\t\t\t \t
\n\t\t\t\t \t
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t{browserState}\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tDate | \n\t\t\t\t\t\t\t\tAuthor | \n\t\t\t\t\t\t\t\tMessage | \n\t\t\t\t\t\t\t\tID | \n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{messages}\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst Chatroom = exports.Chatroom = React.createClass({\n\tpropTypes: {\n\t\tmessages: React.PropTypes.array.isRequired,\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tuser: React.PropTypes.object.isRequired\n\t},\n\n\tgetInitialState() {\n\t\treturn {\n\t\t\tautoScroll: true\n\t\t};\n\t},\n\n\tcomponentDidMount() {\n\t\tlet self = this;\n\n\t\tthis.scrollListener = _.debounce((event) => {\n\t\t\tself.temporarilyDisableAutoScroll(event);\n\t\t}, 300, {\n\t\t leading: false,\n\t\t trailing: true\n\t\t});\n\n\t\tlet node = ReactDOM.findDOMNode(this.refs.messageContainer);\n\t\tnode.addEventListener('scroll', this.scrollListener);\n\n\t\tthis.scrollToBottom();\n\t},\n\n\tcomponentWillUnmount() {\n\t\tnode.removeEventListener('scroll', this.scrollListener);\n\t\tclearTimeout(this.disableScrollTimer);\n\t},\n\n\tloadMoreMessages() {\n\t\tconst earliestMessage = this.props.messages[0];\n\t\tif (earliestMessage === undefined) return;\n\t\tthis.props.socket.emit(\"message:refresh\", {\n\t\t\tbefore: earliestMessage.createdAt\n\t\t});\n\t},\n\n\tsendMessage(message) {\n\t\tthis.props.socket.emit(\"newMessage\", {message: message});\n\t},\n\n\tclearAutoScrollTimeout() {\n\t\tif (this.disableScrollTimer) clearTimeout(this.disableScrollTimer);\n\t},\n\n\ttemporarilyDisableAutoScroll(event) {\n\t\tlet self = this;\n\t\tlet node = event.target;\n\t\tif (node) {\n\t\t\tif (node.scrollHeight - node.scrollTop === node.clientHeight) {\n\t\t\t\tthis.setState({ autoScroll: true });\n\t\t\t\tthis.clearAutoScrollTimeout();\n\t\t\t}\n\t\t\tif (node.scrollHeight - node.scrollTop - node.clientHeight < 50) return;\n\t\t}\n\t\tthis.setState({ autoScroll: false });\n\t\tthis.clearAutoScrollTimeout();\n\t\tthis.disableScrollTimer = setTimeout(() => {\n\t\t\tself.setState({\n\t\t\t\tautoScroll: true\n\t\t\t})\n\t\t}, 10000);\n\t},\n\n\tcomponentDidUpdate() {\n\t\tthis.scrollToBottom();\n\t},\n\n\tscrollToBottom() {\n\t\tif (!this.state.autoScroll) return;\n\t\tlet node = ReactDOM.findDOMNode(this.refs.messageContainer);\n\t node.scrollTop = node.scrollHeight;\n\t},\n\n\trender() {\n\t\tconst socket = this.props.socket;\n\t\tconst messages = this.props.messages.map(message => {\n\t\t\tif (message) {\n\t\t\t\treturn \n\t\t\t}\n\t\t});\n\t\treturn (\n\t\t\t\n\t\t\t\t
Gather Chat
\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst imgurRegex = /^(https?:\\/\\/i\\.imgur\\.com\\/\\S*\\.(jpg|png))$/i;\n\nconst ChatMessage = React.createClass({\n\tpropTypes: {\n\t\tuser: React.PropTypes.object.isRequired,\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tmessage: React.PropTypes.object.isRequired\n\t},\n\n\tmixins: [\n ReactAutolink,\n ReactEmoji\n ],\n\n getInitialState() {\n \treturn {\n \t\tcreatedAt: \"\"\n \t}\n },\n\n updateCreatedAt() {\n \tlet self = this;\n \tif (this.props.message.createdAt) {\n \t\tself.setState({\n \t\t\tcreatedAt: $.timeago(self.props.message.createdAt)\n \t\t})\n \t}\n },\n\n componentWillMount() {\n\t\tthis.updateCreatedAt();\n },\n\n\tcomponentDidMount() {\n\t\tthis.interval = setInterval(this.updateCreatedAt, 60000);\n\t},\n\n\tcomponentWillUnmount: function () {\n\t\tclearInterval(this.interval);\n\t},\n\n\tmessageContent: function () {\n\t\tlet self = this;\n\t\tlet message = self.props.message.content\n\t\tif (message.match(imgurRegex)) {\n\t\t\treturn (\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\treturn self.autolink(message, { \n\t\t\ttarget: \"_blank\", \n\t\t\trel: \"nofollow\" \n\t\t}).map((elem) => {\n\t\t\tif (_.isString(elem)) {\n\t\t\t\treturn self.emojify(elem);\n\t\t\t} else {\n\t\t\t\treturn elem;\n\t\t\t}\n\t\t});\n\t},\n\n\trender() {\n\t\tlet deleteButton;\n\t\tlet user = this.props.user;\n\t\tif (user && user.admin) {\n\t\t\tdeleteButton = ;\n\t\t}\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{this.props.message.author.username}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t{deleteButton}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t{this.state.createdAt}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t
{this.messageContent()}
\n\t\t\t\t
\n\t\t\t\n\t\t);\n\t}\n});\n\nconst DeleteMessageButton = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired\n\t},\n\n\thandleClick (e) {\n\t\te.preventDefault();\n\t\tthis.props.socket.emit(\"message:delete\", {\n\t\t\tid: this.props.messageId\n\t\t});\n\t},\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n})\n\nconst MessageBar = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired\n\t},\n\n\tsendMessage(content) {\n\t\tthis.props.socket.emit(\"message:new\", {\n\t\t\tcontent: content\n\t\t});\n\t},\n\n\tgetInitialState() {\n\t\treturn {\n\t\t\tstatusMessage: null\n\t\t};\n\t},\n\n\tcheckInputLength() {\n\t\tconst input = ReactDOM.findDOMNode(this.refs.content).value;\n\t\tconst currentStatusMessage = this.state.statusMessage;\n\t\tif (input.length > 256) {\n\t\t\treturn this.setState({\n\t\t\t\tstatusMessage: \"Maximum of 256 characters will be saved\"\n\t\t\t})\n\t\t}\n\t\tif (currentStatusMessage !== null) {\n\t\t\tthis.setState({\n\t\t\t\tstatusMessage: null\n\t\t\t});\n\t\t}\n\t},\n\n\thandleInputChange() {\n\t\t// Noop, later assigned as debounced method in componentWillMount\n\t},\n\n\thandleSubmit(e) {\n\t\te.preventDefault();\n\t\tlet content = ReactDOM.findDOMNode(this.refs.content).value.trim();\n\t\tif (!content) return;\n\t\tReactDOM.findDOMNode(this.refs.content).value = '';\n\t\tthis.sendMessage(content);\n\t\treturn;\n\t},\n\n\tcomponentWillMount() {\n\t\tthis.handleInputChange = _.debounce(this.checkInputLength, {\n\t\t\tleading: false,\n\t\t\ttrailing: true\n\t\t});\n\t},\n\n\trender() {\n\t\tlet statusMessage;\n\t\tif (this.state.statusMessage !== null) {\n\t\t\tstatusMessage = \n\t\t\t\t{this.state.statusMessage}\n\t\t\t
;\n\t\t}\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n});\n","const React = require(\"react\");\n\nconst SettingsPanel = exports.SettingsPanel = React.createClass({\n\tpropTypes: {\n\t\ttoggleUpdateTitle: React.PropTypes.func.isRequired,\n\t\tupdateTitle: React.PropTypes.bool.isRequired,\n\t\ttoggleEventsPanel: React.PropTypes.func.isRequired,\n\t\tshowEventsPanel: React.PropTypes.bool.isRequired\n\t},\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
Settings
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t
\n\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n","const React = require(\"react\");\n\nvar SnowMachineMenu = React.createClass({\n\tgetInitialState() {\n\t\treturn {\n\t\t\tsnowMachine: null\n\t\t}\n\t},\n\n\tcomponentDidMount() {\n\t\tconst snowMachine = new SnowMachine();\n\t\tsnowMachine.start();\n\t\tthis.setState({ snowMachine: snowMachine });\n\t},\n\n\ttoggle() {\n\t\tconst snowMachine = this.state.snowMachine;\n\t\tif (snowMachine.timer) {\n\t\t\tsnowMachine.stop();\n\t\t} else {\n\t\t\tsnowMachine.start();\n\t\t}\n\t},\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t );\n\t}\n});\n","const $ = require(\"jquery\");\nconst React = require(\"react\");\nconst Howl = require(\"howler\").Howl;\nconst Howler = require(\"howler\").Howler;\nconst helper = require(\"javascripts/helper\");\nconst storageAvailable = helper.storageAvailable;\n\nclass SoundController {\n\tconstructor () {\n\t\tif (Howl === undefined) {\n\t\t\tthrow new Error(\"Howl.js required to created sound controller\");\n\t\t}\n\n\t\tthis.MINIMUM_PLAY_INTERVAL = 20000;\n\n\t\tthis.playGatherMusic = _.throttle(() => {\n\t\t\tthis.gather.music.play();\n\t\t}, this.MINIMUM_PLAY_INTERVAL);\n\n\t\tthis.isMuted = Howler._muted;\n\t\t\n\t\tlet gatherMusic;\n\t\tif (storageAvailable(\"localStorage\")) {\n\t\t\tlet volume = localStorage.getItem(\"gatherVolume\");\n\t\t\tif (volume !== undefined) Howler.volume(volume);\n\t\t\tgatherMusic = localStorage.getItem(\"gatherMusic\");\n\t\t}\n\n\t\tthis.tunes = {\n\t\t\t\"classic\": {\n\t\t\t\tdescription: \"Gathers Classic\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/gather-1.mp3'\n\t\t\t},\n\t\t\t\"nights\": {\n\t\t\t\tdescription: \"Nights\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/nights.mp3'\n\t\t\t},\n\t\t\t\"robby\": {\n\t\t\t\tdescription: \"Robby\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/robby.mp3'\n\t\t\t},\n\t\t\t\"america\": {\n\t\t\t\tdescription: \"Infamous\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/america.mp3'\n\t\t\t},\n\t\t\t\"prommah\": {\n\t\t\t\tdescription: \"Prommah\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/prommah.mp3'\n\t\t\t},\n\t\t\t\"turts\": {\n\t\t\t\tdescription: \"Gorges Rock your Ass\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/turts.mp3'\n\t\t\t},\n\t\t\t\"skyice\": {\n\t\t\t\tdescription: \"Skyice\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/skyice.mp3'\n\t\t\t},\n\t\t\t\"justwannahavefun\": {\n\t\t\t\tdescription: \"Gorges just want to have fun\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/justwannahavefun.mp3'\n\t\t\t},\n\t\t\t\"eyeofthegorgie\": {\n\t\t\t\tdescription: \"Eye of the Gorgie\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/eyeofthegorgie.mp3'\n\t\t\t},\n\t\t\t\"boondock\": {\n\t\t\t\tdescription: \"Boondock Marines\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/boondock.mp3'\n\t\t\t},\n\t\t\t\"preclassic\": {\n\t\t\t\tdescription: \"Old Gathers Classic\",\n\t\t\t\turl: 'http://www.ensl.org/files/audio/gather-5.mp3'\n\t\t\t}\n\t\t}\n\n\t\tthis.setupGatherMusic(gatherMusic);\n\t}\n\n\tmute() {\n\t\tthis.isMuted = true;\n\t\treturn Howler.mute();\n\t}\n\n\tunMute() {\n\t\tthis.isMuted = false;\n\t\treturn Howler.unmute();\n\t}\n\n\tgetVolume() {\n\t\treturn Howler.volume();\n\t}\n\n\tsetVolume(val) {\n\t\tif (val === undefined || \n\t\t\t\ttypeof val !== 'number' || \n\t\t\t\tMath.abs(val) > 1) return;\n\t\tif (storageAvailable(\"localStorage\")) {\n\t\t\tlocalStorage.setItem(\"gatherVolume\", val);\n\t\t}\n\t\treturn Howler.volume(val);\n\t}\n\n\tplay(music) {\n\t\tif (this.gather && this.gather.music) return this.gather.music.play();\n\t}\n\n\tstop(music) {\n\t\tif (this.gather && this.gather.music) return this.gather.music.stop();\n\t}\n\n\tdefaultGatherMusic() {\n\t\treturn \"classic\";\n\t}\n\n\tsetupGatherMusic (musicName) {\n\t\tlet self = this;\n\t\tlet gatherMusic = self.tunes[musicName];\n\n\t\tif (!gatherMusic) {\n\t\t\tmusicName = this.defaultGatherMusic();\n\t\t\tgatherMusic = self.tunes[musicName]; \n\t\t}\n\n\t\tif (self.gather && self.gather.name === musicName) return;\n\n\t\t// Stop if already playing\n\t\tif (self.gather && self.gather.music) {\n\t\t\tself.gather.music.stop();\n\t\t}\n\n\t\tlet tune = self.tunes[musicName];\n\t\tself.gather = {\n\t\t\tname: musicName,\n\t\t\tdescription: tune.description,\n\t\t\turl: tune.url,\n\t\t\tmusic: new Howl({\n\t\t\t\turls: [tune.url]\n\t\t\t})\n\t\t};\n\t}\n}\n\nvar MusicSelector = React.createClass({\n\tgetInitialState() {\n\t\treturn {\n\t\t\tmusic: this.selectedMusic()\n\t\t}\n\t},\n\n\tselectedMusic() {\n\t\tif (storageAvailable(\"localStorage\")) {\n\t\t\treturn localStorage.getItem(\"gatherMusic\") \n\t\t\t\t|| this.props.soundController.defaultGatherMusic();\n\t\t} else {\n\t\t\treturn this.props.soundController.defaultGatherMusic(); \n\t\t}\n\t},\n\n\tsetMusic(event) {\n\t\tlet name = event.target.value;\n\t\tlet soundController = this.props.soundController;\n\t\tlet selectedTune = soundController.tunes[name];\n\t\tif (selectedTune === undefined) return;\n\t\tthis.setState({ music: name });\n\t\tsoundController.setupGatherMusic(name);\n\t\tif (storageAvailable(\"localStorage\")) {\n\t\t\tlocalStorage.setItem(\"gatherMusic\", name);\n\t\t}\n\t},\n\n\trender() {\n\t\tlet soundController = this.props.soundController;\n\t\tlet tunes = [];\n\t\tfor (var attr in soundController.tunes) {\n\t\t\tlet o = soundController.tunes[attr];\n\t\t\to.id = attr;\n\t\t\ttunes.push(o);\n\t\t}\n\t\tlet options = tunes.map(tune => {\n\t\t\treturn ;\n\t\t});\n\t\treturn (\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t);\n\t}\n})\n\nvar SoundPanel = React.createClass({\n\tcomponentDidMount() {\n\t\tlet soundController = this.props.soundController;\n\t\tlet scale = 10;\n\n\t\t$('a#sound-dropdown').on('click', function (event) {\n\t\t\t$(this).parent().toggleClass('open');\n\t\t});\n\n\t\t$(\"#volume-slide\").slider({\n\t\t\tmin: 0,\n\t\t\tmax: scale,\n\t\t\tstep: 1\n\t\t}).on(\"slideStop\", ({value}) => {\n\t\t\tsoundController.setVolume(value / scale);\n\t\t}).slider('setValue', soundController.getVolume() * scale);\n\t},\n\n\tmute() {\n\t\tthis.props.soundController.mute();\n\t\tthis.forceUpdate();\n\t},\n\n\tunMute() {\n\t\tthis.props.soundController.unMute();\n\t\tthis.forceUpdate();\n\t},\n\n\tplay() {\n\t\tthis.props.soundController.play();\n\t},\n\n\tstop() {\n\t\tthis.props.soundController.stop();\n\t},\n\n\trender() {\n\t\tlet soundController = this.props.soundController;\n\t\tlet mutedIcon, mutedButton;\n\t\tif (soundController.isMuted) {\n\t\t\tmutedIcon = ;\n\t\t\tmutedButton = \n\t\t\t\t\n\t\t\t\t\t{mutedIcon} Muted\n\t\t\t\t\n\t\t\t;\n\t\t} else {\n\t\t\tmutedIcon = ;\n\t\t\tmutedButton = \n\t\t\t\t\n\t\t\t\t\t{mutedIcon} Unmuted\n\t\t\t\t\n\t\t\t;\n\t\t}\n\t\treturn ;\n\t}\n});\n\nmodule.exports = {\n\tSoundController: SoundController,\n\tSoundPanel: SoundPanel\n};\n","const React = require(\"react\");\n\nconst teamspeakDefaults = {\n\turl: \"ts3server://ensl.org/\",\n\tpassword: \"ns2gather\",\n\talien: {\n\t\tchannel: \"NS2 Gather/Gather #1/Alien\",\n\t\tpassword: \"ns2gather\"\n\t},\n\tmarine: {\n\t\tchannel: \"NS2 Gather/Gather #1/Marine\",\n\t\tpassword: \"ns2gather\"\n\t}\n};\n\nvar TeamSpeakButton = exports.TeamSpeakButton = React.createClass({\n\tgetDefaultProps() {\n\t\treturn teamspeakDefaults\n\t},\n\tmarineUrl() {\n\t\treturn this.teamSpeakUrl(this.props.marine);\n\t},\n\talienUrl() {\n\t\treturn this.teamSpeakUrl(this.props.alien);\n\t},\n\tteamSpeakUrl(conn) {\n\t\tlet params = `channel=${encodeURIComponent(conn.channel)}&\n\t\t\tchannelpassword=${encodeURIComponent(conn.password)}`;\n\t\treturn (`${this.props.url}?${params}`);\n\t},\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n});\n\nvar TeamSpeakModal = exports.TeamSpeakModal = React.createClass({\n\tgetDefaultProps() {\n\t\treturn teamspeakDefaults;\n\t},\n\n\trender() {\n\t\treturn \n\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
Teamspeak Server Information
\n\t\t\t\t\t\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t- Server
\n\t\t\t\t\t\t\t- {this.props.url}
\n\t\t\t\t\t\t\t- Password
\n\t\t\t\t\t\t\t- {this.props.password}
\n\t\t\t\t\t\t\t- Marine Channel
\n\t\t\t\t\t\t\t- {this.props.marine.channel}
\n\t\t\t\t\t\t\t- Alien Channel
\n\t\t\t\t\t\t\t- {this.props.alien.channel}
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t
\n\t}\n});\n","import {LifeformIcons} from \"javascripts/components/gather\";\nconst React = require(\"react\");\nconst helper = require(\"javascripts/helper\");\nconst enslUrl = helper.enslUrl;\nconst hiveUrl = helper.hiveUrl;\nconst modalId = helper.modalId;\n\nconst UserLogin = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired\n\t},\n\n\tauthorizeId(id) {\n\t\tthis.props.socket.emit(\"users:authorize\", {\n\t\t\tid: parseInt(id, 10)\n\t\t});\n\t},\n\n\thandleSubmit(e) {\n\t\te.preventDefault();\n\t\tlet id = React.findDOMNode(this.refs.authorize_id).value.trim();\n\t\tif (!id) return;\n\t\tReact.findDOMNode(this.refs.authorize_id).value = '';\n\t\tthis.authorizeId(id);\n\t},\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t);\n\t}\n});\n\nconst DisconnectUserButton = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tid: React.PropTypes.number.isRequired\n\t},\n\n\tgetDefaultProps() {\n\t\treturn {\n\t\t\tid: null\n\t\t};\n\t},\n\n\tdisconnectUser() {\n\t\tthis.props.socket.emit(\"users:disconnect\", {\n\t\t\tid: this.props.id\n\t\t});\n\t},\n\t\n\trender() {\n\t\treturn \n\t}\n});\n\nconst UserModal = React.createClass({\n\tpropTypes: {\n\t\tuser: React.PropTypes.object.isRequired,\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tcurrentUser: React.PropTypes.object.isRequired\n\t},\n\n\trender() {\n\t\tconst currentUser = this.props.currentUser;\n\t\tconst user = this.props.user;\n\t\tlet hiveStats;\n\t\tif (user.hive.id) {\n\t\t\thiveStats = [\n\t\t\tHive Stats | |
,\n\t\t\t\n\t\t\t\tELO | \n\t\t\t\t{user.hive.skill} | \n\t\t\t
,\n\t\t\t\n\t\t\t\tHours Played | \n\t\t\t\t{Math.round(user.hive.playTime / 3600)} | \n\t\t\t
,\n\t\t\t\n\t\t\t\tWins | \n\t\t\t\t{user.hive.wins} | \n\t\t\t
,\n\t\t\t\n\t\t\t\tLosses | \n\t\t\t\t{user.hive.loses} | \n\t\t\t
,\n\t\t\t\n\t\t\t\tKills (/min) | \n\t\t\t\t{user.hive.kills} ({_.round(user.hive.kills / (user.hive.playTime / 60), 1)}) | \n\t\t\t
,\n\t\t\t\n\t\t\t\tAssists (/min) | \n\t\t\t\t{user.hive.assists} ({_.round(user.hive.assists / (user.hive.playTime / 60), 1)}) | \n\t\t\t
,\n\t\t\t\n\t\t\t\tDeaths (/min) | \n\t\t\t\t{user.hive.deaths} ({_.round(user.hive.deaths / (user.hive.playTime / 60), 1)}) | \n\t\t\t
\n\t\t\t]\n\t\t}\n\t\tlet adminOptions;\n\t\tif (currentUser.admin) {\n\t\t\tadminOptions = ;\n\t\t}\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t{user.username}\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
![]()
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tLifeforms | \n\t\t\t\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tLinks | \n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tENSL Profile \n\t\t\t\t\t\t\t\t\t\t\tHive Profile\n\t\t\t\t\t\t\t\t\t\t | \n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t{hiveStats}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t{adminOptions}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n})\n\nconst UserItem = React.createClass({\n\tpropTypes: {\n\t\tuser: React.PropTypes.object.isRequired,\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tcurrentUser: React.PropTypes.object.isRequired\n\t},\n\n\trender() {\n\t\tconst user = this.props.user;\n\t\tconst currentUser = this.props.currentUser;\n\t\treturn (\n\t\t\t\n\t\t\t\t{user.username}\n\t\t\t\t\n\t\t\t\n\t\t);\n\t}\n});\n\nconst UserMenu = exports.UserMenu = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tusers: React.PropTypes.array.isRequired\n\t},\n\n\trender() {\n\t\tconst users = this.props.users\n\t\t.sort((a, b) => (a.username.toLowerCase() > b.username.toLowerCase()) ? 1 : -1)\n\t\t.map(user => {\n\t\t\treturn \n\t\t});\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t Online\n\t\t\t\t\t\t{this.props.users.length}\n\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t{users}\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst AdminPanel = exports.AdminPanel = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired\n\t},\n\n\thandleGatherReset() {\n\t\tthis.props.socket.emit(\"gather:reset\");\n\t},\n\n\trender() {\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
Administration Panel
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst ProfileModal = exports.ProfileModal = React.createClass({\n\tpropTypes: {\n\t\tuser: React.PropTypes.object.isRequired\n\t},\n\n\thandleUserUpdate(e) {\n\t\te.preventDefault();\n\t\tlet abilities = {\n\t\t\tskulk: React.findDOMNode(this.refs.skulk).checked,\n\t\t\tlerk: React.findDOMNode(this.refs.lerk).checked,\n\t\t\tgorge: React.findDOMNode(this.refs.gorge).checked,\n\t\t\tfade: React.findDOMNode(this.refs.fade).checked,\n\t\t\tonos: React.findDOMNode(this.refs.onos).checked,\n\t\t\tcommander: React.findDOMNode(this.refs.commander).checked\n\t\t};\n\t\tlet skill = React.findDOMNode(this.refs.playerskill).value;\n\t\tsocket.emit(\"users:update:profile\", {\n\t\t\tid: this.props.user.id,\n\t\t\tprofile: {\n\t\t\t\tabilities: abilities,\n\t\t\t\tskill: skill\n\t\t\t}\n\t\t});\n\t},\n\n\trender() {\n\t\tif (!this.props.user) return false;\n\t\tlet abilities = this.props.user.profile.abilities;\n\t\tlet abilitiesForm = [];\n\t\tfor (let lifeform in abilities) {\n\t\t\tabilitiesForm.push(\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t);\n\t\t}\n\n\t\tlet skillLevel = this.props.user.profile.skill;\n\t\tlet skillLevels = _.uniq([\"Low Skill\", \"Medium Skill\", \"High Skill\", skillLevel])\n\t\t\t.filter(skill => { return typeof skill === 'string' })\n\t\t\t.map(skill => { return });\n\n\t\treturn (\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
Profile
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
\n\t\t);\n\t}\n});\n\nconst CurrentUser = exports.CurrentUser = React.createClass({\n\trender() {\n\t\tif (this.props.user) {\n\t\t\tlet adminOptions;\n\t\t\tif (this.props.user.admin || this.props.user.moderator) {\n\t\t\t\tadminOptions = (\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t Administration\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t)\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t{this.props.user.username}
\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t- \n\t\t\t\t\t\t\t Profile\n\t\t\t\t\t\t
\n\t\t\t\t\t\t- \n\t\t\t\t\t\t\t Settings\n\t\t\t\t\t\t
\n\t\t\t\t\t\t{adminOptions}\n\t\t\t\t\t
\n\t\t\t\t\n\t\t\t);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n});\n\nvar AssumeUserIdButton = exports.AssumeUserIdButton = React.createClass({\n\tpropTypes: {\n\t\tsocket: React.PropTypes.object.isRequired,\n\t\tgatherer: React.PropTypes.object.isRequired,\n\t\tcurrentUser: React.PropTypes.object.isRequired,\n\t},\n\n\tassumeId(e) {\n\t\te.preventDefault();\n\t\tif (this.props.gatherer) {\n\t\t\tthis.props.socket.emit(\"users:authorize\", {\n\t\t\t\tid: this.props.gatherer.id\n\t\t\t});\n\t\t\t// Refresh Gather list\n\t\t\tsetTimeout(() => {\n\t\t\t\tthis.props.socket.emit(\"gather:refresh\");\n\t\t\t}, 5000);\n\t\t}\n\t},\n\n\trender() {\n\t\tlet currentUser = this.props.currentUser;\n\t\tlet gatherer = this.props.gatherer;\n\t\tif (currentUser && gatherer) {\n\t\t\treturn \n\t\t}\n\t}\n});\n","// Accepts an array of IDs voted\n// 1. Creates an array of tally objects, \n//\t\twith ID as prop and vote count as val { 12: 0 }\n// 2. Increments ID vote tally for every vote\n// 3. Sorts \n\nconst rankVotes = exports.rankVotes = function (votes, candidates) {\n\tvar initial = candidates.reduce(function (acc, candidate) {\n\t\tacc[candidate.id] = 0;\n\t\treturn acc;\n\t}, {});\n\n\tvar scores = votes.reduce(function (acc, id) {\n\t\tif (acc[id] !== undefined) {\n\t\t\tacc[id]++;\n\t\t}\n\t\treturn acc;\n\t}, initial);\n\n\tvar rank = [];\n\n\tfor (var id in scores) {\n\t\tif (scores.hasOwnProperty(id)) {\n\t\t\trank.push({\n\t\t\t\tid: parseInt(id, 10),\n\t\t\t\tcount: scores[id]\n\t\t\t});\n\t\t}\n\t}\n\n\treturn rank.sort(function (a, b) {\n\t\tif (b.count === a.count) {\n\t\t\treturn b.id - a.id;\n\t\t} else {\n\t\t\treturn b.count - a.count;\n\t\t}\n\t}).map(function (tally) {\n\t\treturn tally.id\n\t}).map(function (id) {\n\t\treturn candidates.reduce(function (acc, candidate) {\n\t\t\tif (candidate.id === id) return candidate;\n\t\t\treturn acc;\n\t\t});\n\t});\n};\n\nconst enslUrl = exports.enslUrl = (gatherer) => {\n\treturn `http://www.ensl.org/users/${gatherer.id}`\n};\n\nconst hiveUrl = exports.hiveUrl = (gatherer) => {\n\tconst hiveId = gatherer.user.hive.id;\n\tif (hiveId) {\n\t\treturn `http://hive.naturalselection2.com/profile/${hiveId}`;\n\t} else {\n\t\treturn null;\n\t}\n};\n\nconst modalId = exports.modalId = (user) => {\n\treturn `user-modal-${user.id}`;\n};\n\nconst storageAvailable = exports.storageAvailable = (type) => {\n\ttry {\n\t\tvar storage = window[type],\n\t\t\tx = '__storage_test__';\n\t\tstorage.setItem(x, x);\n\t\tstorage.removeItem(x);\n\t\treturn true;\n\t}\n\tcatch(e) {\n\t\treturn false;\n\t}\n};\n"]}
\ No newline at end of file
diff --git a/public/vendor.js b/public/vendor.js
deleted file mode 100644
index 7e2bbad..0000000
--- a/public/vendor.js
+++ /dev/null
@@ -1,48365 +0,0 @@
-(function() {
- 'use strict';
-
- var globals = typeof window === 'undefined' ? global : window;
- if (typeof globals.require === 'function') return;
-
- var modules = {};
- var cache = {};
- var aliases = {};
- var has = ({}).hasOwnProperty;
-
- var endsWith = function(str, suffix) {
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
- };
-
- var _cmp = 'components/';
- var unalias = function(alias, loaderPath) {
- var start = 0;
- if (loaderPath) {
- if (loaderPath.indexOf(_cmp) === 0) {
- start = _cmp.length;
- }
- if (loaderPath.indexOf('/', start) > 0) {
- loaderPath = loaderPath.substring(start, loaderPath.indexOf('/', start));
- }
- }
- var result = aliases[alias + '/index.js'] || aliases[loaderPath + '/deps/' + alias + '/index.js'];
- if (result) {
- return _cmp + result.substring(0, result.length - '.js'.length);
- }
- return alias;
- };
-
- var _reg = /^\.\.?(\/|$)/;
- var expand = function(root, name) {
- var results = [], part;
- var parts = (_reg.test(name) ? root + '/' + name : name).split('/');
- for (var i = 0, length = parts.length; i < length; i++) {
- part = parts[i];
- if (part === '..') {
- results.pop();
- } else if (part !== '.' && part !== '') {
- results.push(part);
- }
- }
- return results.join('/');
- };
-
- var dirname = function(path) {
- return path.split('/').slice(0, -1).join('/');
- };
-
- var localRequire = function(path) {
- return function expanded(name) {
- var absolute = expand(dirname(path), name);
- return globals.require(absolute, path);
- };
- };
-
- var initModule = function(name, definition) {
- var module = {id: name, exports: {}};
- cache[name] = module;
- definition(module.exports, localRequire(name), module);
- return module.exports;
- };
-
- var require = function(name, loaderPath) {
- var path = expand(name, '.');
- if (loaderPath == null) loaderPath = '/';
- path = unalias(name, loaderPath);
-
- if (has.call(cache, path)) return cache[path].exports;
- if (has.call(modules, path)) return initModule(path, modules[path]);
-
- var dirIndex = expand(path, './index');
- if (has.call(cache, dirIndex)) return cache[dirIndex].exports;
- if (has.call(modules, dirIndex)) return initModule(dirIndex, modules[dirIndex]);
-
- throw new Error('Cannot find module "' + name + '" from '+ '"' + loaderPath + '"');
- };
-
- require.alias = function(from, to) {
- aliases[to] = from;
- };
-
- require.register = require.define = function(bundle, fn) {
- if (typeof bundle === 'object') {
- for (var key in bundle) {
- if (has.call(bundle, key)) {
- modules[key] = bundle[key];
- }
- }
- } else {
- modules[bundle] = fn;
- }
- };
-
- require.list = function() {
- var result = [];
- for (var item in modules) {
- if (has.call(modules, item)) {
- result.push(item);
- }
- }
- return result;
- };
-
- require.brunch = true;
- require._cache = cache;
- globals.require = require;
-})();
-(function() {
- var global = window;
- var __shims = {assert: ({}),buffer: ({}),child_process: ({}),cluster: ({}),crypto: ({}),dgram: ({}),dns: ({}),events: ({}),fs: ({}),http: ({}),https: ({}),net: ({}),os: ({}),path: ({}),punycode: ({}),querystring: ({}),readline: ({}),repl: ({}),string_decoder: ({}),tls: ({}),tty: ({}),url: ({}),util: ({}),vm: ({}),zlib: ({}),process: ({"env":{}})};
- var process = __shims.process;
-
- var __makeRequire = function(r, __brmap) {
- return function(name) {
- if (__brmap[name] !== undefined) name = __brmap[name];
- name = name.replace(".js", "");
- return ["assert","buffer","child_process","cluster","crypto","dgram","dns","events","fs","http","https","net","os","path","punycode","querystring","readline","repl","string_decoder","tls","tty","url","util","vm","zlib","process"].indexOf(name) === -1 ? r(name) : __shims[name];
- }
- };
- require.register('bootstrap', function(exports,req,module){
- var require = __makeRequire((function(n) { return req(n.replace('./', 'bootstrap/')); }), {});
- // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
-require('../../js/transition.js')
-require('../../js/alert.js')
-require('../../js/button.js')
-require('../../js/carousel.js')
-require('../../js/collapse.js')
-require('../../js/dropdown.js')
-require('../../js/modal.js')
-require('../../js/tooltip.js')
-require('../../js/popover.js')
-require('../../js/scrollspy.js')
-require('../../js/tab.js')
-require('../../js/affix.js')
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/affix', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: affix.js v3.3.6
- * http://getbootstrap.com/javascript/#affix
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // AFFIX CLASS DEFINITION
- // ======================
-
- var Affix = function (element, options) {
- this.options = $.extend({}, Affix.DEFAULTS, options)
-
- this.$target = $(this.options.target)
- .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
- .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
-
- this.$element = $(element)
- this.affixed = null
- this.unpin = null
- this.pinnedOffset = null
-
- this.checkPosition()
- }
-
- Affix.VERSION = '3.3.6'
-
- Affix.RESET = 'affix affix-top affix-bottom'
-
- Affix.DEFAULTS = {
- offset: 0,
- target: window
- }
-
- Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- var targetHeight = this.$target.height()
-
- if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
-
- if (this.affixed == 'bottom') {
- if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
- return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
- }
-
- var initializing = this.affixed == null
- var colliderTop = initializing ? scrollTop : position.top
- var colliderHeight = initializing ? targetHeight : height
-
- if (offsetTop != null && scrollTop <= offsetTop) return 'top'
- if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
-
- return false
- }
-
- Affix.prototype.getPinnedOffset = function () {
- if (this.pinnedOffset) return this.pinnedOffset
- this.$element.removeClass(Affix.RESET).addClass('affix')
- var scrollTop = this.$target.scrollTop()
- var position = this.$element.offset()
- return (this.pinnedOffset = position.top - scrollTop)
- }
-
- Affix.prototype.checkPositionWithEventLoop = function () {
- setTimeout($.proxy(this.checkPosition, this), 1)
- }
-
- Affix.prototype.checkPosition = function () {
- if (!this.$element.is(':visible')) return
-
- var height = this.$element.height()
- var offset = this.options.offset
- var offsetTop = offset.top
- var offsetBottom = offset.bottom
- var scrollHeight = Math.max($(document).height(), $(document.body).height())
-
- if (typeof offset != 'object') offsetBottom = offsetTop = offset
- if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
- if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
-
- var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
-
- if (this.affixed != affix) {
- if (this.unpin != null) this.$element.css('top', '')
-
- var affixType = 'affix' + (affix ? '-' + affix : '')
- var e = $.Event(affixType + '.bs.affix')
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- this.affixed = affix
- this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
-
- this.$element
- .removeClass(Affix.RESET)
- .addClass(affixType)
- .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
- }
-
- if (affix == 'bottom') {
- this.$element.offset({
- top: scrollHeight - height - offsetBottom
- })
- }
- }
-
-
- // AFFIX PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.affix')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.affix
-
- $.fn.affix = Plugin
- $.fn.affix.Constructor = Affix
-
-
- // AFFIX NO CONFLICT
- // =================
-
- $.fn.affix.noConflict = function () {
- $.fn.affix = old
- return this
- }
-
-
- // AFFIX DATA-API
- // ==============
-
- $(window).on('load', function () {
- $('[data-spy="affix"]').each(function () {
- var $spy = $(this)
- var data = $spy.data()
-
- data.offset = data.offset || {}
-
- if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
- if (data.offsetTop != null) data.offset.top = data.offsetTop
-
- Plugin.call($spy, data)
- })
- })
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/alert', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: alert.js v3.3.6
- * http://getbootstrap.com/javascript/#alerts
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // ALERT CLASS DEFINITION
- // ======================
-
- var dismiss = '[data-dismiss="alert"]'
- var Alert = function (el) {
- $(el).on('click', dismiss, this.close)
- }
-
- Alert.VERSION = '3.3.6'
-
- Alert.TRANSITION_DURATION = 150
-
- Alert.prototype.close = function (e) {
- var $this = $(this)
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = $(selector)
-
- if (e) e.preventDefault()
-
- if (!$parent.length) {
- $parent = $this.closest('.alert')
- }
-
- $parent.trigger(e = $.Event('close.bs.alert'))
-
- if (e.isDefaultPrevented()) return
-
- $parent.removeClass('in')
-
- function removeElement() {
- // detach from parent, fire event then clean up data
- $parent.detach().trigger('closed.bs.alert').remove()
- }
-
- $.support.transition && $parent.hasClass('fade') ?
- $parent
- .one('bsTransitionEnd', removeElement)
- .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
- removeElement()
- }
-
-
- // ALERT PLUGIN DEFINITION
- // =======================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.alert')
-
- if (!data) $this.data('bs.alert', (data = new Alert(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.alert
-
- $.fn.alert = Plugin
- $.fn.alert.Constructor = Alert
-
-
- // ALERT NO CONFLICT
- // =================
-
- $.fn.alert.noConflict = function () {
- $.fn.alert = old
- return this
- }
-
-
- // ALERT DATA-API
- // ==============
-
- $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/button', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: button.js v3.3.6
- * http://getbootstrap.com/javascript/#buttons
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // BUTTON PUBLIC CLASS DEFINITION
- // ==============================
-
- var Button = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Button.DEFAULTS, options)
- this.isLoading = false
- }
-
- Button.VERSION = '3.3.6'
-
- Button.DEFAULTS = {
- loadingText: 'loading...'
- }
-
- Button.prototype.setState = function (state) {
- var d = 'disabled'
- var $el = this.$element
- var val = $el.is('input') ? 'val' : 'html'
- var data = $el.data()
-
- state += 'Text'
-
- if (data.resetText == null) $el.data('resetText', $el[val]())
-
- // push to event loop to allow forms to submit
- setTimeout($.proxy(function () {
- $el[val](data[state] == null ? this.options[state] : data[state])
-
- if (state == 'loadingText') {
- this.isLoading = true
- $el.addClass(d).attr(d, d)
- } else if (this.isLoading) {
- this.isLoading = false
- $el.removeClass(d).removeAttr(d)
- }
- }, this), 0)
- }
-
- Button.prototype.toggle = function () {
- var changed = true
- var $parent = this.$element.closest('[data-toggle="buttons"]')
-
- if ($parent.length) {
- var $input = this.$element.find('input')
- if ($input.prop('type') == 'radio') {
- if ($input.prop('checked')) changed = false
- $parent.find('.active').removeClass('active')
- this.$element.addClass('active')
- } else if ($input.prop('type') == 'checkbox') {
- if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
- this.$element.toggleClass('active')
- }
- $input.prop('checked', this.$element.hasClass('active'))
- if (changed) $input.trigger('change')
- } else {
- this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
- this.$element.toggleClass('active')
- }
- }
-
-
- // BUTTON PLUGIN DEFINITION
- // ========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.button')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.button', (data = new Button(this, options)))
-
- if (option == 'toggle') data.toggle()
- else if (option) data.setState(option)
- })
- }
-
- var old = $.fn.button
-
- $.fn.button = Plugin
- $.fn.button.Constructor = Button
-
-
- // BUTTON NO CONFLICT
- // ==================
-
- $.fn.button.noConflict = function () {
- $.fn.button = old
- return this
- }
-
-
- // BUTTON DATA-API
- // ===============
-
- $(document)
- .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- var $btn = $(e.target)
- if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
- Plugin.call($btn, 'toggle')
- if (!($(e.target).is('input[type="radio"]') || $(e.target).is('input[type="checkbox"]'))) e.preventDefault()
- })
- .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
- $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
- })
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/carousel', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: carousel.js v3.3.6
- * http://getbootstrap.com/javascript/#carousel
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CAROUSEL CLASS DEFINITION
- // =========================
-
- var Carousel = function (element, options) {
- this.$element = $(element)
- this.$indicators = this.$element.find('.carousel-indicators')
- this.options = options
- this.paused = null
- this.sliding = null
- this.interval = null
- this.$active = null
- this.$items = null
-
- this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
-
- this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
- .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
- .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
- }
-
- Carousel.VERSION = '3.3.6'
-
- Carousel.TRANSITION_DURATION = 600
-
- Carousel.DEFAULTS = {
- interval: 5000,
- pause: 'hover',
- wrap: true,
- keyboard: true
- }
-
- Carousel.prototype.keydown = function (e) {
- if (/input|textarea/i.test(e.target.tagName)) return
- switch (e.which) {
- case 37: this.prev(); break
- case 39: this.next(); break
- default: return
- }
-
- e.preventDefault()
- }
-
- Carousel.prototype.cycle = function (e) {
- e || (this.paused = false)
-
- this.interval && clearInterval(this.interval)
-
- this.options.interval
- && !this.paused
- && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
-
- return this
- }
-
- Carousel.prototype.getItemIndex = function (item) {
- this.$items = item.parent().children('.item')
- return this.$items.index(item || this.$active)
- }
-
- Carousel.prototype.getItemForDirection = function (direction, active) {
- var activeIndex = this.getItemIndex(active)
- var willWrap = (direction == 'prev' && activeIndex === 0)
- || (direction == 'next' && activeIndex == (this.$items.length - 1))
- if (willWrap && !this.options.wrap) return active
- var delta = direction == 'prev' ? -1 : 1
- var itemIndex = (activeIndex + delta) % this.$items.length
- return this.$items.eq(itemIndex)
- }
-
- Carousel.prototype.to = function (pos) {
- var that = this
- var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
-
- if (pos > (this.$items.length - 1) || pos < 0) return
-
- if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
- if (activeIndex == pos) return this.pause().cycle()
-
- return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
- }
-
- Carousel.prototype.pause = function (e) {
- e || (this.paused = true)
-
- if (this.$element.find('.next, .prev').length && $.support.transition) {
- this.$element.trigger($.support.transition.end)
- this.cycle(true)
- }
-
- this.interval = clearInterval(this.interval)
-
- return this
- }
-
- Carousel.prototype.next = function () {
- if (this.sliding) return
- return this.slide('next')
- }
-
- Carousel.prototype.prev = function () {
- if (this.sliding) return
- return this.slide('prev')
- }
-
- Carousel.prototype.slide = function (type, next) {
- var $active = this.$element.find('.item.active')
- var $next = next || this.getItemForDirection(type, $active)
- var isCycling = this.interval
- var direction = type == 'next' ? 'left' : 'right'
- var that = this
-
- if ($next.hasClass('active')) return (this.sliding = false)
-
- var relatedTarget = $next[0]
- var slideEvent = $.Event('slide.bs.carousel', {
- relatedTarget: relatedTarget,
- direction: direction
- })
- this.$element.trigger(slideEvent)
- if (slideEvent.isDefaultPrevented()) return
-
- this.sliding = true
-
- isCycling && this.pause()
-
- if (this.$indicators.length) {
- this.$indicators.find('.active').removeClass('active')
- var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
- $nextIndicator && $nextIndicator.addClass('active')
- }
-
- var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
- if ($.support.transition && this.$element.hasClass('slide')) {
- $next.addClass(type)
- $next[0].offsetWidth // force reflow
- $active.addClass(direction)
- $next.addClass(direction)
- $active
- .one('bsTransitionEnd', function () {
- $next.removeClass([type, direction].join(' ')).addClass('active')
- $active.removeClass(['active', direction].join(' '))
- that.sliding = false
- setTimeout(function () {
- that.$element.trigger(slidEvent)
- }, 0)
- })
- .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
- } else {
- $active.removeClass('active')
- $next.addClass('active')
- this.sliding = false
- this.$element.trigger(slidEvent)
- }
-
- isCycling && this.cycle()
-
- return this
- }
-
-
- // CAROUSEL PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.carousel')
- var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
- var action = typeof option == 'string' ? option : options.slide
-
- if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
- if (typeof option == 'number') data.to(option)
- else if (action) data[action]()
- else if (options.interval) data.pause().cycle()
- })
- }
-
- var old = $.fn.carousel
-
- $.fn.carousel = Plugin
- $.fn.carousel.Constructor = Carousel
-
-
- // CAROUSEL NO CONFLICT
- // ====================
-
- $.fn.carousel.noConflict = function () {
- $.fn.carousel = old
- return this
- }
-
-
- // CAROUSEL DATA-API
- // =================
-
- var clickHandler = function (e) {
- var href
- var $this = $(this)
- var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
- if (!$target.hasClass('carousel')) return
- var options = $.extend({}, $target.data(), $this.data())
- var slideIndex = $this.attr('data-slide-to')
- if (slideIndex) options.interval = false
-
- Plugin.call($target, options)
-
- if (slideIndex) {
- $target.data('bs.carousel').to(slideIndex)
- }
-
- e.preventDefault()
- }
-
- $(document)
- .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
- .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
-
- $(window).on('load', function () {
- $('[data-ride="carousel"]').each(function () {
- var $carousel = $(this)
- Plugin.call($carousel, $carousel.data())
- })
- })
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/collapse', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: collapse.js v3.3.6
- * http://getbootstrap.com/javascript/#collapse
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // COLLAPSE PUBLIC CLASS DEFINITION
- // ================================
-
- var Collapse = function (element, options) {
- this.$element = $(element)
- this.options = $.extend({}, Collapse.DEFAULTS, options)
- this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
- '[data-toggle="collapse"][data-target="#' + element.id + '"]')
- this.transitioning = null
-
- if (this.options.parent) {
- this.$parent = this.getParent()
- } else {
- this.addAriaAndCollapsedClass(this.$element, this.$trigger)
- }
-
- if (this.options.toggle) this.toggle()
- }
-
- Collapse.VERSION = '3.3.6'
-
- Collapse.TRANSITION_DURATION = 350
-
- Collapse.DEFAULTS = {
- toggle: true
- }
-
- Collapse.prototype.dimension = function () {
- var hasWidth = this.$element.hasClass('width')
- return hasWidth ? 'width' : 'height'
- }
-
- Collapse.prototype.show = function () {
- if (this.transitioning || this.$element.hasClass('in')) return
-
- var activesData
- var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
-
- if (actives && actives.length) {
- activesData = actives.data('bs.collapse')
- if (activesData && activesData.transitioning) return
- }
-
- var startEvent = $.Event('show.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- if (actives && actives.length) {
- Plugin.call(actives, 'hide')
- activesData || actives.data('bs.collapse', null)
- }
-
- var dimension = this.dimension()
-
- this.$element
- .removeClass('collapse')
- .addClass('collapsing')[dimension](0)
- .attr('aria-expanded', true)
-
- this.$trigger
- .removeClass('collapsed')
- .attr('aria-expanded', true)
-
- this.transitioning = 1
-
- var complete = function () {
- this.$element
- .removeClass('collapsing')
- .addClass('collapse in')[dimension]('')
- this.transitioning = 0
- this.$element
- .trigger('shown.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- var scrollSize = $.camelCase(['scroll', dimension].join('-'))
-
- this.$element
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
- }
-
- Collapse.prototype.hide = function () {
- if (this.transitioning || !this.$element.hasClass('in')) return
-
- var startEvent = $.Event('hide.bs.collapse')
- this.$element.trigger(startEvent)
- if (startEvent.isDefaultPrevented()) return
-
- var dimension = this.dimension()
-
- this.$element[dimension](this.$element[dimension]())[0].offsetHeight
-
- this.$element
- .addClass('collapsing')
- .removeClass('collapse in')
- .attr('aria-expanded', false)
-
- this.$trigger
- .addClass('collapsed')
- .attr('aria-expanded', false)
-
- this.transitioning = 1
-
- var complete = function () {
- this.transitioning = 0
- this.$element
- .removeClass('collapsing')
- .addClass('collapse')
- .trigger('hidden.bs.collapse')
- }
-
- if (!$.support.transition) return complete.call(this)
-
- this.$element
- [dimension](0)
- .one('bsTransitionEnd', $.proxy(complete, this))
- .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
- }
-
- Collapse.prototype.toggle = function () {
- this[this.$element.hasClass('in') ? 'hide' : 'show']()
- }
-
- Collapse.prototype.getParent = function () {
- return $(this.options.parent)
- .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
- .each($.proxy(function (i, element) {
- var $element = $(element)
- this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
- }, this))
- .end()
- }
-
- Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
- var isOpen = $element.hasClass('in')
-
- $element.attr('aria-expanded', isOpen)
- $trigger
- .toggleClass('collapsed', !isOpen)
- .attr('aria-expanded', isOpen)
- }
-
- function getTargetFromTrigger($trigger) {
- var href
- var target = $trigger.attr('data-target')
- || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
-
- return $(target)
- }
-
-
- // COLLAPSE PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.collapse')
- var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
- if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.collapse
-
- $.fn.collapse = Plugin
- $.fn.collapse.Constructor = Collapse
-
-
- // COLLAPSE NO CONFLICT
- // ====================
-
- $.fn.collapse.noConflict = function () {
- $.fn.collapse = old
- return this
- }
-
-
- // COLLAPSE DATA-API
- // =================
-
- $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
- var $this = $(this)
-
- if (!$this.attr('data-target')) e.preventDefault()
-
- var $target = getTargetFromTrigger($this)
- var data = $target.data('bs.collapse')
- var option = data ? 'toggle' : $this.data()
-
- Plugin.call($target, option)
- })
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/dropdown', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: dropdown.js v3.3.6
- * http://getbootstrap.com/javascript/#dropdowns
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // DROPDOWN CLASS DEFINITION
- // =========================
-
- var backdrop = '.dropdown-backdrop'
- var toggle = '[data-toggle="dropdown"]'
- var Dropdown = function (element) {
- $(element).on('click.bs.dropdown', this.toggle)
- }
-
- Dropdown.VERSION = '3.3.6'
-
- function getParent($this) {
- var selector = $this.attr('data-target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- var $parent = selector && $(selector)
-
- return $parent && $parent.length ? $parent : $this.parent()
- }
-
- function clearMenus(e) {
- if (e && e.which === 3) return
- $(backdrop).remove()
- $(toggle).each(function () {
- var $this = $(this)
- var $parent = getParent($this)
- var relatedTarget = { relatedTarget: this }
-
- if (!$parent.hasClass('open')) return
-
- if (e && e.type == 'click' && /input|textarea/i.test(e.target.tagName) && $.contains($parent[0], e.target)) return
-
- $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this.attr('aria-expanded', 'false')
- $parent.removeClass('open').trigger($.Event('hidden.bs.dropdown', relatedTarget))
- })
- }
-
- Dropdown.prototype.toggle = function (e) {
- var $this = $(this)
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- clearMenus()
-
- if (!isActive) {
- if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
- // if mobile we use a backdrop because click events don't delegate
- $(document.createElement('div'))
- .addClass('dropdown-backdrop')
- .insertAfter($(this))
- .on('click', clearMenus)
- }
-
- var relatedTarget = { relatedTarget: this }
- $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
-
- if (e.isDefaultPrevented()) return
-
- $this
- .trigger('focus')
- .attr('aria-expanded', 'true')
-
- $parent
- .toggleClass('open')
- .trigger($.Event('shown.bs.dropdown', relatedTarget))
- }
-
- return false
- }
-
- Dropdown.prototype.keydown = function (e) {
- if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
-
- var $this = $(this)
-
- e.preventDefault()
- e.stopPropagation()
-
- if ($this.is('.disabled, :disabled')) return
-
- var $parent = getParent($this)
- var isActive = $parent.hasClass('open')
-
- if (!isActive && e.which != 27 || isActive && e.which == 27) {
- if (e.which == 27) $parent.find(toggle).trigger('focus')
- return $this.trigger('click')
- }
-
- var desc = ' li:not(.disabled):visible a'
- var $items = $parent.find('.dropdown-menu' + desc)
-
- if (!$items.length) return
-
- var index = $items.index(e.target)
-
- if (e.which == 38 && index > 0) index-- // up
- if (e.which == 40 && index < $items.length - 1) index++ // down
- if (!~index) index = 0
-
- $items.eq(index).trigger('focus')
- }
-
-
- // DROPDOWN PLUGIN DEFINITION
- // ==========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.dropdown')
-
- if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
- if (typeof option == 'string') data[option].call($this)
- })
- }
-
- var old = $.fn.dropdown
-
- $.fn.dropdown = Plugin
- $.fn.dropdown.Constructor = Dropdown
-
-
- // DROPDOWN NO CONFLICT
- // ====================
-
- $.fn.dropdown.noConflict = function () {
- $.fn.dropdown = old
- return this
- }
-
-
- // APPLY TO STANDARD DROPDOWN ELEMENTS
- // ===================================
-
- $(document)
- .on('click.bs.dropdown.data-api', clearMenus)
- .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
- .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
- .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
- .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/modal', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: modal.js v3.3.6
- * http://getbootstrap.com/javascript/#modals
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // MODAL CLASS DEFINITION
- // ======================
-
- var Modal = function (element, options) {
- this.options = options
- this.$body = $(document.body)
- this.$element = $(element)
- this.$dialog = this.$element.find('.modal-dialog')
- this.$backdrop = null
- this.isShown = null
- this.originalBodyPad = null
- this.scrollbarWidth = 0
- this.ignoreBackdropClick = false
-
- if (this.options.remote) {
- this.$element
- .find('.modal-content')
- .load(this.options.remote, $.proxy(function () {
- this.$element.trigger('loaded.bs.modal')
- }, this))
- }
- }
-
- Modal.VERSION = '3.3.6'
-
- Modal.TRANSITION_DURATION = 300
- Modal.BACKDROP_TRANSITION_DURATION = 150
-
- Modal.DEFAULTS = {
- backdrop: true,
- keyboard: true,
- show: true
- }
-
- Modal.prototype.toggle = function (_relatedTarget) {
- return this.isShown ? this.hide() : this.show(_relatedTarget)
- }
-
- Modal.prototype.show = function (_relatedTarget) {
- var that = this
- var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
-
- this.$element.trigger(e)
-
- if (this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = true
-
- this.checkScrollbar()
- this.setScrollbar()
- this.$body.addClass('modal-open')
-
- this.escape()
- this.resize()
-
- this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
-
- this.$dialog.on('mousedown.dismiss.bs.modal', function () {
- that.$element.one('mouseup.dismiss.bs.modal', function (e) {
- if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
- })
- })
-
- this.backdrop(function () {
- var transition = $.support.transition && that.$element.hasClass('fade')
-
- if (!that.$element.parent().length) {
- that.$element.appendTo(that.$body) // don't move modals dom position
- }
-
- that.$element
- .show()
- .scrollTop(0)
-
- that.adjustDialog()
-
- if (transition) {
- that.$element[0].offsetWidth // force reflow
- }
-
- that.$element.addClass('in')
-
- that.enforceFocus()
-
- var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
-
- transition ?
- that.$dialog // wait for modal to slide in
- .one('bsTransitionEnd', function () {
- that.$element.trigger('focus').trigger(e)
- })
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- that.$element.trigger('focus').trigger(e)
- })
- }
-
- Modal.prototype.hide = function (e) {
- if (e) e.preventDefault()
-
- e = $.Event('hide.bs.modal')
-
- this.$element.trigger(e)
-
- if (!this.isShown || e.isDefaultPrevented()) return
-
- this.isShown = false
-
- this.escape()
- this.resize()
-
- $(document).off('focusin.bs.modal')
-
- this.$element
- .removeClass('in')
- .off('click.dismiss.bs.modal')
- .off('mouseup.dismiss.bs.modal')
-
- this.$dialog.off('mousedown.dismiss.bs.modal')
-
- $.support.transition && this.$element.hasClass('fade') ?
- this.$element
- .one('bsTransitionEnd', $.proxy(this.hideModal, this))
- .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
- this.hideModal()
- }
-
- Modal.prototype.enforceFocus = function () {
- $(document)
- .off('focusin.bs.modal') // guard against infinite focus loop
- .on('focusin.bs.modal', $.proxy(function (e) {
- if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
- this.$element.trigger('focus')
- }
- }, this))
- }
-
- Modal.prototype.escape = function () {
- if (this.isShown && this.options.keyboard) {
- this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
- e.which == 27 && this.hide()
- }, this))
- } else if (!this.isShown) {
- this.$element.off('keydown.dismiss.bs.modal')
- }
- }
-
- Modal.prototype.resize = function () {
- if (this.isShown) {
- $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
- } else {
- $(window).off('resize.bs.modal')
- }
- }
-
- Modal.prototype.hideModal = function () {
- var that = this
- this.$element.hide()
- this.backdrop(function () {
- that.$body.removeClass('modal-open')
- that.resetAdjustments()
- that.resetScrollbar()
- that.$element.trigger('hidden.bs.modal')
- })
- }
-
- Modal.prototype.removeBackdrop = function () {
- this.$backdrop && this.$backdrop.remove()
- this.$backdrop = null
- }
-
- Modal.prototype.backdrop = function (callback) {
- var that = this
- var animate = this.$element.hasClass('fade') ? 'fade' : ''
-
- if (this.isShown && this.options.backdrop) {
- var doAnimate = $.support.transition && animate
-
- this.$backdrop = $(document.createElement('div'))
- .addClass('modal-backdrop ' + animate)
- .appendTo(this.$body)
-
- this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
- if (this.ignoreBackdropClick) {
- this.ignoreBackdropClick = false
- return
- }
- if (e.target !== e.currentTarget) return
- this.options.backdrop == 'static'
- ? this.$element[0].focus()
- : this.hide()
- }, this))
-
- if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
-
- this.$backdrop.addClass('in')
-
- if (!callback) return
-
- doAnimate ?
- this.$backdrop
- .one('bsTransitionEnd', callback)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callback()
-
- } else if (!this.isShown && this.$backdrop) {
- this.$backdrop.removeClass('in')
-
- var callbackRemove = function () {
- that.removeBackdrop()
- callback && callback()
- }
- $.support.transition && this.$element.hasClass('fade') ?
- this.$backdrop
- .one('bsTransitionEnd', callbackRemove)
- .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
- callbackRemove()
-
- } else if (callback) {
- callback()
- }
- }
-
- // these following methods are used to handle overflowing modals
-
- Modal.prototype.handleUpdate = function () {
- this.adjustDialog()
- }
-
- Modal.prototype.adjustDialog = function () {
- var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
-
- this.$element.css({
- paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
- paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
- })
- }
-
- Modal.prototype.resetAdjustments = function () {
- this.$element.css({
- paddingLeft: '',
- paddingRight: ''
- })
- }
-
- Modal.prototype.checkScrollbar = function () {
- var fullWindowWidth = window.innerWidth
- if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
- var documentElementRect = document.documentElement.getBoundingClientRect()
- fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
- }
- this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
- this.scrollbarWidth = this.measureScrollbar()
- }
-
- Modal.prototype.setScrollbar = function () {
- var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
- this.originalBodyPad = document.body.style.paddingRight || ''
- if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
- }
-
- Modal.prototype.resetScrollbar = function () {
- this.$body.css('padding-right', this.originalBodyPad)
- }
-
- Modal.prototype.measureScrollbar = function () { // thx walsh
- var scrollDiv = document.createElement('div')
- scrollDiv.className = 'modal-scrollbar-measure'
- this.$body.append(scrollDiv)
- var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
- this.$body[0].removeChild(scrollDiv)
- return scrollbarWidth
- }
-
-
- // MODAL PLUGIN DEFINITION
- // =======================
-
- function Plugin(option, _relatedTarget) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.modal')
- var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
-
- if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
- if (typeof option == 'string') data[option](_relatedTarget)
- else if (options.show) data.show(_relatedTarget)
- })
- }
-
- var old = $.fn.modal
-
- $.fn.modal = Plugin
- $.fn.modal.Constructor = Modal
-
-
- // MODAL NO CONFLICT
- // =================
-
- $.fn.modal.noConflict = function () {
- $.fn.modal = old
- return this
- }
-
-
- // MODAL DATA-API
- // ==============
-
- $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
- var $this = $(this)
- var href = $this.attr('href')
- var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
- var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
-
- if ($this.is('a')) e.preventDefault()
-
- $target.one('show.bs.modal', function (showEvent) {
- if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
- $target.one('hidden.bs.modal', function () {
- $this.is(':visible') && $this.trigger('focus')
- })
- })
- Plugin.call($target, option, this)
- })
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/popover', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: popover.js v3.3.6
- * http://getbootstrap.com/javascript/#popovers
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // POPOVER PUBLIC CLASS DEFINITION
- // ===============================
-
- var Popover = function (element, options) {
- this.init('popover', element, options)
- }
-
- if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
-
- Popover.VERSION = '3.3.6'
-
- Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
- placement: 'right',
- trigger: 'click',
- content: '',
- template: ''
- })
-
-
- // NOTE: POPOVER EXTENDS tooltip.js
- // ================================
-
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
-
- Popover.prototype.constructor = Popover
-
- Popover.prototype.getDefaults = function () {
- return Popover.DEFAULTS
- }
-
- Popover.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
- var content = this.getContent()
-
- $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
- $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
- this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
- ](content)
-
- $tip.removeClass('fade top bottom left right in')
-
- // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
- // this manually by checking the contents.
- if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
- }
-
- Popover.prototype.hasContent = function () {
- return this.getTitle() || this.getContent()
- }
-
- Popover.prototype.getContent = function () {
- var $e = this.$element
- var o = this.options
-
- return $e.attr('data-content')
- || (typeof o.content == 'function' ?
- o.content.call($e[0]) :
- o.content)
- }
-
- Popover.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
- }
-
-
- // POPOVER PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.popover')
- var options = typeof option == 'object' && option
-
- if (!data && /destroy|hide/.test(option)) return
- if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.popover
-
- $.fn.popover = Plugin
- $.fn.popover.Constructor = Popover
-
-
- // POPOVER NO CONFLICT
- // ===================
-
- $.fn.popover.noConflict = function () {
- $.fn.popover = old
- return this
- }
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/scrollspy', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: scrollspy.js v3.3.6
- * http://getbootstrap.com/javascript/#scrollspy
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // SCROLLSPY CLASS DEFINITION
- // ==========================
-
- function ScrollSpy(element, options) {
- this.$body = $(document.body)
- this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
- this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
- this.selector = (this.options.target || '') + ' .nav li > a'
- this.offsets = []
- this.targets = []
- this.activeTarget = null
- this.scrollHeight = 0
-
- this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
- this.refresh()
- this.process()
- }
-
- ScrollSpy.VERSION = '3.3.6'
-
- ScrollSpy.DEFAULTS = {
- offset: 10
- }
-
- ScrollSpy.prototype.getScrollHeight = function () {
- return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
- }
-
- ScrollSpy.prototype.refresh = function () {
- var that = this
- var offsetMethod = 'offset'
- var offsetBase = 0
-
- this.offsets = []
- this.targets = []
- this.scrollHeight = this.getScrollHeight()
-
- if (!$.isWindow(this.$scrollElement[0])) {
- offsetMethod = 'position'
- offsetBase = this.$scrollElement.scrollTop()
- }
-
- this.$body
- .find(this.selector)
- .map(function () {
- var $el = $(this)
- var href = $el.data('target') || $el.attr('href')
- var $href = /^#./.test(href) && $(href)
-
- return ($href
- && $href.length
- && $href.is(':visible')
- && [[$href[offsetMethod]().top + offsetBase, href]]) || null
- })
- .sort(function (a, b) { return a[0] - b[0] })
- .each(function () {
- that.offsets.push(this[0])
- that.targets.push(this[1])
- })
- }
-
- ScrollSpy.prototype.process = function () {
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
- var scrollHeight = this.getScrollHeight()
- var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
- var offsets = this.offsets
- var targets = this.targets
- var activeTarget = this.activeTarget
- var i
-
- if (this.scrollHeight != scrollHeight) {
- this.refresh()
- }
-
- if (scrollTop >= maxScroll) {
- return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
- }
-
- if (activeTarget && scrollTop < offsets[0]) {
- this.activeTarget = null
- return this.clear()
- }
-
- for (i = offsets.length; i--;) {
- activeTarget != targets[i]
- && scrollTop >= offsets[i]
- && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
- && this.activate(targets[i])
- }
- }
-
- ScrollSpy.prototype.activate = function (target) {
- this.activeTarget = target
-
- this.clear()
-
- var selector = this.selector +
- '[data-target="' + target + '"],' +
- this.selector + '[href="' + target + '"]'
-
- var active = $(selector)
- .parents('li')
- .addClass('active')
-
- if (active.parent('.dropdown-menu').length) {
- active = active
- .closest('li.dropdown')
- .addClass('active')
- }
-
- active.trigger('activate.bs.scrollspy')
- }
-
- ScrollSpy.prototype.clear = function () {
- $(this.selector)
- .parentsUntil(this.options.target, '.active')
- .removeClass('active')
- }
-
-
- // SCROLLSPY PLUGIN DEFINITION
- // ===========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.scrollspy')
- var options = typeof option == 'object' && option
-
- if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.scrollspy
-
- $.fn.scrollspy = Plugin
- $.fn.scrollspy.Constructor = ScrollSpy
-
-
- // SCROLLSPY NO CONFLICT
- // =====================
-
- $.fn.scrollspy.noConflict = function () {
- $.fn.scrollspy = old
- return this
- }
-
-
- // SCROLLSPY DATA-API
- // ==================
-
- $(window).on('load.bs.scrollspy.data-api', function () {
- $('[data-spy="scroll"]').each(function () {
- var $spy = $(this)
- Plugin.call($spy, $spy.data())
- })
- })
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/tab', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: tab.js v3.3.6
- * http://getbootstrap.com/javascript/#tabs
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TAB CLASS DEFINITION
- // ====================
-
- var Tab = function (element) {
- // jscs:disable requireDollarBeforejQueryAssignment
- this.element = $(element)
- // jscs:enable requireDollarBeforejQueryAssignment
- }
-
- Tab.VERSION = '3.3.6'
-
- Tab.TRANSITION_DURATION = 150
-
- Tab.prototype.show = function () {
- var $this = this.element
- var $ul = $this.closest('ul:not(.dropdown-menu)')
- var selector = $this.data('target')
-
- if (!selector) {
- selector = $this.attr('href')
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
- }
-
- if ($this.parent('li').hasClass('active')) return
-
- var $previous = $ul.find('.active:last a')
- var hideEvent = $.Event('hide.bs.tab', {
- relatedTarget: $this[0]
- })
- var showEvent = $.Event('show.bs.tab', {
- relatedTarget: $previous[0]
- })
-
- $previous.trigger(hideEvent)
- $this.trigger(showEvent)
-
- if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
-
- var $target = $(selector)
-
- this.activate($this.closest('li'), $ul)
- this.activate($target, $target.parent(), function () {
- $previous.trigger({
- type: 'hidden.bs.tab',
- relatedTarget: $this[0]
- })
- $this.trigger({
- type: 'shown.bs.tab',
- relatedTarget: $previous[0]
- })
- })
- }
-
- Tab.prototype.activate = function (element, container, callback) {
- var $active = container.find('> .active')
- var transition = callback
- && $.support.transition
- && ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
-
- function next() {
- $active
- .removeClass('active')
- .find('> .dropdown-menu > .active')
- .removeClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', false)
-
- element
- .addClass('active')
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
-
- if (transition) {
- element[0].offsetWidth // reflow for transition
- element.addClass('in')
- } else {
- element.removeClass('fade')
- }
-
- if (element.parent('.dropdown-menu').length) {
- element
- .closest('li.dropdown')
- .addClass('active')
- .end()
- .find('[data-toggle="tab"]')
- .attr('aria-expanded', true)
- }
-
- callback && callback()
- }
-
- $active.length && transition ?
- $active
- .one('bsTransitionEnd', next)
- .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
- next()
-
- $active.removeClass('in')
- }
-
-
- // TAB PLUGIN DEFINITION
- // =====================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tab')
-
- if (!data) $this.data('bs.tab', (data = new Tab(this)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tab
-
- $.fn.tab = Plugin
- $.fn.tab.Constructor = Tab
-
-
- // TAB NO CONFLICT
- // ===============
-
- $.fn.tab.noConflict = function () {
- $.fn.tab = old
- return this
- }
-
-
- // TAB DATA-API
- // ============
-
- var clickHandler = function (e) {
- e.preventDefault()
- Plugin.call($(this), 'show')
- }
-
- $(document)
- .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
- .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/tooltip', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: tooltip.js v3.3.6
- * http://getbootstrap.com/javascript/#tooltip
- * Inspired by the original jQuery.tipsy by Jason Frame
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // TOOLTIP PUBLIC CLASS DEFINITION
- // ===============================
-
- var Tooltip = function (element, options) {
- this.type = null
- this.options = null
- this.enabled = null
- this.timeout = null
- this.hoverState = null
- this.$element = null
- this.inState = null
-
- this.init('tooltip', element, options)
- }
-
- Tooltip.VERSION = '3.3.6'
-
- Tooltip.TRANSITION_DURATION = 150
-
- Tooltip.DEFAULTS = {
- animation: true,
- placement: 'top',
- selector: false,
- template: '',
- trigger: 'hover focus',
- title: '',
- delay: 0,
- html: false,
- container: false,
- viewport: {
- selector: 'body',
- padding: 0
- }
- }
-
- Tooltip.prototype.init = function (type, element, options) {
- this.enabled = true
- this.type = type
- this.$element = $(element)
- this.options = this.getOptions(options)
- this.$viewport = this.options.viewport && $($.isFunction(this.options.viewport) ? this.options.viewport.call(this, this.$element) : (this.options.viewport.selector || this.options.viewport))
- this.inState = { click: false, hover: false, focus: false }
-
- if (this.$element[0] instanceof document.constructor && !this.options.selector) {
- throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
- }
-
- var triggers = this.options.trigger.split(' ')
-
- for (var i = triggers.length; i--;) {
- var trigger = triggers[i]
-
- if (trigger == 'click') {
- this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
- } else if (trigger != 'manual') {
- var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
- var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
-
- this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
- this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
- }
- }
-
- this.options.selector ?
- (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
- this.fixTitle()
- }
-
- Tooltip.prototype.getDefaults = function () {
- return Tooltip.DEFAULTS
- }
-
- Tooltip.prototype.getOptions = function (options) {
- options = $.extend({}, this.getDefaults(), this.$element.data(), options)
-
- if (options.delay && typeof options.delay == 'number') {
- options.delay = {
- show: options.delay,
- hide: options.delay
- }
- }
-
- return options
- }
-
- Tooltip.prototype.getDelegateOptions = function () {
- var options = {}
- var defaults = this.getDefaults()
-
- this._options && $.each(this._options, function (key, value) {
- if (defaults[key] != value) options[key] = value
- })
-
- return options
- }
-
- Tooltip.prototype.enter = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- if (obj instanceof $.Event) {
- self.inState[obj.type == 'focusin' ? 'focus' : 'hover'] = true
- }
-
- if (self.tip().hasClass('in') || self.hoverState == 'in') {
- self.hoverState = 'in'
- return
- }
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'in'
-
- if (!self.options.delay || !self.options.delay.show) return self.show()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'in') self.show()
- }, self.options.delay.show)
- }
-
- Tooltip.prototype.isInStateTrue = function () {
- for (var key in this.inState) {
- if (this.inState[key]) return true
- }
-
- return false
- }
-
- Tooltip.prototype.leave = function (obj) {
- var self = obj instanceof this.constructor ?
- obj : $(obj.currentTarget).data('bs.' + this.type)
-
- if (!self) {
- self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
- $(obj.currentTarget).data('bs.' + this.type, self)
- }
-
- if (obj instanceof $.Event) {
- self.inState[obj.type == 'focusout' ? 'focus' : 'hover'] = false
- }
-
- if (self.isInStateTrue()) return
-
- clearTimeout(self.timeout)
-
- self.hoverState = 'out'
-
- if (!self.options.delay || !self.options.delay.hide) return self.hide()
-
- self.timeout = setTimeout(function () {
- if (self.hoverState == 'out') self.hide()
- }, self.options.delay.hide)
- }
-
- Tooltip.prototype.show = function () {
- var e = $.Event('show.bs.' + this.type)
-
- if (this.hasContent() && this.enabled) {
- this.$element.trigger(e)
-
- var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
- if (e.isDefaultPrevented() || !inDom) return
- var that = this
-
- var $tip = this.tip()
-
- var tipId = this.getUID(this.type)
-
- this.setContent()
- $tip.attr('id', tipId)
- this.$element.attr('aria-describedby', tipId)
-
- if (this.options.animation) $tip.addClass('fade')
-
- var placement = typeof this.options.placement == 'function' ?
- this.options.placement.call(this, $tip[0], this.$element[0]) :
- this.options.placement
-
- var autoToken = /\s?auto?\s?/i
- var autoPlace = autoToken.test(placement)
- if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
-
- $tip
- .detach()
- .css({ top: 0, left: 0, display: 'block' })
- .addClass(placement)
- .data('bs.' + this.type, this)
-
- this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
- this.$element.trigger('inserted.bs.' + this.type)
-
- var pos = this.getPosition()
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (autoPlace) {
- var orgPlacement = placement
- var viewportDim = this.getPosition(this.$viewport)
-
- placement = placement == 'bottom' && pos.bottom + actualHeight > viewportDim.bottom ? 'top' :
- placement == 'top' && pos.top - actualHeight < viewportDim.top ? 'bottom' :
- placement == 'right' && pos.right + actualWidth > viewportDim.width ? 'left' :
- placement == 'left' && pos.left - actualWidth < viewportDim.left ? 'right' :
- placement
-
- $tip
- .removeClass(orgPlacement)
- .addClass(placement)
- }
-
- var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
-
- this.applyPlacement(calculatedOffset, placement)
-
- var complete = function () {
- var prevHoverState = that.hoverState
- that.$element.trigger('shown.bs.' + that.type)
- that.hoverState = null
-
- if (prevHoverState == 'out') that.leave(that)
- }
-
- $.support.transition && this.$tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
- }
- }
-
- Tooltip.prototype.applyPlacement = function (offset, placement) {
- var $tip = this.tip()
- var width = $tip[0].offsetWidth
- var height = $tip[0].offsetHeight
-
- // manually read margins because getBoundingClientRect includes difference
- var marginTop = parseInt($tip.css('margin-top'), 10)
- var marginLeft = parseInt($tip.css('margin-left'), 10)
-
- // we must check for NaN for ie 8/9
- if (isNaN(marginTop)) marginTop = 0
- if (isNaN(marginLeft)) marginLeft = 0
-
- offset.top += marginTop
- offset.left += marginLeft
-
- // $.fn.offset doesn't round pixel values
- // so we use setOffset directly with our own function B-0
- $.offset.setOffset($tip[0], $.extend({
- using: function (props) {
- $tip.css({
- top: Math.round(props.top),
- left: Math.round(props.left)
- })
- }
- }, offset), 0)
-
- $tip.addClass('in')
-
- // check to see if placing tip in new offset caused the tip to resize itself
- var actualWidth = $tip[0].offsetWidth
- var actualHeight = $tip[0].offsetHeight
-
- if (placement == 'top' && actualHeight != height) {
- offset.top = offset.top + height - actualHeight
- }
-
- var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
-
- if (delta.left) offset.left += delta.left
- else offset.top += delta.top
-
- var isVertical = /top|bottom/.test(placement)
- var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
- var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
-
- $tip.offset(offset)
- this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
- }
-
- Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
- this.arrow()
- .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
- .css(isVertical ? 'top' : 'left', '')
- }
-
- Tooltip.prototype.setContent = function () {
- var $tip = this.tip()
- var title = this.getTitle()
-
- $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
- $tip.removeClass('fade in top bottom left right')
- }
-
- Tooltip.prototype.hide = function (callback) {
- var that = this
- var $tip = $(this.$tip)
- var e = $.Event('hide.bs.' + this.type)
-
- function complete() {
- if (that.hoverState != 'in') $tip.detach()
- that.$element
- .removeAttr('aria-describedby')
- .trigger('hidden.bs.' + that.type)
- callback && callback()
- }
-
- this.$element.trigger(e)
-
- if (e.isDefaultPrevented()) return
-
- $tip.removeClass('in')
-
- $.support.transition && $tip.hasClass('fade') ?
- $tip
- .one('bsTransitionEnd', complete)
- .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
- complete()
-
- this.hoverState = null
-
- return this
- }
-
- Tooltip.prototype.fixTitle = function () {
- var $e = this.$element
- if ($e.attr('title') || typeof $e.attr('data-original-title') != 'string') {
- $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
- }
- }
-
- Tooltip.prototype.hasContent = function () {
- return this.getTitle()
- }
-
- Tooltip.prototype.getPosition = function ($element) {
- $element = $element || this.$element
-
- var el = $element[0]
- var isBody = el.tagName == 'BODY'
-
- var elRect = el.getBoundingClientRect()
- if (elRect.width == null) {
- // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
- elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
- }
- var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
- var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
- var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
-
- return $.extend({}, elRect, scroll, outerDims, elOffset)
- }
-
- Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
- return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
- placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
- /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
-
- }
-
- Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
- var delta = { top: 0, left: 0 }
- if (!this.$viewport) return delta
-
- var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
- var viewportDimensions = this.getPosition(this.$viewport)
-
- if (/right|left/.test(placement)) {
- var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
- var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
- if (topEdgeOffset < viewportDimensions.top) { // top overflow
- delta.top = viewportDimensions.top - topEdgeOffset
- } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
- delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
- }
- } else {
- var leftEdgeOffset = pos.left - viewportPadding
- var rightEdgeOffset = pos.left + viewportPadding + actualWidth
- if (leftEdgeOffset < viewportDimensions.left) { // left overflow
- delta.left = viewportDimensions.left - leftEdgeOffset
- } else if (rightEdgeOffset > viewportDimensions.right) { // right overflow
- delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
- }
- }
-
- return delta
- }
-
- Tooltip.prototype.getTitle = function () {
- var title
- var $e = this.$element
- var o = this.options
-
- title = $e.attr('data-original-title')
- || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
-
- return title
- }
-
- Tooltip.prototype.getUID = function (prefix) {
- do prefix += ~~(Math.random() * 1000000)
- while (document.getElementById(prefix))
- return prefix
- }
-
- Tooltip.prototype.tip = function () {
- if (!this.$tip) {
- this.$tip = $(this.options.template)
- if (this.$tip.length != 1) {
- throw new Error(this.type + ' `template` option must consist of exactly 1 top-level element!')
- }
- }
- return this.$tip
- }
-
- Tooltip.prototype.arrow = function () {
- return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
- }
-
- Tooltip.prototype.enable = function () {
- this.enabled = true
- }
-
- Tooltip.prototype.disable = function () {
- this.enabled = false
- }
-
- Tooltip.prototype.toggleEnabled = function () {
- this.enabled = !this.enabled
- }
-
- Tooltip.prototype.toggle = function (e) {
- var self = this
- if (e) {
- self = $(e.currentTarget).data('bs.' + this.type)
- if (!self) {
- self = new this.constructor(e.currentTarget, this.getDelegateOptions())
- $(e.currentTarget).data('bs.' + this.type, self)
- }
- }
-
- if (e) {
- self.inState.click = !self.inState.click
- if (self.isInStateTrue()) self.enter(self)
- else self.leave(self)
- } else {
- self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
- }
- }
-
- Tooltip.prototype.destroy = function () {
- var that = this
- clearTimeout(this.timeout)
- this.hide(function () {
- that.$element.off('.' + that.type).removeData('bs.' + that.type)
- if (that.$tip) {
- that.$tip.detach()
- }
- that.$tip = null
- that.$arrow = null
- that.$viewport = null
- })
- }
-
-
- // TOOLTIP PLUGIN DEFINITION
- // =========================
-
- function Plugin(option) {
- return this.each(function () {
- var $this = $(this)
- var data = $this.data('bs.tooltip')
- var options = typeof option == 'object' && option
-
- if (!data && /destroy|hide/.test(option)) return
- if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
- if (typeof option == 'string') data[option]()
- })
- }
-
- var old = $.fn.tooltip
-
- $.fn.tooltip = Plugin
- $.fn.tooltip.Constructor = Tooltip
-
-
- // TOOLTIP NO CONFLICT
- // ===================
-
- $.fn.tooltip.noConflict = function () {
- $.fn.tooltip = old
- return this
- }
-
-}(jQuery);
-
- });
-require.register('bootstrap/Users/cablanchard/Developer/node/sws_gathers/node_modules/bootstrap/js/transition', function(exports,req,module){
- var require = __makeRequire((req), {});
- /* ========================================================================
- * Bootstrap: transition.js v3.3.6
- * http://getbootstrap.com/javascript/#transitions
- * ========================================================================
- * Copyright 2011-2015 Twitter, Inc.
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
- * ======================================================================== */
-
-
-+function ($) {
- 'use strict';
-
- // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
- // ============================================================
-
- function transitionEnd() {
- var el = document.createElement('bootstrap')
-
- var transEndEventNames = {
- WebkitTransition : 'webkitTransitionEnd',
- MozTransition : 'transitionend',
- OTransition : 'oTransitionEnd otransitionend',
- transition : 'transitionend'
- }
-
- for (var name in transEndEventNames) {
- if (el.style[name] !== undefined) {
- return { end: transEndEventNames[name] }
- }
- }
-
- return false // explicit for ie8 ( ._.)
- }
-
- // http://blog.alexmaccaw.com/css-transitions
- $.fn.emulateTransitionEnd = function (duration) {
- var called = false
- var $el = this
- $(this).one('bsTransitionEnd', function () { called = true })
- var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
- setTimeout(callback, duration)
- return this
- }
-
- $(function () {
- $.support.transition = transitionEnd()
-
- if (!$.support.transition) return
-
- $.event.special.bsTransitionEnd = {
- bindType: $.support.transition.end,
- delegateType: $.support.transition.end,
- handle: function (e) {
- if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
- }
- }
- })
-
-}(jQuery);
-
- });
-require.register('howler', function(exports,req,module){
- var require = __makeRequire((function(n) { return req(n.replace('./', 'howler/')); }), {});
- /*!
- * howler.js v1.1.28
- * howlerjs.com
- *
- * (c) 2013-2015, James Simpson of GoldFire Studios
- * goldfirestudios.com
- *
- * MIT License
- */
-
-(function() {
- // setup
- var cache = {};
-
- // setup the audio context
- var ctx = null,
- usingWebAudio = true,
- noAudio = false;
- try {
- if (typeof AudioContext !== 'undefined') {
- ctx = new AudioContext();
- } else if (typeof webkitAudioContext !== 'undefined') {
- ctx = new webkitAudioContext();
- } else {
- usingWebAudio = false;
- }
- } catch(e) {
- usingWebAudio = false;
- }
-
- if (!usingWebAudio) {
- if (typeof Audio !== 'undefined') {
- try {
- new Audio();
- } catch(e) {
- noAudio = true;
- }
- } else {
- noAudio = true;
- }
- }
-
- // create a master gain node
- if (usingWebAudio) {
- var masterGain = (typeof ctx.createGain === 'undefined') ? ctx.createGainNode() : ctx.createGain();
- masterGain.gain.value = 1;
- masterGain.connect(ctx.destination);
- }
-
- // create global controller
- var HowlerGlobal = function(codecs) {
- this._volume = 1;
- this._muted = false;
- this.usingWebAudio = usingWebAudio;
- this.ctx = ctx;
- this.noAudio = noAudio;
- this._howls = [];
- this._codecs = codecs;
- this.iOSAutoEnable = true;
- };
- HowlerGlobal.prototype = {
- /**
- * Get/set the global volume for all sounds.
- * @param {Float} vol Volume from 0.0 to 1.0.
- * @return {Howler/Float} Returns self or current volume.
- */
- volume: function(vol) {
- var self = this;
-
- // make sure volume is a number
- vol = parseFloat(vol);
-
- if (vol >= 0 && vol <= 1) {
- self._volume = vol;
-
- if (usingWebAudio) {
- masterGain.gain.value = vol;
- }
-
- // loop through cache and change volume of all nodes that are using HTML5 Audio
- for (var key in self._howls) {
- if (self._howls.hasOwnProperty(key) && self._howls[key]._webAudio === false) {
- // loop through the audio nodes
- for (var i=0; i 0) ? node._pos : self._sprite[sprite][0] / 1000;
-
- // determine how long to play for
- var duration = 0;
- if (self._webAudio) {
- duration = self._sprite[sprite][1] / 1000 - node._pos;
- if (node._pos > 0) {
- pos = self._sprite[sprite][0] / 1000 + pos;
- }
- } else {
- duration = self._sprite[sprite][1] / 1000 - (pos - self._sprite[sprite][0] / 1000);
- }
-
- // determine if this sound should be looped
- var loop = !!(self._loop || self._sprite[sprite][2]);
-
- // set timer to fire the 'onend' event
- var soundId = (typeof callback === 'string') ? callback : Math.round(Date.now() * Math.random()) + '',
- timerId;
- (function() {
- var data = {
- id: soundId,
- sprite: sprite,
- loop: loop
- };
- timerId = setTimeout(function() {
- // if looping, restart the track
- if (!self._webAudio && loop) {
- self.stop(data.id).play(sprite, data.id);
- }
-
- // set web audio node to paused at end
- if (self._webAudio && !loop) {
- self._nodeById(data.id).paused = true;
- self._nodeById(data.id)._pos = 0;
-
- // clear the end timer
- self._clearEndTimer(data.id);
- }
-
- // end the track if it is HTML audio and a sprite
- if (!self._webAudio && !loop) {
- self.stop(data.id);
- }
-
- // fire ended event
- self.on('end', soundId);
- }, duration * 1000);
-
- // store the reference to the timer
- self._onendTimer.push({timer: timerId, id: data.id});
- })();
-
- if (self._webAudio) {
- var loopStart = self._sprite[sprite][0] / 1000,
- loopEnd = self._sprite[sprite][1] / 1000;
-
- // set the play id to this node and load into context
- node.id = soundId;
- node.paused = false;
- refreshBuffer(self, [loop, loopStart, loopEnd], soundId);
- self._playStart = ctx.currentTime;
- node.gain.value = self._volume;
-
- if (typeof node.bufferSource.start === 'undefined') {
- loop ? node.bufferSource.noteGrainOn(0, pos, 86400) : node.bufferSource.noteGrainOn(0, pos, duration);
- } else {
- loop ? node.bufferSource.start(0, pos, 86400) : node.bufferSource.start(0, pos, duration);
- }
- } else {
- if (node.readyState === 4 || !node.readyState && navigator.isCocoonJS) {
- node.readyState = 4;
- node.id = soundId;
- node.currentTime = pos;
- node.muted = Howler._muted || node.muted;
- node.volume = self._volume * Howler.volume();
- setTimeout(function() { node.play(); }, 0);
- } else {
- self._clearEndTimer(soundId);
-
- (function(){
- var sound = self,
- playSprite = sprite,
- fn = callback,
- newNode = node;
- var listener = function() {
- sound.play(playSprite, fn);
-
- // clear the event listener
- newNode.removeEventListener('canplaythrough', listener, false);
- };
- newNode.addEventListener('canplaythrough', listener, false);
- })();
-
- return self;
- }
- }
-
- // fire the play event and send the soundId back in the callback
- self.on('play');
- if (typeof callback === 'function') callback(soundId);
-
- return self;
- });
-
- return self;
- },
-
- /**
- * Pause playback and save the current position.
- * @param {String} id (optional) The play instance ID.
- * @return {Howl}
- */
- pause: function(id) {
- var self = this;
-
- // if the sound hasn't been loaded, add it to the event queue
- if (!self._loaded) {
- self.on('play', function() {
- self.pause(id);
- });
-
- return self;
- }
-
- // clear 'onend' timer
- self._clearEndTimer(id);
-
- var activeNode = (id) ? self._nodeById(id) : self._activeNode();
- if (activeNode) {
- activeNode._pos = self.pos(null, id);
-
- if (self._webAudio) {
- // make sure the sound has been created
- if (!activeNode.bufferSource || activeNode.paused) {
- return self;
- }
-
- activeNode.paused = true;
- if (typeof activeNode.bufferSource.stop === 'undefined') {
- activeNode.bufferSource.noteOff(0);
- } else {
- activeNode.bufferSource.stop(0);
- }
- } else {
- activeNode.pause();
- }
- }
-
- self.on('pause');
-
- return self;
- },
-
- /**
- * Stop playback and reset to start.
- * @param {String} id (optional) The play instance ID.
- * @return {Howl}
- */
- stop: function(id) {
- var self = this;
-
- // if the sound hasn't been loaded, add it to the event queue
- if (!self._loaded) {
- self.on('play', function() {
- self.stop(id);
- });
-
- return self;
- }
-
- // clear 'onend' timer
- self._clearEndTimer(id);
-
- var activeNode = (id) ? self._nodeById(id) : self._activeNode();
- if (activeNode) {
- activeNode._pos = 0;
-
- if (self._webAudio) {
- // make sure the sound has been created
- if (!activeNode.bufferSource || activeNode.paused) {
- return self;
- }
-
- activeNode.paused = true;
-
- if (typeof activeNode.bufferSource.stop === 'undefined') {
- activeNode.bufferSource.noteOff(0);
- } else {
- activeNode.bufferSource.stop(0);
- }
- } else if (!isNaN(activeNode.duration)) {
- activeNode.pause();
- activeNode.currentTime = 0;
- }
- }
-
- return self;
- },
-
- /**
- * Mute this sound.
- * @param {String} id (optional) The play instance ID.
- * @return {Howl}
- */
- mute: function(id) {
- var self = this;
-
- // if the sound hasn't been loaded, add it to the event queue
- if (!self._loaded) {
- self.on('play', function() {
- self.mute(id);
- });
-
- return self;
- }
-
- var activeNode = (id) ? self._nodeById(id) : self._activeNode();
- if (activeNode) {
- if (self._webAudio) {
- activeNode.gain.value = 0;
- } else {
- activeNode.muted = true;
- }
- }
-
- return self;
- },
-
- /**
- * Unmute this sound.
- * @param {String} id (optional) The play instance ID.
- * @return {Howl}
- */
- unmute: function(id) {
- var self = this;
-
- // if the sound hasn't been loaded, add it to the event queue
- if (!self._loaded) {
- self.on('play', function() {
- self.unmute(id);
- });
-
- return self;
- }
-
- var activeNode = (id) ? self._nodeById(id) : self._activeNode();
- if (activeNode) {
- if (self._webAudio) {
- activeNode.gain.value = self._volume;
- } else {
- activeNode.muted = false;
- }
- }
-
- return self;
- },
-
- /**
- * Get/set volume of this sound.
- * @param {Float} vol Volume from 0.0 to 1.0.
- * @param {String} id (optional) The play instance ID.
- * @return {Howl/Float} Returns self or current volume.
- */
- volume: function(vol, id) {
- var self = this;
-
- // make sure volume is a number
- vol = parseFloat(vol);
-
- if (vol >= 0 && vol <= 1) {
- self._volume = vol;
-
- // if the sound hasn't been loaded, add it to the event queue
- if (!self._loaded) {
- self.on('play', function() {
- self.volume(vol, id);
- });
-
- return self;
- }
-
- var activeNode = (id) ? self._nodeById(id) : self._activeNode();
- if (activeNode) {
- if (self._webAudio) {
- activeNode.gain.value = vol;
- } else {
- activeNode.volume = vol * Howler.volume();
- }
- }
-
- return self;
- } else {
- return self._volume;
- }
- },
-
- /**
- * Get/set whether to loop the sound.
- * @param {Boolean} loop To loop or not to loop, that is the question.
- * @return {Howl/Boolean} Returns self or current looping value.
- */
- loop: function(loop) {
- var self = this;
-
- if (typeof loop === 'boolean') {
- self._loop = loop;
-
- return self;
- } else {
- return self._loop;
- }
- },
-
- /**
- * Get/set sound sprite definition.
- * @param {Object} sprite Example: {spriteName: [offset, duration, loop]}
- * @param {Integer} offset Where to begin playback in milliseconds
- * @param {Integer} duration How long to play in milliseconds
- * @param {Boolean} loop (optional) Set true to loop this sprite
- * @return {Howl} Returns current sprite sheet or self.
- */
- sprite: function(sprite) {
- var self = this;
-
- if (typeof sprite === 'object') {
- self._sprite = sprite;
-
- return self;
- } else {
- return self._sprite;
- }
- },
-
- /**
- * Get/set the position of playback.
- * @param {Float} pos The position to move current playback to.
- * @param {String} id (optional) The play instance ID.
- * @return {Howl/Float} Returns self or current playback position.
- */
- pos: function(pos, id) {
- var self = this;
-
- // if the sound hasn't been loaded, add it to the event queue
- if (!self._loaded) {
- self.on('load', function() {
- self.pos(pos);
- });
-
- return typeof pos === 'number' ? self : self._pos || 0;
- }
-
- // make sure we are dealing with a number for pos
- pos = parseFloat(pos);
-
- var activeNode = (id) ? self._nodeById(id) : self._activeNode();
- if (activeNode) {
- if (pos >= 0) {
- self.pause(id);
- activeNode._pos = pos;
- self.play(activeNode._sprite, id);
-
- return self;
- } else {
- return self._webAudio ? activeNode._pos + (ctx.currentTime - self._playStart) : activeNode.currentTime;
- }
- } else if (pos >= 0) {
- return self;
- } else {
- // find the first inactive node to return the pos for
- for (var i=0; i= 0 || x < 0) {
- if (self._webAudio) {
- var activeNode = (id) ? self._nodeById(id) : self._activeNode();
- if (activeNode) {
- self._pos3d = [x, y, z];
- activeNode.panner.setPosition(x, y, z);
- activeNode.panner.panningModel = self._model || 'HRTF';
- }
- }
- } else {
- return self._pos3d;
- }
-
- return self;
- },
-
- /**
- * Fade a currently playing sound between two volumes.
- * @param {Number} from The volume to fade from (0.0 to 1.0).
- * @param {Number} to The volume to fade to (0.0 to 1.0).
- * @param {Number} len Time in milliseconds to fade.
- * @param {Function} callback (optional) Fired when the fade is complete.
- * @param {String} id (optional) The play instance ID.
- * @return {Howl}
- */
- fade: function(from, to, len, callback, id) {
- var self = this,
- diff = Math.abs(from - to),
- dir = from > to ? 'down' : 'up',
- steps = diff / 0.01,
- stepTime = len / steps;
-
- // if the sound hasn't been loaded, add it to the event queue
- if (!self._loaded) {
- self.on('load', function() {
- self.fade(from, to, len, callback, id);
- });
-
- return self;
- }
-
- // set the volume to the start position
- self.volume(from, id);
-
- for (var i=1; i<=steps; i++) {
- (function() {
- var change = self._volume + (dir === 'up' ? 0.01 : -0.01) * i,
- vol = Math.round(1000 * change) / 1000,
- toVol = to;
-
- setTimeout(function() {
- self.volume(vol, id);
-
- if (vol === toVol) {
- if (callback) callback();
- }
- }, stepTime * i);
- })();
- }
- },
-
- /**
- * [DEPRECATED] Fade in the current sound.
- * @param {Float} to Volume to fade to (0.0 to 1.0).
- * @param {Number} len Time in milliseconds to fade.
- * @param {Function} callback
- * @return {Howl}
- */
- fadeIn: function(to, len, callback) {
- return this.volume(0).play().fade(0, to, len, callback);
- },
-
- /**
- * [DEPRECATED] Fade out the current sound and pause when finished.
- * @param {Float} to Volume to fade to (0.0 to 1.0).
- * @param {Number} len Time in milliseconds to fade.
- * @param {Function} callback
- * @param {String} id (optional) The play instance ID.
- * @return {Howl}
- */
- fadeOut: function(to, len, callback, id) {
- var self = this;
-
- return self.fade(self._volume, to, len, function() {
- if (callback) callback();
- self.pause(id);
-
- // fire ended event
- self.on('end');
- }, id);
- },
-
- /**
- * Get an audio node by ID.
- * @return {Howl} Audio node.
- */
- _nodeById: function(id) {
- var self = this,
- node = self._audioNode[0];
-
- // find the node with this ID
- for (var i=0; i=0; i--) {
- if (inactive <= 5) {
- break;
- }
-
- if (self._audioNode[i].paused) {
- // disconnect the audio source if using Web Audio
- if (self._webAudio) {
- self._audioNode[i].disconnect(0);
- }
-
- inactive--;
- self._audioNode.splice(i, 1);
- }
- }
- },
-
- /**
- * Clear 'onend' timeout before it ends.
- * @param {String} soundId The play instance ID.
- */
- _clearEndTimer: function(soundId) {
- var self = this,
- index = 0;
-
- // loop through the timers to find the one associated with this sound
- for (var i=0; i= 0) {
- Howler._howls.splice(index, 1);
- }
-
- // delete this sound from the cache
- delete cache[self._src];
- self = null;
- }
-
- };
-
- // only define these functions when using WebAudio
- if (usingWebAudio) {
-
- /**
- * Buffer a sound from URL (or from cache) and decode to audio source (Web Audio API).
- * @param {Object} obj The Howl object for the sound to load.
- * @param {String} url The path to the sound file.
- */
- var loadBuffer = function(obj, url) {
- // check if the buffer has already been cached
- if (url in cache) {
- // set the duration from the cache
- obj._duration = cache[url].duration;
-
- // load the sound into this object
- loadSound(obj);
- return;
- }
-
- if (/^data:[^;]+;base64,/.test(url)) {
- // Decode base64 data-URIs because some browsers cannot load data-URIs with XMLHttpRequest.
- var data = atob(url.split(',')[1]);
- var dataView = new Uint8Array(data.length);
- for (var i=0; i= 0 && j < len ? [ this[ j ] ] : [] );
- },
-
- end: function() {
- return this.prevObject || this.constructor();
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: arr.sort,
- splice: arr.splice
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[ 0 ] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
-
- // Skip the boolean and the target
- target = arguments[ i ] || {};
- i++;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
- target = {};
- }
-
- // Extend jQuery itself if only one argument is passed
- if ( i === length ) {
- target = this;
- i--;
- }
-
- for ( ; i < length; i++ ) {
-
- // Only deal with non-null/undefined values
- if ( ( options = arguments[ i ] ) != null ) {
-
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
- ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
-
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray( src ) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject( src ) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend( {
-
- // Unique for each copy of jQuery on the page
- expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
-
- // Assume jQuery is ready without the ready module
- isReady: true,
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- noop: function() {},
-
- isFunction: function( obj ) {
- return jQuery.type( obj ) === "function";
- },
-
- isArray: Array.isArray,
-
- isWindow: function( obj ) {
- return obj != null && obj === obj.window;
- },
-
- isNumeric: function( obj ) {
-
- // parseFloat NaNs numeric-cast false positives (null|true|false|"")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- // adding 1 corrects loss of precision from parseFloat (#15100)
- var realStringObj = obj && obj.toString();
- return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
- },
-
- isPlainObject: function( obj ) {
-
- // Not plain objects:
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
- // - DOM nodes
- // - window
- if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.constructor &&
- !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) {
- return false;
- }
-
- // If the function hasn't returned already, we're confident that
- // |obj| is a plain object, created by {} or constructed with new Object
- return true;
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return obj + "";
- }
-
- // Support: Android<4.0, iOS<6 (functionish RegExp)
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ toString.call( obj ) ] || "object" :
- typeof obj;
- },
-
- // Evaluates a script in a global context
- globalEval: function( code ) {
- var script,
- indirect = eval;
-
- code = jQuery.trim( code );
-
- if ( code ) {
-
- // If the code includes a valid, prologue position
- // strict mode pragma, execute code by injecting a
- // script tag into the document.
- if ( code.indexOf( "use strict" ) === 1 ) {
- script = document.createElement( "script" );
- script.text = code;
- document.head.appendChild( script ).parentNode.removeChild( script );
- } else {
-
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
-
- indirect( code );
- }
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Support: IE9-11+
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- each: function( obj, callback ) {
- var length, i = 0;
-
- if ( isArrayLike( obj ) ) {
- length = obj.length;
- for ( ; i < length; i++ ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- }
-
- return obj;
- },
-
- // Support: Android<4.1
- trim: function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArrayLike( Object( arr ) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- return arr == null ? -1 : indexOf.call( arr, elem, i );
- },
-
- merge: function( first, second ) {
- var len = +second.length,
- j = 0,
- i = first.length;
-
- for ( ; j < len; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, invert ) {
- var callbackInverse,
- matches = [],
- i = 0,
- length = elems.length,
- callbackExpect = !invert;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- callbackInverse = !callback( elems[ i ], i );
- if ( callbackInverse !== callbackExpect ) {
- matches.push( elems[ i ] );
- }
- }
-
- return matches;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var length, value,
- i = 0,
- ret = [];
-
- // Go through the array, translating each of the items to their new values
- if ( isArrayLike( elems ) ) {
- length = elems.length;
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
- }
-
- // Flatten any nested arrays
- return concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- now: Date.now,
-
- // jQuery.support is not used in Core but other projects attach their
- // properties to it so it needs to exist.
- support: support
-} );
-
-// JSHint would error on this code due to the Symbol not being defined in ES5.
-// Defining this global in .jshintrc would create a danger of using the global
-// unguarded in another place, it seems safer to just disable JSHint for these
-// three lines.
-/* jshint ignore: start */
-if ( typeof Symbol === "function" ) {
- jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
-}
-/* jshint ignore: end */
-
-// Populate the class2type map
-jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
-function( i, name ) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-} );
-
-function isArrayLike( obj ) {
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // `in` check used to prevent JIT error (gh-2145)
- // hasOwn isn't used here due to false negatives
- // regarding Nodelist length in IE
- var length = !!obj && "length" in obj && obj.length,
- type = jQuery.type( obj );
-
- if ( type === "function" || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- return type === "array" || length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj;
-}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v2.2.1
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2015-10-17
- */
-(function( window ) {
-
-var i,
- support,
- Expr,
- getText,
- isXML,
- tokenize,
- compile,
- select,
- outermostContext,
- sortInput,
- hasDuplicate,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + 1 * new Date(),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- }
- return 0;
- },
-
- // General-purpose constants
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf as it's faster than native
- // http://jsperf.com/thor-indexof-vs-for/5
- indexOf = function( list, elem ) {
- var i = 0,
- len = list.length;
- for ( ; i < len; i++ ) {
- if ( list[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
-
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
- // Operator (capture 2)
- "*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
- "*\\]",
-
- pseudos = ":(" + identifier + ")(?:\\((" +
- // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
- // 1. quoted (capture 3; capture 4 or capture 5)
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
- // 2. simple (capture 6)
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
- // 3. anything else (capture 2)
- ".*" +
- ")\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rwhitespace = new RegExp( whitespace + "+", "g" ),
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + identifier + ")" ),
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
- "TAG": new RegExp( "^(" + identifier + "|[*])" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rsibling = /[+~]/,
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox<24
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- high < 0 ?
- // BMP codepoint
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- },
-
- // Used for iframes
- // See setDocument()
- // Removing the function wrapper causes a "Permission Denied"
- // error in IE
- unloadHandler = function() {
- setDocument();
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var m, i, elem, nid, nidselect, match, groups, newSelector,
- newContext = context && context.ownerDocument,
-
- // nodeType defaults to 9, since context defaults to document
- nodeType = context ? context.nodeType : 9;
-
- results = results || [];
-
- // Return early from calls with invalid selector or context
- if ( typeof selector !== "string" || !selector ||
- nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
-
- return results;
- }
-
- // Try to shortcut find operations (as opposed to filters) in HTML documents
- if ( !seed ) {
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
- context = context || document;
-
- if ( documentIsHTML ) {
-
- // If the selector is sufficiently simple, try using a "get*By*" DOM method
- // (excepting DocumentFragment context, where the methods don't exist)
- if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
-
- // ID selector
- if ( (m = match[1]) ) {
-
- // Document context
- if ( nodeType === 9 ) {
- if ( (elem = context.getElementById( m )) ) {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
-
- // Element context
- } else {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( newContext && (elem = newContext.getElementById( m )) &&
- contains( context, elem ) &&
- elem.id === m ) {
-
- results.push( elem );
- return results;
- }
- }
-
- // Type selector
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Class selector
- } else if ( (m = match[3]) && support.getElementsByClassName &&
- context.getElementsByClassName ) {
-
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // Take advantage of querySelectorAll
- if ( support.qsa &&
- !compilerCache[ selector + " " ] &&
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-
- if ( nodeType !== 1 ) {
- newContext = context;
- newSelector = selector;
-
- // qSA looks outside Element context, which is not what we want
- // Thanks to Andrew Dupont for this workaround technique
- // Support: IE <=8
- // Exclude object elements
- } else if ( context.nodeName.toLowerCase() !== "object" ) {
-
- // Capture the context ID, setting it first if necessary
- if ( (nid = context.getAttribute( "id" )) ) {
- nid = nid.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", (nid = expando) );
- }
-
- // Prefix every selector in the list
- groups = tokenize( selector );
- i = groups.length;
- nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
- while ( i-- ) {
- groups[i] = nidselect + " " + toSelector( groups[i] );
- }
- newSelector = groups.join( "," );
-
- // Expand context for sibling selectors
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
- context;
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch ( qsaError ) {
- } finally {
- if ( nid === expando ) {
- context.removeAttribute( "id" );
- }
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {function(string, object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key + " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key + " " ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = arr.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Checks a node for validity as a Sizzle context
- * @param {Element|Object=} context
- * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
- */
-function testContext( context ) {
- return context && typeof context.getElementsByTagName !== "undefined" && context;
-}
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Detects XML nodes
- * @param {Element|Object} elem An element or a document
- * @returns {Boolean} True iff elem is a non-HTML XML node
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare, parent,
- doc = node ? node.ownerDocument || node : preferredDoc;
-
- // Return early if doc is invalid or already selected
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Update global variables
- document = doc;
- docElem = document.documentElement;
- documentIsHTML = !isXML( document );
-
- // Support: IE 9-11, Edge
- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
- if ( (parent = document.defaultView) && parent.top !== parent ) {
- // Support: IE 11
- if ( parent.addEventListener ) {
- parent.addEventListener( "unload", unloadHandler, false );
-
- // Support: IE 9 - 10 only
- } else if ( parent.attachEvent ) {
- parent.attachEvent( "onunload", unloadHandler );
- }
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties
- // (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( document.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Support: IE<9
- support.getElementsByClassName = rnative.test( document.getElementsByClassName );
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !document.getElementsByName || !document.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
- var m = context.getElementById( id );
- return m ? [ m ] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== "undefined" &&
- elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( tag );
-
- // DocumentFragment nodes don't have gEBTN
- } else if ( support.qsa ) {
- return context.querySelectorAll( tag );
- }
- } :
-
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- docElem.appendChild( div ).innerHTML = "" +
- "";
-
- // Support: IE8, Opera 11-12.16
- // Nothing should be selected when empty strings follow ^= or $= or *=
- // The test attribute must be unknown in Opera but "safe" for WinRT
- // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( div.querySelectorAll("[msallowcapture^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
- if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
- rbuggyQSA.push("~=");
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
-
- // Support: Safari 8+, iOS 8+
- // https://bugs.webkit.org/show_bug.cgi?id=136851
- // In-page `selector#id sibing-combinator selector` fails
- if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
- rbuggyQSA.push(".#.+[+~]");
- }
- });
-
- assert(function( div ) {
- // Support: Windows 8 Native Apps
- // The type and name attributes are restricted during .innerHTML assignment
- var input = document.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "name", "D" );
-
- // Support: IE8
- // Enforce case-sensitivity of name attribute
- if ( div.querySelectorAll("[name=d]").length ) {
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
- docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
- hasCompare = rnative.test( docElem.compareDocumentPosition );
-
- // Element contains another
- // Purposefully self-exclusive
- // As in, an element does not contain itself
- contains = hasCompare || rnative.test( docElem.contains ) ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = hasCompare ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- // Sort on method existence if only one input has compareDocumentPosition
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- if ( compare ) {
- return compare;
- }
-
- // Calculate position if both inputs belong to the same document
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
- a.compareDocumentPosition( b ) :
-
- // Otherwise we know they are disconnected
- 1;
-
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- } :
- function( a, b ) {
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Parentless nodes are either documents or disconnected
- if ( !aup || !bup ) {
- return a === document ? -1 :
- b === document ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- !compilerCache[ expr + " " ] &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch (e) {}
- }
-
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val !== undefined ?
- val :
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- // Clear input after sorting to release objects
- // See https://github.com/jquery/sizzle/pull/225
- sortInput = null;
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- while ( (node = elem[i++]) ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (jQuery #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[6] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] ) {
- match[2] = match[4] || match[5] || "";
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, uniqueCache, outerCache, node, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType,
- diff = false;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) {
-
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
-
- // Seek `elem` from a previously-cached index
-
- // ...in a gzip-friendly way
- node = parent;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex && cache[ 2 ];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- } else {
- // Use previously-cached element index if available
- if ( useCache ) {
- // ...in a gzip-friendly way
- node = elem;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex;
- }
-
- // xml :nth-child(...)
- // or :nth-last-child(...) or :nth(-last)?-of-type(...)
- if ( diff === false ) {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) &&
- ++diff ) {
-
- // Cache the index of each encountered element
- if ( useCache ) {
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- uniqueCache[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- // Don't keep the element (issue #299)
- input[0] = null;
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- text = text.replace( runescape, funescape );
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
- // but not by others (comment: 8; processing instruction: 7; etc.)
- // nodeType < 6 works because attributes (2) do not appear as children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeType < 6 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
-
- // Support: IE<8
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( (tokens = []) );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-};
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var oldCache, uniqueCache, outerCache,
- newCache = [ dirruns, doneName ];
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
-
- if ( (oldCache = uniqueCache[ dir ]) &&
- oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
-
- // Assign to newCache so results back-propagate to previous elements
- return (newCache[ 2 ] = oldCache[ 2 ]);
- } else {
- // Reuse newcache so results back-propagate to previous elements
- uniqueCache[ dir ] = newCache;
-
- // A match means we're done; a fail means we have to keep checking
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- // Avoid hanging onto element (issue #299)
- checkContext = null;
- return ret;
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- var bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, outermost ) {
- var elem, j, matcher,
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- setMatched = [],
- contextBackup = outermostContext,
- // We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
- len = elems.length;
-
- if ( outermost ) {
- outermostContext = context === document || context || outermost;
- }
-
- // Add elements passing elementMatchers directly to results
- // Support: IE<9, Safari
- // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- if ( !context && elem.ownerDocument !== document ) {
- setDocument( elem );
- xml = !documentIsHTML;
- }
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context || document, xml) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // `i` is now the count of elements visited above, and adding it to `matchedCount`
- // makes the latter nonnegative.
- matchedCount += i;
-
- // Apply set filters to unmatched elements
- // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
- // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
- // no element matchers and no seed.
- // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
- // case, which will result in a "00" `matchedCount` that differs from `i` but is also
- // numerically zero.
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !match ) {
- match = tokenize( selector );
- }
- i = match.length;
- while ( i-- ) {
- cached = matcherFromTokens( match[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
-
- // Save selector and tokenization
- cached.selector = selector;
- }
- return cached;
-};
-
-/**
- * A low-level selection function that works with Sizzle's compiled
- * selector functions
- * @param {String|Function} selector A selector or a pre-compiled
- * selector function built with Sizzle.compile
- * @param {Element} context
- * @param {Array} [results]
- * @param {Array} [seed] A set of elements to match against
- */
-select = Sizzle.select = function( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- compiled = typeof selector === "function" && selector,
- match = !seed && tokenize( (selector = compiled.selector || selector) );
-
- results = results || [];
-
- // Try to minimize operations if there is only one selector in the list and no seed
- // (the latter of which guarantees us context)
- if ( match.length === 1 ) {
-
- // Reduce context if the leading compound selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
-
- // Precompiled matchers will still verify ancestry, so step up a level
- } else if ( compiled ) {
- context = context.parentNode;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
-
- // Compile and execute a filtering function if one is not provided
- // Provide `match` to avoid retokenization if we modified the selector above
- ( compiled || compile( selector, match ) )(
- seed,
- context,
- !documentIsHTML,
- results,
- !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
- );
- return results;
-};
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome 14-35+
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = !!hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = "";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = "";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return elem[ name ] === true ? name.toLowerCase() :
- (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- null;
- }
- });
-}
-
-return Sizzle;
-
-})( window );
-
-
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[ ":" ] = jQuery.expr.pseudos;
-jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-
-var dir = function( elem, dir, until ) {
- var matched = [],
- truncate = until !== undefined;
-
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
- if ( elem.nodeType === 1 ) {
- if ( truncate && jQuery( elem ).is( until ) ) {
- break;
- }
- matched.push( elem );
- }
- }
- return matched;
-};
-
-
-var siblings = function( n, elem ) {
- var matched = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- matched.push( n );
- }
- }
-
- return matched;
-};
-
-
-var rneedsContext = jQuery.expr.match.needsContext;
-
-var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
-
-
-
-var risSimple = /^.[^:#\[\.,]*$/;
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- } );
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- } );
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
- } );
-}
-
-jQuery.filter = function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- } ) );
-};
-
-jQuery.fn.extend( {
- find: function( selector ) {
- var i,
- len = this.length,
- ret = [],
- self = this;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter( function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- } ) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
- filter: function( selector ) {
- return this.pushStack( winnow( this, selector || [], false ) );
- },
- not: function( selector ) {
- return this.pushStack( winnow( this, selector || [], true ) );
- },
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- }
-} );
-
-
-// Initialize a jQuery object
-
-
-// A central reference to the root jQuery(document)
-var rootjQuery,
-
- // A simple way to check for HTML strings
- // Prioritize #id over to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- init = jQuery.fn.init = function( selector, context, root ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Method init() accepts an alternate rootjQuery
- // so migrate can support jQuery.sub (gh-2101)
- root = root || rootjQuery;
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector[ 0 ] === "<" &&
- selector[ selector.length - 1 ] === ">" &&
- selector.length >= 3 ) {
-
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && ( match[ 1 ] || !context ) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[ 1 ] ) {
- context = context instanceof jQuery ? context[ 0 ] : context;
-
- // Option to run scripts is true for back-compat
- // Intentionally let the error be thrown if parseHTML is not present
- jQuery.merge( this, jQuery.parseHTML(
- match[ 1 ],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
-
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[ 2 ] );
-
- // Support: Blackberry 4.6
- // gEBID returns nodes no longer in the document (#6963)
- if ( elem && elem.parentNode ) {
-
- // Inject the element directly into the jQuery object
- this.length = 1;
- this[ 0 ] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || root ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[ 0 ] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return root.ready !== undefined ?
- root.ready( selector ) :
-
- // Execute immediately if ready is not present
- selector( jQuery );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- };
-
-// Give the init function the jQuery prototype for later instantiation
-init.prototype = jQuery.fn;
-
-// Initialize central reference
-rootjQuery = jQuery( document );
-
-
-var rparentsprev = /^(?:parents|prev(?:Until|All))/,
-
- // Methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend( {
- has: function( target ) {
- var targets = jQuery( target, this ),
- l = targets.length;
-
- return this.filter( function() {
- var i = 0;
- for ( ; i < l; i++ ) {
- if ( jQuery.contains( this, targets[ i ] ) ) {
- return true;
- }
- }
- } );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- matched = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
-
- // Always skip document fragments
- if ( cur.nodeType < 11 && ( pos ?
- pos.index( cur ) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector( cur, selectors ) ) ) {
-
- matched.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
- },
-
- // Determine the position of an element within the set
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // Index in selector
- if ( typeof elem === "string" ) {
- return indexOf.call( jQuery( elem ), this[ 0 ] );
- }
-
- // Locate the position of the desired element
- return indexOf.call( this,
-
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[ 0 ] : elem
- );
- },
-
- add: function( selector, context ) {
- return this.pushStack(
- jQuery.uniqueSort(
- jQuery.merge( this.get(), jQuery( selector, context ) )
- )
- );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- }
-} );
-
-function sibling( cur, dir ) {
- while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
- return cur;
-}
-
-jQuery.each( {
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return siblings( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return siblings( elem.firstChild );
- },
- contents: function( elem ) {
- return elem.contentDocument || jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var matched = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- matched = jQuery.filter( selector, matched );
- }
-
- if ( this.length > 1 ) {
-
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- jQuery.uniqueSort( matched );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- matched.reverse();
- }
- }
-
- return this.pushStack( matched );
- };
-} );
-var rnotwhite = ( /\S+/g );
-
-
-
-// Convert String-formatted options into Object-formatted ones
-function createOptions( options ) {
- var object = {};
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- } );
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- createOptions( options ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
-
- // Last fire value for non-forgettable lists
- memory,
-
- // Flag to know if list was already fired
- fired,
-
- // Flag to prevent firing
- locked,
-
- // Actual callback list
- list = [],
-
- // Queue of execution data for repeatable lists
- queue = [],
-
- // Index of currently firing callback (modified by add/remove as needed)
- firingIndex = -1,
-
- // Fire callbacks
- fire = function() {
-
- // Enforce single-firing
- locked = options.once;
-
- // Execute callbacks for all pending executions,
- // respecting firingIndex overrides and runtime changes
- fired = firing = true;
- for ( ; queue.length; firingIndex = -1 ) {
- memory = queue.shift();
- while ( ++firingIndex < list.length ) {
-
- // Run callback and check for early termination
- if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
- options.stopOnFalse ) {
-
- // Jump to end and forget the data so .add doesn't re-fire
- firingIndex = list.length;
- memory = false;
- }
- }
- }
-
- // Forget the data if we're done with it
- if ( !options.memory ) {
- memory = false;
- }
-
- firing = false;
-
- // Clean up if we're done firing for good
- if ( locked ) {
-
- // Keep an empty list if we have data for future add calls
- if ( memory ) {
- list = [];
-
- // Otherwise, this object is spent
- } else {
- list = "";
- }
- }
- },
-
- // Actual Callbacks object
- self = {
-
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
-
- // If we have memory from a past run, we should fire after adding
- if ( memory && !firing ) {
- firingIndex = list.length - 1;
- queue.push( memory );
- }
-
- ( function add( args ) {
- jQuery.each( args, function( _, arg ) {
- if ( jQuery.isFunction( arg ) ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
-
- // Inspect recursively
- add( arg );
- }
- } );
- } )( arguments );
-
- if ( memory && !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Remove a callback from the list
- remove: function() {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
-
- // Handle firing indexes
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- } );
- return this;
- },
-
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ?
- jQuery.inArray( fn, list ) > -1 :
- list.length > 0;
- },
-
- // Remove all callbacks from the list
- empty: function() {
- if ( list ) {
- list = [];
- }
- return this;
- },
-
- // Disable .fire and .add
- // Abort any current/pending executions
- // Clear all callbacks and values
- disable: function() {
- locked = queue = [];
- list = memory = "";
- return this;
- },
- disabled: function() {
- return !list;
- },
-
- // Disable .fire
- // Also disable .add unless we have memory (since it would have no effect)
- // Abort any pending executions
- lock: function() {
- locked = queue = [];
- if ( !memory ) {
- list = memory = "";
- }
- return this;
- },
- locked: function() {
- return !!locked;
- },
-
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( !locked ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- queue.push( args );
- if ( !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
-
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-jQuery.extend( {
-
- Deferred: function( func ) {
- var tuples = [
-
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred( function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
-
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[ 1 ] ]( function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .progress( newDefer.notify )
- .done( newDefer.resolve )
- .fail( newDefer.reject );
- } else {
- newDefer[ tuple[ 0 ] + "With" ](
- this === promise ? newDefer.promise() : this,
- fn ? [ returned ] : arguments
- );
- }
- } );
- } );
- fns = null;
- } ).promise();
- },
-
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[ 1 ] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add( function() {
-
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[ 0 ] ] = function() {
- deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
- } );
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 ||
- ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred.
- // If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
- if ( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // Add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .progress( updateFunc( i, progressContexts, progressValues ) )
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject );
- } else {
- --remaining;
- }
- }
- }
-
- // If we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-} );
-
-
-// The deferred used on DOM ready
-var readyList;
-
-jQuery.fn.ready = function( fn ) {
-
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
-};
-
-jQuery.extend( {
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
- jQuery( document ).off( "ready" );
- }
- }
-} );
-
-/**
- * The ready event handler and self cleanup method
- */
-function completed() {
- document.removeEventListener( "DOMContentLoaded", completed );
- window.removeEventListener( "load", completed );
- jQuery.ready();
-}
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called
- // after the browser event has already occurred.
- // Support: IE9-10 only
- // Older IE sometimes signals "interactive" too soon
- if ( document.readyState === "complete" ||
- ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
-
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- window.setTimeout( jQuery.ready );
-
- } else {
-
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed );
- }
- }
- return readyList.promise( obj );
-};
-
-// Kick off the DOM ready check even if the user does not
-jQuery.ready.promise();
-
-
-
-
-// Multifunctional method to get and set values of a collection
-// The value/s can optionally be executed if it's a function
-var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- len = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- access( elems, fn, i, key[ i ], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
-
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < len; i++ ) {
- fn(
- elems[ i ], key, raw ?
- value :
- value.call( elems[ i ], i, fn( elems[ i ], key ) )
- );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- len ? fn( elems[ 0 ], key ) : emptyGet;
-};
-var acceptData = function( owner ) {
-
- // Accepts only:
- // - Node
- // - Node.ELEMENT_NODE
- // - Node.DOCUMENT_NODE
- // - Object
- // - Any
- /* jshint -W018 */
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
-};
-
-
-
-
-function Data() {
- this.expando = jQuery.expando + Data.uid++;
-}
-
-Data.uid = 1;
-
-Data.prototype = {
-
- register: function( owner, initial ) {
- var value = initial || {};
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable, non-writable property
- // configurability must be true to allow the property to be
- // deleted with the delete operator
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- writable: true,
- configurable: true
- } );
- }
- return owner[ this.expando ];
- },
- cache: function( owner ) {
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( !acceptData( owner ) ) {
- return {};
- }
-
- // Check if the owner object already has a cache
- var value = owner[ this.expando ];
-
- // If not, create one
- if ( !value ) {
- value = {};
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( acceptData( owner ) ) {
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable property
- // configurable must be true to allow the property to be
- // deleted when data is removed
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- configurable: true
- } );
- }
- }
- }
-
- return value;
- },
- set: function( owner, data, value ) {
- var prop,
- cache = this.cache( owner );
-
- // Handle: [ owner, key, value ] args
- if ( typeof data === "string" ) {
- cache[ data ] = value;
-
- // Handle: [ owner, { properties } ] args
- } else {
-
- // Copy the properties one-by-one to the cache object
- for ( prop in data ) {
- cache[ prop ] = data[ prop ];
- }
- }
- return cache;
- },
- get: function( owner, key ) {
- return key === undefined ?
- this.cache( owner ) :
- owner[ this.expando ] && owner[ this.expando ][ key ];
- },
- access: function( owner, key, value ) {
- var stored;
-
- // In cases where either:
- //
- // 1. No key was specified
- // 2. A string key was specified, but no value provided
- //
- // Take the "read" path and allow the get method to determine
- // which value to return, respectively either:
- //
- // 1. The entire cache object
- // 2. The data stored at the key
- //
- if ( key === undefined ||
- ( ( key && typeof key === "string" ) && value === undefined ) ) {
-
- stored = this.get( owner, key );
-
- return stored !== undefined ?
- stored : this.get( owner, jQuery.camelCase( key ) );
- }
-
- // When the key is not a string, or both a key and value
- // are specified, set or extend (existing objects) with either:
- //
- // 1. An object of properties
- // 2. A key and value
- //
- this.set( owner, key, value );
-
- // Since the "set" path can have two possible entry points
- // return the expected data based on which path was taken[*]
- return value !== undefined ? value : key;
- },
- remove: function( owner, key ) {
- var i, name, camel,
- cache = owner[ this.expando ];
-
- if ( cache === undefined ) {
- return;
- }
-
- if ( key === undefined ) {
- this.register( owner );
-
- } else {
-
- // Support array or space separated string of keys
- if ( jQuery.isArray( key ) ) {
-
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = key.concat( key.map( jQuery.camelCase ) );
- } else {
- camel = jQuery.camelCase( key );
-
- // Try the string as a key before any manipulation
- if ( key in cache ) {
- name = [ key, camel ];
- } else {
-
- // If a key with the spaces exists, use it.
- // Otherwise, create an array by matching non-whitespace
- name = camel;
- name = name in cache ?
- [ name ] : ( name.match( rnotwhite ) || [] );
- }
- }
-
- i = name.length;
-
- while ( i-- ) {
- delete cache[ name[ i ] ];
- }
- }
-
- // Remove the expando if there's no more data
- if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
-
- // Support: Chrome <= 35-45+
- // Webkit & Blink performance suffers when deleting properties
- // from DOM nodes, so set to undefined instead
- // https://code.google.com/p/chromium/issues/detail?id=378607
- if ( owner.nodeType ) {
- owner[ this.expando ] = undefined;
- } else {
- delete owner[ this.expando ];
- }
- }
- },
- hasData: function( owner ) {
- var cache = owner[ this.expando ];
- return cache !== undefined && !jQuery.isEmptyObject( cache );
- }
-};
-var dataPriv = new Data();
-
-var dataUser = new Data();
-
-
-
-// Implementation Summary
-//
-// 1. Enforce API surface and semantic compatibility with 1.9.x branch
-// 2. Improve the module's maintainability by reducing the storage
-// paths to a single mechanism.
-// 3. Use the same single mechanism to support "private" and "user" data.
-// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
-// 5. Avoid exposing implementation details on user objects (eg. expando properties)
-// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
-
-var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- rmultiDash = /[A-Z]/g;
-
-function dataAttr( elem, key, data ) {
- var name;
-
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
- name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
-
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch ( e ) {}
-
- // Make sure we set the data so it isn't changed later
- dataUser.set( elem, key, data );
- } else {
- data = undefined;
- }
- }
- return data;
-}
-
-jQuery.extend( {
- hasData: function( elem ) {
- return dataUser.hasData( elem ) || dataPriv.hasData( elem );
- },
-
- data: function( elem, name, data ) {
- return dataUser.access( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- dataUser.remove( elem, name );
- },
-
- // TODO: Now that all calls to _data and _removeData have been replaced
- // with direct calls to dataPriv methods, these can be deprecated.
- _data: function( elem, name, data ) {
- return dataPriv.access( elem, name, data );
- },
-
- _removeData: function( elem, name ) {
- dataPriv.remove( elem, name );
- }
-} );
-
-jQuery.fn.extend( {
- data: function( key, value ) {
- var i, name, data,
- elem = this[ 0 ],
- attrs = elem && elem.attributes;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = dataUser.get( elem );
-
- if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
- i = attrs.length;
- while ( i-- ) {
-
- // Support: IE11+
- // The attrs elements can be null (#14894)
- if ( attrs[ i ] ) {
- name = attrs[ i ].name;
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.slice( 5 ) );
- dataAttr( elem, name, data[ name ] );
- }
- }
- }
- dataPriv.set( elem, "hasDataAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each( function() {
- dataUser.set( this, key );
- } );
- }
-
- return access( this, function( value ) {
- var data, camelKey;
-
- // The calling jQuery object (element matches) is not empty
- // (and therefore has an element appears at this[ 0 ]) and the
- // `value` parameter was not undefined. An empty jQuery object
- // will result in `undefined` for elem = this[ 0 ] which will
- // throw an exception if an attempt to read a data cache is made.
- if ( elem && value === undefined ) {
-
- // Attempt to get data from the cache
- // with the key as-is
- data = dataUser.get( elem, key ) ||
-
- // Try to find dashed key if it exists (gh-2779)
- // This is for 2.2.x only
- dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
-
- if ( data !== undefined ) {
- return data;
- }
-
- camelKey = jQuery.camelCase( key );
-
- // Attempt to get data from the cache
- // with the key camelized
- data = dataUser.get( elem, camelKey );
- if ( data !== undefined ) {
- return data;
- }
-
- // Attempt to "discover" the data in
- // HTML5 custom data-* attrs
- data = dataAttr( elem, camelKey, undefined );
- if ( data !== undefined ) {
- return data;
- }
-
- // We tried really hard, but the data doesn't exist.
- return;
- }
-
- // Set the data...
- camelKey = jQuery.camelCase( key );
- this.each( function() {
-
- // First, attempt to store a copy or reference of any
- // data that might've been store with a camelCased key.
- var data = dataUser.get( this, camelKey );
-
- // For HTML5 data-* attribute interop, we have to
- // store property names with dashes in a camelCase form.
- // This might not apply to all properties...*
- dataUser.set( this, camelKey, value );
-
- // *... In the case of properties that might _actually_
- // have dashes, we need to also store a copy of that
- // unchanged property.
- if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
- dataUser.set( this, key, value );
- }
- } );
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each( function() {
- dataUser.remove( this, key );
- } );
- }
-} );
-
-
-jQuery.extend( {
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = dataPriv.get( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray( data ) ) {
- queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // Clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // Not public - generate a queueHooks object, or return the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
- empty: jQuery.Callbacks( "once memory" ).add( function() {
- dataPriv.remove( elem, [ type + "queue", key ] );
- } )
- } );
- }
-} );
-
-jQuery.fn.extend( {
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[ 0 ], type );
- }
-
- return data === undefined ?
- this :
- this.each( function() {
- var queue = jQuery.queue( this, type, data );
-
- // Ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- } );
- },
- dequeue: function( type ) {
- return this.each( function() {
- jQuery.dequeue( this, type );
- } );
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
-
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while ( i-- ) {
- tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-} );
-var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
-
-var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
-
-
-var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
-
-var isHidden = function( elem, el ) {
-
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" ||
- !jQuery.contains( elem.ownerDocument, elem );
- };
-
-
-
-function adjustCSS( elem, prop, valueParts, tween ) {
- var adjusted,
- scale = 1,
- maxIterations = 20,
- currentValue = tween ?
- function() { return tween.cur(); } :
- function() { return jQuery.css( elem, prop, "" ); },
- initial = currentValue(),
- unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
- rcssNum.exec( jQuery.css( elem, prop ) );
-
- if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
-
- // Trust units reported by jQuery.css
- unit = unit || initialInUnit[ 3 ];
-
- // Make sure we update the tween properties later on
- valueParts = valueParts || [];
-
- // Iteratively approximate from a nonzero starting point
- initialInUnit = +initial || 1;
-
- do {
-
- // If previous iteration zeroed out, double until we get *something*.
- // Use string for doubling so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- initialInUnit = initialInUnit / scale;
- jQuery.style( elem, prop, initialInUnit + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // Break the loop if scale is unchanged or perfect, or if we've just had enough.
- } while (
- scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
- );
- }
-
- if ( valueParts ) {
- initialInUnit = +initialInUnit || +initial || 0;
-
- // Apply relative offset (+=/-=) if specified
- adjusted = valueParts[ 1 ] ?
- initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
- +valueParts[ 2 ];
- if ( tween ) {
- tween.unit = unit;
- tween.start = initialInUnit;
- tween.end = adjusted;
- }
- }
- return adjusted;
-}
-var rcheckableType = ( /^(?:checkbox|radio)$/i );
-
-var rtagName = ( /<([\w:-]+)/ );
-
-var rscriptType = ( /^$|\/(?:java|ecma)script/i );
-
-
-
-// We have to close these tags to support XHTML (#13200)
-var wrapMap = {
-
- // Support: IE9
- option: [ 1, "" ],
-
- // XHTML parsers do not magically insert elements in the
- // same way that tag soup parsers do. So we cannot shorten
- // this by omitting or other required elements.
- thead: [ 1, "" ],
- col: [ 2, "" ],
- tr: [ 2, "" ],
- td: [ 3, "" ],
-
- _default: [ 0, "", "" ]
-};
-
-// Support: IE9
-wrapMap.optgroup = wrapMap.option;
-
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function getAll( context, tag ) {
-
- // Support: IE9-11+
- // Use typeof to avoid zero-argument method invocation on host objects (#15151)
- var ret = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ?
- context.querySelectorAll( tag || "*" ) :
- [];
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], ret ) :
- ret;
-}
-
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- dataPriv.set(
- elems[ i ],
- "globalEval",
- !refElements || dataPriv.get( refElements[ i ], "globalEval" )
- );
- }
-}
-
-
-var rhtml = /<|?\w+;/;
-
-function buildFragment( elems, context, scripts, selection, ignored ) {
- var elem, tmp, tag, wrap, contains, j,
- fragment = context.createDocumentFragment(),
- nodes = [],
- i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
- tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
-
- // Descend through wrappers to the right content
- j = wrap[ 0 ];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, tmp.childNodes );
-
- // Remember the top-level container
- tmp = fragment.firstChild;
-
- // Ensure the created nodes are orphaned (#12392)
- tmp.textContent = "";
- }
- }
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
-
- i = 0;
- while ( ( elem = nodes[ i++ ] ) ) {
-
- // Skip elements already in the context collection (trac-4087)
- if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
- if ( ignored ) {
- ignored.push( elem );
- }
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( fragment.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( ( elem = tmp[ j++ ] ) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- return fragment;
-}
-
-
-( function() {
- var fragment = document.createDocumentFragment(),
- div = fragment.appendChild( document.createElement( "div" ) ),
- input = document.createElement( "input" );
-
- // Support: Android 4.0-4.3, Safari<=5.1
- // Check state lost if the name is set (#11217)
- // Support: Windows Web Apps (WWA)
- // `name` and `type` must use .setAttribute for WWA (#14901)
- input.setAttribute( "type", "radio" );
- input.setAttribute( "checked", "checked" );
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
-
- // Support: Safari<=5.1, Android<4.2
- // Older WebKit doesn't clone checked state correctly in fragments
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<=11+
- // Make sure textarea (and checkbox) defaultValue is properly cloned
- div.innerHTML = "";
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-} )();
-
-
-var
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-// Support: IE9
-// See #13393 for more info
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-function on( elem, types, selector, data, fn, one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
-
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
-
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- on( elem, type, selector, data, types[ type ], one );
- }
- return elem;
- }
-
- if ( data == null && fn == null ) {
-
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
-
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
-
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return this;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
-
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
-
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return elem.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- } );
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.get( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !( events = elemData.events ) ) {
- events = elemData.events = {};
- }
- if ( !( eventHandle = elemData.handle ) ) {
- eventHandle = elemData.handle = function( e ) {
-
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
- jQuery.event.dispatch.apply( elem, arguments ) : undefined;
- };
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend( {
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join( "." )
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !( handlers = events[ type ] ) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener if the special events handler returns false
- if ( !special.setup ||
- special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
-
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
-
- if ( !elemData || !( events = elemData.events ) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[ 2 ] &&
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector ||
- selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown ||
- special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
-
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove data and the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- dataPriv.remove( elem, "handle events" );
- }
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = slice.call( arguments ),
- handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[ 0 ] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( ( handleObj = matched.handlers[ j++ ] ) &&
- !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or 2) have namespace(s)
- // a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
- handleObj.handler ).apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( ( event.result = ret ) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Support (at least): Chrome, IE9
- // Find delegate handlers
- // Black-hole SVG