ESP8266 part of the f105-motor-demo project (see f105-motor-demo_stm32)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
28 KiB

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 o;try{o=document.execCommand("copy")}catch(u){o=!1}return r&&"function"==typeof r.focus&&r.focus(),n.textContent="",o}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(h=!0,t=0;t<p.length;t+=1)p[t]();p=[]}function e(){var e;for(v=!0,h||t(),e=0;e<d.length;e+=1)d[e]();d=[]}function n(t,e){var n;for(n=e.length-1;n>=0;n-=1)t(e[n])}function r(t){return t.replace(/-\w/g,function(t){return t.charAt(1).toUpperCase()})}function o(t,e){return t.currentStyle?t.currentStyle[r(e)]:m.getComputedStyle?m.getComputedStyle(t,null).getPropertyValue(e):null}function u(t,e){return encodeURIComponent(t).replace(/%20/g,"+")+"="+encodeURIComponent(e).replace(/%20/g,"+")}function a(t,e,n){try{t.style[r(e)]=n}catch(o){}}function i(t){t.style.display="","none"===o(t,"display")&&(t.style.display="block")}function c(t){var e,r,o,a="";if(t.constructor===Object){for(e in t)if(t.hasOwnProperty(e))if(t[e].constructor===Array)for(r=0;r<t[e].length;r+=1)a+="&"+u(e,t[e][r]);else a+="&"+u(e,t[e])}else n(function(t){if("FORM"===t.nodeName)for(r=0;r<t.elements.length;r+=1)if(e=t.elements[r],!e.disabled)switch(e.type){case"button":case"image":case"file":case"submit":case"reset":break;case"select-one":e.length>0&&(a+="&"+u(e.name,e.value));break;case"select-multiple":for(o=0;o<e.length;o+=1)e[o].selected&&(a+="&"+u(e.name,e[o].value));break;case"checkbox":case"radio":e.checked&&(a+="&"+u(e.name,e.value));break;default:a+="&"+u(e.name,e.value)}},t);return a.length>0?a.substring(1):""}function f(t,e,r){var o,u,a,i=!1;return t&&(o=t.split(/\s+/),n(function(t){for(a=0;a<o.length;a+=1)if(u=new RegExp("\\b"+o[a]+"\\b","g"),"remove"===e)t.className=t.className.replace(u,"");else if("toggle"===e)t.className=t.className.match(u)?t.className.replace(u,""):t.className+" "+o[a];else if("has"===e&&t.className.match(u)){i=!0;break}},r)),i}function s(t,e,r){var o,u;t&&n(function(n){for(o=g.createElement("div"),o.innerHTML=t;null!==(u=o.lastChild);)try{"before"===e?n.parentNode.insertBefore(u,n):"after"===e?n.parentNode.insertBefore(u,n.nextSibling):"append"===e?n.appendChild(u):"prepend"===e&&n.insertBefore(u,n.firstChild)}catch(r){break}},r)}function l(t){var e,u,y,b=[],w=!1;if(t)if(t.nodeType&&1===t.nodeType)b=[t];else if("object"==typeof t)w="number"!=typeof t.length,b=t;else if("string"==typeof t)for(g.querySelectorAll||(g.querySelectorAll=function(t){var e,n,r,u=g.getElementsByTagName("head")[0],a=[];if(e=g.createElement("STYLE"),e.type="text/css",e.styleSheet){for(e.styleSheet.cssText=t+" {a:b}",u.appendChild(e),n=g.getElementsByTagName("*"),r=0;r<n.length;r+=1)"b"===o(n[r],"a")&&a.push(n[r]);u.removeChild(e)}return a}),u=g.querySelectorAll(t),y=0;y<u.length;y+=1)b[y]=u[y];return e=w?{}:b,e.ready=function(t){if(t){if(h)return t(),e;p.push(t)}},e.loaded=function(t){if(t){if(v)return t(),e;d.push(t)}},e.each=function(t){return"function"==typeof t&&n(function(e){return t.apply(e,arguments)},b),e},e.first=function(){return l(b.shift())},e.last=function(){return l(b.pop())},e.odd=function(){var t,e=[];for(t=0;t<b.length;t+=2)e.push(b[t]);return l(e)},e.even=function(){var t,e=[];for(t=1;t<b.length;t+=2)e.push(b[t]);return l(e)},e.hide=function(){return n(function(t){t.style.display="none"},b),e},e.show=function(){return n(function(t){i(t)},b),e},e.toggle=function(t){return"undefined"!=typeof t?t?e.show():e.hide():n(function(t){"none"===o(t,"display")?i(t):t.style.display="none"},b),e},e.remove=function(){return n(function(t){try{t.parentNode.removeChild(t)}catch(e){}},b),l()},e.css=function(t,u){if(t){if(u||""===u)return n(function(e){a(e,t,u)},b),e;if(b[0]){if(b[0].style[r(t)])return b[0].style[r(t)];if(o(b[0],t))return o(b[0],t)}}},e.getClass=function(){return b[0]&&b[0].className.length>0?b[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},b),e},e.addClass=function(t){return t&&n(function(e){e.className+=" "+t},b),e},e.removeClass=function(t){return f(t,"remove",b),e},e.toggleClass=function(t){return f(t,"toggle",b),e},e.hasClass=function(t){return f(t,"has",b)},e.html=function(t){return t||""===t?(n(function(e){e.innerHTML=t},b),e):b[0]?b[0].innerHTML:void 0},e.htmlBefore=function(t){return s(t,"before",b),e},e.htmlAfter=function(t){return s(t,"after",b),e},e.htmlAppend=function(t){return s(t,"append",b),e},e.htmlPrepend=function(t){return s(t,"prepend",b),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)},b),e;if(b[0])if("style"===t){if(b[0].style.cssText)return b[0].style.cssText}else if("class"===t){if(b[0].className)return b[0].className}else if(b[0].getAttribute(t))return b[0].getAttribute(t)}},e.data=function(t,n){return t?e.attr("data-"+t,n):void 0},e.val=function(t){var r,o,u;if(!_.isUndefined(t))return n(function(e){switch(e.nodeName){case"SELECT":for(("string"==typeof t||"number"==typeof t)&&(t=[t]),o=0;o<e.length;o+=1)for(u=0;u<t.length;u+=1)if(e[o].selected="",e[o].value===t[u]){e[o].selected="selected";break}break;case"INPUT":case"TEXTAREA":case"BUTTON":e.value=t}},b),e;if(b[0])switch(b[0].nodeName){case"SELECT":for(r=[],o=0;o<b[0].length;o+=1)b[0][o].selected&&r.push(b[0][o].value);return r.length>1?r:r[0];case"INPUT":case"TEXTAREA":case"BUTTON":return b[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)},b),e):!b[0]||"INPUT"!==b[0].nodeName||"checkbox"!==b[0].type&&"radio"!==b[0].type?void 0:!!b[0].checked},e.on=function(r,o){return(t===m||t===g)&&(b=[t]),n(function(t){g.addEventListener?t.addEventListener(r,o,!1):g.attachEvent&&(t[r+o]=function(){return o.apply(t,arguments)},t.attachEvent("on"+r,t[r+o]))},b),e},e.off=function(r,o){return(t===m||t===g)&&(b=[t]),n(function(t){g.addEventListener?t.removeEventListener(r,o,!1):g.attachEvent&&(t.detachEvent("on"+r,t[r+o]),t[r+o]=null)},b),e},e.ajax=function(t,e,n,r){var o,u,a=c(b),i=e?e.toUpperCase():"GET";_.isNumber(r)&&(r={timeout:r});var f=_.extend({},{nocache:!0,timeout:5e3,loader:!0},r);if(a&&"GET"===i&&(t+=-1===t.indexOf("?")?"?"+a:"&"+a,a=null),o=new XMLHttpRequest){if(f.nocache){var s=(+new Date).toString(36);t+=(-1===t.indexOf("?")?"?":"&")+"_="+s}f.loader&&$("#loader").addClass("show"),o.open(i,t,!0),o.timeout=f.timeout,u=setTimeout(function(){errorMsg("XHR timed out."),o.abort(),f.loader&&$("#loader").removeClass("show")},f.timeout+10),o.onreadystatechange=function(){4===o.readyState&&(f.loader&&$("#loader").removeClass("show"),n&&0!=o.status&&n(o.responseText,o.status),clearTimeout(u))},o.setRequestHeader("X-Requested-With","XMLHttpRequest"),"POST"===i&&o.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),o.send(a)}return o},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 p=[],d=[],h=!1,v=!1,g=document,m=window;g.addEventListener?(g.addEventListener("DOMContentLoaded",t,!1),m.addEventListener("load",e,!1)):g.attachEvent?(g.attachEvent("onreadystatechange",t),m.attachEvent("onload",e)):m.onload=e,m.$=l}(),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,n){var r=n.length;switch(r){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function r(t,e){for(var n=-1,r=t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function o(t,e){for(var n=-1,r=t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function u(t,e,n,r){var o=-1,u=t.length;for(r&&u&&(n=t[++o]);++o<u;)n=e(n,t[o],o,t);return n}function a(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function i(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function c(t,e){return o(e,function(e){return[e,t[e]]})}function f(t){return t&&t.Object===Object?t:null}function s(t){return $n[t]}function l(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(n){}return e}function p(t,e){return t="number"==typeof t||En.test(t)?+t:-1,e=null==e?ke:e,t>-1&&t%1==0&&e>t}function d(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function h(t){var e=-1,n=Array(t.size);return t.forEach(function(t,r){n[++e]=[r,t]}),n}function v(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}function g(t){return xn[t]}function m(){}function y(){}function b(t,e){return _(t,e)&&delete t[e]}function w(t,e){if(ur){var n=t[e];return n===Ce?je:n}return Bn.call(t,e)?t[e]:je}function _(t,e){return ur?t[e]!==je:Bn.call(t,e)}function E(t,e,n){t[e]=ur&&n===je?Ce:n}function j(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function A(){this.__data__={hash:new y,map:nr?new nr:[],string:new y}}function $(t){var e=this.__data__;return Ut(t)?b("string"==typeof t?e.string:e.hash,t):nr?e.map["delete"](t):P(e.map,t)}function x(t){var e=this.__data__;return Ut(t)?w("string"==typeof t?e.string:e.hash,t):nr?e.map.get(t):R(e.map,t)}function C(t){var e=this.__data__;return Ut(t)?_("string"==typeof t?e.string:e.hash,t):nr?e.map.has(t):I(e.map,t)}function O(t,e){var n=this.__data__;return Ut(t)?E("string"==typeof t?n.string:n.hash,t,e):nr?n.map.set(t,e):F(n.map,t,e),this}function T(t){var e=-1,n=t?t.length:0;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function N(){this.__data__={array:[],map:null}}function k(t){var e=this.__data__,n=e.array;return n?P(n,t):e.map["delete"](t)}function S(t){var e=this.__data__,n=e.array;return n?R(n,t):e.map.get(t)}function L(t){var e=this.__data__,n=e.array;return n?I(n,t):e.map.has(t)}function M(t,e){var n=this.__data__,r=n.array;r&&(r.length<$e-1?F(r,t,e):(n.array=null,n.map=new j(r)));var o=n.map;return o&&o.set(t,e),this}function P(t,e){var n=U(t,e);if(0>n)return!1;var r=t.length-1;return n==r?t.pop():Qn.call(t,n,1),!0}function R(t,e){var n=U(t,e);return 0>n?je:t[n][1]}function I(t,e){return U(t,e)>-1}function U(t,e){for(var n=t.length;n--;)if(Gt(t[n][0],e))return n;return-1}function F(t,e,n){var r=U(t,e);0>r?t.push([e,n]):t[r][1]=n}function B(t,e,n){var r=t[e];Bn.call(t,e)&&Gt(r,n)&&(n!==je||e in t)||(t[e]=n)}function q(t,e){return t&&mt(e,pe(e),t)}function H(t){return"function"==typeof t?t:we}function W(t){return mr(t)?t:Ht(t)}function D(t,e,n,o,u,a,i){var c;if(o&&(c=a?o(t,u,a,i):o(t)),c!==je)return c;if(!Zt(t))return t;var f=mr(t);if(f){if(c=St(t),!e)return gt(t,c)}else{var s=Nt(t),p=s==Fe||s==Be;if(yr(t))return ft(t,e);if(s==We||s==Me||p&&!a){if(l(t))return a?t:{};if(c=Lt(p?{}:t),!e)return c=q(c,t),n?bt(t,c):c}else{if(!An[s])return a?t:{};c=Mt(t,s,e)}}i||(i=new T);var d=i.get(t);return d?d:(i.set(t,c),(f?r:z)(t,function(r,u){B(c,u,D(r,e,n,o,u,t,i))}),n&&!f?bt(t,c):c)}function X(t){return Zt(t)?Yn(t):{}}function z(t,e){return t&&hr(t,e,pe)}function G(t,e){e=It(e,t)?[e+""]:W(e);for(var n=0,r=e.length;null!=t&&r>n;)t=t[e[n++]];return n&&n==r?t:je}function V(t,e){return Bn.call(t,e)||"object"==typeof t&&e in t&&null===Vn(t)}function J(t,e){return e in Object(t)}function Y(t,e,n,r,o){return t===e?!0:null==t||null==e||!Zt(t)&&!te(e)?t!==t&&e!==e:K(t,e,Y,n,r,o)}function K(t,e,n,r,o,u){var a=mr(t),i=mr(e),c=Pe,f=Pe;a||(c=Nt(t),c=c==Me?We:c),i||(f=Nt(e),f=f==Me?We:f);var s=c==We&&!l(t),p=f==We&&!l(e),d=c==f;if(d&&!s)return u||(u=new T),a||ue(t)?At(t,e,n,r,o,u):$t(t,e,c,n,r,o,u);if(!(o&Te)){var h=s&&Bn.call(t,"__wrapped__"),v=p&&Bn.call(e,"__wrapped__");if(h||v)return u||(u=new T),n(h?t.value():t,v?e.value():e,r,o,u)}return d?(u||(u=new T),xt(t,e,n,r,o,u)):!1}function Q(t,e,n,r){var o=n.length,u=o,a=!r;if(null==t)return!u;for(t=Object(t);o--;){var i=n[o];if(a&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<u;){i=n[o];var c=i[0],f=t[c],s=i[1];if(a&&i[2]){if(f===je&&!(c in t))return!1}else{var l=new T,p=r?r(f,s,c,t,e,l):je;if(!(p===je?Y(s,f,r,Oe|Te,l):p))return!1}}return!0}function Z(t){var e=typeof t;return"function"==e?t:null==t?we:"object"==e?mr(t)?ot(t[0],t[1]):rt(t):Ee(t)}function tt(t){return tr(Object(t))}function et(t){t=null==t?t:Object(t);var e=[];for(var n in t)e.push(n);return e}function nt(t,e){var n=-1,r=Jt(t)?Array(t.length):[];return dr(t,function(t,o,u){r[++n]=e(t,o,u)}),r}function rt(t){var e=Ot(t);if(1==e.length&&e[0][2]){var n=e[0][0],r=e[0][1];return function(t){return null==t?!1:t[n]===r&&(r!==je||n in Object(t))}}return function(n){return n===t||Q(n,t,e)}}function ot(t,e){return function(n){var r=se(n,t);return r===je&&r===e?le(n,t):Y(e,r,je,Oe|Te)}}function ut(t){return function(e){return null==e?je:e[t]}}function at(t){return function(e){return G(e,t)}}function it(t,e,n,r){for(var o=-1,u=er(Zn((e-t)/(n||1)),0),a=Array(u);u--;)a[r?u:++o]=t,t+=n;return a}function ct(t,e,n){var r=-1,o=t.length;0>e&&(e=-e>o?0:o+e),n=n>o?o:n,0>n&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var u=Array(o);++r<o;)u[r]=t[r+e];return u}function ft(t,e){if(e)return t.slice();var n=new t.constructor(t.length);return t.copy(n),n}function st(t){var e=new t.constructor(t.byteLength);return new zn(e).set(new zn(t)),e}function lt(e){return u(h(e),t,new e.constructor)}function pt(t){var e=new t.constructor(t.source,mn.exec(t));return e.lastIndex=t.lastIndex,e}function dt(t){return u(v(t),e,new t.constructor)}function ht(t){return lr?Object(lr.call(t)):{}}function vt(t,e){var n=e?st(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function gt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}function mt(t,e,n){return yt(t,e,n)}function yt(t,e,n,r){n||(n={});for(var o=-1,u=e.length;++o<u;){var a=e[o],i=r?r(n[a],t[a],a,n,t):t[a];B(n,a,i)}return n}function bt(t,e){return mt(t,gr(t),e)}function wt(t){return zt(function(e,n){var r=-1,o=n.length,u=o>1?n[o-1]:je,a=o>2?n[2]:je;for(u="function"==typeof u?(o--,u):je,a&&Rt(n[0],n[1],a)&&(u=3>o?je:u,o=1),e=Object(e);++r<o;){var i=n[r];i&&t(e,i,r,u)}return e})}function _t(t,e){return function(n,r){if(null==n)return n;if(!Jt(n))return t(n,r);for(var o=n.length,u=e?o:-1,a=Object(n);(e?u--:++u<o)&&r(a[u],u,a)!==!1;);return n}}function Et(t){return function(e,n,r){for(var o=-1,u=Object(e),a=r(e),i=a.length;i--;){var c=a[t?i:++o];if(n(u[c],c,u)===!1)break}return e}}function jt(t){return function(e,n,r){return r&&"number"!=typeof r&&Rt(e,n,r)&&(n=r=je),e=ce(e),e=e===e?e:0,n===je?(n=e,e=0):n=ce(n)||0,r=r===je?n>e?1:-1:ce(r)||0,it(e,n,r,t)}}function At(t,e,n,r,o,u){var i=-1,c=o&Te,f=o&Oe,s=t.length,l=e.length;if(s!=l&&!(c&&l>s))return!1;var p=u.get(t);if(p)return p==e;var d=!0;for(u.set(t,e);++i<s;){var h=t[i],v=e[i];if(r)var g=c?r(v,h,i,e,t,u):r(h,v,i,t,e,u);if(g!==je){if(g)continue;d=!1;break}if(f){if(!a(e,function(t){return h===t||n(h,t,r,o,u)})){d=!1;break}}else if(h!==v&&!n(h,v,r,o,u)){d=!1;break}}return u["delete"](t),d}function $t(t,e,n,r,o,u,a){switch(n){case Je:return t.byteLength==e.byteLength&&r(new zn(t),new zn(e))?!0:!1;case Re:case Ie:return+t==+e;case Ue:return t.name==e.name&&t.message==e.message;case He:return t!=+t?e!=+e:t==+e;case De:case ze:return t==e+"";case qe:var i=h;case Xe:var c=u&Te;if(i||(i=v),t.size!=e.size&&!c)return!1;var f=a.get(t);return f?f==e:At(i(t),i(e),r,o,u|Oe,a.set(t,e));case Ge:if(lr)return lr.call(t)==lr.call(e)}return!1}function xt(t,e,n,r,o,u){var a=o&Te,i=pe(t),c=i.length,f=pe(e),s=f.length;if(c!=s&&!a)return!1;for(var l=c;l--;){var p=i[l];if(!(a?p in e:V(e,p)))return!1}var d=u.get(t);if(d)return d==e;var h=!0;u.set(t,e);for(var v=a;++l<c;){p=i[l];var g=t[p],m=e[p];if(r)var y=a?r(m,g,p,e,t,u):r(g,m,p,t,e,u);if(!(y===je?g===m||n(g,m,r,o,u):y)){h=!1;break}v||(v="constructor"==p)}if(h&&!v){var b=t.constructor,w=e.constructor;b!=w&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w)&&(h=!1)}return u["delete"](t),h}function Ct(){var t=m.iteratee||_e;return t=t===_e?Z:t,arguments.length?t(arguments[0],arguments[1]):t}function Ot(t){for(var e=he(t),n=e.length;n--;)e[n][2]=Bt(e[n][1]);return e}function Tt(t,e){var n=t[e];return ee(n)?n:je}function Nt(t){return qn.call(t)}function kt(t,e,n){if(null==t)return!1;var r=n(t,e);r||It(e)||(e=W(e),t=qt(t,e),null!=t&&(e=Wt(e),r=n(t,e)));var o=t?t.length:je;return r||!!o&&Qt(o)&&p(e,o)&&(mr(t)||re(t)||Vt(t))}function St(t){var e=t.length,n=t.constructor(e);return e&&"string"==typeof t[0]&&Bn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}function Lt(t){return"function"!=typeof t.constructor||Ft(t)?{}:X(Vn(t))}function Mt(t,e,n){var r=t.constructor;switch(e){case Je:return st(t);case Re:case Ie:return new r(+t);case Ye:case Ke:case Qe:case Ze:case tn:case en:case nn:case rn:case on:return vt(t,n);case qe:return lt(t);case He:case ze:return new r(t);case De:return pt(t);case Xe:return dt(t);case Ge:return ht(t)}}function Pt(t){var e=t?t.length:je;return Qt(e)&&(mr(t)||re(t)||Vt(t))?i(e,String):null}function Rt(t,e,n){if(!Zt(n))return!1;var r=typeof e;return("number"==r?Jt(n)&&p(e,n.length):"string"==r&&e in n)?Gt(n[e],t):!1}function It(t,e){return"number"==typeof t?!0:!mr(t)&&(ln.test(t)||!sn.test(t)||null!=e&&t in Object(e))}function Ut(t){var e=typeof t;return"number"==e||"boolean"==e||"string"==e&&"__proto__"!=t||null==t}function Ft(t){var e=t&&t.constructor,n="function"==typeof e&&e.prototype||Un;return t===n}function Bt(t){return t===t&&!Zt(t)}function qt(t,e){return 1==e.length?t:se(t,ct(e,0,-1))}function Ht(t){var e=[];return fe(t).replace(pn,function(t,n,r,o){e.push(r?o.replace(gn,"$1"):n||t)}),e}function Wt(t){var e=t?t.length:0;return e?t[e-1]:je}function Dt(t,e){return"function"==typeof e&&mr(t)?r(t,e):dr(t,H(e))}function Xt(t,e){var n=mr(t)?o:nt;return n(t,Ct(e,3))}function zt(t,e){if("function"!=typeof t)throw new TypeError(xe);return e=er(e===je?t.length-1:ie(e),0),function(){for(var r=arguments,o=-1,u=er(r.length-e,0),a=Array(u);++o<u;)a[o]=r[e+o];switch(e){case 0:return t.call(this,a);case 1:return t.call(this,r[0],a);case 2:return t.call(this,r[0],r[1],a)}var i=Array(e+1);for(o=-1;++o<e;)i[o]=r[o];return i[e]=a,n(t,this,i)}}function Gt(t,e){return t===e||t!==t&&e!==e}function Vt(t){return Yt(t)&&Bn.call(t,"callee")&&(!Kn.call(t,"callee")||qn.call(t)==Me)}function Jt(t){return null!=t&&Qt(vr(t))&&!Kt(t)}function Yt(t){return te(t)&&Jt(t)}function Kt(t){var e=Zt(t)?qn.call(t):"";return e==Fe||e==Be}function Qt(t){return"number"==typeof t&&t>-1&&t%1==0&&ke>=t}function Zt(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function te(t){return!!t&&"object"==typeof t}function ee(t){return null==t?!1:Kt(t)?Hn.test(Fn.call(t)):te(t)&&(l(t)?Hn:wn).test(t)}function ne(t){return"number"==typeof t||te(t)&&qn.call(t)==He}function re(t){return"string"==typeof t||!mr(t)&&te(t)&&qn.call(t)==ze}function oe(t){return"symbol"==typeof t||te(t)&&qn.call(t)==Ge}function ue(t){return te(t)&&Qt(t.length)&&!!jn[qn.call(t)]}function ae(t){return t===je}function ie(t){if(!t)return 0===t?t:0;if(t=ce(t),t===Ne||t===-Ne){var e=0>t?-1:1;return e*Se}var n=t%1;return t===t?n?t-n:t:0}function ce(t){if(Zt(t)){var e=Kt(t.valueOf)?t.valueOf():t;t=Zt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(vn,"");var n=bn.test(t);return n||_n.test(t)?On(t.slice(2),n?2:8):yn.test(t)?Le:+t}function fe(t){if("string"==typeof t)return t;if(null==t)return"";if(oe(t))return pr?pr.call(t):"";var e=t+"";return"0"==e&&1/t==-Ne?"-0":e}function se(t,e,n){var r=null==t?je:G(t,e);return r===je?n:r}function le(t,e){return kt(t,e,J)}function pe(t){var e=Ft(t);if(!e&&!Jt(t))return tt(t);var n=Pt(t),r=!!n,o=n||[],u=o.length;for(var a in t)!V(t,a)||r&&("length"==a||p(a,u))||e&&"constructor"==a||o.push(a);return o}function de(t){for(var e=-1,n=Ft(t),r=et(t),o=r.length,u=Pt(t),a=!!u,i=u||[],c=i.length;++e<o;){var f=r[e];a&&("length"==f||p(f,c))||"constructor"==f&&(n||!Bn.call(t,f))||i.push(f)}return i}function he(t){return c(t,pe(t))}function ve(t){return t=fe(t),t&&fn.test(t)?t.replace(an,s):t}function ge(t){return t=fe(t),t&&hn.test(t)?t.replace(dn,"\\$&"):t}function me(){var t=arguments,e=fe(t[0]);return t.length<3?e:e.replace(t[1],t[2])}function ye(t){return t=fe(t),t&&cn.test(t)?t.replace(un,g):t}function be(t){return function(){return t}}function we(t){return t}function _e(t){return Z("function"==typeof t?t:D(t,!0))}function Ee(t){return It(t)?ut(t):at(t)}var je,Ae="4.6.1",$e=200,xe="Expected a function",Ce="__lodash_hash_undefined__",Oe=1,Te=2,Ne=1/0,ke=9007199254740991,Se=1.7976931348623157e308,Le=NaN,Me="[object Arguments]",Pe="[object Array]",Re="[object Boolean]",Ie="[object Date]",Ue="[object Error]",Fe="[object Function]",Be="[object GeneratorFunction]",qe="[object Map]",He="[object Number]",We="[object Object]",De="[object RegExp]",Xe="[object Set]",ze="[object String]",Ge="[object Symbol]",Ve="[object WeakMap]",Je="[object ArrayBuffer]",Ye="[object Float32Array]",Ke="[object Float64Array]",Qe="[object Int8Array]",Ze="[object Int16Array]",tn="[object Int32Array]",en="[object Uint8Array]",nn="[object Uint8ClampedArray]",rn="[object Uint16Array]",on="[object Uint32Array]",un=/&(?:amp|lt|gt|quot|#39|#96);/g,an=/[&<>"'`]/g,cn=RegExp(un.source),fn=RegExp(an.source),sn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ln=/^\w*$/,pn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,dn=/[\\^$.*+?()[\]{}|]/g,hn=RegExp(dn.source),vn=/^\s+|\s+$/g,gn=/\\(\\)?/g,mn=/\w*$/,yn=/^[-+]0x[0-9a-f]+$/i,bn=/^0b[01]+$/i,wn=/^\[object .+?Constructor\]$/,_n=/^0o[0-7]+$/i,En=/^(?:0|[1-9]\d*)$/,jn={};jn[Ye]=jn[Ke]=jn[Qe]=jn[Ze]=jn[tn]=jn[en]=jn[nn]=jn[rn]=jn[on]=!0,jn[Me]=jn[Pe]=jn[Je]=jn[Re]=jn[Ie]=jn[Ue]=jn[Fe]=jn[qe]=jn[He]=jn[We]=jn[De]=jn[Xe]=jn[ze]=jn[Ve]=!1;var An={};An[Me]=An[Pe]=An[Je]=An[Re]=An[Ie]=An[Ye]=An[Ke]=An[Qe]=An[Ze]=An[tn]=An[qe]=An[He]=An[We]=An[De]=An[Xe]=An[ze]=An[Ge]=An[en]=An[nn]=An[rn]=An[on]=!0,An[Ue]=An[Fe]=An[Ve]=!1;var $n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},xn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},Cn={"function":!0,object:!0},On=parseInt,Tn=Cn[typeof exports]&&exports&&!exports.nodeType?exports:je,Nn=Cn[typeof module]&&module&&!module.nodeType?module:je,kn=Nn&&Nn.exports===Tn?Tn:je,Sn=f(Tn&&Nn&&"object"==typeof global&&global),Ln=f(Cn[typeof self]&&self),Mn=f(Cn[typeof window]&&window),Pn=f(Cn[typeof this]&&this),Rn=Sn||Mn!==(Pn&&Pn.window)&&Mn||Ln||Pn||Function("return this")(),In=Array.prototype,Un=Object.prototype,Fn=Function.prototype.toString,Bn=Un.hasOwnProperty,qn=Un.toString,Hn=RegExp("^"+Fn.call(Bn).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wn=kn?Rn.Buffer:je,Dn=Rn.Reflect,Xn=Rn.Symbol,zn=Rn.Uint8Array,Gn=Dn?Dn.enumerate:je,Vn=Object.getPrototypeOf,Jn=Object.getOwnPropertySymbols,Yn=Object.create,Kn=Un.propertyIsEnumerable,Qn=In.splice,Zn=Math.ceil,tr=Object.keys,er=Math.max,nr=Tt(Rn,"Map"),rr=Tt(Rn,"Set"),or=Tt(Rn,"WeakMap"),ur=Tt(Object,"create"),ar=!Kn.call({valueOf:1},"valueOf"),ir=nr?Fn.call(nr):"",cr=rr?Fn.call(rr):"",fr=or?Fn.call(or):"",sr=Xn?Xn.prototype:je,lr=sr?sr.valueOf:je,pr=sr?sr.toString:je,dr=_t(z),hr=Et();Gn&&!Kn.call({valueOf:1},"valueOf")&&(et=function(t){return d(Gn(t))});var vr=ut("length"),gr=Jn||function(){return[]};(nr&&Nt(new nr)!=qe||rr&&Nt(new rr)!=Xe||or&&Nt(new or)!=Ve)&&(Nt=function(t){var e=qn.call(t),n=e==We?t.constructor:null,r="function"==typeof n?Fn.call(n):"";if(r)switch(r){case ir:return qe;case cr:return Xe;case fr:return Ve}return e});var mr=Array.isArray,yr=Wn?function(t){return t instanceof Wn}:be(!1),br=wt(function(t,e){if(ar||Ft(e)||Jt(e))return void mt(e,de(e),t);for(var n in e)B(t,n,e[n])}),wr=jt();y.prototype=ur?ur(null):Un,j.prototype.clear=A,j.prototype["delete"]=$,j.prototype.get=x,j.prototype.has=C,j.prototype.set=O,T.prototype.clear=N,T.prototype["delete"]=k,T.prototype.get=S,T.prototype.has=L,T.prototype.set=M,m.assignIn=br,m.constant=be,m.iteratee=_e,m.keys=pe,m.keysIn=de,m.map=Xt,m.property=Ee,m.range=wr,m.rest=zt,m.toPairs=he,m.extend=br,m.eq=Gt,m.escape=ve,m.escapeRegExp=ge,m.forEach=Dt,m.get=se,m.hasIn=le,m.identity=we,m.isArguments=Vt,m.isArray=mr,m.isArrayLike=Jt,m.isArrayLikeObject=Yt,m.isBuffer=yr,m.isFunction=Kt,m.isLength=Qt,m.isNative=ee,m.isNumber=ne,m.isObject=Zt,m.isObjectLike=te,m.isString=re,m.isSymbol=oe,m.isTypedArray=ue,m.isUndefined=ae,m.last=Wt,m.replace=me,m.toInteger=ie,m.toNumber=ce,m.toString=fe,m.unescape=ye,m.each=Dt,m.VERSION=Ae,(Mn||Ln||{})._=m,Rn._=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 o=new RegExp(_.escapeRegExp(n),"g");t=t.replace(o,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(o,u){$(r).html(o),modal.show(r),clearTimeout(t),clearTimeout(e),_.isUndefined(u)||(t=setTimeout(n.hide,u))},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"),o=$(this).attr("max");if(t.wheelDelta>0?e+=n:e-=n,_.isUndefined(r)||(e=Math.max(e,r)),_.isUndefined(o)||(e=Math.min(e,o)),$(this).val(e),"createEvent"in document){var u=document.createEvent("HTMLEvents");u.initEvent("change",!1,!0),$(this)[0].dispatchEvent(u)}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 u=!bool(t.result.inProgress)&&t.result.APs.length>0;if(n(u?15e3:1e3),u){var a=$("#ap-list");$(".AP").remove(),a.toggle(u),$("#ap-loader").toggle(!u),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 u=document.createElement("div");$(u).addClass("inner").htmlAppend('<div class="rssi">{0}</div>'.format(t.rssi_perc)).htmlAppend('<div class="essid" title="{0}">{0}</div>'.format(_.escape(t.essid))).htmlAppend('<div class="auth">{0}</div>'.format(o[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(u),a[0].appendChild(e)}})}}function e(){$().get(_root+"/wifi/scan",t)}function n(t){setTimeout(e,t)}var r={},o=["Open","WEP","WPA","WPA2","WPA/WPA2"];return r.init=function(){e()},r}(),page_home=function(){var t={};return t.init=function(){$("#btn-fwd").on("mousedown",function(){$().get(_root+"/m/start?dir=f")}).on("mouseup",function(){$().get(_root+"/m/stop")}),$("#btn-rev").on("mousedown",function(){$().get(_root+"/m/start?dir=r")}).on("mouseup",function(){$().get(_root+"/m/stop")})},t}();