See espterm.github.io
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.
espterm-demo-website/js/app.4a032ee-en.js

4 lines
115 KiB

7 years ago
!function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=9)}([function(e,t,n){"use strict";t.mk=function(e){return document.createElement(e)},t.qs=function(e){return document.querySelector(e)},t.qsa=function(e){return document.querySelectorAll(e)},t.cr=function(e){return function(t){10!==t.which&&13!==t.which&&32!==t.which||e()}},t.parse2B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.charCodeAt(t++)-1+127*(e.charCodeAt(t)-1)},t.parse3B=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.charCodeAt(t)-1+127*(e.charCodeAt(t+1)-1)+127*(e.charCodeAt(t+2)-1)*127},t.encode2B=function(e){var t=void 0,n=void 0;return t=e%127,e=(e-t)/127,t+=1,n=e+1,String.fromCharCode(t)+String.fromCharCode(n)},t.encode3B=function(e){var t=void 0,n=void 0,i=void 0;return t=e%127,e=(e-t)/127,t+=1,n=e%127,e=(e-n)/127,n+=1,i=e+1,String.fromCharCode(t)+String.fromCharCode(n)+String.fromCharCode(i)}},function(e,t,n){"use strict";var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};/*!chibi 3.0.7, Copyright 2012-2016 Kyle Barrow, released under MIT license */
!function(){function t(){var e;for(m=!0,e=0;e<v.length;e+=1)v[e]();v=[]}function n(){var e;for(g=!0,m||t(),e=0;e<p.length;e+=1)p[e]();p=[]}function r(e,t){var n;for(n=t.length-1;n>=0;n-=1)e(t[n])}function o(e){return e.replace(/-\w/g,function(e){return e.charAt(1).toUpperCase()})}function s(e,t){return e.currentStyle?e.currentStyle[o(t)]:y.getComputedStyle?y.getComputedStyle(e,null).getPropertyValue(t):null}function a(e,t){return encodeURIComponent(e).replace(/%20/g,"+")+"="+encodeURIComponent(t).replace(/%20/g,"+")}function l(e,t,n){try{e.style[o(t)]=n}catch(e){}}function c(e){e.style.display="","none"===s(e,"display")&&(e.style.display="block")}function h(e){var t,n,i,o="";if(e.constructor===Object){for(t in e)if(e.hasOwnProperty(t))if(e[t].constructor===Array)for(n=0;n<e[t].length;n+=1)o+="&"+a(t,e[t][n]);else o+="&"+a(t,e[t])}else r(function(e){if("FORM"===e.nodeName)for(n=0;n<e.elements.length;n+=1)if(t=e.elements[n],!t.disabled)switch(t.type){case"button":case"image":case"file":case"submit":case"reset":break;case"select-one":t.length>0&&(o+="&"+a(t.name,t.value));break;case"select-multiple":for(i=0;i<t.length;i+=1)t[i].selected&&(o+="&"+a(t.name,t[i].value));break;case"checkbox":case"radio":t.checked&&(o+="&"+a(t.name,t.value));break;default:o+="&"+a(t.name,t.value)}},e);return o.length>0?o.substring(1):""}function u(e,t,n){var i,o,s=!1;return e&&(i=e.split(/\s+/),r(function(e){for(o=0;o<i.length;o+=1){var n=i[o];if("remove"===t)e.classList.remove(n);else if("add"===t)e.classList.add(n);else if("toggle"===t)e.classList.toggle(n);else if("has"===t&&e.classList.contains(n)){s=!0;break}}},n)),s}function d(e,t,n){var i,o;e&&r(function(n){for(i=w.createElement("div"),i.innerHTML=e;null!==(o=i.lastChild);)try{"before"===t?n.parentNode.insertBefore(o,n):"after"===t?n.parentNode.insertBefore(o,n.nextSibling):"append"===t?n.appendChild(o):"prepend"===t&&n.insertBefore(o,n.firstChild)}catch(e){break}},n)}function f(e){var t,n,a,h=[],v=!1;if(e)if(e.nodeType&&1===e.nodeType)h=[e];else if("object"===(void 0===e?"undefined":i(e)))v="number"!=typeof e.length,h=e;else if("string"==typeof e)for(n=w.querySelectorAll(e),a=0;a<n.length;a+=1)h[a]=n[a];return t=v?{}:h,t.each=function(e){return"function"==typeof e&&r(function(t){return e.apply(t,arguments)},h),t},t.first=function(){return f(h.shift())},t.last=function(){return f(h.pop())},t.odd=function(){var e,t=[];for(e=0;e<h.length;e+=2)t.push(h[e]);return f(t)},t.even=function(){var e,t=[];for(e=1;e<h.length;e+=2)t.push(h[e]);return f(t)},t.hide=function(){return r(function(e){e.style.display="none"},h),t},t.show=function(){return r(function(e){c(e)},h),t},t.toggle=function(e){return void 0!==e?e?t.show():t.hide():r(function(e){"none"===s(e,"display")?c(e):e.style.display="none"},h),t},t.remove=function(){return r(function(e){try{e.parentNode.removeChild(e)}catch(e){}},h),f()},t.css=function(e,n){if(e){if(n||""===n)return r(function(t){l(t,e,n)},h),t;if(h[0]){if(h[0].style[o(e)])return h[0].style[o(e)];if(s(h[0],e))return s(h[0],e)}}},t.getClass=function(){if(h[0]&&h[0].className.length>0)return h[0].className.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"").replace(/\s+/," ")},t.setClass=function(e){return(e||""===e)&&r(function(t){t.className=e},h),t},t.addClass=function(e){return u(e,"add",h),t},t.removeClass=function(e){return u(e,"remove",h),t},t.toggleClass=function(e,n){return u(e,void 0===n?"toggle":+n?"add":"remove",h),t},t.hasClass=function(e){return u(e,"has",h)},t.html=function(e){return e||""===e?(r(function(t){t.innerHTML=e},h),t):h[0]?h[0].innerHTML:void 0},t.htmlBefore=function(e){return d(e,"before",h),t},t.htmlAfter=function(e){return d(e,"after",h),t},t.htmlAppend=function(e){return d(e,"append",h),t},t.htmlPrepend=function(e){return d(e,"prepend",h),t},t.attr=function(e,n){if(e){if(e=e.toLowerCase(),void 0!==n)return r(function(t){"style"===e?t.style.cssText=n:"class"===e?t.className=n:t.setAttribute(e,n)},h),t;if(h[0])if("style"===e){if(h[0].style.cssText)return h[0].style.cssText}else if("class"===e){if(h[0].className)return h[0].className}else if(h[0].getAttri
String.fromCodePoint||function(){var e=function(){try{var e={},t=Object.defineProperty,n=t(e,e,e)&&t}catch(e){}return n}(),t=String.fromCharCode,n=Math.floor,i=function(){var e,i,r=[],o=-1,s=arguments.length;if(!s)return"";for(var a="";++o<s;){var l=Number(arguments[o]);if(!isFinite(l)||l<0||l>1114111||n(l)!=l)throw RangeError("Invalid code point: "+l);l<=65535?r.push(l):(l-=65536,e=55296+(l>>10),i=l%1024+56320,r.push(e,i)),(o+1==s||r.length>16384)&&(a+=t.apply(null,r),r.length=0)}return a};e?e(String,"fromCodePoint",{value:i,configurable:!0,writable:!0}):String.fromCodePoint=i}()},function(e,t,n){"use strict";function i(){d=!0,r("#content").addClass("load")}var r=n(1),o=n(0),s=o.mk,a=o.qs,l=o.qsa,c=o.cr,h=n(2),u=n(3);r.ready(function(){function e(){r("#menu").toggleClass("expanded")}r("#brand").on("click",e).on("keypress",c(e)),r(".Row.checkbox").forEach(function(e){var t=e.querySelector("input"),n=e.querySelector(".box");r(n).toggleClass("checked",t.value);var i=function(){t.value=1-t.value,r(n).toggleClass("checked",t.value)};r(e).on("click",i).on("keypress",c(i))}),r(".Box.mobcol,.Box.fold").forEach(function(e){var t=e.querySelector("h2"),n=function(){r(e).hasClass("d-expanded")?r(e).removeClass("d-expanded"):r(e).toggleClass("expanded")};r(t).on("click",n).on("keypress",c(n))}),r("form").forEach(function(e){r(e).on("keypress",function(t){10!==t.keyCode&&13!==t.keyCode||!t.ctrlKey||e.submit()})}),setInterval(function(){r(".anim-dots").each(function(e){var t=r(e),n=t.html()+".";5===n.length&&(n="."),t.html(n)})},1e3),r("input[type=number]").on("wheel",function(e){var t=r(this),n=+t.val();isNaN(n)&&(n=1);var i=+(t.attr("step")||1),o=+t.attr("min"),s=+t.attr("max");if(e.deltaY>0?n+=i:n-=i,Number.isFinite(o)&&(n=Math.max(n,+o)),Number.isFinite(s)&&(n=Math.min(n,+s)),t.val(n),"createEvent"in document){var a=document.createEvent("HTMLEvents");a.initEvent("change",!1,!0),t[0].dispatchEvent(a)}else t[0].fireEvent("onchange");e.preventDefault()});var t=window.location.search.indexOf("err=");if(-1!==t&&a(".Box.errors")){var n=decodeURIComponent(window.location.search.substr(t+4)).split(","),i=[];n.forEach(function(e){var t=l('label[for="'+e+'"]');if(t)for(var n=0;n<t.length;n++){var r=t[n];r.classList.add("error"),0===n&&i.push(r.childNodes[0].textContent.trim().replace(/: ?$/,""))}else i.push(e)}),a(".Box.errors .list").innerHTML=i.join(", "),a(".Box.errors").classList.remove("hidden")}var o=window.location.search.indexOf("msg=");if(-1!==o&&a(".Box.message")){var s=decodeURIComponent(window.location.search.substr(o+4)),d=a(".Box.message");d.innerHTML=s,d.classList.remove("hidden"),setTimeout(function(){d.classList.add("hiding"),setTimeout(function(){d.classList.add("hidden")},1e3)},2e3)}if(h.init(),u.init(),window.innerWidth>550){r(".Box h2").forEach(function(e){e.removeAttribute("tabindex")});var f=a("#brand");f&&f.addEventListener("click",function(){window.location.href="/"})}}),r._loader=function(e){r("#loader").toggleClass("show",e)};var d=!1;window.showPage=i,r.ready(function(){!0===window.noAutoShow?setTimeout(function(){if(!d){var e=s("P");e.id="load-failed",e.innerHTML='Server connection failed! Trying again<span class="anim-dots" style="width:1.5em;text-align:left;display:inline-block">.</span>',a("#screen").appendChild(e),i()}},2e3):setTimeout(function(){i()},1)})},function(e,t,n){"use strict";var i=n(1),r=n(0),o=r.mk,s=n(8),a=function(e){return"+"+(.25*e.value).toFixed(2)+" dBm"},l=function(e,t,n){i("#sta_ssid").val(e),i("#sta_password").val(t),i("#sta-nw").toggleClass("hidden",0===e.length),i("#sta-nw-nil").toggleClass("hidden",e.length>0),i("#sta-nw .essid").html(i.htmlEscape(e));var r=!!t;i("#sta-nw .passwd").toggleClass("hidden",!r),i("#sta-nw .nopasswd").toggleClass("hidden",r),i("#sta-nw .ip").html(n.length>0?s("wifi.connected_ip_is")+n:s("wifi.not_conn"))},c=function(e,t){if(200!==t)return void d(5e3);try{e=JSON.parse(e)}catch(e){return console.log(e),void d(5e3)}var n=!e.result.inProgress&&e.result.APs.length>0;if(d(n?15e3:1e3),n){var r=i("#ap-list");i("#ap-list .AP").remove(),r.toggleClass("hidden",!n),i(
//# sourceMappingURL=app.4a032ee-en.js.map