diff --git a/html/css/app.css b/html/css/app.css index 3d91c39..09d0a23 100644 --- a/html/css/app.css +++ b/html/css/app.css @@ -1 +1 @@ -*,: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}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.ct-zoom-rect{fill:rgba(200,100,100,.3);stroke:#ff2b12}.ct-axis-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ct-axis-title,.ct-label{fill:rgba(255,255,255,.8)}.ct-label{color:rgba(255,255,255,.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:rgba(255,255,255,.3);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:4px;stroke-linecap:round}.ct-line{fill:none;stroke-width:2px}.ct-with-area .ct-line{stroke-width:1px}.ct-area{stroke:none;fill-opacity:.3}.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:62.5%}.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}.center{text-align:center}.invis{visibility:hidden}.hidden{display:none}.nb{font-weight:400}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: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,.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:white;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;position:relative;padding:1rem;overflow-y:auto}@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}#loader{position:absolute;right:1.618rem;top:1.618rem;transition:opacity .2s;opacity:0}@media screen and (max-width:544px){#loader{top:1rem;right:1rem}}#loader.show{opacity:1}.Box{display:block;max-width:900px;margin-top:1rem;padding:.6180469716rem 1rem;border-radius:3px;background-color:rgba(255,255,255,.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}.Box .Valfield{display:inline-block;min-width:10em}.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;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 black;border-radius:6px}.Dialog h1,.Dialog h2{margin-top:0}.Dialog p:last-child{margin-bottom:0}.ErrMsg{position:fixed;bottom:2.617924rem;padding:.6180469716rem 1rem;left:50%;transform:translate(-50%);-webkit-font-smoothing:subpixel-antialiased;-webkit-transform:translateZ(0) scale(1);background:#d03e42;color:white;text-shadow:0 0 2px black;box-shadow:0 0 6px 0 rgba(0,0,0,.6);border-radius:5px;max-width:80%;transition:opacity .5s;opacity:0}@media screen and (max-width:544px){.ErrMsg{width:calc(100% - 1rem)}}.ErrMsg.visible{opacity:1}.ErrMsg.hidden{display:none}.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}.btn-blue{background-color:#3983cd;box-shadow:0 3px 0 #265f98;text-decoration:none!important}.btn-blue,.btn-blue:link,.btn-blue:visited{color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:active,.btn-blue:hover{background-color:#2076C6;color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:hover{box-shadow:0 3px 0 #154c80}.btn-blue:active{box-shadow:0 1px 0 #154c80}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 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,.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 black;-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.2em;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:rgba(255,255,255,.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:white}.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 #staRSSIperc:after{padding-left:.1459102934rem;content:'%';font-size:.8888888889em}.page-home #staRSSI:after{padding-left:.1459102934rem;content:'dBm';font-size:.8888888889em}#samp-ctrl{display:flex;padding:.3819820591rem;flex-direction:row;justify-content:center;align-items:stretch}@media screen and (max-width:544px){#samp-ctrl{flex-direction:column}}#samp-ctrl>div{margin:.3819820591rem .6180469716rem}#samp-ctrl label{line-height:1.8;font-weight:700}#samp-ctrl input,#samp-ctrl select{width:6em}@media screen and (max-width:544px){#samp-ctrl input,#samp-ctrl select{width:100%}}#samp-ctrl #tile-cfg input{width:3em}#samp-ctrl #interval{width:4.5em}.Box.chartbox{display:flex;flex-direction:row}@media screen and (max-width:544px){.Box.chartbox{flex-direction:column}}.Box.chartbox .stats{flex:0 1;position:relative;padding-bottom:50px}@media screen and (max-width:544px){.Box.chartbox .stats table{margin:0 auto}.Box.chartbox .stats td,.Box.chartbox .stats th{width:50%}}.Box.chartbox .stats td,.Box.chartbox .stats th{white-space:nowrap;word-wrap:normal}.Box.chartbox .stats th sub{font-weight:400}.Box.chartbox .stats td{min-width:100px}.Box.chartbox .stats td:after{font-size:90%;padding-left:.5em}.Box.chartbox .stats #stat-f-s:after{content:"Hz"}.Box.chartbox .stats #stat-i-peak:after,.Box.chartbox .stats #stat-i-rms:after{content:"mA"}.Box.chartbox .stats .ar{position:absolute;bottom:.3819820591rem;width:100%;text-align:center}.Box.chartbox .stats .ar input[type=number]{width:4em}.Box.chartbox .stats .ar input[type=button]{margin-left:.3819820591rem}.page-about .Box{padding-left:1rem;padding-right:1rem}.page-about .Box a{font-weight:700}.page-about #logo{float:right;height:130px}.page-about #logo2{max-width:150px}@media screen and (min-width:545px){.mq-phone{display:none}}@media screen and (max-width:544px){.mq-tablet-min{display:none}}@media screen and (min-width:1001px){.mq-tablet-max{display:none}}@media screen and (max-width:1000px){.mq-normal-min{display:none}} \ No newline at end of file +*,: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}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.ct-zoom-rect{fill:rgba(200,100,100,.3);stroke:#ff2b12}.ct-axis-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ct-axis-title,.ct-label{fill:rgba(255,255,255,.8)}.ct-label{color:rgba(255,255,255,.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:rgba(255,255,255,.3);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:4px;stroke-linecap:round}.ct-line{fill:none;stroke-width:2px}.ct-with-area .ct-line{stroke-width:1px}.ct-area{stroke:none;fill-opacity:.3}.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:62.5%}.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}.center{text-align:center}.invis{visibility:hidden!important}.hidden{display:none!important}.nb{font-weight:400}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{cursor:pointer;color:#5abfff;text-decoration:none}a:hover{color:#5abfff;text-decoration:underline}.chartexport a{background:#3b7299;border-radius:3px;padding:5px;color:#0c171e;text-decoration:none}.chartexport a:hover{background:#4ea6dd}.chartexport a:active{position:relative;top:1px}.chartexport textarea{margin-top:10px;width:100%;height:10em;resize:vertical}#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: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,.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:white;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;position:relative;padding:1rem;overflow-y:auto}@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}#loader{position:absolute;right:1.618rem;top:1.618rem;transition:opacity .2s;opacity:0}@media screen and (max-width:544px){#loader{top:1rem;right:1rem}}#loader.show{opacity:1}.Box{display:block;max-width:900px;margin-top:1rem;padding:.6180469716rem 1rem;border-radius:3px;background-color:rgba(255,255,255,.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}.Box .Valfield{display:inline-block;min-width:10em}.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;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 black;border-radius:6px}.Dialog h1,.Dialog h2{margin-top:0}.Dialog p:last-child{margin-bottom:0}.NotifyMsg{position:fixed;bottom:2.617924rem;padding:.6180469716rem 1rem;left:50%;transform:translate(-50%);-webkit-font-smoothing:subpixel-antialiased;-webkit-transform:translateZ(0) scale(1);background:#37a349;color:white;text-shadow:0 0 2px black;box-shadow:0 0 6px 0 rgba(0,0,0,.6);border-radius:5px;max-width:80%;transition:opacity .5s;opacity:0}.NotifyMsg.error{background:#d03e42}@media screen and (max-width:544px){.NotifyMsg{width:calc(100% - 1rem)}}.NotifyMsg.visible{opacity:1}.NotifyMsg.hidden{display:none}.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}.btn-blue{background-color:#3983cd;box-shadow:0 3px 0 #265f98;text-decoration:none!important}.btn-blue,.btn-blue:link,.btn-blue:visited{color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:active,.btn-blue:hover{background-color:#2076C6;color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:hover{box-shadow:0 3px 0 #154c80}.btn-blue:active{box-shadow:0 1px 0 #154c80}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 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,.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 black;-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.2em;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:rgba(255,255,255,.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:white}.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 #staRSSIperc:after{padding-left:.1459102934rem;content:'%';font-size:.8888888889em}.page-home #staRSSI:after{padding-left:.1459102934rem;content:'dBm';font-size:.8888888889em}#samp-ctrl{display:flex;padding:.3819820591rem;flex-direction:row;justify-content:center;align-items:stretch}@media screen and (max-width:544px){#samp-ctrl{flex-direction:column}}#samp-ctrl>div{margin:.3819820591rem .6180469716rem}#samp-ctrl label{line-height:1.8;font-weight:700}#samp-ctrl input,#samp-ctrl select{width:6em}@media screen and (max-width:544px){#samp-ctrl input,#samp-ctrl select{width:100%}}#samp-ctrl #tile-cfg input{width:3em}#samp-ctrl #interval{width:4.5em}.Box.chartbox{display:flex;flex-direction:row}@media screen and (max-width:544px){.Box.chartbox{flex-direction:column}}.Box.chartbox .stats{flex:0 1;position:relative;padding-bottom:50px}@media screen and (max-width:544px){.Box.chartbox .stats table{margin:0 auto}.Box.chartbox .stats td,.Box.chartbox .stats th{width:50%}}.Box.chartbox .stats td,.Box.chartbox .stats th{white-space:nowrap;word-wrap:normal}.Box.chartbox .stats th sub{font-weight:400}.Box.chartbox .stats td{min-width:100px}.Box.chartbox .stats td:after{font-size:90%;padding-left:.5em}.Box.chartbox .stats #stat-f-s:after{content:"Hz"}.Box.chartbox .stats #stat-i-peak:after,.Box.chartbox .stats #stat-i-rms:after{content:"mA"}.Box.chartbox .stats .ar{position:absolute;bottom:.3819820591rem;width:100%;text-align:center}.Box.chartbox .stats .ar input[type=number]{width:4em}.Box.chartbox .stats .ar input[type=button]{margin-left:.3819820591rem}.page-about .Box{padding-left:1rem;padding-right:1rem}.page-about .Box a{font-weight:700}.page-about #logo{float:right;height:130px}.page-about #logo2{max-width:150px}@media screen and (min-width:545px){.mq-phone{display:none}}@media screen and (max-width:544px){.mq-tablet-min{display:none}}@media screen and (min-width:1001px){.mq-tablet-max{display:none}}@media screen and (max-width:1000px){.mq-normal-min{display:none}} \ No newline at end of file diff --git a/html/js/all.js b/html/js/all.js index 6c3c3d3..872e021 100644 --- a/html/js/all.js +++ b/html/js/all.js @@ -1,3 +1,3 @@ -function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function numfmt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function estimateLoadTime(t,e){return 1e3/t*e+1500}function msNow(){return+new Date}function msElapsed(t){return msNow()-t}function errorMsg(t,e){notify.show(t,e||3e3)}!function(){"use strict";function t(){var t;for(p=!0,t=0;t=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function i(t,e){return t.currentStyle?t.currentStyle[r(e)]:g.getComputedStyle?g.getComputedStyle(t,null).getPropertyValue(e):null}function a(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function s(t,e,n){try{t.style[r(e)]=n}catch(i){}}function o(t){t.style.display="","none"===i(t,"display")&&(t.style.display="block")}function u(t){var e,r,i,s="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r0&&(s+="&"+a(e.name,e.value));break;case"select-multiple":for(i=0;i0?s.substring(1):""}function c(t,e,r){var i,a,s,o=!1;return t&&(i=t.split(/\s+/),n(function(t){for(s=0;s0?y[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},y),e},e.addClass=function(t){return t&&n(function(e){e.className+=" "+t},y),e},e.removeClass=function(t){return c(t,"remove",y),e},e.toggleClass=function(t){return c(t,"toggle",y),e},e.hasClass=function(t){return c(t,"has",y)},e.html=function(t){return t||""===t?(n(function(e){e.innerHTML=t},y),e):y[0]?y[0].innerHTML:void 0},e.htmlBefore=function(t){return l(t,"before",y),e},e.htmlAfter=function(t){return l(t,"after",y),e},e.htmlAppend=function(t){return l(t,"append",y),e},e.htmlPrepend=function(t){return l(t,"prepend",y),e},e.attr=function(t,r){if(t){if(t=t.toLowerCase(),"undefined"!=typeof r)return n(function(e){"style"===t?e.style.cssText=r:"class"===t?e.className=r:e.setAttribute(t,r)},y),e;if(y[0])if("style"===t){if(y[0].style.cssText)return y[0].style.cssText}else if("class"===t){if(y[0].className)return y[0].className}else if(y[0].getAttribute(t))return y[0].getAttribute(t)}},e.data=function(t,n){return t?e.attr("data-"+t,n):void 0},e.val=function(t){var r,i,a;if(!_.isUndefined(t))return n(function(e){switch(e.nodeName){case"SELECT":for(("string"==typeof t||"number"==typeof t)&&(t=[t]),i=0;i1?r:r[0];case"INPUT":case"TEXTAREA":case"BUTTON":return y[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)},y),e):!y[0]||"INPUT"!==y[0].nodeName||"checkbox"!==y[0].type&&"radio"!==y[0].type?void 0:!!y[0].checked},e.on=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.addEventListener(r,i,!1):v.attachEvent&&(t[r+i]=function(){return i.apply(t,arguments)},t.attachEvent("on"+r,t[r+i]))},y),e},e.off=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.removeEventListener(r,i,!1):v.attachEvent&&(t.detachEvent("on"+r,t[r+i]),t[r+i]=null)},y),e},e.ajax=function(t,e,n,r){var i,a,s=u(y),o=e?e.toUpperCase():"GET";_.isNumber(r)&&(r={timeout:r});var c=Chartist.extend({},{nocache:!0,timeout:5e3,loader:!0},r);if(s&&"GET"===o&&(t+=-1===t.indexOf("?")?"?"+s:"&"+s,s=null),i=new XMLHttpRequest){if(c.nocache){var l=(+new Date).toString(36);t+=(-1===t.indexOf("?")?"?":"&")+"_="+l}c.loader&&$("#loader").addClass("show"),i.open(o,t,!0),i.timeout=c.timeout,a=setTimeout(function(){errorMsg("XHR timed out."),i.abort(),c.loader&&$("#loader").removeClass("show")},c.timeout+10),i.onreadystatechange=function(){4===i.readyState&&(c.loader&&$("#loader").removeClass("show"),n&&0!=i.status&&n(i.responseText,i.status),clearTimeout(a))},i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===o&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.send(s)}return i},e.get=function(t,n,r){return e.ajax(t,"get",n,r)},e.post=function(t,n,r){return e.ajax(t,"post",n,r)},e}var f=[],d=[],p=!1,m=!1,v=document,g=window;v.addEventListener?(v.addEventListener("DOMContentLoaded",t,!1),g.addEventListener("load",e,!1)):v.attachEvent?(v.attachEvent("onreadystatechange",t),g.attachEvent("onload",e)):g.onload=e,g.$=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 r in e)"object"!=typeof e[r]||null===e[r]||e[r]instanceof Array?t[r]=e[r]:t[r]=n.extend({},t[r],e[r])}),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 r=[],i=Math.max.apply(null,t.map(function(t){return t.length}));return n.times(i).forEach(function(n,i){var a=t.map(function(t){return t[i]});r[i]=e.apply(null,a)}),r},n.roundWithPrecision=function(t,e){var r=Math.pow(10,e||n.precision);return Math.round(t*r)/r},n.precision=8,n.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),_.escape(t))},n.deserialize=function(t){if("string"!=typeof t)return t;t=_.unescape(t);try{t=JSON.parse(t),t=void 0!==t.data?t.data:t}catch(e){}return t},n.createSvg=function(t,e,r,i){var a;return e=e||"100%",r=r||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(n.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),a=new n.Svg("svg").attr({width:e,height:r}).addClass(i).attr({style:"width: "+e+"; height: "+r+";"}),t.appendChild(a._node),a},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,r=n.getDataArray(t);e=r.every(function(t){return t instanceof Array})?Math.max.apply(null,r.map(function(t){return t.length})):r.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;ea.high&&(a.high=n),o&&n0?a.low=0:(a.high=1,a.low=0)),a},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 r,i=2,a=2;if(t%2===0)return 2;do i=n(i)%t,a=n(n(a))%t,r=e(Math.abs(i-a),t);while(1===r);return r},n.getBounds=function(t,e,r,i){var a,s,o,u=0,c={high:e.high,low:e.low};c.valueRange=c.high-c.low,c.oom=n.orderOfMagnitude(c.valueRange),c.step=Math.pow(10,c.oom),c.min=Math.floor(c.low/c.step)*c.step,c.max=Math.ceil(c.high/c.step)*c.step,c.range=c.max-c.min,c.numberOfSteps=Math.round(c.range/c.step);var l=n.projectLength(t,c.step,c),h=r>l,f=i?n.rho(c.range):0;if(i&&n.projectLength(t,1,c)>=r)c.step=1;else if(i&&f=r)c.step=f;else for(;;){if(h&&n.projectLength(t,c.step,c)<=r)c.step*=2;else{if(h||!(n.projectLength(t,c.step/2,c)>=r))break;if(c.step/=2,i&&c.step%1!==0){c.step*=2;break}}if(u++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(s=c.min,o=c.max;s+c.step<=c.low;)s+=c.step;for(;o-c.step>=c.high;)o-=c.step;for(c.min=s,c.max=o,c.range=c.max-c.min,c.values=[],a=c.min;a<=c.max;a+=c.step)c.values.push(n.roundWithPrecision(a));return c},n.createChartRect=function(t,e,r){var i=!(!e.axisX&&!e.axisY),a=i?e.axisY.offset:0,s=i?e.axisX.offset:0,o=t.width()||n.quantity(e.width).value||0,u=t.height()||n.quantity(e.height).value||0,c=n.normalizePadding(e.chartPadding,r);o=Math.max(o,a+c.left+c.right),u=Math.max(u,s+c.top+c.bottom);var l={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return i?("start"===e.axisX.position?(l.y2=c.top+s,l.y1=Math.max(u-c.bottom,l.y2+1)):(l.y2=c.top,l.y1=Math.max(u-c.bottom-s,l.y2+1)),"start"===e.axisY.position?(l.x1=c.left+a,l.x2=Math.max(o-c.right,l.x1+1)):(l.x1=c.left,l.x2=Math.max(o-c.right-a,l.x1+1))):(l.x1=c.left,l.x2=Math.max(o-c.right,l.x1+1),l.y2=c.top,l.y1=Math.max(u-c.bottom,l.y2+1)),l},n.createGrid=function(t,e,r,i,a,s,o,u){var c={};c[r.units.pos+"1"]=Math.round(t)+.5,c[r.units.pos+"2"]=Math.round(t)+.5,c[r.counterUnits.pos+"1"]=i,c[r.counterUnits.pos+"2"]=i+a;var l=s.elem("line",c,o.join(" "));u.emit("draw",n.extend({type:"grid",axis:r,index:e,group:s,element:l},c))},n.createLabel=function(t,e,r,i,a,s,o,u,c,l,h){var f,d={};d[a.units.pos]=t+o[a.units.pos],d[a.counterUnits.pos]=o[a.counterUnits.pos],d[a.units.len]=e,d[a.counterUnits.len]=s-10;var p=i[r];if(_.isNumber(p)&&(p=n.roundWithPrecision(p,2)),l){var m=''+p+"";f=u.foreignObject(m,n.extend({style:"overflow: visible;"},d))}else f=u.elem("text",d,c.join(" ")).text(p);h.emit("draw",n.extend({type:"label",axis:a,index:r,group:u,element:f,text:p},d))},n.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var r=e.series[t.name];return r.hasOwnProperty(n)?r[n]:e[n]}return e[n]},n.optionsProvider=function(e,r,i){function a(e){var a=o;if(o=n.extend({},c),r)for(u=0;u=2&&e[a]<=e[a-2]?i=!0:(i&&(r.push({pathCoordinates:[],valueData:[]}),i=!1),r[r.length-1].pathCoordinates.push(e[a],e[a+1]),r[r.length-1].valueData.push(n[a/2]));return r}var r={fillHoles:!1};return t=n.extend({},r,t),function i(t,r){var a=e(t,r);if(a.length){if(a.length>1){var s=[];return a.forEach(function(t){s.push(i(t.pathCoordinates,t.valueData))}),n.Svg.Path.join(s)}if(t=a[0].pathCoordinates,r=a[0].valueData,t.length<=4)return n.Interpolation.none()(t,r);var o,u,c=[],l=[],h=t.length/2,f=[],d=[],p=[],m=[];for(o=0;h>o;o++)c[o]=t[2*o],l[o]=t[2*o+1];for(o=0;h-1>o;o++)p[o]=l[o+1]-l[o],m[o]=c[o+1]-c[o],d[o]=p[o]/m[o];for(f[0]=d[0],f[h-1]=d[h-2],o=1;h-1>o;o++)0===d[o]||0===d[o-1]||d[o-1]>0!=d[o]>0?f[o]=0:(f[o]=3*(m[o-1]+m[o])/((2*m[o]+m[o-1])/d[o-1]+(m[o]+2*m[o-1])/d[o]),isFinite(f[o])||(f[o]=0));for(u=(new n.Svg.Path).move(c[0],l[0],!1,r[0]),o=0;h-1>o;o++)u.curve(c[o]+m[o]/3,l[o]+f[o]*m[o]/3,c[o+1]-m[o]/3,l[o+1]-f[o+1]*m[o]/3,c[o+1],l[o+1],!1,r[o+1]);return u}return n.Interpolation.none()([])}},n.Interpolation.step=function(t){var e={postpone:!0,fillHoles:!1};return t=n.extend({},e,t),function(e,r){for(var i,a,s,o=new n.Svg.Path,u=0;u1}).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,g).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,g)}).forEach(function(n){var o=u.elem("path",{d:n.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized[s],path:n.clone(),series:a,seriesIndex:s,axisX:r,axisY:i,chartRect:c,index:s,group:u,element:o})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:i.bounds,chartRect:c,axisX:r,axisY:i,svg:this.svg,options:t})}function i(t,e,r,i){n.Line["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),function(t,e,n){"use strict";function r(t){this.data=n.normalizeData(this.data);var e,r={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 i=this.svg.elem("g").addClass(t.classNames.gridGroup),s=this.svg.elem("g"),o=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==r.normalized.length){var u=n.serialMap(r.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([u],n.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y")}else e=n.getHighLow(r.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 c,l,h,f,d,p=n.createChartRect(this.svg,t,a.padding);l=t.distributeSeries&&t.stackBars?r.raw.labels.slice(0,1):r.raw.labels,t.horizontalBars?(c=f=void 0===t.axisX.type?new n.AutoScaleAxis(n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})):t.axisX.type.call(n,n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})),h=d=void 0===t.axisY.type?new n.StepAxis(n.Axis.units.y,r,p,{ticks:l}):t.axisY.type.call(n,n.Axis.units.y,r,p,t.axisY)):(h=f=void 0===t.axisX.type?new n.StepAxis(n.Axis.units.x,r,p,{ticks:l}):t.axisX.type.call(n,n.Axis.units.x,r,p,t.axisX),c=d=void 0===t.axisY.type?new n.AutoScaleAxis(n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})):t.axisY.type.call(n,n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})));var m=t.horizontalBars?p.x1+c.projectValue(0):p.y1-c.projectValue(0),v=[];h.createGridAndLabels(i,o,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(i,o,this.supportsForeignObject,t,this.eventEmitter),r.raw.series.forEach(function(e,i){var a,o,u=i-(r.raw.series.length-1)/2;a=t.distributeSeries&&!t.stackBars?h.axisLength/r.normalized.length/2:t.distributeSeries&&t.stackBars?h.axisLength/2:h.axisLength/r.normalized[i].length/2,o=s.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(i)].join(" ")),r.normalized[i].forEach(function(s,l){var g,x,y,b;if(b=t.distributeSeries&&!t.stackBars?i:t.distributeSeries&&t.stackBars?0:l,g=t.horizontalBars?{x:p.x1+c.projectValue(s&&s.x?s.x:0,l,r.normalized[i]),y:p.y1-h.projectValue(s&&s.y?s.y:0,b,r.normalized[i])}:{x:p.x1+h.projectValue(s&&s.x?s.x:0,b,r.normalized[i]),y:p.y1-c.projectValue(s&&s.y?s.y:0,l,r.normalized[i])},h instanceof n.StepAxis&&(h.options.stretch||(g[h.units.pos]+=a*(t.horizontalBars?-1:1)),g[h.units.pos]+=t.stackBars||t.distributeSeries?0:u*t.seriesBarDistance*(t.horizontalBars?-1:1)),y=v[l]||m,v[l]=y-(m-g[h.counterUnits.pos]),void 0!==s){var w={};w[h.units.pos+"1"]=g[h.units.pos],w[h.units.pos+"2"]=g[h.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(w[h.counterUnits.pos+"1"]=m,w[h.counterUnits.pos+"2"]=g[h.counterUnits.pos]):(w[h.counterUnits.pos+"1"]=y,w[h.counterUnits.pos+"2"]=v[l]),w.x1=Math.min(Math.max(w.x1,p.x1),p.x2),w.x2=Math.min(Math.max(w.x2,p.x1),p.x2),w.y1=Math.min(Math.max(w.y1,p.y2),p.y1),w.y2=Math.min(Math.max(w.y2,p.y2),p.y1),x=o.elem("line",w,t.classNames.bar).attr({"ct:value":[s.x,s.y].filter(n.isNum).join(","),"ct:meta":n.getMetaData(e,l)}),this.eventEmitter.emit("draw",n.extend({type:"bar",value:s,index:l,meta:n.getMetaData(e,l),series:e,seriesIndex:i,axisX:f,axisY:d,chartRect:p,group:o,element:x},w))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:p,axisX:f,axisY:d,svg:this.svg,options:t})}function i(t,e,r,i){n.Bar["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),t}),function(t,e){t["Chartist.plugins.ctAxisTitle"]=e()}(this,function(){return function(t,e,n){"use strict";var r={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipText:!1},i={axisX:r,axisY:r};n.plugins=n.plugins||{},n.plugins.ctAxisTitle=function(t){return t=n.extend({},i,t),function(e){e.on("created",function(e){var r,i,a;if(t.axisX.axisTitle&&e.axisX&&(r=e.axisX.axisLength/2+e.options.axisY.offset+e.options.chartPadding.left,i=e.options.chartPadding.top,"end"===e.options.axisY.position&&(r-=e.options.axisY.offset),"end"===e.options.axisX.position&&(i+=e.axisY.axisLength),a=new n.Svg("text"),a.addClass(t.axisX.axisClass),a.text(t.axisX.axisTitle),a.attr({x:r+t.axisX.offset.x,y:i+t.axisX.offset.y,"text-anchor":t.axisX.textAnchor}),e.svg.append(a,!0)),t.axisY.axisTitle&&e.axisY){r=0,i=e.axisY.axisLength/2+e.options.chartPadding.top,"start"===e.options.axisX.position&&(i+=e.options.axisX.offset),"end"===e.options.axisY.position&&(r=e.axisX.axisLength);var s="rotate("+(t.axisY.flipText?-90:90)+", "+r+", "+i+")";a=new n.Svg("text"),a.addClass(t.axisY.axisClass),a.text(t.axisY.axisTitle),a.attr({x:r+t.axisY.offset.x,y:i+t.axisY.offset.y,transform:s,"text-anchor":t.axisY.textAnchor}),e.svg.append(a,!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 r(t){t.attr({style:"display:none"})}function i(t){t.attr({style:"display:block"})}function a(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r;return 0>i&&(i=-i,n=e.x),0>a&&(a=-a,r=e.y),{x:n,y:r,width:i,height:a}}function s(t,e){return o(t.clientX,t.clientY,e)}function o(t,e,n){var r="svg"===n.tagName?n:n.ownerSVGElement,i=r.getScreenCTM(),a=r.createSVGPoint();return a.x=t,a.y=e,a=a.matrixTransform(i.inverse()),a||{x:0,y:0}}function u(t,e){var n=e.bounds.max,r=e.bounds.min;if(e.scale&&"log"===e.scale.type){var i=e.scale.base;return Math.pow(i,t*c(n/r,i)/e.axisLength)*r}return t*e.bounds.range/e.axisLength+r}function c(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=s(t,b);return e.id=t.identifier,e}function c(t){for(var e=0;e1&&(y.attr(a(M[0],M[1])),i(y))}function h(t){for(var e=t.changedTouches,n=0;n1&&(y.attr(a(M[0],M[1])),i(y),t.preventDefault())}function f(t){d(t.changedTouches)}function d(t){for(var e=0;e=0&&M.splice(n,1)}}function p(t){M.length>1&&g(a(M[0],M[1])),d(t.changedTouches),r(y)}function m(t){0===t.button&&(A=s(t,b),y.attr(a(A,A)),i(y),t.preventDefault())}function v(e){if(0===e.button){var n=a(A,s(e,b));g(n),A=null,r(y),e.preventDefault()}else t.resetOnRightMouseBtn&&2===e.button&&(O(),e.preventDefault())}function g(t){if(t.width>5&&t.height>5){var n=t.x-S.x1,r=n+t.width,i=S.y1-t.y,a=i-t.height,s=u(n,w),o=u(r,w),c=u(a,E),l=u(i,E),h=e.options.explicitBounds;_.isUndefined(h)||(_.isUndefined(h.xLow)||(s=Math.max(h.xLow,s)),_.isUndefined(h.xHigh)||(o=Math.min(h.xHigh,o)),_.isUndefined(h.yLow)||(c=Math.max(h.yLow,c)),_.isUndefined(h.yHigh)||(l=Math.min(h.yHigh,l))),e.options.axisX.highLow={low:s,high:o},e.options.axisY.highLow={low:c,high:l},e.update(e.data,e.options),C&&C(e,O)}}function x(t){if(A){var e=s(t,b);y.attr(a(A,e)),t.preventDefault()}}if(e instanceof n.Line){var y,b,w,E,S,A,C=t.onZoom,M=[];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){w=t.axisX,E=t.axisY,S=t.chartRect,b=t.svg._node,y=t.svg.elem("rect",{x:10,y:10,width:100,height:100},"ct-zoom-rect"),r(y);var e=t.svg.querySelector("defs")||t.svg.elem("defs"),n=S.width(),i=S.height();e.elem("clipPath",{id:"zoom-mask"}).elem("rect",{x:S.x1,y:S.y2,width:n,height:i,fill:"white"}),b.addEventListener("mousedown",m),b.addEventListener("mouseup",v),b.addEventListener("mousemove",x),b.addEventListener("touchstart",l),b.addEventListener("touchmove",h),b.addEventListener("touchend",p),b.addEventListener("touchcancel",f)});var O=function(){e.options.axisX.highLow=null,e.options.axisY.highLow=null,e.update(e.data,e.options)}}}}}(window,document,Chartist),Chartist.plugins.zoom}),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e){for(var n=-1,r=t.length;++n-1&&t%1==0&&e>t}function f(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function d(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function p(t){return gn[t]}function m(){}function v(){}function g(t,e){return y(t,e)&&delete t[e]}function x(t,e){if(Gn){var n=t[e];return n===ye?ve:n}return $n.call(t,e)?t[e]:ve}function y(t,e){return Gn?t[e]!==ve:$n.call(t,e)}function b(t,e,n){t[e]=Gn&&n===ve?ye:n}function w(t){var e=-1,n=t?t.length:0;for(this.clear();++en)return!1;var r=t.length-1;return n==r?t.pop():Xn.call(t,n,1),!0}function T(t,e){var n=P(t,e);return 0>n?ve:t[n][1]}function I(t,e){return P(t,e)>-1}function P(t,e){for(var n=t.length;n--;)if(Yt(t[n][0],e))return n;return-1}function z(t,e,n){var r=P(t,e);0>r?t.push([e,n]):t[r][1]=n}function B(t,e,n){var r=t[e];$n.call(t,e)&&Yt(r,n)&&(n!==ve||e in t)||(t[e]=n)}function R(t,e){return t&&pt(e,se(e),t)}function U(t){return"function"==typeof t?t:de}function X(t){return ar(t)?t:Bt(t)}function Y(t,e,r,i,a,s,o){var u;if(i&&(u=s?i(t,a,s,o):i(t)),u!==ve)return u;if(!Gt(t))return t;var c=ar(t);if(c){if(u=Ot(t),!e)return dt(t,u)}else{var h=_t(t),f=h==Ne||h==$e;if(sr(t))return st(t,e);if(h==Te||h==Ce||f&&!s){if(l(t))return s?t:{};if(u=Lt(f?{}:t),!e)return u=R(u,t),r?vt(t,u):u}else{if(!mn[h])return s?t:{};u=Nt(t,h,e)}}o||(o=new M);var d=o.get(t);return d?d:(o.set(t,u),(c?n:q)(t,function(n,a){B(u,a,Y(n,e,r,i,a,t,o))}),r&&!c?vt(t,u):u)}function D(t){return Gt(t)?Rn(t):{}}function q(t,e){return t&&nr(t,e,se)}function F(t,e){e=kt(e,t)?[e+""]:X(e);for(var n=0,r=e.length;null!=t&&r>n;)t=t[e[n++]];return n&&n==r?t:ve}function H(t,e){return $n.call(t,e)||"object"==typeof t&&e in t&&null===zn(t)}function V(t,e){return e in Object(t)}function G(t,e,n,r,i){return t===e?!0:null==t||null==e||!Gt(t)&&!Wt(e)?t!==t&&e!==e:W(t,e,G,n,r,i)}function W(t,e,n,r,i,a){var s=ar(t),o=ar(e),u=_e,c=_e;s||(u=_t(t),u=u==Ce?Te:u),o||(c=_t(e),c=c==Ce?Te:c);var h=u==Te&&!l(t),f=c==Te&&!l(e),d=u==c;if(d&&!h)return a||(a=new M),s||te(t)?bt(t,e,n,r,i,a):wt(t,e,u,n,r,i,a);if(!(i&we)){var p=h&&$n.call(t,"__wrapped__"),m=f&&$n.call(e,"__wrapped__");if(p||m)return a||(a=new M),n(p?t.value():t,m?e.value():e,r,i,a)}return d?(a||(a=new M),Et(t,e,n,r,i,a)):!1}function Q(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=Object(t);i--;){var o=n[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++ie&&(e=-e>i?0:i+e),n=n>i?i:n,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++re?1:-1:ne(r)||0,it(e,n,r,t)}}function bt(t,e,n,r,i,s){var o=-1,u=i&we,c=i&be,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=s.get(t);if(f)return f==e;var d=!0;for(s.set(t,e);++o-1&&t%1==0&&Se>=t}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Wt(t){return!!t&&"object"==typeof t}function Qt(t){return null==t?!1:Ht(t)?kn.test(Nn.call(t)):Wt(t)&&(l(t)?kn:hn).test(t)}function Zt(t){return"number"==typeof t||Wt(t)&&jn.call(t)==ke}function Jt(t){return"string"==typeof t||!ar(t)&&Wt(t)&&jn.call(t)==ze}function Kt(t){return"symbol"==typeof t||Wt(t)&&jn.call(t)==Be}function te(t){return Wt(t)&&Vt(t.length)&&!!pn[jn.call(t)]}function ee(t){return t===ve}function ne(t){if(Gt(t)){var e=Ht(t.valueOf)?t.valueOf():t;t=Gt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(sn,"");var n=ln.test(t);return n||fn.test(t)?yn(t.slice(2),n?2:8):cn.test(t)?Ae:+t}function re(t){if("string"==typeof t)return t;if(null==t)return"";if(Kt(t))return tr?tr.call(t):"";var e=t+"";return"0"==e&&1/t==-Ee?"-0":e}function ie(t,e,n){var r=null==t?ve:F(t,e);return r===ve?n:r}function ae(t,e){return Mt(t,e,V)}function se(t){var e=It(t);if(!e&&!qt(t))return J(t);var n=$t(t),r=!!n,i=n||[],a=i.length;for(var s in t)!H(t,s)||r&&("length"==s||h(s,a))||e&&"constructor"==s||i.push(s);return i}function oe(t){return o(t,se(t))}function ue(t){return t=re(t),t&&Ke.test(t)?t.replace(Ze,c):t}function ce(t){return t=re(t),t&&an.test(t)?t.replace(rn,"\\$&"):t}function le(){var t=arguments,e=re(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function he(t){return t=re(t),t&&Je.test(t)?t.replace(Qe,p):t}function fe(t){return function(){return t}}function de(t){return t}function pe(t){return Z("function"==typeof t?t:Y(t,!0))}function me(t){return kt(t)?nt(t):rt(t)}var ve,ge="4.6.1",xe=200,ye="__lodash_hash_undefined__",be=1,we=2,Ee=1/0,Se=9007199254740991,Ae=NaN,Ce="[object Arguments]",_e="[object Array]",Me="[object Boolean]",Oe="[object Date]",Le="[object Error]",Ne="[object Function]",$e="[object GeneratorFunction]",je="[object Map]",ke="[object Number]",Te="[object Object]",Ie="[object RegExp]",Pe="[object Set]",ze="[object String]",Be="[object Symbol]",Re="[object WeakMap]",Ue="[object ArrayBuffer]",Xe="[object Float32Array]",Ye="[object Float64Array]",De="[object Int8Array]",qe="[object Int16Array]",Fe="[object Int32Array]",He="[object Uint8Array]",Ve="[object Uint8ClampedArray]",Ge="[object Uint16Array]",We="[object Uint32Array]",Qe=/&(?:amp|lt|gt|quot|#39|#96);/g,Ze=/[&<>"'`]/g,Je=RegExp(Qe.source),Ke=RegExp(Ze.source),tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,rn=/[\\^$.*+?()[\]{}|]/g,an=RegExp(rn.source),sn=/^\s+|\s+$/g,on=/\\(\\)?/g,un=/\w*$/,cn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,hn=/^\[object .+?Constructor\]$/,fn=/^0o[0-7]+$/i,dn=/^(?:0|[1-9]\d*)$/,pn={};pn[Xe]=pn[Ye]=pn[De]=pn[qe]=pn[Fe]=pn[He]=pn[Ve]=pn[Ge]=pn[We]=!0,pn[Ce]=pn[_e]=pn[Ue]=pn[Me]=pn[Oe]=pn[Le]=pn[Ne]=pn[je]=pn[ke]=pn[Te]=pn[Ie]=pn[Pe]=pn[ze]=pn[Re]=!1;var mn={};mn[Ce]=mn[_e]=mn[Ue]=mn[Me]=mn[Oe]=mn[Xe]=mn[Ye]=mn[De]=mn[qe]=mn[Fe]=mn[je]=mn[ke]=mn[Te]=mn[Ie]=mn[Pe]=mn[ze]=mn[Be]=mn[He]=mn[Ve]=mn[Ge]=mn[We]=!0,mn[Le]=mn[Ne]=mn[Re]=!1;var vn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},gn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},xn={"function":!0,object:!0},yn=parseInt,bn=xn[typeof exports]&&exports&&!exports.nodeType?exports:ve,wn=xn[typeof module]&&module&&!module.nodeType?module:ve,En=wn&&wn.exports===bn?bn:ve,Sn=u(bn&&wn&&"object"==typeof global&&global),An=u(xn[typeof self]&&self),Cn=u(xn[typeof window]&&window),_n=u(xn[typeof this]&&this),Mn=Sn||Cn!==(_n&&_n.window)&&Cn||An||_n||Function("return this")(),On=Array.prototype,Ln=Object.prototype,Nn=Function.prototype.toString,$n=Ln.hasOwnProperty,jn=Ln.toString,kn=RegExp("^"+Nn.call($n).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tn=En?Mn.Buffer:ve,In=Mn.Symbol,Pn=Mn.Uint8Array,zn=Object.getPrototypeOf,Bn=Object.getOwnPropertySymbols,Rn=Object.create,Un=Ln.propertyIsEnumerable,Xn=On.splice,Yn=Math.ceil,Dn=Object.keys,qn=Math.max,Fn=Ct(Mn,"Map"),Hn=Ct(Mn,"Set"),Vn=Ct(Mn,"WeakMap"),Gn=Ct(Object,"create"),Wn=Fn?Nn.call(Fn):"",Qn=Hn?Nn.call(Hn):"",Zn=Vn?Nn.call(Vn):"",Jn=In?In.prototype:ve,Kn=Jn?Jn.valueOf:ve,tr=Jn?Jn.toString:ve,er=gt(q),nr=xt(),rr=nt("length"),ir=Bn||function(){return[]};(Fn&&_t(new Fn)!=je||Hn&&_t(new Hn)!=Pe||Vn&&_t(new Vn)!=Re)&&(_t=function(t){var e=jn.call(t),n=e==Te?t.constructor:null,r="function"==typeof n?Nn.call(n):"";if(r)switch(r){case Wn:return je;case Qn:return Pe;case Zn:return Re}return e});var ar=Array.isArray,sr=Tn?function(t){return t instanceof Tn}:fe(!1),or=yt();v.prototype=Gn?Gn(null):Ln,w.prototype.clear=E,w.prototype["delete"]=S,w.prototype.get=A,w.prototype.has=C,w.prototype.set=_,M.prototype.clear=O,M.prototype["delete"]=L,M.prototype.get=N,M.prototype.has=$,M.prototype.set=j,m.constant=fe,m.iteratee=pe,m.keys=se,m.map=Xt,m.property=me,m.range=or,m.toPairs=oe,m.eq=Yt,m.escape=ue,m.escapeRegExp=ce,m.forEach=Ut,m.get=ie,m.hasIn=ae,m.identity=de,m.isArguments=Dt,m.isArray=ar,m.isArrayLike=qt,m.isArrayLikeObject=Ft,m.isBuffer=sr,m.isFunction=Ht,m.isLength=Vt,m.isNative=Qt,m.isNumber=Zt,m.isObject=Gt,m.isObjectLike=Wt,m.isString=Jt,m.isSymbol=Kt,m.isTypedArray=te,m.isUndefined=ee,m.last=Rt,m.replace=le,m.toNumber=ne,m.toString=re,m.unescape=he,m.each=Ut,m.VERSION=ge,(Cn||An||{})._=m,Mn._=m}.call(this),Math.log10=Math.log10||function(t){return Math.log(t)/Math.LN10},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 r=n;n.match(/^\{.*\}$/)||(n="{"+n+"}");var i=new RegExp(_.escapeRegExp(n),"g");t=t.replace(i,e[r])}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(){$(this).hasClass("no-close")||t.hide(this)}),$(".Dialog").on("click",function(t){t.stopImmediatePropagation()}),$(window).on("keydown",function(e){27==e.which&&t.hide(".Modal")})},t}(),notify=function(){var t,e,n={},r="#notif";return n.show=function(i,a){$(r).html(i),modal.show(r),clearTimeout(t),clearTimeout(e),_.isUndefined(a)||(t=setTimeout(n.hide,a))},n.hide=function(){var t=$(r);t.removeClass("visible"),e=setTimeout(function(){t.addClass("hidden")},250)},n.init=function(){$(r).on("click",function(){n.hide(this)})},n}();$().ready(function(){setInterval(function(){$(".anim-dots").each(function(t){var e=$(t),n=e.html()+".";5==n.length&&(n="."),e.html(n)})},1e3),$("input[type=number]").on("mousewheel",function(t){var e=+$(this).val(),n=+($(this).attr("step")||1),r=$(this).attr("min"),i=$(this).attr("max");if(t.wheelDelta>0?e+=n:e-=n,_.isUndefined(r)||(e=Math.max(e,r)),_.isUndefined(i)||(e=Math.min(e,i)),$(this).val(e),"createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!1,!0),$(this)[0].dispatchEvent(a)}else $(this)[0].fireEvent("onchange");t.preventDefault()}),modal.init(),notify.init()});var page_wifi=function(){function t(t,e){if(200!=e)return void n(5e3);t=JSON.parse(t);var a=!bool(t.result.inProgress)&&t.result.APs.length>0;if(n(a?15e3:1e3),a){var s=$("#ap-list");$(".AP").remove(),s.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 e=document.createElement("div"),n=$(e).data("ssid",t.essid).data("pwd",0!=t.enc).addClass("AP");t.essid==r.current&&n.addClass("selected");var a=document.createElement("div");$(a).addClass("inner").htmlAppend('
{0}
'.format(t.rssi_perc)).htmlAppend('
{0}
'.format(_.escape(t.essid))).htmlAppend('
{0}
'.format(i[t.enc]));n.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()}),e.appendChild(a),s[0].appendChild(e)}})}}function e(){$().get(_root+"/wifi/scan",t)}function n(t){setTimeout(e,t)}var r={},i=["Open","WEP","WPA","WPA2","WPA/WPA2"];return r.init=function(){e()},r}(),page_waveform=function(){function t(t){var e,n,r=window.matchMedia("screen and (min-width: 544px)"),i=!r.matches,s="FFT"==t.stats.format;s?(e="Frequency - [ Hz ]",n="Magnitude - [ mA ]"):(e="Sample time - [ ms ]",n="Current - [ mA ]");var o=Math.max(-t.stats.min,t.stats.max),l=Math.max(o,10);$("#stat-count").html(t.stats.count), -$("#stat-f-s").html(numfmt(t.stats.freq,2)),$("#stat-i-peak").html(numfmt(o,2)),$("#stat-i-rms").html(numfmt(t.stats.rms,2)),$(".stats").removeClass("invis");var h=s?t.stats.freq/t.stats.count:1e3/t.stats.freq,f=_.map(t.samples,function(t,e){return{x:e*h,y:t}}),d=[Chartist.plugins.zoom({resetOnRightMouseBtn:!0,onZoom:function(t,e){a=e,u=t.options.axisX.highLow,c=t.options.axisY.highLow}})];i||d.push(Chartist.plugins.ctAxisTitle({axisX:{axisTitle:e,offset:{x:0,y:55}},axisY:{axisTitle:n,flipText:!0,offset:{x:0,y:15}}}));var p,m,v,g;u?(p=u.high,m=u.low,v=c.high,g=c.low):(v=s?void 0:l,g=s?0:-l),new Chartist.Line("#chart",{series:[{name:"a",data:f}]},{showPoint:!1,showArea:s,fullWidth:!0,chartPadding:i?{right:20,bottom:5,left:0}:{right:25,bottom:30,left:25},series:{a:{lineSmooth:Chartist.Interpolation.monotoneCubic()}},axisX:{type:Chartist.AutoScaleAxis,high:p,low:m},axisY:{type:Chartist.AutoScaleAxis,high:v,low:g},explicitBounds:{xLow:0,yLow:s?0:void 0,xHigh:f[f.length-1].x},plugins:d})}function e(e,n){if(f=!1,200!=n)errorMsg("Request failed.",1e3);else{var i=JSON.parse(e);i.success?t(i):errorMsg("Sampling failed.",1e3)}d&&(m=setTimeout(r,Math.max(0,p-msElapsed(o))))}function n(){v.count=$("#count").val(),v.freq=$("#freq").val()*("fft"==s?2:1)}function r(){f&&(errorMsg("Request already pending - aborting."),l.abort()),f=!0,o=msNow();var t=v.count,n=v.freq,r=_root+"/measure/"+s+"?n="+t+"&fs="+n;return l=$().get(r,e,estimateLoadTime(n,t)),!0}function i(){p=+$("#ar-time").val(),n(),d=!d,d?r():clearTimeout(m),$("#ar-btn").toggleClass("btn-blue").toggleClass("btn-red").val(d?"Stop":"Auto")}var a,s,o,u,c,l,h={},f=!1,d=!1,p=1,m=-1,v={count:0,freq:0};return h.init=function(t){function e(){n(),r()}s=t,$("#load").on("click",e),$("#count,#freq").on("keyup",function(t){13==t.which&&e()}),$("#chart").on("contextmenu",function(t){return a&&a(),a=null,u=null,c=null,t.preventDefault(),!1}),$("#ar-btn").on("click",i)},h}(),page_spectrogram=function(){function t(t){var e,n,r,i;t=Math.log10(1+t),t>2&&(t=2),0>t&&(t=0);for(var a=0;a=o&&(e=o,r=s),o>=t){n=o,i=s;break}}var u=(t-e)/(n-e);e==n&&(u=0);var c=Math.round(r[1]+(i[1]-r[1])*u),l=Math.round(r[2]+(i[2]-r[2])*u),h=Math.round(r[3]+(i[3]-r[3])*u);return"rgb("+c+","+l+","+h+")"}function e(){var t=c.getImageData(g.x+g.dx,g.y,g.w-g.dx,g.h+10);c.fillStyle="black",c.fillRect(g.x,g.y,g.w,g.h),c.clearRect(g.x,g.y+g.h+1,g.w,10),c.putImageData(t,g.x,g.y)}function n(n){e();for(var r=x.sampCount/2,i=0;r>i;i++){var a;if(i*g.dy>g.h)break;a=i>n.length?"#000":t(n[i]),c.fillStyle=a;var s=g.x+g.w-g.dx,o=g.y+g.h-(i+1)*g.dy,u=g.dx,l=g.dy;o=950){p=msNow();var h=!1;msElapsed(m)>9500&&(h=!0,m=msNow()),c.strokeStyle="white",c.beginPath(),c.moveTo(g.x+g.w-.5,g.y+g.h+1),c.lineTo(g.x+g.w-.5,g.y+g.h+1+(h?6:2)),c.stroke()}}function r(t,e){if(h=!1,200==e)try{var r=JSON.parse(t);r.success?n(r.samples):errorMsg("Sampling failed.",1e3)}catch(a){errorMsg(a)}else errorMsg("Request failed.",1e3);y&&(l=setTimeout(i,Math.max(0,x.interval-msElapsed(d))))}function i(){h&&(errorMsg("Request already pending - aborting."),f.abort()),h=!0,d=msNow();var t=x.freq,e=x.sampCount,n=_root+"/measure/fft?n="+e+"&fs="+t;return f=$().get(n,r,estimateLoadTime(t,e)),!0}function a(){for(var e=8,n=10,r=g.h-12,i=g.y+6,a=g.x-e-n,s=100/r,o=0;r>o;o++){var u=t(o*s),l=t((o+1)*s),h=Math.floor(i+r-(o+1)),f=c.createLinearGradient(0,h+1,0,h);f.addColorStop(0,u),f.addColorStop(1,l),c.fillStyle=f,c.fillRect(a,h,n,1)}c.strokeStyle="#000",c.strokeRect(a-.5,i-.5,n+1,r+1),s=100/r,c.font="12px sans-serif",c.fillStyle="white",c.textAlign="right";for(var o=0;o<=g.h;o+=r/10)c.fillText(Math.round(o*s)+"",g.x-e-n-e,i+r-o+3)}function s(){var t=8,e=g.x+g.w,n=e+t,r=g.y,i=g.h,a=70;c.clearRect(e+.5,r-10,a,i+20);for(var s,o=x.freq/2/(x.sampCount/2),u=g.h/g.dy,l=u*o,h=[10,25,50],f=1,d=!1;;){for(var p=0;p=p;p+=s){if(p>=u){var m=p-u;if(m>s/2)break;p=u}var v=p*(l/u);v=v>=1e6?numfmt(v/1e6,2)+"M":v>=1e3?numfmt(v/1e3,2)+"k":numfmt(v,1);var y=Math.round(r+i-g.dy*p);if(c.fillText(v,n,y+4),c.beginPath(),c.moveTo(e,y+.5),c.lineTo(e+t/2,y+.5),c.stroke(),p>=u)break}c.font="16px sans-serif",c.save(),c.translate(e+50,g.y+g.h/2),c.rotate(Math.PI/2),c.textAlign="center",c.fillText("Frequency - [Hz]",0,0),c.restore()}function o(){x.interval=+$("#interval").val(),x.freq=2*+$("#freq").val(),x.sampCount=+$("#count").val(),g.dx=+$("#tile-x").val(),g.dy=+$("#tile-y").val()}function u(){c.fillStyle="#000",c.fillRect(g.x,g.y,g.w,g.h),c.strokeStyle="white",c.strokeRect(g.x-.5,g.y-.5,g.w+1,g.h+1)}var c,l,h,f,d,p,m,v={},g={x:50,y:10,w:740,h:512,dx:1,dy:1},x={interval:0,sampCount:0,freq:0},y=!1,b=[[0,0,0,0],[.1,41,17,41],[.25,34,17,78],[.6,17,30,105],[1,17,57,126],[1.2,17,84,128],[1.3,17,111,115],[1.4,17,134,96],[1.5,17,155,71],[1.6,68,194,17],[1.75,111,209,17],[1.84,180,213,17],[1.9,223,217,86],[1.97,248,222,176],[1.99,255,237,222],[2,255,255,255]];return v.init=function(){var t=$("#sg")[0];c=t.getContext("2d"),u(),o(),a(),s(),p=msNow()-1e4,m=msNow()-1e4,$("#count").on("change",function(){var t=+$("#count").val(),e=Math.max(1,g.h/(t/2));$("#tile-x").val(Math.max(4,e)),$("#tile-y").val(e)}),$("#tile-y").on("change",function(){$("#tile-x").val(Math.max(4,$(this).val()))}),$("#go-btn").on("click",function(){y=!y,y?(o(),s(),i()):clearTimeout(l),$("#go-btn").toggleClass("btn-green").toggleClass("btn-red").html(y?"Stop":"Start")})},v}(),page_status=function(){function t(t,a){if(200!=a)errorMsg("Update failed.");else try{var s=JSON.parse(t);n.j=s,$(".sta-only").toggle(s.sta),$(".ap-only").toggle(s.ap),$("#uptime").html(s.uptime),$("#heap").html(s.heap+" bytes"),$("#wmode").html(s.wifiMode),s.sta&&($("#staSSID").html(s.sta.SSID),$("#staRSSIperc").html(s.sta.RSSIperc),$("#staRSSI").html(s.sta.RSSI),$("#staMAC").html(s.sta.MAC)),s.ap&&($("#apSSID").html(s.ap.SSID),$("#apHidden").html(s.ap.hidden?"Yes":"No"),$("#apAuth").html(s.ap.auth),$(".ap-auth-only").toggle("Open"!=s.ap.auth),$("#apPwd").html(s.ap.pwd),$("#apChan").html(s.ap.chan),$("#apMAC").html(s.ap.MAC))}catch(o){errorMsg(o)}i||setTimeout(e,r)}function e(){$().get(_root+"/system/status",t)}var n={};n.j={};var r=1e4,i=!1;return n.trigReset=function(){var t="#reset-modal";$().get(_root+"/system/reset",function(n,r){if(200==r){modal.show(t),i=!0;var a=setInterval(function(){$().get(_root+"/system/ping",function(n,r){200==r&&(modal.hide(t),e(),clearInterval(a),i=!1)},{timeout:500})},1e3)}})},n.init=function(){e()},n}(),page_mon=function(){function t(t){$("#hasref").html(t?"OK":"Not set!")}function e(){var t=$("#rep-svc-xv")[0].checked;t?$(".xv-only").removeClass("hidden"):$(".xv-only").addClass("hidden")}var n={};return n.captureRef=function(){$().get(_root+"/mon/setref",function(e,n){if(200!=n)errorMsg("Operation failed.");else try{var r=JSON.parse(e);t(r.success)}catch(i){errorMsg(i),t(!1)}})},n.compareNow=function(){$().get(_root+"/mon/compare",function(t,e){if(200!=e)errorMsg("Operation failed.");else try{var n=JSON.parse(t);if(!n.success)throw"Capture failed.";$("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},n.init=function(){e(),$("#rep-svc-xv,#rep-svc-ts").on("change",e),setInterval(function(){$().get(_root+"/mon/status",function(t,e){if(200==e)try{var n=JSON.parse(t);n.success&&($("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2)))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},1e4)},n}(); \ No newline at end of file +function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function numfmt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function estimateLoadTime(t,e){return 1e3/t*e+1500}function msNow(){return+new Date}function msElapsed(t){return msNow()-t}function copyToClipboard(t){if(!document.execCommand)return!1;var e="_hiddenCopyText_";if(n=document.getElementById(e),!n){var n=document.createElement("textarea");n.style.position="absolute",n.style.left="-9999px",n.style.top="0",n.id=e,document.body.appendChild(n)}n.textContent=t;var r=document.activeElement;n.focus(),n.setSelectionRange(0,n.value.length);var i;try{i=document.execCommand("copy")}catch(a){i=!1}return r&&"function"==typeof r.focus&&r.focus(),n.textContent="",i}function errorMsg(t,e){$("#notif").addClass("error"),notify.show(t,e||3e3)}function infoMsg(t,e){$("#notif").removeClass("error"),notify.show(t,e||3e3)}!function(){"use strict";function t(){var t;for(p=!0,t=0;t=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function i(t,e){return t.currentStyle?t.currentStyle[r(e)]:g.getComputedStyle?g.getComputedStyle(t,null).getPropertyValue(e):null}function a(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function o(t,e,n){try{t.style[r(e)]=n}catch(i){}}function s(t){t.style.display="","none"===i(t,"display")&&(t.style.display="block")}function u(t){var e,r,i,o="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r0&&(o+="&"+a(e.name,e.value));break;case"select-multiple":for(i=0;i0?o.substring(1):""}function c(t,e,r){var i,a,o,s=!1;return t&&(i=t.split(/\s+/),n(function(t){for(o=0;o0?y[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},y),e},e.addClass=function(t){return t&&n(function(e){e.className+=" "+t},y),e},e.removeClass=function(t){return c(t,"remove",y),e},e.toggleClass=function(t){return c(t,"toggle",y),e},e.hasClass=function(t){return c(t,"has",y)},e.html=function(t){return t||""===t?(n(function(e){e.innerHTML=t},y),e):y[0]?y[0].innerHTML:void 0},e.htmlBefore=function(t){return l(t,"before",y),e},e.htmlAfter=function(t){return l(t,"after",y),e},e.htmlAppend=function(t){return l(t,"append",y),e},e.htmlPrepend=function(t){return l(t,"prepend",y),e},e.attr=function(t,r){if(t){if(t=t.toLowerCase(),"undefined"!=typeof r)return n(function(e){"style"===t?e.style.cssText=r:"class"===t?e.className=r:e.setAttribute(t,r)},y),e;if(y[0])if("style"===t){if(y[0].style.cssText)return y[0].style.cssText}else if("class"===t){if(y[0].className)return y[0].className}else if(y[0].getAttribute(t))return y[0].getAttribute(t)}},e.data=function(t,n){return t?e.attr("data-"+t,n):void 0},e.val=function(t){var r,i,a;if(!_.isUndefined(t))return n(function(e){switch(e.nodeName){case"SELECT":for(("string"==typeof t||"number"==typeof t)&&(t=[t]),i=0;i1?r:r[0];case"INPUT":case"TEXTAREA":case"BUTTON":return y[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)},y),e):!y[0]||"INPUT"!==y[0].nodeName||"checkbox"!==y[0].type&&"radio"!==y[0].type?void 0:!!y[0].checked},e.on=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.addEventListener(r,i,!1):v.attachEvent&&(t[r+i]=function(){return i.apply(t,arguments)},t.attachEvent("on"+r,t[r+i]))},y),e},e.off=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.removeEventListener(r,i,!1):v.attachEvent&&(t.detachEvent("on"+r,t[r+i]),t[r+i]=null)},y),e},e.ajax=function(t,e,n,r){var i,a,o=u(y),s=e?e.toUpperCase():"GET";_.isNumber(r)&&(r={timeout:r});var c=Chartist.extend({},{nocache:!0,timeout:5e3,loader:!0},r);if(o&&"GET"===s&&(t+=-1===t.indexOf("?")?"?"+o:"&"+o,o=null),i=new XMLHttpRequest){if(c.nocache){var l=(+new Date).toString(36);t+=(-1===t.indexOf("?")?"?":"&")+"_="+l}c.loader&&$("#loader").addClass("show"),i.open(s,t,!0),i.timeout=c.timeout,a=setTimeout(function(){errorMsg("XHR timed out."),i.abort(),c.loader&&$("#loader").removeClass("show")},c.timeout+10),i.onreadystatechange=function(){4===i.readyState&&(c.loader&&$("#loader").removeClass("show"),n&&0!=i.status&&n(i.responseText,i.status),clearTimeout(a))},i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===s&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.send(o)}return i},e.get=function(t,n,r){return e.ajax(t,"get",n,r)},e.post=function(t,n,r){return e.ajax(t,"post",n,r)},e}var f=[],d=[],p=!1,m=!1,v=document,g=window;v.addEventListener?(v.addEventListener("DOMContentLoaded",t,!1),g.addEventListener("load",e,!1)):v.attachEvent?(v.attachEvent("onreadystatechange",t),g.attachEvent("onload",e)):g.onload=e,g.$=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 r in e)"object"!=typeof e[r]||null===e[r]||e[r]instanceof Array?t[r]=e[r]:t[r]=n.extend({},t[r],e[r])}),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 r=[],i=Math.max.apply(null,t.map(function(t){return t.length}));return n.times(i).forEach(function(n,i){var a=t.map(function(t){return t[i]});r[i]=e.apply(null,a)}),r},n.roundWithPrecision=function(t,e){var r=Math.pow(10,e||n.precision);return Math.round(t*r)/r},n.precision=8,n.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),_.escape(t))},n.deserialize=function(t){if("string"!=typeof t)return t;t=_.unescape(t);try{t=JSON.parse(t),t=void 0!==t.data?t.data:t}catch(e){}return t},n.createSvg=function(t,e,r,i){var a;return e=e||"100%",r=r||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(n.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),a=new n.Svg("svg").attr({width:e,height:r}).addClass(i).attr({style:"width: "+e+"; height: "+r+";"}),t.appendChild(a._node),a},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,r=n.getDataArray(t);e=r.every(function(t){return t instanceof Array})?Math.max.apply(null,r.map(function(t){return t.length})):r.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;ea.high&&(a.high=n),s&&n0?a.low=0:(a.high=1,a.low=0)),a},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 r,i=2,a=2;if(t%2===0)return 2;do i=n(i)%t,a=n(n(a))%t,r=e(Math.abs(i-a),t);while(1===r);return r},n.getBounds=function(t,e,r,i){var a,o,s,u=0,c={high:e.high,low:e.low};c.valueRange=c.high-c.low,c.oom=n.orderOfMagnitude(c.valueRange),c.step=Math.pow(10,c.oom),c.min=Math.floor(c.low/c.step)*c.step,c.max=Math.ceil(c.high/c.step)*c.step,c.range=c.max-c.min,c.numberOfSteps=Math.round(c.range/c.step);var l=n.projectLength(t,c.step,c),h=r>l,f=i?n.rho(c.range):0;if(i&&n.projectLength(t,1,c)>=r)c.step=1;else if(i&&f=r)c.step=f;else for(;;){if(h&&n.projectLength(t,c.step,c)<=r)c.step*=2;else{if(h||!(n.projectLength(t,c.step/2,c)>=r))break;if(c.step/=2,i&&c.step%1!==0){c.step*=2;break}}if(u++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(o=c.min,s=c.max;o+c.step<=c.low;)o+=c.step;for(;s-c.step>=c.high;)s-=c.step;for(c.min=o,c.max=s,c.range=c.max-c.min,c.values=[],a=c.min;a<=c.max;a+=c.step)c.values.push(n.roundWithPrecision(a));return c},n.createChartRect=function(t,e,r){var i=!(!e.axisX&&!e.axisY),a=i?e.axisY.offset:0,o=i?e.axisX.offset:0,s=t.width()||n.quantity(e.width).value||0,u=t.height()||n.quantity(e.height).value||0,c=n.normalizePadding(e.chartPadding,r);s=Math.max(s,a+c.left+c.right),u=Math.max(u,o+c.top+c.bottom);var l={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return i?("start"===e.axisX.position?(l.y2=c.top+o,l.y1=Math.max(u-c.bottom,l.y2+1)):(l.y2=c.top,l.y1=Math.max(u-c.bottom-o,l.y2+1)),"start"===e.axisY.position?(l.x1=c.left+a,l.x2=Math.max(s-c.right,l.x1+1)):(l.x1=c.left,l.x2=Math.max(s-c.right-a,l.x1+1))):(l.x1=c.left,l.x2=Math.max(s-c.right,l.x1+1),l.y2=c.top,l.y1=Math.max(u-c.bottom,l.y2+1)),l},n.createGrid=function(t,e,r,i,a,o,s,u){var c={};c[r.units.pos+"1"]=Math.round(t)+.5,c[r.units.pos+"2"]=Math.round(t)+.5,c[r.counterUnits.pos+"1"]=i,c[r.counterUnits.pos+"2"]=i+a;var l=o.elem("line",c,s.join(" "));u.emit("draw",n.extend({type:"grid",axis:r,index:e,group:o,element:l},c))},n.createLabel=function(t,e,r,i,a,o,s,u,c,l,h){var f,d={};d[a.units.pos]=t+s[a.units.pos],d[a.counterUnits.pos]=s[a.counterUnits.pos],d[a.units.len]=e,d[a.counterUnits.len]=o-10;var p=i[r];if(_.isNumber(p)&&(p=n.roundWithPrecision(p,2)),l){var m=''+p+"";f=u.foreignObject(m,n.extend({style:"overflow: visible;"},d))}else f=u.elem("text",d,c.join(" ")).text(p);h.emit("draw",n.extend({type:"label",axis:a,index:r,group:u,element:f,text:p},d))},n.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var r=e.series[t.name];return r.hasOwnProperty(n)?r[n]:e[n]}return e[n]},n.optionsProvider=function(e,r,i){function a(e){var a=s;if(s=n.extend({},c),r)for(u=0;u=2&&e[a]<=e[a-2]?i=!0:(i&&(r.push({pathCoordinates:[],valueData:[]}),i=!1),r[r.length-1].pathCoordinates.push(e[a],e[a+1]),r[r.length-1].valueData.push(n[a/2]));return r}var r={fillHoles:!1};return t=n.extend({},r,t),function i(t,r){var a=e(t,r);if(a.length){if(a.length>1){var o=[];return a.forEach(function(t){o.push(i(t.pathCoordinates,t.valueData))}),n.Svg.Path.join(o)}if(t=a[0].pathCoordinates,r=a[0].valueData,t.length<=4)return n.Interpolation.none()(t,r);var s,u,c=[],l=[],h=t.length/2,f=[],d=[],p=[],m=[];for(s=0;h>s;s++)c[s]=t[2*s],l[s]=t[2*s+1];for(s=0;h-1>s;s++)p[s]=l[s+1]-l[s],m[s]=c[s+1]-c[s],d[s]=p[s]/m[s];for(f[0]=d[0],f[h-1]=d[h-2],s=1;h-1>s;s++)0===d[s]||0===d[s-1]||d[s-1]>0!=d[s]>0?f[s]=0:(f[s]=3*(m[s-1]+m[s])/((2*m[s]+m[s-1])/d[s-1]+(m[s]+2*m[s-1])/d[s]),isFinite(f[s])||(f[s]=0));for(u=(new n.Svg.Path).move(c[0],l[0],!1,r[0]),s=0;h-1>s;s++)u.curve(c[s]+m[s]/3,l[s]+f[s]*m[s]/3,c[s+1]-m[s]/3,l[s+1]-f[s+1]*m[s]/3,c[s+1],l[s+1],!1,r[s+1]);return u}return n.Interpolation.none()([])}},n.Interpolation.step=function(t){var e={postpone:!0,fillHoles:!1};return t=n.extend({},e,t),function(e,r){for(var i,a,o,s=new n.Svg.Path,u=0;u1}).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,g).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,g)}).forEach(function(n){var s=u.elem("path",{d:n.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized[o],path:n.clone(),series:a,seriesIndex:o,axisX:r,axisY:i,chartRect:c,index:o,group:u,element:s})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:i.bounds,chartRect:c,axisX:r,axisY:i,svg:this.svg,options:t})}function i(t,e,r,i){n.Line["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),function(t,e,n){"use strict";function r(t){this.data=n.normalizeData(this.data);var e,r={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 i=this.svg.elem("g").addClass(t.classNames.gridGroup),o=this.svg.elem("g"),s=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==r.normalized.length){var u=n.serialMap(r.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([u],n.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y")}else e=n.getHighLow(r.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 c,l,h,f,d,p=n.createChartRect(this.svg,t,a.padding);l=t.distributeSeries&&t.stackBars?r.raw.labels.slice(0,1):r.raw.labels,t.horizontalBars?(c=f=void 0===t.axisX.type?new n.AutoScaleAxis(n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})):t.axisX.type.call(n,n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})),h=d=void 0===t.axisY.type?new n.StepAxis(n.Axis.units.y,r,p,{ticks:l}):t.axisY.type.call(n,n.Axis.units.y,r,p,t.axisY)):(h=f=void 0===t.axisX.type?new n.StepAxis(n.Axis.units.x,r,p,{ticks:l}):t.axisX.type.call(n,n.Axis.units.x,r,p,t.axisX),c=d=void 0===t.axisY.type?new n.AutoScaleAxis(n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})):t.axisY.type.call(n,n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})));var m=t.horizontalBars?p.x1+c.projectValue(0):p.y1-c.projectValue(0),v=[];h.createGridAndLabels(i,s,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(i,s,this.supportsForeignObject,t,this.eventEmitter),r.raw.series.forEach(function(e,i){var a,s,u=i-(r.raw.series.length-1)/2;a=t.distributeSeries&&!t.stackBars?h.axisLength/r.normalized.length/2:t.distributeSeries&&t.stackBars?h.axisLength/2:h.axisLength/r.normalized[i].length/2,s=o.elem("g"),s.attr({"ct:series-name":e.name,"ct:meta":n.serialize(e.meta)}),s.addClass([t.classNames.series,e.className||t.classNames.series+"-"+n.alphaNumerate(i)].join(" ")),r.normalized[i].forEach(function(o,l){var g,x,y,b;if(b=t.distributeSeries&&!t.stackBars?i:t.distributeSeries&&t.stackBars?0:l,g=t.horizontalBars?{x:p.x1+c.projectValue(o&&o.x?o.x:0,l,r.normalized[i]),y:p.y1-h.projectValue(o&&o.y?o.y:0,b,r.normalized[i])}:{x:p.x1+h.projectValue(o&&o.x?o.x:0,b,r.normalized[i]),y:p.y1-c.projectValue(o&&o.y?o.y:0,l,r.normalized[i])},h instanceof n.StepAxis&&(h.options.stretch||(g[h.units.pos]+=a*(t.horizontalBars?-1:1)),g[h.units.pos]+=t.stackBars||t.distributeSeries?0:u*t.seriesBarDistance*(t.horizontalBars?-1:1)),y=v[l]||m,v[l]=y-(m-g[h.counterUnits.pos]),void 0!==o){var w={};w[h.units.pos+"1"]=g[h.units.pos],w[h.units.pos+"2"]=g[h.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(w[h.counterUnits.pos+"1"]=m,w[h.counterUnits.pos+"2"]=g[h.counterUnits.pos]):(w[h.counterUnits.pos+"1"]=y,w[h.counterUnits.pos+"2"]=v[l]),w.x1=Math.min(Math.max(w.x1,p.x1),p.x2),w.x2=Math.min(Math.max(w.x2,p.x1),p.x2),w.y1=Math.min(Math.max(w.y1,p.y2),p.y1),w.y2=Math.min(Math.max(w.y2,p.y2),p.y1),x=s.elem("line",w,t.classNames.bar).attr({"ct:value":[o.x,o.y].filter(n.isNum).join(","),"ct:meta":n.getMetaData(e,l)}),this.eventEmitter.emit("draw",n.extend({type:"bar",value:o,index:l,meta:n.getMetaData(e,l),series:e,seriesIndex:i,axisX:f,axisY:d,chartRect:p,group:s,element:x},w))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:p,axisX:f,axisY:d,svg:this.svg,options:t})}function i(t,e,r,i){n.Bar["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),t}),function(t,e){t["Chartist.plugins.ctAxisTitle"]=e()}(this,function(){return function(t,e,n){"use strict";var r={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipText:!1},i={axisX:r,axisY:r};n.plugins=n.plugins||{},n.plugins.ctAxisTitle=function(t){return t=n.extend({},i,t),function(e){e.on("created",function(e){var r,i,a;if(t.axisX.axisTitle&&e.axisX&&(r=e.axisX.axisLength/2+e.options.axisY.offset+e.options.chartPadding.left,i=e.options.chartPadding.top,"end"===e.options.axisY.position&&(r-=e.options.axisY.offset),"end"===e.options.axisX.position&&(i+=e.axisY.axisLength),a=new n.Svg("text"),a.addClass(t.axisX.axisClass),a.text(t.axisX.axisTitle),a.attr({x:r+t.axisX.offset.x,y:i+t.axisX.offset.y,"text-anchor":t.axisX.textAnchor}),e.svg.append(a,!0)),t.axisY.axisTitle&&e.axisY){r=0,i=e.axisY.axisLength/2+e.options.chartPadding.top,"start"===e.options.axisX.position&&(i+=e.options.axisX.offset),"end"===e.options.axisY.position&&(r=e.axisX.axisLength);var o="rotate("+(t.axisY.flipText?-90:90)+", "+r+", "+i+")";a=new n.Svg("text"),a.addClass(t.axisY.axisClass),a.text(t.axisY.axisTitle),a.attr({x:r+t.axisY.offset.x,y:i+t.axisY.offset.y,transform:o,"text-anchor":t.axisY.textAnchor}),e.svg.append(a,!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 r(t){t.attr({style:"display:none"})}function i(t){t.attr({style:"display:block"})}function a(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r;return 0>i&&(i=-i,n=e.x),0>a&&(a=-a,r=e.y),{x:n,y:r,width:i,height:a}}function o(t,e){return s(t.clientX,t.clientY,e)}function s(t,e,n){var r="svg"===n.tagName?n:n.ownerSVGElement,i=r.getScreenCTM(),a=r.createSVGPoint();return a.x=t,a.y=e,a=a.matrixTransform(i.inverse()),a||{x:0,y:0}}function u(t,e){var n=e.bounds.max,r=e.bounds.min;if(e.scale&&"log"===e.scale.type){var i=e.scale.base;return Math.pow(i,t*c(n/r,i)/e.axisLength)*r}return t*e.bounds.range/e.axisLength+r}function c(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 s(t){var e=o(t,b);return e.id=t.identifier,e}function c(t){for(var e=0;e1&&(y.attr(a(M[0],M[1])),i(y))}function h(t){for(var e=t.changedTouches,n=0;n1&&(y.attr(a(M[0],M[1])),i(y),t.preventDefault())}function f(t){d(t.changedTouches)}function d(t){for(var e=0;e=0&&M.splice(n,1)}}function p(t){M.length>1&&g(a(M[0],M[1])),d(t.changedTouches),r(y)}function m(t){0===t.button&&(A=o(t,b),y.attr(a(A,A)),i(y),t.preventDefault())}function v(e){if(0===e.button){var n=a(A,o(e,b));g(n),A=null,r(y),e.preventDefault()}else t.resetOnRightMouseBtn&&2===e.button&&(O(),e.preventDefault())}function g(t){if(t.width>5&&t.height>5){var n=t.x-S.x1,r=n+t.width,i=S.y1-t.y,a=i-t.height,o=u(n,w),s=u(r,w),c=u(a,E),l=u(i,E),h=e.options.explicitBounds;_.isUndefined(h)||(_.isUndefined(h.xLow)||(o=Math.max(h.xLow,o)),_.isUndefined(h.xHigh)||(s=Math.min(h.xHigh,s)),_.isUndefined(h.yLow)||(c=Math.max(h.yLow,c)),_.isUndefined(h.yHigh)||(l=Math.min(h.yHigh,l))),e.options.axisX.highLow={low:o,high:s},e.options.axisY.highLow={low:c,high:l},e.update(e.data,e.options),C&&C(e,O)}}function x(t){if(A){var e=o(t,b);y.attr(a(A,e)),t.preventDefault()}}if(e instanceof n.Line){var y,b,w,E,S,A,C=t.onZoom,M=[];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){w=t.axisX,E=t.axisY,S=t.chartRect,b=t.svg._node,y=t.svg.elem("rect",{x:10,y:10,width:100,height:100},"ct-zoom-rect"),r(y);var e=t.svg.querySelector("defs")||t.svg.elem("defs"),n=S.width(),i=S.height();e.elem("clipPath",{id:"zoom-mask"}).elem("rect",{x:S.x1,y:S.y2,width:n,height:i,fill:"white"}),b.addEventListener("mousedown",m),b.addEventListener("mouseup",v),b.addEventListener("mousemove",x),b.addEventListener("touchstart",l),b.addEventListener("touchmove",h),b.addEventListener("touchend",p),b.addEventListener("touchcancel",f)});var O=function(){e.options.axisX.highLow=null,e.options.axisY.highLow=null,e.update(e.data,e.options)}}}}}(window,document,Chartist),Chartist.plugins.zoom}),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e){for(var n=-1,r=t.length;++n-1&&t%1==0&&e>t}function f(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function d(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function p(t){return gn[t]}function m(){}function v(){}function g(t,e){return y(t,e)&&delete t[e]}function x(t,e){if(Gn){var n=t[e];return n===ye?ve:n}return Nn.call(t,e)?t[e]:ve}function y(t,e){return Gn?t[e]!==ve:Nn.call(t,e)}function b(t,e,n){t[e]=Gn&&n===ve?ye:n}function w(t){var e=-1,n=t?t.length:0;for(this.clear();++en)return!1;var r=t.length-1;return n==r?t.pop():Xn.call(t,n,1),!0}function T(t,e){var n=P(t,e);return 0>n?ve:t[n][1]}function I(t,e){return P(t,e)>-1}function P(t,e){for(var n=t.length;n--;)if(Yt(t[n][0],e))return n;return-1}function z(t,e,n){var r=P(t,e);0>r?t.push([e,n]):t[r][1]=n}function B(t,e,n){var r=t[e];Nn.call(t,e)&&Yt(r,n)&&(n!==ve||e in t)||(t[e]=n)}function R(t,e){return t&&pt(e,oe(e),t)}function U(t){return"function"==typeof t?t:de}function X(t){return ar(t)?t:Bt(t)}function Y(t,e,r,i,a,o,s){var u;if(i&&(u=o?i(t,a,o,s):i(t)),u!==ve)return u;if(!Gt(t))return t;var c=ar(t);if(c){if(u=Ot(t),!e)return dt(t,u)}else{var h=_t(t),f=h==$e||h==Ne;if(or(t))return ot(t,e);if(h==Te||h==Ce||f&&!o){if(l(t))return o?t:{};if(u=Lt(f?{}:t),!e)return u=R(u,t),r?vt(t,u):u}else{if(!mn[h])return o?t:{};u=$t(t,h,e)}}s||(s=new M);var d=s.get(t);return d?d:(s.set(t,u),(c?n:D)(t,function(n,a){B(u,a,Y(n,e,r,i,a,t,s))}),r&&!c?vt(t,u):u)}function q(t){return Gt(t)?Rn(t):{}}function D(t,e){return t&&nr(t,e,oe)}function F(t,e){e=kt(e,t)?[e+""]:X(e);for(var n=0,r=e.length;null!=t&&r>n;)t=t[e[n++]];return n&&n==r?t:ve}function H(t,e){return Nn.call(t,e)||"object"==typeof t&&e in t&&null===zn(t)}function V(t,e){return e in Object(t)}function G(t,e,n,r,i){return t===e?!0:null==t||null==e||!Gt(t)&&!Wt(e)?t!==t&&e!==e:W(t,e,G,n,r,i)}function W(t,e,n,r,i,a){var o=ar(t),s=ar(e),u=_e,c=_e;o||(u=_t(t),u=u==Ce?Te:u),s||(c=_t(e),c=c==Ce?Te:c);var h=u==Te&&!l(t),f=c==Te&&!l(e),d=u==c;if(d&&!h)return a||(a=new M),o||te(t)?bt(t,e,n,r,i,a):wt(t,e,u,n,r,i,a);if(!(i&we)){var p=h&&Nn.call(t,"__wrapped__"),m=f&&Nn.call(e,"__wrapped__");if(p||m)return a||(a=new M),n(p?t.value():t,m?e.value():e,r,i,a)}return d?(a||(a=new M),Et(t,e,n,r,i,a)):!1}function Q(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++ie&&(e=-e>i?0:i+e),n=n>i?i:n,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++re?1:-1:ne(r)||0,it(e,n,r,t)}}function bt(t,e,n,r,i,o){var s=-1,u=i&we,c=i&be,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=o.get(t);if(f)return f==e;var d=!0;for(o.set(t,e);++s-1&&t%1==0&&Se>=t}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Wt(t){return!!t&&"object"==typeof t}function Qt(t){return null==t?!1:Ht(t)?kn.test($n.call(t)):Wt(t)&&(l(t)?kn:hn).test(t)}function Jt(t){return"number"==typeof t||Wt(t)&&jn.call(t)==ke}function Zt(t){return"string"==typeof t||!ar(t)&&Wt(t)&&jn.call(t)==ze}function Kt(t){return"symbol"==typeof t||Wt(t)&&jn.call(t)==Be}function te(t){return Wt(t)&&Vt(t.length)&&!!pn[jn.call(t)]}function ee(t){return t===ve}function ne(t){if(Gt(t)){var e=Ht(t.valueOf)?t.valueOf():t;t=Gt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(on,"");var n=ln.test(t);return n||fn.test(t)?yn(t.slice(2),n?2:8):cn.test(t)?Ae:+t}function re(t){if("string"==typeof t)return t;if(null==t)return"";if(Kt(t))return tr?tr.call(t):"";var e=t+"";return"0"==e&&1/t==-Ee?"-0":e}function ie(t,e,n){var r=null==t?ve:F(t,e);return r===ve?n:r}function ae(t,e){return Mt(t,e,V)}function oe(t){var e=It(t);if(!e&&!Dt(t))return Z(t);var n=Nt(t),r=!!n,i=n||[],a=i.length;for(var o in t)!H(t,o)||r&&("length"==o||h(o,a))||e&&"constructor"==o||i.push(o);return i}function se(t){return s(t,oe(t))}function ue(t){return t=re(t),t&&Ke.test(t)?t.replace(Je,c):t}function ce(t){return t=re(t),t&&an.test(t)?t.replace(rn,"\\$&"):t}function le(){var t=arguments,e=re(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function he(t){return t=re(t),t&&Ze.test(t)?t.replace(Qe,p):t}function fe(t){return function(){return t}}function de(t){return t}function pe(t){return J("function"==typeof t?t:Y(t,!0))}function me(t){return kt(t)?nt(t):rt(t)}var ve,ge="4.6.1",xe=200,ye="__lodash_hash_undefined__",be=1,we=2,Ee=1/0,Se=9007199254740991,Ae=NaN,Ce="[object Arguments]",_e="[object Array]",Me="[object Boolean]",Oe="[object Date]",Le="[object Error]",$e="[object Function]",Ne="[object GeneratorFunction]",je="[object Map]",ke="[object Number]",Te="[object Object]",Ie="[object RegExp]",Pe="[object Set]",ze="[object String]",Be="[object Symbol]",Re="[object WeakMap]",Ue="[object ArrayBuffer]",Xe="[object Float32Array]",Ye="[object Float64Array]",qe="[object Int8Array]",De="[object Int16Array]",Fe="[object Int32Array]",He="[object Uint8Array]",Ve="[object Uint8ClampedArray]",Ge="[object Uint16Array]",We="[object Uint32Array]",Qe=/&(?:amp|lt|gt|quot|#39|#96);/g,Je=/[&<>"'`]/g,Ze=RegExp(Qe.source),Ke=RegExp(Je.source),tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,rn=/[\\^$.*+?()[\]{}|]/g,an=RegExp(rn.source),on=/^\s+|\s+$/g,sn=/\\(\\)?/g,un=/\w*$/,cn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,hn=/^\[object .+?Constructor\]$/,fn=/^0o[0-7]+$/i,dn=/^(?:0|[1-9]\d*)$/,pn={};pn[Xe]=pn[Ye]=pn[qe]=pn[De]=pn[Fe]=pn[He]=pn[Ve]=pn[Ge]=pn[We]=!0,pn[Ce]=pn[_e]=pn[Ue]=pn[Me]=pn[Oe]=pn[Le]=pn[$e]=pn[je]=pn[ke]=pn[Te]=pn[Ie]=pn[Pe]=pn[ze]=pn[Re]=!1;var mn={};mn[Ce]=mn[_e]=mn[Ue]=mn[Me]=mn[Oe]=mn[Xe]=mn[Ye]=mn[qe]=mn[De]=mn[Fe]=mn[je]=mn[ke]=mn[Te]=mn[Ie]=mn[Pe]=mn[ze]=mn[Be]=mn[He]=mn[Ve]=mn[Ge]=mn[We]=!0,mn[Le]=mn[$e]=mn[Re]=!1;var vn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},gn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},xn={"function":!0,object:!0},yn=parseInt,bn=xn[typeof exports]&&exports&&!exports.nodeType?exports:ve,wn=xn[typeof module]&&module&&!module.nodeType?module:ve,En=wn&&wn.exports===bn?bn:ve,Sn=u(bn&&wn&&"object"==typeof global&&global),An=u(xn[typeof self]&&self),Cn=u(xn[typeof window]&&window),_n=u(xn[typeof this]&&this),Mn=Sn||Cn!==(_n&&_n.window)&&Cn||An||_n||Function("return this")(),On=Array.prototype,Ln=Object.prototype,$n=Function.prototype.toString,Nn=Ln.hasOwnProperty,jn=Ln.toString,kn=RegExp("^"+$n.call(Nn).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tn=En?Mn.Buffer:ve,In=Mn.Symbol,Pn=Mn.Uint8Array,zn=Object.getPrototypeOf,Bn=Object.getOwnPropertySymbols,Rn=Object.create,Un=Ln.propertyIsEnumerable,Xn=On.splice,Yn=Math.ceil,qn=Object.keys,Dn=Math.max,Fn=Ct(Mn,"Map"),Hn=Ct(Mn,"Set"),Vn=Ct(Mn,"WeakMap"),Gn=Ct(Object,"create"),Wn=Fn?$n.call(Fn):"",Qn=Hn?$n.call(Hn):"",Jn=Vn?$n.call(Vn):"",Zn=In?In.prototype:ve,Kn=Zn?Zn.valueOf:ve,tr=Zn?Zn.toString:ve,er=gt(D),nr=xt(),rr=nt("length"),ir=Bn||function(){return[]};(Fn&&_t(new Fn)!=je||Hn&&_t(new Hn)!=Pe||Vn&&_t(new Vn)!=Re)&&(_t=function(t){var e=jn.call(t),n=e==Te?t.constructor:null,r="function"==typeof n?$n.call(n):"";if(r)switch(r){case Wn:return je;case Qn:return Pe;case Jn:return Re}return e});var ar=Array.isArray,or=Tn?function(t){return t instanceof Tn}:fe(!1),sr=yt();v.prototype=Gn?Gn(null):Ln,w.prototype.clear=E,w.prototype["delete"]=S,w.prototype.get=A,w.prototype.has=C,w.prototype.set=_,M.prototype.clear=O,M.prototype["delete"]=L,M.prototype.get=$,M.prototype.has=N,M.prototype.set=j,m.constant=fe,m.iteratee=pe,m.keys=oe,m.map=Xt,m.property=me,m.range=sr,m.toPairs=se,m.eq=Yt,m.escape=ue,m.escapeRegExp=ce,m.forEach=Ut,m.get=ie,m.hasIn=ae,m.identity=de,m.isArguments=qt,m.isArray=ar,m.isArrayLike=Dt,m.isArrayLikeObject=Ft,m.isBuffer=or,m.isFunction=Ht,m.isLength=Vt,m.isNative=Qt,m.isNumber=Jt,m.isObject=Gt,m.isObjectLike=Wt,m.isString=Zt,m.isSymbol=Kt,m.isTypedArray=te,m.isUndefined=ee,m.last=Rt,m.replace=le,m.toNumber=ne,m.toString=re,m.unescape=he,m.each=Ut,m.VERSION=ge,(Cn||An||{})._=m,Mn._=m}.call(this),Math.log10=Math.log10||function(t){return Math.log(t)/Math.LN10},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 r=n;n.match(/^\{.*\}$/)||(n="{"+n+"}");var i=new RegExp(_.escapeRegExp(n),"g");t=t.replace(i,e[r])}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(){$(this).hasClass("no-close")||t.hide(this)}),$(".Dialog").on("click",function(t){t.stopImmediatePropagation()}),$(window).on("keydown",function(e){27==e.which&&t.hide(".Modal")})},t}(),notify=function(){var t,e,n={},r="#notif";return n.show=function(i,a){$(r).html(i),modal.show(r),clearTimeout(t),clearTimeout(e),_.isUndefined(a)||(t=setTimeout(n.hide,a))},n.hide=function(){var t=$(r);t.removeClass("visible"),e=setTimeout(function(){t.addClass("hidden")},250)},n.init=function(){$(r).on("click",function(){n.hide(this)})},n}();$().ready(function(){setInterval(function(){$(".anim-dots").each(function(t){var e=$(t),n=e.html()+".";5==n.length&&(n="."),e.html(n)})},1e3),$("input[type=number]").on("mousewheel",function(t){var e=+$(this).val(),n=+($(this).attr("step")||1),r=$(this).attr("min"),i=$(this).attr("max");if(t.wheelDelta>0?e+=n:e-=n,_.isUndefined(r)||(e=Math.max(e,r)),_.isUndefined(i)||(e=Math.min(e,i)),$(this).val(e),"createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!1,!0),$(this)[0].dispatchEvent(a)}else $(this)[0].fireEvent("onchange");t.preventDefault()}),modal.init(),notify.init()});var page_wifi=function(){function t(t,e){if(200!=e)return void n(5e3);t=JSON.parse(t);var a=!bool(t.result.inProgress)&&t.result.APs.length>0;if(n(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 e=document.createElement("div"),n=$(e).data("ssid",t.essid).data("pwd",0!=t.enc).addClass("AP");t.essid==r.current&&n.addClass("selected");var a=document.createElement("div");$(a).addClass("inner").htmlAppend('
{0}
'.format(t.rssi_perc)).htmlAppend('
{0}
'.format(_.escape(t.essid))).htmlAppend('
{0}
'.format(i[t.enc]));n.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()}),e.appendChild(a), +o[0].appendChild(e)}})}}function e(){$().get(_root+"/wifi/scan",t)}function n(t){setTimeout(e,t)}var r={},i=["Open","WEP","WPA","WPA2","WPA/WPA2"];return r.init=function(){e()},r}(),page_waveform=function(){function t(t){var e,n,r=window.matchMedia("screen and (min-width: 544px)"),i=!r.matches,o="FFT"==t.stats.format;o?(e="Frequency - [ Hz ]",n="Magnitude - [ mA ]"):(e="Sample time - [ ms ]",n="Current - [ mA ]");var s=Math.max(-t.stats.min,t.stats.max),l=Math.max(s,10);$("#stat-count").html(t.stats.count),$("#stat-f-s").html(numfmt(t.stats.freq,2)),$("#stat-i-peak").html(numfmt(s,2)),$("#stat-i-rms").html(numfmt(t.stats.rms,2)),$(".stats").removeClass("invis");var h=o?t.stats.freq/t.stats.count:1e3/t.stats.freq,f=_.map(t.samples,function(t,e){return{x:e*h,y:t}}),d=[Chartist.plugins.zoom({resetOnRightMouseBtn:!0,onZoom:function(t,e){a=e,u=t.options.axisX.highLow,c=t.options.axisY.highLow}})];i||d.push(Chartist.plugins.ctAxisTitle({axisX:{axisTitle:e,offset:{x:0,y:55}},axisY:{axisTitle:n,flipText:!0,offset:{x:0,y:15}}}));var p,m,v,g;u?(p=u.high,m=u.low,v=c.high,g=c.low):(v=o?void 0:l,g=o?0:-l),new Chartist.Line("#chart",{series:[{name:"a",data:f}]},{showPoint:!1,showArea:o,fullWidth:!0,chartPadding:i?{right:20,bottom:5,left:0}:{right:25,bottom:30,left:25},series:{a:{lineSmooth:Chartist.Interpolation.monotoneCubic()}},axisX:{type:Chartist.AutoScaleAxis,high:p,low:m},axisY:{type:Chartist.AutoScaleAxis,high:v,low:g},explicitBounds:{xLow:0,yLow:o?0:void 0,xHigh:f[f.length-1].x},plugins:d})}function e(e,n){if(f=!1,200!=n)errorMsg("Request failed.",1e3);else{var i=JSON.parse(e);i.success?($(".chartexport").removeClass("hidden"),v=i,t(i)):errorMsg("Sampling failed.",1e3)}d&&(m=setTimeout(r,Math.max(0,p-msElapsed(s))))}function n(){g.count=$("#count").val(),g.freq=$("#freq").val()*("fft"==o?2:1)}function r(){f&&(errorMsg("Request already pending - aborting."),l.abort()),f=!0,s=msNow();var t=g.count,n=g.freq,r=_root+"/measure/"+o+"?n="+t+"&fs="+n;return l=$().get(r,e,estimateLoadTime(n,t)),!0}function i(){p=+$("#ar-time").val(),n(),d=!d,d?r():clearTimeout(m),$("#ar-btn").toggleClass("btn-blue").toggleClass("btn-red").val(d?"Stop":"Auto")}var a,o,s,u,c,l,h={},f=!1,d=!1,p=1,m=-1,v=null,g={count:0,freq:0};return h.init=function(t){function e(){n(),r()}o=t,$("#load").on("click",e),$(".chartexport a").on("click",function(){var t=$(this).data("sep"),e="",n=v.stats.freq/v.stats.count;switch(t){case"space":e=v.samples.join(" ");break;case"comma":e=v.samples.join(",");break;case"newline":e=v.samples.join("\n");break;case"fft-csv":e=_.map(v.samples,function(t,e){return numfmt(e*n,3)+","+t}).join("\n");break;case"fft-json":e=JSON.stringify(_.map(v.samples,function(t,e){return{f:+numfmt(e*n,3),m:t}}))}if(copyToClipboard(e))infoMsg("Copy success!");else{var r=$("#copybox");r.removeClass("hidden"),r.val(e)}}),$("#count,#freq").on("keyup",function(t){13==t.which&&e()}),$("#chart").on("contextmenu",function(t){return a&&a(),a=null,u=null,c=null,t.preventDefault(),!1}),$("#ar-btn").on("click",i)},h}(),page_spectrogram=function(){function t(t){var e,n,r,i;t=Math.log10(1+t),t>2&&(t=2),0>t&&(t=0);for(var a=0;a=s&&(e=s,r=o),s>=t){n=s,i=o;break}}var u=(t-e)/(n-e);e==n&&(u=0);var c=Math.round(r[1]+(i[1]-r[1])*u),l=Math.round(r[2]+(i[2]-r[2])*u),h=Math.round(r[3]+(i[3]-r[3])*u);return"rgb("+c+","+l+","+h+")"}function e(){var t=c.getImageData(g.x+g.dx,g.y,g.w-g.dx,g.h+10);c.fillStyle="black",c.fillRect(g.x,g.y,g.w,g.h),c.clearRect(g.x,g.y+g.h+1,g.w,10),c.putImageData(t,g.x,g.y)}function n(n){e();for(var r=x.sampCount/2,i=0;r>i;i++){var a;if(i*g.dy>g.h)break;a=i>n.length?"#000":t(n[i]),c.fillStyle=a;var o=g.x+g.w-g.dx,s=g.y+g.h-(i+1)*g.dy,u=g.dx,l=g.dy;s=950){p=msNow();var h=!1;msElapsed(m)>9500&&(h=!0,m=msNow()),c.strokeStyle="white",c.beginPath(),c.moveTo(g.x+g.w-.5,g.y+g.h+1),c.lineTo(g.x+g.w-.5,g.y+g.h+1+(h?6:2)),c.stroke()}}function r(t,e){if(h=!1,200==e)try{var r=JSON.parse(t);r.success?n(r.samples):errorMsg("Sampling failed.",1e3)}catch(a){errorMsg(a)}else errorMsg("Request failed.",1e3);y&&(l=setTimeout(i,Math.max(0,x.interval-msElapsed(d))))}function i(){h&&(errorMsg("Request already pending - aborting."),f.abort()),h=!0,d=msNow();var t=x.freq,e=x.sampCount,n=_root+"/measure/fft?n="+e+"&fs="+t;return f=$().get(n,r,estimateLoadTime(t,e)),!0}function a(){for(var e=8,n=10,r=g.h-12,i=g.y+6,a=g.x-e-n,o=100/r,s=0;r>s;s++){var u=t(s*o),l=t((s+1)*o),h=Math.floor(i+r-(s+1)),f=c.createLinearGradient(0,h+1,0,h);f.addColorStop(0,u),f.addColorStop(1,l),c.fillStyle=f,c.fillRect(a,h,n,1)}c.strokeStyle="#000",c.strokeRect(a-.5,i-.5,n+1,r+1),o=100/r,c.font="12px sans-serif",c.fillStyle="white",c.textAlign="right";for(var s=0;s<=g.h;s+=r/10)c.fillText(Math.round(s*o)+"",g.x-e-n-e,i+r-s+3)}function o(){var t=8,e=g.x+g.w,n=e+t,r=g.y,i=g.h,a=70;c.clearRect(e+.5,r-10,a,i+20);for(var o,s=x.freq/2/(x.sampCount/2),u=g.h/g.dy,l=u*s,h=[10,25,50],f=1,d=!1;;){for(var p=0;p=p;p+=o){if(p>=u){var m=p-u;if(m>o/2)break;p=u}var v=p*(l/u);v=v>=1e6?numfmt(v/1e6,2)+"M":v>=1e3?numfmt(v/1e3,2)+"k":numfmt(v,1);var y=Math.round(r+i-g.dy*p);if(c.fillText(v,n,y+4),c.beginPath(),c.moveTo(e,y+.5),c.lineTo(e+t/2,y+.5),c.stroke(),p>=u)break}c.font="16px sans-serif",c.save(),c.translate(e+50,g.y+g.h/2),c.rotate(Math.PI/2),c.textAlign="center",c.fillText("Frequency - [Hz]",0,0),c.restore()}function s(){x.interval=+$("#interval").val(),x.freq=2*+$("#freq").val(),x.sampCount=+$("#count").val(),g.dx=+$("#tile-x").val(),g.dy=+$("#tile-y").val()}function u(){c.fillStyle="#000",c.fillRect(g.x,g.y,g.w,g.h),c.strokeStyle="white",c.strokeRect(g.x-.5,g.y-.5,g.w+1,g.h+1)}var c,l,h,f,d,p,m,v={},g={x:50,y:10,w:740,h:512,dx:1,dy:1},x={interval:0,sampCount:0,freq:0},y=!1,b=[[0,0,0,0],[.1,41,17,41],[.25,34,17,78],[.6,17,30,105],[1,17,57,126],[1.2,17,84,128],[1.3,17,111,115],[1.4,17,134,96],[1.5,17,155,71],[1.6,68,194,17],[1.75,111,209,17],[1.84,180,213,17],[1.9,223,217,86],[1.97,248,222,176],[1.99,255,237,222],[2,255,255,255]];return v.init=function(){var t=$("#sg")[0];c=t.getContext("2d"),u(),s(),a(),o(),p=msNow()-1e4,m=msNow()-1e4,$("#count").on("change",function(){var t=+$("#count").val(),e=Math.max(1,g.h/(t/2));$("#tile-x").val(Math.max(4,e)),$("#tile-y").val(e)}),$("#tile-y").on("change",function(){$("#tile-x").val(Math.max(4,$(this).val()))}),$("#go-btn").on("click",function(){y=!y,y?(s(),o(),i()):clearTimeout(l),$("#go-btn").toggleClass("btn-green").toggleClass("btn-red").html(y?"Stop":"Start")})},v}(),page_status=function(){function t(t,a){if(200!=a)errorMsg("Update failed.");else try{var o=JSON.parse(t);n.j=o,$(".sta-only").toggle(o.sta),$(".ap-only").toggle(o.ap),$("#uptime").html(o.uptime),$("#heap").html(o.heap+" bytes"),$("#wmode").html(o.wifiMode),o.sta&&($("#staSSID").html(o.sta.SSID),$("#staRSSIperc").html(o.sta.RSSIperc),$("#staRSSI").html(o.sta.RSSI),$("#staMAC").html(o.sta.MAC)),o.ap&&($("#apSSID").html(o.ap.SSID),$("#apHidden").html(o.ap.hidden?"Yes":"No"),$("#apAuth").html(o.ap.auth),$(".ap-auth-only").toggle("Open"!=o.ap.auth),$("#apPwd").html(o.ap.pwd),$("#apChan").html(o.ap.chan),$("#apMAC").html(o.ap.MAC))}catch(s){errorMsg(s)}i||setTimeout(e,r)}function e(){$().get(_root+"/system/status",t)}var n={};n.j={};var r=1e4,i=!1;return n.trigReset=function(){var t="#reset-modal";$().get(_root+"/system/reset",function(n,r){if(200==r){modal.show(t),i=!0;var a=setInterval(function(){$().get(_root+"/system/ping",function(n,r){200==r&&(modal.hide(t),e(),clearInterval(a),i=!1)},{timeout:500})},1e3)}})},n.init=function(){e()},n}(),page_mon=function(){function t(t){$("#hasref").html(t?"OK":"Not set!")}function e(){var t=$("#rep-svc-xv")[0].checked;t?$(".xv-only").removeClass("hidden"):$(".xv-only").addClass("hidden")}var n={};return n.captureRef=function(){$().get(_root+"/mon/setref",function(e,n){if(200!=n)errorMsg("Operation failed.");else try{var r=JSON.parse(e);t(r.success)}catch(i){errorMsg(i),t(!1)}})},n.compareNow=function(){$().get(_root+"/mon/compare",function(t,e){if(200!=e)errorMsg("Operation failed.");else try{var n=JSON.parse(t);if(!n.success)throw"Capture failed.";$("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},n.init=function(){e(),$("#rep-svc-xv,#rep-svc-ts").on("change",e),setInterval(function(){$().get(_root+"/mon/status",function(t,e){if(200==e)try{var n=JSON.parse(t);n.success&&($("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2)))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},1e4)},n}(); \ No newline at end of file diff --git a/html/pages/about.tpl b/html/pages/about.tpl index 387532d..2fa8684 100644 --- a/html/pages/about.tpl +++ b/html/pages/about.tpl @@ -66,7 +66,7 @@ - + diff --git a/html/pages/fft.html b/html/pages/fft.html index 97fa3b4..f21de2e 100644 --- a/html/pages/fft.html +++ b/html/pages/fft.html @@ -79,12 +79,22 @@ + + - + diff --git a/html/pages/monitoring.tpl b/html/pages/monitoring.tpl index 06e73af..11b7726 100644 --- a/html/pages/monitoring.tpl +++ b/html/pages/monitoring.tpl @@ -94,7 +94,7 @@ - + diff --git a/html/pages/sgm.html b/html/pages/sgm.html index 27db50e..cd8b5a9 100644 --- a/html/pages/sgm.html +++ b/html/pages/sgm.html @@ -71,7 +71,7 @@ - + diff --git a/html/pages/status.tpl b/html/pages/status.tpl index e0f46ed..46dfacb 100644 --- a/html/pages/status.tpl +++ b/html/pages/status.tpl @@ -120,7 +120,7 @@ - + diff --git a/html/pages/wfm.html b/html/pages/wfm.html index bb19e38..efed055 100644 --- a/html/pages/wfm.html +++ b/html/pages/wfm.html @@ -68,12 +68,17 @@ + + - + diff --git a/html/pages/wifi.tpl b/html/pages/wifi.tpl index 874976c..192ecb4 100644 --- a/html/pages/wifi.tpl +++ b/html/pages/wifi.tpl @@ -62,7 +62,7 @@ - + diff --git a/html_src/_end.php b/html_src/_end.php index 6cebea6..f87a046 100644 --- a/html_src/_end.php +++ b/html_src/_end.php @@ -1,5 +1,5 @@ - + diff --git a/html_src/css/app.css b/html_src/css/app.css index 3d91c39..09d0a23 100644 --- a/html_src/css/app.css +++ b/html_src/css/app.css @@ -1 +1 @@ -*,: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}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.ct-zoom-rect{fill:rgba(200,100,100,.3);stroke:#ff2b12}.ct-axis-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ct-axis-title,.ct-label{fill:rgba(255,255,255,.8)}.ct-label{color:rgba(255,255,255,.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:rgba(255,255,255,.3);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:4px;stroke-linecap:round}.ct-line{fill:none;stroke-width:2px}.ct-with-area .ct-line{stroke-width:1px}.ct-area{stroke:none;fill-opacity:.3}.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:62.5%}.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}.center{text-align:center}.invis{visibility:hidden}.hidden{display:none}.nb{font-weight:400}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: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,.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:white;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;position:relative;padding:1rem;overflow-y:auto}@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}#loader{position:absolute;right:1.618rem;top:1.618rem;transition:opacity .2s;opacity:0}@media screen and (max-width:544px){#loader{top:1rem;right:1rem}}#loader.show{opacity:1}.Box{display:block;max-width:900px;margin-top:1rem;padding:.6180469716rem 1rem;border-radius:3px;background-color:rgba(255,255,255,.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}.Box .Valfield{display:inline-block;min-width:10em}.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;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 black;border-radius:6px}.Dialog h1,.Dialog h2{margin-top:0}.Dialog p:last-child{margin-bottom:0}.ErrMsg{position:fixed;bottom:2.617924rem;padding:.6180469716rem 1rem;left:50%;transform:translate(-50%);-webkit-font-smoothing:subpixel-antialiased;-webkit-transform:translateZ(0) scale(1);background:#d03e42;color:white;text-shadow:0 0 2px black;box-shadow:0 0 6px 0 rgba(0,0,0,.6);border-radius:5px;max-width:80%;transition:opacity .5s;opacity:0}@media screen and (max-width:544px){.ErrMsg{width:calc(100% - 1rem)}}.ErrMsg.visible{opacity:1}.ErrMsg.hidden{display:none}.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}.btn-blue{background-color:#3983cd;box-shadow:0 3px 0 #265f98;text-decoration:none!important}.btn-blue,.btn-blue:link,.btn-blue:visited{color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:active,.btn-blue:hover{background-color:#2076C6;color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:hover{box-shadow:0 3px 0 #154c80}.btn-blue:active{box-shadow:0 1px 0 #154c80}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 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,.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 black;-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.2em;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:rgba(255,255,255,.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:white}.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 #staRSSIperc:after{padding-left:.1459102934rem;content:'%';font-size:.8888888889em}.page-home #staRSSI:after{padding-left:.1459102934rem;content:'dBm';font-size:.8888888889em}#samp-ctrl{display:flex;padding:.3819820591rem;flex-direction:row;justify-content:center;align-items:stretch}@media screen and (max-width:544px){#samp-ctrl{flex-direction:column}}#samp-ctrl>div{margin:.3819820591rem .6180469716rem}#samp-ctrl label{line-height:1.8;font-weight:700}#samp-ctrl input,#samp-ctrl select{width:6em}@media screen and (max-width:544px){#samp-ctrl input,#samp-ctrl select{width:100%}}#samp-ctrl #tile-cfg input{width:3em}#samp-ctrl #interval{width:4.5em}.Box.chartbox{display:flex;flex-direction:row}@media screen and (max-width:544px){.Box.chartbox{flex-direction:column}}.Box.chartbox .stats{flex:0 1;position:relative;padding-bottom:50px}@media screen and (max-width:544px){.Box.chartbox .stats table{margin:0 auto}.Box.chartbox .stats td,.Box.chartbox .stats th{width:50%}}.Box.chartbox .stats td,.Box.chartbox .stats th{white-space:nowrap;word-wrap:normal}.Box.chartbox .stats th sub{font-weight:400}.Box.chartbox .stats td{min-width:100px}.Box.chartbox .stats td:after{font-size:90%;padding-left:.5em}.Box.chartbox .stats #stat-f-s:after{content:"Hz"}.Box.chartbox .stats #stat-i-peak:after,.Box.chartbox .stats #stat-i-rms:after{content:"mA"}.Box.chartbox .stats .ar{position:absolute;bottom:.3819820591rem;width:100%;text-align:center}.Box.chartbox .stats .ar input[type=number]{width:4em}.Box.chartbox .stats .ar input[type=button]{margin-left:.3819820591rem}.page-about .Box{padding-left:1rem;padding-right:1rem}.page-about .Box a{font-weight:700}.page-about #logo{float:right;height:130px}.page-about #logo2{max-width:150px}@media screen and (min-width:545px){.mq-phone{display:none}}@media screen and (max-width:544px){.mq-tablet-min{display:none}}@media screen and (min-width:1001px){.mq-tablet-max{display:none}}@media screen and (max-width:1000px){.mq-normal-min{display:none}} \ No newline at end of file +*,: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}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}.ct-zoom-rect{fill:rgba(200,100,100,.3);stroke:#ff2b12}.ct-axis-title{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ct-axis-title,.ct-label{fill:rgba(255,255,255,.8)}.ct-label{color:rgba(255,255,255,.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:rgba(255,255,255,.3);stroke-width:1px;stroke-dasharray:2px}.ct-point{stroke-width:4px;stroke-linecap:round}.ct-line{fill:none;stroke-width:2px}.ct-with-area .ct-line{stroke-width:1px}.ct-area{stroke:none;fill-opacity:.3}.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:62.5%}.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}.center{text-align:center}.invis{visibility:hidden!important}.hidden{display:none!important}.nb{font-weight:400}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{cursor:pointer;color:#5abfff;text-decoration:none}a:hover{color:#5abfff;text-decoration:underline}.chartexport a{background:#3b7299;border-radius:3px;padding:5px;color:#0c171e;text-decoration:none}.chartexport a:hover{background:#4ea6dd}.chartexport a:active{position:relative;top:1px}.chartexport textarea{margin-top:10px;width:100%;height:10em;resize:vertical}#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: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,.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:white;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;position:relative;padding:1rem;overflow-y:auto}@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}#loader{position:absolute;right:1.618rem;top:1.618rem;transition:opacity .2s;opacity:0}@media screen and (max-width:544px){#loader{top:1rem;right:1rem}}#loader.show{opacity:1}.Box{display:block;max-width:900px;margin-top:1rem;padding:.6180469716rem 1rem;border-radius:3px;background-color:rgba(255,255,255,.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}.Box .Valfield{display:inline-block;min-width:10em}.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;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 black;border-radius:6px}.Dialog h1,.Dialog h2{margin-top:0}.Dialog p:last-child{margin-bottom:0}.NotifyMsg{position:fixed;bottom:2.617924rem;padding:.6180469716rem 1rem;left:50%;transform:translate(-50%);-webkit-font-smoothing:subpixel-antialiased;-webkit-transform:translateZ(0) scale(1);background:#37a349;color:white;text-shadow:0 0 2px black;box-shadow:0 0 6px 0 rgba(0,0,0,.6);border-radius:5px;max-width:80%;transition:opacity .5s;opacity:0}.NotifyMsg.error{background:#d03e42}@media screen and (max-width:544px){.NotifyMsg{width:calc(100% - 1rem)}}.NotifyMsg.visible{opacity:1}.NotifyMsg.hidden{display:none}.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}.btn-blue{background-color:#3983cd;box-shadow:0 3px 0 #265f98;text-decoration:none!important}.btn-blue,.btn-blue:link,.btn-blue:visited{color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:active,.btn-blue:hover{background-color:#2076C6;color:#FEFEFE}.btn-blue.active,.btn-blue.selected,.btn-blue:hover{box-shadow:0 3px 0 #154c80}.btn-blue:active{box-shadow:0 1px 0 #154c80}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 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,.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 black;-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.2em;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:rgba(255,255,255,.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:white}.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 #staRSSIperc:after{padding-left:.1459102934rem;content:'%';font-size:.8888888889em}.page-home #staRSSI:after{padding-left:.1459102934rem;content:'dBm';font-size:.8888888889em}#samp-ctrl{display:flex;padding:.3819820591rem;flex-direction:row;justify-content:center;align-items:stretch}@media screen and (max-width:544px){#samp-ctrl{flex-direction:column}}#samp-ctrl>div{margin:.3819820591rem .6180469716rem}#samp-ctrl label{line-height:1.8;font-weight:700}#samp-ctrl input,#samp-ctrl select{width:6em}@media screen and (max-width:544px){#samp-ctrl input,#samp-ctrl select{width:100%}}#samp-ctrl #tile-cfg input{width:3em}#samp-ctrl #interval{width:4.5em}.Box.chartbox{display:flex;flex-direction:row}@media screen and (max-width:544px){.Box.chartbox{flex-direction:column}}.Box.chartbox .stats{flex:0 1;position:relative;padding-bottom:50px}@media screen and (max-width:544px){.Box.chartbox .stats table{margin:0 auto}.Box.chartbox .stats td,.Box.chartbox .stats th{width:50%}}.Box.chartbox .stats td,.Box.chartbox .stats th{white-space:nowrap;word-wrap:normal}.Box.chartbox .stats th sub{font-weight:400}.Box.chartbox .stats td{min-width:100px}.Box.chartbox .stats td:after{font-size:90%;padding-left:.5em}.Box.chartbox .stats #stat-f-s:after{content:"Hz"}.Box.chartbox .stats #stat-i-peak:after,.Box.chartbox .stats #stat-i-rms:after{content:"mA"}.Box.chartbox .stats .ar{position:absolute;bottom:.3819820591rem;width:100%;text-align:center}.Box.chartbox .stats .ar input[type=number]{width:4em}.Box.chartbox .stats .ar input[type=button]{margin-left:.3819820591rem}.page-about .Box{padding-left:1rem;padding-right:1rem}.page-about .Box a{font-weight:700}.page-about #logo{float:right;height:130px}.page-about #logo2{max-width:150px}@media screen and (min-width:545px){.mq-phone{display:none}}@media screen and (max-width:544px){.mq-tablet-min{display:none}}@media screen and (min-width:1001px){.mq-tablet-max{display:none}}@media screen and (max-width:1000px){.mq-normal-min{display:none}} \ No newline at end of file diff --git a/html_src/js-src/app.js b/html_src/js-src/app.js index da1bf63..af6069c 100644 --- a/html_src/js-src/app.js +++ b/html_src/js-src/app.js @@ -51,5 +51,11 @@ $().ready(function () { function errorMsg(msg, time) { + $('#notif').addClass('error'); + notify.show(msg, time || 3000); +} + +function infoMsg(msg, time) { + $('#notif').removeClass('error'); notify.show(msg, time || 3000); } diff --git a/html_src/js-src/page_waveform.js b/html_src/js-src/page_waveform.js index 27d2ae8..22bc619 100644 --- a/html_src/js-src/page_waveform.js +++ b/html_src/js-src/page_waveform.js @@ -15,6 +15,8 @@ var page_waveform = (function () { var readXhr; // read xhr + var lastObj = null; // samples are stored here + var opts = { count: 0, // sample count freq: 0 // sampling freq @@ -152,6 +154,8 @@ var page_waveform = (function () { if (!j.success) { errorMsg("Sampling failed.", 1000); } else { + $('.chartexport').removeClass('hidden'); + lastObj = j; buildChart(j); } } @@ -211,6 +215,40 @@ var page_waveform = (function () { $('#load').on('click', onLoadClick); + $('.chartexport a').on('click', function() { + var sep = $(this).data('sep'); + var str = ''; + + // for fft + var fftStep = (lastObj.stats.freq/lastObj.stats.count); + + switch (sep) { + case 'space': str = lastObj.samples.join(' '); break; + case 'comma': str = lastObj.samples.join(','); break; + case 'newline': str = lastObj.samples.join('\n'); break; + + case 'fft-csv': + str = _.map(lastObj.samples, function (a, i) { + return numfmt(i * fftStep,3) + "," + a; + }).join('\n'); + break; + + case 'fft-json': + str = JSON.stringify(_.map(lastObj.samples, function (a, i) { + return {f: +numfmt(i * fftStep, 3), m: a} + })); + break; + } + + if (!copyToClipboard(str)) { + var $cb = $('#copybox'); + $cb.removeClass('hidden'); + $cb.val(str); + } else { + infoMsg('Copy success!'); + } + }); + $('#count,#freq').on('keyup', function (e) { if (e.which == 13) { onLoadClick(); diff --git a/html_src/js-src/utils.js b/html_src/js-src/utils.js index a33ff20..03fe26b 100644 --- a/html_src/js-src/utils.js +++ b/html_src/js-src/utils.js @@ -59,3 +59,44 @@ String.prototype.format = function () { return out; }; + +function copyToClipboard(string) { + if (!document.execCommand) return false; + + // create hidden text element, if it doesn't already exist + var targetId = "_hiddenCopyText_"; + + // must use a temporary form element for the selection and copy + target = document.getElementById(targetId); + if (!target) { + var target = document.createElement("textarea"); + target.style.position = "absolute"; + target.style.left = "-9999px"; + target.style.top = "0"; + target.id = targetId; + document.body.appendChild(target); + } + target.textContent = string; + + // select the content + var currentFocus = document.activeElement; + target.focus(); + target.setSelectionRange(0, target.value.length); + + // copy the selection + var succeed; + try { + succeed = document.execCommand("copy"); + } catch(e) { + succeed = false; + } + // restore original focus + if (currentFocus && typeof currentFocus.focus === "function") { + currentFocus.focus(); + } + + // clear temporary content + target.textContent = ""; + + return succeed; +} diff --git a/html_src/js/all.js b/html_src/js/all.js index 6c3c3d3..872e021 100644 --- a/html_src/js/all.js +++ b/html_src/js/all.js @@ -1,3 +1,3 @@ -function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function numfmt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function estimateLoadTime(t,e){return 1e3/t*e+1500}function msNow(){return+new Date}function msElapsed(t){return msNow()-t}function errorMsg(t,e){notify.show(t,e||3e3)}!function(){"use strict";function t(){var t;for(p=!0,t=0;t=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function i(t,e){return t.currentStyle?t.currentStyle[r(e)]:g.getComputedStyle?g.getComputedStyle(t,null).getPropertyValue(e):null}function a(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function s(t,e,n){try{t.style[r(e)]=n}catch(i){}}function o(t){t.style.display="","none"===i(t,"display")&&(t.style.display="block")}function u(t){var e,r,i,s="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r0&&(s+="&"+a(e.name,e.value));break;case"select-multiple":for(i=0;i0?s.substring(1):""}function c(t,e,r){var i,a,s,o=!1;return t&&(i=t.split(/\s+/),n(function(t){for(s=0;s0?y[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},y),e},e.addClass=function(t){return t&&n(function(e){e.className+=" "+t},y),e},e.removeClass=function(t){return c(t,"remove",y),e},e.toggleClass=function(t){return c(t,"toggle",y),e},e.hasClass=function(t){return c(t,"has",y)},e.html=function(t){return t||""===t?(n(function(e){e.innerHTML=t},y),e):y[0]?y[0].innerHTML:void 0},e.htmlBefore=function(t){return l(t,"before",y),e},e.htmlAfter=function(t){return l(t,"after",y),e},e.htmlAppend=function(t){return l(t,"append",y),e},e.htmlPrepend=function(t){return l(t,"prepend",y),e},e.attr=function(t,r){if(t){if(t=t.toLowerCase(),"undefined"!=typeof r)return n(function(e){"style"===t?e.style.cssText=r:"class"===t?e.className=r:e.setAttribute(t,r)},y),e;if(y[0])if("style"===t){if(y[0].style.cssText)return y[0].style.cssText}else if("class"===t){if(y[0].className)return y[0].className}else if(y[0].getAttribute(t))return y[0].getAttribute(t)}},e.data=function(t,n){return t?e.attr("data-"+t,n):void 0},e.val=function(t){var r,i,a;if(!_.isUndefined(t))return n(function(e){switch(e.nodeName){case"SELECT":for(("string"==typeof t||"number"==typeof t)&&(t=[t]),i=0;i1?r:r[0];case"INPUT":case"TEXTAREA":case"BUTTON":return y[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)},y),e):!y[0]||"INPUT"!==y[0].nodeName||"checkbox"!==y[0].type&&"radio"!==y[0].type?void 0:!!y[0].checked},e.on=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.addEventListener(r,i,!1):v.attachEvent&&(t[r+i]=function(){return i.apply(t,arguments)},t.attachEvent("on"+r,t[r+i]))},y),e},e.off=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.removeEventListener(r,i,!1):v.attachEvent&&(t.detachEvent("on"+r,t[r+i]),t[r+i]=null)},y),e},e.ajax=function(t,e,n,r){var i,a,s=u(y),o=e?e.toUpperCase():"GET";_.isNumber(r)&&(r={timeout:r});var c=Chartist.extend({},{nocache:!0,timeout:5e3,loader:!0},r);if(s&&"GET"===o&&(t+=-1===t.indexOf("?")?"?"+s:"&"+s,s=null),i=new XMLHttpRequest){if(c.nocache){var l=(+new Date).toString(36);t+=(-1===t.indexOf("?")?"?":"&")+"_="+l}c.loader&&$("#loader").addClass("show"),i.open(o,t,!0),i.timeout=c.timeout,a=setTimeout(function(){errorMsg("XHR timed out."),i.abort(),c.loader&&$("#loader").removeClass("show")},c.timeout+10),i.onreadystatechange=function(){4===i.readyState&&(c.loader&&$("#loader").removeClass("show"),n&&0!=i.status&&n(i.responseText,i.status),clearTimeout(a))},i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===o&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.send(s)}return i},e.get=function(t,n,r){return e.ajax(t,"get",n,r)},e.post=function(t,n,r){return e.ajax(t,"post",n,r)},e}var f=[],d=[],p=!1,m=!1,v=document,g=window;v.addEventListener?(v.addEventListener("DOMContentLoaded",t,!1),g.addEventListener("load",e,!1)):v.attachEvent?(v.attachEvent("onreadystatechange",t),g.attachEvent("onload",e)):g.onload=e,g.$=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 r in e)"object"!=typeof e[r]||null===e[r]||e[r]instanceof Array?t[r]=e[r]:t[r]=n.extend({},t[r],e[r])}),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 r=[],i=Math.max.apply(null,t.map(function(t){return t.length}));return n.times(i).forEach(function(n,i){var a=t.map(function(t){return t[i]});r[i]=e.apply(null,a)}),r},n.roundWithPrecision=function(t,e){var r=Math.pow(10,e||n.precision);return Math.round(t*r)/r},n.precision=8,n.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),_.escape(t))},n.deserialize=function(t){if("string"!=typeof t)return t;t=_.unescape(t);try{t=JSON.parse(t),t=void 0!==t.data?t.data:t}catch(e){}return t},n.createSvg=function(t,e,r,i){var a;return e=e||"100%",r=r||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(n.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),a=new n.Svg("svg").attr({width:e,height:r}).addClass(i).attr({style:"width: "+e+"; height: "+r+";"}),t.appendChild(a._node),a},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,r=n.getDataArray(t);e=r.every(function(t){return t instanceof Array})?Math.max.apply(null,r.map(function(t){return t.length})):r.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;ea.high&&(a.high=n),o&&n0?a.low=0:(a.high=1,a.low=0)),a},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 r,i=2,a=2;if(t%2===0)return 2;do i=n(i)%t,a=n(n(a))%t,r=e(Math.abs(i-a),t);while(1===r);return r},n.getBounds=function(t,e,r,i){var a,s,o,u=0,c={high:e.high,low:e.low};c.valueRange=c.high-c.low,c.oom=n.orderOfMagnitude(c.valueRange),c.step=Math.pow(10,c.oom),c.min=Math.floor(c.low/c.step)*c.step,c.max=Math.ceil(c.high/c.step)*c.step,c.range=c.max-c.min,c.numberOfSteps=Math.round(c.range/c.step);var l=n.projectLength(t,c.step,c),h=r>l,f=i?n.rho(c.range):0;if(i&&n.projectLength(t,1,c)>=r)c.step=1;else if(i&&f=r)c.step=f;else for(;;){if(h&&n.projectLength(t,c.step,c)<=r)c.step*=2;else{if(h||!(n.projectLength(t,c.step/2,c)>=r))break;if(c.step/=2,i&&c.step%1!==0){c.step*=2;break}}if(u++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(s=c.min,o=c.max;s+c.step<=c.low;)s+=c.step;for(;o-c.step>=c.high;)o-=c.step;for(c.min=s,c.max=o,c.range=c.max-c.min,c.values=[],a=c.min;a<=c.max;a+=c.step)c.values.push(n.roundWithPrecision(a));return c},n.createChartRect=function(t,e,r){var i=!(!e.axisX&&!e.axisY),a=i?e.axisY.offset:0,s=i?e.axisX.offset:0,o=t.width()||n.quantity(e.width).value||0,u=t.height()||n.quantity(e.height).value||0,c=n.normalizePadding(e.chartPadding,r);o=Math.max(o,a+c.left+c.right),u=Math.max(u,s+c.top+c.bottom);var l={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return i?("start"===e.axisX.position?(l.y2=c.top+s,l.y1=Math.max(u-c.bottom,l.y2+1)):(l.y2=c.top,l.y1=Math.max(u-c.bottom-s,l.y2+1)),"start"===e.axisY.position?(l.x1=c.left+a,l.x2=Math.max(o-c.right,l.x1+1)):(l.x1=c.left,l.x2=Math.max(o-c.right-a,l.x1+1))):(l.x1=c.left,l.x2=Math.max(o-c.right,l.x1+1),l.y2=c.top,l.y1=Math.max(u-c.bottom,l.y2+1)),l},n.createGrid=function(t,e,r,i,a,s,o,u){var c={};c[r.units.pos+"1"]=Math.round(t)+.5,c[r.units.pos+"2"]=Math.round(t)+.5,c[r.counterUnits.pos+"1"]=i,c[r.counterUnits.pos+"2"]=i+a;var l=s.elem("line",c,o.join(" "));u.emit("draw",n.extend({type:"grid",axis:r,index:e,group:s,element:l},c))},n.createLabel=function(t,e,r,i,a,s,o,u,c,l,h){var f,d={};d[a.units.pos]=t+o[a.units.pos],d[a.counterUnits.pos]=o[a.counterUnits.pos],d[a.units.len]=e,d[a.counterUnits.len]=s-10;var p=i[r];if(_.isNumber(p)&&(p=n.roundWithPrecision(p,2)),l){var m=''+p+"";f=u.foreignObject(m,n.extend({style:"overflow: visible;"},d))}else f=u.elem("text",d,c.join(" ")).text(p);h.emit("draw",n.extend({type:"label",axis:a,index:r,group:u,element:f,text:p},d))},n.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var r=e.series[t.name];return r.hasOwnProperty(n)?r[n]:e[n]}return e[n]},n.optionsProvider=function(e,r,i){function a(e){var a=o;if(o=n.extend({},c),r)for(u=0;u=2&&e[a]<=e[a-2]?i=!0:(i&&(r.push({pathCoordinates:[],valueData:[]}),i=!1),r[r.length-1].pathCoordinates.push(e[a],e[a+1]),r[r.length-1].valueData.push(n[a/2]));return r}var r={fillHoles:!1};return t=n.extend({},r,t),function i(t,r){var a=e(t,r);if(a.length){if(a.length>1){var s=[];return a.forEach(function(t){s.push(i(t.pathCoordinates,t.valueData))}),n.Svg.Path.join(s)}if(t=a[0].pathCoordinates,r=a[0].valueData,t.length<=4)return n.Interpolation.none()(t,r);var o,u,c=[],l=[],h=t.length/2,f=[],d=[],p=[],m=[];for(o=0;h>o;o++)c[o]=t[2*o],l[o]=t[2*o+1];for(o=0;h-1>o;o++)p[o]=l[o+1]-l[o],m[o]=c[o+1]-c[o],d[o]=p[o]/m[o];for(f[0]=d[0],f[h-1]=d[h-2],o=1;h-1>o;o++)0===d[o]||0===d[o-1]||d[o-1]>0!=d[o]>0?f[o]=0:(f[o]=3*(m[o-1]+m[o])/((2*m[o]+m[o-1])/d[o-1]+(m[o]+2*m[o-1])/d[o]),isFinite(f[o])||(f[o]=0));for(u=(new n.Svg.Path).move(c[0],l[0],!1,r[0]),o=0;h-1>o;o++)u.curve(c[o]+m[o]/3,l[o]+f[o]*m[o]/3,c[o+1]-m[o]/3,l[o+1]-f[o+1]*m[o]/3,c[o+1],l[o+1],!1,r[o+1]);return u}return n.Interpolation.none()([])}},n.Interpolation.step=function(t){var e={postpone:!0,fillHoles:!1};return t=n.extend({},e,t),function(e,r){for(var i,a,s,o=new n.Svg.Path,u=0;u1}).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,g).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,g)}).forEach(function(n){var o=u.elem("path",{d:n.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized[s],path:n.clone(),series:a,seriesIndex:s,axisX:r,axisY:i,chartRect:c,index:s,group:u,element:o})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:i.bounds,chartRect:c,axisX:r,axisY:i,svg:this.svg,options:t})}function i(t,e,r,i){n.Line["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),function(t,e,n){"use strict";function r(t){this.data=n.normalizeData(this.data);var e,r={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 i=this.svg.elem("g").addClass(t.classNames.gridGroup),s=this.svg.elem("g"),o=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==r.normalized.length){var u=n.serialMap(r.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([u],n.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y")}else e=n.getHighLow(r.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 c,l,h,f,d,p=n.createChartRect(this.svg,t,a.padding);l=t.distributeSeries&&t.stackBars?r.raw.labels.slice(0,1):r.raw.labels,t.horizontalBars?(c=f=void 0===t.axisX.type?new n.AutoScaleAxis(n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})):t.axisX.type.call(n,n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})),h=d=void 0===t.axisY.type?new n.StepAxis(n.Axis.units.y,r,p,{ticks:l}):t.axisY.type.call(n,n.Axis.units.y,r,p,t.axisY)):(h=f=void 0===t.axisX.type?new n.StepAxis(n.Axis.units.x,r,p,{ticks:l}):t.axisX.type.call(n,n.Axis.units.x,r,p,t.axisX),c=d=void 0===t.axisY.type?new n.AutoScaleAxis(n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})):t.axisY.type.call(n,n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})));var m=t.horizontalBars?p.x1+c.projectValue(0):p.y1-c.projectValue(0),v=[];h.createGridAndLabels(i,o,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(i,o,this.supportsForeignObject,t,this.eventEmitter),r.raw.series.forEach(function(e,i){var a,o,u=i-(r.raw.series.length-1)/2;a=t.distributeSeries&&!t.stackBars?h.axisLength/r.normalized.length/2:t.distributeSeries&&t.stackBars?h.axisLength/2:h.axisLength/r.normalized[i].length/2,o=s.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(i)].join(" ")),r.normalized[i].forEach(function(s,l){var g,x,y,b;if(b=t.distributeSeries&&!t.stackBars?i:t.distributeSeries&&t.stackBars?0:l,g=t.horizontalBars?{x:p.x1+c.projectValue(s&&s.x?s.x:0,l,r.normalized[i]),y:p.y1-h.projectValue(s&&s.y?s.y:0,b,r.normalized[i])}:{x:p.x1+h.projectValue(s&&s.x?s.x:0,b,r.normalized[i]),y:p.y1-c.projectValue(s&&s.y?s.y:0,l,r.normalized[i])},h instanceof n.StepAxis&&(h.options.stretch||(g[h.units.pos]+=a*(t.horizontalBars?-1:1)),g[h.units.pos]+=t.stackBars||t.distributeSeries?0:u*t.seriesBarDistance*(t.horizontalBars?-1:1)),y=v[l]||m,v[l]=y-(m-g[h.counterUnits.pos]),void 0!==s){var w={};w[h.units.pos+"1"]=g[h.units.pos],w[h.units.pos+"2"]=g[h.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(w[h.counterUnits.pos+"1"]=m,w[h.counterUnits.pos+"2"]=g[h.counterUnits.pos]):(w[h.counterUnits.pos+"1"]=y,w[h.counterUnits.pos+"2"]=v[l]),w.x1=Math.min(Math.max(w.x1,p.x1),p.x2),w.x2=Math.min(Math.max(w.x2,p.x1),p.x2),w.y1=Math.min(Math.max(w.y1,p.y2),p.y1),w.y2=Math.min(Math.max(w.y2,p.y2),p.y1),x=o.elem("line",w,t.classNames.bar).attr({"ct:value":[s.x,s.y].filter(n.isNum).join(","),"ct:meta":n.getMetaData(e,l)}),this.eventEmitter.emit("draw",n.extend({type:"bar",value:s,index:l,meta:n.getMetaData(e,l),series:e,seriesIndex:i,axisX:f,axisY:d,chartRect:p,group:o,element:x},w))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:p,axisX:f,axisY:d,svg:this.svg,options:t})}function i(t,e,r,i){n.Bar["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),t}),function(t,e){t["Chartist.plugins.ctAxisTitle"]=e()}(this,function(){return function(t,e,n){"use strict";var r={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipText:!1},i={axisX:r,axisY:r};n.plugins=n.plugins||{},n.plugins.ctAxisTitle=function(t){return t=n.extend({},i,t),function(e){e.on("created",function(e){var r,i,a;if(t.axisX.axisTitle&&e.axisX&&(r=e.axisX.axisLength/2+e.options.axisY.offset+e.options.chartPadding.left,i=e.options.chartPadding.top,"end"===e.options.axisY.position&&(r-=e.options.axisY.offset),"end"===e.options.axisX.position&&(i+=e.axisY.axisLength),a=new n.Svg("text"),a.addClass(t.axisX.axisClass),a.text(t.axisX.axisTitle),a.attr({x:r+t.axisX.offset.x,y:i+t.axisX.offset.y,"text-anchor":t.axisX.textAnchor}),e.svg.append(a,!0)),t.axisY.axisTitle&&e.axisY){r=0,i=e.axisY.axisLength/2+e.options.chartPadding.top,"start"===e.options.axisX.position&&(i+=e.options.axisX.offset),"end"===e.options.axisY.position&&(r=e.axisX.axisLength);var s="rotate("+(t.axisY.flipText?-90:90)+", "+r+", "+i+")";a=new n.Svg("text"),a.addClass(t.axisY.axisClass),a.text(t.axisY.axisTitle),a.attr({x:r+t.axisY.offset.x,y:i+t.axisY.offset.y,transform:s,"text-anchor":t.axisY.textAnchor}),e.svg.append(a,!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 r(t){t.attr({style:"display:none"})}function i(t){t.attr({style:"display:block"})}function a(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r;return 0>i&&(i=-i,n=e.x),0>a&&(a=-a,r=e.y),{x:n,y:r,width:i,height:a}}function s(t,e){return o(t.clientX,t.clientY,e)}function o(t,e,n){var r="svg"===n.tagName?n:n.ownerSVGElement,i=r.getScreenCTM(),a=r.createSVGPoint();return a.x=t,a.y=e,a=a.matrixTransform(i.inverse()),a||{x:0,y:0}}function u(t,e){var n=e.bounds.max,r=e.bounds.min;if(e.scale&&"log"===e.scale.type){var i=e.scale.base;return Math.pow(i,t*c(n/r,i)/e.axisLength)*r}return t*e.bounds.range/e.axisLength+r}function c(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=s(t,b);return e.id=t.identifier,e}function c(t){for(var e=0;e1&&(y.attr(a(M[0],M[1])),i(y))}function h(t){for(var e=t.changedTouches,n=0;n1&&(y.attr(a(M[0],M[1])),i(y),t.preventDefault())}function f(t){d(t.changedTouches)}function d(t){for(var e=0;e=0&&M.splice(n,1)}}function p(t){M.length>1&&g(a(M[0],M[1])),d(t.changedTouches),r(y)}function m(t){0===t.button&&(A=s(t,b),y.attr(a(A,A)),i(y),t.preventDefault())}function v(e){if(0===e.button){var n=a(A,s(e,b));g(n),A=null,r(y),e.preventDefault()}else t.resetOnRightMouseBtn&&2===e.button&&(O(),e.preventDefault())}function g(t){if(t.width>5&&t.height>5){var n=t.x-S.x1,r=n+t.width,i=S.y1-t.y,a=i-t.height,s=u(n,w),o=u(r,w),c=u(a,E),l=u(i,E),h=e.options.explicitBounds;_.isUndefined(h)||(_.isUndefined(h.xLow)||(s=Math.max(h.xLow,s)),_.isUndefined(h.xHigh)||(o=Math.min(h.xHigh,o)),_.isUndefined(h.yLow)||(c=Math.max(h.yLow,c)),_.isUndefined(h.yHigh)||(l=Math.min(h.yHigh,l))),e.options.axisX.highLow={low:s,high:o},e.options.axisY.highLow={low:c,high:l},e.update(e.data,e.options),C&&C(e,O)}}function x(t){if(A){var e=s(t,b);y.attr(a(A,e)),t.preventDefault()}}if(e instanceof n.Line){var y,b,w,E,S,A,C=t.onZoom,M=[];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){w=t.axisX,E=t.axisY,S=t.chartRect,b=t.svg._node,y=t.svg.elem("rect",{x:10,y:10,width:100,height:100},"ct-zoom-rect"),r(y);var e=t.svg.querySelector("defs")||t.svg.elem("defs"),n=S.width(),i=S.height();e.elem("clipPath",{id:"zoom-mask"}).elem("rect",{x:S.x1,y:S.y2,width:n,height:i,fill:"white"}),b.addEventListener("mousedown",m),b.addEventListener("mouseup",v),b.addEventListener("mousemove",x),b.addEventListener("touchstart",l),b.addEventListener("touchmove",h),b.addEventListener("touchend",p),b.addEventListener("touchcancel",f)});var O=function(){e.options.axisX.highLow=null,e.options.axisY.highLow=null,e.update(e.data,e.options)}}}}}(window,document,Chartist),Chartist.plugins.zoom}),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e){for(var n=-1,r=t.length;++n-1&&t%1==0&&e>t}function f(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function d(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function p(t){return gn[t]}function m(){}function v(){}function g(t,e){return y(t,e)&&delete t[e]}function x(t,e){if(Gn){var n=t[e];return n===ye?ve:n}return $n.call(t,e)?t[e]:ve}function y(t,e){return Gn?t[e]!==ve:$n.call(t,e)}function b(t,e,n){t[e]=Gn&&n===ve?ye:n}function w(t){var e=-1,n=t?t.length:0;for(this.clear();++en)return!1;var r=t.length-1;return n==r?t.pop():Xn.call(t,n,1),!0}function T(t,e){var n=P(t,e);return 0>n?ve:t[n][1]}function I(t,e){return P(t,e)>-1}function P(t,e){for(var n=t.length;n--;)if(Yt(t[n][0],e))return n;return-1}function z(t,e,n){var r=P(t,e);0>r?t.push([e,n]):t[r][1]=n}function B(t,e,n){var r=t[e];$n.call(t,e)&&Yt(r,n)&&(n!==ve||e in t)||(t[e]=n)}function R(t,e){return t&&pt(e,se(e),t)}function U(t){return"function"==typeof t?t:de}function X(t){return ar(t)?t:Bt(t)}function Y(t,e,r,i,a,s,o){var u;if(i&&(u=s?i(t,a,s,o):i(t)),u!==ve)return u;if(!Gt(t))return t;var c=ar(t);if(c){if(u=Ot(t),!e)return dt(t,u)}else{var h=_t(t),f=h==Ne||h==$e;if(sr(t))return st(t,e);if(h==Te||h==Ce||f&&!s){if(l(t))return s?t:{};if(u=Lt(f?{}:t),!e)return u=R(u,t),r?vt(t,u):u}else{if(!mn[h])return s?t:{};u=Nt(t,h,e)}}o||(o=new M);var d=o.get(t);return d?d:(o.set(t,u),(c?n:q)(t,function(n,a){B(u,a,Y(n,e,r,i,a,t,o))}),r&&!c?vt(t,u):u)}function D(t){return Gt(t)?Rn(t):{}}function q(t,e){return t&&nr(t,e,se)}function F(t,e){e=kt(e,t)?[e+""]:X(e);for(var n=0,r=e.length;null!=t&&r>n;)t=t[e[n++]];return n&&n==r?t:ve}function H(t,e){return $n.call(t,e)||"object"==typeof t&&e in t&&null===zn(t)}function V(t,e){return e in Object(t)}function G(t,e,n,r,i){return t===e?!0:null==t||null==e||!Gt(t)&&!Wt(e)?t!==t&&e!==e:W(t,e,G,n,r,i)}function W(t,e,n,r,i,a){var s=ar(t),o=ar(e),u=_e,c=_e;s||(u=_t(t),u=u==Ce?Te:u),o||(c=_t(e),c=c==Ce?Te:c);var h=u==Te&&!l(t),f=c==Te&&!l(e),d=u==c;if(d&&!h)return a||(a=new M),s||te(t)?bt(t,e,n,r,i,a):wt(t,e,u,n,r,i,a);if(!(i&we)){var p=h&&$n.call(t,"__wrapped__"),m=f&&$n.call(e,"__wrapped__");if(p||m)return a||(a=new M),n(p?t.value():t,m?e.value():e,r,i,a)}return d?(a||(a=new M),Et(t,e,n,r,i,a)):!1}function Q(t,e,n,r){var i=n.length,a=i,s=!r;if(null==t)return!a;for(t=Object(t);i--;){var o=n[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++ie&&(e=-e>i?0:i+e),n=n>i?i:n,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++re?1:-1:ne(r)||0,it(e,n,r,t)}}function bt(t,e,n,r,i,s){var o=-1,u=i&we,c=i&be,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=s.get(t);if(f)return f==e;var d=!0;for(s.set(t,e);++o-1&&t%1==0&&Se>=t}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Wt(t){return!!t&&"object"==typeof t}function Qt(t){return null==t?!1:Ht(t)?kn.test(Nn.call(t)):Wt(t)&&(l(t)?kn:hn).test(t)}function Zt(t){return"number"==typeof t||Wt(t)&&jn.call(t)==ke}function Jt(t){return"string"==typeof t||!ar(t)&&Wt(t)&&jn.call(t)==ze}function Kt(t){return"symbol"==typeof t||Wt(t)&&jn.call(t)==Be}function te(t){return Wt(t)&&Vt(t.length)&&!!pn[jn.call(t)]}function ee(t){return t===ve}function ne(t){if(Gt(t)){var e=Ht(t.valueOf)?t.valueOf():t;t=Gt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(sn,"");var n=ln.test(t);return n||fn.test(t)?yn(t.slice(2),n?2:8):cn.test(t)?Ae:+t}function re(t){if("string"==typeof t)return t;if(null==t)return"";if(Kt(t))return tr?tr.call(t):"";var e=t+"";return"0"==e&&1/t==-Ee?"-0":e}function ie(t,e,n){var r=null==t?ve:F(t,e);return r===ve?n:r}function ae(t,e){return Mt(t,e,V)}function se(t){var e=It(t);if(!e&&!qt(t))return J(t);var n=$t(t),r=!!n,i=n||[],a=i.length;for(var s in t)!H(t,s)||r&&("length"==s||h(s,a))||e&&"constructor"==s||i.push(s);return i}function oe(t){return o(t,se(t))}function ue(t){return t=re(t),t&&Ke.test(t)?t.replace(Ze,c):t}function ce(t){return t=re(t),t&&an.test(t)?t.replace(rn,"\\$&"):t}function le(){var t=arguments,e=re(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function he(t){return t=re(t),t&&Je.test(t)?t.replace(Qe,p):t}function fe(t){return function(){return t}}function de(t){return t}function pe(t){return Z("function"==typeof t?t:Y(t,!0))}function me(t){return kt(t)?nt(t):rt(t)}var ve,ge="4.6.1",xe=200,ye="__lodash_hash_undefined__",be=1,we=2,Ee=1/0,Se=9007199254740991,Ae=NaN,Ce="[object Arguments]",_e="[object Array]",Me="[object Boolean]",Oe="[object Date]",Le="[object Error]",Ne="[object Function]",$e="[object GeneratorFunction]",je="[object Map]",ke="[object Number]",Te="[object Object]",Ie="[object RegExp]",Pe="[object Set]",ze="[object String]",Be="[object Symbol]",Re="[object WeakMap]",Ue="[object ArrayBuffer]",Xe="[object Float32Array]",Ye="[object Float64Array]",De="[object Int8Array]",qe="[object Int16Array]",Fe="[object Int32Array]",He="[object Uint8Array]",Ve="[object Uint8ClampedArray]",Ge="[object Uint16Array]",We="[object Uint32Array]",Qe=/&(?:amp|lt|gt|quot|#39|#96);/g,Ze=/[&<>"'`]/g,Je=RegExp(Qe.source),Ke=RegExp(Ze.source),tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,rn=/[\\^$.*+?()[\]{}|]/g,an=RegExp(rn.source),sn=/^\s+|\s+$/g,on=/\\(\\)?/g,un=/\w*$/,cn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,hn=/^\[object .+?Constructor\]$/,fn=/^0o[0-7]+$/i,dn=/^(?:0|[1-9]\d*)$/,pn={};pn[Xe]=pn[Ye]=pn[De]=pn[qe]=pn[Fe]=pn[He]=pn[Ve]=pn[Ge]=pn[We]=!0,pn[Ce]=pn[_e]=pn[Ue]=pn[Me]=pn[Oe]=pn[Le]=pn[Ne]=pn[je]=pn[ke]=pn[Te]=pn[Ie]=pn[Pe]=pn[ze]=pn[Re]=!1;var mn={};mn[Ce]=mn[_e]=mn[Ue]=mn[Me]=mn[Oe]=mn[Xe]=mn[Ye]=mn[De]=mn[qe]=mn[Fe]=mn[je]=mn[ke]=mn[Te]=mn[Ie]=mn[Pe]=mn[ze]=mn[Be]=mn[He]=mn[Ve]=mn[Ge]=mn[We]=!0,mn[Le]=mn[Ne]=mn[Re]=!1;var vn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},gn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},xn={"function":!0,object:!0},yn=parseInt,bn=xn[typeof exports]&&exports&&!exports.nodeType?exports:ve,wn=xn[typeof module]&&module&&!module.nodeType?module:ve,En=wn&&wn.exports===bn?bn:ve,Sn=u(bn&&wn&&"object"==typeof global&&global),An=u(xn[typeof self]&&self),Cn=u(xn[typeof window]&&window),_n=u(xn[typeof this]&&this),Mn=Sn||Cn!==(_n&&_n.window)&&Cn||An||_n||Function("return this")(),On=Array.prototype,Ln=Object.prototype,Nn=Function.prototype.toString,$n=Ln.hasOwnProperty,jn=Ln.toString,kn=RegExp("^"+Nn.call($n).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tn=En?Mn.Buffer:ve,In=Mn.Symbol,Pn=Mn.Uint8Array,zn=Object.getPrototypeOf,Bn=Object.getOwnPropertySymbols,Rn=Object.create,Un=Ln.propertyIsEnumerable,Xn=On.splice,Yn=Math.ceil,Dn=Object.keys,qn=Math.max,Fn=Ct(Mn,"Map"),Hn=Ct(Mn,"Set"),Vn=Ct(Mn,"WeakMap"),Gn=Ct(Object,"create"),Wn=Fn?Nn.call(Fn):"",Qn=Hn?Nn.call(Hn):"",Zn=Vn?Nn.call(Vn):"",Jn=In?In.prototype:ve,Kn=Jn?Jn.valueOf:ve,tr=Jn?Jn.toString:ve,er=gt(q),nr=xt(),rr=nt("length"),ir=Bn||function(){return[]};(Fn&&_t(new Fn)!=je||Hn&&_t(new Hn)!=Pe||Vn&&_t(new Vn)!=Re)&&(_t=function(t){var e=jn.call(t),n=e==Te?t.constructor:null,r="function"==typeof n?Nn.call(n):"";if(r)switch(r){case Wn:return je;case Qn:return Pe;case Zn:return Re}return e});var ar=Array.isArray,sr=Tn?function(t){return t instanceof Tn}:fe(!1),or=yt();v.prototype=Gn?Gn(null):Ln,w.prototype.clear=E,w.prototype["delete"]=S,w.prototype.get=A,w.prototype.has=C,w.prototype.set=_,M.prototype.clear=O,M.prototype["delete"]=L,M.prototype.get=N,M.prototype.has=$,M.prototype.set=j,m.constant=fe,m.iteratee=pe,m.keys=se,m.map=Xt,m.property=me,m.range=or,m.toPairs=oe,m.eq=Yt,m.escape=ue,m.escapeRegExp=ce,m.forEach=Ut,m.get=ie,m.hasIn=ae,m.identity=de,m.isArguments=Dt,m.isArray=ar,m.isArrayLike=qt,m.isArrayLikeObject=Ft,m.isBuffer=sr,m.isFunction=Ht,m.isLength=Vt,m.isNative=Qt,m.isNumber=Zt,m.isObject=Gt,m.isObjectLike=Wt,m.isString=Jt,m.isSymbol=Kt,m.isTypedArray=te,m.isUndefined=ee,m.last=Rt,m.replace=le,m.toNumber=ne,m.toString=re,m.unescape=he,m.each=Ut,m.VERSION=ge,(Cn||An||{})._=m,Mn._=m}.call(this),Math.log10=Math.log10||function(t){return Math.log(t)/Math.LN10},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 r=n;n.match(/^\{.*\}$/)||(n="{"+n+"}");var i=new RegExp(_.escapeRegExp(n),"g");t=t.replace(i,e[r])}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(){$(this).hasClass("no-close")||t.hide(this)}),$(".Dialog").on("click",function(t){t.stopImmediatePropagation()}),$(window).on("keydown",function(e){27==e.which&&t.hide(".Modal")})},t}(),notify=function(){var t,e,n={},r="#notif";return n.show=function(i,a){$(r).html(i),modal.show(r),clearTimeout(t),clearTimeout(e),_.isUndefined(a)||(t=setTimeout(n.hide,a))},n.hide=function(){var t=$(r);t.removeClass("visible"),e=setTimeout(function(){t.addClass("hidden")},250)},n.init=function(){$(r).on("click",function(){n.hide(this)})},n}();$().ready(function(){setInterval(function(){$(".anim-dots").each(function(t){var e=$(t),n=e.html()+".";5==n.length&&(n="."),e.html(n)})},1e3),$("input[type=number]").on("mousewheel",function(t){var e=+$(this).val(),n=+($(this).attr("step")||1),r=$(this).attr("min"),i=$(this).attr("max");if(t.wheelDelta>0?e+=n:e-=n,_.isUndefined(r)||(e=Math.max(e,r)),_.isUndefined(i)||(e=Math.min(e,i)),$(this).val(e),"createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!1,!0),$(this)[0].dispatchEvent(a)}else $(this)[0].fireEvent("onchange");t.preventDefault()}),modal.init(),notify.init()});var page_wifi=function(){function t(t,e){if(200!=e)return void n(5e3);t=JSON.parse(t);var a=!bool(t.result.inProgress)&&t.result.APs.length>0;if(n(a?15e3:1e3),a){var s=$("#ap-list");$(".AP").remove(),s.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 e=document.createElement("div"),n=$(e).data("ssid",t.essid).data("pwd",0!=t.enc).addClass("AP");t.essid==r.current&&n.addClass("selected");var a=document.createElement("div");$(a).addClass("inner").htmlAppend('
{0}
'.format(t.rssi_perc)).htmlAppend('
{0}
'.format(_.escape(t.essid))).htmlAppend('
{0}
'.format(i[t.enc]));n.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()}),e.appendChild(a),s[0].appendChild(e)}})}}function e(){$().get(_root+"/wifi/scan",t)}function n(t){setTimeout(e,t)}var r={},i=["Open","WEP","WPA","WPA2","WPA/WPA2"];return r.init=function(){e()},r}(),page_waveform=function(){function t(t){var e,n,r=window.matchMedia("screen and (min-width: 544px)"),i=!r.matches,s="FFT"==t.stats.format;s?(e="Frequency - [ Hz ]",n="Magnitude - [ mA ]"):(e="Sample time - [ ms ]",n="Current - [ mA ]");var o=Math.max(-t.stats.min,t.stats.max),l=Math.max(o,10);$("#stat-count").html(t.stats.count), -$("#stat-f-s").html(numfmt(t.stats.freq,2)),$("#stat-i-peak").html(numfmt(o,2)),$("#stat-i-rms").html(numfmt(t.stats.rms,2)),$(".stats").removeClass("invis");var h=s?t.stats.freq/t.stats.count:1e3/t.stats.freq,f=_.map(t.samples,function(t,e){return{x:e*h,y:t}}),d=[Chartist.plugins.zoom({resetOnRightMouseBtn:!0,onZoom:function(t,e){a=e,u=t.options.axisX.highLow,c=t.options.axisY.highLow}})];i||d.push(Chartist.plugins.ctAxisTitle({axisX:{axisTitle:e,offset:{x:0,y:55}},axisY:{axisTitle:n,flipText:!0,offset:{x:0,y:15}}}));var p,m,v,g;u?(p=u.high,m=u.low,v=c.high,g=c.low):(v=s?void 0:l,g=s?0:-l),new Chartist.Line("#chart",{series:[{name:"a",data:f}]},{showPoint:!1,showArea:s,fullWidth:!0,chartPadding:i?{right:20,bottom:5,left:0}:{right:25,bottom:30,left:25},series:{a:{lineSmooth:Chartist.Interpolation.monotoneCubic()}},axisX:{type:Chartist.AutoScaleAxis,high:p,low:m},axisY:{type:Chartist.AutoScaleAxis,high:v,low:g},explicitBounds:{xLow:0,yLow:s?0:void 0,xHigh:f[f.length-1].x},plugins:d})}function e(e,n){if(f=!1,200!=n)errorMsg("Request failed.",1e3);else{var i=JSON.parse(e);i.success?t(i):errorMsg("Sampling failed.",1e3)}d&&(m=setTimeout(r,Math.max(0,p-msElapsed(o))))}function n(){v.count=$("#count").val(),v.freq=$("#freq").val()*("fft"==s?2:1)}function r(){f&&(errorMsg("Request already pending - aborting."),l.abort()),f=!0,o=msNow();var t=v.count,n=v.freq,r=_root+"/measure/"+s+"?n="+t+"&fs="+n;return l=$().get(r,e,estimateLoadTime(n,t)),!0}function i(){p=+$("#ar-time").val(),n(),d=!d,d?r():clearTimeout(m),$("#ar-btn").toggleClass("btn-blue").toggleClass("btn-red").val(d?"Stop":"Auto")}var a,s,o,u,c,l,h={},f=!1,d=!1,p=1,m=-1,v={count:0,freq:0};return h.init=function(t){function e(){n(),r()}s=t,$("#load").on("click",e),$("#count,#freq").on("keyup",function(t){13==t.which&&e()}),$("#chart").on("contextmenu",function(t){return a&&a(),a=null,u=null,c=null,t.preventDefault(),!1}),$("#ar-btn").on("click",i)},h}(),page_spectrogram=function(){function t(t){var e,n,r,i;t=Math.log10(1+t),t>2&&(t=2),0>t&&(t=0);for(var a=0;a=o&&(e=o,r=s),o>=t){n=o,i=s;break}}var u=(t-e)/(n-e);e==n&&(u=0);var c=Math.round(r[1]+(i[1]-r[1])*u),l=Math.round(r[2]+(i[2]-r[2])*u),h=Math.round(r[3]+(i[3]-r[3])*u);return"rgb("+c+","+l+","+h+")"}function e(){var t=c.getImageData(g.x+g.dx,g.y,g.w-g.dx,g.h+10);c.fillStyle="black",c.fillRect(g.x,g.y,g.w,g.h),c.clearRect(g.x,g.y+g.h+1,g.w,10),c.putImageData(t,g.x,g.y)}function n(n){e();for(var r=x.sampCount/2,i=0;r>i;i++){var a;if(i*g.dy>g.h)break;a=i>n.length?"#000":t(n[i]),c.fillStyle=a;var s=g.x+g.w-g.dx,o=g.y+g.h-(i+1)*g.dy,u=g.dx,l=g.dy;o=950){p=msNow();var h=!1;msElapsed(m)>9500&&(h=!0,m=msNow()),c.strokeStyle="white",c.beginPath(),c.moveTo(g.x+g.w-.5,g.y+g.h+1),c.lineTo(g.x+g.w-.5,g.y+g.h+1+(h?6:2)),c.stroke()}}function r(t,e){if(h=!1,200==e)try{var r=JSON.parse(t);r.success?n(r.samples):errorMsg("Sampling failed.",1e3)}catch(a){errorMsg(a)}else errorMsg("Request failed.",1e3);y&&(l=setTimeout(i,Math.max(0,x.interval-msElapsed(d))))}function i(){h&&(errorMsg("Request already pending - aborting."),f.abort()),h=!0,d=msNow();var t=x.freq,e=x.sampCount,n=_root+"/measure/fft?n="+e+"&fs="+t;return f=$().get(n,r,estimateLoadTime(t,e)),!0}function a(){for(var e=8,n=10,r=g.h-12,i=g.y+6,a=g.x-e-n,s=100/r,o=0;r>o;o++){var u=t(o*s),l=t((o+1)*s),h=Math.floor(i+r-(o+1)),f=c.createLinearGradient(0,h+1,0,h);f.addColorStop(0,u),f.addColorStop(1,l),c.fillStyle=f,c.fillRect(a,h,n,1)}c.strokeStyle="#000",c.strokeRect(a-.5,i-.5,n+1,r+1),s=100/r,c.font="12px sans-serif",c.fillStyle="white",c.textAlign="right";for(var o=0;o<=g.h;o+=r/10)c.fillText(Math.round(o*s)+"",g.x-e-n-e,i+r-o+3)}function s(){var t=8,e=g.x+g.w,n=e+t,r=g.y,i=g.h,a=70;c.clearRect(e+.5,r-10,a,i+20);for(var s,o=x.freq/2/(x.sampCount/2),u=g.h/g.dy,l=u*o,h=[10,25,50],f=1,d=!1;;){for(var p=0;p=p;p+=s){if(p>=u){var m=p-u;if(m>s/2)break;p=u}var v=p*(l/u);v=v>=1e6?numfmt(v/1e6,2)+"M":v>=1e3?numfmt(v/1e3,2)+"k":numfmt(v,1);var y=Math.round(r+i-g.dy*p);if(c.fillText(v,n,y+4),c.beginPath(),c.moveTo(e,y+.5),c.lineTo(e+t/2,y+.5),c.stroke(),p>=u)break}c.font="16px sans-serif",c.save(),c.translate(e+50,g.y+g.h/2),c.rotate(Math.PI/2),c.textAlign="center",c.fillText("Frequency - [Hz]",0,0),c.restore()}function o(){x.interval=+$("#interval").val(),x.freq=2*+$("#freq").val(),x.sampCount=+$("#count").val(),g.dx=+$("#tile-x").val(),g.dy=+$("#tile-y").val()}function u(){c.fillStyle="#000",c.fillRect(g.x,g.y,g.w,g.h),c.strokeStyle="white",c.strokeRect(g.x-.5,g.y-.5,g.w+1,g.h+1)}var c,l,h,f,d,p,m,v={},g={x:50,y:10,w:740,h:512,dx:1,dy:1},x={interval:0,sampCount:0,freq:0},y=!1,b=[[0,0,0,0],[.1,41,17,41],[.25,34,17,78],[.6,17,30,105],[1,17,57,126],[1.2,17,84,128],[1.3,17,111,115],[1.4,17,134,96],[1.5,17,155,71],[1.6,68,194,17],[1.75,111,209,17],[1.84,180,213,17],[1.9,223,217,86],[1.97,248,222,176],[1.99,255,237,222],[2,255,255,255]];return v.init=function(){var t=$("#sg")[0];c=t.getContext("2d"),u(),o(),a(),s(),p=msNow()-1e4,m=msNow()-1e4,$("#count").on("change",function(){var t=+$("#count").val(),e=Math.max(1,g.h/(t/2));$("#tile-x").val(Math.max(4,e)),$("#tile-y").val(e)}),$("#tile-y").on("change",function(){$("#tile-x").val(Math.max(4,$(this).val()))}),$("#go-btn").on("click",function(){y=!y,y?(o(),s(),i()):clearTimeout(l),$("#go-btn").toggleClass("btn-green").toggleClass("btn-red").html(y?"Stop":"Start")})},v}(),page_status=function(){function t(t,a){if(200!=a)errorMsg("Update failed.");else try{var s=JSON.parse(t);n.j=s,$(".sta-only").toggle(s.sta),$(".ap-only").toggle(s.ap),$("#uptime").html(s.uptime),$("#heap").html(s.heap+" bytes"),$("#wmode").html(s.wifiMode),s.sta&&($("#staSSID").html(s.sta.SSID),$("#staRSSIperc").html(s.sta.RSSIperc),$("#staRSSI").html(s.sta.RSSI),$("#staMAC").html(s.sta.MAC)),s.ap&&($("#apSSID").html(s.ap.SSID),$("#apHidden").html(s.ap.hidden?"Yes":"No"),$("#apAuth").html(s.ap.auth),$(".ap-auth-only").toggle("Open"!=s.ap.auth),$("#apPwd").html(s.ap.pwd),$("#apChan").html(s.ap.chan),$("#apMAC").html(s.ap.MAC))}catch(o){errorMsg(o)}i||setTimeout(e,r)}function e(){$().get(_root+"/system/status",t)}var n={};n.j={};var r=1e4,i=!1;return n.trigReset=function(){var t="#reset-modal";$().get(_root+"/system/reset",function(n,r){if(200==r){modal.show(t),i=!0;var a=setInterval(function(){$().get(_root+"/system/ping",function(n,r){200==r&&(modal.hide(t),e(),clearInterval(a),i=!1)},{timeout:500})},1e3)}})},n.init=function(){e()},n}(),page_mon=function(){function t(t){$("#hasref").html(t?"OK":"Not set!")}function e(){var t=$("#rep-svc-xv")[0].checked;t?$(".xv-only").removeClass("hidden"):$(".xv-only").addClass("hidden")}var n={};return n.captureRef=function(){$().get(_root+"/mon/setref",function(e,n){if(200!=n)errorMsg("Operation failed.");else try{var r=JSON.parse(e);t(r.success)}catch(i){errorMsg(i),t(!1)}})},n.compareNow=function(){$().get(_root+"/mon/compare",function(t,e){if(200!=e)errorMsg("Operation failed.");else try{var n=JSON.parse(t);if(!n.success)throw"Capture failed.";$("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},n.init=function(){e(),$("#rep-svc-xv,#rep-svc-ts").on("change",e),setInterval(function(){$().get(_root+"/mon/status",function(t,e){if(200==e)try{var n=JSON.parse(t);n.success&&($("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2)))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},1e4)},n}(); \ No newline at end of file +function bool(t){return 1===t||"1"===t||t===!0||"true"===t}function numfmt(t,e){var n=Math.pow(10,e);return Math.round(t*n)/n}function estimateLoadTime(t,e){return 1e3/t*e+1500}function msNow(){return+new Date}function msElapsed(t){return msNow()-t}function copyToClipboard(t){if(!document.execCommand)return!1;var e="_hiddenCopyText_";if(n=document.getElementById(e),!n){var n=document.createElement("textarea");n.style.position="absolute",n.style.left="-9999px",n.style.top="0",n.id=e,document.body.appendChild(n)}n.textContent=t;var r=document.activeElement;n.focus(),n.setSelectionRange(0,n.value.length);var i;try{i=document.execCommand("copy")}catch(a){i=!1}return r&&"function"==typeof r.focus&&r.focus(),n.textContent="",i}function errorMsg(t,e){$("#notif").addClass("error"),notify.show(t,e||3e3)}function infoMsg(t,e){$("#notif").removeClass("error"),notify.show(t,e||3e3)}!function(){"use strict";function t(){var t;for(p=!0,t=0;t=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function i(t,e){return t.currentStyle?t.currentStyle[r(e)]:g.getComputedStyle?g.getComputedStyle(t,null).getPropertyValue(e):null}function a(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function o(t,e,n){try{t.style[r(e)]=n}catch(i){}}function s(t){t.style.display="","none"===i(t,"display")&&(t.style.display="block")}function u(t){var e,r,i,o="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r0&&(o+="&"+a(e.name,e.value));break;case"select-multiple":for(i=0;i0?o.substring(1):""}function c(t,e,r){var i,a,o,s=!1;return t&&(i=t.split(/\s+/),n(function(t){for(o=0;o0?y[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},y),e},e.addClass=function(t){return t&&n(function(e){e.className+=" "+t},y),e},e.removeClass=function(t){return c(t,"remove",y),e},e.toggleClass=function(t){return c(t,"toggle",y),e},e.hasClass=function(t){return c(t,"has",y)},e.html=function(t){return t||""===t?(n(function(e){e.innerHTML=t},y),e):y[0]?y[0].innerHTML:void 0},e.htmlBefore=function(t){return l(t,"before",y),e},e.htmlAfter=function(t){return l(t,"after",y),e},e.htmlAppend=function(t){return l(t,"append",y),e},e.htmlPrepend=function(t){return l(t,"prepend",y),e},e.attr=function(t,r){if(t){if(t=t.toLowerCase(),"undefined"!=typeof r)return n(function(e){"style"===t?e.style.cssText=r:"class"===t?e.className=r:e.setAttribute(t,r)},y),e;if(y[0])if("style"===t){if(y[0].style.cssText)return y[0].style.cssText}else if("class"===t){if(y[0].className)return y[0].className}else if(y[0].getAttribute(t))return y[0].getAttribute(t)}},e.data=function(t,n){return t?e.attr("data-"+t,n):void 0},e.val=function(t){var r,i,a;if(!_.isUndefined(t))return n(function(e){switch(e.nodeName){case"SELECT":for(("string"==typeof t||"number"==typeof t)&&(t=[t]),i=0;i1?r:r[0];case"INPUT":case"TEXTAREA":case"BUTTON":return y[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)},y),e):!y[0]||"INPUT"!==y[0].nodeName||"checkbox"!==y[0].type&&"radio"!==y[0].type?void 0:!!y[0].checked},e.on=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.addEventListener(r,i,!1):v.attachEvent&&(t[r+i]=function(){return i.apply(t,arguments)},t.attachEvent("on"+r,t[r+i]))},y),e},e.off=function(r,i){return(t===g||t===v)&&(y=[t]),n(function(t){v.addEventListener?t.removeEventListener(r,i,!1):v.attachEvent&&(t.detachEvent("on"+r,t[r+i]),t[r+i]=null)},y),e},e.ajax=function(t,e,n,r){var i,a,o=u(y),s=e?e.toUpperCase():"GET";_.isNumber(r)&&(r={timeout:r});var c=Chartist.extend({},{nocache:!0,timeout:5e3,loader:!0},r);if(o&&"GET"===s&&(t+=-1===t.indexOf("?")?"?"+o:"&"+o,o=null),i=new XMLHttpRequest){if(c.nocache){var l=(+new Date).toString(36);t+=(-1===t.indexOf("?")?"?":"&")+"_="+l}c.loader&&$("#loader").addClass("show"),i.open(s,t,!0),i.timeout=c.timeout,a=setTimeout(function(){errorMsg("XHR timed out."),i.abort(),c.loader&&$("#loader").removeClass("show")},c.timeout+10),i.onreadystatechange=function(){4===i.readyState&&(c.loader&&$("#loader").removeClass("show"),n&&0!=i.status&&n(i.responseText,i.status),clearTimeout(a))},i.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===s&&i.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),i.send(o)}return i},e.get=function(t,n,r){return e.ajax(t,"get",n,r)},e.post=function(t,n,r){return e.ajax(t,"post",n,r)},e}var f=[],d=[],p=!1,m=!1,v=document,g=window;v.addEventListener?(v.addEventListener("DOMContentLoaded",t,!1),g.addEventListener("load",e,!1)):v.attachEvent?(v.attachEvent("onreadystatechange",t),g.attachEvent("onload",e)):g.onload=e,g.$=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 r in e)"object"!=typeof e[r]||null===e[r]||e[r]instanceof Array?t[r]=e[r]:t[r]=n.extend({},t[r],e[r])}),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 r=[],i=Math.max.apply(null,t.map(function(t){return t.length}));return n.times(i).forEach(function(n,i){var a=t.map(function(t){return t[i]});r[i]=e.apply(null,a)}),r},n.roundWithPrecision=function(t,e){var r=Math.pow(10,e||n.precision);return Math.round(t*r)/r},n.precision=8,n.serialize=function(t){return null===t||void 0===t?t:("number"==typeof t?t=""+t:"object"==typeof t&&(t=JSON.stringify({data:t})),_.escape(t))},n.deserialize=function(t){if("string"!=typeof t)return t;t=_.unescape(t);try{t=JSON.parse(t),t=void 0!==t.data?t.data:t}catch(e){}return t},n.createSvg=function(t,e,r,i){var a;return e=e||"100%",r=r||"100%",Array.prototype.slice.call(t.querySelectorAll("svg")).filter(function(t){return t.getAttributeNS(n.namespaces.xmlns,"ct")}).forEach(function(e){t.removeChild(e)}),a=new n.Svg("svg").attr({width:e,height:r}).addClass(i).attr({style:"width: "+e+"; height: "+r+";"}),t.appendChild(a._node),a},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,r=n.getDataArray(t);e=r.every(function(t){return t instanceof Array})?Math.max.apply(null,r.map(function(t){return t.length})):r.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;ea.high&&(a.high=n),s&&n0?a.low=0:(a.high=1,a.low=0)),a},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 r,i=2,a=2;if(t%2===0)return 2;do i=n(i)%t,a=n(n(a))%t,r=e(Math.abs(i-a),t);while(1===r);return r},n.getBounds=function(t,e,r,i){var a,o,s,u=0,c={high:e.high,low:e.low};c.valueRange=c.high-c.low,c.oom=n.orderOfMagnitude(c.valueRange),c.step=Math.pow(10,c.oom),c.min=Math.floor(c.low/c.step)*c.step,c.max=Math.ceil(c.high/c.step)*c.step,c.range=c.max-c.min,c.numberOfSteps=Math.round(c.range/c.step);var l=n.projectLength(t,c.step,c),h=r>l,f=i?n.rho(c.range):0;if(i&&n.projectLength(t,1,c)>=r)c.step=1;else if(i&&f=r)c.step=f;else for(;;){if(h&&n.projectLength(t,c.step,c)<=r)c.step*=2;else{if(h||!(n.projectLength(t,c.step/2,c)>=r))break;if(c.step/=2,i&&c.step%1!==0){c.step*=2;break}}if(u++>1e3)throw new Error("Exceeded maximum number of iterations while optimizing scale step!")}for(o=c.min,s=c.max;o+c.step<=c.low;)o+=c.step;for(;s-c.step>=c.high;)s-=c.step;for(c.min=o,c.max=s,c.range=c.max-c.min,c.values=[],a=c.min;a<=c.max;a+=c.step)c.values.push(n.roundWithPrecision(a));return c},n.createChartRect=function(t,e,r){var i=!(!e.axisX&&!e.axisY),a=i?e.axisY.offset:0,o=i?e.axisX.offset:0,s=t.width()||n.quantity(e.width).value||0,u=t.height()||n.quantity(e.height).value||0,c=n.normalizePadding(e.chartPadding,r);s=Math.max(s,a+c.left+c.right),u=Math.max(u,o+c.top+c.bottom);var l={padding:c,width:function(){return this.x2-this.x1},height:function(){return this.y1-this.y2}};return i?("start"===e.axisX.position?(l.y2=c.top+o,l.y1=Math.max(u-c.bottom,l.y2+1)):(l.y2=c.top,l.y1=Math.max(u-c.bottom-o,l.y2+1)),"start"===e.axisY.position?(l.x1=c.left+a,l.x2=Math.max(s-c.right,l.x1+1)):(l.x1=c.left,l.x2=Math.max(s-c.right-a,l.x1+1))):(l.x1=c.left,l.x2=Math.max(s-c.right,l.x1+1),l.y2=c.top,l.y1=Math.max(u-c.bottom,l.y2+1)),l},n.createGrid=function(t,e,r,i,a,o,s,u){var c={};c[r.units.pos+"1"]=Math.round(t)+.5,c[r.units.pos+"2"]=Math.round(t)+.5,c[r.counterUnits.pos+"1"]=i,c[r.counterUnits.pos+"2"]=i+a;var l=o.elem("line",c,s.join(" "));u.emit("draw",n.extend({type:"grid",axis:r,index:e,group:o,element:l},c))},n.createLabel=function(t,e,r,i,a,o,s,u,c,l,h){var f,d={};d[a.units.pos]=t+s[a.units.pos],d[a.counterUnits.pos]=s[a.counterUnits.pos],d[a.units.len]=e,d[a.counterUnits.len]=o-10;var p=i[r];if(_.isNumber(p)&&(p=n.roundWithPrecision(p,2)),l){var m=''+p+"";f=u.foreignObject(m,n.extend({style:"overflow: visible;"},d))}else f=u.elem("text",d,c.join(" ")).text(p);h.emit("draw",n.extend({type:"label",axis:a,index:r,group:u,element:f,text:p},d))},n.getSeriesOption=function(t,e,n){if(t.name&&e.series&&e.series[t.name]){var r=e.series[t.name];return r.hasOwnProperty(n)?r[n]:e[n]}return e[n]},n.optionsProvider=function(e,r,i){function a(e){var a=s;if(s=n.extend({},c),r)for(u=0;u=2&&e[a]<=e[a-2]?i=!0:(i&&(r.push({pathCoordinates:[],valueData:[]}),i=!1),r[r.length-1].pathCoordinates.push(e[a],e[a+1]),r[r.length-1].valueData.push(n[a/2]));return r}var r={fillHoles:!1};return t=n.extend({},r,t),function i(t,r){var a=e(t,r);if(a.length){if(a.length>1){var o=[];return a.forEach(function(t){o.push(i(t.pathCoordinates,t.valueData))}),n.Svg.Path.join(o)}if(t=a[0].pathCoordinates,r=a[0].valueData,t.length<=4)return n.Interpolation.none()(t,r);var s,u,c=[],l=[],h=t.length/2,f=[],d=[],p=[],m=[];for(s=0;h>s;s++)c[s]=t[2*s],l[s]=t[2*s+1];for(s=0;h-1>s;s++)p[s]=l[s+1]-l[s],m[s]=c[s+1]-c[s],d[s]=p[s]/m[s];for(f[0]=d[0],f[h-1]=d[h-2],s=1;h-1>s;s++)0===d[s]||0===d[s-1]||d[s-1]>0!=d[s]>0?f[s]=0:(f[s]=3*(m[s-1]+m[s])/((2*m[s]+m[s-1])/d[s-1]+(m[s]+2*m[s-1])/d[s]),isFinite(f[s])||(f[s]=0));for(u=(new n.Svg.Path).move(c[0],l[0],!1,r[0]),s=0;h-1>s;s++)u.curve(c[s]+m[s]/3,l[s]+f[s]*m[s]/3,c[s+1]-m[s]/3,l[s+1]-f[s+1]*m[s]/3,c[s+1],l[s+1],!1,r[s+1]);return u}return n.Interpolation.none()([])}},n.Interpolation.step=function(t){var e={postpone:!0,fillHoles:!1};return t=n.extend({},e,t),function(e,r){for(var i,a,o,s=new n.Svg.Path,u=0;u1}).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,g).line(e.x,e.y).position(t.pathElements.length+1).line(n.x,g)}).forEach(function(n){var s=u.elem("path",{d:n.stringify()},t.classNames.area,!0);this.eventEmitter.emit("draw",{type:"area",values:e.normalized[o],path:n.clone(),series:a,seriesIndex:o,axisX:r,axisY:i,chartRect:c,index:o,group:u,element:s})}.bind(this))}}.bind(this)),this.eventEmitter.emit("created",{bounds:i.bounds,chartRect:c,axisX:r,axisY:i,svg:this.svg,options:t})}function i(t,e,r,i){n.Line["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),function(t,e,n){"use strict";function r(t){this.data=n.normalizeData(this.data);var e,r={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 i=this.svg.elem("g").addClass(t.classNames.gridGroup),o=this.svg.elem("g"),s=this.svg.elem("g").addClass(t.classNames.labelGroup);if(t.stackBars&&0!==r.normalized.length){var u=n.serialMap(r.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([u],n.extend({},t,{referenceValue:0}),t.horizontalBars?"x":"y")}else e=n.getHighLow(r.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 c,l,h,f,d,p=n.createChartRect(this.svg,t,a.padding);l=t.distributeSeries&&t.stackBars?r.raw.labels.slice(0,1):r.raw.labels,t.horizontalBars?(c=f=void 0===t.axisX.type?new n.AutoScaleAxis(n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})):t.axisX.type.call(n,n.Axis.units.x,r,p,n.extend({},t.axisX,{highLow:e,referenceValue:0})),h=d=void 0===t.axisY.type?new n.StepAxis(n.Axis.units.y,r,p,{ticks:l}):t.axisY.type.call(n,n.Axis.units.y,r,p,t.axisY)):(h=f=void 0===t.axisX.type?new n.StepAxis(n.Axis.units.x,r,p,{ticks:l}):t.axisX.type.call(n,n.Axis.units.x,r,p,t.axisX),c=d=void 0===t.axisY.type?new n.AutoScaleAxis(n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})):t.axisY.type.call(n,n.Axis.units.y,r,p,n.extend({},t.axisY,{highLow:e,referenceValue:0})));var m=t.horizontalBars?p.x1+c.projectValue(0):p.y1-c.projectValue(0),v=[];h.createGridAndLabels(i,s,this.supportsForeignObject,t,this.eventEmitter),c.createGridAndLabels(i,s,this.supportsForeignObject,t,this.eventEmitter),r.raw.series.forEach(function(e,i){var a,s,u=i-(r.raw.series.length-1)/2;a=t.distributeSeries&&!t.stackBars?h.axisLength/r.normalized.length/2:t.distributeSeries&&t.stackBars?h.axisLength/2:h.axisLength/r.normalized[i].length/2,s=o.elem("g"),s.attr({"ct:series-name":e.name,"ct:meta":n.serialize(e.meta)}),s.addClass([t.classNames.series,e.className||t.classNames.series+"-"+n.alphaNumerate(i)].join(" ")),r.normalized[i].forEach(function(o,l){var g,x,y,b;if(b=t.distributeSeries&&!t.stackBars?i:t.distributeSeries&&t.stackBars?0:l,g=t.horizontalBars?{x:p.x1+c.projectValue(o&&o.x?o.x:0,l,r.normalized[i]),y:p.y1-h.projectValue(o&&o.y?o.y:0,b,r.normalized[i])}:{x:p.x1+h.projectValue(o&&o.x?o.x:0,b,r.normalized[i]),y:p.y1-c.projectValue(o&&o.y?o.y:0,l,r.normalized[i])},h instanceof n.StepAxis&&(h.options.stretch||(g[h.units.pos]+=a*(t.horizontalBars?-1:1)),g[h.units.pos]+=t.stackBars||t.distributeSeries?0:u*t.seriesBarDistance*(t.horizontalBars?-1:1)),y=v[l]||m,v[l]=y-(m-g[h.counterUnits.pos]),void 0!==o){var w={};w[h.units.pos+"1"]=g[h.units.pos],w[h.units.pos+"2"]=g[h.units.pos],!t.stackBars||"accumulate"!==t.stackMode&&t.stackMode?(w[h.counterUnits.pos+"1"]=m,w[h.counterUnits.pos+"2"]=g[h.counterUnits.pos]):(w[h.counterUnits.pos+"1"]=y,w[h.counterUnits.pos+"2"]=v[l]),w.x1=Math.min(Math.max(w.x1,p.x1),p.x2),w.x2=Math.min(Math.max(w.x2,p.x1),p.x2),w.y1=Math.min(Math.max(w.y1,p.y2),p.y1),w.y2=Math.min(Math.max(w.y2,p.y2),p.y1),x=s.elem("line",w,t.classNames.bar).attr({"ct:value":[o.x,o.y].filter(n.isNum).join(","),"ct:meta":n.getMetaData(e,l)}),this.eventEmitter.emit("draw",n.extend({type:"bar",value:o,index:l,meta:n.getMetaData(e,l),series:e,seriesIndex:i,axisX:f,axisY:d,chartRect:p,group:s,element:x},w))}}.bind(this))}.bind(this)),this.eventEmitter.emit("created",{bounds:c.bounds,chartRect:p,axisX:f,axisY:d,svg:this.svg,options:t})}function i(t,e,r,i){n.Bar["super"].constructor.call(this,t,e,a,n.extend({},a,r),i)}var a={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:i,createChart:r})}(window,document,t),t}),function(t,e){t["Chartist.plugins.ctAxisTitle"]=e()}(this,function(){return function(t,e,n){"use strict";var r={axisTitle:"",axisClass:"ct-axis-title",offset:{x:0,y:0},textAnchor:"middle",flipText:!1},i={axisX:r,axisY:r};n.plugins=n.plugins||{},n.plugins.ctAxisTitle=function(t){return t=n.extend({},i,t),function(e){e.on("created",function(e){var r,i,a;if(t.axisX.axisTitle&&e.axisX&&(r=e.axisX.axisLength/2+e.options.axisY.offset+e.options.chartPadding.left,i=e.options.chartPadding.top,"end"===e.options.axisY.position&&(r-=e.options.axisY.offset),"end"===e.options.axisX.position&&(i+=e.axisY.axisLength),a=new n.Svg("text"),a.addClass(t.axisX.axisClass),a.text(t.axisX.axisTitle),a.attr({x:r+t.axisX.offset.x,y:i+t.axisX.offset.y,"text-anchor":t.axisX.textAnchor}),e.svg.append(a,!0)),t.axisY.axisTitle&&e.axisY){r=0,i=e.axisY.axisLength/2+e.options.chartPadding.top,"start"===e.options.axisX.position&&(i+=e.options.axisX.offset),"end"===e.options.axisY.position&&(r=e.axisX.axisLength);var o="rotate("+(t.axisY.flipText?-90:90)+", "+r+", "+i+")";a=new n.Svg("text"),a.addClass(t.axisY.axisClass),a.text(t.axisY.axisTitle),a.attr({x:r+t.axisY.offset.x,y:i+t.axisY.offset.y,transform:o,"text-anchor":t.axisY.textAnchor}),e.svg.append(a,!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 r(t){t.attr({style:"display:none"})}function i(t){t.attr({style:"display:block"})}function a(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r;return 0>i&&(i=-i,n=e.x),0>a&&(a=-a,r=e.y),{x:n,y:r,width:i,height:a}}function o(t,e){return s(t.clientX,t.clientY,e)}function s(t,e,n){var r="svg"===n.tagName?n:n.ownerSVGElement,i=r.getScreenCTM(),a=r.createSVGPoint();return a.x=t,a.y=e,a=a.matrixTransform(i.inverse()),a||{x:0,y:0}}function u(t,e){var n=e.bounds.max,r=e.bounds.min;if(e.scale&&"log"===e.scale.type){var i=e.scale.base;return Math.pow(i,t*c(n/r,i)/e.axisLength)*r}return t*e.bounds.range/e.axisLength+r}function c(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 s(t){var e=o(t,b);return e.id=t.identifier,e}function c(t){for(var e=0;e1&&(y.attr(a(M[0],M[1])),i(y))}function h(t){for(var e=t.changedTouches,n=0;n1&&(y.attr(a(M[0],M[1])),i(y),t.preventDefault())}function f(t){d(t.changedTouches)}function d(t){for(var e=0;e=0&&M.splice(n,1)}}function p(t){M.length>1&&g(a(M[0],M[1])),d(t.changedTouches),r(y)}function m(t){0===t.button&&(A=o(t,b),y.attr(a(A,A)),i(y),t.preventDefault())}function v(e){if(0===e.button){var n=a(A,o(e,b));g(n),A=null,r(y),e.preventDefault()}else t.resetOnRightMouseBtn&&2===e.button&&(O(),e.preventDefault())}function g(t){if(t.width>5&&t.height>5){var n=t.x-S.x1,r=n+t.width,i=S.y1-t.y,a=i-t.height,o=u(n,w),s=u(r,w),c=u(a,E),l=u(i,E),h=e.options.explicitBounds;_.isUndefined(h)||(_.isUndefined(h.xLow)||(o=Math.max(h.xLow,o)),_.isUndefined(h.xHigh)||(s=Math.min(h.xHigh,s)),_.isUndefined(h.yLow)||(c=Math.max(h.yLow,c)),_.isUndefined(h.yHigh)||(l=Math.min(h.yHigh,l))),e.options.axisX.highLow={low:o,high:s},e.options.axisY.highLow={low:c,high:l},e.update(e.data,e.options),C&&C(e,O)}}function x(t){if(A){var e=o(t,b);y.attr(a(A,e)),t.preventDefault()}}if(e instanceof n.Line){var y,b,w,E,S,A,C=t.onZoom,M=[];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){w=t.axisX,E=t.axisY,S=t.chartRect,b=t.svg._node,y=t.svg.elem("rect",{x:10,y:10,width:100,height:100},"ct-zoom-rect"),r(y);var e=t.svg.querySelector("defs")||t.svg.elem("defs"),n=S.width(),i=S.height();e.elem("clipPath",{id:"zoom-mask"}).elem("rect",{x:S.x1,y:S.y2,width:n,height:i,fill:"white"}),b.addEventListener("mousedown",m),b.addEventListener("mouseup",v),b.addEventListener("mousemove",x),b.addEventListener("touchstart",l),b.addEventListener("touchmove",h),b.addEventListener("touchend",p),b.addEventListener("touchcancel",f)});var O=function(){e.options.axisX.highLow=null,e.options.axisY.highLow=null,e.update(e.data,e.options)}}}}}(window,document,Chartist),Chartist.plugins.zoom}),function(){function t(t,e){return t.set(e[0],e[1]),t}function e(t,e){return t.add(e),t}function n(t,e){for(var n=-1,r=t.length;++n-1&&t%1==0&&e>t}function f(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function d(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function p(t){return gn[t]}function m(){}function v(){}function g(t,e){return y(t,e)&&delete t[e]}function x(t,e){if(Gn){var n=t[e];return n===ye?ve:n}return Nn.call(t,e)?t[e]:ve}function y(t,e){return Gn?t[e]!==ve:Nn.call(t,e)}function b(t,e,n){t[e]=Gn&&n===ve?ye:n}function w(t){var e=-1,n=t?t.length:0;for(this.clear();++en)return!1;var r=t.length-1;return n==r?t.pop():Xn.call(t,n,1),!0}function T(t,e){var n=P(t,e);return 0>n?ve:t[n][1]}function I(t,e){return P(t,e)>-1}function P(t,e){for(var n=t.length;n--;)if(Yt(t[n][0],e))return n;return-1}function z(t,e,n){var r=P(t,e);0>r?t.push([e,n]):t[r][1]=n}function B(t,e,n){var r=t[e];Nn.call(t,e)&&Yt(r,n)&&(n!==ve||e in t)||(t[e]=n)}function R(t,e){return t&&pt(e,oe(e),t)}function U(t){return"function"==typeof t?t:de}function X(t){return ar(t)?t:Bt(t)}function Y(t,e,r,i,a,o,s){var u;if(i&&(u=o?i(t,a,o,s):i(t)),u!==ve)return u;if(!Gt(t))return t;var c=ar(t);if(c){if(u=Ot(t),!e)return dt(t,u)}else{var h=_t(t),f=h==$e||h==Ne;if(or(t))return ot(t,e);if(h==Te||h==Ce||f&&!o){if(l(t))return o?t:{};if(u=Lt(f?{}:t),!e)return u=R(u,t),r?vt(t,u):u}else{if(!mn[h])return o?t:{};u=$t(t,h,e)}}s||(s=new M);var d=s.get(t);return d?d:(s.set(t,u),(c?n:D)(t,function(n,a){B(u,a,Y(n,e,r,i,a,t,s))}),r&&!c?vt(t,u):u)}function q(t){return Gt(t)?Rn(t):{}}function D(t,e){return t&&nr(t,e,oe)}function F(t,e){e=kt(e,t)?[e+""]:X(e);for(var n=0,r=e.length;null!=t&&r>n;)t=t[e[n++]];return n&&n==r?t:ve}function H(t,e){return Nn.call(t,e)||"object"==typeof t&&e in t&&null===zn(t)}function V(t,e){return e in Object(t)}function G(t,e,n,r,i){return t===e?!0:null==t||null==e||!Gt(t)&&!Wt(e)?t!==t&&e!==e:W(t,e,G,n,r,i)}function W(t,e,n,r,i,a){var o=ar(t),s=ar(e),u=_e,c=_e;o||(u=_t(t),u=u==Ce?Te:u),s||(c=_t(e),c=c==Ce?Te:c);var h=u==Te&&!l(t),f=c==Te&&!l(e),d=u==c;if(d&&!h)return a||(a=new M),o||te(t)?bt(t,e,n,r,i,a):wt(t,e,u,n,r,i,a);if(!(i&we)){var p=h&&Nn.call(t,"__wrapped__"),m=f&&Nn.call(e,"__wrapped__");if(p||m)return a||(a=new M),n(p?t.value():t,m?e.value():e,r,i,a)}return d?(a||(a=new M),Et(t,e,n,r,i,a)):!1}function Q(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++ie&&(e=-e>i?0:i+e),n=n>i?i:n,0>n&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var a=Array(i);++re?1:-1:ne(r)||0,it(e,n,r,t)}}function bt(t,e,n,r,i,o){var s=-1,u=i&we,c=i&be,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=o.get(t);if(f)return f==e;var d=!0;for(o.set(t,e);++s-1&&t%1==0&&Se>=t}function Gt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function Wt(t){return!!t&&"object"==typeof t}function Qt(t){return null==t?!1:Ht(t)?kn.test($n.call(t)):Wt(t)&&(l(t)?kn:hn).test(t)}function Jt(t){return"number"==typeof t||Wt(t)&&jn.call(t)==ke}function Zt(t){return"string"==typeof t||!ar(t)&&Wt(t)&&jn.call(t)==ze}function Kt(t){return"symbol"==typeof t||Wt(t)&&jn.call(t)==Be}function te(t){return Wt(t)&&Vt(t.length)&&!!pn[jn.call(t)]}function ee(t){return t===ve}function ne(t){if(Gt(t)){var e=Ht(t.valueOf)?t.valueOf():t;t=Gt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(on,"");var n=ln.test(t);return n||fn.test(t)?yn(t.slice(2),n?2:8):cn.test(t)?Ae:+t}function re(t){if("string"==typeof t)return t;if(null==t)return"";if(Kt(t))return tr?tr.call(t):"";var e=t+"";return"0"==e&&1/t==-Ee?"-0":e}function ie(t,e,n){var r=null==t?ve:F(t,e);return r===ve?n:r}function ae(t,e){return Mt(t,e,V)}function oe(t){var e=It(t);if(!e&&!Dt(t))return Z(t);var n=Nt(t),r=!!n,i=n||[],a=i.length;for(var o in t)!H(t,o)||r&&("length"==o||h(o,a))||e&&"constructor"==o||i.push(o);return i}function se(t){return s(t,oe(t))}function ue(t){return t=re(t),t&&Ke.test(t)?t.replace(Je,c):t}function ce(t){return t=re(t),t&&an.test(t)?t.replace(rn,"\\$&"):t}function le(){var t=arguments,e=re(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function he(t){return t=re(t),t&&Ze.test(t)?t.replace(Qe,p):t}function fe(t){return function(){return t}}function de(t){return t}function pe(t){return J("function"==typeof t?t:Y(t,!0))}function me(t){return kt(t)?nt(t):rt(t)}var ve,ge="4.6.1",xe=200,ye="__lodash_hash_undefined__",be=1,we=2,Ee=1/0,Se=9007199254740991,Ae=NaN,Ce="[object Arguments]",_e="[object Array]",Me="[object Boolean]",Oe="[object Date]",Le="[object Error]",$e="[object Function]",Ne="[object GeneratorFunction]",je="[object Map]",ke="[object Number]",Te="[object Object]",Ie="[object RegExp]",Pe="[object Set]",ze="[object String]",Be="[object Symbol]",Re="[object WeakMap]",Ue="[object ArrayBuffer]",Xe="[object Float32Array]",Ye="[object Float64Array]",qe="[object Int8Array]",De="[object Int16Array]",Fe="[object Int32Array]",He="[object Uint8Array]",Ve="[object Uint8ClampedArray]",Ge="[object Uint16Array]",We="[object Uint32Array]",Qe=/&(?:amp|lt|gt|quot|#39|#96);/g,Je=/[&<>"'`]/g,Ze=RegExp(Qe.source),Ke=RegExp(Je.source),tn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,en=/^\w*$/,nn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,rn=/[\\^$.*+?()[\]{}|]/g,an=RegExp(rn.source),on=/^\s+|\s+$/g,sn=/\\(\\)?/g,un=/\w*$/,cn=/^[-+]0x[0-9a-f]+$/i,ln=/^0b[01]+$/i,hn=/^\[object .+?Constructor\]$/,fn=/^0o[0-7]+$/i,dn=/^(?:0|[1-9]\d*)$/,pn={};pn[Xe]=pn[Ye]=pn[qe]=pn[De]=pn[Fe]=pn[He]=pn[Ve]=pn[Ge]=pn[We]=!0,pn[Ce]=pn[_e]=pn[Ue]=pn[Me]=pn[Oe]=pn[Le]=pn[$e]=pn[je]=pn[ke]=pn[Te]=pn[Ie]=pn[Pe]=pn[ze]=pn[Re]=!1;var mn={};mn[Ce]=mn[_e]=mn[Ue]=mn[Me]=mn[Oe]=mn[Xe]=mn[Ye]=mn[qe]=mn[De]=mn[Fe]=mn[je]=mn[ke]=mn[Te]=mn[Ie]=mn[Pe]=mn[ze]=mn[Be]=mn[He]=mn[Ve]=mn[Ge]=mn[We]=!0,mn[Le]=mn[$e]=mn[Re]=!1;var vn={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},gn={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},xn={"function":!0,object:!0},yn=parseInt,bn=xn[typeof exports]&&exports&&!exports.nodeType?exports:ve,wn=xn[typeof module]&&module&&!module.nodeType?module:ve,En=wn&&wn.exports===bn?bn:ve,Sn=u(bn&&wn&&"object"==typeof global&&global),An=u(xn[typeof self]&&self),Cn=u(xn[typeof window]&&window),_n=u(xn[typeof this]&&this),Mn=Sn||Cn!==(_n&&_n.window)&&Cn||An||_n||Function("return this")(),On=Array.prototype,Ln=Object.prototype,$n=Function.prototype.toString,Nn=Ln.hasOwnProperty,jn=Ln.toString,kn=RegExp("^"+$n.call(Nn).replace(rn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Tn=En?Mn.Buffer:ve,In=Mn.Symbol,Pn=Mn.Uint8Array,zn=Object.getPrototypeOf,Bn=Object.getOwnPropertySymbols,Rn=Object.create,Un=Ln.propertyIsEnumerable,Xn=On.splice,Yn=Math.ceil,qn=Object.keys,Dn=Math.max,Fn=Ct(Mn,"Map"),Hn=Ct(Mn,"Set"),Vn=Ct(Mn,"WeakMap"),Gn=Ct(Object,"create"),Wn=Fn?$n.call(Fn):"",Qn=Hn?$n.call(Hn):"",Jn=Vn?$n.call(Vn):"",Zn=In?In.prototype:ve,Kn=Zn?Zn.valueOf:ve,tr=Zn?Zn.toString:ve,er=gt(D),nr=xt(),rr=nt("length"),ir=Bn||function(){return[]};(Fn&&_t(new Fn)!=je||Hn&&_t(new Hn)!=Pe||Vn&&_t(new Vn)!=Re)&&(_t=function(t){var e=jn.call(t),n=e==Te?t.constructor:null,r="function"==typeof n?$n.call(n):"";if(r)switch(r){case Wn:return je;case Qn:return Pe;case Jn:return Re}return e});var ar=Array.isArray,or=Tn?function(t){return t instanceof Tn}:fe(!1),sr=yt();v.prototype=Gn?Gn(null):Ln,w.prototype.clear=E,w.prototype["delete"]=S,w.prototype.get=A,w.prototype.has=C,w.prototype.set=_,M.prototype.clear=O,M.prototype["delete"]=L,M.prototype.get=$,M.prototype.has=N,M.prototype.set=j,m.constant=fe,m.iteratee=pe,m.keys=oe,m.map=Xt,m.property=me,m.range=sr,m.toPairs=se,m.eq=Yt,m.escape=ue,m.escapeRegExp=ce,m.forEach=Ut,m.get=ie,m.hasIn=ae,m.identity=de,m.isArguments=qt,m.isArray=ar,m.isArrayLike=Dt,m.isArrayLikeObject=Ft,m.isBuffer=or,m.isFunction=Ht,m.isLength=Vt,m.isNative=Qt,m.isNumber=Jt,m.isObject=Gt,m.isObjectLike=Wt,m.isString=Zt,m.isSymbol=Kt,m.isTypedArray=te,m.isUndefined=ee,m.last=Rt,m.replace=le,m.toNumber=ne,m.toString=re,m.unescape=he,m.each=Ut,m.VERSION=ge,(Cn||An||{})._=m,Mn._=m}.call(this),Math.log10=Math.log10||function(t){return Math.log(t)/Math.LN10},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 r=n;n.match(/^\{.*\}$/)||(n="{"+n+"}");var i=new RegExp(_.escapeRegExp(n),"g");t=t.replace(i,e[r])}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(){$(this).hasClass("no-close")||t.hide(this)}),$(".Dialog").on("click",function(t){t.stopImmediatePropagation()}),$(window).on("keydown",function(e){27==e.which&&t.hide(".Modal")})},t}(),notify=function(){var t,e,n={},r="#notif";return n.show=function(i,a){$(r).html(i),modal.show(r),clearTimeout(t),clearTimeout(e),_.isUndefined(a)||(t=setTimeout(n.hide,a))},n.hide=function(){var t=$(r);t.removeClass("visible"),e=setTimeout(function(){t.addClass("hidden")},250)},n.init=function(){$(r).on("click",function(){n.hide(this)})},n}();$().ready(function(){setInterval(function(){$(".anim-dots").each(function(t){var e=$(t),n=e.html()+".";5==n.length&&(n="."),e.html(n)})},1e3),$("input[type=number]").on("mousewheel",function(t){var e=+$(this).val(),n=+($(this).attr("step")||1),r=$(this).attr("min"),i=$(this).attr("max");if(t.wheelDelta>0?e+=n:e-=n,_.isUndefined(r)||(e=Math.max(e,r)),_.isUndefined(i)||(e=Math.min(e,i)),$(this).val(e),"createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!1,!0),$(this)[0].dispatchEvent(a)}else $(this)[0].fireEvent("onchange");t.preventDefault()}),modal.init(),notify.init()});var page_wifi=function(){function t(t,e){if(200!=e)return void n(5e3);t=JSON.parse(t);var a=!bool(t.result.inProgress)&&t.result.APs.length>0;if(n(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 e=document.createElement("div"),n=$(e).data("ssid",t.essid).data("pwd",0!=t.enc).addClass("AP");t.essid==r.current&&n.addClass("selected");var a=document.createElement("div");$(a).addClass("inner").htmlAppend('
{0}
'.format(t.rssi_perc)).htmlAppend('
{0}
'.format(_.escape(t.essid))).htmlAppend('
{0}
'.format(i[t.enc]));n.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()}),e.appendChild(a), +o[0].appendChild(e)}})}}function e(){$().get(_root+"/wifi/scan",t)}function n(t){setTimeout(e,t)}var r={},i=["Open","WEP","WPA","WPA2","WPA/WPA2"];return r.init=function(){e()},r}(),page_waveform=function(){function t(t){var e,n,r=window.matchMedia("screen and (min-width: 544px)"),i=!r.matches,o="FFT"==t.stats.format;o?(e="Frequency - [ Hz ]",n="Magnitude - [ mA ]"):(e="Sample time - [ ms ]",n="Current - [ mA ]");var s=Math.max(-t.stats.min,t.stats.max),l=Math.max(s,10);$("#stat-count").html(t.stats.count),$("#stat-f-s").html(numfmt(t.stats.freq,2)),$("#stat-i-peak").html(numfmt(s,2)),$("#stat-i-rms").html(numfmt(t.stats.rms,2)),$(".stats").removeClass("invis");var h=o?t.stats.freq/t.stats.count:1e3/t.stats.freq,f=_.map(t.samples,function(t,e){return{x:e*h,y:t}}),d=[Chartist.plugins.zoom({resetOnRightMouseBtn:!0,onZoom:function(t,e){a=e,u=t.options.axisX.highLow,c=t.options.axisY.highLow}})];i||d.push(Chartist.plugins.ctAxisTitle({axisX:{axisTitle:e,offset:{x:0,y:55}},axisY:{axisTitle:n,flipText:!0,offset:{x:0,y:15}}}));var p,m,v,g;u?(p=u.high,m=u.low,v=c.high,g=c.low):(v=o?void 0:l,g=o?0:-l),new Chartist.Line("#chart",{series:[{name:"a",data:f}]},{showPoint:!1,showArea:o,fullWidth:!0,chartPadding:i?{right:20,bottom:5,left:0}:{right:25,bottom:30,left:25},series:{a:{lineSmooth:Chartist.Interpolation.monotoneCubic()}},axisX:{type:Chartist.AutoScaleAxis,high:p,low:m},axisY:{type:Chartist.AutoScaleAxis,high:v,low:g},explicitBounds:{xLow:0,yLow:o?0:void 0,xHigh:f[f.length-1].x},plugins:d})}function e(e,n){if(f=!1,200!=n)errorMsg("Request failed.",1e3);else{var i=JSON.parse(e);i.success?($(".chartexport").removeClass("hidden"),v=i,t(i)):errorMsg("Sampling failed.",1e3)}d&&(m=setTimeout(r,Math.max(0,p-msElapsed(s))))}function n(){g.count=$("#count").val(),g.freq=$("#freq").val()*("fft"==o?2:1)}function r(){f&&(errorMsg("Request already pending - aborting."),l.abort()),f=!0,s=msNow();var t=g.count,n=g.freq,r=_root+"/measure/"+o+"?n="+t+"&fs="+n;return l=$().get(r,e,estimateLoadTime(n,t)),!0}function i(){p=+$("#ar-time").val(),n(),d=!d,d?r():clearTimeout(m),$("#ar-btn").toggleClass("btn-blue").toggleClass("btn-red").val(d?"Stop":"Auto")}var a,o,s,u,c,l,h={},f=!1,d=!1,p=1,m=-1,v=null,g={count:0,freq:0};return h.init=function(t){function e(){n(),r()}o=t,$("#load").on("click",e),$(".chartexport a").on("click",function(){var t=$(this).data("sep"),e="",n=v.stats.freq/v.stats.count;switch(t){case"space":e=v.samples.join(" ");break;case"comma":e=v.samples.join(",");break;case"newline":e=v.samples.join("\n");break;case"fft-csv":e=_.map(v.samples,function(t,e){return numfmt(e*n,3)+","+t}).join("\n");break;case"fft-json":e=JSON.stringify(_.map(v.samples,function(t,e){return{f:+numfmt(e*n,3),m:t}}))}if(copyToClipboard(e))infoMsg("Copy success!");else{var r=$("#copybox");r.removeClass("hidden"),r.val(e)}}),$("#count,#freq").on("keyup",function(t){13==t.which&&e()}),$("#chart").on("contextmenu",function(t){return a&&a(),a=null,u=null,c=null,t.preventDefault(),!1}),$("#ar-btn").on("click",i)},h}(),page_spectrogram=function(){function t(t){var e,n,r,i;t=Math.log10(1+t),t>2&&(t=2),0>t&&(t=0);for(var a=0;a=s&&(e=s,r=o),s>=t){n=s,i=o;break}}var u=(t-e)/(n-e);e==n&&(u=0);var c=Math.round(r[1]+(i[1]-r[1])*u),l=Math.round(r[2]+(i[2]-r[2])*u),h=Math.round(r[3]+(i[3]-r[3])*u);return"rgb("+c+","+l+","+h+")"}function e(){var t=c.getImageData(g.x+g.dx,g.y,g.w-g.dx,g.h+10);c.fillStyle="black",c.fillRect(g.x,g.y,g.w,g.h),c.clearRect(g.x,g.y+g.h+1,g.w,10),c.putImageData(t,g.x,g.y)}function n(n){e();for(var r=x.sampCount/2,i=0;r>i;i++){var a;if(i*g.dy>g.h)break;a=i>n.length?"#000":t(n[i]),c.fillStyle=a;var o=g.x+g.w-g.dx,s=g.y+g.h-(i+1)*g.dy,u=g.dx,l=g.dy;s=950){p=msNow();var h=!1;msElapsed(m)>9500&&(h=!0,m=msNow()),c.strokeStyle="white",c.beginPath(),c.moveTo(g.x+g.w-.5,g.y+g.h+1),c.lineTo(g.x+g.w-.5,g.y+g.h+1+(h?6:2)),c.stroke()}}function r(t,e){if(h=!1,200==e)try{var r=JSON.parse(t);r.success?n(r.samples):errorMsg("Sampling failed.",1e3)}catch(a){errorMsg(a)}else errorMsg("Request failed.",1e3);y&&(l=setTimeout(i,Math.max(0,x.interval-msElapsed(d))))}function i(){h&&(errorMsg("Request already pending - aborting."),f.abort()),h=!0,d=msNow();var t=x.freq,e=x.sampCount,n=_root+"/measure/fft?n="+e+"&fs="+t;return f=$().get(n,r,estimateLoadTime(t,e)),!0}function a(){for(var e=8,n=10,r=g.h-12,i=g.y+6,a=g.x-e-n,o=100/r,s=0;r>s;s++){var u=t(s*o),l=t((s+1)*o),h=Math.floor(i+r-(s+1)),f=c.createLinearGradient(0,h+1,0,h);f.addColorStop(0,u),f.addColorStop(1,l),c.fillStyle=f,c.fillRect(a,h,n,1)}c.strokeStyle="#000",c.strokeRect(a-.5,i-.5,n+1,r+1),o=100/r,c.font="12px sans-serif",c.fillStyle="white",c.textAlign="right";for(var s=0;s<=g.h;s+=r/10)c.fillText(Math.round(s*o)+"",g.x-e-n-e,i+r-s+3)}function o(){var t=8,e=g.x+g.w,n=e+t,r=g.y,i=g.h,a=70;c.clearRect(e+.5,r-10,a,i+20);for(var o,s=x.freq/2/(x.sampCount/2),u=g.h/g.dy,l=u*s,h=[10,25,50],f=1,d=!1;;){for(var p=0;p=p;p+=o){if(p>=u){var m=p-u;if(m>o/2)break;p=u}var v=p*(l/u);v=v>=1e6?numfmt(v/1e6,2)+"M":v>=1e3?numfmt(v/1e3,2)+"k":numfmt(v,1);var y=Math.round(r+i-g.dy*p);if(c.fillText(v,n,y+4),c.beginPath(),c.moveTo(e,y+.5),c.lineTo(e+t/2,y+.5),c.stroke(),p>=u)break}c.font="16px sans-serif",c.save(),c.translate(e+50,g.y+g.h/2),c.rotate(Math.PI/2),c.textAlign="center",c.fillText("Frequency - [Hz]",0,0),c.restore()}function s(){x.interval=+$("#interval").val(),x.freq=2*+$("#freq").val(),x.sampCount=+$("#count").val(),g.dx=+$("#tile-x").val(),g.dy=+$("#tile-y").val()}function u(){c.fillStyle="#000",c.fillRect(g.x,g.y,g.w,g.h),c.strokeStyle="white",c.strokeRect(g.x-.5,g.y-.5,g.w+1,g.h+1)}var c,l,h,f,d,p,m,v={},g={x:50,y:10,w:740,h:512,dx:1,dy:1},x={interval:0,sampCount:0,freq:0},y=!1,b=[[0,0,0,0],[.1,41,17,41],[.25,34,17,78],[.6,17,30,105],[1,17,57,126],[1.2,17,84,128],[1.3,17,111,115],[1.4,17,134,96],[1.5,17,155,71],[1.6,68,194,17],[1.75,111,209,17],[1.84,180,213,17],[1.9,223,217,86],[1.97,248,222,176],[1.99,255,237,222],[2,255,255,255]];return v.init=function(){var t=$("#sg")[0];c=t.getContext("2d"),u(),s(),a(),o(),p=msNow()-1e4,m=msNow()-1e4,$("#count").on("change",function(){var t=+$("#count").val(),e=Math.max(1,g.h/(t/2));$("#tile-x").val(Math.max(4,e)),$("#tile-y").val(e)}),$("#tile-y").on("change",function(){$("#tile-x").val(Math.max(4,$(this).val()))}),$("#go-btn").on("click",function(){y=!y,y?(s(),o(),i()):clearTimeout(l),$("#go-btn").toggleClass("btn-green").toggleClass("btn-red").html(y?"Stop":"Start")})},v}(),page_status=function(){function t(t,a){if(200!=a)errorMsg("Update failed.");else try{var o=JSON.parse(t);n.j=o,$(".sta-only").toggle(o.sta),$(".ap-only").toggle(o.ap),$("#uptime").html(o.uptime),$("#heap").html(o.heap+" bytes"),$("#wmode").html(o.wifiMode),o.sta&&($("#staSSID").html(o.sta.SSID),$("#staRSSIperc").html(o.sta.RSSIperc),$("#staRSSI").html(o.sta.RSSI),$("#staMAC").html(o.sta.MAC)),o.ap&&($("#apSSID").html(o.ap.SSID),$("#apHidden").html(o.ap.hidden?"Yes":"No"),$("#apAuth").html(o.ap.auth),$(".ap-auth-only").toggle("Open"!=o.ap.auth),$("#apPwd").html(o.ap.pwd),$("#apChan").html(o.ap.chan),$("#apMAC").html(o.ap.MAC))}catch(s){errorMsg(s)}i||setTimeout(e,r)}function e(){$().get(_root+"/system/status",t)}var n={};n.j={};var r=1e4,i=!1;return n.trigReset=function(){var t="#reset-modal";$().get(_root+"/system/reset",function(n,r){if(200==r){modal.show(t),i=!0;var a=setInterval(function(){$().get(_root+"/system/ping",function(n,r){200==r&&(modal.hide(t),e(),clearInterval(a),i=!1)},{timeout:500})},1e3)}})},n.init=function(){e()},n}(),page_mon=function(){function t(t){$("#hasref").html(t?"OK":"Not set!")}function e(){var t=$("#rep-svc-xv")[0].checked;t?$(".xv-only").removeClass("hidden"):$(".xv-only").addClass("hidden")}var n={};return n.captureRef=function(){$().get(_root+"/mon/setref",function(e,n){if(200!=n)errorMsg("Operation failed.");else try{var r=JSON.parse(e);t(r.success)}catch(i){errorMsg(i),t(!1)}})},n.compareNow=function(){$().get(_root+"/mon/compare",function(t,e){if(200!=e)errorMsg("Operation failed.");else try{var n=JSON.parse(t);if(!n.success)throw"Capture failed.";$("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},n.init=function(){e(),$("#rep-svc-xv,#rep-svc-ts").on("change",e),setInterval(function(){$().get(_root+"/mon/status",function(t,e){if(200==e)try{var n=JSON.parse(t);n.success&&($("#actual-dev").html(numfmt(n.deviation,2)),$("#actual-rms").html(numfmt(n.rms,2)))}catch(r){errorMsg(r),$("#actual-dev").html("--"),$("#actual-rms").html("--")}})},1e4)},n}(); \ No newline at end of file diff --git a/html_src/page_fft.php b/html_src/page_fft.php index d5875a5..46913d6 100644 --- a/html_src/page_fft.php +++ b/html_src/page_fft.php @@ -56,6 +56,16 @@ + + diff --git a/html_src/page_waveform.php b/html_src/page_waveform.php index eb0b877..5bc4a45 100644 --- a/html_src/page_waveform.php +++ b/html_src/page_waveform.php @@ -45,6 +45,11 @@ + + diff --git a/html_src/sass/app.scss b/html_src/sass/app.scss index 4e24e5c..ac29dfa 100644 --- a/html_src/sass/app.scss +++ b/html_src/sass/app.scss @@ -31,11 +31,11 @@ $c-form-highlight-a: #28bc65; } .invis { - visibility: hidden; + visibility: hidden !important; } .hidden { - display: none; + display: none !important; } .nb { @@ -45,6 +45,7 @@ $c-form-highlight-a: #28bc65; @import "layout/index"; @import "form/index"; + // import all our pages @import "pages/wifi"; @import "pages/home"; diff --git a/html_src/sass/layout/_base.scss b/html_src/sass/layout/_base.scss index 3861c71..2a9e5a6 100644 --- a/html_src/sass/layout/_base.scss +++ b/html_src/sass/layout/_base.scss @@ -12,6 +12,7 @@ html, body { } a, a:visited, a:link { + cursor: pointer; color: #5abfff; text-decoration: none; } @@ -20,3 +21,27 @@ a:hover { color: #5abfff; text-decoration: underline; } + +.chartexport a { + background: #3b7299; + border-radius: 3px; + padding: 5px; + color: #0c171e; + text-decoration: none; + + &:hover { + background: #4ea6dd; + } + + &:active { + position: relative; + top: 1px; + } +} + +.chartexport textarea { + margin-top: 10px; + width: 100%; + height: 10em; + resize: vertical; +} diff --git a/html_src/sass/layout/_modal.scss b/html_src/sass/layout/_modal.scss index 530e956..781d833 100644 --- a/html_src/sass/layout/_modal.scss +++ b/html_src/sass/layout/_modal.scss @@ -41,7 +41,7 @@ } // "toast" -.ErrMsg { +.NotifyMsg { position: fixed; bottom: dist(2); padding: dist(-1) dist(0); @@ -53,7 +53,11 @@ -webkit-font-smoothing: subpixel-antialiased; -webkit-transform: translateZ(0) scale(1.0, 1.0); - background: #d03e42; + background: #37a349; + &.error { + background: #d03e42; + } + color: white; text-shadow: 0 0 2px black; box-shadow: 0 0 6px 0 rgba(black, .6);