From abf135da4ee3143899d876ad37b80b91ac8582ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?=
Date: Mon, 28 Mar 2016 01:43:26 +0200
Subject: [PATCH] updated webpages
---
.web-build_do.sh => _web-build_do.sh | 3 +-
html/css/app.css | 1088 +-----------------------
html/js/all.js | 961 +--------------------
html/pages/home.tpl | 6 +-
html/pages/wfm.html | 41 +
html/pages/wifi.tpl | 5 +-
html_src/chart.php | 25 -
html_src/css/app.css | 1181 +-------------------------
html_src/js-src/lib/chartist.js | 12 +-
html_src/js-src/waveform.js | 7 +-
html_src/js/all.js | 19 +-
html_src/js/all.js.map | 2 +-
html_src/waveform.php | 20 +
user/cgi.c | 2 +-
user/routes.c | 14 +-
web-build.sh | 2 +-
16 files changed, 108 insertions(+), 3280 deletions(-)
rename .web-build_do.sh => _web-build_do.sh (75%)
create mode 100644 html/pages/wfm.html
delete mode 100644 html_src/chart.php
create mode 100644 html_src/waveform.php
diff --git a/.web-build_do.sh b/_web-build_do.sh
similarity index 75%
rename from .web-build_do.sh
rename to _web-build_do.sh
index f43daa7..a037de7 100755
--- a/.web-build_do.sh
+++ b/_web-build_do.sh
@@ -11,7 +11,7 @@ rm -rf "$BLDDIR/js"
rm -rf "$BLDDIR/css"
cd "$SRCDIR"
-gulp
+gulp --production
cd ..
cp -R "$SRCDIR/css" "$BLDDIR"
@@ -23,3 +23,4 @@ mkdir -p "$BLDDIR/pages"
php "$SRCDIR/home.php" > "$BLDDIR/pages/home.tpl"
php "$SRCDIR/wifi.php" > "$BLDDIR/pages/wifi.tpl"
+php "$SRCDIR/waveform.php" > "$BLDDIR/pages/wfm.html" # no substitutions, .html allows to gzip it.
diff --git a/html/css/app.css b/html/css/app.css
index b1e4822..295bac7 100644
--- a/html/css/app.css
+++ b/html/css/app.css
@@ -1,1087 +1 @@
-@charset "UTF-8";
-/* normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
-/**
- * 1. Set default font family to sans-serif.
- * 2. Prevent iOS and IE text size adjust after device orientation change,
- * without disabling user zoom.
- */
-*, *:before, *:after {
- box-sizing: border-box; }
-
-html {
- font-family: sans-serif;
- /* 1 */
- -ms-text-size-adjust: 100%;
- /* 2 */
- -webkit-text-size-adjust: 100%;
- /* 2 */ }
-
-/**
- * Remove default margin.
- */
-body {
- margin: 0; }
-
-/* HTML5 display definitions
- ========================================================================== */
-/**
- * Correct `block` display not defined for any HTML5 element in IE 8/9.
- * Correct `block` display not defined for `details` or `summary` in IE 10/11
- * and Firefox.
- * Correct `block` display not defined for `main` in IE 11.
- */
-figure,
-nav {
- display: block; }
-
-/**
- * 1. Correct `inline-block` display not defined in IE 8/9.
- * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
- */
-canvas,
-progress {
- display: inline-block;
- /* 1 */
- vertical-align: baseline;
- /* 2 */ }
-
-/**
- * Prevent modern browsers from displaying `audio` without controls.
- * Remove excess height in iOS 5 devices.
- */
-/**
- * Address `[hidden]` styling not present in IE 8/9/10.
- * Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
- */
-[hidden] {
- display: none; }
-
-/* Links
- ========================================================================== */
-/**
- * Remove the gray background color from active links in IE 10.
- */
-a {
- background-color: transparent; }
-
-/**
- * Improve readability of focused elements when they are also in an
- * active/hover state.
- */
-a:active,
-a:hover {
- outline: 0; }
-
-/* Text-level semantics
- ========================================================================== */
-/**
- * Address styling not present in IE 8/9/10/11, Safari, and Chrome.
- */
-/**
- * Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
- */
-b {
- font-weight: bold; }
-
-/**
- * Address styling not present in Safari and Chrome.
- */
-/**
- * Address variable `h1` font-size and margin within `section` and `article`
- * contexts in Firefox 4+, Safari, and Chrome.
- */
-h1 {
- font-size: 2em;
- margin: 0.67em 0; }
-
-h2 {
- font-size: 2em;
- margin: 0.67em 0; }
-
-/**
- * Address styling not present in IE 8/9.
- */
-/**
- * Address inconsistent and variable font size in all browsers.
- */
-small {
- font-size: 80%; }
-
-/**
- * Prevent `sub` and `sup` affecting `line-height` in all browsers.
- */
-sub,
-sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline; }
-
-sup {
- top: -0.5em; }
-
-sub {
- bottom: -0.25em; }
-
-/* Embedded content
- ========================================================================== */
-/**
- * Remove border when inside `a` element in IE 8/9/10.
- */
-img {
- border: 0; }
-
-/**
- * Correct overflow not hidden in IE 9/10/11.
- */
-svg:not(:root) {
- overflow: hidden; }
-
-/* Grouping content
- ========================================================================== */
-/**
- * Address margin not present in IE 8/9 and Safari.
- */
-/**
- * Address differences between Firefox and other browsers.
- */
-hr {
- box-sizing: content-box;
- height: 0; }
-
-/**
- * Contain overflow in all browsers.
- */
-pre {
- overflow: auto; }
-
-/**
- * Address odd `em`-unit font size rendering in all browsers.
- */
-code,
-pre {
- font-family: monospace;
- font-size: 1em; }
-
-/* Forms
- ========================================================================== */
-/**
- * Known limitation: by default, Chrome and Safari on OS X allow very limited
- * styling of `select`, unless a `border` property is set.
- */
-/**
- * 1. Correct color not being inherited.
- * Known issue: affects color of disabled elements.
- * 2. Correct font properties not being inherited.
- * 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
- */
-button,
-input,
-select,
-textarea {
- color: inherit;
- /* 1 */
- font: inherit;
- /* 2 */
- margin: 0;
- /* 3 */ }
-
-/**
- * Address `overflow` set to `hidden` in IE 8/9/10/11.
- */
-button {
- overflow: visible; }
-
-/**
- * Address inconsistent `text-transform` inheritance for `button` and `select`.
- * All other form control elements do not inherit `text-transform` values.
- * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
- * Correct `select` style inheritance in Firefox.
- */
-button,
-select {
- text-transform: none; }
-
-/**
- * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
- * and `video` controls.
- * 2. Correct inability to style clickable `input` types in iOS.
- * 3. Improve usability and consistency of cursor style between image-type
- * `input` and others.
- */
-button,
-input[type="reset"],
-input[type="submit"] {
- -webkit-appearance: button;
- /* 2 */
- cursor: pointer;
- /* 3 */ }
-
-/**
- * Re-set default cursor for disabled elements.
- */
-button[disabled],
-html input[disabled] {
- cursor: default; }
-
-/**
- * Remove inner padding and border in Firefox 4+.
- */
-button::-moz-focus-inner,
-input::-moz-focus-inner {
- border: 0;
- padding: 0; }
-
-/**
- * Address Firefox 4+ setting `line-height` on `input` using `!important` in
- * the UA stylesheet.
- */
-input {
- line-height: normal; }
-
-/**
- * It's recommended that you don't attempt to style these elements.
- * Firefox's implementation doesn't respect box-sizing, padding, or width.
- *
- * 1. Address box sizing set to `content-box` in IE 8/9/10.
- * 2. Remove excess padding in IE 8/9/10.
- */
-input[type="checkbox"],
-input[type="radio"] {
- box-sizing: border-box;
- /* 1 */
- padding: 0;
- /* 2 */ }
-
-/**
- * Fix the cursor style for Chrome's increment/decrement buttons. For certain
- * `font-size` values of the `input`, it causes the cursor style of the
- * decrement button to change from `default` to `text`.
- */
-/**
- * 1. Address `appearance` set to `searchfield` in Safari and Chrome.
- * 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
- */
-/**
- * Remove inner padding and search cancel button in Safari and Chrome on OS X.
- * Safari (but not Chrome) clips the cancel button when the search input has
- * padding (and `textfield` appearance).
- */
-/**
- * Define consistent border, margin, and padding.
- */
-/**
- * 1. Correct `color` not being inherited in IE 8/9/10/11.
- * 2. Remove padding so people aren't caught out if they zero out fieldsets.
- */
-legend {
- border: 0;
- /* 1 */
- padding: 0;
- /* 2 */ }
-
-/**
- * Remove default vertical scrollbar in IE 8/9/10/11.
- */
-textarea {
- overflow: auto; }
-
-/**
- * Don't inherit the `font-weight` (applied by a rule above).
- * NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
- */
-/* Tables
- ========================================================================== */
-/**
- * Remove most spacing between table cells.
- */
-table {
- border-collapse: collapse;
- border-spacing: 0; }
-
-td,
-th {
- padding: 0; }
-
-html {
- box-sizing: border-box; }
-
-*, *::after, *::before {
- box-sizing: inherit; }
-
-.center {
- text-align: center; }
-
-html {
- font-family: Arial, sans-serif;
- color: #D0D0D0;
- background: #131315; }
-
-html, body {
- border: 0 none;
- margin: 0;
- padding: 0;
- text-decoration: none;
- width: 100%;
- height: 100%;
- overflow: hidden; }
-
-/* Main outer container */
-#outer {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- position: absolute;
- width: 100%;
- height: 100%;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- overflow: hidden;
- -webkit-box-orient: horizontal;
- -webkit-box-direction: normal;
- -webkit-flex-direction: row;
- -ms-flex-direction: row;
- flex-direction: row; }
-
-@media screen and (max-width: 544px) {
- #outer {
- display: block;
- overflow-y: scroll; } }
-
-#menu {
- -webkit-box-flex: 0;
- -webkit-flex: 0 0 15rem;
- -ms-flex: 0 0 15rem;
- flex: 0 0 15rem;
- background: #2bab5f; }
- #menu > * {
- display: block;
- text-decoration: none;
- padding: 0.6180469716rem 1rem;
- white-space: nowrap;
- word-wrap: normal;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none; }
- #menu #brand {
- color: white;
- background: #218248;
- font-size: 120%;
- text-align: center;
- position: relative;
- margin-bottom: 1rem; }
- @media screen and (max-width: 544px) {
- #menu #brand {
- background: #2bab5f;
- cursor: pointer; }
- #menu #brand:after {
- position: absolute;
- color: rgba(0, 0, 0, 0.2);
- right: 1rem;
- content: '>';
- top: 50%;
- font-size: 120%;
- font-weight: bold;
- -webkit-transform: translate(0, -50%) rotate(90deg);
- transform: translate(0, -50%) rotate(90deg); } }
- #menu.expanded #brand {
- background: #218248; }
- @media screen and (max-width: 544px) {
- #menu.expanded #brand:after {
- -webkit-transform: translate(0, -50%) rotate(-90deg);
- transform: translate(0, -50%) rotate(-90deg); } }
- #menu a {
- font-size: 130%;
- color: white;
- -webkit-transition: background-color 0.2s;
- transition: background-color 0.2s;
- text-shadow: 0 0 5px rgba(0, 0, 0, 0.4); }
- #menu a:hover, #menu a.selected {
- background: #1bd886;
- text-shadow: 0 0 5px rgba(0, 0, 0, 0.6); }
- #menu a.selected {
- position: relative;
- box-shadow: 0 0 5px rgba(0, 0, 0, 0.5); }
- #menu a:before {
- content: "▸";
- padding-right: .5rem;
- position: relative;
- top: -0.1rem; }
- @media screen and (max-width: 544px) {
- #menu a {
- display: none; } }
- #menu.expanded a {
- display: block; }
- @media screen and (min-width: 545px) and (max-width: 1000px) {
- #menu {
- -webkit-flex-basis: 10rem;
- -ms-flex-preferred-size: 10rem;
- flex-basis: 10rem; }
- #menu #brand {
- font-size: 95%;
- margin-bottom: 0.6180469716rem; }
- #menu a {
- font-size: 105%; }
- #menu > * {
- padding: 0.3819820591rem 0.6180469716rem; } }
-
-#content {
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- overflow-y: auto;
- padding: 1rem; }
- @media screen and (max-width: 544px) {
- #content {
- padding: 0.6180469716rem; } }
- #content a, #content a:visited, #content a:link {
- color: #5abfff;
- text-decoration: none; }
- #content a:hover {
- color: #5abfff;
- text-decoration: underline; }
- #content > * {
- margin-left: auto;
- margin-right: auto; }
- #content h1 {
- text-align: center;
- font-size: 2.2806973457em;
- margin-top: 0;
- margin-bottom: 1rem; }
- #content h2 {
- font-size: 1.423828125em;
- margin-bottom: 0.6180469716rem; }
- #content td, #content th {
- padding: 0.3819820591rem; }
- #content tbody th {
- text-align: right;
- width: 130px;
- color: white; }
-
-.Box {
- display: block;
- max-width: 900px;
- margin-top: 1rem;
- padding: 0.6180469716rem;
- border-radius: 3px;
- background-color: rgba(255, 255, 255, 0.07); }
- @media screen and (max-width: 544px) {
- .Box {
- margin-top: 0.6180469716rem; } }
- h1 + .Box {
- margin-top: 0; }
- .Box h2 {
- margin-top: 0; }
- .Box.wide {
- width: initial;
- max-width: initial; }
-
-.Modal {
- position: fixed;
- width: 100%;
- height: 100%;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center;
- -webkit-box-align: center;
- -webkit-align-items: center;
- -ms-flex-align: center;
- align-items: center;
- -webkit-transition: opacity .5s;
- transition: opacity .5s;
- background: rgba(0, 0, 0, 0.65);
- opacity: 0; }
- .Modal.visible {
- opacity: 1; }
- .Modal.hidden {
- display: none; }
-
-.Dialog {
- margin: 0.6180469716rem;
- padding: 1rem 0.6180469716rem;
- overflow: hidden;
- max-width: 100%;
- max-height: 100%;
- -webkit-box-flex: 0;
- -webkit-flex: 0 1 30rem;
- -ms-flex: 0 1 30rem;
- flex: 0 1 30rem;
- background: #1c1c1e;
- border-left: 6px solid #217b3a;
- border-right: 6px solid #217b3a;
- box-shadow: 0 0 2px 0 #434349, 0 0 6px 0 black;
- border-radius: 6px; }
-
-button, input[type="button"], input[type="reset"], input[type="submit"], a.button {
- text-align: center;
- cursor: pointer;
- display: inline-block;
- border-radius: 2px;
- padding: 0 0.6em;
- border: 0 none;
- outline: 0 none !important;
- line-height: 1.8em;
- font-size: 1.1em;
- margin-bottom: 3px;
- min-width: 5em;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* &::before {
- margin-right: .4em;
- }
-
- &.icononly::before {
- margin-right: 0;
- }*/
- text-shadow: 1.5px 1.5px 2px rgba(0, 0, 0, 0.8); }
- button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active, a.button:active {
- position: relative;
- top: 2px; }
- button.narrow, input[type="button"].narrow, input[type="reset"].narrow, input[type="submit"].narrow, a.button.narrow {
- min-width: initial; }
-
-input[type="submit"], .btn-green {
- background-color: #2ca94b;
- box-shadow: 0 3px 0 #1d7032;
- color: #FEFEFE; }
- input[type="submit"]:hover, input[type="submit"]:active, input[type="submit"].active, input[type="submit"].selected, .btn-green:hover, .btn-green:active, .btn-green.active, .btn-green.selected {
- background-color: #28ba5c;
- color: #FEFEFE; }
- input[type="submit"]:hover, input[type="submit"].selected, input[type="submit"].active, .btn-green:hover, .btn-green.selected, .btn-green.active {
- box-shadow: 0 3px 0 #1a773b; }
- input[type="submit"]:active, .btn-green:active {
- box-shadow: 0 1px 0 #1a773b; }
-
-input[type="reset"], .btn-red {
- background-color: #D04E51;
- box-shadow: 0 3px 0 #aa2d30;
- color: #FEFEFE; }
- input[type="reset"]:hover, input[type="reset"]:active, input[type="reset"].active, input[type="reset"].selected, .btn-red:hover, .btn-red:active, .btn-red.active, .btn-red.selected {
- background-color: #d4403f;
- color: #FEFEFE; }
- input[type="reset"]:hover, input[type="reset"].selected, input[type="reset"].active, .btn-red:hover, .btn-red.selected, .btn-red.active {
- box-shadow: 0 3px 0 #9e2423; }
- input[type="reset"]:active, .btn-red:active {
- box-shadow: 0 1px 0 #9e2423; }
-
-/*
-
-&[type="submit"],
-&.gray-green {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-green-fa, $btn-green-ba, darken($btn-green-ba, 16)
- )
-}
-
-&.gray-blue {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-blue-fa, $btn-blue-ba, darken($btn-blue-ba, 16)
- )
-}
-
-&.gray-red {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-red-fa, $btn-red-ba, darken($btn-red-ba, 16)
- )
-}
-
-&.gray-orange {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-orange-fa, $btn-orange-ba, darken($btn-orange-ba, 16)
- )
-}
-
-// No change on hover - to be used for disabled buttons
-&.gray-gray {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-gray-f, $btn-gray-b, $btn-gray-l
- )
-}
-
-*/
-button, input[type="button"], input[type="reset"], input[type="submit"], a.button {
- text-align: center;
- cursor: pointer;
- display: inline-block;
- border-radius: 2px;
- padding: 0 0.6em;
- border: 0 none;
- outline: 0 none !important;
- line-height: 1.8em;
- font-size: 1.1em;
- margin-bottom: 3px;
- min-width: 5em;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- /* &::before {
- margin-right: .4em;
- }
-
- &.icononly::before {
- margin-right: 0;
- }*/
- text-shadow: 1.5px 1.5px 2px rgba(0, 0, 0, 0.8); }
- button:active, input[type="button"]:active, input[type="reset"]:active, input[type="submit"]:active, a.button:active {
- position: relative;
- top: 2px; }
- button.narrow, input[type="button"].narrow, input[type="reset"].narrow, input[type="submit"].narrow, a.button.narrow {
- min-width: initial; }
-
-input[type="submit"], .btn-green {
- background-color: #2ca94b;
- box-shadow: 0 3px 0 #1d7032;
- color: #FEFEFE; }
- input[type="submit"]:hover, input[type="submit"]:active, input[type="submit"].active, input[type="submit"].selected, .btn-green:hover, .btn-green:active, .btn-green.active, .btn-green.selected {
- background-color: #28ba5c;
- color: #FEFEFE; }
- input[type="submit"]:hover, input[type="submit"].selected, input[type="submit"].active, .btn-green:hover, .btn-green.selected, .btn-green.active {
- box-shadow: 0 3px 0 #1a773b; }
- input[type="submit"]:active, .btn-green:active {
- box-shadow: 0 1px 0 #1a773b; }
-
-input[type="reset"], .btn-red {
- background-color: #D04E51;
- box-shadow: 0 3px 0 #aa2d30;
- color: #FEFEFE; }
- input[type="reset"]:hover, input[type="reset"]:active, input[type="reset"].active, input[type="reset"].selected, .btn-red:hover, .btn-red:active, .btn-red.active, .btn-red.selected {
- background-color: #d4403f;
- color: #FEFEFE; }
- input[type="reset"]:hover, input[type="reset"].selected, input[type="reset"].active, .btn-red:hover, .btn-red.selected, .btn-red.active {
- box-shadow: 0 3px 0 #9e2423; }
- input[type="reset"]:active, .btn-red:active {
- box-shadow: 0 1px 0 #9e2423; }
-
-/*
-
-&[type="submit"],
-&.gray-green {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-green-fa, $btn-green-ba, darken($btn-green-ba, 16)
- )
-}
-
-&.gray-blue {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-blue-fa, $btn-blue-ba, darken($btn-blue-ba, 16)
- )
-}
-
-&.gray-red {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-red-fa, $btn-red-ba, darken($btn-red-ba, 16)
- )
-}
-
-&.gray-orange {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-orange-fa, $btn-orange-ba, darken($btn-orange-ba, 16)
- )
-}
-
-// No change on hover - to be used for disabled buttons
-&.gray-gray {
- @include fancy-btn-colors-full(
- $btn-gray-f, $btn-gray-b, $btn-gray-l,
- $btn-gray-f, $btn-gray-b, $btn-gray-l
- )
-}
-
-*/
-input[type="number"], input[type="password"], input[type="text"], textarea, select {
- border: 0 none;
- border-bottom: 2px solid #217b3a;
- background-color: #303030;
- color: white;
- padding: 6px;
- line-height: 1em;
- outline: 0 none !important;
- -moz-outline: 0 none !important;
- font-weight: normal; }
- input[type="number"]:focus, input[type="number"]:hover, input[type="password"]:focus, input[type="password"]:hover, input[type="text"]:focus, input[type="text"]:hover, textarea:focus, textarea:hover, select:focus, select:hover {
- border-bottom-color: #28bc65; }
-
-input[type="number"], input[type="password"], input[type="text"], textarea {
- -webkit-user-select: text;
- -khtml-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- user-select: text;
- cursor: text; }
-
-textarea {
- font-family: monospace;
- line-height: 1.2em;
- display: block; }
-
-@media screen and (-webkit-min-device-pixel-ratio: 0) {
- select {
- padding-right: 18px; } }
-
-select {
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- cursor: pointer;
- line-height: 1.4em;
- padding: 3.5px;
- padding-right: 1em; }
- select:-moz-focusring {
- color: transparent;
- text-shadow: 0 0 0 white; }
- select option {
- background: #303030; }
-
-label.select-wrap {
- position: relative;
- display: inline !important;
- margin: 0 !important;
- padding: 0 !important;
- width: auto !important; }
- label.select-wrap:after {
- content: '<>';
- /* will be rotated */
- font-family: "Consolas", monospace;
- font-weight: bold;
- color: #28bc65;
- top: 50%;
- -webkit-transform: translate(0, -50%) rotate(90deg);
- transform: translate(0, -50%) rotate(90deg);
- right: 2px;
- position: absolute;
- z-index: 100;
- pointer-events: none; }
-
-form {
- border: 0 none;
- margin: 0;
- padding: 0;
- text-decoration: none; }
-
-input[type="number"], input[type="password"], input[type="text"], textarea, select, label.select-wrap {
- width: 250px; }
-
-form .Row {
- vertical-align: middle;
- margin: 14px auto;
- text-align: left;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-orient: horizontal;
- -webkit-box-direction: normal;
- -webkit-flex-direction: row;
- -ms-flex-direction: row;
- flex-direction: row; }
- form .Row:first-child {
- margin-top: 0; }
- form .Row:last-child {
- margin-bottom: 0; }
- form .Row .spacer {
- width: 130px; }
- @media screen and (max-width: 544px) {
- form .Row .spacer {
- display: none; } }
- form .Row.buttons input, form .Row.buttons .button {
- margin-right: 0.6180469716rem; }
- form .Row.centered {
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center; }
- form .Row.message {
- font-size: 1em;
- text-shadow: 1px 1px 3px black;
- text-align: center; }
- form .Row.message.error {
- color: crimson; }
- form .Row.message.ok {
- color: #0fe851; }
- form .Row.separator {
- padding-top: 14px;
- border-top: 2px solid rgba(255, 255, 255, 0.1); }
- form .Row textarea {
- display: inline-block;
- vertical-align: top;
- min-height: 10rem;
- -webkit-box-flex: 1;
- -webkit-flex-grow: 1;
- -ms-flex-positive: 1;
- flex-grow: 1;
- resize: vertical; }
- form .Row label {
- font-weight: bold;
- color: white;
- display: inline-block;
- width: 130px;
- text-align: right;
- text-shadow: 1px 1px 3px black;
- padding: 8px;
- -webkit-align-self: flex-start;
- -ms-flex-item-align: start;
- align-self: flex-start;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none; }
- form .Row .checkbox-wrap {
- display: inline-block;
- width: 130px;
- padding: 8px;
- text-align: right;
- -webkit-align-self: flex-start;
- -ms-flex-item-align: start;
- align-self: flex-start; }
- form .Row .checkbox-wrap input[type=checkbox] {
- margin: auto;
- width: auto;
- height: auto; }
- form .Row .checkbox-wrap + label {
- width: 250px;
- padding-left: 0;
- text-align: left;
- cursor: pointer; }
- @media screen and (max-width: 544px) {
- form .Row {
- -webkit-box-orient: vertical;
- -webkit-box-direction: normal;
- -webkit-flex-direction: column;
- -ms-flex-direction: column;
- flex-direction: column; }
- form .Row.buttons, form .Row.centered {
- -webkit-box-orient: horizontal;
- -webkit-box-direction: normal;
- -webkit-flex-direction: row;
- -ms-flex-direction: row;
- flex-direction: row; }
- form .Row.buttons {
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- -ms-flex-pack: center;
- justify-content: center; }
- form .Row.buttons :last-child {
- margin-right: 0; }
- form .Row label {
- padding-left: 0;
- text-align: left;
- width: auto; }
- form .Row .checkbox-wrap {
- -webkit-box-ordinal-group: 2;
- -webkit-order: 1;
- -ms-flex-order: 1;
- order: 1;
- text-align: left;
- padding-bottom: 0;
- border-radius: .4px;
- width: auto; }
- form .Row .checkbox-wrap + label {
- width: auto; }
- form .Row input[type="number"], form .Row input[type="password"], form .Row input[type="text"], form .Row textarea, form .Row textarea {
- width: 100%; } }
-
-form span.required {
- color: red; }
-
-.RadioGroup {
- display: inline-block;
- line-height: 1.5em;
- vertical-align: middle; }
- .RadioGroup label {
- width: auto;
- text-align: left;
- cursor: pointer;
- font-weight: normal; }
- .RadioGroup input[type="radio"] {
- vertical-align: middle;
- margin: 0 0 0 5px; }
-
-@media screen and (-webkit-min-device-pixel-ratio: 0) {
- select {
- padding-right: 18px; } }
-
-select {
- -webkit-appearance: none;
- -moz-appearance: none;
- appearance: none;
- cursor: pointer;
- line-height: 1.4em;
- padding: 3.5px;
- padding-right: 1em; }
- select:-moz-focusring {
- color: transparent;
- text-shadow: 0 0 0 white; }
- select option {
- background: #303030; }
-
-label.select-wrap {
- position: relative;
- display: inline !important;
- margin: 0 !important;
- padding: 0 !important;
- width: auto !important; }
- label.select-wrap:after {
- content: '<>';
- /* will be rotated */
- font-family: "Consolas", monospace;
- font-weight: bold;
- color: #28bc65;
- top: 50%;
- -webkit-transform: translate(0, -50%) rotate(90deg);
- transform: translate(0, -50%) rotate(90deg);
- right: 2px;
- position: absolute;
- z-index: 100;
- pointer-events: none; }
-
-#ap-list {
- -webkit-column-count: 3;
- -moz-column-count: 3;
- column-count: 3;
- -webkit-column-gap: 0;
- -moz-column-gap: 0;
- column-gap: 0;
- margin: 0 -0.2360828548rem; }
- @media screen and (min-width: 545px) and (max-width: 1000px) {
- #ap-list {
- -webkit-column-count: 2;
- -moz-column-count: 2;
- column-count: 2; } }
- @media screen and (max-width: 544px) {
- #ap-list {
- -webkit-column-count: 1;
- -moz-column-count: 1;
- column-count: 1; } }
-
-#ap-loader {
- background: rgba(255, 255, 255, 0.1);
- border-radius: 5px;
- padding: 0.3819820591rem;
- margin-bottom: 0.3819820591rem; }
-
-#ap-box {
- padding-bottom: 0.3819820591rem; }
-
-#psk-modal form {
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex;
- -webkit-box-align: center;
- -webkit-align-items: center;
- -ms-flex-align: center;
- align-items: center;
- margin: 0.3819820591rem; }
- #psk-modal form > * {
- margin-left: 0.3819820591rem;
- margin-right: 0.3819820591rem; }
- #psk-modal form > *:first-child {
- margin-left: 0; }
- #psk-modal form > *:last-child {
- margin-right: 0; }
- #psk-modal form input[type=password] {
- min-width: 5rem; }
-
-.AP {
- -webkit-column-break-inside: avoid;
- page-break-inside: avoid;
- break-inside: avoid-column;
- max-width: 500px;
- padding: 0.2360828548rem; }
- .AP.selected .inner {
- background: #43de81 !important;
- cursor: default;
- top: 0 !important; }
- .AP .inner {
- cursor: pointer;
- -webkit-user-select: none;
- -khtml-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- position: relative;
- border-radius: 3px;
- color: #222;
- background: #afafaf;
- -webkit-transition: background-color 0.5s;
- transition: background-color 0.5s;
- display: -webkit-box;
- display: -webkit-flex;
- display: -ms-flexbox;
- display: flex; }
- .AP .inner:active {
- left: 0;
- top: 1px; }
- .AP .inner:hover {
- background: white; }
- .AP .inner > * {
- padding: 0.6180469716rem;
- white-space: nowrap;
- word-wrap: normal; }
- .AP .inner .rssi {
- min-width: 2rem;
- -webkit-box-flex: 0;
- -webkit-flex: 0 0 15%;
- -ms-flex: 0 0 15%;
- flex: 0 0 15%;
- text-align: right; }
- .AP .inner .rssi:after {
- padding-left: 0.090179415rem;
- content: '%';
- font-size: 0.8888888889em; }
- .AP .inner .essid {
- -webkit-box-flex: 1;
- -webkit-flex: 1 1 70%;
- -ms-flex: 1 1 70%;
- flex: 1 1 70%;
- min-width: 0;
- text-overflow: ellipsis;
- overflow: hidden;
- font-weight: bold; }
- .AP .inner .auth {
- -webkit-box-flex: 0;
- -webkit-flex: 0 0 15%;
- -ms-flex: 0 0 15%;
- flex: 0 0 15%; }
-
-.page-home #rssi-perc:after {
- padding-left: 0.1459102934rem;
- content: '%';
- font-size: 0.8888888889em; }
-
-.page-home #rssi-dbm:after {
- padding-left: 0.1459102934rem;
- content: 'dBm';
- font-size: 0.8888888889em; }
-
-/*# sourceMappingURL=app.css.map */
+*,:after,:before{box-sizing:border-box}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}figure,nav{display:block}canvas,progress{display:inline-block;vertical-align:baseline}[hidden]{display:none}a{background-color:transparent}a:active,a:hover{outline:0}b{font-weight:700}h1,h2{font-size:2em;margin:.67em 0}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,pre{font-family:monospace;font-size:1em}button,input,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}legend{border:0;padding:0}textarea{overflow:auto}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}.ct-axis-title,.ct-label{fill:hsla(0,0%,100%,.8)}.ct-label{color:hsla(0,0%,100%,.8);font-size:.75rem;line-height:1}.ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left;text-anchor:start;transform:translate(-4px) rotate(45deg)}.ct-label.ct-vertical.ct-start{align-items:flex-end;justify-content:flex-end;text-align:right;text-anchor:end;transform:translateY(20%)}.ct-label.ct-vertical.ct-end{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:flex}.ct-chart-bar .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{align-items:center;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{align-items:center;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:hsla(0,0%,100%,.3);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:4px;stroke-linecap:round}.ct-line{fill:none;stroke-width:2px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point{stroke:#f05b4f}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#f05b4f}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point{stroke:#6188e2}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#6188e2}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point{stroke:#59922b}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#59922b}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point{stroke:#eacf7d}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#eacf7d}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point{stroke:#a748ca}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#a748ca}.ct-wide{display:block;position:relative;width:100%}.ct-wide:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-wide:after{content:"";display:table;clear:both}.ct-wide>svg{display:block;position:absolute;top:0;left:0}.ct-narrow{display:block;position:relative;width:100%}.ct-narrow:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-narrow:after{content:"";display:table;clear:both}.ct-narrow>svg{display:block;position:absolute;top:0;left:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.center{text-align:center}html{font-family:Arial,sans-serif;color:#d0d0d0;background:#131315}body,html{border:0 none;margin:0;padding:0;text-decoration:none;width:100%;height:100%;overflow:hidden}a,a:link,a:visited{color:#5abfff;text-decoration:none}a:hover{color:#5abfff;text-decoration:underline}#outer{display:flex;position:absolute;width:100%;height:100%;left:0;right:0;top:0;bottom:0;overflow:hidden;flex-direction:row}@media screen and (max-width:544px){#outer{display:block;overflow-y:scroll}}#menu{flex:0 0 15rem;background:#2bab5f}#menu>*{display:block;text-decoration:none;padding:.6180469716rem 1rem;white-space:nowrap;word-wrap:normal;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}#menu #brand{color:#fff;background:#218248;font-size:120%;text-align:center;position:relative;margin-bottom:1rem}@media screen and (max-width:544px){#menu #brand{background:#2bab5f;cursor:pointer}#menu #brand:after{position:absolute;color:rgba(0,0,0,.2);right:1rem;content:'>';top:50%;font-size:120%;font-weight:700;transform:translateY(-50%) rotate(90deg)}}#menu.expanded #brand{background:#218248}@media screen and (max-width:544px){#menu.expanded #brand:after{transform:translateY(-50%) rotate(-90deg)}}#menu a{font-size:130%;color:#fff;transition:background-color .2s;text-shadow:0 0 5px rgba(0,0,0,.4)}#menu a.selected,#menu a:hover{background:#1bd886;text-shadow:0 0 5px rgba(0,0,0,.6)}#menu a.selected{position:relative;box-shadow:0 0 5px rgba(0,0,0,.5)}#menu a:before{content:"▸";padding-right:.5rem;position:relative;top:-.1rem}@media screen and (max-width:544px){#menu a{display:none}}#menu.expanded a{display:block}@media screen and (min-width:545px) and (max-width:1000px){#menu{flex-basis:10rem}#menu #brand{font-size:95%;margin-bottom:.6180469716rem}#menu a{font-size:105%}#menu>*{padding:.3819820591rem .6180469716rem}}#content{flex-grow:1;overflow-y:auto;padding:1rem}@media screen and (max-width:544px){#content{padding:.6180469716rem}}#content>*{margin-left:auto;margin-right:auto}#content h1{text-align:center;font-size:2.2806973457em;margin-top:0;margin-bottom:1rem}#content h2{font-size:1.423828125em;margin-bottom:.6180469716rem}#content td,#content th{padding:.3819820591rem}#content tbody th{text-align:right;width:130px;color:#fff}.Box{display:block;max-width:900px;margin-top:1rem;padding:.6180469716rem;border-radius:3px;background-color:hsla(0,0%,100%,.07)}@media screen and (max-width:544px){.Box{margin-top:.6180469716rem}}.Box h2,h1+.Box{margin-top:0}.Box.wide{width:initial;max-width:initial}.Box.medium{max-width:1200px}.Modal{position:fixed;width:100%;height:100%;left:0;top:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;transition:opacity .5s;background:rgba(0,0,0,.65);opacity:0}.Modal.visible{opacity:1}.Modal.hidden{display:none}.Dialog{margin:.6180469716rem;padding:1rem .6180469716rem;overflow:hidden;max-width:100%;max-height:100%;flex:0 1 30rem;background:#1c1c1e;border-left:6px solid #217b3a;border-right:6px solid #217b3a;box-shadow:0 0 2px 0 #434349,0 0 6px 0 #000;border-radius:6px}.button,button,input[type=button],input[type=reset],input[type=submit]{text-align:center;cursor:pointer;display:inline-block;border-radius:2px;padding:0 .6em;border:0 none;outline:0 none!important;line-height:1.8em;font-size:1.1em;margin-bottom:3px;min-width:5em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-shadow:1.5px 1.5px 2px rgba(0,0,0,.8)}.button:active,button:active,input[type=button]:active,input[type=reset]:active,input[type=submit]:active{position:relative;top:2px}.button.narrow,button.narrow,input[type=button].narrow,input[type=reset].narrow,input[type=submit].narrow{min-width:initial}.btn-green,input[type=submit]{background-color:#2ca94b;box-shadow:0 3px 0 #1d7032;text-decoration:none!important}.btn-green,.btn-green:link,.btn-green:visited,input[type=submit],input[type=submit]:link,input[type=submit]:visited{color:#fefefe}.btn-green.active,.btn-green.selected,.btn-green:active,.btn-green:hover,input[type=submit].active,input[type=submit].selected,input[type=submit]:active,input[type=submit]:hover{background-color:#28ba5c;color:#fefefe}.btn-green.active,.btn-green.selected,.btn-green:hover,input[type=submit].active,input[type=submit].selected,input[type=submit]:hover{box-shadow:0 3px 0 #1a773b}.btn-green:active,input[type=submit]:active{box-shadow:0 1px 0 #1a773b}.btn-red,input[type=reset]{background-color:#d04e51;box-shadow:0 3px 0 #aa2d30;text-decoration:none!important}.btn-red,.btn-red:link,.btn-red:visited,input[type=reset],input[type=reset]:link,input[type=reset]:visited{color:#fefefe}.btn-red.active,.btn-red.selected,.btn-red:active,.btn-red:hover,input[type=reset].active,input[type=reset].selected,input[type=reset]:active,input[type=reset]:hover{background-color:#d4403f;color:#fefefe}.btn-red.active,.btn-red.selected,.btn-red:hover,input[type=reset].active,input[type=reset].selected,input[type=reset]:hover{box-shadow:0 3px 0 #9e2423}.btn-red:active,input[type=reset]:active{box-shadow:0 1px 0 #9e2423}input[type=number],input[type=password],input[type=text],select,textarea{border:0 none;border-bottom:2px solid #217b3a;background-color:#303030;color:#fff;padding:6px;line-height:1em;outline:0 none!important;-moz-outline:0 none!important;font-weight:400}input[type=number]:focus,input[type=number]:hover,input[type=password]:focus,input[type=password]:hover,input[type=text]:focus,input[type=text]:hover,select:focus,select:hover,textarea:focus,textarea:hover{border-bottom-color:#28bc65}input[type=number],input[type=password],input[type=text],textarea{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;cursor:text}textarea{font-family:monospace;line-height:1.2em;display:block}form{border:0 none;margin:0;padding:0;text-decoration:none}input[type=number],input[type=password],input[type=text],label.select-wrap,select,textarea{width:250px}form .Row{vertical-align:middle;margin:14px auto;text-align:left;display:flex;flex-direction:row}form .Row:first-child{margin-top:0}form .Row:last-child{margin-bottom:0}form .Row .spacer{width:130px}@media screen and (max-width:544px){form .Row .spacer{display:none}}form .Row.buttons .button,form .Row.buttons input{margin-right:.6180469716rem}form .Row.centered{justify-content:center}form .Row.message{font-size:1em;text-shadow:1px 1px 3px #000;text-align:center}form .Row.message.error{color:crimson}form .Row.message.ok{color:#0fe851}form .Row.separator{padding-top:14px;border-top:2px solid hsla(0,0%,100%,.1)}form .Row textarea{display:inline-block;vertical-align:top;min-height:10rem;flex-grow:1;resize:vertical}form .Row label{font-weight:700;color:#fff;text-shadow:1px 1px 3px #000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}form .Row .checkbox-wrap,form .Row label{display:inline-block;width:130px;text-align:right;padding:8px;align-self:flex-start}form .Row .checkbox-wrap input[type=checkbox]{margin:auto;width:auto;height:auto}form .Row .checkbox-wrap+label{width:250px;padding-left:0;text-align:left;cursor:pointer}@media screen and (max-width:544px){form .Row{flex-direction:column}form .Row.buttons,form .Row.centered{flex-direction:row}form .Row.buttons{justify-content:center}form .Row.buttons :last-child{margin-right:0}form .Row label{padding-left:0;text-align:left;width:auto}form .Row .checkbox-wrap{order:1;text-align:left;padding-bottom:0;border-radius:.4px;width:auto}form .Row .checkbox-wrap+label{width:auto}form .Row input[type=number],form .Row input[type=password],form .Row input[type=text],form .Row textarea{width:100%}}form span.required{color:red}.RadioGroup{display:inline-block;line-height:1.5em;vertical-align:middle}.RadioGroup label{width:auto;text-align:left;cursor:pointer;font-weight:400}.RadioGroup input[type=radio]{vertical-align:middle;margin:0 0 0 5px}@media screen and (-webkit-min-device-pixel-ratio:0){select{padding-right:18px}}select{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;line-height:1.4em;padding:3.5px;padding-right:1em}select:-moz-focusring{color:transparent;text-shadow:0 0 0 #fff}select option{background:#303030}label.select-wrap{position:relative;display:inline!important;margin:0!important;padding:0!important;width:auto!important}label.select-wrap:after{content:'<>';font-family:Consolas,monospace;font-weight:700;color:#28bc65;top:50%;transform:translateY(-50%) rotate(90deg);right:2px;position:absolute;z-index:100;pointer-events:none}#ap-list{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;margin:0 -.2360828548rem}@media screen and (min-width:545px) and (max-width:1000px){#ap-list{-webkit-column-count:2;-moz-column-count:2;column-count:2}}@media screen and (max-width:544px){#ap-list{-webkit-column-count:1;-moz-column-count:1;column-count:1}}#ap-loader{background:hsla(0,0%,100%,.1);border-radius:5px;padding:.3819820591rem;margin-bottom:.3819820591rem}#ap-box{padding-bottom:.3819820591rem}#psk-modal form{display:flex;align-items:center;margin:.3819820591rem}#psk-modal form>*{margin-left:.3819820591rem;margin-right:.3819820591rem}#psk-modal form>:first-child{margin-left:0}#psk-modal form>:last-child{margin-right:0}#psk-modal form input[type=password]{min-width:5rem}.AP{-webkit-column-break-inside:avoid;page-break-inside:avoid;break-inside:avoid-column;max-width:500px;padding:.2360828548rem}.AP.selected .inner{background:#43de81!important;cursor:default;top:0!important}.AP .inner{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;border-radius:3px;color:#222;background:#afafaf;transition:background-color .5s;display:flex}.AP .inner:active{left:0;top:1px}.AP .inner:hover{background:#fff}.AP .inner>*{padding:.6180469716rem;white-space:nowrap;word-wrap:normal}.AP .inner .rssi{min-width:2rem;flex:0 0 15%;text-align:right}.AP .inner .rssi:after{padding-left:.090179415rem;content:'%';font-size:.8888888889em}.AP .inner .essid{flex:1 1 70%;min-width:0;text-overflow:ellipsis;overflow:hidden;font-weight:700}.AP .inner .auth{flex:0 0 15%}.page-home #rssi-perc:after{padding-left:.1459102934rem;content:'%';font-size:.8888888889em}.page-home #rssi-dbm:after{padding-left:.1459102934rem;content:'dBm';font-size:.8888888889em}
\ No newline at end of file
diff --git a/html/js/all.js b/html/js/all.js
index 9a95112..e81136c 100644
--- a/html/js/all.js
+++ b/html/js/all.js
@@ -1,959 +1,2 @@
-function bool(x) {
- return (x === 1 || x === '1' || x === true || x === 'true');
-}
-
-/** html entities */
-function e(x) {
- return String(x)
- .replace(/&/g, '&')
- .replace(/"/g, '"')
- .replace(/'/g, ''')
- .replace(//g, '>');
-}
-
-/** Returns true if argument is array [] */
-function isArray(obj) {
- return Object.prototype.toString.call(obj) === '[object Array]';
-}
-
-/** Returns true if argument is object {} */
-function isObject(obj) {
- return Object.prototype.toString.call(obj) === '[object Object]';
-}
-
-/** escape a string to have no special meaning in regex */
-function regexEscape(s) {
- return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
-}
-
-/** Convert RSSI 0-255 to % */
-function rssiPerc(rssi) {
- var r = parseInt(rssi);
- if (r > -50) return 100; // 100%
- if (r < -100) return 0; // 0%
- return Math.round(2 * (r + 100)); // approximation
-}
-
-/** Perform a substitution in the given string.
- *
- * Arguments - array or list of replacements.
- * Arguments numeric keys will replace {0}, {1} etc.
- * Named keys also work, ie. {foo: "bar"} -> replaces {foo} with bar.
- *
- * Braces are added to keys if missing.
- *
- * @returns {String} result
- */
-String.prototype.format = function () {
- var out = this;
-
- var repl = arguments;
-
- if (arguments.length == 1 && (isArray(arguments[0]) || isObject(arguments[0]))) {
- repl = arguments[0];
- }
-
- for (var ph in repl) {
- if (repl.hasOwnProperty(ph)) {
- var ph_orig = ph;
-
- if (!ph.match(/^\{.*\}$/)) {
- ph = '{' + ph + '}';
- }
-
- // replace all occurrences
- var pattern = new RegExp(regexEscape(ph), "g");
- out = out.replace(pattern, repl[ph_orig]);
- }
- }
-
- return out;
-};
-
-/** Module for toggling a modal overlay */
-var modal = (function () {
- var modal = {};
-
- modal.show = function (sel) {
- var $m = $(sel);
- $m.removeClass('hidden visible');
- setTimeout(function () {
- $m.addClass('visible');
- }, 1);
- };
-
- modal.hide = function (sel) {
- var $m = $(sel);
- $m.removeClass('visible');
- setTimeout(function () {
- $m.addClass('hidden');
- }, 500); // transition time
- };
-
- modal.init = function () {
- // close modal by click outside the dialog
- $('.Modal').on('click', function () {
- modal.hide(this);
- });
-
- $('.Dialog').on('click', function (e) {
- e.stopImmediatePropagation();
- });
-
- // Hide all modals on esc
- $(window).on('keydown', function (e) {
- if (e.which == 27) {
- modal.hide('.Modal');
- }
- });
- };
-
- return modal;
-})();
-
-
-/** Wifi page */
-var wifi = (function () {
- var wifi = {};
- var authStr = ['Open', 'WEP', 'WPA', 'WPA2', 'WPA/WPA2'];
-
- /** Update display for received response */
- function onScan(resp, status) {
- if (status != 200) {
- // bad response
- rescan(5000); // wait 5sm then retry
- return;
- }
-
- resp = JSON.parse(resp);
-
- var done = !bool(resp.result.inProgress) && (resp.result.APs.length > 0);
- rescan(done ? 15000 : 1000);
- if (!done) return; // no redraw yet
-
- // clear the AP list
- var $list = $('#ap-list');
- // remove old APs
- $('.AP').remove();
-
- $list.toggle(done);
- $('#ap-loader').toggle(!done);
-
- // scan done
- resp.result.APs
- .sort(function (a, b) {
- return b.rssi - a.rssi
- })
- .forEach(function (ap) {
- ap.enc = parseInt(ap.enc);
-
- if (ap.enc > 4) return; // hide unsupported auths
-
- var item = document.createElement('div');
-
- var $item = $(item)
- .data('ssid', ap.essid)
- .data('pwd', ap.enc != 0)
- .addClass('AP');
-
- // mark current SSID
- if (ap.essid == wifi.current) {
- $item.addClass('selected');
- }
-
- var inner = document.createElement('div');
- var $inner = $(inner).addClass('inner')
- .htmlAppend(''.format(rssiPerc(ap.rssi)))
- .htmlAppend('{0}
'.format(e(ap.essid)))
- .htmlAppend('{0}
'.format(authStr[ap.enc]));
-
- $item.on('click', function () {
- var $th = $(this);
-
- // populate the form
- $('#conn-essid').val($th.data('ssid'));
- $('#conn-passwd').val(''); // clear
-
- if ($th.data('pwd')) {
- // this AP needs a password
- modal.show('#psk-modal');
- } else {
- $('#conn-form').submit();
- }
- });
-
-
- item.appendChild(inner);
- $list[0].appendChild(item);
- });
- }
-
- /** Ask the CGI what APs are visible (async) */
- function scanAPs() {
- $().get('/wifi/scan.cgi', onScan, true, true); // no cache, no jsonp
- }
-
- function rescan(time) {
- setTimeout(scanAPs, time);
- }
-
- /** Set up the WiFi page */
- wifi.init = function () {
- //var ap_json = {
- // "result": {
- // "inProgress": "0",
- // "APs": [
- // {"essid": "Chlivek", "bssid": "88:f7:c7:52:b3:99", "rssi": "204", "enc": "4", "channel": "1"},
- // {"essid": "TyNikdy", "bssid": "5c:f4:ab:0d:f1:1b", "rssi": "164", "enc": "3", "channel": "1"},
- // {"essid": "UPC5616805", "bssid": "08:95:2a:0c:84:3f", "rssi": "164", "enc": "4", "channel": "1"},
- // {"essid": "Sitovina", "bssid": "20:cf:30:98:cb:3a", "rssi": "166", "enc": "3", "channel": "1"},
- // {"essid": "Tramp", "bssid": "c4:e9:84:6f:6c:e0", "rssi": "170", "enc": "3", "channel": "2"},
- // {"essid": "KV2", "bssid": "4c:5e:0c:2c:84:9b", "rssi": "172", "enc": "3", "channel": "3"},
- // {"essid": "UPC373123", "bssid": "e8:40:f2:ae:0e:f4", "rssi": "164", "enc": "3", "channel": "1"},
- // {"essid": "www.podoli.org prazak", "bssid": "00:00:00:00:00:00", "rssi": "165", "enc": "0", "channel": "4"},
- // {"essid": "Medvjedov", "bssid": "00:00:00:00:00:00", "rssi": "181", "enc": "4", "channel": "6"},
- // {"essid": "MARIAN-PC", "bssid": "f8:d1:11:af:d7:72", "rssi": "175", "enc": "3", "channel": "6"},
- // {"essid": "UPC3226244", "bssid": "64:7c:34:9a:6f:7c", "rssi": "169", "enc": "4", "channel": "6"},
- // {"essid": "molly", "bssid": "00:00:00:00:00:00", "rssi": "168", "enc": "3", "channel": "7"},
- // {"essid": "UPC2607759", "bssid": "88:f7:c7:4e:c1:b2", "rssi": "164", "enc": "4", "channel": "8"},
- // {"essid": "blondyna", "bssid": "98:fc:11:bd:0f:b8", "rssi": "166", "enc": "4", "channel": "9"},
- // {"essid": "UPC246587811", "bssid": "80:f5:03:20:6c:85", "rssi": "171", "enc": "3", "channel": "11"},
- // {"essid": "UPC930648", "bssid": "4c:72:b9:50:6d:38", "rssi": "167", "enc": "3", "channel": "11"},
- // {"essid": "PRAHA4.NET-R21-2", "bssid": "00:00:00:00:00:00", "rssi": "173", "enc": "0", "channel": "12"},
- // {"essid": "Internet_B0", "bssid": "5c:f4:ab:11:3b:b3", "rssi": "166", "enc": "3", "channel": "13"}
- // ]
- // }
- //};
-
- //onScan(ap_json, 200);
- scanAPs();
- };
-
- return wifi;
-})();
-
-
-/** Global generic init */
-function initDef() {
- // loader dots...
- setInterval(function () {
- $('.anim-dots').each(function (x) {
- var $x = $(x);
- var dots = $x.html() + '.';
- if (dots.length == 5) dots = '.';
- $x.html(dots);
- });
- }, 1000);
-
- modal.init();
-}
-
-/*!chibi 3.0.7, Copyright 2012-2016 Kyle Barrow, released under MIT license */
-(function () {
- 'use strict';
-
- var readyfn = [],
- loadedfn = [],
- domready = false,
- pageloaded = false,
- jsonpcount = 0,
- d = document,
- w = window;
-
- // Fire any function calls on ready event
- function fireReady() {
- var i;
- domready = true;
- for (i = 0; i < readyfn.length; i += 1) {
- readyfn[i]();
- }
- readyfn = [];
- }
-
- // Fire any function calls on loaded event
- function fireLoaded() {
- var i;
- pageloaded = true;
- // For browsers with no DOM loaded support
- if (!domready) {
- fireReady();
- }
- for (i = 0; i < loadedfn.length; i += 1) {
- loadedfn[i]();
- }
- loadedfn = [];
- }
-
- // Check DOM ready, page loaded
- if (d.addEventListener) {
- // Standards
- d.addEventListener('DOMContentLoaded', fireReady, false);
- w.addEventListener('load', fireLoaded, false);
- } else if (d.attachEvent) {
- // IE
- d.attachEvent('onreadystatechange', fireReady);
- // IE < 9
- w.attachEvent('onload', fireLoaded);
- } else {
- // Anything else
- w.onload = fireLoaded;
- }
-
- // Utility functions
-
- // Loop through node array
- function nodeLoop(fn, nodes) {
- var i;
- // Good idea to walk up the DOM
- for (i = nodes.length - 1; i >= 0; i -= 1) {
- fn(nodes[i]);
- }
- }
-
- // Convert to camel case
- function cssCamel(property) {
- return property.replace(/-\w/g, function (result) {return result.charAt(1).toUpperCase(); });
- }
-
- // Get computed style
- function computeStyle(elm, property) {
- // IE, everything else or null
- return (elm.currentStyle) ? elm.currentStyle[cssCamel(property)] : (w.getComputedStyle) ? w.getComputedStyle(elm, null).getPropertyValue(property) : null;
-
- }
-
- // Returns URI encoded query string pair
- function queryPair(name, value) {
- return encodeURIComponent(name).replace(/%20/g, '+') + '=' + encodeURIComponent(value).replace(/%20/g, '+');
- }
-
- // Set CSS, important to wrap in try to prevent error thown on unsupported property
- function setCss(elm, property, value) {
- try {
- elm.style[cssCamel(property)] = value;
- } catch (e) {}
- }
-
- // Show CSS
- function showCss(elm) {
- elm.style.display = '';
- // For elements still hidden by style block
- if (computeStyle(elm, 'display') === 'none') {
- elm.style.display = 'block';
- }
- }
-
- // Serialize form & JSON values
- function serializeData(nodes) {
- var querystring = '', subelm, i, j;
- if (nodes.constructor === Object) { // Serialize JSON data
- for (subelm in nodes) {
- if (nodes.hasOwnProperty(subelm)) {
- if (nodes[subelm].constructor === Array) {
- for (i = 0; i < nodes[subelm].length; i += 1) {
- querystring += '&' + queryPair(subelm, nodes[subelm][i]);
- }
- } else {
- querystring += '&' + queryPair(subelm, nodes[subelm]);
- }
- }
- }
- } else { // Serialize node data
- nodeLoop(function (elm) {
- if (elm.nodeName === 'FORM') {
- for (i = 0; i < elm.elements.length; i += 1) {
- subelm = elm.elements[i];
-
- if (!subelm.disabled) {
- switch (subelm.type) {
- // Ignore buttons, unsupported XHR 1 form fields
- case 'button':
- case 'image':
- case 'file':
- case 'submit':
- case 'reset':
- break;
-
- case 'select-one':
- if (subelm.length > 0) {
- querystring += '&' + queryPair(subelm.name, subelm.value);
- }
- break;
-
- case 'select-multiple':
- for (j = 0; j < subelm.length; j += 1) {
- if (subelm[j].selected) {
- querystring += '&' + queryPair(subelm.name, subelm[j].value);
- }
- }
- break;
-
- case 'checkbox':
- case 'radio':
- if (subelm.checked) {
- querystring += '&' + queryPair(subelm.name, subelm.value);
- }
- break;
-
- // Everything else including shinny new HTML5 input types
- default:
- querystring += '&' + queryPair(subelm.name, subelm.value);
- }
- }
- }
- }
- }, nodes);
- }
- // Tidy up first &
- return (querystring.length > 0) ? querystring.substring(1) : '';
- }
-
- // Class helper
- function classHelper(classes, action, nodes) {
- var classarray, search, i, has = false;
- if (classes) {
- // Trim any whitespace
- classarray = classes.split(/\s+/);
- nodeLoop(function (elm) {
- for (i = 0; i < classarray.length; i += 1) {
- search = new RegExp('\\b' + classarray[i] + '\\b', 'g');
- if (action === 'remove') {
- elm.className = elm.className.replace(search, '');
- } else if (action === 'toggle') {
- elm.className = (elm.className.match(search)) ? elm.className.replace(search, '') : elm.className + ' ' + classarray[i];
- } else if (action === 'has') {
- if (elm.className.match(search)) {
- has = true;
- break;
- }
- }
- }
- }, nodes);
- }
- return has;
- }
-
- // HTML insertion helper
- function insertHtml(value, position, nodes) {
- var tmpnodes, tmpnode;
- if (value) {
- nodeLoop(function (elm) {
- // No insertAdjacentHTML support for FF < 8 and IE doesn't allow insertAdjacentHTML table manipulation, so use this instead
- // Convert string to node. We can't innerHTML on a document fragment
- tmpnodes = d.createElement('div');
- tmpnodes.innerHTML = value;
- while ((tmpnode = tmpnodes.lastChild) !== null) {
- // Catch error in unlikely case elm has been removed
- try {
- if (position === 'before') {
- elm.parentNode.insertBefore(tmpnode, elm);
- } else if (position === 'after') {
- elm.parentNode.insertBefore(tmpnode, elm.nextSibling);
- } else if (position === 'append') {
- elm.appendChild(tmpnode);
- } else if (position === 'prepend') {
- elm.insertBefore(tmpnode, elm.firstChild);
- }
- } catch (e) {break; }
- }
- }, nodes);
- }
- }
-
- // Get nodes and return chibi
- function chibi(selector) {
- var cb, nodes = [], json = false, nodelist, i;
-
- if (selector) {
-
- // Element node, would prefer to use (selector instanceof HTMLElement) but no IE support
- if (selector.nodeType && selector.nodeType === 1) {
- nodes = [selector]; // return element as node list
- } else if (typeof selector === 'object') {
- // JSON, document object or node list, would prefer to use (selector instanceof NodeList) but no IE support
- json = (typeof selector.length !== 'number');
- nodes = selector;
- } else if (typeof selector === 'string') {
-
- // A very light querySelectorAll polyfill for IE < 8. It suits my needs but is restricted to IE CSS support, is no speed demon, and does leave older mobile browsers in the cold (that support neither querySelectorAll nor currentStyle/getComputedStyle). If you want to use a fuller featured selector engine like Qwery, Sizzle et al, just return results to the nodes array: nodes = altselectorengine(selector)
-
- // IE < 8
- if (!d.querySelectorAll) {
- // Polyfill querySelectorAll
- d.querySelectorAll = function (selector) {
-
- var style, head = d.getElementsByTagName('head')[0], allnodes, selectednodes = [], i;
-
- style = d.createElement('STYLE');
- style.type = 'text/css';
-
- if (style.styleSheet) {
- style.styleSheet.cssText = selector + ' {a:b}';
-
- head.appendChild(style);
-
- allnodes = d.getElementsByTagName('*');
-
- for (i = 0; i < allnodes.length; i += 1) {
- if (computeStyle(allnodes[i], 'a') === 'b') {
- selectednodes.push(allnodes[i]);
- }
- }
-
- head.removeChild(style);
- }
-
- return selectednodes;
- };
- }
-
- nodelist = d.querySelectorAll(selector);
-
- // Convert node list to array so results have full access to array methods
- // Array.prototype.slice.call not supported in IE < 9 and often slower than loop anyway
- for (i = 0; i < nodelist.length; i += 1) {
- nodes[i] = nodelist[i];
- }
-
- }
- }
-
- // Only attach nodes if not JSON
- cb = json ? {} : nodes;
-
- // Public functions
-
- // Fire on DOM ready
- cb.ready = function (fn) {
- if (fn) {
- if (domready) {
- fn();
- return cb;
- } else {
- readyfn.push(fn);
- }
- }
- };
- // Fire on page loaded
- cb.loaded = function (fn) {
- if (fn) {
- if (pageloaded) {
- fn();
- return cb;
- } else {
- loadedfn.push(fn);
- }
- }
- };
- // Executes a function on nodes
- cb.each = function (fn) {
- if (typeof fn === 'function') {
- nodeLoop(function (elm) {
- // <= IE 8 loses scope so need to apply
- return fn.apply(elm, arguments);
- }, nodes);
- }
- return cb;
- };
- // Find first
- cb.first = function () {
- return chibi(nodes.shift());
- };
- // Find last
- cb.last = function () {
- return chibi(nodes.pop());
- };
- // Find odd
- cb.odd = function () {
- var odds = [], i;
- for (i = 0; i < nodes.length; i += 2) {
- odds.push(nodes[i]);
- }
- return chibi(odds);
- };
- // Find even
- cb.even = function () {
- var evens = [], i;
- for (i = 1; i < nodes.length; i += 2) {
- evens.push(nodes[i]);
- }
- return chibi(evens);
- };
- // Hide node
- cb.hide = function () {
- nodeLoop(function (elm) {
- elm.style.display = 'none';
- }, nodes);
- return cb;
- };
- // Show node
- cb.show = function () {
- nodeLoop(function (elm) {
- showCss(elm);
- }, nodes);
- return cb;
- };
- // Toggle node display
- cb.toggle = function (state) {
- if (typeof state != 'undefined') { // ADDED
- if(state)
- cb.show();
- else
- cb.hide();
- } else {
- nodeLoop(function (elm) {
- // computeStyle instead of style.display == 'none' catches elements that are hidden via style block
- if (computeStyle(elm, 'display') === 'none') {
- showCss(elm);
- } else {
- elm.style.display = 'none';
- }
-
- }, nodes);
- }
- return cb;
- };
- // Remove node
- cb.remove = function () {
- nodeLoop(function (elm) {
- // Catch error in unlikely case elm has been removed
- try {
- elm.parentNode.removeChild(elm);
- } catch (e) {}
- }, nodes);
- return chibi();
- };
- // Get/Set CSS
- cb.css = function (property, value) {
- if (property) {
- if (value || value === '') {
- nodeLoop(function (elm) {
- setCss(elm, property, value);
- }, nodes);
- return cb;
- }
- if (nodes[0]) {
- if (nodes[0].style[cssCamel(property)]) {
- return nodes[0].style[cssCamel(property)];
- }
- if (computeStyle(nodes[0], property)) {
- return computeStyle(nodes[0], property);
- }
- }
- }
- };
- // Get class(es)
- cb.getClass = function () {
- if (nodes[0] && nodes[0].className.length > 0) {
- // Weak IE trim support
- return nodes[0].className.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '').replace(/\s+/,' ');
- }
- };
- // Set (replaces) classes
- cb.setClass = function (classes) {
- if (classes || classes === '') {
- nodeLoop(function (elm) {
- elm.className = classes;
- }, nodes);
- }
- return cb;
- };
- // Add class
- cb.addClass = function (classes) {
- if (classes) {
- nodeLoop(function (elm) {
- elm.className += ' ' + classes;
- }, nodes);
- }
- return cb;
- };
- // Remove class
- cb.removeClass = function (classes) {
- classHelper(classes, 'remove', nodes);
- return cb;
- };
- // Toggle class
- cb.toggleClass = function (classes) {
- classHelper(classes, 'toggle', nodes);
- return cb;
- };
- // Has class
- cb.hasClass = function (classes) {
- return classHelper(classes, 'has', nodes);
- };
- // Get/set HTML
- cb.html = function (value) {
- if (value || value === '') {
- nodeLoop(function (elm) {
- elm.innerHTML = value;
- }, nodes);
- return cb;
- }
- if (nodes[0]) {
- return nodes[0].innerHTML;
- }
- };
- // Insert HTML before selector
- cb.htmlBefore = function (value) {
- insertHtml(value, 'before', nodes);
- return cb;
- };
- // Insert HTML after selector
- cb.htmlAfter = function (value) {
- insertHtml(value, 'after', nodes);
- return cb;
- };
- // Insert HTML after selector innerHTML
- cb.htmlAppend = function (value) {
- insertHtml(value, 'append', nodes);
- return cb;
- };
- // Insert HTML before selector innerHTML
- cb.htmlPrepend = function (value) {
- insertHtml(value, 'prepend', nodes);
- return cb;
- };
- // Get/Set HTML attributes
- cb.attr = function (property, value) {
- if (property) {
- property = property.toLowerCase();
- // IE < 9 doesn't allow style or class via get/setAttribute so switch. cssText returns prettier CSS anyway
- if (typeof value !== 'undefined') {//FIXED BUG HERE
- nodeLoop(function (elm) {
- if (property === 'style') {
- elm.style.cssText = value;
- } else if (property === 'class') {
- elm.className = value;
- } else {
- elm.setAttribute(property, value);
- }
- }, nodes);
- return cb;
- }
- if (nodes[0]) {
- if (property === 'style') {
- if (nodes[0].style.cssText) {
- return nodes[0].style.cssText;
- }
- } else if (property === 'class') {
- if (nodes[0].className) {
- return nodes[0].className;
- }
- } else {
- if (nodes[0].getAttribute(property)) {
- return nodes[0].getAttribute(property);
- }
- }
- }
- }
- };
- // Get/Set HTML data property
- cb.data = function (key, value) {
- if (key) {
- return cb.attr('data-'+key, value);
- }
- };
- // Get/Set form element values
- cb.val = function (value) {
- var values, i, j;
- if (value || value === '') {
- nodeLoop(function (elm) {
- switch (elm.nodeName) {
- case 'SELECT':
- if (typeof value === 'string' || typeof value === 'number') {
- value = [value];
- }
- for (i = 0; i < elm.length; i += 1) {
- // Multiple select
- for (j = 0; j < value.length; j += 1) {
- elm[i].selected = '';
- if (elm[i].value === value[j]) {
- elm[i].selected = 'selected';
- break;
- }
- }
- }
- break;
- case 'INPUT':
- case 'TEXTAREA':
- case 'BUTTON':
- elm.value = value;
- break;
- }
- }, nodes);
-
- return cb;
- }
- if (nodes[0]) {
- switch (nodes[0].nodeName) {
- case 'SELECT':
- values = [];
- for (i = 0; i < nodes[0].length; i += 1) {
- if (nodes[0][i].selected) {
- values.push(nodes[0][i].value);
- }
- }
- return (values.length > 1) ? values : values[0];
- case 'INPUT':
- case 'TEXTAREA':
- case 'BUTTON':
- return nodes[0].value;
- }
- }
- };
- // Return matching checked checkbox or radios
- cb.checked = function (check) {
- if (typeof check === 'boolean') {
- nodeLoop(function (elm) {
- if (elm.nodeName === 'INPUT' && (elm.type === 'checkbox' || elm.type === 'radio')) {
- elm.checked = check;
- }
- }, nodes);
- return cb;
- }
- if (nodes[0] && nodes[0].nodeName === 'INPUT' && (nodes[0].type === 'checkbox' || nodes[0].type === 'radio')) {
- return (!!nodes[0].checked);
- }
- };
- // Add event handler
- cb.on = function (event, fn) {
- if (selector === w || selector === d) {
- nodes = [selector];
- }
- nodeLoop(function (elm) {
- if (d.addEventListener) {
- elm.addEventListener(event, fn, false);
- } else if (d.attachEvent) {
- // <= IE 8 loses scope so need to apply, we add this to object so we can detach later (can't detach anonymous functions)
- elm[event + fn] = function () { return fn.apply(elm, arguments); };
- elm.attachEvent('on' + event, elm[event + fn]);
- }
- }, nodes);
- return cb;
- };
- // Remove event handler
- cb.off = function (event, fn) {
- if (selector === w || selector === d) {
- nodes = [selector];
- }
- nodeLoop(function (elm) {
- if (d.addEventListener) {
- elm.removeEventListener(event, fn, false);
- } else if (d.attachEvent) {
- elm.detachEvent('on' + event, elm[event + fn]);
- // Tidy up
- elm[event + fn] = null;
- }
- }, nodes);
- return cb;
- };
- // Basic XHR 1, no file support. Shakes fist at IE
- cb.ajax = function (url, method, callback, nocache, nojsonp) {
- var xhr,
- query = serializeData(nodes),
- type = (method) ? method.toUpperCase() : 'GET',
- hostsearch = new RegExp('http[s]?://(.*?)/', 'gi'),
- domain = hostsearch.exec(url),
- timestamp = '_ts=' + (+new Date()),
- head = d.getElementsByTagName('head')[0],
- jsonpcallback = 'chibi' + (+new Date()) + (jsonpcount += 1),
- script;
-
- if (query && (type === 'GET' || type === 'DELETE')) {
- url += (url.indexOf('?') === -1) ? '?' + query : '&' + query;
- query = null;
- }
-
- // JSONP if cross domain url
- if (type === 'GET' && !nojsonp && domain && w.location.host !== domain[1]) {
-
- if (nocache) {
- url += (url.indexOf('?') === -1) ? '?' + timestamp : '&' + timestamp;
- }
-
- // Replace possible encoded ?
- url = url.replace('=%3F', '=?');
-
- // Replace jsonp ? with callback
- if (callback && url.indexOf('=?') !== -1) {
-
- url = url.replace('=?', '=' + jsonpcallback);
-
- w[jsonpcallback] = function (data) {
- try {
- callback(data, 200);
- } catch (e) {}
-
- // Tidy up
- w[jsonpcallback] = undefined;
- };
- }
-
- // JSONP
- script = document.createElement('script');
- script.async = true;
- script.src = url;
-
- // Tidy up
- script.onload = function () {
- head.removeChild(script);
- };
-
- head.appendChild(script);
-
- } else {
-
- if (w.XMLHttpRequest) {
- xhr = new XMLHttpRequest();
- } else if (w.ActiveXObject) {
- xhr = new ActiveXObject('Microsoft.XMLHTTP'); // IE < 9
- }
-
- if (xhr) {
-
- if (nocache) {
- url += (url.indexOf('?') === -1) ? '?' + timestamp : '&' + timestamp;
- }
-
- // Douglas Crockford: "Synchronous programming is disrespectful and should not be employed in applications which are used by people"
- xhr.open(type, url, true);
-
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- if (callback) {
- callback(xhr.responseText, xhr.status);
- }
- }
- };
-
- xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');
-
- if (type === 'POST' || type === 'PUT') {
- xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- }
-
- xhr.send(query);
-
- }
- }
- return cb;
- };
- // Alias to cb.ajax(url, 'get', callback, nocache, nojsonp)
- cb.get = function (url, callback, nocache, nojsonp) {
- return cb.ajax(url, 'get', callback, nocache, nojsonp);
- };
- // Alias to cb.ajax(url, 'post', callback, nocache)
- cb.post = function (url, callback, nocache) {
- return cb.ajax(url, 'post', callback, nocache);
- };
-
- return cb;
- }
-
- // Set Chibi's global namespace here ($)
- w.$ = chibi;
-
-}());
-
-//# sourceMappingURL=all.js.map
+function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function e(t){return String(t).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function isArray(t){return"[object Array]"===Object.prototype.toString.call(t)}function isObject(t){return"[object Object]"===Object.prototype.toString.call(t)}function regexEscape(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rssiPerc(t){var e=parseInt(t);return e>-50?100:-100>e?0:Math.round(2*(e+100))}!function(){"use strict";function t(){var t;for(p=!0,t=0;t=0;n-=1)t(e[n])}function i(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function r(t,e){return t.currentStyle?t.currentStyle[i(e)]:x.getComputedStyle?x.getComputedStyle(t,null).getPropertyValue(e):null}function s(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function a(t,e,n){try{t.style[i(e)]=n}catch(r){}}function o(t){t.style.display="","none"===r(t,"display")&&(t.style.display="block")}function c(t){var e,i,r,a="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(i=0;i0&&(a+="&"+s(e.name,e.value));break;case"select-multiple":for(r=0;r0?a.substring(1):""}function u(t,e,i){var r,s,a,o=!1;return t&&(r=t.split(/\s+/),n(function(t){for(a=0;a0?w[0].className.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"").replace(/\s+/," "):void 0},e.setClass=function(t){return(t||""===t)&&n(function(e){e.className=t},w),e},e.addClass=function(t){return t&&n(function(e){e.className+=" "+t},w),e},e.removeClass=function(t){return u(t,"remove",w),e},e.toggleClass=function(t){return u(t,"toggle",w),e},e.hasClass=function(t){return u(t,"has",w)},e.html=function(t){return t||""===t?(n(function(e){e.innerHTML=t},w),e):w[0]?w[0].innerHTML:void 0},e.htmlBefore=function(t){return l(t,"before",w),e},e.htmlAfter=function(t){return l(t,"after",w),e},e.htmlAppend=function(t){return l(t,"append",w),e},e.htmlPrepend=function(t){return l(t,"prepend",w),e},e.attr=function(t,i){if(t){if(t=t.toLowerCase(),"undefined"!=typeof i)return n(function(e){"style"===t?e.style.cssText=i:"class"===t?e.className=i:e.setAttribute(t,i)},w),e;if(w[0])if("style"===t){if(w[0].style.cssText)return w[0].style.cssText}else if("class"===t){if(w[0].className)return w[0].className}else if(w[0].getAttribute(t))return w[0].getAttribute(t)}},e.data=function(t,n){return t?e.attr("data-"+t,n):void 0},e.val=function(t){var i,r,s;if(t||""===t)return n(function(e){switch(e.nodeName){case"SELECT":for("string"!=typeof t&&"number"!=typeof t||(t=[t]),r=0;r1?i:i[0];case"INPUT":case"TEXTAREA":case"BUTTON":return w[0].value}},e.checked=function(t){return"boolean"==typeof t?(n(function(e){"INPUT"!==e.nodeName||"checkbox"!==e.type&&"radio"!==e.type||(e.checked=t)},w),e):!w[0]||"INPUT"!==w[0].nodeName||"checkbox"!==w[0].type&&"radio"!==w[0].type?void 0:!!w[0].checked},e.on=function(i,r){return t!==x&&t!==v||(w=[t]),n(function(t){v.addEventListener?t.addEventListener(i,r,!1):v.attachEvent&&(t[i+r]=function(){return r.apply(t,arguments)},t.attachEvent("on"+i,t[i+r]))},w),e},e.off=function(i,r){return t!==x&&t!==v||(w=[t]),n(function(t){v.addEventListener?t.removeEventListener(i,r,!1):v.attachEvent&&(t.detachEvent("on"+i,t[i+r]),t[i+r]=null)},w),e},e.ajax=function(t,n,i,r,s){var a,o,u=c(w),l=n?n.toUpperCase():"GET",h=new RegExp("http[s]?://(.*?)/","gi"),d=h.exec(t),f="_ts="+ +new Date,p=v.getElementsByTagName("head")[0],m="chibi"+ +new Date+(g+=1);return!u||"GET"!==l&&"DELETE"!==l||(t+=-1===t.indexOf("?")?"?"+u:"&"+u,u=null),"GET"===l&&!s&&d&&x.location.host!==d[1]?(r&&(t+=-1===t.indexOf("?")?"?"+f:"&"+f),t=t.replace("=%3F","=?"),i&&-1!==t.indexOf("=?")&&(t=t.replace("=?","="+m),x[m]=function(t){try{i(t,200)}catch(e){}x[m]=void 0}),o=document.createElement("script"),o.async=!0,o.src=t,o.onload=function(){p.removeChild(o)},p.appendChild(o)):(x.XMLHttpRequest?a=new XMLHttpRequest:x.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLHTTP")),a&&(r&&(t+=-1===t.indexOf("?")?"?"+f:"&"+f),a.open(l,t,!0),a.onreadystatechange=function(){4===a.readyState&&i&&i(a.responseText,a.status)},a.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"!==l&&"PUT"!==l||a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.send(u))),e},e.get=function(t,n,i,r){return e.ajax(t,"get",n,i,r)},e.post=function(t,n,i){return e.ajax(t,"post",n,i)},e}var d=[],f=[],p=!1,m=!1,g=0,v=document,x=window;v.addEventListener?(v.addEventListener("DOMContentLoaded",t,!1),x.addEventListener("load",e,!1)):v.attachEvent?(v.attachEvent("onreadystatechange",t),x.attachEvent("onload",e)):x.onload=e,x.$=h}(),function(t,e){t.Chartist=e()}(this,function(){var t={version:"0.9.7"};return function(t,e,n){"use strict";n.namespaces={svg:"http://www.w3.org/2000/svg",xmlns:"http://www.w3.org/2000/xmlns/",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",ct:"http://gionkunz.github.com/chartist-js/ct"},n.noop=function(t){return t},n.alphaNumerate=function(t){return String.fromCharCode(97+t%26)},n.extend=function(t){t=t||{};var e=Array.prototype.slice.call(arguments,1);return e.forEach(function(e){for(var i in e)"object"!=typeof e[i]||null===e[i]||e[i]instanceof Array?t[i]=e[i]:t[i]=n.extend({},t[i],e[i])}),t},n.replaceAll=function(t,e,n){return t.replace(new RegExp(e,"g"),n)},n.ensureUnit=function(t,e){return"number"==typeof t&&(t+=e),t},n.quantity=function(t){if("string"==typeof t){var e=/^(\d+)\s*(.*)$/g.exec(t);return{value:+e[1],unit:e[2]||void 0}}return{value:t}},n.querySelector=function(t){return t instanceof Node?t:e.querySelector(t)},n.times=function(t){return Array.apply(null,new Array(t))},n.sum=function(t,e){return t+(e?e:0)},n.mapMultiply=function(t){return function(e){return e*t}},n.mapAdd=function(t){return function(e){return e+t}},n.serialMap=function(t,e){var i=[],r=Math.max.apply(null,t.map(function(t){return t.length}));return n.times(r).forEach(function(n,r){var s=t.map(function(t){return t[r]});i[r]=e.apply(null,s)}),i},n.roundWithPrecision=function(t,e){var i=Math.pow(10,e||n.precision);return Math.round(t*i)/i},n.precision=8,n.escapingMap={"&":"&","<":"<",">":">",'"':""","'":"'"},n.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),Object.keys(n.escapingMap).reduce(function(t,e){return n.replaceAll(t,e,n.escapingMap[e])},t))},n.deserialize=function(t){if("string"!=typeof t)return t;t=Object.keys(n.escapingMap).reduce(function(t,e){return n.replaceAll(t,n.escapingMap[e],e)},t);try{t=JSON.parse(t),t=void 0!==t.data?t.data:t}catch(e){}return t},n.createSvg=function(t,e,i,r){var s;return e=e||"100%",i=i||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(n.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),s=new n.Svg("svg").attr({width:e,height:i}).addClass(r).attr({style:"width: "+e+"; height: "+i+";"}),t.appendChild(s._node),s},n.normalizeData=function(t){if(t=t||{series:[],labels:[]},t.series=t.series||[],t.labels=t.labels||[],t.series.length>0&&0===t.labels.length){var e,i=n.getDataArray(t);e=i.every(function(t){return t instanceof Array})?Math.max.apply(null,i.map(function(t){return t.length})):i.length,t.labels=n.times(e).map(function(){return""})}return t},n.reverseData=function(t){t.labels.reverse(),t.series.reverse();for(var e=0;es.high&&(s.high=n),o&&n0?s.low=0:(s.high=1,s.low=0)),s},n.isNum=function(t){return!isNaN(t)&&isFinite(t)},n.isFalseyButZero=function(t){return!t&&0!==t},n.getNumberOrUndefined=function(t){return isNaN(+t)?void 0:+t},n.getMultiValue=function(t,e){return n.isNum(t)?+t:t?t[e||"y"]||0:0},n.rho=function(t){function e(t,n){return t%n===0?n:e(n,t%n)}function n(t){return t*t+1}if(1===t)return t;var i,r=2,s=2;if(t%2===0)return 2;do r=n(r)%t,s=n(n(s))%t,i=e(Math.abs(r-s),t);while(1===i);return i},n.getBounds=function(t,e,i,r){var s,a,o,c=0,u={high:e.high,low:e.low};u.valueRange=u.high-u.low,u.oom=n.orderOfMagnitude(u.valueRange),u.step=Math.pow(10,u.oom),u.min=Math.floor(u.low/u.step)*u.step,u.max=Math.ceil(u.high/u.step)*u.step,u.range=u.max-u.min,u.numberOfSteps=Math.round(u.range/u.step);var l=n.projectLength(t,u.step,u),h=i>l,d=r?n.rho(u.range):0;if(r&&n.projectLength(t,1,u)>=i)u.step=1;else if(r&&d=i)u.step=d;else for(;;){if(h&&n.projectLength(t,u.step,u)<=i)u.step*=2;else{if(h||!(n.projectLength(t,u.step/2,u)>=i))break;if(u.step/=2,r&&u.step%1!==0){u.step*=2;break}}if(c++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(a=u.min,o=u.max;a+u.step<=u.low;)a+=u.step;for(;o-u.step>=u.high;)o-=u.step;for(u.min=a,u.max=o,u.range=u.max-u.min,u.values=[],s=u.min;s<=u.max;s+=u.step)u.values.push(n.roundWithPrecision(s));return u},n.polarToCartesian=function(t,e,n,i){var r=(i-90)*Math.PI/180;return{x:t+n*Math.cos(r),y:e+n*Math.sin(r)}},n.createChartRect=function(t,e,i){var r=!(!e.axisX&&!e.axisY),s=r?e.axisY.offset:0,a=r?e.axisX.offset:0,o=t.width()||n.quantity(e.width).value||0,c=t.height()||n.quantity(e.height).value||0,u=n.normalizePadding(e.chartPadding,i);o=Math.max(o,s+u.left+u.right),c=Math.max(c,a+u.top+u.bottom);var l={padding:u,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return r?("start"===e.axisX.position?(l.y2=u.top+a,l.y1=Math.max(c-u.bottom,l.y2+1)):(l.y2=u.top,l.y1=Math.max(c-u.bottom-a,l.y2+1)),"start"===e.axisY.position?(l.x1=u.left+s,l.x2=Math.max(o-u.right,l.x1+1)):(l.x1=u.left,l.x2=Math.max(o-u.right-s,l.x1+1))):(l.x1=u.left,l.x2=Math.max(o-u.right,l.x1+1),l.y2=u.top,l.y1=Math.max(c-u.bottom,l.y2+1)),l},n.createGrid=function(t,e,i,r,s,a,o,c){var u={};u[i.units.pos+"1"]=Math.round(t)+.5,u[i.units.pos+"2"]=Math.round(t)+.5,u[i.counterUnits.pos+"1"]=r,u[i.counterUnits.pos+"2"]=r+s;var l=a.elem("line",u,o.join(" "));c.emit("draw",n.extend({type:"grid",axis:i,index:e,group:a,element:l},u))},n.createLabel=function(t,e,i,r,s,a,o,c,u,l,h){var d,f={};f[s.units.pos]=t+o[s.units.pos],f[s.counterUnits.pos]=o[s.counterUnits.pos],f[s.units.len]=e,f[s.counterUnits.len]=a-10;var p=r[i];if(p=Math.round(100*+p)/100,l){var m=''+p+"";d=c.foreignObject(m,n.extend({style:"overflow: visible;"},f))}else d=c.elem("text",f,u.join(" ")).text(p);h.emit("draw",n.extend({type:"label",axis:s,index:i,group:c,element:d,text:p},f))},n.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var i=e.series[t.name];return i.hasOwnProperty(n)?i[n]:e[n]}return e[n]},n.optionsProvider=function(e,i,r){function s(e){var s=o;if(o=n.extend({},u),i)for(c=0;c1){var c=[];return o.forEach(function(t){c.push(a(t.pathCoordinates,t.valueData))}),n.Svg.Path.join(c)}if(t=o[0].pathCoordinates,i=o[0].valueData,t.length<=4)return n.Interpolation.none()(t,i);for(var u,l=(new n.Svg.Path).move(t[0],t[1],!1,i[0]),h=0,d=t.length;d-2*!u>h;h+=2){var f=[{x:+t[h-2],y:+t[h-1]},{x:+t[h],y:+t[h+1]},{x:+t[h+2],y:+t[h+3]},{x:+t[h+4],y:+t[h+5]}];u?h?d-4===h?f[3]={x:+t[0],y:+t[1]}:d-2===h&&(f[2]={x:+t[0],y:+t[1]},f[3]={x:+t[2],y:+t[3]}):f[0]={x:+t[d-2],y:+t[d-1]}:d-4===h?f[3]=f[2]:h||(f[0]={x:+t[h],y:+t[h+1]}),l.curve(r*(-f[0].x+6*f[1].x+f[2].x)/6+s*f[2].x,r*(-f[0].y+6*f[1].y+f[2].y)/6+s*f[2].y,r*(f[1].x+6*f[2].x-f[3].x)/6+s*f[2].x,r*(f[1].y+6*f[2].y-f[3].y)/6+s*f[2].y,f[2].x,f[2].y,!1,i[(h+2)/2])}return l}return n.Interpolation.none()([])}},n.Interpolation.step=function(t){var e={postpone:!0,fillHoles:!1};return t=n.extend({},e,t),function(e,i){for(var r,s,a,o=new n.Svg.Path,c=0;c1}).map(function(t){var e=t.pathElements[0],n=t.pathElements[t.pathElements.length-1];return t.clone(!0).position(0).remove(1).move(e.x,v).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,v)}).forEach(function(n){var o=c.elem("path",{d:n.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized[a],path:n.clone(),series:s,seriesIndex:a,axisX:i,axisY:r,chartRect:u,index:a,group:c,element:o})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:r.bounds,chartRect:u,axisX:i,axisY:r,svg:this.svg,options:t})}function r(t,e,i,r){n.Line["super"].constructor.call(this,t,e,s,n.extend({},s,i),r)}var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:n.noop,type:void 0},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:n.noop,type:void 0,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,showLine:!0,showPoint:!0,showArea:!1,areaBase:0,lineSmooth:!0,low:void 0,high:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},fullWidth:!1,reverseData:!1,classNames:{chart:"ct-chart-line",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",line:"ct-line",point:"ct-point",area:"ct-area",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};n.Line=n.Base.extend({constructor:r,createChart:i})}(window,document,t),function(t,e,n){"use strict";function i(t){this.data=n.normalizeData(this.data);var e,i={raw:this.data,normalized:t.distributeSeries?n.getDataArray(this.data,t.reverseData,t.horizontalBars?"x":"y").map(function(t){return[t]}):n.getDataArray(this.data,t.reverseData,t.horizontalBars?"x":"y")};this.svg=n.createSvg(this.container,t.width,t.height,t.classNames.chart+(t.horizontalBars?" "+t.classNames.horizontalBars:""));var r=this.svg.elem("g").addClass(t.classNames.gridGroup),a=this.svg.elem("g"),o=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==i.normalized.length){var c=n.serialMap(i.normalized,function(){return Array.prototype.slice.call(arguments).map(function(t){return t}).reduce(function(t,e){return{x:t.x+(e&&e.x)||0,y:t.y+(e&&e.y)||0}},{x:0,y:0})});e=n.getHighLow([c],n.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y")}else e=n.getHighLow(i.normalized,n.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y");e.high=+t.high||(0===t.high?0:e.high),e.low=+t.low||(0===t.low?0:e.low);var u,l,h,d,f,p=n.createChartRect(this.svg,t,s.padding);l=t.distributeSeries&&t.stackBars?i.raw.labels.slice(0,1):i.raw.labels,t.horizontalBars?(u=d=void 0===t.axisX.type?new n.AutoScaleAxis(n.Axis.units.x,i,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})):t.axisX.type.call(n,n.Axis.units.x,i,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})),h=f=void 0===t.axisY.type?new n.StepAxis(n.Axis.units.y,i,p,{ticks:l}):t.axisY.type.call(n,n.Axis.units.y,i,p,t.axisY)):(h=d=void 0===t.axisX.type?new n.StepAxis(n.Axis.units.x,i,p,{ticks:l}):t.axisX.type.call(n,n.Axis.units.x,i,p,t.axisX),u=f=void 0===t.axisY.type?new n.AutoScaleAxis(n.Axis.units.y,i,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})):t.axisY.type.call(n,n.Axis.units.y,i,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})));var m=t.horizontalBars?p.x1+u.projectValue(0):p.y1-u.projectValue(0),g=[];h.createGridAndLabels(r,o,this.supportsForeignObject,t,this.eventEmitter),u.createGridAndLabels(r,o,this.supportsForeignObject,t,this.eventEmitter),i.raw.series.forEach(function(e,r){var s,o,c=r-(i.raw.series.length-1)/2;s=t.distributeSeries&&!t.stackBars?h.axisLength/i.normalized.length/2:t.distributeSeries&&t.stackBars?h.axisLength/2:h.axisLength/i.normalized[r].length/2,o=a.elem("g"),o.attr({"ct:series-name":e.name,"ct:meta":n.serialize(e.meta)}),o.addClass([t.classNames.series,e.className||t.classNames.series+"-"+n.alphaNumerate(r)].join(" ")),i.normalized[r].forEach(function(a,l){var v,x,y,w;if(w=t.distributeSeries&&!t.stackBars?r:t.distributeSeries&&t.stackBars?0:l,v=t.horizontalBars?{x:p.x1+u.projectValue(a&&a.x?a.x:0,l,i.normalized[r]),y:p.y1-h.projectValue(a&&a.y?a.y:0,w,i.normalized[r])}:{x:p.x1+h.projectValue(a&&a.x?a.x:0,w,i.normalized[r]),y:p.y1-u.projectValue(a&&a.y?a.y:0,l,i.normalized[r])},h instanceof n.StepAxis&&(h.options.stretch||(v[h.units.pos]+=s*(t.horizontalBars?-1:1)),v[h.units.pos]+=t.stackBars||t.distributeSeries?0:c*t.seriesBarDistance*(t.horizontalBars?-1:1)),y=g[l]||m,g[l]=y-(m-v[h.counterUnits.pos]),void 0!==a){var b={};b[h.units.pos+"1"]=v[h.units.pos],b[h.units.pos+"2"]=v[h.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(b[h.counterUnits.pos+"1"]=m,b[h.counterUnits.pos+"2"]=v[h.counterUnits.pos]):(b[h.counterUnits.pos+"1"]=y,b[h.counterUnits.pos+"2"]=g[l]),b.x1=Math.min(Math.max(b.x1,p.x1),p.x2),b.x2=Math.min(Math.max(b.x2,p.x1),p.x2),b.y1=Math.min(Math.max(b.y1,p.y2),p.y1),b.y2=Math.min(Math.max(b.y2,p.y2),p.y1),x=o.elem("line",b,t.classNames.bar).attr({"ct:value":[a.x,a.y].filter(n.isNum).join(","),"ct:meta":n.getMetaData(e,l)}),this.eventEmitter.emit("draw",n.extend({type:"bar",value:a,index:l,meta:n.getMetaData(e,l),series:e,seriesIndex:r,axisX:d,axisY:f,chartRect:p,group:o,element:x},b))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:u.bounds,chartRect:p,axisX:d,axisY:f,svg:this.svg,options:t})}function r(t,e,i,r){n.Bar["super"].constructor.call(this,t,e,s,n.extend({},s,i),r)}var s={axisX:{offset:30,position:"end",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:n.noop,scaleMinSpace:30,onlyInteger:!1},axisY:{offset:40,position:"start",labelOffset:{x:0,y:0},showLabel:!0,showGrid:!0,labelInterpolationFnc:n.noop,scaleMinSpace:20,onlyInteger:!1},width:void 0,height:void 0,high:void 0,low:void 0,chartPadding:{top:15,right:15,bottom:5,left:10},seriesBarDistance:15,stackBars:!1,stackMode:"accumulate",horizontalBars:!1,distributeSeries:!1,reverseData:!1,classNames:{chart:"ct-chart-bar",horizontalBars:"ct-horizontal-bars",label:"ct-label",labelGroup:"ct-labels",series:"ct-series",bar:"ct-bar",grid:"ct-grid",gridGroup:"ct-grids",vertical:"ct-vertical",horizontal:"ct-horizontal",start:"ct-start",end:"ct-end"}};n.Bar=n.Base.extend({constructor:r,createChart:i})}(window,document,t),t}),function(t,e){t["Chartist.plugins.ctAxisTitle"]=e()}(this,function(){return function(t,e,n){"use strict";var i={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipText:!1},r={axisX:i,axisY:i};n.plugins=n.plugins||{},n.plugins.ctAxisTitle=function(t){return t=n.extend({},r,t),function(e){e.on("created",function(e){var i,r,s;if(t.axisX.axisTitle&&e.axisX&&(i=e.axisX.axisLength/2+e.options.axisY.offset+e.options.chartPadding.left,r=e.options.chartPadding.top,"end"===e.options.axisY.position&&(i-=e.options.axisY.offset),"end"===e.options.axisX.position&&(r+=e.axisY.axisLength),s=new n.Svg("text"),s.addClass(t.axisX.axisClass),s.text(t.axisX.axisTitle),s.attr({x:i+t.axisX.offset.x,y:r+t.axisX.offset.y,"text-anchor":t.axisX.textAnchor}),e.svg.append(s,!0)),t.axisY.axisTitle&&e.axisY){i=0,r=e.axisY.axisLength/2+e.options.chartPadding.top,"start"===e.options.axisX.position&&(r+=e.options.axisX.offset),"end"===e.options.axisY.position&&(i=e.axisX.axisLength);var a="rotate("+(t.axisY.flipText?-90:90)+", "+i+", "+r+")";s=new n.Svg("text"),s.addClass(t.axisY.axisClass),s.text(t.axisY.axisTitle),s.attr({x:i+t.axisY.offset.x,y:r+t.axisY.offset.y,transform:a,"text-anchor":t.axisY.textAnchor}),e.svg.append(s,!0)}})}}}(window,document,Chartist),Chartist.plugins.ctAxisTitle}),function(t,e){t["Chartist.plugins.zoom"]=e()}(this,function(){return function(t,e,n){"use strict";function i(t){t.attr({style:"display:none"})}function r(t){t.attr({style:"display:block"})}function s(t,e){var n=t.x,i=t.y,r=e.x-n,s=e.y-i;return 0>r&&(r=-r,n=e.x),0>s&&(s=-s,i=e.y),{x:n,y:i,width:r,height:s}}function a(t,e){return o(t.clientX,t.clientY,e)}function o(t,e,n){var i="svg"===n.tagName?n:n.ownerSVGElement,r=i.getScreenCTM(),s=i.createSVGPoint();return s.x=t,s.y=e,s=s.matrixTransform(r.inverse()),s||{x:0,y:0}}function c(t,e){var n=e.bounds.max,i=e.bounds.min;if(e.scale&&"log"===e.scale.type){var r=e.scale.base;return Math.pow(r,t*u(n/i,r)/e.axisLength)*i}return t*e.bounds.range/e.axisLength+i}function u(t,e){return Math.log(t)/Math.log(e)}var l={};n.plugins=n.plugins||{},n.plugins.zoom=function(t){return t=n.extend({},l,t),function(e){function o(t){var e=a(t,w);return e.id=t.identifier,e}function u(t){for(var e=0;e1&&(y.attr(s(O[0],O[1])),r(y))}function h(t){for(var e=t.changedTouches,n=0;n1&&(y.attr(s(O[0],O[1])),r(y),t.preventDefault())}function d(t){f(t.changedTouches)}function f(t){for(var e=0;e=0&&O.splice(n,1)}}function p(t){O.length>1&&v(s(O[0],O[1])),f(t.changedTouches),i(y)}function m(t){0===t.button&&(S=a(t,w),y.attr(s(S,S)),r(y),t.preventDefault())}function g(e){if(0===e.button){var n=s(S,a(e,w));v(n),S=null,i(y),e.preventDefault()}else t.resetOnRightMouseBtn&&2===e.button&&(L(),e.preventDefault())}function v(t){if(t.width>5&&t.height>5){var n=t.x-A.x1,i=n+t.width,r=A.y1-t.y,s=r-t.height;e.options.axisX.highLow={low:c(n,b),high:c(i,b)},e.options.axisY.highLow={low:c(s,E),high:c(r,E)},e.update(e.data,e.options),C&&C(e,L)}}function x(t){if(S){var e=a(t,w);y.attr(s(S,e)),t.preventDefault()}}if(e instanceof n.Line){var y,w,b,E,A,S,C=t.onZoom,O=[];e.on("draw",function(t){var e=t.type;"line"!==e&&"bar"!==e&&"area"!==e&&"point"!==e||t.element.attr({"clip-path":"url(#zoom-mask)"})}),e.on("created",function(t){b=t.axisX,E=t.axisY,A=t.chartRect,w=t.svg._node,y=t.svg.elem("rect",{x:10,y:10,width:100,height:100},"ct-zoom-rect"),i(y);var e=t.svg.querySelector("defs")||t.svg.elem("defs"),n=A.width(),r=A.height();e.elem("clipPath",{id:"zoom-mask"}).elem("rect",{x:A.x1,y:A.y2,width:n,height:r,fill:"white"}),w.addEventListener("mousedown",m),w.addEventListener("mouseup",g),w.addEventListener("mousemove",x),w.addEventListener("touchstart",l),w.addEventListener("touchmove",h),w.addEventListener("touchend",p),w.addEventListener("touchcancel",d)});var L=function(){e.options.axisX.highLow=null,e.options.axisY.highLow=null,e.update(e.data,e.options)}}}}}(window,document,Chartist),Chartist.plugins.zoom}),String.prototype.format=function(){var t=this,e=arguments;1==arguments.length&&(isArray(arguments[0])||isObject(arguments[0]))&&(e=arguments[0]);for(var n in e)if(e.hasOwnProperty(n)){var i=n;n.match(/^\{.*\}$/)||(n="{"+n+"}");var r=new RegExp(regexEscape(n),"g");t=t.replace(r,e[i])}return t};var modal=function(){var t={};return t.show=function(t){var e=$(t);e.removeClass("hidden visible"),setTimeout(function(){e.addClass("visible")},1)},t.hide=function(t){var e=$(t);e.removeClass("visible"),setTimeout(function(){e.addClass("hidden")},500)},t.init=function(){$(".Modal").on("click",function(){t.hide(this)}),$(".Dialog").on("click",function(t){t.stopImmediatePropagation()}),$(window).on("keydown",function(e){27==e.which&&t.hide(".Modal")})},t}();$().ready(function(){setInterval(function(){$(".anim-dots").each(function(t){var e=$(t),n=e.html()+".";5==n.length&&(n="."),e.html(n)})},1e3),modal.init()});var wifi=function(){function t(t,n){if(200!=n)return void i(5e3);t=JSON.parse(t);var a=!bool(t.result.inProgress)&&t.result.APs.length>0;if(i(a?15e3:1e3),a){var o=$("#ap-list");$(".AP").remove(),o.toggle(a),$("#ap-loader").toggle(!a),t.result.APs.sort(function(t,e){return e.rssi-t.rssi}).forEach(function(t){if(t.enc=parseInt(t.enc),!(t.enc>4)){var n=document.createElement("div"),i=$(n).data("ssid",t.essid).data("pwd",0!=t.enc).addClass("AP");t.essid==r.current&&i.addClass("selected");var a=document.createElement("div");$(a).addClass("inner").htmlAppend(''.format(rssiPerc(t.rssi))).htmlAppend('{0}
'.format(e(t.essid))).htmlAppend('{0}
'.format(s[t.enc]));i.on("click",function(){var t=$(this);$("#conn-essid").val(t.data("ssid")),$("#conn-passwd").val(""),t.data("pwd")?modal.show("#psk-modal"):$("#conn-form").submit()}),n.appendChild(a),o[0].appendChild(n)}})}}function n(){$().get("/wifi/scan.cgi",t,!0,!0)}function i(t){setTimeout(n,t)}var r={},s=["Open","WEP","WPA","WPA2","WPA/WPA2"];return r.init=function(){n()},r}(),wfm=function(){function t(t,e,n){var i=[];t.forEach(function(t,e){i.push({x:e,y:t})});var r=[],s=window.matchMedia("screen and (min-width: 544px)"),a=!s.matches;a||r.push(Chartist.plugins.ctAxisTitle({axisX:{axisTitle:e,offset:{x:0,y:55}},axisY:{axisTitle:n,flipText:!0,offset:{x:0,y:15}}})),new Chartist.Line("#chart",{series:[{name:"a",data:i}]},{showPoint:!1,fullWidth:!0,chartPadding:a?{right:20,bottom:5,left:0}:{right:25,bottom:30,left:25},series:{a:{lineSmooth:Chartist.Interpolation.none()}},axisX:{type:Chartist.AutoScaleAxis,onlyInteger:!0},axisY:{type:Chartist.AutoScaleAxis},plugins:r})}function e(e,n){if(200!=n)return void alert("Request failed.");var i=JSON.parse(e);return i.success?void t(e.samples,"Sample Nr.","ADC value"):void alert("Sampling failed.")}var n={};return n.init=function(){$("#load").on("click",function(){var t=$("#count").val();$().get("/api/raw.json?n="+t,e,!0,!0)})},n}();
\ No newline at end of file
diff --git a/html/pages/home.tpl b/html/pages/home.tpl
index 46896bc..6877775 100644
--- a/html/pages/home.tpl
+++ b/html/pages/home.tpl
@@ -16,7 +16,7 @@
+
+
+
+
+
Waveform
+
+
+
+
+
+
+
+
+
+
diff --git a/html/pages/wfm.html b/html/pages/wfm.html
new file mode 100644
index 0000000..627d44b
--- /dev/null
+++ b/html/pages/wfm.html
@@ -0,0 +1,41 @@
+
+
+